function OnFailure(n){HideAscLoad();switch(n.status){case 403:var i="/Portal/PermissionDenied";FillWindowModal("permissionWindow",i,"Permission Denied");break;default:WindowErrorHandler()}}function kendoConfiguration(){var t=25,i=[25,50,100,250,500],r,n;if($("#DefaultSettingsPageSize")!==null&&(r=parseInt($("#DefaultSettingsPageSize").val()),r!==""&&!isNaN(r)))for(t=r,n=0;n<i.length;n++)if(t>i[n]&&t<i[n+1]){i.splice(n+1,0,t);break}return{pageSizes:i,pageSize:t}}function getEntityNumberForTemplate(n){var t=getEntityNumber(n);return t==="Not Assigned"&&(t="<i>"+t+"</i>"),t}function getEntityNumber(n){return isNullOrWhiteSpace(n)?"Not Assigned":n}function isNullOrWhiteSpace(n){return n==null||n.match(/^\s*$/)!==null}function isNullOrEmpty(n){return n==null||n===""}function parseBoolean(n){return n?n.toLowerCase()!=="false"?!0:!1:null}function FillWindowModal(n,t,i,r,u,f,e,o,s){function tt(n){n.center(),n.element.parent(".k-window").show(),typeof s=="function"&&s(),u&&u.fullscreen&&n.maximize(),w.length>0&&w[0].focus()}var h,c,d,g,k,p,w,v,l;u||(u="600px");var a,y="",b=null,nt=!1;return typeof t=="string"?a=t:(a=t.url,b=t.data,y=t.html,nt=t.iframe),c=null,typeof u=="object"?(h=u.width,c=u.height):h=u,d=!0,typeof u=="object"&&(h=u.width,c=u.height,d=u.resizable),g=h,k=c,y||(k="600px",g="500px",y=kendo.template($("#ascLoadingGraphicTemplate").html())({})),refreshCallbackFunctionDict[n]=r,$("#"+n).length||$("#windowContainer").append("<div id="+n+"></div>"),p=$("#"+n),p.html(y),v=!1,l=p.data("kendoWindow"),l?l.refresh(t):l=$("#"+n).ascWindow({actions:u.actions,width:g,height:k,resizable:d,visible:!1,content:{url:a?a+(b?"?"+$.param(b):""):a,iframe:nt},draggable:u.draggable==null?!0:u.draggable,title:i,activate:function(){v&&tt(this),v=!0},refresh:function(){w=$(":focus");var n=this;n.element.parent(".k-window").hide(),h&&h!=="auto"||n.element.parent("div.k-window").css("width","auto"),c&&c!=="auto"||n.element.parent("div.k-window").css("height","auto"),n.setOptions({width:h,height:c,position:{top:0,left:0}}),v&&tt(this),v=!0},deactivate:function(){this.destroy()},modal:!0,confirm:f,cancel:e,ignore:o,error:function(n){if(this.close(),!n||!n.xhr)return WindowErrorHandler();switch(n.xhr.status){case 403:var t="/Portal/PermissionDenied";FillWindowModal("permissionWindow",t,"Permission Denied");break;default:WindowErrorHandler()}}}).data("kendoWindow"),i!==!1&&l.title(i||""),$(document.body).addClass("force-overlay"),l.center().open(),$(document.body).removeClass("force-overlay"),l}function ShowAscLoad(n){var i=$("#ascLoadWindow").data("state"),t;i==="closing"||i==="open"?$("#processingText").html(n||"Processing..."):(t=kendo.template($("#ascLoadingGraphicTemplate").html()),FillWindowModal("ascLoadWindow",{html:t({processingText:n})},!1,null,{width:"500px",height:"600px",resizable:!1})),$("#ascLoadWindow").data("state","open")}function ContinueNavigation(n){window.location.href=n.url||n.data.url}function ReturnNavigation(n){var t="",r=n,u,i;sessionStorage&&sessionStorage.getItem("referrer")?(t=sessionStorage.getItem("referrer"),sessionStorage.removeItem("referrer")):t=document.referrer,t&&t!==""&&document.URL!==t&&(u=new URL(t),i=u.pathname,i!==""&&(r=i)),window.location.href=r}function HideAscLoad(){$("#ascLoadWindow").data("state","closing"),window.setTimeout(function(){$("#ascLoadWindow").data("state")==="closing"&&(CloseNearestWindow("ascLoadWindow"),$("#ascLoadWindow").data("state","closed"))},200)}function ShowConfirm(n,t,i,r,u,f,e){var o={};return o.windowText=t||"",o.title=n||"",o.cancelText=e||"Cancel",o.confirmText=i||"Confirm",o.showCancel=!0,o.showConfirm=!0,o.onConfirm=function(){r()},u&&u!="null"&&(o.onCancel=function(){u()}),ShowPromptWindow(o,f||"info")}function ShowAlert(n){return n=n||{},typeof n=="object"&&n.alertText&&(n.windowText=n.alertText),typeof n!="object"||n.windowText||(n.windowText="An unknown error occurred"),ShowPromptWindow(n,"alert")}function ShowInfo(n){return ShowPromptWindow(n,"info")}function ShowSuccess(n){return ShowPromptWindow(n,"success")}function ShowPromptWindow(n,t){var i;if(n=n||{},typeof n=="string"&&(n={windowText:n}),t==="alert")i=kendo.template($("#alertWindowTemplate").html());else if(t==="info")i=kendo.template($("#infoWindowTemplate").html());else if(t==="success")i=kendo.template($("#successWindowTemplate").html());else throw"Invalid window type";var r=n.id||"promptWindow"+parseInt(Math.random()*1e12),o=n.onConfirm,s=n.onCancel,e=n.title,u=i(n),f=FillWindowModal(r,{html:u},e,null,null,o,s,n.onIgnore);return addPromptWIndowStyling($("#"+r)),f}function PromptUpgradeSubscription(n,t){var i="Sorry, you cannot access "+n+" with your current Ascora subscription. ";return i+=t?"Please update your subscription level in order to access this area.":"Please talk to your manager about updating your subscription.",ShowInfo({windowText:i,title:"Area Locked",cancelText:"I'll do this later",confirmText:t?"Take me there now":"OK",showCancel:t,showConfirm:!0,onConfirm:t?function(){window.location.href="/Portal/Profile"}:void 0})}function PromptUpdateEmailSettingsOrContinue(n,t){n?t&&t():ShowInfo({windowText:"Emails settings must be configured before sending emails",onConfirm:function(){ShowAscLoad(),window.location.href="/Portal/SystemSettings"},confirmText:"Take me there now",cancelText:"I'll do this later",showCancel:!0})}function addPromptWIndowStyling(n){n.parent(".k-widget.k-window").addClass("prompt_window")}function SetNearestWindowContent(n,t){$("#"+n).closest("[data-role=window]").kendoWindow("content",t),$("#"+n).closest("[data-role=window]").kendoWindow("center")}function CloseNearestWindow(n,t){t&&CallBackRequestNearestWindow(n),$("#"+n).closest("[data-role=window]").kendoWindow("close")}function CallBackRequestNearestWindow(n){var t=refreshCallbackFunctionDict[n],i=[].slice.call(arguments,2);t!=null&&t.apply(this,i)}function BindSubmitForModal(n,t,i,r,u){$("#"+n).submit(function(f){f.stopImmediatePropagation(),f.preventDefault(),toggleProcessing($("#"+n+" :submit")),$.ajax({type:"POST",url:this.action,data:$(this).serialize(),success:function(f){toggleProcessing($("#"+n+" :submit")),f.success?(CloseNearestWindow(t,i),r!=null&&r(f)):(SetNearestWindowContent(t,f),$.validator.unobtrusive.parse("form"),u!=null&&u(f))},error:function(t,i,r){toggleProcessing($("#"+n+" :submit")),alert("Error, status = "+i+", error thrown: "+r)}})})}function toggleSaveButton(n){toggleProcessing(n),setTimeout(function(){isProcessing(n)&&toggleProcessing(n)},3e3)}function isProcessing(n){return n&&n.is("button")?n.has("span.spinner").length>0:!1}function moveContentInto(n,t){$(t).empty(),$(t).append($(n).contents())}function toggleProcessing(n){var t,i;n&&n.is("button")&&(n.toggleClass("processing"),t=n.hasClass("processing"),t?(toggleNestedItalicElement(n,t),n.prepend("<span class='spinner'><i class='fa fa-spinner fa-spin'></i></span>"),t=!0):(i=n.find(".spinner"),i&&i.remove(),toggleNestedItalicElement(n,t),t=!1),n.prop("disabled",t))}function toggleNestedItalicElement(n,t){var i=n.find("i.fa");t?i&&i.hide():i&&i.show()}function destroyKendoWidgetsInElement(n){kendo.destroy($("#"+n))}function initKendoNotification(){window.notification=$("#kendoNotificationContainer").kendoNotification({position:{pinned:!0,top:30,right:30},autoHide:!1,autoHideAfter:3500,stacking:"down",templates:[{type:"upload-success",template:$("#kendoNotificationSuccessTemplate").html()}]}).data("kendoNotification"),window.notificationError=$("#kendoNotificationContainer").kendoNotification({position:{pinned:!0,top:30,right:30},autoHideAfter:3500,stacking:"down",templates:[{type:"upload-error",template:$("#kendoNotificationFailureTemplate").html()}]}).data("kendoNotification");$(document).one("kendo:pageUnload",function(){window.notification&&window.notification.hide()})}function ShowKendoNotification(n){window.notification||initKendoNotification();var t=n!=null&&n.length>0?n:"Success";window.notification.show({message:t},"upload-success")}function ShowKendoNotifications(n,t){var r,i;window.notification&&window.notificationError||initKendoNotification(),t?(i=n!=null&&n.length>0?n:"Error",window.notificationError.show({message:i},"upload-error")):(r=n!=null&&n.length>0?n:"Success",window.notification.show({message:r},"upload-success"))}function SelectDataItemFromGrid(n,t){var u,o,s,i,r,e,h,f;if(n&&t){if(u=n.dataSource,o=u.get(t),!o)return;for(s=kendo.data.Query.process(u.data(),{sort:u.sort(),filter:u.filter()}).data,i=-1,r=0;r<s.length;r++)if(s[r].Id==o.Id){i=r;break}if(i===-1)return;if(e=Math.floor(i/n.dataSource.pageSize()),h=i-e*n.dataSource.pageSize()+1,n.dataSource.page(++e),f=n.element.find("tr:eq("+h+")"),!f)return;n.select(f)}}function getCaret(n){var r,t,i;return n.selectionStart?n.selectionStart:document.selection?(n.focus(),r=document.selection.createRange(),r==null)?0:(t=n.createTextRange(),i=t.duplicate(),t.moveToBookmark(r.getBookmark()),i.setEndPoint("EndToStart",t),i.text.length):0}function setCaretPosition(n,t){if(n!=null)if(n.createTextRange){var i=n.createTextRange();i.move("character",t),i.select()}else n.selectionStart?(n.focus(),n.setSelectionRange(t,t)):n.focus()}function FormatBulkEmailResponse(n,t){var r=n+" Emails Sent Successfully<br />",i;if(t&&t.length>0)for(r+="The below emails failed to send:<br />",i=0;i<t.length;i++){var e=t[i].RelatedEntityId!=null?t[i].RelatedEntityId:"",o=t[i].CustomerId!=null?t[i].CustomerId:"",u=t[i].CustomerName!=null?t[i].CustomerName:"",f=t[i].Message!=null?t[i].Message:"";r+=e+" <a target='_blank' href='/JobManager/Customer/CustomerDetails/"+o+"'>"+u+" </a>, "+f+"<br />"}return r}function toggleCheckedStateForDataItemOnAscGrid(n){var r=n.sender,t,e,f,u,i;if(!r)throw Error("grid was not found");if(t=r.dataItem(this.select()),!t)throw Error("dataItem was not found");if(e=r.tbody.find("tr[data-uid='"+t.uid+"']"),f=e.find(".chkbox"),!f)throw Error("no checkbox was found");if(u=r.wrapper[0].id,i=$("#"+u).data("ascGrid"),!i)throw Error("failed to get AscGrid with id: "+u+". Please ensure the grid was instantiated as an AscGrid.");f.prop("checked")?i.uncheckItem(t):i.checkItem(t)}function setupAscCheckbox(){$(".checkbox_anim_grid_sm").on("click",function(){var t=$(this).find("input:checkbox")[0];$(t).prop("checked",!$(t).is(":checked"))})}function extractDisctincArrayByFieldName(n,t){var r=_.filter(n,function(n){if(n[t]!=null&&n[t].length>0)return n[t]}),i=_.map(r,function(n){if(n[t]!=null&&n[t].length>0)return n[t]});return i=_.uniq(i)}function concatenateToString(n,t){var i=extractDisctincArrayByFieldName(n,t);return _.toString(i)}function toggleGridLoad(n,t){kendo.ui.progress(n,t)}function NoRecordTemplate(){return"<div class='no_records_box'><div class='no_records_box_message'>No data found. Please adjust the filter.</div></div>"}function incrementDayForKendoDatePicker(n,t){var r=$("#"+n).data("kendoDatePicker"),i=r.value();i.setTime(i.getTime()+864e5*t),r.value(i),r.trigger("change")}function toggleASelectForKendoGrid(n,t){var r=$("#"+n).data("kendoGrid"),i;t?(i=r.tbody.find(">tr"),i.length>1&&r.select(i)):r.clearSelection()}function nonEditor(n,t){n.text(t.model[t.field]),n.removeClass("k-edit-cell")}function setIdsToTabs(){for(var t=$(".nav-tabs li "),n=0;n<=t.length-1;n++)t[n].id===""&&(t[n].id="genericTab"+n)}!function(n,t){t("kendo.core.min",["jquery"],n)}(function(){return function(n,t,i){function it(){}function vr(n,t){if(t)return"'"+n.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var r=n.charAt(0),i=n.substring(1);return"="===r?"+("+i+")+":":"===r?"+$kendoHtmlEncode("+i+")+":";"+n+";$kendoOutput+="}function f(n,t,i){return n+="",t=t||2,i=t-n.length,i?ir[t].substring(0,i)+n:n}function br(n){var u=n.css(r.support.transitions.css+"box-shadow")||n.css("box-shadow"),t=u?u.match(dr)||[0,0,0,0,0]:[0,0,0,0,0],i=c.max(+t[3],+(t[4]||0));return{left:-t[1]+i,right:+t[1]+i,bottom:+t[2]+i}}function wr(t,i){var s,o,f,l,a,e,h,p=u.browser,y=r._outerWidth,v=r._outerHeight;return t.parent().hasClass("k-animation-container")?(e=t.parent(".k-animation-container"),h=e[0].style,e.is(":hidden")&&e.show(),s=nt.test(h.width)||nt.test(h.height),s||e.css({width:y(t),height:v(t),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})):(o=t[0].style.width,f=t[0].style.height,l=nt.test(o),a=nt.test(f),s=l||a,!l&&(!i||i&&o)&&(o=y(t)),!a&&(!i||i&&f)&&(f=v(t)),t.wrap(n("<div/>").addClass("k-animation-container").css({width:o,height:f})),s&&t.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),p.msie&&c.floor(p.version)<=7&&(t.css({zoom:1}),t.children(".k-menu").width(t.width())),t.parent()}function kt(n){for(var t=1,i=arguments.length,t=1;t<i;t++)ai(n,arguments[t]);return n}function ai(n,t){var f,i,o,u,e,c=r.data.ObservableArray,l=r.data.LazyObservableArray,s=r.data.DataSource,h=r.data.HierarchicalDataSource;for(f in t)i=t[f],o=typeof i,u=o===v&&null!==i?i.constructor:null,u&&u!==Array&&u!==c&&u!==l&&u!==s&&u!==h&&u!==RegExp?i instanceof Date?n[f]=new Date(i.getTime()):d(i.clone)?n[f]=i.clone():(e=n[f],n[f]=typeof e===v?e||{}:{},ai(n[f],i)):o!==rt&&(n[f]=i);return n}function wt(n,t,r){for(var u in t)if(t.hasOwnProperty(u)&&t[u].test(n))return u;return r!==i?r:n}function fu(n){return n.replace(/([a-z][A-Z])/g,function(n){return n.charAt(0)+"-"+n.charAt(1).toLowerCase()})}function vi(n){return n.replace(/\-(\w)/g,function(n,t){return t.toUpperCase()})}function ci(t,i){var f,u={};return document.defaultView&&document.defaultView.getComputedStyle?(f=document.defaultView.getComputedStyle(t,""),i&&n.each(i,function(n,t){u[t]=f.getPropertyValue(t)})):(f=t.currentStyle,i&&n.each(i,function(n,t){u[t]=f[vi(t)]})),r.size(u)||(u=f),u}function ou(n){if(n&&n.className&&"string"==typeof n.className&&n.className.indexOf("k-auto-scrollable")>-1)return!0;var t=ci(n,["overflow"]).overflow;return"auto"==t||"scroll"==t}function hu(t,r){var e,o=u.browser.webkit,s=u.browser.mozilla,f=t instanceof n?t[0]:t;if(t)return e=u.isRtl(t),r===i?e&&o?f.scrollWidth-f.clientWidth-f.scrollLeft:Math.abs(f.scrollLeft):(f.scrollLeft=e&&o?f.scrollWidth-f.clientWidth-r:e&&s?-r:r,i)}function su(n){var t,i=0;for(t in n)n.hasOwnProperty(t)&&"toJSON"!=t&&i++;return i}function nu(n,i,r){var f,e,o;return i||(i="offset"),f=n[i](),e={top:f.top,right:f.right,bottom:f.bottom,left:f.left},u.browser.msie&&(u.pointers||u.msPointers)&&!r&&(o=u.isRtl(n)?1:-1,e.top-=t.pageYOffset+o*document.documentElement.scrollTop,e.left-=t.pageXOffset+o*document.documentElement.scrollLeft),e}function gr(n){var t={};return ut("string"==typeof n?n.split(" "):n,function(n){t[n]=this}),t}function tu(n){return new r.effects.Element(n)}function ru(n,t,i,r){return typeof n===o&&(d(t)&&(r=t,t=400,i=!1),d(i)&&(r=i,i=!1),typeof t===oi&&(i=t,t=400),n={effects:n,duration:t,reverse:i,complete:r}),h({effects:{},duration:400,reverse:!1,init:et,teardown:et,hide:!1},n,{completeCallback:n.complete,complete:et})}function gt(t,i,r,u,f){for(var o,e=0,s=t.length;e<s;e++)o=n(t[e]),o.queue(function(){p.promise(o,ru(i,r,u,f))});return t}function iu(n,t,i,r){return t&&(t=t.split(" "),ut(t,function(t,i){n.toggleClass(i,r)})),n}function uu(n){return(""+n).replace(yi,"&amp;").replace(si,"&lt;").replace(hr,"&gt;").replace(bi,"&quot;").replace(ur,"&#39;")}function bt(n,t){var u;return 0===t.indexOf("data")&&(t=t.substring(4),t=t.charAt(0).toLowerCase()+t.substring(1)),t=t.replace(ti,"-$1"),u=n.getAttribute("data-"+r.ns+t),null===u?u=i:"null"===u?u=null:"true"===u?u=!0:"false"===u?u=!1:ar.test(u)?u=parseFloat(u):ri.test(u)&&!ii.test(u)&&(u=Function("return ("+u+")")()),u}function ui(t,u){var e,f,o={};for(e in u)f=bt(t,e),f!==i&&(or.test(e)&&(f="string"==typeof f?r.template(n("#"+f).html()):t.getAttribute(e)),o[e]=f);return o}function lr(t,i){return n.contains(t,i)?-1:1}function cr(){var t=n(this);return n.inArray(t.attr("data-"+r.ns+"role"),["slider","rangeslider"])>-1||t.is(":visible")}function yr(n,t){var i=n.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(i)?!n.disabled:"a"===i?n.href||t:t)&&kr(n)}function kr(t){return n.expr.filters.visible(t)&&!n(t).parents().addBack().filter(function(){return"hidden"===n.css(this,"visibility")}).length}function s(n,t){return new s.fn.init(n,t)}var w,d,er,ki,tt,pi,wi,nr,gi,tr,rr,ir,di,p,yi,si,bi,ur,hr,ht,fr,sr,b,lt,or,ri,ii,ti,st,at,pt,ni,e,y,dt,vt,ot,fi,li,a,r=t.kendo=t.kendo||{cultures:{}},h=n.extend,ut=n.each,pr=n.isArray,yt=n.proxy,et=n.noop,c=Math,g=t.JSON||{},u={},nt=/%/,eu=/\{(\d+)(:[^\}]+)?\}/g,dr=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,ar=/^(\+|-?)\d+(\.?)\d*$/,l="function",o="string",k="number",v="object",ft="null",oi="boolean",rt="undefined",ei={},hi={},ct=[].slice;r.version="2017.2.504".replace(/^\s+|\s+$/g,""),it.extend=function(n){var t,r,f=function(){},u=this,i=n&&n.init?n.init:function(){u.apply(this,arguments)};f.prototype=u.prototype,r=i.fn=i.prototype=new f;for(t in n)r[t]=null!=n[t]&&n[t].constructor===Object?h(!0,{},f.prototype[t],n[t]):n[t];return r.constructor=i,i.extend=u.extend,i},it.prototype._initOptions=function(n){this.options=kt({},this.options,n)},d=r.isFunction=function(n){return"function"==typeof n},er=function(){this._defaultPrevented=!0},ki=function(){return this._defaultPrevented===!0},tt=it.extend({init:function(){this._events={}},bind:function(n,t,r){var e,c,s,u,a,f=this,h=typeof n===o?[n]:n,v=typeof t===l;if(t===i){for(e in n)f.bind(e,n[e]);return f}for(e=0,c=h.length;e<c;e++)n=h[e],u=v?t:t[n],u&&(r&&(s=u,u=function(){f.unbind(n,u),s.apply(f,arguments)},u.original=s),a=f._events[n]=f._events[n]||[],a.push(u));return f},one:function(n,t){return this.bind(n,t,!0)},first:function(n,t){for(var u,s,r=this,f=typeof n===o?[n]:n,h=typeof t===l,i=0,e=f.length;i<e;i++)n=f[i],u=h?t:t[n],u&&(s=r._events[n]=r._events[n]||[],s.unshift(u));return r},trigger:function(n,t){var r,f,u=this,i=u._events[n];if(i){for(t=t||{},t.sender=u,t._defaultPrevented=!1,t.preventDefault=er,t.isDefaultPrevented=ki,i=i.slice(),r=0,f=i.length;r<f;r++)i[r].call(u,t);return t._defaultPrevented===!0}return!1},unbind:function(n,t){var r,f=this,u=f._events[n];if(n===i)f._events={};else if(u)if(t)for(r=u.length-1;r>=0;r--)u[r]!==t&&u[r].original!==t||u.splice(r,1);else f._events[n]=[];return f}}),pi=/^\w+/,wi=/\$\{([^}]*)\}/g,nr=/\\\}/g,gi=/__CURLY__/g,tr=/\\#/g,rr=/__SHARP__/g,ir=["","0","00","000","0000"],w={paramName:"data",useWithBlock:!0,render:function(n,t){for(var r="",i=0,u=t.length;i<u;i++)r+=n(t[i]);return r},compile:function(n,t){var e,f,u,s=h({},this,t),c=s.paramName,l=c.match(pi)[0],o=s.useWithBlock,i="var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;";if(d(n))return n;for(i+=o?"with("+c+"){":"",i+="$kendoOutput=",f=n.replace(nr,"__CURLY__").replace(wi,"#=$kendoHtmlEncode($1)#").replace(gi,"}").replace(tr,"__SHARP__").split("#"),u=0;u<f.length;u++)i+=vr(f[u],u%2==0);i+=o?";}":";",i+="return $kendoOutput;",i=i.replace(rr,"#");try{return e=Function(l,i),e._slotCount=Math.floor(f.length/2),e}catch(a){throw Error(r.format("Invalid template:'{0}' Generated code:'{1}'",n,i));}}},function(){function e(n){return u.lastIndex=0,u.test(n)?'"'+n.replace(u,function(n){var t=h[n];return typeof t===o?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function r(u,f){var a,p,c,b,y,w,d=n,h=f[u];if(h&&typeof h===v&&typeof h.toJSON===l&&(h=h.toJSON(u)),typeof t===l&&(h=t.call(f,u,h)),w=typeof h,w===o)return e(h);if(w===k)return isFinite(h)?h+"":ft;if(w===oi||w===ft)return h+"";if(w===v){if(!h)return ft;if(n+=i,y=[],"[object Array]"===s.apply(h)){for(b=h.length,a=0;a<b;a++)y[a]=r(a,h)||ft;return c=0===y.length?"[]":n?"[\n"+n+y.join(",\n"+n)+"\n"+d+"]":"["+y.join(",")+"]",n=d,c}if(t&&typeof t===v)for(b=t.length,a=0;a<b;a++)typeof t[a]===o&&(p=t[a],c=r(p,h),c&&y.push(e(p)+(n?": ":":")+c));else for(p in h)Object.hasOwnProperty.call(h,p)&&(c=r(p,h),c&&y.push(e(p)+(n?": ":":")+c));return c=0===y.length?"{}":n?"{\n"+n+y.join(",\n"+n)+"\n"+d+"}":"{"+y.join(",")+"}",n=d,c}}var n,i,t,u=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s={}.toString;typeof Date.prototype.toJSON!==l&&(Date.prototype.toJSON=function(){var n=this;return isFinite(n.valueOf())?f(n.getUTCFullYear(),4)+"-"+f(n.getUTCMonth()+1)+"-"+f(n.getUTCDate())+"T"+f(n.getUTCHours())+":"+f(n.getUTCMinutes())+":"+f(n.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),typeof g.stringify!==l&&(g.stringify=function(u,f,e){var s;if(n="",i="",typeof e===k)for(s=0;s<e;s+=1)i+=" ";else typeof e===o&&(i=e);if(t=f,f&&typeof f!==l&&(typeof f!==v||typeof f.length!==k))throw Error("JSON.stringify");return r("",{"":u})})}(),function(){function l(n){if(n){if(n.numberFormat)return n;if(typeof n===o){var t=r.cultures;return t[n]||t[n.split("-")[0]]||null}return null}return null}function v(n){return n&&(n=l(n)),n||r.cultures.current}function tt(n,t,r){r=v(r);var u=r.calendars.standard,o=u.days,e=u.months;return t=u.patterns[t]||t,t.replace(g,function(t){var s,r,h;return"d"===t?r=n.getDate():"dd"===t?r=f(n.getDate()):"ddd"===t?r=o.namesAbbr[n.getDay()]:"dddd"===t?r=o.names[n.getDay()]:"M"===t?r=n.getMonth()+1:"MM"===t?r=f(n.getMonth()+1):"MMM"===t?r=e.namesAbbr[n.getMonth()]:"MMMM"===t?r=e.names[n.getMonth()]:"yy"===t?r=f(n.getFullYear()%100):"yyyy"===t?r=f(n.getFullYear(),4):"h"===t?r=n.getHours()%12||12:"hh"===t?r=f(n.getHours()%12||12):"H"===t?r=n.getHours():"HH"===t?r=f(n.getHours()):"m"===t?r=n.getMinutes():"mm"===t?r=f(n.getMinutes()):"s"===t?r=n.getSeconds():"ss"===t?r=f(n.getSeconds()):"f"===t?r=c.floor(n.getMilliseconds()/100):"ff"===t?(r=n.getMilliseconds(),r>99&&(r=c.floor(r/10)),r=f(r)):"fff"===t?r=f(n.getMilliseconds(),3):"tt"===t?r=n.getHours()<12?u.AM[0]:u.PM[0]:"zzz"===t?(s=n.getTimezoneOffset(),h=s<0,r=(""+c.abs(s/60)).split(".")[0],s=c.abs(s)-60*r,r=(h?"+":"-")+f(r),r+=":"+f(s)):"zz"!==t&&"z"!==t||(r=n.getTimezoneOffset()/60,h=r<0,r=(""+c.abs(r)).split(".")[0],r=(h?"+":"-")+("zz"===t?f(r):r)),r!==i?r:t.slice(1,t.length-1)})}function nt(n,r,f){f=v(f);var at,ft,st,pt,kt,et,p,lt,fi,o,tt,k,gt,ii,d,a,c,yt,ti,ri,ni,ui,ht,l=f.numberFormat,vt=l[u],ct=l.decimals,wt=l.pattern[0],dt=[],g=n<0,bt=t,nt=t,ot=-1;if(n===i)return t;if(!isFinite(n))return n;if(!r)return f.name.length?n.toLocaleString():""+n;if(kt=ut.exec(r)){if(r=kt[1].toLowerCase(),ft="c"===r,st="p"===r,(ft||st)&&(l=ft?l.currency:l.percent,vt=l[u],ct=l.decimals,at=l.symbol,wt=l.pattern[g?0:1]),pt=kt[2],pt&&(ct=+pt),"e"===r)return pt?n.toExponential(ct):n.toExponential();if(st&&(n*=100),n=e(n,ct),g=n<0,n=n.split(u),et=n[0],p=n[1],g&&(et=et.substring(1)),nt=y(et,0,et.length,l),p&&(nt+=vt+p),"n"===r&&!g)return nt;for(n=t,o=0,tt=wt.length;o<tt;o++)k=wt.charAt(o),n+="n"===k?nt:"$"===k||"%"===k?at:k;return n}if(g&&(n=-n),(r.indexOf("'")>-1||r.indexOf('"')>-1||r.indexOf("\\")>-1)&&(r=r.replace(rt,function(n){var i=n.charAt(0).replace("\\",""),t=n.slice(1).replace(i,"");return dt.push(t),w})),r=r.split(";"),g&&r[1])r=r[1],ii=!0;else if(0===n){if(r=r[2]||r[0],r.indexOf(h)==-1&&r.indexOf(s)==-1)return r}else r=r[0];if(ri=r.indexOf("%"),ni=r.indexOf("$"),st=ri!=-1,ft=ni!=-1,st&&(n*=100),ft&&"\\"===r[ni-1]&&(r=r.split("\\").join(""),ft=!1),(ft||st)&&(l=ft?l.currency:l.percent,vt=l[u],ct=l.decimals,at=l.symbol),gt=r.indexOf(b)>-1,gt&&(r=r.replace(it,t)),d=r.indexOf(u),tt=r.length,d!=-1?(p=(""+n).split("e"),p=p[1]?e(n,Math.abs(p[1])):p[0],p=p.split(u)[1]||t,c=r.lastIndexOf(s)-d,a=r.lastIndexOf(h)-d,yt=c>-1,ti=a>-1,o=p.length,yt||ti||(r=r.substring(0,d)+r.substring(d+1),tt=r.length,d=-1,o=0),yt&&c>a?o=c:a>c&&(ti&&o>a?o=a:yt&&o<c&&(o=c)),o>-1&&(n=e(n,o))):n=e(n),a=r.indexOf(h),ui=c=r.indexOf(s),ot=a==-1&&c!=-1?c:a!=-1&&c==-1?a:a>c?c:a,a=r.lastIndexOf(h),c=r.lastIndexOf(s),ht=a==-1&&c!=-1?c:a!=-1&&c==-1?a:a>c?a:c,ot==tt&&(ht=ot),ot!=-1){for(nt=(""+n).split(u),et=nt[0],p=nt[1]||t,lt=et.length,fi=p.length,g&&n*-1>=0&&(g=!1),n=r.substring(0,ot),g&&!ii&&(n+="-"),o=ot;o<tt;o++){if(k=r.charAt(o),d==-1){if(ht-o<lt){n+=et;break}}else if(c!=-1&&c<o&&(bt=t),d-o<=lt&&d-o>-1&&(n+=et,o=d),d===o){n+=(p?vt:t)+p,o+=ht-d+1;continue}k===s?(n+=k,bt=k):k===h&&(n+=bt)}if(gt&&(n=y(n,ot+(g&&!ii?1:0),Math.max(ht,lt+ot),l)),ht>=ot&&(n+=r.substring(ht+1)),ft||st){for(nt=t,o=0,tt=n.length;o<tt;o++)k=n.charAt(o),nt+="$"===k||"%"===k?at:k;n=nt}if(tt=dt.length)for(o=0;o<tt;o++)n=n.replace(w,dt[o])}return n}var y,e,a,g=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|zzz|zz|z|"[^"]*"|'[^']*'/g,ut=/^(n|c|p|e)(\d*)$/i,rt=/(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,it=/\,/g,t="",u=".",b=",",h="#",s="0",w="??",p="en-US",d={}.toString;r.cultures["en-US"]={name:p,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{name:"US Dollar",abbr:"USD",pattern:["($n)","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"$"}},calendars:{standard:{days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December"],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",F:"dddd, MMMM dd, yyyy h:mm:ss tt",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",m:"MMMM dd",M:"MMMM dd",s:"yyyy'-'MM'-'ddTHH':'mm':'ss",t:"h:mm tt",T:"h:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":"/",":":":",firstDay:0,twoDigitYearMax:2029}}},r.culture=function(n){var t,u=r.cultures;return n===i?u.current:(t=l(n)||u[p],t.calendar=t.calendars.standard,u.current=t,i)},r.findCulture=l,r.getCulture=v,r.culture(p),y=function(n,t,r,f){var s,c,e,h,a,l,v=n.indexOf(f[u]),y=f.groupSize.slice(),o=y.shift();if(r=v!==-1?v:r+1,s=n.substring(t,r),c=s.length,c>=o){for(e=c,h=[];e>-1;)if(a=s.substring(e-o,e),a&&h.push(a),e-=o,l=y.shift(),o=l!==i?l:o,0===o){h.push(s.substring(0,e));break}s=h.reverse().join(f[b]),n=n.substring(0,t)+s+n.substring(r)}return n},e=function(n,t){return t=t||0,n=(""+n).split("e"),n=Math.round(+(n[0]+"e"+(n[1]?+n[1]+t:t))),n=(""+n).split("e"),n=+(n[0]+"e"+(n[1]?+n[1]-t:-t)),n.toFixed(Math.min(t,20))},a=function(n,t,r){if(t){if("[object Date]"===d.call(n))return tt(n,t,r);if(typeof n===k)return nt(n,t,r)}return n!==i?n:""},r.format=function(n){var t=arguments;return n.replace(eu,function(n,i,r){var u=t[parseInt(i,10)+1];return a(u,r?r.substring(1):"")})},r._extractFormat=function(n){return"{0:"===n.slice(0,3)&&(n=n.slice(3,n.length-1)),n},r._activeElement=function(){try{return document.activeElement}catch(n){return document.documentElement.activeElement}},r._round=e,r._outerWidth=function(t,i){return n(t).outerWidth(i||!1)||0},r._outerHeight=function(t,i){return n(t).outerHeight(i||!1)||0},r.toString=a}(),function(){function t(n,t,i){return!(n>=t&&n<=i)}function y(n){return n.charAt(0)}function h(t){return n.map(t,y)}function v(n,t){t||23!==n.getHours()||n.setHours(n.getHours()+2)}function it(n){for(var t=0,r=n.length,i=[];t<r;t++)i[t]=(n[t]+"").toLowerCase();return i}function s(n){var t,i={};for(t in n)i[t]=it(n[t]);return i}function g(n,u,f){if(!n)return null;var a,o,dt,kt,bt,wt,et,at,ht,b,tt,ni,gt,g=function(n){for(var t=0;u[ft]===n;)t++,ft++;return t>0&&(ft-=1),t},it=function(t){var r=e[t]||RegExp("^\\d{1,"+t+"}"),i=n.substr(p,t).match(r);return i?(i=i[0],p+=i.length,parseInt(i,10)):null},lt=function(t,i){for(var o,e,f,r=0,h=t.length,u=0,s=0;r<h;r++)o=t[r],e=o.length,f=n.substr(p,e),i&&(f=f.toLowerCase()),f==o&&e>u&&(u=e,s=r);return u?(p+=u,s+1):null},vt=function(){var t=!1;return n.charAt(p)===u[ft]&&(p++,t=!0),t},y=f.calendars.standard,l=null,rt=null,k=null,c=null,ut=null,ot=null,d=null,ft=0,p=0,yt=!1,pt=new Date,ct=y.twoDigitYearMax||2029,st=pt.getFullYear();for(u||(u="d"),kt=y.patterns[u],kt&&(u=kt),u=u.split(""),dt=u.length;ft<dt;ft++)if(a=u[ft],yt)"'"===a?yt=!1:vt();else if("d"===a){if(o=g("d"),y._lowerDays||(y._lowerDays=s(y.days)),null!==k&&o>2)continue;if(k=o<3?it(2):lt(y._lowerDays[3==o?"namesAbbr":"names"],!0),null===k||t(k,1,31))return null}else if("M"===a){if(o=g("M"),y._lowerMonths||(y._lowerMonths=s(y.months)),rt=o<3?it(2):lt(y._lowerMonths[3==o?"namesAbbr":"names"],!0),null===rt||t(rt,1,12))return null;rt-=1}else if("y"===a){if(o=g("y"),l=it(o),null===l)return null;2==o&&("string"==typeof ct&&(ct=st+parseInt(ct,10)),l=st-st%100+l,l>ct&&(l-=100))}else if("h"===a){if(g("h"),c=it(2),12==c&&(c=0),null===c||t(c,0,11))return null}else if("H"===a){if(g("H"),c=it(2),null===c||t(c,0,23))return null}else if("m"===a){if(g("m"),ut=it(2),null===ut||t(ut,0,59))return null}else if("s"===a){if(g("s"),ot=it(2),null===ot||t(ot,0,59))return null}else if("f"===a){if(o=g("f"),gt=n.substr(p,o).match(e[3]),d=it(o),null!==d&&(d=parseFloat("0."+gt[0],10),d=r._round(d,3),d*=1e3),null===d||t(d,0,999))return null}else if("t"===a){if(o=g("t"),at=y.AM,ht=y.PM,1===o&&(at=h(at),ht=h(ht)),bt=lt(ht),!bt&&!lt(at))return null}else if("z"===a){if(wt=!0,o=g("z"),"Z"===n.substr(p,1)){vt();continue}if((et=n.substr(p,6).match(o>2?w:nt),!et)||(et=et[0].split(":"),b=et[0],tt=et[1],!tt&&b.length>3&&(p=b.length-2,tt=b.substring(p),b=b.substring(0,p)),b=parseInt(b,10),t(b,-12,13))||o>2&&(tt=parseInt(tt,10),isNaN(tt)||t(tt,0,59)))return null}else if("'"===a)yt=!0,vt();else if(!vt())return null;return ni=null!==c||null!==ut||ot||null,null===l&&null===rt&&null===k&&ni?(l=st,rt=pt.getMonth(),k=pt.getDate()):(null===l&&(l=st),null===k&&(k=1)),bt&&c<12&&(c+=12),wt?(b&&(c+=-b),tt&&(ut+=-tt),n=new Date(Date.UTC(l,rt,k,c,ut,ot,d))):(n=new Date(l,rt,k,c,ut,ot,d),v(n,c)),l<100&&n.setFullYear(l),n.getDate()!==k&&wt===i?null:n}function d(n){var t="-"===n.substr(0,1)?-1:1;return n=n.substring(1),n=60*parseInt(n.substr(0,2),10)+parseInt(n.substring(2),10),t*n}function b(n){for(var f,r,e=c.max(u.length,o.length),s=n.calendar.patterns,i=[],t=0;t<e;t++){for(f=u[t],r=0;r<f.length;r++)i.push(s[f[r]]);i=i.concat(o[t])}return i}var f=/\u00A0/g,tt=/[eE][\-+]?[0-9]+/,nt=/[+|\-]\d{1,2}/,w=/[+|\-]\d{1,2}:?\d{2}/,a=/^\/Date\((.*?)\)\/$/,l=/[+-]\d*/,u=[[],["G","g","F"],["D","d","y","m","T","t"]],o=[["yyyy-MM-ddTHH:mm:ss.fffffffzzz","yyyy-MM-ddTHH:mm:ss.fffffff","yyyy-MM-ddTHH:mm:ss.fffzzz","yyyy-MM-ddTHH:mm:ss.fff","ddd MMM dd yyyy HH:mm:ss","yyyy-MM-ddTHH:mm:sszzz","yyyy-MM-ddTHH:mmzzz","yyyy-MM-ddTHH:mmzz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy/MM/dd HH:mm:ss"],["yyyy-MM-ddTHH:mm","yyyy-MM-dd HH:mm","yyyy/MM/dd HH:mm"],["yyyy/MM/dd","yyyy-MM-dd","HH:mm:ss","HH:mm"]],e={2:/^\d{1,2}/,3:/^\d{1,3}/,4:/^\d{4}/},p={}.toString;r.parseDate=function(n,t,i){var e,u,o,f;if("[object Date]"===p.call(n))return n;if(e=0,u=null,n&&0===n.indexOf("/D")&&(u=a.exec(n)))return u=u[1],f=l.exec(u.substring(1)),u=new Date(parseInt(u,10)),f&&(f=d(f[0]),u=r.timezone.apply(u,0),u=r.timezone.convert(u,0,-1*f)),u;for(i=r.getCulture(i),t||(t=b(i)),t=pr(t)?t:[t],o=t.length;e<o;e++)if(u=g(n,t[e],i))return u;return u},r.parseInt=function(n,t){var i=r.parseFloat(n,t);return i&&(i=0|i),i},r.parseFloat=function(n,t,i){if(!n&&0!==n)return null;if(typeof n===k)return n;n=""+n,t=r.getCulture(t);var e,h,u=t.numberFormat,l=u.percent,a=u.currency,s=a.symbol,c=l.symbol,o=n.indexOf("-");return tt.test(n)?(n=parseFloat(n.replace(u["."],".")),isNaN(n)&&(n=null),n):o>0?null:(o=o>-1,n.indexOf(s)>-1||i&&i.toLowerCase().indexOf("c")>-1?(u=a,e=u.pattern[0].replace("$",s).split("n"),n.indexOf(e[0])>-1&&n.indexOf(e[1])>-1&&(n=n.replace(e[0],"").replace(e[1],""),o=!0)):n.indexOf(c)>-1&&(h=!0,u=l,s=c),n=n.replace("-","").replace(s,"").replace(f," ").split(u[","].replace(f," ")).join("").replace(u["."],"."),n=parseFloat(n),isNaN(n)?n=null:o&&(n*=-1),n&&h&&(n/=100),n)}}(),function(){var c,s,h,l,e,f,r,v,a;u._scrollbar=i,u.scrollbar=function(n){if(isNaN(u._scrollbar)||n){var i,t=document.createElement("div");return t.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",t.innerHTML="&nbsp;",document.body.appendChild(t),u._scrollbar=i=t.offsetWidth-t.scrollWidth,document.body.removeChild(t),i}return u._scrollbar},u.isRtl=function(t){return n(t).closest(".k-rtl").length>0},c=document.createElement("table");try{c.innerHTML="<tr><td></td></tr>",u.tbodyInnerHtml=!0}catch(y){u.tbodyInnerHtml=!1}u.touch="ontouchstart"in t,s=document.documentElement.style,h=u.transitions=!1,l=u.transforms=!1,e="HTMLElement"in t?HTMLElement.prototype:[],u.hasHW3D="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix||"MozPerspective"in s||"msPerspective"in s,u.cssFlexbox="flexWrap"in s||"WebkitFlexWrap"in s||"msFlexWrap"in s,ut(["Moz","webkit","O","ms"],function(){var n,t=""+this,i=typeof c.style[t+"Transition"]===o;if(i||typeof c.style[t+"Transform"]===o)return n=t.toLowerCase(),l={css:"ms"!=n?"-"+n+"-":"",prefix:t,event:"o"===n||"webkit"===n?n:""},i&&(h=l,h.event=h.event?h.event+"TransitionEnd":"transitionend"),!1}),c=null,u.transforms=l,u.transitions=h,u.devicePixelRatio=t.devicePixelRatio===i?1:t.devicePixelRatio;try{u.screenWidth=t.outerWidth||t.screen?t.screen.availWidth:t.innerWidth,u.screenHeight=t.outerHeight||t.screen?t.screen.availHeight:t.innerHeight}catch(y){u.screenWidth=t.screen.availWidth,u.screenHeight=t.screen.availHeight}u.detectOS=function(n){var f,r,i=!1,o=[],c=!/mobile safari/i.test(n),e={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},l={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},s={tablet:/playbook|ipad|fire/i},h={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(r in e)if(e.hasOwnProperty(r)&&(o=n.match(e[r]))){if("windows"==r&&"plugins"in navigator)return!1;i={},i.device=r,i.tablet=wt(r,s,!1),i.browser=wt(n,h,"default"),i.name=wt(r,l),i[i.name]=!0,i.majorVersion=o[2],i.minorVersion=o[3].replace("_","."),f=i.minorVersion.replace(".","").substr(0,2),i.flatVersion=i.majorVersion+f+Array(3-(f.length<3?f.length:2)).join("0"),i.cordova=typeof t.PhoneGap!==rt||typeof t.cordova!==rt,i.appMode=t.navigator.standalone||/file|local|wmapp/.test(t.location.protocol)||i.cordova,i.android&&(u.devicePixelRatio<1.5&&i.flatVersion<400||c)&&(u.screenWidth>800||u.screenHeight>800)&&(i.tablet=r);break}return i},f=u.mobileOS=u.detectOS(navigator.userAgent),u.wpDevicePixelRatio=f.wp?screen.width/320:0,u.hasNativeScrolling=!1,(f.ios||f.android&&f.majorVersion>2||f.wp)&&(u.hasNativeScrolling=f),u.delayedClick=function(){if(u.touch){if(f.ios)return!0;if(f.android)return!u.browser.chrome||!(u.browser.version<32)&&!(n("meta[name=viewport]").attr("content")||"").match(/user-scalable=no/i)}return!1},u.mouseAndTouchPresent=u.touch&&!(u.mobileOS.ios||u.mobileOS.android),u.detectBrowser=function(n){var i,t=!1,u=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(i in r)if(r.hasOwnProperty(i)&&(u=n.match(r[i]))){t={},t[i]=!0,t[u[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,t.version=parseInt(document.documentMode||u[2],10);break}return t},u.browser=u.detectBrowser(navigator.userAgent),u.detectClipboardAccess=function(){var n={copy:!!document.queryCommandSupported&&document.queryCommandSupported("copy"),cut:!!document.queryCommandSupported&&document.queryCommandSupported("cut"),paste:!!document.queryCommandSupported&&document.queryCommandSupported("paste")};return u.browser.chrome&&(n.paste=!1,u.browser.version>=43&&(n.copy=!0,n.cut=!0)),n},u.clipboard=u.detectClipboardAccess(),u.zoomLevel=function(){var n,r,i;try{return n=u.browser,r=0,i=document.documentElement,n.msie&&11==n.version&&i.scrollHeight>i.clientHeight&&!u.touch&&(r=u.scrollbar()),u.touch?i.clientWidth/t.innerWidth:n.msie&&n.version>=10?((top||t).document.documentElement.offsetWidth+r)/(top||t).innerWidth:1}catch(f){return 1}},u.cssBorderSpacing=i!==s.borderSpacing&&!(u.browser.msie&&u.browser.version<8),function(t){var i="",f=n(document.documentElement),r=parseInt(t.version,10);t.msie?i="ie":t.mozilla?i="ff":t.safari?i="safari":t.webkit?i="webkit":t.opera?i="opera":t.edge&&(i="edge"),i&&(i="k-"+i+" k-"+i+r),u.mobileOS&&(i+=" k-mobile"),u.cssFlexbox||(i+=" k-no-flexbox"),f.addClass(i)}(u.browser),u.eventCapture=document.documentElement.addEventListener,r=document.createElement("input"),u.placeholder="placeholder"in r,u.propertyChangeEvent="onpropertychange"in r,u.input=function(){for(var t,f=["number","date","time","month","week","datetime","datetime-local"],e=f.length,u="test",i={},n=0;n<e;n++)t=f[n],r.setAttribute("type",t),r.value=u,i[t.replace("-","")]="text"!==r.type&&r.value!==u;return i}(),r.style.cssText="float:left;",u.cssFloat=!!r.style.cssFloat,r=null,u.stableSort=function(){for(var i=513,t=[{index:0,field:"b"}],n=1;n<i;n++)t.push({index:n,field:"a"});return t.sort(function(n,t){return n.field>t.field?1:n.field<t.field?-1:0}),1===t[0].index}(),u.matchesSelector=e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.matchesSelector||e.matches||function(t){for(var r=document.querySelectorAll?(this.parentNode||document).querySelectorAll(t)||[]:n(t),i=r.length;i--;)if(r[i]==this)return!0;return!1},u.pushState=t.history&&t.history.pushState,v=document.documentMode,u.hashChange="onhashchange"in t&&!(u.browser.msie&&(!v||v<=8)),u.customElements="registerElement"in t.document,a=u.browser.chrome,u.msPointers=!a&&t.MSPointerEvent,u.pointers=!a&&t.PointerEvent,u.kineticScrollNeeded=f&&(u.touch||u.msPointers||u.pointers)}(),di={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}},p={},n.extend(p,{enabled:!0,Element:function(t){this.element=n(t)},promise:function(n,t){n.is(":visible")||n.css({display:n.data("olddisplay")||"block"}).css("display"),t.hide&&n.data("olddisplay",n.css("display")).hide(),t.init&&t.init(),t.completeCallback&&t.completeCallback(n),n.dequeue()},disable:function(){this.enabled=!1,this.promise=this.promiseShim},enable:function(){this.enabled=!0,this.promise=this.animatedPromise}}),p.promiseShim=p.promise,"kendoAnimate"in n.fn||h(n.fn,{kendoStop:function(n,t){return this.stop(n,t)},kendoAnimate:function(n,t,i,r){return gt(this,n,t,i,r)},kendoAddClass:function(n,t){return r.toggleClass(this,n,t,!0)},kendoRemoveClass:function(n,t){return r.toggleClass(this,n,t,!1)},kendoToggleClass:function(n,t,i){return r.toggleClass(this,n,t,i)}}),yi=/&/g,si=/</g,bi=/"/g,ur=/'/g,hr=/>/g,ht=function(n){return n.target},u.touch&&(ht=function(n){var t="originalEvent"in n?n.originalEvent.changedTouches:"changedTouches"in n?n.changedTouches:null;return t?document.elementFromPoint(t[0].clientX,t[0].clientY):n.target},ut(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,i){n.fn[i]=function(n){return this.bind(i,n)}})),u.touch?u.mobileOS?(u.mousedown="touchstart",u.mouseup="touchend",u.mousemove="touchmove",u.mousecancel="touchcancel",u.click="touchend",u.resize="orientationchange"):(u.mousedown="mousedown touchstart",u.mouseup="mouseup touchend",u.mousemove="mousemove touchmove",u.mousecancel="mouseleave touchcancel",u.click="click",u.resize="resize"):u.pointers?(u.mousemove="pointermove",u.mousedown="pointerdown",u.mouseup="pointerup",u.mousecancel="pointercancel",u.click="pointerup",u.resize="orientationchange resize"):u.msPointers?(u.mousemove="MSPointerMove",u.mousedown="MSPointerDown",u.mouseup="MSPointerUp",u.mousecancel="MSPointerCancel",u.click="MSPointerUp",u.resize="orientationchange resize"):(u.mousemove="mousemove",u.mousedown="mousedown",u.mouseup="mouseup",u.mousecancel="mouseleave",u.click="click",u.resize="resize"),fr=function(n,t){for(var u,i,o=t||"d",f=1,r=0,e=n.length;r<e;r++)i=n[r],""!==i&&(u=i.indexOf("["),0!==u&&(u==-1?i="."+i:(f++,i="."+i.substring(0,u)+" || {})"+i.substring(u))),f++,o+=i+(r<e-1?" || {})":")"));return Array(f).join("(")+o},sr=/^([a-z]+:)?\/\//i,h(r,{widgets:[],_widgetRegisteredCallbacks:[],ui:r.ui||{},fx:r.fx||tu,effects:r.effects||p,mobile:r.mobile||{},data:r.data||{},dataviz:r.dataviz||{},drawing:r.drawing||{},spreadsheet:{messages:{}},keys:{INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110},support:r.support||u,animate:r.animate||gt,ns:"",attr:function(n){return"data-"+r.ns+n},getShadows:br,wrap:wr,deepExtend:kt,getComputedStyles:ci,webComponents:r.webComponents||[],isScrollable:ou,scrollLeft:hu,size:su,toCamelCase:vi,toHyphens:fu,getOffset:r.getOffset||nu,parseEffects:r.parseEffects||gr,toggleClass:r.toggleClass||iu,directions:r.directions||di,Observable:tt,Class:it,Template:w,template:yt(w.compile,w),render:yt(w.render,w),stringify:yt(g.stringify,g),eventTarget:ht,htmlEncode:uu,isLocalUrl:function(n){return n&&!sr.test(n)},expr:function(n,t,i){return n=n||"",typeof t==o&&(i=t,t=!1),i=i||"d",n&&"["!==n.charAt(0)&&(n="."+n),t?(n=n.replace(/"([^.]*)\.([^"]*)"/g,'"$1_$DOT$_$2"'),n=n.replace(/'([^.]*)\.([^']*)'/g,"'$1_$DOT$_$2'"),n=fr(n.split("."),i),n=n.replace(/_\$DOT\$_/g,".")):n=i+n,n},getter:function(n,t){var i=n+t;return ei[i]=ei[i]||Function("d","return "+r.expr(n,t))},setter:function(n){return hi[n]=hi[n]||Function("d,value",r.expr(n)+"=value")},accessor:function(n){return{get:r.getter(n),set:r.setter(n)}},guid:function(){for(var i,t="",n=0;n<32;n++)i=16*c.random()|0,8!=n&&12!=n&&16!=n&&20!=n||(t+="-"),t+=(12==n?4:16==n?3&i|8:i).toString(16);return t},roleSelector:function(n){return n.replace(/(\S+)/g,"["+r.attr("role")+"=$1],").slice(0,-1)},directiveSelector:function(n){var i,t=n.split(" ");if(t)for(i=0;i<t.length;i++)"view"!=t[i]&&(t[i]=t[i].replace(/(\w*)(view|bar|strip|over)$/,"$1-$2"));return t.join(" ").replace(/(\S+)/g,"kendo-mobile-$1,").slice(0,-1)},triggeredByInput:function(n){return/^(label|input|textarea|select)$/i.test(n.target.tagName)},onWidgetRegistered:function(n){for(var t=0,i=r.widgets.length;t<i;t++)n(r.widgets[t]);r._widgetRegisteredCallbacks.push(n)},logToConsole:function(n,u){var f=t.console;!r.suppressLog&&i!==f&&f.log&&f[u||"log"](n)}}),b=tt.extend({init:function(n,t){var u,i=this;i.element=r.jQuery(n).handler(i),i.angular("init",t),tt.fn.init.call(i),u=t?t.dataSource:null,u&&(t=h({},t,{dataSource:{}})),t=i.options=h(!0,{},i.options,t),u&&(t.dataSource=u),i.element.attr(r.attr("role"))||i.element.attr(r.attr("role"),(t.name||"").toLowerCase()),i.element.data("kendo"+t.prefix+t.name,i),i.bind(i.events,t)},events:[],options:{prefix:""},_hasBindingTarget:function(){return!!this.element[0].kendoBindingTarget},_tabindex:function(n){n=n||this.wrapper;var r=this.element,t="tabindex",i=n.attr(t)||r.attr(t);r.removeAttr(t),n.attr(t,isNaN(i)?0:i)},setOptions:function(t){this._setEvents(t),n.extend(this.options,t)},_setEvents:function(n){for(var i,t=this,r=0,u=t.events.length;r<u;r++)i=t.events[r],t.options[i]&&n[i]&&t.unbind(i,t.options[i]);t.bind(t.events,n)},resize:function(n){var t=this.getSize(),i=this._size;(n||(t.width>0||t.height>0)&&(!i||t.width!==i.width||t.height!==i.height))&&(this._size=t,this._resize(t,n),this.trigger("resize",t))},getSize:function(){return r.dimensions(this.element)},size:function(n){return n?(this.setSize(n),i):this.getSize()},setSize:n.noop,_resize:n.noop,destroy:function(){var n=this;n.element.removeData("kendo"+n.options.prefix+n.options.name),n.element.removeData("handler"),n.unbind()},_destroy:function(){this.destroy()},angular:function(){},_muteAngularRebind:function(n){this._muteRebind=!0,n.call(this),this._muteRebind=!1}}),lt=b.extend({dataItems:function(){return this.dataSource.flatView()},_angularItems:function(t){var i=this;i.angular(t,function(){return{elements:i.items(),data:n.map(i.dataItems(),function(n){return{dataItem:n}})}})}}),r.dimensions=function(n,t){var i=n[0];return t&&n.css(t),{width:i.offsetWidth,height:i.offsetHeight}},r.notify=et,or=/template$/i,ri=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,ii=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]+\]$/,ti=/([A-Z])/g,r.initWidget=function(u,f,e){var a,b,s,y,d,l,k,c,w,g,v,p,h;if(e?e.roles&&(e=e.roles):e=r.ui.roles,u=u.nodeType?u:u[0],l=u.getAttribute("data-"+r.ns+"role")){w=l.indexOf(".")===-1,s=w?e[l]:r.getter(l)(t),v=n(u).data(),p=s?"kendo"+s.fn.options.prefix+s.fn.options.name:"",g=w?RegExp("^kendo.*"+l+"$","i"):RegExp("^"+p+"$","i");for(h in v)if(h.match(g)){if(h!==p)return v[h];a=v[h]}if(s){for(c=bt(u,"dataSource"),f=n.extend({},ui(u,s.fn.options),f),c&&(f.dataSource=typeof c===o?r.getter(c)(t):c),y=0,d=s.fn.events.length;y<d;y++)b=s.fn.events[y],k=bt(u,b),k!==i&&(f[b]=r.getter(k)(t));return a?n.isEmptyObject(f)||a.setOptions(f):a=new s(u,f),a}}},r.rolesFromNamespaces=function(n){var t,u,i=[];for(n[0]||(n=[r.ui,r.dataviz.ui]),t=0,u=n.length;t<u;t++)i[t]=n[t].roles;return h.apply(null,[{}].concat(i.reverse()))},r.init=function(t){var i=r.rolesFromNamespaces(ct.call(arguments,1));n(t).find("[data-"+r.ns+"role]").addBack().each(function(){r.initWidget(this,{},i)})},r.destroy=function(t){n(t).find("[data-"+r.ns+"role]").addBack().each(function(){var t,i=n(this).data();for(t in i)0===t.indexOf("kendo")&&typeof i[t].destroy===l&&i[t].destroy()})},r.resize=function(t,i){var u,f=n(t).find("[data-"+r.ns+"role]").addBack().filter(cr);f.length&&(u=n.makeArray(f),u.sort(lr),n.each(u,function(){var t=r.widgetInstance(n(this));t&&t.resize(i)}))},r.parseOptions=ui,h(r.ui,{Widget:b,DataBoundWidget:lt,roles:{},progress:function(t,i){var e,s,h,f,u=t.find(".k-loading-mask"),o=r.support,c=o.browser;i?u.length||(e=o.isRtl(t),s=e?"right":"left",f=t.scrollLeft(),h=c.webkit&&e?t[0].scrollWidth-t.width()-2*f:0,u=n("<div class='k-loading-mask'><span class='k-loading-text'>"+r.ui.progress.messages.loading+"</span><div class='k-loading-image'/><div class='k-loading-color'/></div>").width("100%").height("100%").css("top",t.scrollTop()).css(s,Math.abs(f)+h).prependTo(t)):u&&u.remove()},plugin:function(t,u,f){var c,h,s,a,e=t.fn.options.name;for(u=u||r.ui,f=f||"",u[e]=t,u.roles[e.toLowerCase()]=t,c="getKendo"+f+e,e="kendo"+f+e,h={name:e,widget:t,prefix:f||""},r.widgets.push(h),s=0,a=r._widgetRegisteredCallbacks.length;s<a;s++)r._widgetRegisteredCallbacks[s](h);n.fn[e]=function(u){var s,f=this;return typeof u===o?(s=ct.call(arguments,1),this.each(function(){var h,o,t=n.data(this,e);if(!t)throw Error(r.format("Cannot call method '{0}' of {1} before it is initialized",u,e));if(h=t[u],typeof h!==l)throw Error(r.format("Cannot find method '{0}' of {1}",u,e));if(o=h.apply(t,s),o!==i)return f=o,!1})):this.each(function(){return new t(this,u)}),f},n.fn[e].widget=t,n.fn[c]=function(){return this.data(e)}}}),r.ui.progress.messages={loading:"Loading..."},st={bind:function(){return this},nullObject:!0,options:{}},at=b.extend({init:function(n,t){b.fn.init.call(this,n,t),this.element.autoApplyNS(),this.wrapper=this.element,this.element.addClass("km-widget")},destroy:function(){b.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var n=this.element.closest(r.roleSelector("view splitview modalview drawer"));return r.widgetInstance(n,r.mobile.ui)||st},viewHasNativeScrolling:function(){var n=this.view();return n&&n.options.useNativeScrolling},container:function(){var n=this.element.closest(r.roleSelector("view layout modalview drawer splitview"));return r.widgetInstance(n.eq(0),r.mobile.ui)||st}}),h(r.mobile,{init:function(n){r.init(n,r.mobile.ui,r.ui,r.dataviz.ui)},appLevelNativeScrolling:function(){return r.mobile.application&&r.mobile.application.options&&r.mobile.application.options.useNativeScrolling},roles:{},ui:{Widget:at,DataBoundWidget:lt.extend(at.prototype),roles:{},plugin:function(n){r.ui.plugin(n,r.mobile.ui,"Mobile")}}}),kt(r.dataviz,{init:function(n){r.init(n,r.dataviz.ui)},ui:{roles:{},themes:{},views:[],plugin:function(n){r.ui.plugin(n,r.dataviz.ui)}},roles:{}}),r.touchScroller=function(t,i){return i||(i={}),i.useNative=!0,n(t).map(function(t,f){return f=n(f),!(!u.kineticScrollNeeded||!r.mobile.ui.Scroller||f.data("kendoMobileScroller"))&&(f.kendoMobileScroller(i),f.data("kendoMobileScroller"))})[0]},r.preventDefault=function(n){n.preventDefault()},r.widgetInstance=function(n,i){var f,o,s,h,u=n.data(r.ns+"role"),e=[];if(u){if("content"===u&&(u="scroller"),i)if(i[0])for(f=0,o=i.length;f<o;f++)e.push(i[f].roles[u]);else e.push(i.roles[u]);else e=[r.ui.roles[u],r.dataviz.ui.roles[u],r.mobile.ui.roles[u]];for(u.indexOf(".")>=0&&(e=[r.getter(u)(t)]),f=0,o=e.length;f<o;f++)if(s=e[f],s&&(h=n.data("kendo"+s.fn.options.prefix+s.fn.options.name)))return h}},r.onResize=function(i){var r=i;return u.mobileOS.android&&(r=function(){setTimeout(i,600)}),n(t).on(u.resize,r),r},r.unbindResize=function(i){n(t).off(u.resize,i)},r.attrValue=function(n,t){return n.data(r.ns+t)},r.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},n.extend(n.expr[":"],{kendoFocusable:function(t){var i=n.attr(t,"tabindex");return yr(t,!isNaN(i)&&i>-1)}}),pt=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],ni="label, input, [data-rel=external]",e={setupMouseMute:function(){var i,t=0,f=pt.length,r=document.documentElement;if(!e.mouseTrap&&u.eventCapture)for(e.mouseTrap=!0,e.bustClick=!1,e.captureMouse=!1,i=function(t){e.captureMouse&&("click"===t.type?e.bustClick&&!n(t.target).is(ni)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};t<f;t++)r.addEventListener(pt[t],i,!0)},muteMouse:function(n){e.captureMouse=!0,n.data.bustClick&&(e.bustClick=!0),clearTimeout(e.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(e.mouseTrapTimeoutID),e.mouseTrapTimeoutID=setTimeout(function(){e.captureMouse=!1,e.bustClick=!1},400)}},y={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},u.touch&&(u.mobileOS.ios||u.mobileOS.android)?y={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:u.pointers?y={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:u.msPointers&&(y={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),!u.msPointers||"onmspointerenter"in t||n.each({MSPointerEnter:"MSPointerOver",MSPointerLeave:"MSPointerOut"},function(t,i){n.event.special[t]={delegateType:i,bindType:i,handle:function(t){var f,e=this,r=t.relatedTarget,u=t.handleObj;return r&&(r===e||n.contains(e,r))||(t.type=u.origType,f=u.handler.apply(this,arguments),t.type=i),f}}}),dt=function(n){return y[n]||n},vt=/([^ ]+)/g,r.applyEventMap=function(n,t){return n=n.replace(vt,dt),t&&(n=n.replace(vt,"$1."+t)),n},ot=n.fn.on,h(!0,s,n),s.fn=s.prototype=new n,s.fn.constructor=s,s.fn.init=function(t,i){return i&&i instanceof n&&!(i instanceof s)&&(i=s(i)),n.fn.init.call(this,t,i,fi)},s.fn.init.prototype=s.fn,fi=s(document),h(s.fn,{handler:function(n){return this.data("handler",n),this},autoApplyNS:function(n){return this.data("kendoNS",n||r.guid()),this},on:function(){var s,n,f,i,c,h,t=this,l=t.data("kendoNS");return 1===arguments.length?ot.call(t,arguments[0]):(s=t,n=ct.call(arguments),typeof n[n.length-1]===rt&&n.pop(),f=n[n.length-1],i=r.applyEventMap(n[0],l),u.mouseAndTouchPresent&&i.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(e.setupMouseMute(),c=2===n.length?null:n[1],h=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,ot.call(this,{touchstart:e.muteMouse,touchend:e.unMuteMouse},c,{bustClick:h})),typeof f===o&&(s=t.data("handler"),f=s[f],n[n.length-1]=function(n){f.call(s,n)}),n[0]=i,ot.apply(t,n),t)},kendoDestroy:function(n){return n=n||this.data("kendoNS"),n&&this.off("."+n),this}}),r.jQuery=s,r.eventMap=y,r.timezone=function(){function u(t,r){var u,o,s,c=r[3],e=r[4],f=r[5],h=r[8];return h||(r[8]=h={}),h[t]?h[t]:(isNaN(e)?0===e.indexOf("last")?(u=new Date(Date.UTC(t,n[c]+1,1,f[0]-24,f[1],f[2],0)),o=i[e.substr(4,3)],s=u.getUTCDay(),u.setUTCDate(u.getUTCDate()+o-s-(o>s?7:0))):e.indexOf(">=")>=0&&(u=new Date(Date.UTC(t,n[c],e.substr(5),f[0],f[1],f[2],0)),o=i[e.substr(0,3)],s=u.getUTCDay(),u.setUTCDate(u.getUTCDate()+o-s+(o<s?7:0))):u=new Date(Date.UTC(t,n[c],e,f[0],f[1],f[2],0)),h[t]=u)}function v(n,t,i){var f,o,r,e;return(t=t[i])?(r=new Date(n).getUTCFullYear(),t=jQuery.grep(t,function(n){var i=n[0],t=n[1];return i<=r&&(t>=r||i==r&&"only"==t||"max"==t)}),t.push(n),t.sort(function(n,t){return"number"!=typeof n&&(n=+u(r,n)),"number"!=typeof t&&(t=+u(r,t)),n-t}),e=t[jQuery.inArray(n,t)-1]||t[t.length-1],isNaN(e)?e:null):(f=i.split(":"),o=0,f.length>1&&(o=60*f[0]+ +f[1]),[-1e6,"max","-","Jan",1,[0,0,0],o,"-"])}function l(n,t,i){var u,f,e,r=t[i];if("string"==typeof r&&(r=t[r]),!r)throw Error('Timezone "'+i+'" is either incorrect, or kendo.timezones.min.js is not included.');for(u=r.length-1;u>=0&&(f=r[u][3],!(f&&n>f));u--);if(e=r[u+1],!e)throw Error('Timezone "'+i+'" not found on '+n+".");return e}function t(n,t,i,r){typeof n!=k&&(n=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));var u=l(n,t,r);return{zone:u,rule:v(n,i,u[1])}}function c(n,i){var e,f,u;return"Etc/UTC"==i||"Etc/GMT"==i?0:(e=t(n,this.zones,this.rules,i),f=e.zone,u=e.rule,r.parseFloat(u?f[0]-u[6]:f[0]))}function s(n,i){var f=t(n,this.zones,this.rules,i),e=f.zone,r=f.rule,u=e[2];return u.indexOf("/")>=0?u.split("/")[r&&+r[6]?1:0]:u.indexOf("%s")>=0?u.replace("%s",r&&"-"!=r[7]?r[7]:""):u}function a(n,t,i){var u,r;return typeof t==o&&(t=this.offset(n,t)),typeof i==o&&(i=this.offset(n,i)),u=n.getTimezoneOffset(),n=new Date(n.getTime()+6e4*(t-i)),r=n.getTimezoneOffset(),new Date(n.getTime()+6e4*(r-u))}function h(n,t){return this.convert(n,n.getTimezoneOffset(),t)}function f(n,t){return this.convert(n,t,n.getTimezoneOffset())}function e(n){return this.apply(new Date(n),"Etc/UTC")}var n={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},i={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};return{zones:{},rules:{},offset:c,convert:a,apply:h,remove:f,abbr:s,toLocalDate:e}}(),r.date=function(){function i(n,t){return 0===t&&23===n.getHours()&&(n.setHours(n.getHours()+2),!0)}function s(n,t,r){var u=n.getHours();r=r||1,t=(t-n.getDay()+7*r)%7,n.setDate(n.getDate()+t),i(n,u)}function a(n,t,i){return n=new Date(n),s(n,t,i),n}function h(n){return new Date(n.getFullYear(),n.getMonth(),1)}function w(n){var t=new Date(n.getFullYear(),n.getMonth()+1,0),r=h(n),i=Math.abs(t.getTimezoneOffset()-r.getTimezoneOffset());return i&&t.setHours(r.getHours()+i/60),t}function b(t,i){return 1!==i?n(a(t,i,-1),4):n(t,4-(t.getDay()||7))}function e(n,i){var f=new Date(n.getFullYear(),0,1,-6),e=b(n,i),r=e.getTime()-f.getTime(),u=Math.floor(r/t);return 1+Math.floor(u/7)}function nt(t,i){var u=n(t,-7),f=n(t,7),r=e(t,i);return 0===r?e(u,i)+1:53===r&&e(f,i)>1?1:r}function u(n){return n=new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0),i(n,0),n}function k(n){return Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function f(n){return n.getTime()-u(n)}function p(n,i,r){var u,o=f(i),e=f(r);return!n||o==e||(i>=r&&(r+=t),u=f(n),o>u&&(u+=t),e<o&&(e+=t),u>=o&&u<=e)}function d(n,i,r){var f,e=i.getTime(),u=r.getTime();return e>=u&&(u+=t),f=n.getTime(),f>=e&&f<=u}function n(n,r){var u=n.getHours();return n=new Date(n),c(n,r*t),i(n,u),n}function c(n,t,i){var r,u=n.getTimezoneOffset();n.setTime(n.getTime()+t),i||(r=n.getTimezoneOffset()-u,n.setTime(n.getTime()+r*o))}function g(n,t){return n=new Date(r.date.getDate(n).getTime()+r.date.getMilliseconds(t)),i(n,t.getHours()),n}function l(){return u(new Date)}function y(n){return u(n).getTime()==l().getTime()}function v(n){var t=new Date(1980,1,1,0,0,0);return n&&t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}var o=6e4,t=864e5;return{adjustDST:i,dayOfWeek:a,setDayOfWeek:s,getDate:u,isInDateRange:d,isInTimeRange:p,isToday:y,nextDay:function(t){return n(t,1)},previousDay:function(t){return n(t,-1)},toUtcTime:k,MS_PER_DAY:t,MS_PER_HOUR:60*o,MS_PER_MINUTE:o,setTime:c,setHours:g,addDays:n,today:l,toInvariantTime:v,firstDayOfMonth:h,lastDayOfMonth:w,weekInYear:nt,getMilliseconds:f}}(),r.stripWhitespace=function(n){var i,u,t;if(document.createNodeIterator)for(i=document.createNodeIterator(n,NodeFilter.SHOW_TEXT,function(t){return t.parentNode==n?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);i.nextNode();)i.referenceNode&&!i.referenceNode.textContent.trim()&&i.referenceNode.parentNode.removeChild(i.referenceNode);else for(u=0;u<n.childNodes.length;u++)t=n.childNodes[u],3!=t.nodeType||/\S/.test(t.nodeValue)||(n.removeChild(t),u--),1==t.nodeType&&r.stripWhitespace(t)},li=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(n){setTimeout(n,1e3/60)},r.animationFrame=function(n){li.call(t,n)},a=[],r.queueAnimation=function(n){a[a.length]=n,1===a.length&&r.runNextAnimation()},r.runNextAnimation=function(){r.animationFrame(function(){a[0]&&(a.shift()(),a[0]&&r.runNextAnimation())})},r.parseQueryStringParams=function(n){for(var u=n.split("?")[1]||"",r={},i=u.split(/&|=/),f=i.length,t=0;t<f;t+=2)""!==i[t]&&(r[decodeURIComponent(i[t])]=decodeURIComponent(i[t+1]));return r},r.elementUnderCursor=function(n){if(i!==n.x.client)return document.elementFromPoint(n.x.client,n.y.client)},r.wheelDeltaY=function(n){var r,t=n.originalEvent,u=t.wheelDeltaY;return t.wheelDelta?(u===i||u)&&(r=t.wheelDelta):t.detail&&t.axis===t.VERTICAL_AXIS&&(r=10*-t.detail),r},r.throttle=function(n,t){var r,f,u=0;return!t||t<=0?n:(f=function(){function f(){n.apply(s,o),u=+new Date}var s=this,e=+new Date-u,o=arguments;return u?(r&&clearTimeout(r),e>t?f():r=setTimeout(f,t-e),i):f()},f.cancel=function(){clearTimeout(r)},f)},r.caret=function(t,r,f){var e,h,c,o,l,s=r!==i;if(f===i&&(f=r),t[0]&&(t=t[0]),!s||!t.disabled){try{t.selectionStart!==i?s?(t.focus(),h=u.mobileOS,h.wp||h.android?setTimeout(function(){t.setSelectionRange(r,f)},0):t.setSelectionRange(r,f)):r=[t.selectionStart,t.selectionEnd]:document.selection&&(n(t).is(":visible")&&t.focus(),e=t.createTextRange(),s?(e.collapse(!0),e.moveStart("character",r),e.moveEnd("character",f-r),e.select()):(c=e.duplicate(),e.moveToBookmark(document.selection.createRange().getBookmark()),c.setEndPoint("EndToStart",e),o=c.text.length,l=o+e.text.length,r=[o,l]))}catch(a){r=[]}return r}},r.compileMobileDirective=function(n,i){var u=t.angular;return n.attr("data-"+r.ns+"role",n[0].tagName.toLowerCase().replace("kendo-mobile-","").replace("-","")),u.element(n).injector().invoke(["$compile",function(t){t(n)(i),/^\$(digest|apply)$/.test(i.$$phase)||i.$digest()}]),r.widgetInstance(n,r.mobile.ui)},r.antiForgeryTokens=function(){var t={},u=n("meta[name=csrf-token],meta[name=_csrf]").attr("content"),r=n("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");return n("input[name^='__RequestVerificationToken']").each(function(){t[this.name]=this.value}),r!==i&&u!==i&&(t[r]=u),t},r.cycleForm=function(n){function u(n){var t=r.widgetInstance(n);t&&t.focus?t.focus():n.focus()}var i=n.find("input, .k-widget").first(),t=n.find("button, .k-button").last();t.on("keydown",function(n){n.keyCode!=r.keys.TAB||n.shiftKey||(n.preventDefault(),u(i))}),i.on("keydown",function(n){n.keyCode==r.keys.TAB&&n.shiftKey&&(n.preventDefault(),u(t))})},function(){function e(t,i,u,f){var s,o,h=n("<form>").attr({action:u,method:"POST",target:f}),e=r.antiForgeryTokens();e.fileName=i,s=t.split(";base64,"),e.contentType=s[0].replace("data:",""),e.base64=s[1];for(o in e)e.hasOwnProperty(o)&&n("<input>").attr({value:e[o],name:o,type:"hidden"}).appendTo(h);h.appendTo("body").submit().remove()}function o(n,t){var f,o,r,u,i,e=n;if("string"==typeof n){for(f=n.split(";base64,"),o=f[0],r=atob(f[1]),u=new Uint8Array(r.length),i=0;i<r.length;i++)u[i]=r.charCodeAt(i);e=new Blob([u.buffer],{type:o})}navigator.msSaveBlob(e,t)}function f(n,r){t.Blob&&n instanceof Blob&&(n=URL.createObjectURL(n)),i.download=r,i.href=n;var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),i.dispatchEvent(u),setTimeout(function(){URL.revokeObjectURL(n)})}var i=document.createElement("a"),u="download"in i&&!r.support.browser.edge;r.saveAs=function(n){var t=e;n.forceProxy||(u?t=f:navigator.msSaveBlob&&(t=o)),t(n.dataURI,n.fileName,n.proxyURL,n.proxyTarget)}}(),r.proxyModelSetters=function(n){var t={};return Object.keys(n||{}).forEach(function(i){Object.defineProperty(t,i,{get:function(){return n[i]},set:function(t){n[i]=t,n.dirty=!0}})}),t}}(jQuery,window),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.router.min",["kendo.core.min"],n)}(function(){return function(n,t){function e(n,t){if(!t)return n;n+"/"===t&&(n=t);var i=RegExp("^"+t,"i");return i.test(n)||(n=t+"/"+n),r.protocol+"//"+(r.host+"/"+n).replace(/\/\/+/g,"/")}function y(n){return n?"#!":"#"}function p(n){var t=r.href;return"#!"===n&&t.indexOf("#")>-1&&t.indexOf("#!")<0?null:t.split(n)[1]||""}function s(n,t){return 0===t.indexOf(n)?t.substr(n.length).replace(/\/\//g,"/"):t}function k(n){return n.replace(/^(#)?/,"#")}function tt(n){return n.replace(/^(#(!)?)?/,"#!")}var i=window.kendo,f="change",d="back",w="same",b=i.support,r=window.location,u=window.history,nt=50,l=i.support.browser.msie,g=/^#*/,o=window.document,h=i.Class.extend({back:function(){l?setTimeout(function(){u.back()}):u.back()},forward:function(){l?setTimeout(function(){u.forward()}):u.forward()},length:function(){return u.length},replaceLocation:function(n){r.replace(n)}}),c=h.extend({init:function(n){this.root=n},navigate:function(n){u.pushState({},o.title,e(n,this.root))},replace:function(n){u.replaceState({},o.title,e(n,this.root))},normalize:function(n){return s(this.root,n)},current:function(){var n=r.pathname;return r.search&&(n+=r.search),s(this.root,n)},change:function(t){n(window).bind("popstate.kendo",t)},stop:function(){n(window).unbind("popstate.kendo")},normalizeCurrent:function(n){var i,t=n.root,s=r.pathname,f=p(y(n.hashBang));t===s+"/"&&(i=t),t===s&&f&&(i=e(f.replace(g,""),t)),i&&u.pushState({},o.title,i)}}),v=h.extend({init:function(n){this._id=i.guid(),this.prefix=y(n),this.fix=n?tt:k},navigate:function(n){r.hash=this.fix(n)},replace:function(n){this.replaceLocation(this.fix(n))},normalize:function(n){return n.indexOf(this.prefix)<0?n:n.split(this.prefix)[1]},change:function(t){b.hashChange?n(window).on("hashchange."+this._id,t):this._interval=setInterval(t,nt)},stop:function(){n(window).off("hashchange."+this._id),clearInterval(this._interval)},current:function(){return p(this.prefix)},normalizeCurrent:function(n){var i=r.pathname,t=n.root;return!(!n.pushState||t===i)&&(this.replaceLocation(t+this.prefix+s(t,i)),!0)}}),a=i.Observable.extend({start:function(t){if(t=t||{},this.bind([f,d,w],t),!this._started){this._started=!0,t.root=t.root||"/";var r,i=this.createAdapter(t);i.normalizeCurrent(t)||(r=i.current(),n.extend(this,{adapter:i,root:t.root,historyLength:i.length(),current:r,locations:[r]}),i.change(n.proxy(this,"_checkUrl")))}},createAdapter:function(n){return b.pushState&&n.pushState?new c(n.root):new v(n.hashBang)},stop:function(){this._started&&(this.adapter.stop(),this.unbind(f),this._started=!1)},change:function(n){this.bind(f,n)},replace:function(n,t){this._navigate(n,t,function(t){t.replace(n),this.locations[this.locations.length-1]=this.current})},navigate:function(n,i){return"#:back"===n?(this.backCalled=!0,this.adapter.back(),t):(this._navigate(n,i,function(t){t.navigate(n),this.locations.push(this.current)}),t)},_navigate:function(n,i,r){var u=this.adapter;return n=u.normalize(n),this.current===n||this.current===decodeURIComponent(n)?(this.trigger(w),t):(!i&&this.trigger(f,{url:n,decode:!1})||(this.current=n,r.call(this,u),this.historyLength=u.length()),t)},_checkUrl:function(){var i=this.adapter,n=i.current(),e=i.length(),o=this.historyLength===e,r=n===this.locations[this.locations.length-2]&&o,s=this.backCalled,u=this.current;return null===n||this.current===n||this.current===decodeURIComponent(n)||(this.historyLength=e,this.backCalled=!1,this.current=n,r&&this.trigger("back",{url:u,to:n})?(i.forward(),this.current=u,t):this.trigger(f,{url:n,backButtonPressed:!s})?(r?i.forward():(i.back(),this.historyLength--),this.current=u,t):(r?this.locations.pop():this.locations.push(n),t))}});i.History=a,i.History.HistoryAdapter=h,i.History.HashAdapter=v,i.History.PushStateAdapter=c,i.absoluteURL=e,i.history=new a}(window.kendo.jQuery),function(){function v(n,t){return t?n:"([^/]+)"}function y(n,t){return RegExp("^"+n.replace(h,"\\$&").replace(w,"(?:$1)?").replace(p,v).replace(c,"(.*?)")+"$",t?"i":"")}function o(n){return n.replace(/(\?.*)|(#.*)/g,"")}var n=window.kendo,t=n.history,s=n.Observable,e="init",u="routeMissing",i="change",f="back",r="same",w=/\((.*?)\)/g,p=/(\(\?)?:\w+/g,c=/\*\w+/g,h=/[\-{}\[\]+?.,\\\^$|#\s]/g,l=n.Class.extend({init:function(n,t,i){n instanceof RegExp||(n=y(n,i)),this.route=n,this._callback=t},callback:function(t,i,r){var u,s,f=0,e=n.parseQueryStringParams(t);if(e._back=i,t=o(t),u=this.route.exec(t).slice(1),s=u.length,r)for(;f<s;f++)void 0!==u[f]&&(u[f]=decodeURIComponent(u[f]));u.push(e),this._callback.apply(null,u)},worksWith:function(n,t,i){return!!this.route.test(o(n))&&(this.callback(n,t,i),!0)}}),a=s.extend({init:function(n){n||(n={}),s.fn.init.call(this),this.routes=[],this.pushState=n.pushState,this.hashBang=n.hashBang,this.root=n.root,this.ignoreCase=n.ignoreCase!==!1,this.bind([e,u,i,r],n)},destroy:function(){t.unbind(i,this._urlChangedProxy),t.unbind(r,this._sameProxy),t.unbind(f,this._backProxy),this.unbind()},start:function(){var i,n=this,f=function(){n._same()},r=function(t){n._back(t)},u=function(t){n._urlChanged(t)};t.start({same:f,change:u,back:r,pushState:n.pushState,hashBang:n.hashBang,root:n.root}),i={url:t.current||"/",preventDefault:$.noop},n.trigger(e,i)||n._urlChanged(i),this._urlChangedProxy=u,this._backProxy=r},route:function(n,t){this.routes.push(new l(n,t,this.ignoreCase))},navigate:function(t,i){n.history.navigate(t,i)},replace:function(t,i){n.history.replace(t,i)},_back:function(n){this.trigger(f,{url:n.url,to:n.to})&&n.preventDefault()},_same:function(){this.trigger(r)},_urlChanged:function(t){var f,o,s,h,r=t.url,c=void 0===t.decode,e=t.backButtonPressed;if(r||(r="/"),this.trigger(i,{url:t.url,params:n.parseQueryStringParams(t.url),backButtonPressed:e}))return void t.preventDefault();for(f=0,o=this.routes,h=o.length;f<h;f++)if(s=o[f],s.worksWith(r,e,c))return;this.trigger(u,{url:r,params:n.parseQueryStringParams(r),backButtonPressed:e})&&t.preventDefault()}});n.Router=a}(),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.data.odata.min",["kendo.core.min"],n)}(function(){return function(n,t){function e(r,u){for(var c,y,o,l,s,b,v=[],k=r.logic||"and",p=r.filters,a=0,w=p.length;a<w;a++)r=p[a],c=r.field,s=r.value,l=r.operator,r.filters?r=e(r,u):(b=r.ignoreCase,c=c.replace(/\./g,"/"),r=f[l],u&&(r=h[l]),"isnull"===l||"isnotnull"===l?r=i.format("{0} {1} null",c,r):"isempty"===l||"isnotempty"===l?r=i.format("{0} {1} ''",c,r):r&&s!==t&&(y=n.type(s),"string"===y?(o="'{1}'",s=s.replace(/'/g,"''"),b===!0&&(c="tolower("+c+")")):"date"===y?u?(o="{1:yyyy-MM-ddTHH:mm:ss+00:00}",s=i.timezone.apply(s,"Etc/UTC")):o="datetime'{1:yyyy-MM-ddTHH:mm:ss}'":o="{1}",r.length>3?"substringof"!==r?o="{0}({2},"+o+")":(o="{0}("+o+",{2})","doesnotcontain"===l&&(u?(o="{0}({2},'{1}') eq -1",r="indexof"):o+=" eq false")):o="{2} {0} "+o,r=i.format(o,r,s,c))),v.push(r);return r=v.join(" "+k+" "),v.length>1&&(r="("+r+")"),r}function s(n){for(var t in n)0===t.indexOf("@odata")&&delete n[t]}var i=window.kendo,r=n.extend,f={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith",isnull:"eq",isnotnull:"ne",isempty:"eq",isnotempty:"ne"},h=r({},f,{contains:"contains"}),u={pageSize:n.noop,page:n.noop,filter:function(n,t,i){t&&(t=e(t,i),t&&(n.$filter=t))},sort:function(t,i){var r=n.map(i,function(n){var t=n.field.replace(/\./g,"/");return"desc"===n.dir&&(t+=" desc"),t}).join(",");r&&(t.$orderby=r)},skip:function(n,t){t&&(n.$skip=t)},take:function(n,t){t&&(n.$top=t)}},o={read:{dataType:"jsonp"}};r(!0,i.data,{schemas:{odata:{type:"json",data:function(n){return n.d.results||[n.d]},total:"d.__count"}},transports:{odata:{read:{cache:!0,dataType:"jsonp",jsonp:"$callback"},update:{cache:!0,dataType:"json",contentType:"application/json",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(n,t,r){var s,h,f,e;if(n=n||{},t=t||"read",e=(this.options||o)[t],e=e?e.dataType:"json","read"===t){s={$inlinecount:"allpages"},"json"!=e&&(s.$format="json");for(f in n)u[f]?u[f](s,n[f],r):s[f]=n[f]}else{if("json"!==e)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(f in n)h=n[f],"number"==typeof h&&(n[f]=h+"");s=i.stringify(n)}}return s}}}}),r(!0,i.data,{schemas:{"odata-v4":{type:"json",data:function(t){return t=n.extend({},t),s(t),t.value?t.value:[t]},total:function(n){return n["@odata.count"]}}},transports:{"odata-v4":{read:{cache:!0,dataType:"json"},update:{cache:!0,dataType:"json",contentType:"application/json;IEEE754Compatible=true",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json;IEEE754Compatible=true",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(n,t){var r=i.data.transports.odata.parameterMap(n,t,!0);return"read"==t&&(r.$count=!0,delete r.$inlinecount),r}}}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.data.xml.min",["kendo.core.min"],n)}(function(){return function(n,t){var r=window.kendo,i=n.isArray,e=n.isPlainObject,s=n.map,h=n.each,u=n.extend,c=r.getter,o=r.Class,f=o.extend({init:function(t){var p,v,y,b,f=this,a=t.total,o=t.model,k=t.parse,l=t.errors,w=t.serialize,c=t.data;o&&(e(o)&&(p=t.modelBase||r.data.Model,o.fields&&h(o.fields,function(t,i){e(i)&&i.field?n.isFunction(i.field)||(i=u(i,{field:f.getter(i.field)})):i={field:f.getter(i)},o.fields[t]=i}),v=o.id,v&&(y={},y[f.xpathToMember(v,!0)]={field:f.getter(v)},o.fields=u(y,o.fields),o.id=f.xpathToMember(v)),o=p.define(o)),f.model=o),a&&("string"==typeof a?(a=f.getter(a),f.total=function(n){return parseInt(a(n),10)}):"function"==typeof a&&(f.total=a)),l&&("string"==typeof l?(l=f.getter(l),f.errors=function(n){return l(n)||null}):"function"==typeof l&&(f.errors=l)),c&&("string"==typeof c?(c=f.xpathToMember(c),f.data=function(n){var r,t=f.evaluate(n,c);return t=i(t)?t:[t],f.model&&o.fields?(r=new f.model,s(t,function(n){if(n){var t,i={};for(t in o.fields)i[t]=r._parse(t,o.fields[t].field(n));return i}})):t}):"function"==typeof c&&(f.data=c)),"function"==typeof k&&(b=f.parse,f.parse=function(n){var t=k.call(f,n);return b.call(f,t)}),"function"==typeof w&&(f.serialize=w)},total:function(n){return this.data(n).length},errors:function(n){return n?n.errors:null},serialize:function(n){return n},parseDOM:function(n){for(var o,r,s,h,u,c,f={},l=n.attributes,a=l.length,e=0;e<a;e++)c=l[e],f["@"+c.nodeName]=c.nodeValue;for(r=n.firstChild;r;r=r.nextSibling)s=r.nodeType,3===s||4===s?f["#text"]=r.nodeValue:1===s&&(o=this.parseDOM(r),h=r.nodeName,u=f[h],i(u)?u.push(o):u=u!==t?[u,o]:o,f[h]=u);return f},evaluate:function(n,t){for(var o,f,s,r,u,e=t.split(".");o=e.shift();)if(n=n[o],i(n)){for(f=[],t=e.join("."),u=0,s=n.length;u<s;u++)r=this.evaluate(n[u],t),r=i(r)?r:[r],f.push.apply(f,r);return f}return n},parse:function(t){var i,u,r={};return i=t.documentElement||n.parseXML(t).documentElement,u=this.parseDOM(i),r[i.nodeName]=u,r},xpathToMember:function(n,t){return n?(n=n.replace(/^\//,"").replace(/\//g,"."),n.indexOf("@")>=0?n.replace(/\.?(@.*)/,t?"$1":'["$1"]'):n.indexOf("text()")>=0?n.replace(/(\.?text\(\))/,t?"#text":'["#text"]'):n):""},getter:function(n){return c(this.xpathToMember(n),!0)}});n.extend(!0,r.data,{XmlDataReader:f,readers:{xml:f}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.data.min",["kendo.core.min","kendo.data.odata.min","kendo.data.xml.min"],n)}(function(){return function(n,t){function oi(n,t,i,u){return function(f){var o,e={};for(o in f)e[o]=f[o];e.field=u?i+"."+f.field:i,t==r&&n._notifyChange&&n._notifyChange(e),n.trigger(t,e)}}function tr(t,i){if(t===i)return!0;var u,r=n.type(t),f=n.type(i);if(r!==f)return!1;if("date"===r)return t.getTime()===i.getTime();if("object"!==r&&"array"!==r)return!1;for(u in t)if(!tr(t[u],i[u]))return!1;return!0}function au(n,t){var i,r;for(r in n)if((i=n[r],b(i)&&i.field&&i.field===t)||i===t)return i;return null}function u(n){this.data=n||[]}function et(n,i){if(n){var r=typeof n===s?{field:n,dir:i}:n,u=c(r)?r:r!==t?[r]:[];return wu(u,function(n){return!!n.dir})}}function nr(n){var r,f,i,t,u=n.filters;if(u)for(r=0,f=u.length;r<f;r++)i=u[r],t=i.operator,t&&typeof t===s&&(i.operator=gr[t.toLowerCase()]||t),nr(i)}function ut(n){if(n&&!w(n))return!c(n)&&n.filters||(n={logic:"and",filters:c(n)?n:[n]}),nr(n),n}function gu(n,t){return!n.logic&&!t.logic&&n.field===t.field&&n.value===t.value&&n.operator===t.operator}function kr(n){return n=n||{},w(n)?{logic:"and",filters:[]}:ut(n)}function dr(n,t){return t.logic||n.field>t.field?1:n.field<t.field?-1:0}function br(n,t){var e,f,i,r,u;if((n=kr(n),t=kr(t),n.logic!==t.logic)||(i=(n.filters||[]).slice(),r=(t.filters||[]).slice(),i.length!==r.length))return!1;for(i=i.sort(dr),r=r.sort(dr),u=0;u<i.length;u++)if(e=i[u],f=r[u],e.logic&&f.logic){if(!br(e,f))return!1}else if(!gu(e,f))return!1;return!0}function su(n){return c(n)?n:[n]}function ot(n,i){var r=typeof n===s?{field:n,dir:i}:n,u=c(r)?r:r!==t?[r]:[];return li(u,function(n){return{field:n.field,dir:n.dir||"asc",aggregates:n.aggregates}})}function cu(n,t){return n&&n.getTime&&t&&t.getTime?n.getTime()===t.getTime():n===t}function fu(n,t,r,u,f,e){var h,c,s,l,o;for(t=t||[],l=t.length,h=0;h<l;h++)c=t[h],s=c.aggregate,o=c.field,n[o]=n[o]||{},e[o]=e[o]||{},e[o][s]=e[o][s]||{},n[o][s]=wi[s.toLowerCase()](n[o][s],r,i.accessor(o),u,f,e[o][s])}function y(n){return"number"==typeof n&&!isNaN(n)}function kt(n){return n&&n.getTime}function bt(n){for(var r=n.length,i=Array(r),t=0;t<r;t++)i[t]=n[t].toJSON();return i}function bu(n,t,r,u,f){for(var h,o,e,c={},s=0,l=n.length;s<l;s++){h=n[s];for(o in t)e=f[o],e&&e!==o&&(c[e]||(c[e]=i.setter(e)),c[e](h,t[o](h)),delete h[o])}}function cr(n,t,i,r,u){for(var s,f,o,e=0,h=n.length;e<h;e++){s=n[e];for(f in t)s[f]=i._parse(f,t[f](s)),o=u[f],o&&o!==f&&delete s[o]}}function hr(n,t,i,r,u){for(var f,e,o=0,s=n.length;o<s;o++)f=n[o],e=r[f.field],e&&e!=f.field&&(f.field=e),f.value=i._parse(f.field,f.value),f.hasSubgroups?hr(f.items,t,i,r,u):cr(f.items,t,i,r,u)}function ci(n,t,i,r,u,f){return function(e){return e=n(e),e&&!w(r)&&("[object Array]"===vt.call(e)||e instanceof l||(e=[e]),i(e,r,new t,u,f)),e||[]}}function hi(n,t,i,r){for(var f,u,o,e=0;t.length&&r&&(f=t[e],u=f.items,o=u.length,n&&n.field===f.field&&n.value===f.value?(n.hasSubgroups&&n.items.length?hi(n.items[n.items.length-1],f.items,i,r):(u=u.slice(i,i+r),n.items=n.items.concat(u)),t.splice(e--,1)):f.hasSubgroups&&u.length?(hi(f,u,i,r),f.items.length||t.splice(e--,1)):(u=u.slice(i,i+r),f.items=u,f.items.length||t.splice(e--,1)),0===u.length?i-=o:(i=0,r-=u.length),!(++e>=t.length)););e<t.length&&t.splice(e,t.length-e)}function si(n){for(var f,t,i,r=[],u=0,e=n.length;u<e;u++)if(i=n.at(u),i.hasSubgroups)r=r.concat(si(i.items));else for(f=i.items,t=0;t<f.length;t++)r.push(f.at(t));return r}function sr(n,t){var r,u,i;if(t)for(r=0,u=n.length;r<u;r++)i=n.at(r),i.hasSubgroups?sr(i.items,t):i.items=new ft(i.items,t)}function vr(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i].hasSubgroups){if(vr(n[i].items,t))return!0}else if(t(n[i].items,n[i]))return!0}function vu(n,t,i,r){for(var u=0;u<n.length&&n[u].data!==t&&!ar(n[u].data,i,r);u++);}function ar(n,t,i){for(var r=0,u=n.length;r<u;r++){if(n[r]&&n[r].hasSubgroups)return ar(n[r].items,t,i);if(n[r]===t||n[r]===i)return n[r]=i,!0}}function lr(n,i,r,u,f){for(var e,s,o=0,h=n.length;o<h;o++)if(e=n[o],e&&!(e instanceof u))if(e.hasSubgroups===t||f){for(s=0;s<i.length;s++)if(i[s]===e){n[o]=i.at(s),vu(r,i,e,n[o]);break}}else lr(e.items,i,r,u,f)}function ur(n,t){for(var r,i=0,u=n.length;i<u;i++)if(r=n.at(i),r.uid==t.uid)return n.splice(i,1),r}function rr(n,t){return t?or(n,function(n){return n.uid&&n.uid==t.uid||n[t.idField]===t.id&&t.id!==t._defaultId}):-1}function ir(n,t){return t?or(n,function(n){return n.uid==t.uid}):-1}function or(n,t){for(var i=0,r=n.length;i<r;i++)if(t(n[i]))return i;return-1}function er(n,t){var i,r;return n&&!w(n)?(i=n[t],r=b(i)?i.from||i.field||t:n[t]||t,a(r)?t:r):t}function fr(n,t){var r,f,u,i={};for(u in n)"filters"!==u&&(i[u]=n[u]);if(n.filters)for(i.filters=[],r=0,f=n.filters.length;r<f;r++)i.filters[r]=fr(n.filters[r],t);else i.field=er(t.fields,i.field);return i}function at(n,t){for(var i,u,f,e=[],r=0,o=n.length;r<o;r++){i={},u=n[r];for(f in u)i[f]=u[f];i.field=er(t.fields,i.field),i.aggregates&&c(i.aggregates)&&(i.aggregates=at(i.aggregates,t)),e.push(i)}return e}function pu(t,i){var s,a,c,h,o,l,u,r,f,e;for(t=n(t)[0],s=t.options,a=i[0],c=i[1],h=[],o=0,l=s.length;o<l;o++)f={},r=s[o],u=r.parentNode,u===t&&(u=null),r.disabled||u&&u.disabled||(u&&(f.optgroup=u.label),f[a.field]=r.text,e=r.attributes.value,e=e&&e.specified?r.value:r.text,f[c.field]=e,h.push(f));return h}function yu(t,i){for(var r,l,o,f,e,c=n(t)[0].tBodies[0],s=c?c.rows:[],v=i.length,h=[],u=0,a=s.length;u<a;u++){for(o={},e=!0,l=s[u].cells,r=0;r<v;r++)f=l[r],"th"!==f.nodeName.toLowerCase()&&(e=!1,o[i[r].field]=f.innerHTML);e||h.push(o)}return h}function nu(n){return function(){var i=this._data,t=h.fn[n].apply(this,ht.call(arguments));return this._data!=i&&this._attachBubbleHandlers(),t}}function tu(t,i){function s(n,t){return n.filter(t).add(n.find(t))}for(var r,f,c,e,h,u,y=n(t).children(),w=[],b=i[0].field,l=i[1]&&i[1].field,a=i[2]&&i[2].field,v=i[3]&&i[3].field,o=0,p=y.length;o<p;o++)r={_loaded:!0},f=y.eq(o),e=f[0].firstChild,u=f.children(),t=u.filter("ul"),u=u.filter(":not(ul)"),c=f.attr("data-id"),c&&(r.id=c),e&&(r[b]=3==e.nodeType?e.nodeValue:u.text()),l&&(r[l]=s(u,"a").attr("href")),v&&(r[v]=s(u,"img").attr("src")),a&&(h=s(u,".k-sprite").prop("className"),r[a]=h&&n.trim(h.replace("k-sprite",""))),t.length&&(r.items=tu(t.eq(0),i)),"true"==f.attr("data-hasChildren")&&(r.hasChildren=!0),w.push(r);return w}var li,ft,e,ai,pr,v,lt,yr,ni,gr,wi,ei,ti,rt,ii,h,yi,ri,k,gt,wr,o=n.extend,p=n.proxy,b=n.isPlainObject,w=n.isEmptyObject,c=n.isArray,wu=n.grep,fi=n.ajax,ui=n.each,g=n.noop,i=window.kendo,a=i.isFunction,d=i.Observable,yt=i.Class,s="string",vi="function",pi="create",di="read",ki="update",bi="destroy",r="change",gi="sync",dt="get",nt="error",tt="requestStart",ct="progress",it="requestEnd",du=[pi,di,ki,bi],st=function(n){return n},wt=i.getter,pt=i.stringify,f=Math,ku=[].push,lu=[].join,uu=[].pop,ru=[].splice,iu=[].shift,ht=[].slice,hu=[].unshift,vt={}.toString,eu=i.support.stableSort,ou=/^\/Date\((.*?)\)\/$/,l=d.extend({init:function(n,t){var i=this;i.type=t||e,d.fn.init.call(i),i.length=n.length,i.wrapAll(n,i)},at:function(n){return this[n]},toJSON:function(){for(var n,r=this.length,i=Array(r),t=0;t<r;t++)n=this[t],n instanceof e&&(n=n.toJSON()),i[t]=n;return i},parent:g,wrapAll:function(n,t){var i,u,r=this,f=function(){return r};for(t=t||[],i=0,u=n.length;i<u;i++)t[i]=r.wrap(n[i],f);return t},wrap:function(n,t){var u,i=this;return null!==n&&"[object Object]"===vt.call(n)&&(u=n instanceof i.type||n instanceof v,u||(n=n instanceof e?n.toJSON():n,n=new i.type(n)),n.parent=t,n.bind(r,function(n){i.trigger(r,{field:n.field,node:n.node,index:n.index,items:n.items||[this],action:n.node?n.action||"itemloaded":"itemchange"})})),n},push:function(){var t,i=this.length,n=this.wrapAll(arguments);return t=ku.apply(this,n),this.trigger(r,{action:"add",index:i,items:n}),t},slice:ht,sort:[].sort,join:lu,pop:function(){var t=this.length,n=uu.apply(this);return t&&this.trigger(r,{action:"remove",index:t-1,items:[n]}),n},splice:function(n,t,i){var u,f,o,e=this.wrapAll(ht.call(arguments,2));if(u=ru.apply(this,[n,t].concat(e)),u.length)for(this.trigger(r,{action:"remove",index:n,items:u}),f=0,o=u.length;f<o;f++)u[f]&&u[f].children&&u[f].unbind(r);return i&&this.trigger(r,{action:"add",index:n,items:e}),u},shift:function(){var t=this.length,n=iu.apply(this);return t&&this.trigger(r,{action:"remove",index:0,items:[n]}),n},unshift:function(){var t,n=this.wrapAll(arguments);return t=hu.apply(this,n),this.trigger(r,{action:"add",index:0,items:n}),t},indexOf:function(n){for(var i=this,t=0,r=i.length;t<r;t++)if(i[t]===n)return t;return-1},forEach:function(n){for(var t=0,i=this.length;t<i;t++)n(this[t],t,this)},map:function(n){for(var t=0,i=[],r=this.length;t<r;t++)i[t]=n(this[t],t,this);return i},reduce:function(n){var i,t=0,r=this.length;for(2==arguments.length?i=arguments[1]:t<r&&(i=this[t++]);t<r;t++)i=n(i,this[t],t,this);return i},reduceRight:function(n){var i,t=this.length-1;for(2==arguments.length?i=arguments[1]:t>0&&(i=this[t--]);t>=0;t--)i=n(i,this[t],t,this);return i},filter:function(n){for(var r,t=0,i=[],u=this.length;t<u;t++)r=this[t],n(r,t,this)&&(i[i.length]=r);return i},find:function(n){for(var i,t=0,r=this.length;t<r;t++)if(i=this[t],n(i,t,this))return i},every:function(n){for(var i,t=0,r=this.length;t<r;t++)if(i=this[t],!n(i,t,this))return!1;return!0},some:function(n){for(var i,t=0,r=this.length;t<r;t++)if(i=this[t],n(i,t,this))return!0;return!1},remove:function(n){var t=this.indexOf(n);t!==-1&&this.splice(t,1)},empty:function(){this.splice(0,this.length)}});"undefined"!=typeof Symbol&&Symbol.iterator&&!l.prototype[Symbol.iterator]&&(l.prototype[Symbol.iterator]=[][Symbol.iterator]),ft=l.extend({init:function(n,t){d.fn.init.call(this),this.type=t||e;for(var i=0;i<n.length;i++)this[i]=n[i];this.length=i,this._parent=p(function(){return this},this)},at:function(n){var t=this[n];return t instanceof this.type?t.parent=this._parent:t=this[n]=this.wrap(t,this._parent),t}}),e=d.extend({init:function(n){var t,r,u=this,f=function(){return u};d.fn.init.call(this),this._handlers={};for(r in n)t=n[r],"object"==typeof t&&t&&!t.getTime&&"_"!=r.charAt(0)&&(t=u.wrap(t,r,f)),u[r]=t;u.uid=i.guid()},shouldSerialize:function(n){return this.hasOwnProperty(n)&&"_handlers"!==n&&"_events"!==n&&typeof this[n]!==vi&&"uid"!==n},forEach:function(n){for(var t in this)this.shouldSerialize(t)&&n(this[t],t)},toJSON:function(){var n,t,i={};for(t in this)this.shouldSerialize(t)&&(n=this[t],(n instanceof e||n instanceof l)&&(n=n.toJSON()),i[t]=n);return i},get:function(n){var r,t=this;return t.trigger(dt,{field:n}),r="this"===n?t:i.getter(n,!0)(t)},_set:function(n,t){var u,r,o,s=this,f=n.indexOf(".")>=0;if(f)for(u=n.split("."),r="";u.length>1;){if(r+=u.shift(),o=i.getter(r,!0)(s),o instanceof e)return o.set(u.join("."),t),f;r+="."}return i.setter(n)(s,t),f},set:function(n,t){var u=this,e=!1,o=n.indexOf(".")>=0,f=i.getter(n,!0)(u);return f!==t&&(f instanceof d&&this._handlers[n]&&(this._handlers[n].get&&f.unbind(dt,this._handlers[n].get),f.unbind(r,this._handlers[n].change)),e=u.trigger("set",{field:n,value:t}),e||(o||(t=u.wrap(t,n,function(){return u})),(!u._set(n,t)||n.indexOf("(")>=0||n.indexOf("[")>=0)&&u.trigger(r,{field:n}))),e},parent:g,wrap:function(n,t,i){var a,u,c,s,f=this,o=vt.call(n);return null==n||"[object Object]"!==o&&"[object Array]"!==o||(c=n instanceof l,s=n instanceof h,"[object Object]"!==o||s||c?("[object Array]"===o||c||s)&&(c||s||(n=new l(n)),u=oi(f,r,t,!1),n.bind(r,u),f._handlers[t]={change:u}):(n instanceof e||(n=new e(n)),a=oi(f,dt,t,!0),n.bind(dt,a),u=oi(f,r,t,!0),n.bind(r,u),f._handlers[t]={get:a,change:u}),n.parent=i),n}}),ai={number:function(n){return i.parseFloat(n)},date:function(n){return i.parseDate(n)},boolean:function(n){return typeof n===s?"true"===n.toLowerCase():null!=n?!!n:n},string:function(n){return null!=n?n+"":n},"default":function(n){return n}},pr={string:"",number:0,date:new Date,boolean:!1,"default":""},v=e.extend({init:function(i){var u,f,r=this;if((!i||n.isEmptyObject(i))&&(i=n.extend({},r.defaults,i),r._initializers))for(u=0;u<r._initializers.length;u++)f=r._initializers[u],i[f]=r.defaults[f]();e.fn.init.call(r,i),r.dirty=!1,r.idField&&(r.id=r.get(r.idField),r.id===t&&(r.id=r._defaultId))},shouldSerialize:function(n){return e.fn.shouldSerialize.call(this,n)&&"uid"!==n&&!("id"!==this.idField&&"id"===n)&&"dirty"!==n&&"_accessors"!==n},_parse:function(n,t){var i,u=this,f=n,r=u.fields||{};return n=r[n],n||(n=au(r,f)),n&&(i=n.parse,!i&&n.type&&(i=ai[n.type.toLowerCase()])),i?i(t):t},_notifyChange:function(n){var t=n.action;"add"!=t&&"remove"!=t||(this.dirty=!0)},editable:function(n){return n=(this.fields||{})[n],!n||n.editable!==!1},set:function(n,t,i){var r=this,u=r.dirty;r.editable(n)&&(t=r._parse(n,t),tr(t,r.get(n))||(r.dirty=!0,e.fn.set.call(r,n,t,i)&&!u&&(r.dirty=u)))},accept:function(n){var i,r,t=this,u=function(){return t};for(i in n)r=n[i],"_"!=i.charAt(0)&&(r=t.wrap(n[i],i,u)),t._set(i,r);t.idField&&(t.id=t.get(t.idField)),t.dirty=!1},isNew:function(){return this.id===this._defaultId}}),v.define=function(n,i){i===t&&(i=n,n=v);var e,f,u,w,c,a,b,h,r=o({defaults:{}},i),p={},l=r.id,y=[];if(l&&(r.idField=l),r.id&&delete r.id,l&&(r.defaults[l]=r._defaultId=""),"[object Array]"===vt.call(r.fields)){for(a=0,b=r.fields.length;a<b;a++)u=r.fields[a],typeof u===s?p[u]={}:u.field&&(p[u.field]=u);r.fields=p}for(f in r.fields)u=r.fields[f],w=u.type||"default",c=null,h=f,f=typeof u.field===s?u.field:f,u.nullable||(c=r.defaults[h!==f?h:f]=u.defaultValue!==t?u.defaultValue:pr[w.toLowerCase()],"function"==typeof c&&y.push(f)),i.id===f&&(r._defaultId=c),r.defaults[h!==f?h:f]=c,u.parse=u.parse||ai[w];return y.length>0&&(r._initializers=y),e=n.extend(r),e.define=function(n){return v.define(e,n)},r.fields&&(e.fields=r.fields,e.idField=r.idField),e},lt={selector:function(n){return a(n)?n:wt(n)},compare:function(n){var t=this.selector(n);return function(n,i){return n=t(n),i=t(i),null==n&&null==i?0:null==n?-1:null==i?1:n.localeCompare?n.localeCompare(i):n>i?1:n<i?-1:0}},create:function(n){var t=n.compare||this.compare(n.field);return"desc"==n.dir?function(n,i){return t(i,n,!0)}:t},combine:function(n){return function(t,i){for(var u=n[0](t,i),r=1,f=n.length;r<f;r++)u=u||n[r](t,i);return u}}},yr=o({},lt,{asc:function(n){var t=this.selector(n);return function(n,i){var r=t(n),u=t(i);return r&&r.getTime&&u&&u.getTime&&(r=r.getTime(),u=u.getTime()),r===u?n.__position-i.__position:null==r?-1:null==u?1:r.localeCompare?r.localeCompare(u):r>u?1:-1}},desc:function(n){var t=this.selector(n);return function(n,i){var u=t(n),r=t(i);return u&&u.getTime&&r&&r.getTime&&(u=u.getTime(),r=r.getTime()),u===r?n.__position-i.__position:null==u?1:null==r?-1:r.localeCompare?r.localeCompare(u):u<r?1:-1}},create:function(n){return this[n.dir](n.field)}}),li=function(n,t){for(var u=n.length,r=Array(u),i=0;i<u;i++)r[i]=t(n[i],i,n);return r},ni=function(){function i(n){return"string"==typeof n&&(n=n.replace(/[\r\n]+/g,"")),JSON.stringify(n)}function n(n){return function(t,r,u){return r+="",u&&(t="("+t+" || '').toLowerCase()",r=r.toLowerCase()),n(t,i(r),u)}}function t(n,t,r,u){if(null!=r){if(typeof r===s){var f=ou.exec(r);f?r=new Date(+f[1]):u?(r=i(r.toLowerCase()),t="(("+t+" || '')+'').toLowerCase()"):r=i(r)}r.getTime&&(t="("+t+"&&"+t+".getTime?"+t+".getTime():"+t+")",r=r.getTime())}return t+" "+n+" "+r}function r(n){for(var t,u="/^",i=!1,r=0;r<n.length;++r){if(t=n.charAt(r),i)u+="\\"+t;else{if("~"==t){i=!0;continue}u+="*"==t?".*":"?"==t?".":".+^$()[]{}|\\/\n\r\u2028\u2029 ".indexOf(t)>=0?"\\"+t:t}i=!1}return u+"$/"}return{quote:function(n){return n&&n.getTime?"new Date("+n.getTime()+")":i(n)},eq:function(n,i,r){return t("==",n,i,r)},neq:function(n,i,r){return t("!=",n,i,r)},gt:function(n,i,r){return t(">",n,i,r)},gte:function(n,i,r){return t(">=",n,i,r)},lt:function(n,i,r){return t("<",n,i,r)},lte:function(n,i,r){return t("<=",n,i,r)},startswith:n(function(n,t){return n+".lastIndexOf("+t+", 0) == 0"}),doesnotstartwith:n(function(n,t){return n+".lastIndexOf("+t+", 0) == -1"}),endswith:n(function(n,t){var i=t?t.length-2:0;return n+".indexOf("+t+", "+n+".length - "+i+") >= 0"}),doesnotendwith:n(function(n,t){var i=t?t.length-2:0;return n+".indexOf("+t+", "+n+".length - "+i+") < 0"}),contains:n(function(n,t){return n+".indexOf("+t+") >= 0"}),doesnotcontain:n(function(n,t){return n+".indexOf("+t+") == -1"}),matches:n(function(n,t){return t=t.substring(1,t.length-1),r(t)+".test("+n+")"}),doesnotmatch:n(function(n,t){return t=t.substring(1,t.length-1),"!"+r(t)+".test("+n+")"}),isempty:function(n){return n+" === ''"},isnotempty:function(n){return n+" !== ''"},isnull:function(n){return"("+n+" == null)"},isnotnull:function(n){return"("+n+" != null)"}}}(),u.filterExpr=function(n){for(var r,f,c,s,a=[],y={and:" && ",or:" || "},o=[],e=[],v=n.filters,h=0,l=v.length;h<l;h++)r=v[h],c=r.field,s=r.operator,r.filters?(f=u.filterExpr(r),r=f.expression.replace(/__o\[(\d+)\]/g,function(n,t){return t=+t,"__o["+(e.length+t)+"]"}).replace(/__f\[(\d+)\]/g,function(n,t){return t=+t,"__f["+(o.length+t)+"]"}),e.push.apply(e,f.operators),o.push.apply(o,f.fields)):(typeof c===vi?(f="__f["+o.length+"](d)",o.push(c)):f=i.expr(c),typeof s===vi?(r="__o["+e.length+"]("+f+", "+ni.quote(r.value)+")",e.push(s)):r=ni[(s||"eq").toLowerCase()](f,r.value,r.ignoreCase===t||r.ignoreCase)),a.push(r);return{expression:"("+a.join(y[n.logic])+")",fields:o,operators:e}},gr={"==":"eq",equals:"eq",isequalto:"eq",equalto:"eq",equal:"eq","!=":"neq",ne:"neq",notequals:"neq",isnotequalto:"neq",notequalto:"neq",notequal:"neq","<":"lt",islessthan:"lt",lessthan:"lt",less:"lt","<=":"lte",le:"lte",islessthanorequalto:"lte",lessthanequal:"lte",">":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain",isnull:"isnull",isempty:"isempty",isnotempty:"isnotempty"},u.normalizeFilter=ut,u.compareFilters=br,u.prototype={toArray:function(){return this.data},range:function(n,t){return new u(this.data.slice(n,n+t))},skip:function(n){return new u(this.data.slice(n))},take:function(n){return new u(this.data.slice(0,n))},select:function(n){return new u(li(this.data,n))},order:function(n,t){var i={dir:t};return n&&(n.compare?i.compare=n.compare:i.field=n),new u(this.data.slice(0).sort(lt.create(i)))},orderBy:function(n){return this.order(n,"asc")},orderByDescending:function(n){return this.order(n,"desc")},sort:function(n,t,i){var r,e,u=et(n,t),f=[];if(i=i||lt,u.length){for(r=0,e=u.length;r<e;r++)f.push(i.create(u[r]));return this.orderBy({compare:i.combine(f)})}return this},filter:function(n){var i,o,c,t,l,f,r,e,s=this.data,h=[];if(n=ut(n),!n||0===n.filters.length)return this;for(t=u.filterExpr(n),f=t.fields,r=t.operators,l=e=Function("d, __f, __o","return "+t.expression),(f.length||r.length)&&(e=function(n){return l(n,f,r)}),i=0,c=s.length;i<c;i++)o=s[i],e(o)&&h.push(o);return new u(h)},group:function(n,t){n=ot(n||[]),t=t||this.data;var r,f=this,i=new u(f.data);return n.length>0&&(r=n[0],i=i.groupBy(r).select(function(i){var f=new u(t).filter([{field:i.field,operator:"eq",value:i.value,ignoreCase:!1}]);return{field:i.field,value:i.value,items:n.length>1?new u(i.items).group(n.slice(1),f.toArray()).toArray():i.items,hasSubgroups:n.length>1,aggregates:f.aggregate(r.aggregates)}})),i},groupBy:function(n){if(w(n)||!this.data.length)return new u([]);for(var h,s,t=n.field,o=this._sortForGrouping(t,n.dir||"asc"),l=i.accessor(t),r=l.get(o[0],t),e={field:t,value:r,items:[]},c=[e],f=0,a=o.length;f<a;f++)h=o[f],s=l.get(h,t),cu(r,s)||(r=s,e={field:t,value:r,items:[]},c.push(e)),e.items.push(h);return new u(c)},_sortForGrouping:function(n,t){var i,f,r=this.data;if(!eu){for(i=0,f=r.length;i<f;i++)r[i].__position=i;for(r=new u(r).sort(n,t,yr).toArray(),i=0,f=r.length;i<f;i++)delete r[i].__position;return r}return this.sort(n,t).toArray()},aggregate:function(n){var t,i,r={},u={};if(n&&n.length)for(t=0,i=this.data.length;t<i;t++)fu(r,n,this.data[t],t,i,u);return r}},wi={sum:function(n,t,i){var r=i.get(t);return y(n)?y(r)&&(n+=r):n=r,n},count:function(n){return(n||0)+1},average:function(n,i,r,u,f,e){var o=r.get(i);return e.count===t&&(e.count=0),y(n)?y(o)&&(n+=o):n=o,y(o)&&e.count++,u==f-1&&y(n)&&(n/=e.count),n},max:function(n,t,i){var r=i.get(t);return y(n)||kt(n)||(n=r),n<r&&(y(r)||kt(r))&&(n=r),n},min:function(n,t,i){var r=i.get(t);return y(n)||kt(n)||(n=r),n>r&&(y(r)||kt(r))&&(n=r),n}},u.process=function(n,i){i=i||{};var h,r=new u(n),f=i.group,c=ot(f||[]).concat(et(i.sort||[])),l=i.filterCallback,e=i.filter,o=i.skip,s=i.take;return e&&(r=r.filter(e),l&&(r=l(r)),h=r.toArray().length),c&&(r=r.sort(c),f&&(n=r.toArray())),o!==t&&s!==t&&(r=r.range(o,s)),f&&(r=r.group(f,n)),{total:h,data:r.toArray()}},ei=yt.extend({init:function(n){this.data=n.data},read:function(n){n.success(this.data)},update:function(n){n.success(n.data)},create:function(n){n.success(n.data)},destroy:function(n){n.success(n.data)}}),ti=yt.extend({init:function(n){var i,t=this;n=t.options=o({},t.options,n),ui(du,function(t,i){typeof n[i]===s&&(n[i]={url:n[i]})}),t.cache=n.cache?rt.create(n.cache):{find:g,add:g},i=n.parameterMap,a(n.push)&&(t.push=n.push),t.push||(t.push=st),t.parameterMap=a(i)?i:function(n){var t={};return ui(n,function(n,r){n in i&&(n=i[n],b(n)&&(r=n.value(r),n=n.key)),t[n]=r}),t}},options:{parameterMap:st},create:function(n){return fi(this.setup(n,pi))},read:function(i){var u,o,r,f=this,e=f.cache;i=f.setup(i,di),u=i.success||g,o=i.error||g,r=e.find(i.data),r!==t?u(r):(i.success=function(n){e.add(i.data,n),u(n)},n.ajax(i))},update:function(n){return fi(this.setup(n,ki))},destroy:function(n){return fi(this.setup(n,bi))},setup:function(n,t){n=n||{};var r,u=this,i=u.options[t],f=a(i.data)?i.data(n.data):i.data;return n=o(!0,{},i,n),r=o(!0,{},f,n.data),n.data=u.parameterMap(r,t),a(n.url)&&(n.url=n.url(r)),n}}),rt=yt.extend({init:function(){this._store={}},add:function(n,i){n!==t&&(this._store[pt(n)]=i)},find:function(n){return this._store[pt(n)]},clear:function(){this._store={}},remove:function(n){delete this._store[pt(n)]}}),rt.create=function(n){var t={inmemory:function(){return new rt}};return b(n)&&a(n.find)?n:n===!0?new rt:t[n]()},ii=yt.extend({init:function(n){var l,h,i,w,c,k,y,f,e,a,u,o,r,t=this;n=n||{};for(l in n)h=n[l],t[l]=typeof h===s?wt(h):h;w=n.modelBase||v,b(t.model)&&(t.model=i=w.define(t.model)),c=p(t.data,t),t._dataAccessFunction=c,t.model&&(k=p(t.groups,t),y=p(t.serialize,t),f={},e={},a={},u={},o=!1,i=t.model,i.fields&&(ui(i.fields,function(n,t){var i;r=n,b(t)&&t.field?r=t.field:typeof t===s&&(r=t),b(t)&&t.from&&(i=t.from),o=o||i&&i!==n||r!==n,e[n]=wt(i||r),a[n]=wt(n),f[i||r]=n,u[n]=i||r}),!n.serialize&&o&&(t.serialize=ci(y,i,bu,a,f,u))),t._dataAccessFunction=c,t.data=ci(c,i,cr,e,f,u),t.groups=ci(k,i,hr,e,f,u))},errors:function(n){return n?n.errors:null},parse:st,data:st,total:function(n){return n.length},groups:st,aggregates:function(){return{}},serialize:function(n){return n}}),h=d.extend({init:function(n){var s,e,f,u=this;n&&(e=n.data),n=u.options=o({},u.options,n),u._map={},u._prefetch={},u._data=[],u._pristineData=[],u._ranges=[],u._view=[],u._pristineTotal=0,u._destroyed=[],u._pageSize=n.pageSize,u._page=n.page||(n.pageSize?1:t),u._sort=et(n.sort),u._filter=ut(n.filter),u._group=ot(n.group),u._aggregate=n.aggregate,u._total=n.total,u._shouldDetachObservableParents=!0,d.fn.init.call(u),u.transport=yi.create(n,e,u),a(u.transport.push)&&u.transport.push({pushCreate:p(u._pushCreate,u),pushUpdate:p(u._pushUpdate,u),pushDestroy:p(u._pushDestroy,u)}),null!=n.offlineStorage&&("string"==typeof n.offlineStorage?(f=n.offlineStorage,u._storage={getItem:function(){return JSON.parse(localStorage.getItem(f))},setItem:function(n){localStorage.setItem(f,pt(u.reader.serialize(n)))}}):u._storage=n.offlineStorage),u.reader=new i.data.readers[n.schema.type||"json"](n.schema),s=u.reader.model||{},u._detachObservableParents(),u._data=u._observe(u._data),u._online=!0,u.bind(["push",nt,r,tt,gi,it,ct],n)},options:{data:null,schema:{modelBase:v},offlineStorage:null,serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,batch:!1},clone:function(){return this},online:function(i){return i!==t?this._online!=i&&(this._online=i,i)?this.sync():n.Deferred().resolve().promise():this._online},offlineData:function(n){return null==this.options.offlineStorage?null:n!==t?this._storage.setItem(n):this._storage.getItem()||[]},_isServerGrouped:function(){var n=this.group()||[];return this.options.serverGrouping&&n.length},_pushCreate:function(n){this._push(n,"pushCreate")},_pushUpdate:function(n){this._push(n,"pushUpdate")},_pushDestroy:function(n){this._push(n,"pushDestroy")},_push:function(n,t){var i=this._readData(n);i||(i=n),this[t](i)},_flatData:function(n,t){if(n){if(this._isServerGrouped())return si(n);if(!t)for(var i=0;i<n.length;i++)n.at(i)}return n},parent:g,get:function(n){for(var i=this._flatData(this._data),t=0,r=i.length;t<r;t++)if(i[t].id==n)return i[t]},getByUid:function(n){var t,r,i=this._flatData(this._data);if(i)for(t=0,r=i.length;t<r;t++)if(i[t].uid==n)return i[t]},indexOf:function(n){return ir(this._data,n)},at:function(n){return this._data.at(n)},data:function(n){var r,i=this;if(n===t){if(i._data)for(r=0;r<i._data.length;r++)i._data.at(r);return i._data}i._detachObservableParents(),i._data=this._observe(n),i._pristineData=n.slice(0),i._storeData(),i._ranges=[],i.trigger("reset"),i._addRange(i._data),i._total=i._data.length,i._pristineTotal=i._total,i._process(i._data)},view:function(n){return n===t?this._view:(this._view=this._observeView(n),t)},_observeView:function(n){var i,t=this;return lr(n,t._data,t._ranges,t.reader.model||e,t._isServerGrouped()),i=new ft(n,t.reader.model),i.parent=function(){return t.parent()},i},flatView:function(){var n=this.group()||[];return n.length?si(this._view):this._view},add:function(n){return this.insert(this._data.length,n)},_createNewModel:function(n){return this.reader.model?new this.reader.model(n):n instanceof e?n:new e(n)},insert:function(n,t){return t||(t=n,n=0),t instanceof v||(t=this._createNewModel(t)),this._isServerGrouped()?this._data.splice(n,0,this._wrapInEmptyGroup(t)):this._data.splice(n,0,t),t},pushInsert:function(n,t){var u,e,i,o,f,r;t||(t=n,n=0),c(t)||(t=[t]),u=[],e=this.options.autoSync,this.options.autoSync=!1;try{for(i=0;i<t.length;i++)o=t[i],f=this.insert(n,o),u.push(f),r=f.toJSON(),this._isServerGrouped()&&(r=this._wrapInEmptyGroup(r)),this._pristineData.push(r),n++}finally{this.options.autoSync=e}u.length&&this.trigger("push",{type:"create",items:u})},pushCreate:function(n){this.pushInsert(this._data.length,n)},pushUpdate:function(n){var f,u,i,e,t;for(c(n)||(n=[n]),f=[],u=0;u<n.length;u++)i=n[u],e=this._createNewModel(i),t=this.get(e.id),t?(f.push(t),t.accept(i),t.trigger(r),this._updatePristineForModel(t,i)):this.pushCreate(i);f.length&&this.trigger("push",{type:"update",items:f})},pushDestroy:function(n){var t=this._removeItems(n);t.length&&this.trigger("push",{type:"destroy",items:t})},_removeItems:function(n){var r,f,t,e,i,u;c(n)||(n=[n]),r=[],f=this.options.autoSync,this.options.autoSync=!1;try{for(t=0;t<n.length;t++)e=n[t],i=this._createNewModel(e),u=!1,this._eachItem(this._data,function(n){for(var f,t=0;t<n.length;t++)if(f=n.at(t),f.id===i.id){r.push(f),n.splice(t,1),u=!0;break}}),u&&(this._removePristineForModel(i),this._destroyed.pop())}finally{this.options.autoSync=f}return r},remove:function(n){var t,i=this,r=i._isServerGrouped();return this._eachItem(i._data,function(u){if(t=ur(u,n),t&&r)return t.isNew&&t.isNew()||i._destroyed.push(t),!0}),this._removeModelFromRanges(n),this._updateRangesLength(),n},destroyed:function(){return this._destroyed},created:function(){for(var r=[],t=this._flatData(this._data),n=0,i=t.length;n<i;n++)t[n].isNew&&t[n].isNew()&&r.push(t[n]);return r},updated:function(){for(var r=[],t=this._flatData(this._data),n=0,i=t.length;n<i;n++)t[n].isNew&&!t[n].isNew()&&t[n].dirty&&r.push(t[n]);return r},sync:function(){var i,t=this,f=[],u=[],e=t._destroyed,r=n.Deferred().resolve().promise();if(t.online()){if(!t.reader.model)return r;f=t.created(),u=t.updated(),i=[],t.options.batch&&t.transport.submit?i=t._sendSubmit(f,u,e):(i.push.apply(i,t._send("create",f)),i.push.apply(i,t._send("update",u)),i.push.apply(i,t._send("destroy",e))),r=n.when.apply(null,i).then(function(){for(var n=0,i=arguments.length;n<i;n++)arguments[n]&&t._accept(arguments[n]);t._storeData(!0),t._change({action:"sync"}),t.trigger(gi)})}else t._storeData(!0),t._change({action:"sync"});return r},cancelChanges:function(n){var t=this;n instanceof i.data.Model?t._cancelModel(n):(t._destroyed=[],t._detachObservableParents(),t._data=t._observe(t._pristineData),t.options.serverPaging&&(t._total=t._pristineTotal),t._ranges=[],t._addRange(t._data),t._change(),t._markOfflineUpdatesAsDirty())},_markOfflineUpdatesAsDirty:function(){var n=this;null!=n.options.offlineStorage&&n._eachItem(n._data,function(n){for(var t,i=0;i<n.length;i++)t=n.at(i),"update"!=t.__state__&&"create"!=t.__state__||(t.dirty=!0)})},hasChanges:function(){var n,i,t=this._flatData(this._data);if(this._destroyed.length)return!0;for(n=0,i=t.length;n<i;n++)if(t[n].isNew&&t[n].isNew()||t[n].dirty)return!0;return!1},_accept:function(t){var o,u=this,f=t.models,i=t.response,r=0,s=u._isServerGrouped(),h=u._pristineData,e=t.type;if(u.trigger(it,{response:i,type:e}),i&&!w(i)){if(i=u.reader.parse(i),u._handleCustomErrors(i))return;i=u.reader.data(i),c(i)||(i=[i])}else i=n.map(f,function(n){return n.toJSON()});for("destroy"===e&&(u._destroyed=[]),r=0,o=f.length;r<o;r++)"destroy"!==e?(f[r].accept(i[r]),"create"===e?h.push(s?u._wrapInEmptyGroup(f[r]):i[r]):"update"===e&&u._updatePristineForModel(f[r],i[r])):u._removePristineForModel(f[r])},_updatePristineForModel:function(n,t){this._executeOnPristineForModel(n,function(n,r){i.deepExtend(r[n],t)})},_executeOnPristineForModel:function(n,t){this._eachPristineItem(function(i){var r=rr(i,n);if(r>-1)return t(r,i),!0})},_removePristineForModel:function(n){this._executeOnPristineForModel(n,function(n,t){t.splice(n,1)})},_readData:function(n){var t=this._isServerGrouped()?this.reader.groups:this.reader.data;return t.call(this.reader,n)},_eachPristineItem:function(n){this._eachItem(this._pristineData,n)},_eachItem:function(n,t){n&&n.length&&(this._isServerGrouped()?vr(n,t):t(n))},_pristineForModel:function(n){var i,t,r=function(r){if(t=rr(r,n),t>-1)return i=r[t],!0};return this._eachPristineItem(r),i},_cancelModel:function(n){var t=this._pristineForModel(n);this._eachItem(this._data,function(i){var r=ir(i,n);r>=0&&(!t||n.isNew()&&!t.__state__?i.splice(r,1):(i[r].accept(t),"update"==t.__state__&&(i[r].dirty=!0)))})},_submit:function(t,i){var r=this;r.trigger(tt,{type:"submit"}),r.trigger(ct),r.transport.submit(o({success:function(i,r){var u=n.grep(t,function(n){return n.type==r})[0];u&&u.resolve({response:i,models:u.models,type:r})},error:function(n,i,u){for(var f=0;f<t.length;f++)t[f].reject(n);r.error(n,i,u)}},i))},_sendSubmit:function(t,i,r){var f=this,u=[];return f.options.batch&&(t.length&&u.push(n.Deferred(function(n){n.type="create",n.models=t})),i.length&&u.push(n.Deferred(function(n){n.type="update",n.models=i})),r.length&&u.push(n.Deferred(function(n){n.type="destroy",n.models=r})),f._submit(u,{data:{created:f.reader.serialize(bt(t)),updated:f.reader.serialize(bt(i)),destroyed:f.reader.serialize(bt(r))}})),u},_promise:function(t,i,r){var u=this;return n.Deferred(function(n){u.trigger(tt,{type:r}),u.trigger(ct),u.transport[r].call(u.transport,o({success:function(t){n.resolve({response:t,models:i,type:r})},error:function(t,i,r){n.reject(t),u.error(t,i,r)}},t))}).promise()},_send:function(n,t){var i,e,r=this,u=[],f=r.reader.serialize(bt(t));if(r.options.batch)t.length&&u.push(r._promise({data:{models:f}},t,n));else for(i=0,e=t.length;i<e;i++)u.push(r._promise({data:f[i]},[t[i]],n));return u},read:function(t){var i=this,u=i._params(t),r=n.Deferred();return i._queueRequest(u,function(){var n=i.trigger(tt,{type:"read"});n?(i._dequeueRequest(),r.resolve(n)):(i.trigger(ct),i._ranges=[],i.trigger("reset"),i.online()?i.transport.read({data:u,success:function(n){i._ranges=[],i.success(n,u),r.resolve()},error:function(){var n=ht.call(arguments);i.error.apply(i,n),r.reject.apply(r,n)}}):null!=i.options.offlineStorage&&(i.success(i.offlineData(),u),r.resolve()))}),r.promise()},_readAggregates:function(n){return this.reader.aggregates(n)},success:function(n){var e,h,o,s,r,f,u,c,i=this,l=i.options;if(i.trigger(it,{response:n,type:"read"}),i.online()){if(n=i.reader.parse(n),i._handleCustomErrors(n))return i._dequeueRequest(),t;i._total=i.reader.total(n),i._aggregate&&l.serverAggregates&&(i._aggregateResult=i._readAggregates(n)),n=i._readData(n),i._destroyed=[]}else{for(n=i._readData(n),e=[],h={},o=i.reader.model,s=o?o.idField:"id",r=0;r<this._destroyed.length;r++)f=this._destroyed[r][s],h[f]=f;for(r=0;r<n.length;r++)u=n[r],c=u.__state__,"destroy"==c?h[u[s]]||this._destroyed.push(this._createNewModel(u)):e.push(u);n=e,i._total=n.length}i._pristineTotal=i._total,i._pristineData=n.slice(0),i._detachObservableParents(),i._data=i._observe(n),i._markOfflineUpdatesAsDirty(),i._storeData(),i._addRange(i._data),i._process(i._data),i._dequeueRequest()},_detachObservableParents:function(){if(this._data&&this._shouldDetachObservableParents)for(var n=0;n<this._data.length;n++)this._data[n].parent&&(this._data[n].parent=g)},_storeData:function(n){function f(n){for(var t,i,u=[],r=0;r<n.length;r++)t=n.at(r),i=t.toJSON(),o&&t.items?i.items=f(t.items):(i.uid=t.uid,e&&(t.isNew()?i.__state__="create":t.dirty&&(i.__state__="update"))),u.push(i);return u}var u,r,t,i,o=this._isServerGrouped(),e=this.reader.model;if(null!=this.options.offlineStorage){for(u=f(this._data),r=[],t=0;t<this._destroyed.length;t++)i=this._destroyed[t].toJSON(),i.__state__="destroy",r.push(i);this.offlineData(u.concat(r)),n&&(this._pristineData=this._readData(u))}},_addRange:function(n){var t=this,i=t._skip||0,r=i+t._flatData(n,!0).length;t._ranges.push({start:i,end:r,data:n,timestamp:+new Date}),t._ranges.sort(function(n,t){return n.start-t.start})},error:function(n,t,i){this._dequeueRequest(),this.trigger(it,{}),this.trigger(nt,{xhr:n,status:t,errorThrown:i})},_params:function(n){var i=this,t=o({take:i.take(),skip:i.skip(),page:i.page(),pageSize:i.pageSize(),sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate},n);return i.options.serverPaging||(delete t.take,delete t.skip,delete t.page,delete t.pageSize),i.options.serverGrouping?i.reader.model&&t.group&&(t.group=at(t.group,i.reader.model)):delete t.group,i.options.serverFiltering?i.reader.model&&t.filter&&(t.filter=fr(t.filter,i.reader.model)):delete t.filter,i.options.serverSorting?i.reader.model&&t.sort&&(t.sort=at(t.sort,i.reader.model)):delete t.sort,i.options.serverAggregates?i.reader.model&&t.aggregate&&(t.aggregate=at(t.aggregate,i.reader.model)):delete t.aggregate,t},_queueRequest:function(n,i){var r=this;r._requestInProgress?r._pending={callback:p(i,r),options:n}:(r._requestInProgress=!0,r._pending=t,i())},_dequeueRequest:function(){var n=this;n._requestInProgress=!1,n._pending&&n._queueRequest(n._pending.options,n._pending.callback)},_handleCustomErrors:function(n){if(this.reader.errors){var t=this.reader.errors(n);if(t)return this.trigger(nt,{xhr:null,status:"customerror",errorThrown:"custom error",errors:t}),!0}return!1},_shouldWrap:function(n){var t=this.reader.model;return!(!t||!n.length)&&!(n[0]instanceof t)},_observe:function(n){var i,t=this,u=t.reader.model;return t._shouldDetachObservableParents=!0,n instanceof l?(t._shouldDetachObservableParents=!1,t._shouldWrap(n)&&(n.type=t.reader.model,n.wrapAll(n,n))):(i=t.pageSize()&&!t.options.serverPaging?ft:l,n=new i(n,t.reader.model),n.parent=function(){return t.parent()}),t._isServerGrouped()&&sr(n,u),t._changeHandler&&t._data&&t._data instanceof l?t._data.unbind(r,t._changeHandler):t._changeHandler=p(t._change,t),n.bind(r,t._changeHandler)},_updateTotalForAction:function(n,t){var i=this,r=parseInt(i._total,10);y(i._total)||(r=parseInt(i._pristineTotal,10)),"add"===n?r+=t.length:"remove"===n?r-=t.length:"itemchange"===n||"sync"===n||i.options.serverPaging?"sync"===n&&(r=i._pristineTotal=parseInt(i._total,10)):r=i._pristineTotal,i._total=r},_change:function(n){var r,f,u,t=this,i=n?n.action:"";if("remove"===i)for(r=0,f=n.items.length;r<f;r++)n.items[r].isNew&&n.items[r].isNew()||t._destroyed.push(n.items[r]);!t.options.autoSync||"add"!==i&&"remove"!==i&&"itemchange"!==i?(t._updateTotalForAction(i,n?n.items:[]),t._process(t._data,n)):(u=function(r){"sync"===r.action&&(t.unbind("change",u),t._updateTotalForAction(i,n.items))},t.first("change",u),t.sync())},_calculateAggregates:function(n,t){t=t||{};var i=new u(n),f=t.aggregate,r=t.filter;return r&&(i=i.filter(r)),i.aggregate(f)},_process:function(n,i){var e,u=this,f={};u.options.serverPaging!==!0&&(f.skip=u._skip,f.take=u._take||u._pageSize,f.skip===t&&u._page!==t&&u._pageSize!==t&&(f.skip=(u._page-1)*u._pageSize)),u.options.serverSorting!==!0&&(f.sort=u._sort),u.options.serverFiltering!==!0&&(f.filter=u._filter),u.options.serverGrouping!==!0&&(f.group=u._group),u.options.serverAggregates!==!0&&(f.aggregate=u._aggregate,u._aggregateResult=u._calculateAggregates(n,f)),e=u._queryProcess(n,f),u.view(e.data),e.total===t||u.options.serverFiltering||(u._total=e.total),i=i||{},i.items=i.items||u._view,u.trigger(r,i)},_queryProcess:function(n,t){return u.process(n,t)},_mergeState:function(n){var i=this;return n!==t&&(i._pageSize=n.pageSize,i._page=n.page,i._sort=n.sort,i._filter=n.filter,i._group=n.group,i._aggregate=n.aggregate,i._skip=i._currentRangeStart=n.skip,i._take=n.take,i._skip===t&&(i._skip=i._currentRangeStart=i.skip(),n.skip=i.skip()),i._take===t&&i._pageSize!==t&&(i._take=i._pageSize,n.take=i._take),n.sort&&(i._sort=n.sort=et(n.sort)),n.filter&&(i._filter=n.filter=ut(n.filter)),n.group&&(i._group=n.group=ot(n.group)),n.aggregate&&(i._aggregate=n.aggregate=su(n.aggregate))),n},query:function(i){var u,f,e=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates;return e||(this._data===t||0===this._data.length)&&!this._destroyed.length?this.read(this._mergeState(i)):(f=this.trigger(tt,{type:"read"}),f||(this.trigger(ct),u=this._queryProcess(this._data,this._mergeState(i)),this.options.serverFiltering||(this._total=u.total!==t?u.total:this._data.length),this._aggregateResult=this._calculateAggregates(this._data,i),this.view(u.data),this.trigger(it,{type:"read"}),this.trigger(r,{items:u.data})),n.Deferred().resolve(f).promise())},fetch:function(n){var i=this,t=function(t){t!==!0&&a(n)&&n.call(i)};return this._query().then(t)},_query:function(n){var t=this;return t.query(o({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate()},n))},next:function(n){var t=this,i=t.page(),r=t.total();if(n=n||{},i&&!(r&&i+1>t.totalPages()))return t._skip=t._currentRangeStart=i*t.take(),i+=1,n.page=i,t._query(n),i},prev:function(n){var t=this,i=t.page();if(n=n||{},i&&1!==i)return t._skip=t._currentRangeStart=t._skip-t.take(),i-=1,n.page=i,t._query(n),i},page:function(n){var r,i=this;return n!==t?(n=f.max(f.min(f.max(n,1),i.totalPages()),1),i._query({page:n}),t):(r=i.skip(),r!==t?f.round((r||0)/(i.take()||1))+1:t)},pageSize:function(n){var i=this;return n!==t?(i._query({pageSize:n,page:1}),t):i.take()},sort:function(n){var i=this;return n!==t?(i._query({sort:n}),t):i._sort},filter:function(n){var i=this;return n===t?i._filter:(i.trigger("reset"),i._query({filter:n,page:1}),t)},group:function(n){var i=this;return n!==t?(i._query({group:n}),t):i._group},total:function(){return parseInt(this._total||0,10)},aggregate:function(n){var i=this;return n!==t?(i._query({aggregate:n}),t):i._aggregate},aggregates:function(){var n=this._aggregateResult;return w(n)&&(n=this._emptyAggregates(this.aggregate())),n},_emptyAggregates:function(n){var i,t,r={};if(!w(n))for(i={},c(n)||(n=[n]),t=0;t<n.length;t++)i[n[t].aggregate]=0,r[n[t].field]=i;return r},_wrapInEmptyGroup:function(n){for(var t,r,u=this.group(),i=u.length-1,f=0;i>=f;i--)r=u[i],t={value:n.get(r.field),field:r.field,items:t?[t]:[n],hasSubgroups:!!t,aggregates:this._emptyAggregates(r.aggregates)};return t},totalPages:function(){var n=this,t=n.pageSize()||n.total();return f.ceil((n.total()||0)/t)},inRange:function(n,t){var i=this,r=f.min(n+t,i.total());return!i.options.serverPaging&&i._data.length>0||i._findRange(n,r).length>0},lastRange:function(){var n=this._ranges;return n[n.length-1]||{start:0,end:0,data:[]}},firstItemUid:function(){var n=this._ranges;return n.length&&n[0].data.length&&n[0].data[0].uid},enableRequestsInProgress:function(){this._skipRequestsInProgress=!1},_timeStamp:function(){return+new Date},range:function(n,i){var r,e,u,o,s,l,c,h;if(this._currentRequestTimeStamp=this._timeStamp(),this._skipRequestsInProgress=!0,n=f.min(n||0,this.total()),r=this,e=f.max(f.floor(n/i),0)*i,u=f.min(e+i,r.total()),o=r._findRange(n,f.min(n+i,r.total())),o.length){r._pending=t,r._skip=n>r.skip()?f.min(u,(r.totalPages()-1)*r.take()):e,r._currentRangeStart=n,r._take=i,s=r.options.serverPaging,l=r.options.serverSorting,c=r.options.serverFiltering,h=r.options.serverAggregates;try{r.options.serverPaging=!0,r._isServerGrouped()||r.group()&&r.group().length||(r.options.serverSorting=!0),r.options.serverFiltering=!0,r.options.serverPaging=!0,r.options.serverAggregates=!0,s&&(r._detachObservableParents(),r._data=o=r._observe(o)),r._process(o)}finally{r.options.serverPaging=s,r.options.serverSorting=l,r.options.serverFiltering=c,r.options.serverAggregates=h}}else i!==t&&(r._rangeExists(e,u)?e<n&&r.prefetch(u,i,function(){r.range(n,i)}):r.prefetch(e,i,function(){n>e&&u<r.total()&&!r._rangeExists(u,f.min(u+i,r.total()))?r.prefetch(u,i,function(){r.range(n,i)}):r.range(n,i)}))},_findRange:function(n,i){for(var r,c,l,a,w,v,s,h,f,k,u=this,y=u._ranges,p=[],o=u.options,d=o.serverSorting||o.serverPaging||o.serverFiltering||o.serverGrouping||o.serverAggregates,e=0,b=y.length;e<b;e++)if(r=y[e],n>=r.start&&n<=r.end){for(f=0,c=e;c<b;c++)if(r=y[c],h=u._flatData(r.data,!0),h.length&&n+f>=r.start&&(w=r.data,v=r.end,d||(k=ot(u.group()||[]).concat(et(u.sort()||[])),s=u._queryProcess(r.data,{sort:k,filter:u.filter()}),h=w=s.data,s.total!==t&&(v=s.total)),l=0,n+f>r.start&&(l=n+f-r.start),a=h.length,v>i&&(a-=v-i),f+=a-l,p=u._mergeGroups(p,w,l,a),i<=r.end&&f==i-n))return p;break}return[]},_mergeGroups:function(n,t,i,r){if(this._isServerGrouped()){var f,u=t.toJSON();return n.length&&(f=n[n.length-1]),hi(f,u,i,r),n.concat(u)}return n.concat(t.slice(i,r))},skip:function(){var n=this;return n._skip===t?n._page!==t?(n._page-1)*(n.take()||1):t:n._skip},currentRangeStart:function(){return this._currentRangeStart||0},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(n,t,i,u){var f=this,e=f._timeStamp();return function(o){var h,l,c,a=!1,s={start:n,end:t,data:[],timestamp:f._timeStamp()};if(f._dequeueRequest(),f.trigger(it,{response:o,type:"read"}),o=f.reader.parse(o),c=f._readData(o),c.length){for(h=0,l=f._ranges.length;h<l;h++)if(f._ranges[h].start===n){a=!0,s=f._ranges[h];break}a||f._ranges.push(s)}s.data=f._observe(c),s.end=s.start+f._flatData(s.data,!0).length,f._ranges.sort(function(n,t){return n.start-t.start}),f._total=f.reader.total(o),(u||e>=f._currentRequestTimeStamp||!f._skipRequestsInProgress)&&(i&&c.length?i():f.trigger(r,{}))}},prefetch:function(n,t,i){var r=this,e=f.min(n+t,r.total()),u={take:t,skip:n,page:n/t+1,pageSize:t,sort:r._sort,filter:r._filter,group:r._group,aggregate:r._aggregate};r._rangeExists(n,e)?i&&i():(clearTimeout(r._timeout),r._timeout=setTimeout(function(){r._queueRequest(u,function(){r.trigger(tt,{type:"read"})?r._dequeueRequest():r.transport.read({data:r._params(u),success:r._prefetchSuccessHandler(n,e,i),error:function(){var n=ht.call(arguments);r.error.apply(r,n)}})})},100))},_multiplePrefetch:function(n,t,i){var r=this,u=f.min(n+t,r.total()),e={take:t,skip:n,page:n/t+1,pageSize:t,sort:r._sort,filter:r._filter,group:r._group,aggregate:r._aggregate};r._rangeExists(n,u)?i&&i():r.trigger(tt,{type:"read"})||r.transport.read({data:r._params(e),success:r._prefetchSuccessHandler(n,u,i,!0)})},_rangeExists:function(n,t){for(var f=this,r=f._ranges,i=0,u=r.length;i<u;i++)if(r[i].start<=n&&r[i].end>=t)return!0;return!1},_removeModelFromRanges:function(n){for(var u,f,r,t=0,i=this._ranges.length;t<i&&(r=this._ranges[t],this._eachItem(r.data,function(t){u=ur(t,n),u&&(f=!0)}),!f);t++);},_updateRangesLength:function(){for(var n,i,r=0,t=0,u=this._ranges.length;t<u;t++)n=this._ranges[t],n.start=n.start-r,i=this._flatData(n.data,!0).length,r=n.end-i,n.end=n.start+i}}),yi={},yi.create=function(t,r,u){var e,f=t.transport?n.extend({},t.transport):null;return f?(f.read=typeof f.read===s?{url:f.read}:f.read,"jsdo"===t.type&&(f.dataSource=u),t.type&&(i.data.transports=i.data.transports||{},i.data.schemas=i.data.schemas||{},i.data.transports[t.type]?b(i.data.transports[t.type])?f=o(!0,{},i.data.transports[t.type],f):e=new i.data.transports[t.type](o(f,{data:r})):i.logToConsole("Unknown DataSource transport type '"+t.type+"'.\nVerify that registration scripts for this type are included after Kendo UI on the page.","warn"),t.schema=o(!0,{},i.data.schemas[t.type],t.schema)),e||(e=a(f.read)?f:new ti(f))):e=new ei({data:t.data||[]}),e},h.create=function(n){(c(n)||n instanceof l)&&(n={data:n});var e,p,s,r=n||{},f=r.data,u=r.fields,v=r.table,a=r.select,y={};if(f||!u||r.transport||(v?f=yu(v,u):a&&(f=pu(a,u),r.group===t&&f[0]&&f[0].optgroup!==t&&(r.group="optgroup"))),i.data.Model&&u&&(!r.schema||!r.schema.model)){for(e=0,p=u.length;e<p;e++)s=u[e],s.type&&(y[s.field]=s);w(y)||(r.schema=o(!0,r.schema,{model:{fields:y}}))}return r.data=f,a=null,r.select=null,v=null,r.table=null,r instanceof h?r:new h(r)},ri=v.define({idField:"id",init:function(n){var t=this,r=t.hasChildren||n&&n.hasChildren,f="items",u={};i.data.Model.fn.init.call(t,n),typeof t.children===s&&(f=t.children),u={schema:{data:f,model:{hasChildren:r,id:t.idField,fields:t.fields}}},typeof t.children!==s&&o(u,t.children),u.data=n,r||(r=u.schema.data),typeof r===s&&(r=i.getter(r)),a(r)&&(t.hasChildren=!!r.call(t,t)),t._childrenOptions=u,t.hasChildren&&t._initChildren(),t._loaded=!(!n||!n._loaded)},_initChildren:function(){var t,i,u,n=this;n.children instanceof k||(t=n.children=new k(n._childrenOptions),i=t.transport,u=i.parameterMap,i.parameterMap=function(t,i){return t[n.idField||"id"]=n.id,u&&(t=u(t,i)),t},t.parent=function(){return n},t.bind(r,function(t){t.node=t.node||n,n.trigger(r,t)}),t.bind(nt,function(t){var i=n.parent();i&&(t.node=t.node||n,i.trigger(nt,t))}),n._updateChildrenField())},append:function(n){this._initChildren(),this.loaded(!0),this.children.add(n)},hasChildren:!1,level:function(){for(var n=this.parentNode(),t=0;n&&n.parentNode;)t++,n=n.parentNode?n.parentNode():null;return t},_updateChildrenField:function(){var n=this._childrenOptions.schema.data;this[n||"items"]=this.children.data()},_childrenLoaded:function(){this._loaded=!0,this._updateChildrenField()},load:function(){var i,e,u={},f="_query";return this.hasChildren?(this._initChildren(),i=this.children,u[this.idField||"id"]=this.id,this._loaded||(i._data=t,f="read"),i.one(r,p(this._childrenLoaded,this)),this._matchFilter&&(u.filter={field:"_matchFilter",operator:"eq",value:!0}),e=i[f](u)):this.loaded(!0),e||n.Deferred().resolve().promise()},parentNode:function(){var n=this.parent();return n.parent()},loaded:function(n){return n===t?this._loaded:(this._loaded=n,t)},shouldSerialize:function(n){return v.fn.shouldSerialize.call(this,n)&&"children"!==n&&"_loaded"!==n&&"hasChildren"!==n&&"_childrenOptions"!==n}}),k=h.extend({init:function(n){var t=ri.define({children:n});n.filter&&(this._hierarchicalFilter=n.filter,n.filter=null),h.fn.init.call(this,o(!0,{},{schema:{modelBase:t,model:t}},n)),this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var n=this;n._data.bind(nt,function(t){n.trigger(nt,t)})},read:function(n){var t=h.fn.read.call(this,n);return this._hierarchicalFilter&&this.filter(this._hierarchicalFilter),t},remove:function(n){var r,t=n.parentNode(),i=this;return t&&t._initChildren&&(i=t.children),r=h.fn.remove.call(i,n),t&&!i.data().length&&(t.hasChildren=!1),r},success:nu("success"),data:nu("data"),insert:function(n,t){var i=this.parent();return i&&i._initChildren&&(i.hasChildren=!0,i._initChildren()),h.fn.insert.call(this,n,t)},filter:function(n){return n===t?this._filter:(this.options.serverFiltering||(this._markHierarchicalQuery(n),n={logic:"or",filters:[n,{field:"_matchFilter",operator:"equals",value:!0}]}),this.trigger("reset"),this._query({filter:n,page:1}),t)},_markHierarchicalQuery:function(n){var i,o,f,r,e;return n=ut(n),n&&0!==n.filters.length?(i=u.filterExpr(n),f=i.fields,r=i.operators,o=e=Function("d, __f, __o","return "+i.expression),(f.length||r.length)&&(e=function(n){return o(n,f,r)}),this._updateHierarchicalFilter(e),t):this},_updateHierarchicalFilter:function(n){for(var t,u=this._data,r=!1,i=0;i<u.length;i++)t=u[i],t.hasChildren?(t._matchFilter=t.children._updateHierarchicalFilter(n),t._matchFilter||(t._matchFilter=n(t))):t._matchFilter=n(t),t._matchFilter&&(r=!0);return r},_find:function(n,t){var u,e,i,f,r=this._data;if(r){if(i=h.fn[n].call(this,t))return i;for(r=this._flatData(this._data),u=0,e=r.length;u<e;u++)if(f=r[u].children,f instanceof k&&(i=f[n](t)))return i}},get:function(n){return this._find("get",n)},getByUid:function(n){return this._find("getByUid",n)}}),k.create=function(n){n=n&&n.push?{data:n}:n;var t=n||{},i=t.data,u=t.fields,r=t.list;return i&&i._dataSource?i._dataSource:(i||!u||t.transport||r&&(i=tu(r,u)),t.data=i,t instanceof k?t:new k(t))},gt=i.Observable.extend({init:function(n,t,r){i.Observable.fn.init.call(this),this._prefetching=!1,this.dataSource=n,this.prefetch=!r;var u=this;n.bind("change",function(){u._change()}),n.bind("reset",function(){u._reset()}),this._syncWithDataSource(),this.setViewSize(t)},setViewSize:function(n){this.viewSize=n,this._recalculate()},at:function(n){var i=this.pageSize,r=!0;return n>=this.total()?(this.trigger("endreached",{index:n}),null):this.useRanges?this.useRanges?((n<this.dataOffset||n>=this.skip+i)&&(r=this.range(Math.floor(n/i)*i)),n===this.prefetchThreshold&&this._prefetch(),n===this.midPageThreshold?this.range(this.nextMidRange,!0):n===this.nextPageThreshold?this.range(this.nextFullRange):n===this.pullBackThreshold&&this.range(this.offset===this.skip?this.previousMidRange:this.previousFullRange),r?this.dataSource.at(n-this.dataOffset):(this.trigger("endreached",{index:n}),null)):t:this.dataSource.view()[n]},indexOf:function(n){return this.dataSource.data().indexOf(n)+this.dataOffset},total:function(){return parseInt(this.dataSource.total(),10)},next:function(){var t=this,n=t.pageSize,i=t.skip-t.viewSize+n,r=f.max(f.floor(i/n),0)*n;this.offset=i,this.dataSource.prefetch(r,n,function(){t._goToRange(i,!0)})},range:function(n,t){if(this.offset===n)return!0;var r=this,i=this.pageSize,e=f.max(f.floor(n/i),0)*i,u=this.dataSource;return t&&(e+=i),u.inRange(n,i)?(this.offset=n,this._recalculate(),this._goToRange(n),!0):!this.prefetch||(u.prefetch(e,i,function(){r.offset=n,r._recalculate(),r._goToRange(n,!0)}),!1)},syncDataSource:function(){var n=this.offset;this.offset=null,this.range(n)},destroy:function(){this.unbind()},_prefetch:function(){var r=this,n=this.pageSize,t=this.skip+n,i=this.dataSource;i.inRange(t,n)||this._prefetching||!this.prefetch||(this._prefetching=!0,this.trigger("prefetching",{skip:t,take:n}),i.prefetch(t,n,function(){r._prefetching=!1,r.trigger("prefetched",{skip:t,take:n})}))},_goToRange:function(n,t){this.offset===n&&(this.dataOffset=n,this._expanding=t,this.dataSource.range(n,this.pageSize),this.dataSource.enableRequestsInProgress())},_reset:function(){this._syncPending=!0},_change:function(){var n=this.dataSource;this.length=this.useRanges?n.lastRange().end:n.view().length,this._syncPending&&(this._syncWithDataSource(),this._recalculate(),this._syncPending=!1,this.trigger("reset",{offset:this.offset})),this.trigger("resize"),this._expanding&&this.trigger("expand"),delete this._expanding},_syncWithDataSource:function(){var n=this.dataSource;this._firstItemUid=n.firstItemUid(),this.dataOffset=this.offset=n.skip()||0,this.pageSize=n.pageSize(),this.useRanges=n.options.serverPaging},_recalculate:function(){var t=this.pageSize,r=this.offset,i=this.viewSize,n=Math.ceil(r/t)*t;this.skip=n,this.midPageThreshold=n+t-1,this.nextPageThreshold=n+i-1,this.prefetchThreshold=n+Math.floor(t/3*2),this.pullBackThreshold=this.offset-1,this.nextMidRange=n+t-i,this.nextFullRange=n,this.previousMidRange=r-i,this.previousFullRange=n-t}}),wr=i.Observable.extend({init:function(n,t){var r=this;i.Observable.fn.init.call(r),this.dataSource=n,this.batchSize=t,this._total=0,this.buffer=new gt(n,3*t),this.buffer.bind({endreached:function(n){r.trigger("endreached",{index:n.index})},prefetching:function(n){r.trigger("prefetching",{skip:n.skip,take:n.take})},prefetched:function(n){r.trigger("prefetched",{skip:n.skip,take:n.take})},reset:function(){r._total=0,r.trigger("reset")},resize:function(){r._total=Math.ceil(this.length/r.batchSize),r.trigger("resize",{total:r.total(),offset:this.offset})}})},syncDataSource:function(){this.buffer.syncDataSource()},at:function(n){var r,i,t=this.buffer,f=n*this.batchSize,e=this.batchSize,u=[];for(t.offset>f&&t.at(t.offset-1),i=0;i<e&&(r=t.at(f+i),null!==r);i++)u.push(r);return u},total:function(){return this._total},destroy:function(){this.buffer.destroy(),this.unbind()}}),o(!0,i.data,{readers:{json:ii},Query:u,DataSource:h,HierarchicalDataSource:k,Node:ri,ObservableObject:e,ObservableArray:l,LazyObservableArray:ft,LocalTransport:ei,RemoteTransport:ti,Cache:rt,DataReader:ii,Model:v,Buffer:gt,BatchBuffer:wr})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.binder.min",["kendo.core.min","kendo.data.min"],n)}(function(){return function(n,t){function b(t,u,f){return r.extend({init:function(n,t,i){var u=this;r.fn.init.call(u,n.element[0],t,i),u.widget=n,u._dataBinding=c(u.dataBinding,u),u._dataBound=c(u.dataBound,u),u._itemChange=c(u.itemChange,u)},itemChange:function(n){v(n.item[0],n.data,this._ns(n.ns),[n.data].concat(this.bindings[t]._parents()))},dataBinding:function(n){for(var u=this.widget,i=n.removedItems||u.items(),t=0,r=i.length;t<r;t++)p(i[t],!1)},_ns:function(t){t=t||i.ui;var r=[i.ui,i.dataviz.ui,i.mobile.ui];return r.splice(n.inArray(t,r),1),r.unshift(t),i.rolesFromNamespaces(r)},dataBound:function(n){var r,h,f,c,l=this.widget,e=n.addedItems||l.items(),o=l[u],s=i.data.HierarchicalDataSource;if(!(s&&o instanceof s)&&e.length)for(f=n.addedDataItems||o.flatView(),c=this.bindings[t]._parents(),r=0,h=f.length;r<h;r++)v(e[r],f[r],this._ns(n.ns),[f[r]].concat(c))},refresh:function(n){var o,s,h,e=this,r=e.widget;n=n||{},n.action||(e.destroy(),r.bind("dataBinding",e._dataBinding),r.bind("dataBound",e._dataBound),r.bind("itemChange",e._itemChange),o=e.bindings[t].get(),r[u]instanceof i.data.DataSource&&r[u]!=o&&(o instanceof i.data.DataSource?r[f](o):o&&o._dataSource?r[f](o._dataSource):(r[u].data(o),s=i.ui.Select&&r instanceof i.ui.Select,h=i.ui.MultiSelect&&r instanceof i.ui.MultiSelect,e.bindings.value&&(s||h)&&r.value(at(e.bindings.value.get(),r.options.dataValueField)))))},destroy:function(){var n=this.widget;n.unbind("dataBinding",this._dataBinding),n.unbind("dataBound",this._dataBound),n.unbind("itemChange",this._itemChange)}})}function bt(n,t){var r=i.initWidget(n,{},t);if(r)return new w(r)}function ht(n){for(var i,f,s,t,e={},u=n.match(et),r=0,o=u.length;r<o;r++)i=u[r],f=i.indexOf(":"),s=i.substring(0,f),t=i.substring(f+1),"{"==t.charAt(0)&&(t=ht(t)),e[s]=t;return e}function y(n,t,i){var r,u={};for(r in n)u[r]=new i(t,n[r]);return u}function v(n,t,r,u){var h,o,c,a,w=n.getAttribute("data-"+i.ns+"role"),e=n.getAttribute("data-"+i.ns+"bind"),p=[],b=!0,l={};if(u=u||[t],(w||e)&&nt(n,!1),w&&(c=bt(n,r)),e&&(e=ht(e.replace(ct,"")),c||(l=i.parseOptions(n,{textField:"",valueField:"",template:"",valueUpdate:f,valuePrimitive:!1,autoBind:!0}),l.roles=r,c=new g(n,l)),c.source=t,o=y(e,u,s),l.template&&(o.template=new lt(u,"",l.template)),o.click&&(e.events=e.events||{},e.events.click=e.click,o.click.destroy(),delete o.click),o.source&&(b=!1),e.attr&&(o.attr=y(e.attr,u,s)),e.style&&(o.style=y(e.style,u,s)),e.events&&(o.events=y(e.events,u,vt)),e.css&&(o.css=y(e.css,u,s)),c.bind(o)),c&&(n.kendoBindingTarget=c),a=n.children,b&&a){for(h=0;h<a.length;h++)p[h]=a[h];for(h=0;h<p.length;h++)v(p[h],t,r,u)}}function ot(t,r){var u,e,f,o=i.rolesFromNamespaces([].slice.call(arguments,2));for(r=i.observable(r),t=n(t),u=0,e=t.length;u<e;u++)f=t[u],1===f.nodeType&&v(f,r,o)}function nt(t,r){var u,f=t.kendoBindingTarget;f&&(f.destroy(),ft?delete t.kendoBindingTarget:t.removeAttribute?t.removeAttribute("kendoBindingTarget"):t.kendoBindingTarget=null),r&&(u=i.widgetInstance(n(t)),u&&typeof u.destroy===wt&&u.destroy())}function p(n,t){nt(n,t),rt(n,t)}function rt(n,t){var i,u,r=n.children;if(r)for(i=0,u=r.length;i<u;i++)p(r[i],t)}function pt(t){var i,r;for(t=n(t),i=0,r=t.length;i<r;i++)p(t[i],!1)}function kt(n,t){var r=n.element,i=r[0].kendoBindingTarget;i&&ot(r,i.source,t)}function at(n,t){var u,i,f=[],r=0;if(!t)return n;if(n instanceof e){for(u=n.length;r<u;r++)i=n[r],f[r]=i.get?i.get(t):i[t];n=f}else n instanceof o&&(n=n.get(t));return n}var s,vt,lt,r,a,d,g,w,et,ct,i=window.kendo,k=i.Observable,o=i.data.ObservableObject,e=i.data.ObservableArray,yt={}.toString,u={},it=i.Class,c=n.proxy,h="value",tt="source",ut="events",l="checked",st="css",ft=!0,wt="function",f="change";!function(){var n=document.createElement("a");try{delete n.test}catch(t){ft=!1}}(),s=k.extend({init:function(n,t){var i=this;k.fn.init.call(i),i.source=n[0],i.parents=n,i.path=t,i.dependencies={},i.dependencies[t]=!0,i.observable=i.source instanceof k,i._access=function(n){i.dependencies[n.field]=!0},i.observable&&(i._change=function(n){i.change(n)},i.source.bind(f,i._change))},_parents:function(){var r,t=this.parents,i=this.get();return i&&"function"==typeof i.parent&&(r=i.parent(),n.inArray(r,t)<0&&(t=[r].concat(t))),t},change:function(n){var r,i,u=n.field,t=this;if("this"===t.path)t.trigger(f,n);else for(r in t.dependencies)if(0===r.indexOf(u)&&(i=r.charAt(u.length),!i||"."===i||"["===i)){t.trigger(f,n);break}},start:function(n){n.bind("get",this._access)},stop:function(n){n.unbind("get",this._access)},get:function(){var i=this,n=i.source,e=0,u=i.path,r=n;if(!i.observable)return r;for(i.start(i.source),r=n.get(u);r===t&&n;)n=i.parents[++e],n instanceof o&&(r=n.get(u));if(r===t)for(n=i.source;r===t&&n;)n=n.parent(),n instanceof o&&(r=n.get(u));return"function"==typeof r&&(e=u.lastIndexOf("."),e>0&&(n=n.get(u.substring(0,e))),i.start(n),r=n!==i.source?r.call(n,i.source):r.call(n),i.stop(n)),n&&n!==i.source&&(i.currentSource=n,n.unbind(f,i._change).bind(f,i._change)),i.stop(i.source),r},set:function(n){var t=this.currentSource||this.source,r=i.getter(this.path)(t);"function"==typeof r?t!==this.source?r.call(t,this.source,n):r.call(t,n):t.set(this.path,n)},destroy:function(){this.observable&&(this.source.unbind(f,this._change),this.currentSource&&this.currentSource.unbind(f,this._change)),this.unbind()}}),vt=s.extend({get:function(){for(var n=this.source,i=this.path,r=0,t=n.get(i);!t&&n;)n=this.parents[++r],n instanceof o&&(t=n.get(i));return c(t,n)}}),lt=s.extend({init:function(n,t,i){var r=this;s.fn.init.call(r,n,t),r.template=i},render:function(n){var t;return this.start(this.source),t=i.render(this.template,n),this.stop(this.source),t}}),r=it.extend({init:function(n,t,i){this.element=n,this.bindings=t,this.options=i},bind:function(n,t){var i=this;n=t?n[t]:n,n.bind(f,function(n){i.refresh(t||n)}),i.refresh(t)},destroy:function(){}}),a=r.extend({dataType:function(){var n=this.element.getAttribute("data-type")||this.element.type||"text";return n.toLowerCase()},parsedValue:function(){return this._parseValue(this.element.value,this.dataType())},_parseValue:function(n,t){return"date"==t?n=i.parseDate(n,"yyyy-MM-dd"):"datetime-local"==t?n=i.parseDate(n,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==t?n=i.parseFloat(n):"boolean"==t&&(n=n.toLowerCase(),n=null!==i.parseFloat(n)?!!i.parseFloat(n):"true"===n.toLowerCase()),n}}),u.attr=r.extend({refresh:function(n){this.element.setAttribute(n,this.bindings.attr[n].get())}}),u.css=r.extend({init:function(n,t,i){r.fn.init.call(this,n,t,i),this.classes={}},refresh:function(t){var i=n(this.element),u=this.bindings.css[t],r=this.classes[t]=u.get();r?i.addClass(t):i.removeClass(t)}}),u.style=r.extend({refresh:function(n){this.element.style[n]=this.bindings.style[n].get()||""}}),u.enabled=r.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),u.readonly=r.extend({refresh:function(){this.bindings.readonly.get()?this.element.setAttribute("readonly","readonly"):this.element.removeAttribute("readonly")}}),u.disabled=r.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),u.events=r.extend({init:function(n,t,i){r.fn.init.call(this,n,t,i),this.handlers={}},refresh:function(t){var r=n(this.element),u=this.bindings.events[t],i=this.handlers[t];i&&r.off(t,i),i=this.handlers[t]=u.get(),r.on(t,u.source,i)},destroy:function(){var t,i=n(this.element);for(t in this.handlers)i.off(t,this.handlers[t])}}),u.text=r.extend({refresh:function(){var t=this.bindings.text.get(),r=this.element.getAttribute("data-format")||"";null==t&&(t=""),n(this.element).text(i.toString(t,r))}}),u.visible=r.extend({refresh:function(){this.element.style.display=this.bindings.visible.get()?"":"none"}}),u.invisible=r.extend({refresh:function(){this.element.style.display=this.bindings.invisible.get()?"none":""}}),u.html=r.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),u.value=a.extend({init:function(t,i,r){a.fn.init.call(this,t,i,r),this._change=c(this.change,this),this.eventName=r.valueUpdate||f,n(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=f,this.bindings[h].set(this.parsedValue()),this._initChange=!1},refresh:function(){var n,t;this._initChange||(n=this.bindings[h].get(),null==n&&(n=""),t=this.dataType(),"date"==t?n=i.toString(n,"yyyy-MM-dd"):"datetime-local"==t&&(n=i.toString(n,"yyyy-MM-ddTHH:mm:ss")),this.element.value=n),this._initChange=!1},destroy:function(){n(this.element).off(this.eventName,this._change)}}),u.source=r.extend({init:function(n,t,u){r.fn.init.call(this,n,t,u);var f=this.bindings.source.get();f instanceof i.data.DataSource&&u.autoBind!==!1&&f.fetch()},refresh:function(n){var t=this,r=t.bindings.source.get();r instanceof e||r instanceof i.data.DataSource?(n=n||{},"add"==n.action?t.add(n.index,n.items):"remove"==n.action?t.remove(n.index,n.items):"itemchange"!=n.action&&t.render()):t.render()},container:function(){var n=this.element;return"table"==n.nodeName.toLowerCase()&&(n.tBodies[0]||n.appendChild(document.createElement("tbody")),n=n.tBodies[0]),n},template:function(){var n=this.options,t=n.template,r=this.container().nodeName.toLowerCase();return t||(t="select"==r?n.valueField||n.textField?i.format('<option value="#:{0}#">#:{1}#</option>',n.valueField||n.textField,n.textField||n.valueField):"<option>#:data#</option>":"tbody"==r?"<tr><td>#:data#</td></tr>":"ul"==r||"ol"==r?"<li>#:data#</li>":"#:data#",t=i.template(t)),t},add:function(t,r){var s,u,h,f,e=this.container(),o=e.cloneNode(!1),c=e.children[t];if(n(o).html(i.render(this.template(),r)),o.children.length)for(s=this.bindings.source._parents(),u=0,h=r.length;u<h;u++)f=o.children[0],e.insertBefore(f,c||null),v(f,r[u],this.options.roles,[r[u]].concat(s))},remove:function(n,t){for(var i,r=this.container(),u=0;u<t.length;u++)i=r.children[n],p(i,!0),i.parentNode==r&&r.removeChild(i)},render:function(){var f,r,o,t=this.bindings.source.get(),u=this.container(),s=this.template();if(null!=t)if(t instanceof i.data.DataSource&&(t=t.view()),t instanceof e||"[object Array]"===yt.call(t)||(t=[t]),this.bindings.template){if(rt(u,!0),n(u).html(this.bindings.template.render(t)),u.children.length)for(f=this.bindings.source._parents(),r=0,o=t.length;r<o;r++)v(u.children[r],t[r],this.options.roles,[t[r]].concat(f))}else n(u).html(i.render(s,t))}}),u.input={checked:a.extend({init:function(t,i,r){a.fn.init.call(this,t,i,r),this._change=c(this.change,this),n(this.element).change(this._change)},change:function(){var t,r,i,u=this.element,n=this.value();if("radio"==u.type)n=this.parsedValue(),this.bindings[l].set(n);else if("checkbox"==u.type)if(t=this.bindings[l].get(),t instanceof e){if(n=this.parsedValue(),n instanceof Date){for(i=0;i<t.length;i++)if(t[i]instanceof Date&&+t[i]==+n){r=i;break}}else r=t.indexOf(n);r>-1?t.splice(r,1):t.push(n)}else this.bindings[l].set(n)},refresh:function(){var f,u,n=this.bindings[l].get(),t=n,o=this.dataType(),r=this.element;if("checkbox"==r.type)if(t instanceof e){if(f=-1,n=this.parsedValue(),n instanceof Date){for(u=0;u<t.length;u++)if(t[u]instanceof Date&&+t[u]==+n){f=u;break}}else f=t.indexOf(n);r.checked=f>=0}else r.checked=t;else"radio"==r.type&&null!=n&&("date"==o?n=i.toString(n,"yyyy-MM-dd"):"datetime-local"==o&&(n=i.toString(n,"yyyy-MM-ddTHH:mm:ss")),r.checked=r.value===""+n)},value:function(){var n=this.element,t=n.value;return"checkbox"==n.type&&(t=n.checked),t},destroy:function(){n(this.element).off(f,this._change)}})},u.select={source:u.source.extend({refresh:function(r){var f,u=this,o=u.bindings.source.get();o instanceof e||o instanceof i.data.DataSource?(r=r||{},"add"==r.action?u.add(r.index,r.items):"remove"==r.action?u.remove(r.index,r.items):"itemchange"!=r.action&&r.action!==t||(u.render(),u.bindings.value&&u.bindings.value&&(f=at(u.bindings.value.get(),n(u.element).data("valueField")),null===f?u.element.selectedIndex=-1:u.element.value=f))):u.render()}}),value:a.extend({init:function(t,i,r){a.fn.init.call(this,t,i,r),this._change=c(this.change,this),n(this.element).change(this._change)},parsedValue:function(){for(var t,n,f=this.dataType(),r=[],i=0,u=this.element.options.length;i<u;i++)n=this.element.options[i],n.selected&&(t=n.attributes.value,t=t&&t.specified?n.value:n.text,r.push(this._parseValue(t,f)));return r},change:function(){for(var f,s,l,n,y,w,u=[],v=this.element,c=this.options.valueField||this.options.textField,p=this.options.valuePrimitive,r=0,a=v.options.length;r<a;r++)s=v.options[r],s.selected&&(n=s.attributes.value,n=n&&n.specified?s.value:s.text,u.push(c?n:this._parseValue(n,this.dataType())));if(c)for(f=this.bindings.source.get(),f instanceof i.data.DataSource&&(f=f.view()),l=0;l<u.length;l++)for(r=0,a=f.length;r<a;r++)if(y=f[r].get(c),w=y+""===u[l]){u[l]=f[r];break}n=this.bindings[h].get(),n instanceof e?n.splice.apply(n,[0,n.length].concat(u)):this.bindings[h].set(p||!(n instanceof o||null===n||n===t)&&c?u[0].get(c):u[0])},refresh:function(){var t,s,r,a=this.element,f=a.options,n=this.bindings[h].get(),u=n,l=this.options.valueField||this.options.textField,v=!1,c=this.dataType();for(u instanceof e||(u=new e([n])),a.selectedIndex=-1,r=0;r<u.length;r++)for(n=u[r],l&&n instanceof o&&(n=n.get(l)),"date"==c?n=i.toString(u[r],"yyyy-MM-dd"):"datetime-local"==c&&(n=i.toString(u[r],"yyyy-MM-ddTHH:mm:ss")),t=0;t<f.length;t++)s=f[t].value,""===s&&""!==n&&(s=f[t].text),null!=n&&s==""+n&&(f[t].selected=!0,v=!0)},destroy:function(){n(this.element).off(f,this._change)}})},u.widget={events:r.extend({init:function(n,t,i){r.fn.init.call(this,n.element[0],t,i),this.widget=n,this.handlers={}},refresh:function(n){var i=this.bindings.events[n],t=this.handlers[n];t&&this.widget.unbind(n,t),t=i.get(),this.handlers[n]=function(n){n.data=i.source,t(n),n.data===i.source&&delete n.data},this.widget.bind(n,this.handlers[n])},destroy:function(){var n;for(n in this.handlers)this.widget.unbind(n,this.handlers[n])}}),checked:r.extend({init:function(n,t,i){r.fn.init.call(this,n.element[0],t,i),this.widget=n,this._change=c(this.change,this),this.widget.bind(f,this._change)},change:function(){this.bindings[l].set(this.value())},refresh:function(){this.widget.check(this.bindings[l].get()===!0)},value:function(){var t=this.element,n=t.value;return"on"!=n&&"off"!=n||(n=t.checked),n},destroy:function(){this.widget.unbind(f,this._change)}}),visible:r.extend({init:function(n,t,i){r.fn.init.call(this,n.element[0],t,i),this.widget=n},refresh:function(){var n=this.bindings.visible.get();this.widget.wrapper[0].style.display=n?"":"none"}}),invisible:r.extend({init:function(n,t,i){r.fn.init.call(this,n.element[0],t,i),this.widget=n},refresh:function(){var n=this.bindings.invisible.get();this.widget.wrapper[0].style.display=n?"none":""}}),enabled:r.extend({init:function(n,t,i){r.fn.init.call(this,n.element[0],t,i),this.widget=n},refresh:function(){this.widget.enable&&this.widget.enable(this.bindings.enabled.get())}}),disabled:r.extend({init:function(n,t,i){r.fn.init.call(this,n.element[0],t,i),this.widget=n},refresh:function(){this.widget.enable&&this.widget.enable(!this.bindings.disabled.get())}}),source:b("source","dataSource","setDataSource"),value:r.extend({init:function(t,i,u){r.fn.init.call(this,t.element[0],i,u),this.widget=t,this._change=n.proxy(this.change,this),this.widget.first(f,this._change);var s=this.bindings.value.get();this._valueIsObservableObject=!u.valuePrimitive&&(null==s||s instanceof o),this._valueIsObservableArray=s instanceof e,this._initChange=!1},_source:function(){var n;return this.widget.dataItem&&(n=this.widget.dataItem(),n&&n instanceof o)?[n]:(this.bindings.source&&(n=this.bindings.source.get()),(!n||n instanceof i.data.DataSource)&&(n=this.widget.dataSource.flatView()),n)},change:function(){var i,c,r,f,e,h,s,n=this.widget.value(),u=this.options.dataValueField||this.options.dataTextField,l="[object Array]"===yt.call(n),o=this._valueIsObservableObject,t=[];if(this._initChange=!0,u)if(""===n&&(o||this.options.valuePrimitive))n=null;else{for(s=this._source(),l&&(c=n.length,t=n.slice(0)),e=0,h=s.length;e<h;e++)if(r=s[e],f=r.get(u),l){for(i=0;i<c;i++)if(f==t[i]){t[i]=r;break}}else if(f==n){n=o?r:f;break}t[0]&&(n=this._valueIsObservableArray?t:o||!u?t[0]:t[0].get(u))}this.bindings.value.set(n),this._initChange=!1},refresh:function(){var i,r,h,s,n,u,f,l,c;if(!this._initChange){if(i=this.widget,r=i.options,h=r.dataTextField,s=r.dataValueField||h,n=this.bindings.value.get(),u=r.text||"",f=0,c=[],n===t&&(n=null),s)if(n instanceof e){for(l=n.length;f<l;f++)c[f]=n[f].get(s);n=c}else n instanceof o&&(u=n.get(h),n=n.get(s));r.autoBind!==!1||r.cascadeFrom||!i.listView||i.listView.bound()?i.value(n):(h!==s||u||(u=n),u||!n&&0!==n||!r.valuePrimitive?i._preselect(n,u):i.value(n))}this._initChange=!1},destroy:function(){this.widget.unbind(f,this._change)}}),gantt:{dependencies:b("dependencies","dependencies","setDependenciesDataSource")},multiselect:{value:r.extend({init:function(t,i,u){r.fn.init.call(this,t.element[0],i,u),this.widget=t,this._change=n.proxy(this.change,this),this.widget.first(f,this._change),this._initChange=!1},change:function(){var c,a,s,f,r,l,p,o,v,u=this,i=u.bindings[h].get(),w=u.options.valuePrimitive,n=w?u.widget.value():u.widget.dataItems(),y=this.options.dataValueField||this.options.dataTextField;if(n=n.slice(0),u._initChange=!0,i instanceof e){for(c=[],a=n.length,s=0,f=0,r=i[s],l=!1;r!==t;){for(v=!1,f=0;f<a;f++)if(w?l=n[f]==r:(o=n[f],o=o.get?o.get(y):o,l=o==(r.get?r.get(y):r)),l){n.splice(f,1),a-=1,v=!0;break}v?s+=1:(c.push(r),d(i,s,1),p=s),r=i[s]}d(i,i.length,0,n),c.length&&i.trigger("change",{action:"remove",items:c,index:p}),n.length&&i.trigger("change",{action:"add",items:n,index:i.length-1})}else u.bindings[h].set(n);u._initChange=!1},refresh:function(){if(!this._initChange){var c,u,r=this.options,s=this.widget,f=r.dataValueField||r.dataTextField,n=this.bindings.value.get(),l=n,i=0,h=[];if(n===t&&(n=null),f)if(n instanceof e){for(c=n.length;i<c;i++)u=n[i],h[i]=u.get?u.get(f):u;n=h}else n instanceof o&&(n=n.get(f));r.autoBind!==!1||r.valuePrimitive===!0||s._isBound()?s.value(n):s._preselect(l,n)}},destroy:function(){this.widget.unbind(f,this._change)}})},scheduler:{source:b("source","dataSource","setDataSource").extend({dataBound:function(n){var t,f,i,e,r=this.widget,u=n.addedItems||r.items();if(u.length)for(i=n.addedDataItems||r.dataItems(),e=this.bindings.source._parents(),t=0,f=i.length;t<f;t++)v(u[t],i[t],this._ns(n.ns),[i[t]].concat(e))}})}},d=function(n,t,i,r){var e,s,o,u,f;if(r=r||[],i=i||0,e=r.length,s=n.length,o=[].slice.call(n,t+i),u=o.length,e){for(e=t+e,f=0;t<e;t++)n[t]=r[f],f++;n.length=e}else if(i)for(n.length=t,i+=t;t<i;)delete n[--i];if(u){for(u=t+u,f=0;t<u;t++)n[t]=o[f],f++;n.length=u}for(t=n.length;t<s;)delete n[t],t++},g=it.extend({init:function(n,t){this.target=n,this.options=t,this.toDestroy=[]},bind:function(n){var t,o,e,f,s,u,r=this instanceof w,i=this.binders();for(t in n)t==h?o=!0:t==tt?e=!0:t!=ut||r?t==l?s=!0:t==st?u=!0:this.applyBinding(t,n,i):f=!0;e&&this.applyBinding(tt,n,i),o&&this.applyBinding(h,n,i),s&&this.applyBinding(l,n,i),f&&!r&&this.applyBinding(ut,n,i),u&&!r&&this.applyBinding(st,n,i)},binders:function(){return u[this.target.nodeName.toLowerCase()]||{}},applyBinding:function(n,t,i){var e,r=i[n]||u[n],o=this.toDestroy,f=t[n];if(r)if(r=new r(this.target,t,this.options),o.push(r),f instanceof s)r.bind(f),o.push(f);else for(e in f)r.bind(f,e),o.push(f[e]);else if("template"!==n)throw Error("The "+n+" binding is not supported by the "+this.target.nodeName.toLowerCase()+" element");},destroy:function(){for(var t=this.toDestroy,n=0,i=t.length;n<i;n++)t[n].destroy()}}),w=g.extend({binders:function(){return u.widget[this.target.options.name.toLowerCase()]||{}},applyBinding:function(n,t,i){var e,r=i[n]||u.widget[n],o=this.toDestroy,f=t[n];if(!r)throw Error("The "+n+" binding is not supported by the "+this.target.options.name+" widget");if(r=new r(this.target,t,this.target.options),o.push(r),f instanceof s)r.bind(f),o.push(f);else for(e in f)r.bind(f,e),o.push(f[e])}}),et=/[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g,ct=/\s/g,i.unbind=pt,i.bind=ot,i.data.binders=u,i.data.Binder=r,i.notify=kt,i.observable=function(n){return n instanceof o||(n=new o(n)),n},i.observableHierarchy=function(n){function r(n){for(var i,t=0;t<n.length;t++)n[t]._initChildren(),i=n[t].children,i.fetch(),n[t].items=i.data(),r(n[t].items)}var t=i.data.HierarchicalDataSource.create(n);return t.fetch(),r(t.data()),t._data._dataSource=t,t._data}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.fx.min",["kendo.core.min"],n)}(function(){return function(n,t){function ci(n){return parseInt(n,10)}function a(n,t){return ci(n.css(t))}function ki(n){var i,t=[];for(i in n)t.push(i);return t}function rt(n){for(var t in n)et.indexOf(t)!=-1&&g.indexOf(t)==-1&&delete n[t];return n}function at(n,t){var s,i,h,e,r=[],u={};for(i in t)s=i.toLowerCase(),e=f&&et.indexOf(s)!=-1,!w.hasHW3D&&e&&g.indexOf(s)==-1?delete t[i]:(h=t[i],e?r.push(i+"("+h+")"):u[i]=h);return r.length&&(u[o]=r.join(" ")),u}function fi(n,t){var u,i,r;return f?(u=n.css(o),u==nr?"scale"==t?1:0:(i=u.match(RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),r=0,i?r=ci(i[1]):(i=u.match(yi)||[0,0,0,0,0],t=t.toLowerCase(),pi.test(t)?r=parseFloat(i[3]/i[2]):"translatey"==t?r=parseFloat(i[4]/i[2]):"scale"==t?r=parseFloat(i[2]):"rotate"==t&&(r=parseFloat(Math.atan2(i[2],i[1])))),r)):parseFloat(n.css(t))}function st(n){return n.charAt(0).toUpperCase()+n.substring(1)}function e(n,t){var i=h.extend(t),u=i.prototype.directions;r[st(n)]=i,r.Element.prototype[n]=function(n,t,r,u){return new i(this.element,n,t,r,u)},l(u,function(t,u){r.Element.prototype[n+st(u)]=function(n,t,r){return new i(this.element,u,n,t,r)}})}function ni(n,i,r,u){e(n,{directions:gt,startValue:function(n){return this._startValue=n,this},endValue:function(n){return this._endValue=n,this},shouldHide:function(){return this._shouldHide},prepare:function(n,f){var s,o,c=this,h="out"===this._direction,e=c.element.data(i),l=!(isNaN(e)||e==r);s=l?e:t!==this._startValue?this._startValue:h?r:u,o=t!==this._endValue?this._endValue:h?u:r,this._reverse?(n[i]=o,f[i]=s):(n[i]=s,f[i]=o),c._shouldHide=f[i]===u}})}function ei(n,t){var u=i.directions[t].vertical,r=n[u?d:ut]()/2+"px";return pt[t].replace("$size",r)}var dt,ht,h,p,gt,bt,pt,wt,lt,oi,k,ct,i=window.kendo,r=i.effects,l=n.each,u=n.extend,wi=n.proxy,w=i.support,bi=w.browser,f=w.transforms,s=w.transitions,li={scale:0,scalex:0,scaley:0,scale3d:0},vi={translate:0,translatex:0,translatey:0,translate3d:0},ti=t!==document.documentElement.style.zoom&&!f,yi=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,hi=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,pi=/translatex?$/i,tr=/(zoom|fade|expand)(\w+)/,si=/(zoom|fade|expand)/,ir=/[xy]$/i,et=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],g=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],rr={rotate:"deg",scale:"",skew:"px",translate:"px"},nt=f.css,di=Math.round,gi="",b="px",nr="none",ft="auto",ut="width",d="height",yt="hidden",ot="origin",kt="abortId",it="overflow",y="translate",tt="position",ii="completeCallback",v=nt+"transition",o=nt+"transform",ai=nt+"backface-visibility",ri=nt+"perspective",vt="1500px",ui="perspective("+vt+")",c={left:{reverse:"right",property:"left",transition:"translatex",vertical:!1,modifier:-1},right:{reverse:"left",property:"left",transition:"translatex",vertical:!1,modifier:1},down:{reverse:"up",property:"top",transition:"translatey",vertical:!0,modifier:1},up:{reverse:"down",property:"top",transition:"translatey",vertical:!0,modifier:-1},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out",modifier:-1},out:{reverse:"in",modifier:1},vertical:{reverse:"vertical"},horizontal:{reverse:"horizontal"}};i.directions=c,u(n.fn,{kendoStop:function(n,t){return s?r.stopQueue(this,n||!1,t||!1):this.stop(n,t)}}),f&&!s&&(l(g,function(i,r){n.fn[r]=function(i){if(t===i)return fi(this,r);var u=n(this)[0],f=r+"("+i+rr[r.replace(ir,"")]+")";return u.style.cssText.indexOf(o)==-1?n(this).css(o,f):u.style.cssText=u.style.cssText.replace(RegExp(r+"\\(.*?\\)","i"),f),this},n.fx.step[r]=function(t){n(t.elem)[r](t.now)}}),dt=n.fx.prototype.cur,n.fx.prototype.cur=function(){return g.indexOf(this.prop)!=-1?parseFloat(n(this.elem)[this.prop]()):dt.apply(this,arguments)}),i.toggleClass=function(n,t,i,r){return t&&(t=t.split(" "),s&&(i=u({exclusive:"all",duration:400,ease:"ease-out"},i),n.css(v,i.exclusive+" "+i.duration+"ms "+i.ease),setTimeout(function(){n.css(v,"").css(d)},i.duration)),l(t,function(t,i){n.toggleClass(i,r)})),n},i.parseEffects=function(n,t){var i={};return"string"==typeof n?l(n.split(" "),function(n,r){var s=!si.test(r),o=r.replace(tr,function(n,t,i){return t+":"+i.toLowerCase()}),u=o.split(":"),f=u[1],e={};u.length>1&&(e.direction=t&&s?c[f].reverse:f),i[u[0]]=e}):l(n,function(n){var r=this.direction;r&&t&&!si.test(n)&&(this.direction=c[r].reverse),i[n]=this}),i},s&&u(r,{transition:function(t,i,r){var h,f,c,e,a=0,l=t.data("keys")||[];r=u({duration:200,ease:"ease-out",complete:null,exclusive:"all"},r),c=!1,e=function(){c||(c=!0,f&&(clearTimeout(f),f=null),t.removeData(kt).dequeue().css(v,"").css(v),r.complete.call(t))},r.duration=n.fx?n.fx.speeds[r.duration]||r.duration:r.duration,h=at(t,i),n.merge(l,ki(h)),t.data("keys",n.unique(l)).height(),t.css(v,r.exclusive+" "+r.duration+"ms "+r.ease).css(v),t.css(h).css(o),s.event&&(t.one(s.event,e),0!==r.duration&&(a=500)),f=setTimeout(e,r.duration+a),t.data(kt,f),t.data(ii,e)},stopQueue:function(n,t,r){var e,o=n.data("keys"),u=!r&&o,f=n.data(ii);return u&&(e=i.getComputedStyles(n[0],o)),f&&f(),u&&n.css(e),n.removeData("keys").stop(t)}}),ht=i.Class.extend({init:function(n,t){var i=this;i.element=n,i.effects=[],i.options=t,i.restore=[]},run:function(t){var l,c,y,b,w,g,k,a=this,d=t.length,h=a.element,e=a.options,p=n.Deferred(),i={},v={};for(a.effects=t,p.then(n.proxy(a,"complete")),h.data("animating",!0),c=0;c<d;c++)for(l=t[c],l.setReverse(e.reverse),l.setOptions(e),a.addRestoreProperties(l.restore),l.prepare(i,v),w=l.children(),y=0,g=w.length;y<g;y++)w[y].duration(e.duration).run();for(k in e.effects)u(v,e.effects[k].properties);for(h.is(":visible")||u(i,{display:h.data("olddisplay")||"block"}),f&&!e.reset&&(b=h.data("targetTransform"),b&&(i=u(b,i))),i=at(h,i),f&&!s&&(i=rt(i)),h.css(i).css(o),c=0;c<d;c++)t[c].setup();return e.init&&e.init(),h.data("targetTransform",v),r.animate(h,v,u({},e,{complete:p.resolve})),p.promise()},stop:function(){n(this.element).kendoStop(!0,!0)},addRestoreProperties:function(n){for(var t,r=this.element,i=0,u=n.length;i<u;i++)t=n[i],this.restore.push(t),r.data(t)||r.data(t,r.css(t))},restoreCallback:function(){for(var t,i=this.element,n=0,r=this.restore.length;n<r;n++)t=this.restore[n],i.css(t,i.data(t))},complete:function(){var r=this,u=0,t=r.element,i=r.options,e=r.effects,o=e.length;for(t.removeData("animating").dequeue(),i.hide&&t.data("olddisplay",t.css("display")).hide(),this.restoreCallback(),ti&&!f&&setTimeout(n.proxy(this,"restoreCallback"),0);u<o;u++)e[u].teardown();i.completeCallback&&i.completeCallback(t)}}),r.promise=function(n,t){var e,s,u,f=[],h=new ht(n,t),o=i.parseEffects(t.effects);t.effects=o;for(u in o)e=r[st(u)],e&&(s=new e(n,o[u].direction),f.push(s));f[0]?h.run(f):(n.is(":visible")||n.css({display:n.data("olddisplay")||"block"}).css("display"),t.init&&t.init(),n.dequeue(),h.complete())},u(r,{animate:function(i,e,o){var h=o.transition!==!1;delete o.transition,s&&"transition"in r&&h?r.transition(i,e,o):f?i.animate(rt(e),{queue:!1,show:!1,hide:!1,duration:o.duration,complete:o.complete}):i.each(function(){var i=n(this),r={};l(et,function(n,o){var v,s,w,b,h,c,l,p=e?e[o]+" ":null;p&&(s=e,o in li&&e[o]!==t?(v=p.match(hi),f&&u(s,{scale:+v[0]})):o in vi&&e[o]!==t&&(w=i.css(tt),b="absolute"==w||"fixed"==w,i.data(y)||(b?i.data(y,{top:a(i,"top")||0,left:a(i,"left")||0,bottom:a(i,"bottom"),right:a(i,"right")}):i.data(y,{top:a(i,"marginTop")||0,left:a(i,"marginLeft")||0})),h=i.data(y),v=p.match(hi),v&&(c=o==y+"y"?0:+v[1],l=o==y+"y"?+v[1]:+v[2],b?(isNaN(h.right)?isNaN(c)||u(s,{left:h.left+c}):isNaN(c)||u(s,{right:h.right-c}),isNaN(h.bottom)?isNaN(l)||u(s,{top:h.top+l}):isNaN(l)||u(s,{bottom:h.bottom-l})):(isNaN(c)||u(s,{marginLeft:h.left+c}),isNaN(l)||u(s,{marginTop:h.top+l})))),!f&&"scale"!=o&&o in s&&delete s[o],s&&u(r,s))}),bi.msie&&delete r.scale,i.animate(r,{queue:!1,show:!1,hide:!1,duration:o.duration,complete:o.complete})})}}),r.animatedPromise=r.promise,h=i.Class.extend({init:function(n,t){var i=this;i.element=n,i._direction=t,i.options={},i._additionalEffects=[],i.restore||(i.restore=[])},reverse:function(){return this._reverse=!0,this.run()},play:function(){return this._reverse=!1,this.run()},add:function(n){return this._additionalEffects.push(n),this},direction:function(n){return this._direction=n,this},duration:function(n){return this._duration=n,this},compositeRun:function(){var n=this,i=new ht(n.element,{reverse:n._reverse,duration:n._duration}),t=n._additionalEffects.concat([n]);return i.run(t)},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var c,v,h=this,t=h.element,e=0,p=h.restore,b=p.length,l=n.Deferred(),i={},a={},y=h.children(),w=y.length;for(l.then(n.proxy(h,"_complete")),t.data("animating",!0),e=0;e<b;e++)c=p[e],t.data(c)||t.data(c,t.css(c));for(e=0;e<w;e++)y[e].duration(h._duration).run();return h.prepare(i,a),t.is(":visible")||u(i,{display:t.data("olddisplay")||"block"}),f&&(v=t.data("targetTransform"),v&&(i=u(v,i))),i=at(t,i),f&&!s&&(i=rt(i)),t.css(i).css(o),h.setup(),t.data("targetTransform",a),r.animate(t,a,{duration:h._duration,complete:l.resolve}),l.promise()},stop:function(){for(var t=0,i=this.children(),r=i.length,t=0;t<r;t++)i[t].stop();return n(this.element).kendoStop(!0,!0),this},restoreCallback:function(){for(var t,i=this.element,n=0,r=this.restore.length;n<r;n++)t=this.restore[n],i.css(t,i.data(t))},_complete:function(){var t=this,i=t.element;i.removeData("animating").dequeue(),t.restoreCallback(),t.shouldHide()&&i.data("olddisplay",i.css("display")).hide(),ti&&!f&&setTimeout(n.proxy(t,"restoreCallback"),0),t.teardown()},setOptions:function(n){u(!0,this.options,n)},children:function(){return[]},shouldHide:n.noop,setup:n.noop,prepare:n.noop,teardown:n.noop,directions:[],setReverse:function(n){return this._reverse=n,this}}),p=["left","right","up","down"],gt=["in","out"],e("slideIn",{directions:p,divisor:function(n){return this.options.divisor=n,this},prepare:function(n,t){var s,u=this,h=u.element,l=i._outerWidth,a=i._outerHeight,r=c[u._direction],v=-r.modifier*(r.vertical?a(h):l(h)),e=v/(u.options&&u.options.divisor||1)+b,o="0px";u._reverse&&(s=n,n=t,t=s),f?(n[r.transition]=e,t[r.transition]=o):(n[r.property]=e,t[r.property]=o)}}),e("tile",{directions:p,init:function(n,t,i){h.prototype.init.call(this,n,t),this.options={previous:i}},previousDivisor:function(n){return this.options.previousDivisor=n,this},children:function(){var n=this,u=n._reverse,f=n.options.previous,e=n.options.previousDivisor||1,t=n._direction,r=[i.fx(n.element).slideIn(t).setReverse(u)];return f&&r.push(i.fx(f).slideIn(c[t].reverse).divisor(e).setReverse(!u)),r}}),ni("fade","opacity",1,0),ni("zoom","scale",1,.01),e("slideMargin",{prepare:function(n,t){var u,f=this,i=f.element,r=f.options,o=i.data(ot),s=r.offset,e=f._reverse;e||null!==o||i.data(ot,parseFloat(i.css("margin-"+r.axis))),u=i.data(ot)||0,t["margin-"+r.axis]=e?u:u+s}}),e("slideTo",{prepare:function(n,t){var u=this,e=u.element,o=u.options,i=o.offset.split(","),r=u._reverse;f?(t.translatex=r?0:i[0],t.translatey=r?0:i[1]):(t.left=r?0:i[0],t.top=r?0:i[1]),e.css("left")}}),e("expand",{directions:["horizontal","vertical"],restore:[it],prepare:function(n,i){var f=this,e=f.element,h=f.options,c=f._reverse,r="vertical"===f._direction?d:ut,l=e[0].style[r],o=e.data(r),u=parseFloat(o||l),s=di(e.css(r,ft)[r]());n.overflow=yt,u=h&&h.reset?s||u:u||s,i[r]=(c?0:u)+b,n[r]=(c?u:0)+b,o===t&&e.data(r,l)},shouldHide:function(){return this._reverse},teardown:function(){var i=this,r=i.element,n="vertical"===i._direction?d:ut,t=r.data(n);t!=ft&&t!==gi||setTimeout(function(){r.css(n,ft).css(n)},0)}}),bt={position:"absolute",marginLeft:0,marginTop:0,scale:1},e("transfer",{init:function(n,t){this.element=n,this.options={target:t},this.restore=[]},setup:function(){this.element.appendTo(document.body)},prepare:function(n,t){var e=this,f=e.element,i=r.box(f),c=r.box(e.options.target),l=fi(f,"scale"),s=r.fillScale(c,i),h=r.transformOrigin(c,i);u(n,bt),t.scale=1,f.css(o,"scale(1)").css(o),f.css(o,"scale("+l+")"),n.top=i.top,n.left=i.left,n.transformOrigin=h.x+b+" "+h.y+b,e._reverse?n.scale=s:t.scale=s}}),pt={top:"rect(auto auto $size auto)",bottom:"rect($size auto auto auto)",left:"rect(auto $size auto auto)",right:"rect(auto auto auto $size)"},wt={top:{start:"rotatex(0deg)",end:"rotatex(180deg)"},bottom:{start:"rotatex(-180deg)",end:"rotatex(0deg)"},left:{start:"rotatey(0deg)",end:"rotatey(-180deg)"},right:{start:"rotatey(180deg)",end:"rotatey(0deg)"}},e("turningPage",{directions:p,init:function(n,t,i){h.prototype.init.call(this,n,t),this._container=i},prepare:function(n,t){var r=this,f=r._reverse,e=f?c[r._direction].reverse:r._direction,u=wt[e];n.zIndex=1,r._clipInHalf&&(n.clip=ei(r._container,i.directions[e].reverse)),n[ai]=yt,t[o]=ui+(f?u.start:u.end),n[o]=ui+(f?u.end:u.start)},setup:function(){this._container.append(this.element)},face:function(n){return this._face=n,this},shouldHide:function(){var i=this,t=i._reverse,n=i._face;return t&&!n||!t&&n},clipInHalf:function(n){return this._clipInHalf=n,this},temporary:function(){return this.element.addClass("temp-page"),this}}),e("staticPage",{directions:p,init:function(n,t,i){h.prototype.init.call(this,n,t),this._container=i},restore:["clip"],prepare:function(n,t){var i=this,r=i._reverse?c[i._direction].reverse:i._direction;n.clip=ei(i._container,r),n.opacity=.999,t.opacity=1},shouldHide:function(){var i=this,t=i._reverse,n=i._face;return t&&!n||!t&&n},face:function(n){return this._face=n,this}}),e("pageturn",{directions:["horizontal","vertical"],init:function(n,t,i,r){h.prototype.init.call(this,n,t),this.options={},this.options.face=i,this.options.back=r},children:function(){var o,f=this,e=f.options,n="horizontal"===f._direction?"left":"top",u=i.directions[n].reverse,t=f._reverse,s=e.face.clone(!0).removeAttr("id"),h=e.back.clone(!0).removeAttr("id"),r=f.element;return t&&(o=n,n=u,u=o),[i.fx(e.face).staticPage(n,r).face(!0).setReverse(t),i.fx(e.back).staticPage(u,r).setReverse(t),i.fx(s).turningPage(n,r).face(!0).clipInHalf(!0).temporary().setReverse(t),i.fx(h).turningPage(u,r).clipInHalf(!0).temporary().setReverse(t)]},prepare:function(n,t){n[ri]=vt,n.transformStyle="preserve-3d",n.opacity=.999,t.opacity=1},teardown:function(){this.element.find(".temp-page").remove()}}),e("flip",{directions:["horizontal","vertical"],init:function(n,t,i,r){h.prototype.init.call(this,n,t),this.options={},this.options.face=i,this.options.back=r},children:function(){var o,n=this,e=n.options,t="horizontal"===n._direction?"left":"top",u=i.directions[t].reverse,r=n._reverse,f=n.element;return r&&(o=t,t=u,u=o),[i.fx(e.face).turningPage(t,f).face(!0).setReverse(r),i.fx(e.back).turningPage(u,f).setReverse(r)]},prepare:function(n){n[ri]=vt,n.transformStyle="preserve-3d"}}),lt=!w.mobileOS.android,oi=".km-touch-scrollbar, .km-actionsheet-wrapper",e("replace",{_before:n.noop,_after:n.noop,init:function(t,i,r){h.prototype.init.call(this,t),this._previous=n(i),this._transitionClass=r},duration:function(){throw Error("The replace effect does not support duration setting; the effect duration may be customized through the transition class rule");},beforeTransition:function(n){return this._before=n,this},afterTransition:function(n){return this._after=n,this},_both:function(){return n().add(this._element).add(this._previous)},_containerClass:function(){var t=this._direction,n="k-fx k-fx-start k-fx-"+this._transitionClass;return t&&(n+=" k-fx-"+t),this._reverse&&(n+=" k-fx-reverse"),n},complete:function(t){if(!(!this.deferred||t&&n(t.target).is(oi))){var i=this.container;i.removeClass("k-fx-end").removeClass(this._containerClass()).off(s.event,this.completeProxy),this._previous.hide().removeClass("k-fx-current"),this.element.removeClass("k-fx-next"),lt&&i.css(it,""),this.isAbsolute||this._both().css(tt,""),this.deferred.resolve(),delete this.deferred}},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var h,u=this,r=u.element,f=u._previous,t=r.parents().filter(f.parents()).first(),c=u._both(),e=n.Deferred(),o=r.css(tt);return t.length||(t=r.parent()),this.container=t,this.deferred=e,this.isAbsolute="absolute"==o,this.isAbsolute||c.css(tt,"absolute"),lt&&(h=t.css(it),t.css(it,"hidden")),s?(r.addClass("k-fx-hidden"),t.addClass(this._containerClass()),this.completeProxy=n.proxy(this,"complete"),t.on(s.event,this.completeProxy),i.animationFrame(function(){r.removeClass("k-fx-hidden").addClass("k-fx-next"),f.css("display","").addClass("k-fx-current"),u._before(f,r),i.animationFrame(function(){t.removeClass("k-fx-start").addClass("k-fx-end"),u._after(f,r)})})):this.complete(),e.promise()},stop:function(){this.complete()}}),k=i.Class.extend({init:function(){var n=this;n._tickProxy=wi(n._tick,n),n._started=!1},tick:n.noop,done:n.noop,onEnd:n.noop,onCancel:n.noop,start:function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,i.animationFrame(this._tickProxy)))},enabled:function(){return!0},cancel:function(){this._started=!1,this.onCancel()},_tick:function(){var n=this;n._started&&(n.tick(),n.done()?(n._started=!1,n.onEnd()):i.animationFrame(n._tickProxy))}}),ct=k.extend({init:function(n){var t=this;u(t,n),k.fn.init.call(t)},done:function(){return this.timePassed()>=this.duration},timePassed:function(){return Math.min(this.duration,new Date-this.startDate)},moveTo:function(n){var t=this,i=t.movable;t.initial=i[t.axis],t.delta=n.location-t.initial,t.duration="number"==typeof n.duration?n.duration:300,t.tick=t._easeProxy(n.ease),t.startDate=new Date,t.start()},_easeProxy:function(n){var t=this;return function(){t.movable.moveAxis(t.axis,n(t.timePassed(),t.initial,t.delta,t.duration))}}}),u(ct,{easeOutExpo:function(n,t,i,r){return n==r?t+i:i*(-Math.pow(2,-10*n/r)+1)+t},easeOutBack:function(n,t,i,r,u){return u=1.70158,i*((n=n/r-1)*n*((u+1)*n+u)+1)+t}}),r.Animation=k,r.Transition=ct,r.createEffect=e,r.box=function(t){t=n(t);var r=t.offset();return r.width=i._outerWidth(t),r.height=i._outerHeight(t),r},r.transformOrigin=function(n,t){var r=(n.left-t.left)*t.width/(t.width-n.width),i=(n.top-t.top)*t.height/(t.height-n.height);return{x:isNaN(r)?0:r,y:isNaN(i)?0:i}},r.fillScale=function(n,t){return Math.min(n.width/t.width,n.height/t.height)},r.fitScale=function(n,t){return Math.max(n.width/t.width,n.height/t.height)}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.view.min",["kendo.core.min","kendo.binder.min","kendo.fx.min"],n)}(function(){return function(n){function y(n){if(!n)return{};var t=n.match(p)||[];return{type:t[1],direction:t[3],reverse:"reverse"===t[5]}}var i=window.kendo,u=i.Observable,k="SCRIPT",h="init",c="show",l="hide",e="transitionStart",f="transitionEnd",b="attach",w="detach",d=/unrecognized expression/,r=u.extend({init:function(n,t){var r=this;t=t||{},u.fn.init.call(r),r.content=n,r.id=i.guid(),r.tagName=t.tagName||"div",r.model=t.model,r._wrap=t.wrap!==!1,this._evalTemplate=t.evalTemplate||!1,r._fragments={},r.bind([h,c,l,e,f],t)},render:function(t){var r=this,u=!r.element;return u&&(r.element=r._createElement()),t&&n(t).append(r.element),u&&(i.bind(r.element,r.model),r.trigger(h)),t&&(r._eachFragment(b),r.trigger(c)),r.element},clone:function(){return new o(this)},triggerBeforeShow:function(){return!0},triggerBeforeHide:function(){return!0},showStart:function(){this.element.css("display","")},showEnd:function(){},hideEnd:function(){this.hide()},beforeTransition:function(n){this.trigger(e,{type:n})},afterTransition:function(n){this.trigger(f,{type:n})},hide:function(){this._eachFragment(w),this.element.detach(),this.trigger(l)},destroy:function(){var n=this.element;n&&(i.unbind(n),i.destroy(n),n.remove())},fragments:function(t){n.extend(this._fragments,t)},_eachFragment:function(n){for(var t in this._fragments)this._fragments[t][n](this,t)},_createElement:function(){var r,t,f,u=this,e="<"+u.tagName+" />";try{t=n(document.getElementById(u.content)||u.content),t[0].tagName===k&&(t=t.html())}catch(o){d.test(o.message)&&(t=u.content)}return"string"==typeof t?(t=t.replace(/^\s+|\s+$/g,""),u._evalTemplate&&(t=i.template(t)(u.model||{})),r=n(e).append(t),u._wrap||(r=r.contents())):(r=t,u._evalTemplate&&(f=n(i.template(n("<div />").append(r.clone(!0)).html())(u.model||{})),n.contains(document,r[0])&&r.replaceWith(f),r=f),u._wrap&&(r=r.wrapAll(e).parent())),r}}),o=i.Class.extend({init:function(t){n.extend(this,{element:t.element.clone(!0),transition:t.transition,id:t.id}),t.element.parent().append(this.element)},hideEnd:function(){this.element.remove()},beforeTransition:n.noop,afterTransition:n.noop}),a=r.extend({init:function(n,t){r.fn.init.call(this,n,t),this.containers={}},container:function(n){var t=this.containers[n];return t||(t=this._createContainer(n),this.containers[n]=t),t},showIn:function(n,t,i){this.container(n).show(t,i)},_createContainer:function(n){var r,t=this.render(),i=t.find(n);if(!i.length&&t.is(n)){if(!t.is(n))throw Error("can't find a container with the specified "+n+" selector");i=t}return r=new s(i),r.bind("accepted",function(n){n.view.render(i)}),r}}),v=r.extend({attach:function(n,t){n.element.find(t).replaceWith(this.render())},detach:function(){}}),p=/^(\w+)(:(\w+))?( (\w+))?$/,s=u.extend({init:function(n){u.fn.init.call(this),this.container=n,this.history=[],this.view=null,this.running=!1},after:function(){this.running=!1,this.trigger("complete",{view:this.view}),this.trigger("after")},end:function(){this.view.showEnd(),this.previous.hideEnd(),this.after()},show:function(n,t,r){if(!n.triggerBeforeShow()||this.view&&!this.view.triggerBeforeHide())return this.trigger("after"),!1;r=r||n.id;var u=this,s=n===u.view?n.clone():u.view,f=u.history,c=f[f.length-2]||{},h=c.id===r,e=t||(h?f[f.length-1].transition:n.transition),o=y(e);return u.running&&u.effect.stop(),"none"===e&&(e=null),u.trigger("accepted",{view:n}),u.view=n,u.previous=s,u.running=!0,h?f.pop():f.push({id:r,transition:e}),s?(e&&i.effects.enabled?(n.element.addClass("k-fx-hidden"),n.showStart(),h&&!t&&(o.reverse=!o.reverse),u.effect=i.fx(n.element).replace(s.element,o.type).beforeTransition(function(){n.beforeTransition("show"),s.beforeTransition("hide")}).afterTransition(function(){n.afterTransition("show"),s.afterTransition("hide")}).direction(o.direction).setReverse(o.reverse),u.effect.run().then(function(){u.end()})):(n.showStart(),u.end()),!0):(n.showStart(),n.showEnd(),u.after(),!0)}});i.ViewContainer=s,i.Fragment=v,i.Layout=a,i.View=r,i.ViewClone=o}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.dom.min",["kendo.core.min"],n)}(function(){return function(n){function f(){this.node=null}function c(){}function t(n,t,i){this.nodeName=n,this.attr=t||{},this.children=i||[]}function r(n){this.nodeValue=n+""}function h(n){this.html=n}function a(n,t){for(u.innerHTML=t;u.firstChild;)n.appendChild(u.firstChild)}function l(n){return new h(n)}function s(n,i,r){return new t(n,i,r)}function e(n){return new r(n)}function o(n){this.root=n,this.children=[]}var i,u;f.prototype={remove:function(){this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.attr={}},attr:{},text:function(){return""}},c.prototype={nodeName:"#null",attr:{style:{}},children:[],remove:function(){}},i=new c,t.prototype=new f,t.prototype.appendTo=function(n){for(var r=document.createElement(this.nodeName),u=this.children,t=0;t<u.length;t++)u[t].render(r,i);return n.appendChild(r),r},t.prototype.render=function(n,t){var e,r,s,u,f,o;if(t.nodeName!==this.nodeName)t.remove(),e=this.appendTo(n);else{if(e=t.node,s=this.children,u=s.length,f=t.children,o=f.length,Math.abs(o-u)>2)return void this.render({appendChild:function(i){n.replaceChild(i,t.node)}},i);for(r=0;r<u;r++)s[r].render(e,f[r]||i);for(r=u;r<o;r++)f[r].remove()}this.node=e,this.syncAttributes(t.attr),this.removeAttributes(t.attr)},t.prototype.syncAttributes=function(n){var t,r,i,u=this.attr;for(t in u)r=u[t],i=n[t],"style"===t?this.setStyle(r,i):r!==i&&this.setAttribute(t,r,i)},t.prototype.setStyle=function(n,t){var i,r=this.node;if(t)for(i in n)n[i]!==t[i]&&(r.style[i]=n[i]);else for(i in n)r.style[i]=n[i]},t.prototype.removeStyle=function(n){var t,r=this.attr.style||{},i=this.node;for(t in n)void 0===r[t]&&(i.style[t]="")},t.prototype.removeAttributes=function(n){var t,i=this.attr;for(t in n)"style"===t?this.removeStyle(n.style):void 0===i[t]&&this.removeAttribute(t)},t.prototype.removeAttribute=function(n){var t=this.node;"style"===n?t.style.cssText="":"className"===n?t.className="":t.removeAttribute(n)},t.prototype.setAttribute=function(n,t){var i=this.node;void 0!==i[n]?i[n]=t:i.setAttribute(n,t)},t.prototype.text=function(){for(var t="",n=0;n<this.children.length;++n)t+=this.children[n].text();return t},r.prototype=new f,r.prototype.nodeName="#text",r.prototype.render=function(n,t){var i;t.nodeName!==this.nodeName?(t.remove(),i=document.createTextNode(this.nodeValue),n.appendChild(i)):(i=t.node,this.nodeValue!==t.nodeValue&&i.parentNode&&(i.nodeValue=this.nodeValue)),this.node=i},r.prototype.text=function(){return this.nodeValue},h.prototype={nodeName:"#html",attr:{},remove:function(){for(var n,t=0;t<this.nodes.length;t++)n=this.nodes[t],n.parentNode&&n.parentNode.removeChild(n)},render:function(n,t){var r,i;if(t.nodeName!==this.nodeName||t.html!==this.html)for(t.remove(),r=n.lastChild,a(n,this.html),this.nodes=[],i=r?r.nextSibling:n.firstChild;i;i=i.nextSibling)this.nodes.push(i);else this.nodes=t.nodes.slice(0)}},u=document.createElement("div"),o.prototype={html:l,element:s,text:e,render:function(n){for(var r,u=this.children,t=0,f=n.length;t<f;t++)r=u[t],r?r.node&&r.node.parentNode||(r.remove(),r=i):r=i,n[t].render(this.root,r);for(t=f;t<u.length;t++)u[t].remove();this.children=n}},n.dom={html:l,text:e,element:s,Tree:o,Node:f}}(window.kendo),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.ooxml.min",["kendo.core.min"],n)}(function(){return function(n,t){function e(n){var t=Math.floor(n/26)-1;return(t>=0?e(t):"")+String.fromCharCode(65+n%26)}function i(n,t){return e(t)+(n+1)}function w(n,t){return e(t)+"$"+(n+1)}function f(n){var t=n.frozenRows||(n.freezePane||{}).rowSplit||1;return t-1}function ot(n){return(n/7*100+.5)/100}function b(n){return.75*n}function tt(n){return(n+"").replace(/[\x00-\x08]/g,"").replace(/\n/g,"\r\n")}function o(n){return n.length<6&&(n=n.replace(/(\w)/g,function(n,t){return t+t})),n=n.substring(1).toUpperCase(),n.length<8&&(n="FF"+n),n}function ii(n){var t="thin";return 2===n?t="medium":3===n&&(t="thick"),t}function u(n,t){var i="";return t&&(i+="<"+n+' style="'+ii(t.size)+'">',t.color&&(i+='<color rgb="'+o(t.color)+'"/>'),i+="</"+n+">"),i}function kt(n){return"<border>"+u("left",n.left)+u("right",n.right)+u("top",n.top)+u("bottom",n.bottom)+"</border>"}function at(n,t){var u,e,i,r=[],f=[];for(bt(n,function(n,t){var i={_source:n,index:t,height:n.height,cells:[]};r.push(i),f[t]=i}),u=p(r).slice(0),e={rowData:r,rowsByIndex:f,mergedCells:t},i=0;i<u.length;i++)yt(u[i],e),delete u[i]._source;return p(r)}function bt(n,t){for(var u,r,i=0;i<n.length;i++)u=n[i],u&&(r=u.index,"number"!=typeof r&&(r=i),t(u,r))}function p(n){return n.sort(function(n,t){return n.index-t.index})}function pt(n,t){n.indexOf(t)<0&&n.push(t)}function wt(n,t){var u,f,i,r;for(t=t,u=0;u<n.length;++u)if(f=n[u],i=f.substr(0,2),i==t)return r=f.substr(3),i=c(i),r=c(r),{rowSpan:r.row-i.row+1,colSpan:r.col-i.col+1}}function c(n){function i(n){n=n.toUpperCase();for(var i=0,t=0;t<n.length;++t)i=26*i+n.charCodeAt(t)-64;return i-1}function r(n){return parseInt(n,10)-1}var t=/^([a-z]+)(\d+)$/i.exec(n);return{row:r(t[2]),col:i(t[1])}}function yt(n,t){var l,e,r,u,s,p,c,f,o,b=n._source,v=n.index,y=b.cells,w=n.cells;if(y)for(l=0;l<y.length;l++)if(e=y[l]||a,r=e.rowSpan||1,u=e.colSpan||1,s=lt(w,e),p=i(v,s),1==r&&1==u&&(c=wt(t.mergedCells,p),c&&(u=c.colSpan,r=c.rowSpan)),h(e,w,s,u),(r>1||u>1)&&pt(t.mergedCells,p+":"+i(v+r-1,s+u-1)),r>1)for(f=v+1;f<v+r;f++)o=t.rowsByIndex[f],o||(o=t.rowsByIndex[f]={index:f,cells:[]},t.rowData.push(o)),h(e,o.cells,s-1,u+1)}function lt(n,t){var i;return"number"==typeof t.index?(i=t.index,l(n,t,t.index)):i=vt(n,t),i}function l(n,t,i){n[i]=t}function vt(n,t){for(var r=n.length,i=0;i<n.length+1;i++)if(!n[i]){n[i]=t,r=i;break}return r}function h(n,t,i,r){for(var f,u=1;u<r;u++)f={borderTop:n.borderTop,borderRight:n.borderRight,borderBottom:n.borderBottom,borderLeft:n.borderLeft},l(t,f,i+u)}function r(n){return ht({ref:n.ref,columns:n.columns,generators:{custom:et,dynamic:rt,top:ut,value:ft}})}var ri='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',ui=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>${creator}</dc:creator><cp:lastModifiedBy>${lastModifiedBy}</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">${created}</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">${modified}</dcterms:modified></cp:coreProperties>'),ti=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>${sheets.length}</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="${sheets.length}" baseType="lpstr"># for (var idx = 0; idx < sheets.length; idx++) { ## if (sheets[idx].options.title) { #<vt:lpstr>${sheets[idx].options.title}</vt:lpstr># } else { #<vt:lpstr>Sheet${idx+1}</vt:lpstr># } ## } #</vt:vector></TitlesOfParts><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>14.0300</AppVersion></Properties>'),dt=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="xml" ContentType="application/xml" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/># for (var idx = 1; idx <= count; idx++) { #<Override PartName="/xl/worksheets/sheet${idx}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" /># } #<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /></Types>'),gt=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="9303" /><workbookPr defaultThemeVersion="124226" /><bookViews><workbookView xWindow="240" yWindow="45" windowWidth="18195" windowHeight="7995" /></bookViews><sheets># for (var idx = 0; idx < sheets.length; idx++) { ## var options = sheets[idx].options; ## var name = options.name || options.title ## if (name) { #<sheet name="${name}" sheetId="${idx+1}" r:id="rId${idx+1}" /># } else { #<sheet name="Sheet${idx+1}" sheetId="${idx+1}" r:id="rId${idx+1}" /># } ## } #</sheets># if (filterNames.length || userNames.length) { #<definedNames> # for (var di = 0; di < filterNames.length; di++) { #<definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="${filterNames[di].localSheetId}">${filterNames[di].name}!$${filterNames[di].from}:$${filterNames[di].to}</definedName> # } # # for (var i = 0; i < userNames.length; ++i) { #<definedName name="${userNames[i].name}" hidden="${userNames[i].hidden ? 1 : 0}" # if (userNames[i].localSheetId != null) { # localSheetId="${userNames[i].localSheetId}" # } #>${userNames[i].value}</definedName> # } #</definedNames># } #<calcPr fullCalcOnLoad="1" calcId="145621" /></workbook>'),ni=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" mc:Ignorable="x14ac"><dimension ref="A1" /><sheetViews><sheetView #if(index==0) {# tabSelected="1" #}# workbookViewId="0" #if (showGridLines === false) {# showGridLines="0" #}#># if (frozenRows || frozenColumns) { #<pane state="frozen"# if (frozenColumns) { # xSplit="${frozenColumns}"# } ## if (frozenRows) { # ySplit="${frozenRows}"# } # topLeftCell="${String.fromCharCode(65 + (frozenColumns || 0))}${(frozenRows || 0)+1}"/># } #</sheetView></sheetViews><sheetFormatPr x14ac:dyDescent="0.25" defaultRowHeight="#= defaults.rowHeight ? defaults.rowHeight * 0.75 : 15 #" # if (defaults.columnWidth) { # defaultColWidth="#= kendo.ooxml.toWidth(defaults.columnWidth) #" # } # /># if (defaultCellStyleId != null || (columns && columns.length > 0)) { #<cols># if (!columns || !columns.length) { #<col min="1" max="16384" style="${defaultCellStyleId}" # if (defaults.columnWidth) { # width="#= kendo.ooxml.toWidth(defaults.columnWidth) #" # } # /># } ## for (var ci = 0; ci < columns.length; ci++) { ## var column = columns[ci]; ## var columnIndex = typeof column.index === "number" ? column.index + 1 : (ci + 1); ## if (column.width === 0) { #<col #if(defaultCellStyleId!=null){# style="${defaultCellStyleId}" #}#min="${columnIndex}" max="${columnIndex}" hidden="1" customWidth="1" /># } else if (column.width) { #<col #if(defaultCellStyleId!=null){# style="${defaultCellStyleId}" #}#min="${columnIndex}" max="${columnIndex}" customWidth="1"# if (column.autoWidth) { # width="${((column.width*7+5)/7*256)/256}" bestFit="1"# } else { # width="#= kendo.ooxml.toWidth(column.width) #" # } #/># } ## } #</cols># } #<sheetData># for (var ri = 0; ri < data.length; ri++) { ## var row = data[ri]; ## var rowIndex = typeof row.index === "number" ? row.index + 1 : (ri + 1); #<row r="${rowIndex}" x14ac:dyDescent="0.25" # if (row.height === 0) { # hidden="1" # }   else if (row.height) { # ht="#= kendo.ooxml.toHeight(row.height) #" customHeight="1" # } # ># for (var ci = 0; ci < row.data.length; ci++) { ## var cell = row.data[ci];#<c r="#=cell.ref#"# if (cell.style) { # s="#=cell.style#" # } ## if (cell.type) { # t="#=cell.type#"# } #># if (cell.formula != null) { #<f>${cell.formula}</f># } ## if (cell.value != null) { #<v>${cell.value}</v># } #</c># } #</row># } #</sheetData># if (autoFilter) { #<autoFilter ref="${autoFilter.from}:${autoFilter.to}"/># } else if (filter) { ##= kendo.ooxml.spreadsheetFilters(filter) ## } ## if (mergeCells.length) { #<mergeCells count="${mergeCells.length}"># for (var ci = 0; ci < mergeCells.length; ci++) { #<mergeCell ref="${mergeCells[ci]}"/># } #</mergeCells># } ## if (validations.length) { #<dataValidations># for (var vi = 0; vi < validations.length; vi++) { ## var val = validations[vi]; #<dataValidation sqref="#= val.sqref.join(" ") #" showErrorMessage="#= val.showErrorMessage #" type="#= val.type #"# if (val.type != "list") {# operator="#= val.operator #" # } # allowBlank="#= val.allowBlank #" showDropDown="#= val.showDropDown #"# if (val.error) {# error="#= val.error #" # } ## if (val.errorTitle) {# errorTitle="#= val.errorTitle #" # } #># if (val.formula1) { #<formula1>#: val.formula1 #</formula1># } ## if (val.formula2) { #<formula2>#: val.formula2 #</formula2># } #</dataValidation># } #</dataValidations># } ## if (hyperlinks.length) { #<hyperlinks># for (var hi = 0; hi < hyperlinks.length; hi++) { #<hyperlink ref="${hyperlinks[hi].ref}" r:id="rId${hi}"/># } #</hyperlinks># } #<pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" /></worksheet>'),ct=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"># for (var idx = 1; idx <= count; idx++) { #<Relationship Id="rId${idx}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${idx}.xml" /># } #<Relationship Id="rId${count+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" /><Relationship Id="rId${count+2}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" /></Relationships>'),nt=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"># for (var i = 0; i < hyperlinks.length; i++) { #<Relationship Id="rId${i}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="${hyperlinks[i].target}" TargetMode="External" /># } #</Relationships>'),g=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="${count}" uniqueCount="${uniqueCount}"># for (var index in indexes) { #<si><t>${index.substring(1)}</t></si># } #</sst>'),it=t.template('<?xml version="1.0" encoding="UTF-8"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><numFmts count="${formats.length}"># for (var fi = 0; fi < formats.length; fi++) { ## var format = formats[fi]; #<numFmt formatCode="${format.format}" numFmtId="${165+fi}" /># } #</numFmts><fonts count="${fonts.length+1}" x14ac:knownFonts="1"><font><sz val="11" /><color theme="1" /><name val="Calibri" /><family val="2" /><scheme val="minor" /></font># for (var fi = 0; fi < fonts.length; fi++) { ## var font = fonts[fi]; #<font># if (font.fontSize) { #<sz val="${font.fontSize}" /># } else { #<sz val="11" /># } ## if (font.bold) { #<b/># } ## if (font.italic) { #<i/># } ## if (font.underline) { #<u/># } ## if (font.color) { #<color rgb="${font.color}" /># } else { #<color theme="1" /># } ## if (font.fontFamily) { #<name val="${font.fontFamily}" /><family val="2" /># } else { #<name val="Calibri" /><family val="2" /><scheme val="minor" /># } #</font># } #</fonts><fills count="${fills.length+2}"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill># for (var fi = 0; fi < fills.length; fi++) { ## var fill = fills[fi]; ## if (fill.background) { #<fill><patternFill patternType="solid"><fgColor rgb="${fill.background}"/></patternFill></fill># } ## } #</fills><borders count="${borders.length+1}"><border><left/><right/><top/><bottom/><diagonal/></border># for (var bi = 0; bi < borders.length; bi++) { ##= kendo.ooxml.borderTemplate(borders[bi]) ## } #</borders><cellStyleXfs count="1"><xf borderId="0" fillId="0" fontId="0" /></cellStyleXfs><cellXfs count="${styles.length+1}"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/># for (var si = 0; si < styles.length; si++) { ## var style = styles[si]; #<xf xfId="0"# if (style.fontId) { # fontId="${style.fontId}" applyFont="1"# } ## if (style.fillId) { # fillId="${style.fillId}" applyFill="1"# } ## if (style.numFmtId) { # numFmtId="${style.numFmtId}" applyNumberFormat="1"# } ## if (style.textAlign || style.verticalAlign || style.wrap) { # applyAlignment="1"# } ## if (style.borderId) { # borderId="${style.borderId}" applyBorder="1"# } #># if (style.textAlign || style.verticalAlign || style.wrap) { #<alignment# if (style.textAlign) { # horizontal="${style.textAlign}"# } ## if (style.verticalAlign) { # vertical="${style.verticalAlign}"# } ## if (style.wrap) { # wrapText="1"# } #/># } #</xf># } #</cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles><dxfs count="0" /><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleMedium9" /></styleSheet>'),y=new Date(1900,0,0),v=t.Class.extend({init:function(n,t,i,r){this.options=n,this._strings=t,this._styles=i,this._borders=r,this._validations={}},relsToXML:function(){var n=this.options.hyperlinks||[];return n.length?nt({hyperlinks:n}):""},toXML:function(n){var t,c,o,e,r,u,h=this.options.mergedCells||[],l=this.options.rows||[],s=at(l,h);this._readCells(s),t=this.options.filter,t&&"number"==typeof t.from&&"number"==typeof t.to?t={from:i(f(this.options),t.from),to:i(f(this.options),t.to)}:t&&t.ref&&t.columns&&(c=t,t=null),o=[];for(e in this._validations)Object.prototype.hasOwnProperty.call(this._validations,e)&&o.push(this._validations[e]);return r=null,this.options.defaultCellStyle&&(r=this._lookupStyle(this.options.defaultCellStyle)),u=this.options.freezePane||{},ni({frozenColumns:this.options.frozenColumns||u.colSplit,frozenRows:this.options.frozenRows||u.rowSplit,columns:this.options.columns,defaults:this.options.defaults||{},data:s,index:n,mergeCells:h,autoFilter:t,filter:c,showGridLines:this.options.showGridLines,hyperlinks:this.options.hyperlinks||[],validations:o,defaultCellStyleId:r})},_lookupString:function(n){var i="$"+n,t=this._strings.indexes[i];return void 0!==t?n=t:(n=this._strings.indexes[i]=this._strings.uniqueCount,this._strings.uniqueCount++),this._strings.count++,n},_lookupStyle:function(i){var r,u=t.stringify(i);return"{}"==u?0:(r=n.inArray(u,this._styles),r<0&&(r=this._styles.push(u)-1),r+1)},_lookupBorder:function(i){var r,u=t.stringify(i);if("{}"!=u)return r=n.inArray(u,this._borders),r<0&&(r=this._borders.push(u)-1),r+1},_readCells:function(n){for(var i,f,t,u,r=0;r<n.length;r++)for(i=n[r],f=i.cells,i.data=[],t=0;t<f.length;t++)u=this._cell(f[t],i.index,t),u&&i.data.push(u)},_cell:function(n,r,u){var f,o,w,s,v,h,e,c,p,l;return n&&n!==a?(f=n.value,o={},n.borderLeft&&(o.left=n.borderLeft),n.borderRight&&(o.right=n.borderRight),n.borderTop&&(o.top=n.borderTop),n.borderBottom&&(o.bottom=n.borderBottom),o=this._lookupBorder(o),w=this.options.defaultCellStyle||{},s={borderId:o},function(n){n("color"),n("background"),n("bold"),n("italic"),n("underline"),n("fontFamily")||n("fontName","fontFamily"),n("fontSize"),n("format"),n("textAlign")||n("hAlign","textAlign"),n("verticalAlign")||n("vAlign","verticalAlign"),n("wrap")}(function(t,i){var r=n[t];if(void 0===r&&(r=w[t]),void 0!==r)return s[i||t]=r,!0}),v=this.options.columns||[],h=v[u],e=typeof f,h&&h.autoWidth&&(c=f,"number"===e&&(c=t.toString(f,n.format)),h.width=Math.max(h.width||0,(c+"").length)),"string"===e?(f=tt(f),f=this._lookupString(f),e="s"):"number"===e?e="n":"boolean"===e?(e="b",f=+f):f&&f.getTime?(e=null,p=(f.getTimezoneOffset()-y.getTimezoneOffset())*t.date.MS_PER_MINUTE,f=(f-y-p)/t.date.MS_PER_DAY+1,s.format||(s.format="mm-dd-yy")):(e=null,f=null),s=this._lookupStyle(s),l=i(r,u),n.validation&&this._addValidation(n.validation,l),{value:f,formula:n.formula,type:e,style:s,ref:l}):null},_addValidation:function(n,t){var r={showErrorMessage:"reject"==n.type?1:0,formula1:n.from,formula2:n.to,type:k[n.dataType]||n.dataType,operator:d[n.comparerType]||n.comparerType,allowBlank:n.allowNulls?1:0,showDropDown:n.showButton?0:1,error:n.messageTemplate,errorTitle:n.titleTemplate},i=JSON.stringify(r);this._validations[i]||(this._validations[i]=r,r.sqref=[]),this._validations[i].sqref.push(t)}}),d={greaterThanOrEqualTo:"greaterThanOrEqual",lessThanOrEqualTo:"lessThanOrEqual"},k={number:"decimal"},s={General:0,0:1,"0.00":2,"#,##0":3,"#,##0.00":4,"0%":9,"0.00%":10,"0.00E+00":11,"# ?/?":12,"# ??/??":13,"mm-dd-yy":14,"d-mmm-yy":15,"d-mmm":16,"mmm-yy":17,"h:mm AM/PM":18,"h:mm:ss AM/PM":19,"h:mm":20,"h:mm:ss":21,"m/d/yy h:mm":22,"#,##0 ;(#,##0)":37,"#,##0 ;[Red](#,##0)":38,"#,##0.00;(#,##0.00)":39,"#,##0.00;[Red](#,##0.00)":40,"mm:ss":45,"[h]:mm:ss":46,"mmss.0":47,"##0.0E+0":48,"@":49,"[$-404]e/m/d":27,"m/d/yy":30,t0:59,"t0.00":60,"t#,##0":61,"t#,##0.00":62,"t0%":67,"t0.00%":68,"t# ?/?":69,"t# ??/??":70},st=t.Class.extend({init:function(t){this.options=t||{},this._strings={indexes:{},count:0,uniqueCount:0},this._styles=[],this._borders=[],this._sheets=n.map(this.options.sheets||[],n.proxy(function(n){return n.defaults=this.options,new v(n,this._strings,this._styles,this._borders)},this))},toDataURL:function(){var u,d,h,tt,i,rt,k,b,ft,r,nt,c,l,ut,e,y,p,a,v;if("undefined"==typeof JSZip)throw Error("JSZip not found. Check http://docs.telerik.com/kendo-ui/framework/excel/introduction#requirements for more details.");for(u=new JSZip,d=u.folder("docProps"),d.file("core.xml",ui({creator:this.options.creator||"Kendo UI",lastModifiedBy:this.options.creator||"Kendo UI",created:this.options.date||(new Date).toJSON(),modified:this.options.date||(new Date).toJSON()})),h=this._sheets.length,d.file("app.xml",ti({sheets:this._sheets})),tt=u.folder("_rels"),tt.file(".rels",ri),i=u.folder("xl"),rt=i.folder("_rels"),rt.file("workbook.xml.rels",ct({count:h})),k={},i.file("workbook.xml",gt({sheets:this._sheets,filterNames:n.map(this._sheets,function(n,t){var i,r=n.options,u=r.name||r.title||"Sheet"+(t+1);if(k[u.toLowerCase()]=t,i=r.filter,i&&void 0!==i.from&&void 0!==i.to)return{localSheetId:t,name:u,from:w(f(r),i.from),to:w(f(r),i.to)}}),userNames:n.map(this.options.names||[],function(n){return{name:n.localName,localSheetId:n.sheet?k[n.sheet.toLowerCase()]:null,value:n.value,hidden:n.hidden}})})),b=i.folder("worksheets"),ft=b.folder("_rels"),r=0;r<h;r++)nt=this._sheets[r],c=t.format("sheet{0}.xml",r+1),l=nt.relsToXML(),l&&ft.file(c+".rels",l),b.file(c,nt.toXML(r));return ut=n.map(this._borders,n.parseJSON),e=n.map(this._styles,n.parseJSON),y=function(n){return n.underline||n.bold||n.italic||n.color||n.fontFamily||n.fontSize},p=n.map(e,function(n){if(n.color&&(n.color=o(n.color)),y(n))return n}),a=n.map(e,function(n){if(n.format&&void 0===s[n.format])return n}),v=n.map(e,function(n){if(n.background)return n.background=o(n.background),n}),i.file("styles.xml",it({fonts:p,fills:v,formats:a,borders:ut,styles:n.map(e,function(t){var i={};return y(t)&&(i.fontId=n.inArray(t,p)+1),t.background&&(i.fillId=n.inArray(t,v)+2),i.textAlign=t.textAlign,i.verticalAlign=t.verticalAlign,i.wrap=t.wrap,i.borderId=t.borderId,t.format&&(i.numFmtId=void 0!==s[t.format]?s[t.format]:165+n.inArray(t,a)),i})})),i.file("sharedStrings.xml",g(this._strings)),u.file("[Content_Types].xml",dt({count:h})),"data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"+u.generate({compression:"DEFLATE"})}}),a={},ht=t.template('<autoFilter ref="${ref}"># for (var i = 0; i < columns.length; ++i) { ## var col = columns[i]; #<filterColumn colId="${col.index}">#= generators[col.filter](col) #</filterColumn># } #</autoFilter>'),et=t.template('<customFilters# if (logic == "and") {# and="1"# } #># for (var i = 0; i < criteria.length; ++i) { ## var f = criteria[i]; ## var op = kendo.ooxml.spreadsheetFilters.customOperator(f); ## var val = kendo.ooxml.spreadsheetFilters.customValue(f); #<customFilter# if (op) {# operator="${op}"#}# val="${val}"/># } #</customFilters>'),rt=t.template('<dynamicFilter type="${kendo.ooxml.spreadsheetFilters.dynamicFilterType(type)}" />'),ut=t.template('<top10 percent="#= /percent$/i.test(type) ? 1 : 0 #" top="#= /^top/i.test(type) ? 1 : 0 #"  val="#: value #" />'),ft=t.template('<filters# if (blanks) {# blank="1"#}#># for (var i = 0; i < values.length; ++i) { #<filter val="${values[i]}" /># } #</filters>');r.customOperator=function(n){return{eq:"equal",gt:"greaterThan",gte:"greaterThanOrEqual",lt:"lessThan",lte:"lessThanOrEqual",ne:"notEqual",doesnotstartwith:"notEqual",doesnotendwith:"notEqual",doesnotcontain:"notEqual",doesnotmatch:"notEqual"}[n.operator.toLowerCase()]},r.customValue=function(n){function t(n){return n.replace(/([*?])/g,"~$1")}switch(n.operator.toLowerCase()){case"startswith":case"doesnotstartwith":return t(n.value)+"*";case"endswith":case"doesnotendwith":return"*"+t(n.value);case"contains":case"doesnotcontain":return"*"+t(n.value)+"*"}return n.value},r.dynamicFilterType=function(n){return{quarter1:"Q1",quarter2:"Q2",quarter3:"Q3",quarter4:"Q4",january:"M1",february:"M2",march:"M3",april:"M4",may:"M5",june:"M6",july:"M7",august:"M8",september:"M9",october:"M10",november:"M11",december:"M12"}[n.toLowerCase()]||n},t.ooxml={Workbook:st,Worksheet:v,toWidth:ot,toHeight:b,borderTemplate:kt,spreadsheetFilters:r}}(kendo.jQuery,kendo),kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.excel.min",["kendo.core.min","kendo.data.min","kendo.ooxml.min"],n)}(function(){return function(n,t){t.ExcelExporter=t.Class.extend({init:function(i){var r,f,u;i.columns=this._trimColumns(i.columns||[]),this.allColumns=n.map(this._leafColumns(i.columns||[]),this._prepareColumn),this.columns=n.grep(this.allColumns,function(n){return!n.hidden}),this.options=i,r=i.dataSource,r instanceof t.data.DataSource?(this.dataSource=new r.constructor(n.extend({},r.options,{page:i.allPages?0:r.page(),filter:r.filter(),pageSize:i.allPages?r.total():r.pageSize(),sort:r.sort(),group:r.group(),aggregate:r.aggregate()})),f=r.data(),f.length>0&&(this.dataSource._data=f,u=this.dataSource.transport,r._isServerGrouped()&&u.options&&u.options.data&&(u.options.data=null))):this.dataSource=t.data.DataSource.create(r)},_trimColumns:function(t){var i=this;return n.grep(t,function(n){var t=!!n.field;return!t&&n.columns&&(t=i._trimColumns(n.columns).length>0),t})},_leafColumns:function(n){for(var i=[],t=0;t<n.length;t++)n[t].columns?i=i.concat(this._leafColumns(n[t].columns)):i.push(n[t]);return i},workbook:function(){return n.Deferred(n.proxy(function(t){this.dataSource.fetch().then(n.proxy(function(){var n={sheets:[{columns:this._columns(),rows:this._rows(),freezePane:this._freezePane(),filter:this._filter()}]};t.resolve(n,this.dataSource.view())},this))},this)).promise()},_prepareColumn:function(i){var u,r;if(i.field)return u=function(n){return n.get(i.field)},r=null,i.values&&(r={},n.each(i.values,function(){r[this.value]=this.text}),u=function(n){return r[n.get(i.field)]}),n.extend({},i,{value:u,values:r,groupHeaderTemplate:t.template(i.groupHeaderTemplate||"#= title #: #= value #"),groupFooterTemplate:i.groupFooterTemplate?t.template(i.groupFooterTemplate):null,footerTemplate:i.footerTemplate?t.template(i.footerTemplate):null})},_filter:function(){if(!this.options.filterable)return null;var n=this._depth();return{from:n,to:n+this.columns.length-1}},_dataRow:function(t,i,r){var e,s,u,c,l,a,v,h,o,f;for(this._hierarchical()&&(i=this.dataSource.level(t)+1),e=[],s=0;s<i;s++)e[s]={background:"#dfdfdf",color:"#333"};if(r&&t.items)return u=n.grep(this.allColumns,function(n){return n.field==t.field})[0],c=u&&u.title?u.title:t.field,l=u?u.groupHeaderTemplate:null,a=c+": "+t.value,v=n.extend({title:c,field:t.field,value:u&&u.values?u.values[t.value]:t.value,aggregates:t.aggregates,items:t.items},t.aggregates[t.field]),l&&(a=l(v)),e.push({value:a,background:"#dfdfdf",color:"#333",colSpan:this.columns.length+r-i}),h=this._dataRows(t.items,i+1),h.unshift({type:"group-header",cells:e}),h.concat(this._footer(t));for(o=[],f=0;f<this.columns.length;f++)o[f]=this._cell(t,this.columns[f]);return this._hierarchical()&&(o[0].colSpan=r-i+1),[{type:"data",cells:e.concat(o)}]},_dataRows:function(n,t){for(var u=this._depth(),r=[],i=0;i<n.length;i++)r.push.apply(r,this._dataRow(n[i],t,u));return r},_footer:function(t){var r=[],i=!1,u=n.map(this.columns,n.proxy(function(r){if(r.groupFooterTemplate){var u={group:{items:t.items,field:t.field,value:t.value}};return i=!0,{background:"#dfdfdf",color:"#333",value:r.groupFooterTemplate(n.extend({},this.dataSource.aggregates(),t.aggregates,t.aggregates[r.field],u))}}return{background:"#dfdfdf",color:"#333"}},this));return i&&r.push({type:"group-footer",cells:n.map(Array(this.dataSource.group().length),function(){return{background:"#dfdfdf",color:"#333"}}).concat(u)}),r},_isColumnVisible:function(n){return this._visibleColumns([n]).length>0&&(n.field||n.columns)},_visibleColumns:function(t){var i=this;return n.grep(t,function(n){var t=!n.hidden;return t&&n.columns&&(t=i._visibleColumns(n.columns).length>0),t})},_headerRow:function(t,i){var r=n.map(t.cells,function(n){return{background:"#7a7a7a",color:"#fff",value:n.title,colSpan:n.colSpan>1?n.colSpan:1,rowSpan:t.rowSpan>1&&!n.colSpan?t.rowSpan:1}});return this._hierarchical()&&(r[0].colSpan=this._depth()+1),{type:"header",cells:n.map(Array(i.length),function(){return{background:"#7a7a7a",color:"#fff"}}).concat(r)}},_prependHeaderRows:function(n){var t,r=this.dataSource.group(),i=[{rowSpan:1,cells:[],index:0}];for(this._prepareHeaderRows(i,this.options.columns),t=i.length-1;t>=0;t--)n.unshift(this._headerRow(i[t],r))},_prepareHeaderRows:function(n,t,i,r){for(var u,f,o=r||n[n.length-1],e=n[o.index+1],h=0,s=0;s<t.length;s++)u=t[s],this._isColumnVisible(u)&&(f={title:u.title||u.field,colSpan:0},o.cells.push(f),u.columns&&u.columns.length&&(e||(e={rowSpan:0,cells:[],index:n.length},n.push(e)),f.colSpan=this._trimColumns(this._visibleColumns(u.columns)).length,this._prepareHeaderRows(n,u.columns,f,e),h+=f.colSpan-1,o.rowSpan=n.length-o.index));i&&(i.colSpan+=h)},_rows:function(){var i,r,u=this.dataSource.group(),t=this._dataRows(this.dataSource.view(),0);return this.columns.length&&(this._prependHeaderRows(t),i=!1,r=n.map(this.columns,n.proxy(function(t){if(t.footerTemplate){i=!0;var r=this.dataSource.aggregates();return{background:"#dfdfdf",color:"#333",value:t.footerTemplate(n.extend({},r,r[t.field]))}}return{background:"#dfdfdf",color:"#333"}},this)),i&&t.push({type:"footer",cells:n.map(Array(u.length),function(){return{background:"#dfdfdf",color:"#333"}}).concat(r)})),t},_headerDepth:function(n){for(var r,u=1,i=0,t=0;t<n.length;t++)n[t].columns&&(r=this._headerDepth(n[t].columns),r>i&&(i=r));return u+i},_freezePane:function(){var i=this._visibleColumns(this.options.columns||[]),t=this._visibleColumns(this._trimColumns(this._leafColumns(n.grep(i,function(n){return n.locked})))).length;return{rowSplit:this._headerDepth(i),colSplit:t?t+this.dataSource.group().length:0}},_cell:function(n,t){return{value:t.value(n)}},_hierarchical:function(){return this.options.hierarchy&&this.dataSource.level},_depth:function(){var i,t,u,r=this.dataSource,n=0;if(this._hierarchical()){for(i=r.view(),t=0;t<i.length;t++)u=r.level(i[t]),u>n&&(n=u);n++}else n=r.group().length;return n},_columns:function(){var i=this._depth(),t=n.map(Array(i),function(){return{width:20}});return t.concat(n.map(this.columns,function(n){return{width:parseInt(n.width,10),autoWidth:!n.width}}))}}),t.ExcelMixin={extend:function(t){t.events.push("excelExport"),t.options.excel=n.extend(t.options.excel,this.options),t.saveAsExcel=this.saveAsExcel},options:{proxyURL:"",allPages:!1,filterable:!1,fileName:"Export.xlsx"},saveAsExcel:function(){var i=this.options.excel||{},r=new t.ExcelExporter({columns:this.columns,dataSource:this.dataSource,allPages:i.allPages,filterable:i.filterable,hierarchy:i.hierarchy});r.workbook().then(n.proxy(function(n,r){if(!this.trigger("excelExport",{workbook:n,data:r})){var u=new t.ooxml.Workbook(n);t.saveAs({dataURI:u.toDataURL(),fileName:n.fileName||i.fileName,proxyURL:i.proxyURL,forceProxy:i.forceProxy})}},this))}}}(kendo.jQuery,kendo),kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.data.signalr.min",["kendo.data.min"],n)}(function(){return function(n){var t=kendo.data.RemoteTransport.extend({init:function(n){var t,r=n&&n.signalr?n.signalr:{},i=r.promise;if(!i)throw Error('The "promise" option must be set.');if("function"!=typeof i.done||"function"!=typeof i.fail)throw Error('The "promise" option must be a Promise.');if(this.promise=i,t=r.hub,!t)throw Error('The "hub" option must be set.');if("function"!=typeof t.on||"function"!=typeof t.invoke)throw Error('The "hub" option is not a valid SignalR hub proxy.');this.hub=t,kendo.data.RemoteTransport.fn.init.call(this,n)},push:function(n){var t=this.options.signalr.client||{};t.create&&this.hub.on(t.create,n.pushCreate),t.update&&this.hub.on(t.update,n.pushUpdate),t.destroy&&this.hub.on(t.destroy,n.pushDestroy)},_crud:function(t,i){var f,u,e=this.hub,r=this.options.signalr.server;if(!r||!r[i])throw Error(kendo.format('The "server.{0}" option must be set.',i));f=[r[i]],u=this.parameterMap(t.data,i),n.isEmptyObject(u)||f.push(u),this.promise.done(function(){e.invoke.apply(e,f).done(t.success).fail(t.error)})},read:function(n){this._crud(n,"read")},create:function(n){this._crud(n,"create")},update:function(n){this._crud(n,"update")},destroy:function(n){this._crud(n,"destroy")}});n.extend(!0,kendo.data,{transports:{signalr:t}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("drawing/util.min",["kendo.core.min"],n)}(function(){return function(n){function i(){return n.Deferred()}function t(t){return n.when.apply(n,t)}kendo.drawing.util=kendo.drawing.util||{},kendo.deepExtend(kendo.drawing.util,{createPromise:i,promiseAll:t})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.color.min",["kendo.core.min"],n)}(function(){function s(n,t,i){void 0===i&&(i="0");for(var r=n.toString(16);t>r.length;)r=i+r;return r}function o(n,t,i){var r=i;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?n+6*(t-n)*r:r<.5?t:r<2/3?n+(t-n)*(2/3-r)*6:n}function c(t,e){var o,h,s;if(null==t||"none"===t)return null;if(t instanceof i)return t;if(s=t.toLowerCase(),o=u.exec(s))return s="transparent"===o[1]?new n(1,1,1,0):c(f[o[1]],e),s.match=[o[1]],s;if((o=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(s))?h=new r(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16),1):(o=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(s))?h=new r(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16),1):(o=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(s))?h=new r(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),1):(o=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(s))?h=new r(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),parseFloat(o[4])):(o=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(s))?h=new n(parseFloat(o[1])/100,parseFloat(o[2])/100,parseFloat(o[3])/100,1):(o=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(s))&&(h=new n(parseFloat(o[1])/100,parseFloat(o[2])/100,parseFloat(o[3])/100,parseFloat(o[4]))),h)h.match=o;else if(!e)throw Error("Cannot parse color: "+s);return h}var v,y,f,l,u,a,i,n,r,e,h,t;window.kendo=window.kendo||{},v=kendo.Class,y=kendo.support,f={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},l=y.browser,u=["transparent"];for(a in f)f.hasOwnProperty(a)&&u.push(a);u=RegExp("^("+u.join("|")+")(\\W|$)","i"),i=v.extend({init:function(){},toHSV:function(){return this},toRGB:function(){return this},toHex:function(){return this.toBytes().toHex()},toBytes:function(){return this},toCss:function(){return"#"+this.toHex()},toCssRgba:function(){var n=this.toBytes();return"rgba("+n.r+", "+n.g+", "+n.b+", "+parseFloat((+this.a).toFixed(3))+")"},toDisplay:function(){return l.msie&&l.version<9?this.toCss():this.toCssRgba()},equals:function(n){return n===this||null!==n&&this.toCssRgba()===c(n).toCssRgba()},diff:function(n){var i,t;return null===n?NaN:(i=this.toBytes(),t=n.toBytes(),Math.sqrt(Math.pow(.3*(i.r-t.r),2)+Math.pow(.59*(i.g-t.g),2)+Math.pow(.11*(i.b-t.b),2)))},clone:function(){var n=this.toBytes();return n===this&&(n=new r(n.r,n.g,n.b,n.a)),n}}),n=i.extend({init:function(n,t,r,u){i.fn.init.call(this),this.r=n,this.g=t,this.b=r,this.a=u},toHSV:function(){var t,s,o=this,u=o.r,i=o.g,f=o.b,c=Math.min(u,i,f),n=Math.max(u,i,f),r=n-c,h=n;return 0===r?new e(0,0,h,this.a):(0!==n?(s=r/n,t=u===n?(i-f)/r:i===n?2+(f-u)/r:4+(u-i)/r,t*=60,t<0&&(t+=360)):(s=0,t=-1),new e(t,s,h,this.a))},toHSL:function(){var r,o,u,c=this,e=c.r,i=c.g,t=c.b,n=Math.max(e,i,t),f=Math.min(e,i,t),s=(n+f)/2;if(n===f)r=o=0;else{switch(u=n-f,o=s>.5?u/(2-n-f):u/(n+f),n){case e:r=(i-t)/u+(i<t?6:0);break;case i:r=(t-e)/u+2;break;case t:r=(e-i)/u+4}r*=60,o*=100,s*=100}return new h(r,o,s,this.a)},toBytes:function(){return new r(255*this.r,255*this.g,255*this.b,this.a)}}),r=n.extend({init:function(t,i,r,u){n.fn.init.call(this,Math.round(t),Math.round(i),Math.round(r),u)},toRGB:function(){return new n(this.r/255,this.g/255,this.b/255,this.a)},toHSV:function(){return this.toRGB().toHSV()},toHSL:function(){return this.toRGB().toHSL()},toHex:function(){return s(this.r,2)+s(this.g,2)+s(this.b,2)},toBytes:function(){return this}}),e=i.extend({init:function(n,t,r,u){i.fn.init.call(this),this.h=n,this.s=t,this.v=r,this.a=u},toRGB:function(){var i,u,r,c,h,f,s,e,l=this,a=l.h,o=l.s,t=l.v;if(0===o)i=u=r=t;else switch(a/=60,c=Math.floor(a),h=a-c,f=t*(1-o),s=t*(1-o*h),e=t*(1-o*(1-h)),c){case 0:i=t,u=e,r=f;break;case 1:i=s,u=t,r=f;break;case 2:i=f,u=t,r=e;break;case 3:i=f,u=s,r=t;break;case 4:i=e,u=f,r=t;break;default:i=t,u=f,r=s}return new n(i,u,r,this.a)},toHSL:function(){return this.toRGB().toHSL()},toBytes:function(){return this.toRGB().toBytes()}}),h=i.extend({init:function(n,t,r,u){i.fn.init.call(this),this.h=n,this.s=t,this.l=r,this.a=u},toRGB:function(){var s,e,c,i,f,h=this,u=h.h,r=h.s,t=h.l;return 0===r?s=e=c=t:(u/=360,r/=100,t/=100,i=t<.5?t*(1+r):t+r-t*r,f=2*t-i,s=o(f,i,u+1/3),e=o(f,i,u),c=o(f,i,u-1/3)),new n(s,e,c,this.a)},toHSV:function(){return this.toRGB().toHSV()},toBytes:function(){return this.toRGB().toBytes()}}),t=v.extend({init:function(n){var u,s,i,o,h,f,r,e=this;if(1===arguments.length)for(u=t.formats,s=this.resolveColor(n),i=0;i<u.length;i++)o=u[i].re,h=u[i].process,f=o.exec(s),f&&(r=h(f),e.r=r[0],e.g=r[1],e.b=r[2]);else this.r=arguments[0],this.g=arguments[1],this.b=arguments[2];this.r=this.normalizeByte(this.r),this.g=this.normalizeByte(this.g),this.b=this.normalizeByte(this.b)},toHex:function(){var n=this.padDigit,r=this.r.toString(16),i=this.g.toString(16),t=this.b.toString(16);return"#"+n(r)+n(i)+n(t)},resolveColor:function(n){var i=n||"black";return"#"===i.charAt(0)&&(i=i.substr(1,6)),i=i.replace(/ /g,""),i=i.toLowerCase(),i=t.namedColors[i]||i},normalizeByte:function(n){return n<0||isNaN(n)?0:n>255?255:n},padDigit:function(n){return 1===n.length?"0"+n:n},brightness:function(n){var t=Math.round;return this.r=t(this.normalizeByte(this.r*n)),this.g=t(this.normalizeByte(this.g*n)),this.b=t(this.normalizeByte(this.b*n)),this},percBrightness:function(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)}}),t.fromBytes=function(n,t,i,u){return new r(n,t,i,null!=u?u:1)},t.fromRGB=function(t,i,r,u){return new n(t,i,r,null!=u?u:1)},t.fromHSV=function(n,t,i,r){return new e(n,t,i,null!=r?r:1)},t.fromHSL=function(n,t,i,r){return new h(n,t,i,null!=r?r:1)},t.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(n){return[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(n){return[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(n){return[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]}}],t.namedColors=f,kendo.deepExtend(kendo,{parseColor:c,Color:t})},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("util/text-metrics.min",["kendo.core.min"],n)}(function(){!function(n){function o(n){var t,i=[];for(t in n)i.push(t+n[t]);return i.sort().join("")}function f(n){for(var t=2166136261,i=0;i<n.length;++i)t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24),t^=n.charCodeAt(i);return t>>>0}function e(){return{width:0,height:0,baseline:0}}function s(n,i,r){return t.current.measure(n,i,r)}var r,u,i,t;window.kendo.util=window.kendo.util||{},r=kendo.Class.extend({init:function(n){this._size=n,this._length=0,this._map={}},put:function(n,t){var r=this._map,i={key:n,value:t};r[n]=i,this._head?(this._tail.newer=i,i.older=this._tail,this._tail=i):this._head=this._tail=i,this._length>=this._size?(r[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},get:function(n){var t=this._map[n];if(t)return t===this._head&&t!==this._tail&&(this._head=t.newer,this._head.older=null),t!==this._tail&&(t.older&&(t.older.newer=t.newer,t.newer.older=t.older),t.older=this._tail,t.newer=null,this._tail.newer=t,this._tail=t),t.value}}),u={baselineMarkerSize:1},"undefined"!=typeof document&&(i=document.createElement("div"),i.style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: nowrap!important;"),t=kendo.Class.extend({init:function(t){this._cache=new r(1e3),this.options=n.extend({},u,t)},measure:function(n,t,r){var y,l,v,s,u,c,h,a;if(!n)return e();if(y=o(t),l=f(n+y),v=this._cache.get(l))return v;s=e(),u=r||i,c=this._baselineMarker().cloneNode(!1);for(h in t)a=t[h],void 0!==a&&(u.style[h]=a);return u.textContent=n,u.appendChild(c),document.body.appendChild(u),(n+"").length&&(s.width=u.offsetWidth-this.options.baselineMarkerSize,s.height=u.offsetHeight,s.baseline=c.offsetTop+this.options.baselineMarkerSize),s.width>0&&s.height>0&&this._cache.put(l,s),u.parentNode.removeChild(u),s},_baselineMarker:function(){var n=document.createElement("div");return n.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",n}}),t.current=new t,kendo.deepExtend(kendo.util,{LRUCache:r,TextMetrics:t,measureText:s,objectKey:o,hashKey:f})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("drawing/kendo-drawing.min",["drawing/util.min","kendo.color.min","util/text-metrics.min"],n)}(function(){!function(n){function dr(n,t){return n.push.apply(n,t),n}function tf(n){for(var t=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],i="";n>0;)n<t[0]?t.shift():(i+=nc[t[0]],n-=t[0]);return i}function r(n){return typeof n!==kh}function yu(){return"kdef"+dh++}function wi(n){return n/fu}function va(n){for(var t,i="",r=0;r<n.length;r++)t=n.charCodeAt(r),t<128?i+=ui(t):t<2048?(i+=ui(192|t>>>6),i+=ui(128|63&t)):t<65536&&(i+=ui(224|t>>>12),i+=ui(128|t>>>6&63),i+=ui(128|63&t));return i}function ks(n){for(var o,f,u,c,h,s,i,e="",r=0,t=va(n);r<t.length;)o=t.charCodeAt(r++),f=t.charCodeAt(r++),u=t.charCodeAt(r++),c=o>>2,h=(3&o)<<4|f>>4,s=(15&f)<<2|u>>6,i=63&u,isNaN(f)?s=i=64:isNaN(u)&&(i=64),e=e+hr.charAt(c)+hr.charAt(h)+hr.charAt(s)+hr.charAt(i);return e}function bs(n){return r((n.x||{}).location)?{x:n.x.location,y:n.y.location}:{x:n.pageX||n.clientX||0,y:n.pageY||n.clientY||0}}function hs(n){return void 0===n&&(n={}),n.touch?n.touch.initialTouch:n.target}function ti(n){return""===n||null===n||"none"===n||"transparent"===n||!r(n)}function it(n){if(n)return n[n.length-1]}function ss(n,t,i){return Math.max(Math.min(n,i),t)}function tu(n,t){function r(n,i){for(var r=[],f=0,u=0,e=0;f<n.length&&u<i.length;)r[e++]=t(n[f],i[u])<=0?n[f++]:i[u++];return f<n.length&&r.push.apply(r,n.slice(f)),u<i.length&&r.push.apply(r,i.slice(u)),r}return n.length<2?n.slice():function i(n){var f,t,u;return n.length<=1?n:(f=Math.floor(n.length/2),t=n.slice(0,f),u=n.slice(f),t=i(t),u=i(u),r(t,u))}(n)}function at(n){return n*fu}function dl(n){return n?Math.pow(10,n):1}function s(n,t){var i=dl(t);return Math.round(n*i)/i}function ve(n,t){return r(n)?n:t}function ye(n,t){var r,u,i;for(r in t)for(u=r.trim().split(" "),i=0;i<u.length;i++)n.addEventListener(u[i],t[r],!1)}function cs(n){var i=n.getBoundingClientRect(),t=document.documentElement;return{top:i.top+(window.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}}function so(n,t){for(var r,f={},e=window.getComputedStyle(n),u=Array.isArray(t)?t:[t],i=0;i<u.length;i++)r=u[i],f[r]=e[r];return f}function sh(n){return isNaN(n)?n:n+"px"}function kr(n,t){var f,u,i;return t?(f=t.width,u=t.height,r(f)&&(n.style.width=sh(f)),r(u)&&(n.style.height=sh(u)),void 0):(i=so(n,["width","height"]),{width:parseInt(i.width,10),height:parseInt(i.height,10)})}function ee(n,t){var r,u,i;void 0===t&&(t={});for(r in t)for(u=r.trim().split(" "),i=0;i<u.length;i++)n.removeEventListener(u[i],t[r],!1)}function cv(n){return function(t){return this[n]!==t&&(this[n]=t,this.geometryChange()),this}}function ov(n){return function(){return this[n]}}function uu(n,t){for(var i,u,r=0;r<t.length;r++)i=t[r],u=i.charAt(0).toUpperCase()+i.substring(1,i.length),n["set"+u]=cv(i),n["get"+u]=ov(i)}function dt(n){return n&&"function"==typeof n.matrix?n.matrix():n}function w(n){return null===n?null:n instanceof rr?n:new rr(n)}function gs(n,t,i,r){var f=0,u=0;return r&&(f=Math.atan2(r.c*i,r.a*t),0!==r.b&&(u=Math.atan2(r.d*i,r.b*t))),{x:f,y:u}}function ev(n){var t="_"+n;return function(n){return r(n)?(this._observerField(t,n),this.geometryChange(),this):this[t]}}function nf(n,t){for(var i=0;i<t.length;i++)n[t[i]]=ev(t[i])}function es(n,t,i){return void 0===i&&(i=ot),0===s(Math.abs(n-t),i)}function kf(n,t,i){return n<t||es(n,t,i)}function av(n,i,r,u){var e=i.x-n.x,c=u.x-r.x,o=i.y-n.y,l=u.y-r.y,a=n.x-r.x,v=n.y-r.y,s=e*l-c*o,h=(e*v-o*a)/s,f=(c*v-l*a)/s;if(h>=0&&h<=1&&f>=0&&f<=1)return new t(n.x+f*e,n.y+f*o)}function wv(n,t,i){var r,u=t;return n>u&&(u+=360),r=Math.abs(u-n),i||(r=360-r),r}function di(n,t,i,r,u,f){var o=s((u-n)/i,3),e=s((f-t)/r,3);return s(wi(Math.atan2(e,o)))}function pv(n){var r,e,g,it,d,f,nt,l,ut,b,o,c,tt,ft,v,w,p,rt,s=n.x1,y=n.y1,i=n.x2,u=n.y2,a=n.rx,h=n.ry,et=n.largeArc,ot=n.swipe;if(y!==u)ut=i-s,b=u-y,o=k(a,2),c=k(h,2),tt=(c*ut*(s+i)+o*b*(y+u))/(2*o*b),ft=tt-u,v=-(ut*c)/(o*b),d=1/o+k(v,2)/c,f=2*(v*ft/c-i/o),nt=k(i,2)/o+k(ft,2)/c-1,l=Math.sqrt(k(f,2)-4*d*nt),r=(-f-l)/(2*d),e=tt+v*r,g=(-f+l)/(2*d),it=tt+v*g;else{if(s===i)return!1;f=-2*u,nt=k((i-s)*h/(2*a),2)+k(u,2)-k(h,2),l=Math.sqrt(k(f,2)-4*nt),r=g=(s+i)/2,e=(-f-l)/2,it=(-f+l)/2}return w=di(r,e,a,h,s,y),p=di(r,e,a,h,i,u),rt=wv(w,p,ot),(et&&rt<=180||!et&&rt>180)&&(r=g,e=it,w=di(r,e,a,h,s,y),p=di(r,e,a,h,i,u)),{center:new t(r,e),startAngle:w,endAngle:p}}function go(n,t){for(var i=n;i<t;)i+=90;return i}function gl(n){var i="_"+n;return function(n){return r(n)?(this._observerField(i,t.create(n)),this.geometryChange(),this):this[i]}}function iu(n,t){for(var i=0;i<t.length;i++)n[t[i]]=gl(t[i])}function fs(n,t,i){var u=wi(Math.atan2(t.y-n.y,t.x-n.x)),r=i.transformCopy(w().rotate(-u,n));return r.x<n.x}function wu(n,t,i){var r=1-n;return Math.pow(r,3)*i[0][t]+3*Math.pow(r,2)*n*i[1][t]+3*Math.pow(n,2)*r*i[2][t]+Math.pow(n,3)*i[3][t]}function wo(n,t){return[-n[0][t]+3*n[1][t]-3*n[2][t]+n[3][t],3*(n[0][t]-2*n[1][t]+n[2][t]),3*(-n[0][t]+n[1][t]),n[0][t]]}function ch(n){return n<0?-1:1}function bl(n,t,i){var r=Math.sqrt(Math.pow(t,2)-4*n*i);return[(-t+r)/(2*n),(-t-r)/(2*n)]}function il(n,t,i,r){var b,e,o,v,c,u,f,p,w,y,l,a,h;return 0===n?bl(t,i,r):(b=(3*n*i-Math.pow(t,2))/(3*Math.pow(n,2)),e=(2*Math.pow(t,3)-9*n*t*i+27*Math.pow(n,2)*r)/(27*Math.pow(n,3)),o=Math.pow(b/3,3)+Math.pow(e/2,2),v=new rt(0,1),c=-t/(3*n),o<0?(u=new rt(-e/2,Math.sqrt(-o)).nthRoot(3),f=new rt(-e/2,-Math.sqrt(-o)).nthRoot(3)):(u=-e/2+Math.sqrt(o),u=new rt(ch(u)*Math.pow(Math.abs(u),1/3)),f=-e/2-Math.sqrt(o),f=new rt(ch(f)*Math.pow(Math.abs(f),1/3))),p=u.add(f),l=u.add(f).multiplyConstant(-.5),a=u.add(f.negate()).multiplyConstant(Math.sqrt(3)/2),w=l.add(v.multiply(a)),y=l.add(v.negate().multiply(a)),h=[],p.isReal()&&h.push(s(p.real+c,ot)),w.isReal()&&h.push(s(w.real+c,ot)),y.isReal()&&h.push(s(y.real+c,ot)),h)}function lu(n,t,i,r,u){for(var s,e=wo(n,r),o=il(e[0],e[1],e[2],e[3]-t[r]),f=0;f<o.length;f++)if(0<=o[f]&&o[f]<=1&&(s=wu(o[f],i,n),Math.abs(s-t[i])<=u))return!0}function wl(n,t,i){for(var e,s,f=wo(n,"x"),u=il(f[0],f[1],f[2],f[3]-t.x),o=0,r=0;r<u.length;r++)e=wu(u[r],"y",n),s=es(e,t.y)||e>t.y,s&&((0===u[r]||1===u[r])&&i.bottomRight().x>t.x||0<u[r]&&u[r]<1)&&o++;return o}function cl(n,t,i){var s,f,u,r,e,o;return n.x!==t.x&&(f=Math.min(n.x,t.x),u=Math.max(n.x,t.x),r=Math.min(n.y,t.y),e=Math.max(n.y,t.y),o=f<=i.x&&i.x<u,s=r===e?i.y<=r&&o:o&&(e-r)*((n.x-t.x)*(n.y-t.y)>0?i.x-f:u-i.x)/(u-f)+r-i.y>=0),s?1:0}function hl(n){for(var u=n.length,i=ei,r=ri,t=0;t<u;t++)r=Math.max(r,n[t]),i=Math.min(i,n[t]);return{min:i,max:r}}function su(n,t,i){for(var e,r,u,o=0;o<n.length;o++)r=n[o],r.visible()&&(u=t?r.bbox(i):r.rawBBox(),u&&(e=e?f.union(e,u):u));return e}function sl(n,t){for(var u,e,i,r=0;r<n.length;r++)e=n[r],e.visible()&&(i=e.clippedBBox(t),i&&(u=u?f.union(u,i):i));return u}function gu(n,t,i){var u=i.transform()||w(),r=u.matrix();r.e+=n.x-t.origin.x,r.f+=n.y-t.origin.y,u.matrix(r),i.transform(u)}function gr(n,t,i,r,u){var f;return f="start"===i?t.origin[r]:"end"===i?t.origin[r]+t.size[u]-n:t.origin[r]+(t.size[u]-n)/2}function fl(n,t,i,r,u){for(var f,o,e=0;e<n.length;e++)f=n[e].clippedBBox(),f&&(o=f.origin.clone(),o[r]=gr(f.size[u],t,i||"start",r,u),gu(o,f,n[e]))}function dv(n,t,i){fl(n,t,i,"x","width")}function iv(n,t,i){fl(n,t,i,"y","height")}function rf(n,i,r,u){var o,s,f,h,e;if(n.length>1)for(o=new t,s=n[0].bbox,f=1;f<n.length;f++)h=n[f].element,e=n[f].bbox,o[i]=s.origin[i]+s.size[u],o[r]=e.origin[r],gu(o,e,h),e.origin[i]=o[i],s=e}function nl(n){for(var r,i,u=[],t=0;t<n.length;t++)r=n[t],i=r.clippedBBox(),i&&u.push({element:r,bbox:i});return u}function ka(n){rf(nl(n),"x","y","width")}function hv(n){rf(nl(n),"y","x","height")}function uv(n,t,i){for(var h,s,e,l=t.size[i],u=[],r=[],f=0,c=function(){r.push({element:h,bbox:s})},o=0;o<n.length;o++)h=n[o],s=h.clippedBBox(),s&&(e=s.size[i],f+e>l?r.length?(u.push(r),r=[],c(),f=e):(c(),u.push(r),r=[],f=0):(c(),f+=e));return r.length&&u.push(r),u}function gh(n,t,i,r,u){for(var e,f,s,l=uv(n,t,u),h=t.origin.clone(),c=[],o=0;o<l.length;o++)for(e=l[o],f=e[0],h[r]=f.bbox.origin[r],gu(h,f.bbox,f.element),f.bbox.origin[i]=h[i],rf(e,i,r,u),c.push([]),s=0;s<e.length;s++)c[o].push(e[s].element);return c}function fv(n,t){return gh(n,t,"x","y","width")}function sv(n,t){return gh(n,t,"y","x","height")}function rv(n,t){var r,i,f,u,e=n.clippedBBox();e&&(r=e.size,i=t.size,(i.width<r.width||i.height<r.height)&&(f=Math.min(i.width/r.width,i.height/r.height),u=n.transform()||w(),u.scale(f,f),n.transform(u)))}function da(n){return function(t){return r(t)?(this.options.set(n,t),this):this.options.get(n)}}function ba(n,t){for(var i=0;i<t.length;i++)n[t[i]]=da(t[i])}function iy(n){return.5-Math.cos(n*Math.PI)/2}function kv(n){return n}function yv(n,t,i,r){var e=1.70158,u=0,f=r;return 0===n?i:1===n?i+r:(u||(u=.5),f<Math.abs(r)?(f=r,e=u/4):e=u/(2*Math.PI)*Math.asin(r/f),f*Math.pow(2,-10*n)*Math.sin((+n-e)*1.1*Math.PI/u)+r+i)}function uc(n,t,i){for(var u=t?0:1,r=0;r<n.length;r+=2)n.splice(r+u,0,i)}function vc(n,t){if(n&&t)return t.scaleCopy(2).translate(-n.x,-n.y)}function ac(n,t,i){var r=t.clone().scale(2/3);return{controlOut:r.clone().translateWith(n.scaleCopy(fe)),controlIn:r.translateWith(i.scaleCopy(fe))}}function wa(n){var t=[];return n.replace(ih,function(n,i){t.push(parseFloat(i))}),t}function nu(n,t){return r(t)&&null!==t?" "+n+"='"+t+"' ":""}function oi(n){for(var i="",t=0;t<n.length;t++)i+=nu(n[t][0],n[t][1]);return i}function lc(n){for(var u,i="",t=0;t<n.length;t++)u=n[t][1],r(u)&&(i+=n[t][0]+":"+u+";");if(""!==i)return i}function cc(n,t){return"clip"===n||"fill"===n&&(!t||"Gradient"===t.nodeType)}function ra(){var r=document.getElementsByTagName("base")[0],n=document.location.href,t=n.indexOf("#"),i="";return r&&!gf.browser.msie&&(t!==-1&&(n=n.substring(0,t)),i=n),i}function ah(n){return"url("+ra()+"#"+n+")"}function ea(n){var t,u,r,i;try{t=n.getScreenCTM?n.getScreenCTM():null}catch(f){}t&&(u=-t.e%1,r=-t.f%1,i=n.style,0===u&&0===r||(i.left=u+"px",i.top=r+"px"))}function de(n){if(!n||!n.indexOf||n.indexOf("&")<0)return n;var t=de._element;return t.innerHTML=n,t.textContent||t.innerText}function hc(n){var r,t,e,i=new cu,f=n.clippedBBox(),u=n;return f&&(r=f.getOrigin(),t=new l,t.transform(w().translate(-r.x,-r.y)),t.children.push(n),u=t),i.load([u]),e="<?xml version='1.0' ?><svg xmlns='"+tr+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+i.render()+"</svg>",i.destroy(),e}function bu(n,t){var f,i,u,s,o,e,r=t.segments;if(0!==r.length){for(f=r[0],i=f.anchor(),n.moveTo(i.x,i.y),u=1;u<r.length;u++)f=r[u],i=f.anchor(),s=r[u-1],o=s.controlOut(),e=f.controlIn(),o&&e?n.bezierCurveTo(o.x,o.y,e.x,e.y,i.x,i.y):n.lineTo(i.x,i.y);t.options.closed&&n.closePath()}}function oa(n,t){return n._zIndex<t._zIndex?1:n._zIndex>t._zIndex?-1:0}function sa(n,t){for(var i,u,r=0;r<t.length;r++)i=t[r],u=kendo.parseColor(i.color()),u.a*=i.opacity(),n.addColorStop(i.offset(),u.toCssRgba())}function fa(t,i){var h,a,o,u,e,r,v,y,s={width:"800px",height:"600px",cors:"Anonymous"},f=t,c=t.clippedBBox();return c&&(h=c.getOrigin(),f=new l,f.transform(w().translate(-h.x,-h.y)),f.children.push(t),a=c.getSize(),s.width=a.width+"px",s.height=a.height+"px"),o=n.extend(s,i),u=document.createElement("div"),e=u.style,e.display="none",e.width=o.width,e.height=o.height,document.body.appendChild(u),r=new cr(u,o),r.suspendTracking(),r.draw(f),v=r.image(),y=function(){r.destroy(),document.body.removeChild(u)},v.then(y,y),v}function ia(n,t){var i=hc(n);return t&&t.raw||(i="data:image/svg+xml;base64,"+ks(i)),gt().resolve(i)}function pt(n){return Array.prototype.slice.call(n)}function ua(n,t){n.classList?n.classList.add(t):n.className+=" "+t}function ya(n,t){n.classList?n.classList.remove(t):n.className=n.className.split(/\s+/).reduce(function(n,i){return i!=t&&n.push(i),n},[]).join(" ")}function er(n,t){Object.keys(t).forEach(function(i){n.style[i]=t[i]})}function sr(n,t){if(n.closest)return n.closest(t);for(;n&&!/^\[object (?:HTML)?Document\]$/.test(n+"");){if(fr(n,t))return n;n=n.parentNode}}function pa(n){return"number"==typeof n?{x:n,y:n}:Array.isArray(n)?{x:n[0],y:n[1]}:{x:n.x,y:n.y}}function no(n,t){function e(n){var i=new l,f=n.getBoundingClientRect();return hu(i,[r.x,0,0,r.y,-f.left*r.x,-f.top*r.y]),u._clipbox=!1,u._matrix=o.unit(),u._stackingContext={element:n,group:i},u._avoidLinks=t.avoidLinks===!0?"a":t.avoidLinks,ua(n,"k-pdf-export"),wr(n,i),ya(n,"k-pdf-export"),i}function s(n){if(null!=n)return"string"==typeof n&&(n=kendo.template(n.replace(/^\s+|\s+$/g,""))),"function"==typeof n?function(t){var r,i=n(t);return i&&"string"==typeof i&&(r=document.createElement("div"),r.innerHTML=i,i=r.firstElementChild),i}:function(){return n.cloneNode(!0)}}function h(n,t,r,u,f,e,o){function g(){function u(){kl(l,function(){n({pages:l,container:a})})}var t,i;("-"!=r||f)&&b(h),t=d(),h.parentNode.insertBefore(t,h),t.appendChild(h),tt?(i=l.length,l.forEach(function(n,t){var r=tt({element:n,pageNum:t+1,totalPages:l.length});r&&(n.appendChild(r),wc(r,function(){0==--i&&u()}))})):u()}function rt(n){if(o.keepTogether&&fr(n,o.keepTogether)&&n.offsetHeight<=f-v)return!0;var t=n.tagName;return!(/^h[1-6]$/i.test(t)&&n.offsetHeight>=f-v)&&(n.getAttribute("data-kendo-chart")||/^(?:img|tr|thead|th|tfoot|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(n.tagName))}function b(n){var o,l,s,h,u,t,e;for("TABLE"==n.tagName&&er(n,{tableLayout:"fixed"}),o=p(n),l=parseFloat(i(o,"padding-bottom")),s=parseFloat(i(o,"border-bottom-width")),h=v,v+=l+s,u=!0,t=n.firstChild;t;t=t.nextSibling)if(1==t.nodeType){if(u=!1,fr(t,r)){c(t);continue}if(!f){b(t);continue}if(!/^(?:static|relative)$/.test(i(p(t),"position")))continue;e=k(t),1==e?c(t):e&&rt(t)?c(t):b(t)}else 3==t.nodeType&&f&&(nt(t,u),u=!1);v=h}function it(n){var i=n.parentNode,t=i.firstChild;if(n===t)return!0;if(n===i.children[0]){if(7==t.nodeType||8==t.nodeType)return!0;if(3==t.nodeType)return!/\S/.test(t.data)}return!1}function c(n){var t,e,f,i,s,u,r;return 1==n.nodeType&&n!==h&&it(n)?c(n.parentNode):(t=sr(n,"table"),e=t&&t.querySelector("colgroup"),o.repeatHeaders&&(f=t&&t.querySelector("thead"),i=sr(n,'.k-grid[data-role="grid"]'),i&&i.querySelector(".k-auto-scrollable")&&(s=i.querySelector(".k-grid-header"))),u=d(),r=y.createRange(),r.setStartBefore(h),r.setEndBefore(n),u.appendChild(r.extractContents()),h.parentNode.insertBefore(u,h),w(n.parentNode),t&&(t=sr(n,"table"),o.repeatHeaders&&f&&t.insertBefore(f.cloneNode(!0),t.firstChild),e&&t.insertBefore(e.cloneNode(!0),t.firstChild)),void(o.repeatHeaders&&s&&(i=sr(n,'.k-grid[data-role="grid"]'),i.insertBefore(s.cloneNode(!0),i.firstChild))))}function d(){var n=y.createElement("KENDO-PDF-PAGE");return er(n,{display:"block",boxSizing:"content-box",width:u?u+"px":"auto",padding:e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px",position:"relative",height:f?f+"px":"auto",overflow:f||u?"hidden":"visible",clear:"both"}),o&&o.pageClassName&&(n.className=o.pageClassName),l.push(n),n}function k(n){var r,i,t=n.getBoundingClientRect();return 0===t.width||0===t.height?0:(r=h.getBoundingClientRect().top,i=f-v,t.height>i?3:t.top-r>i?1:t.bottom-r>i?2:0)}function nt(n,t){var f,i,e,r,u;/\S/.test(n.data)&&(f=n.data.length,i=y.createRange(),i.selectNodeContents(n),e=k(i),e&&(r=n,1==e?c(t?n.parentNode:n):(!function o(t,r,u){return i.setEnd(n,r),t==r||r==u?r:k(i)?o(t,t+r>>1,r):o(r,r+u>>1,u)}(0,f>>1,f),!/\S/.test(""+i)&&t?c(n.parentNode):(r=n.splitText(i.endOffset),u=d(),i.setStartBefore(h),u.appendChild(i.extractContents()),h.parentNode.insertBefore(u,h),w(r.parentNode))),nt(r)))}function w(n){var t=sr(n,"li");t&&(t.setAttribute("kendo-no-bullet","1"),w(t.parentNode))}var tt=s(o.template),y=t.ownerDocument,l=[],h=o._destructive?t:ys(t),a=y.createElement("KENDO-PDF-DOCUMENT"),v=0;pt(h.querySelectorAll("tfoot")).forEach(function(n){n.parentNode.appendChild(n)}),pt(h.querySelectorAll("ol")).forEach(function(n){pt(n.children).forEach(function(n,t){n.setAttribute("kendo-split-index",t)})}),er(a,{display:"block",position:"absolute",boxSizing:"content-box",left:"-10000px",top:"-10000px"}),u&&(er(a,{width:u+"px",paddingLeft:e.left+"px",paddingRight:e.right+"px"}),er(h,{overflow:"hidden"})),t.parentNode.insertBefore(a,t),a.appendChild(h),o.beforePageBreak?setTimeout(function(){o.beforePageBreak(a,g)},15):setTimeout(g,15)}var f,r;if(t||(t={}),f=gt(),!n)return f.reject("No element to export");if("function"!=typeof window.getComputedStyle)throw Error("window.getComputedStyle is missing.  You are using an unsupported browser, or running in IE8 compatibility mode.  Drawing HTML is supported in Chrome, Firefox, Safari and IE9+.");return kendo.pdf.defineFont(sc(n.ownerDocument)),r=pa(t.scale||1),wc(n,function(){var o,v=t&&t.forcePageBreak,c=t&&t.paperSize&&"auto"!=t.paperSize,a=kendo.pdf.getPaperOptions(function(n,i){return"paperSize"==n?c?t[n]:"A4":n in t?t[n]:i}),s=c&&a.paperSize[0],u=c&&a.paperSize[1],i=t.margin&&a.margin,y=!!i;v||u?(i||(i={left:0,top:0,right:0,bottom:0}),s&&(s/=r.x),u&&(u/=r.y),i.left/=r.x,i.right/=r.x,i.top/=r.y,i.bottom/=r.y,o=new l({pdf:{multiPage:!0,paperSize:c?a.paperSize:"auto",_ignoreMargin:y}}),h(function(n){if(t.progress){var r=!1,i=0;!function u(){if(i<n.pages.length){var s=e(n.pages[i]);o.append(s),t.progress({page:s,pageNum:++i,totalPages:n.pages.length,cancel:function(){r=!0}}),r?n.container.parentNode.removeChild(n.container):setTimeout(u)}else n.container.parentNode.removeChild(n.container),f.resolve(o)}()}else n.pages.forEach(function(n){o.append(e(n))}),n.container.parentNode.removeChild(n.container),f.resolve(o)},n,v,s?s-i.left-i.right:null,u?u-i.top-i.bottom:null,i,t)):f.resolve(e(n))}),f}function sc(n){function u(n){if(n){var t=null;try{t=n.cssRules}catch(i){}t&&f(n,t)}}function e(n){var t,r=i(n.style,"src");return r?d(r).reduce(function(n,t){var i=ge(t);return i&&n.push(i),n},[]):(t=ge(n.cssText),t?[t]:[])}function f(n,t){for(var r,f,a,c,l,h,s=0;s<t.length;++s)switch(r=t[s],r.type){case 3:u(r.styleSheet);break;case 5:f=r.style,a=d(i(f,"font-family")),c=/^([56789]00|bold)$/i.test(i(f,"font-weight")),l="italic"==i(f,"font-style"),h=e(r),h.length>0&&o(n,a,c,l,h[0])}}function o(n,t,i,u,f){/^data:/i.test(f)||/^[^\/:]+:\/\//.test(f)||/^\//.test(f)||(f=(n.href+"").replace(/[^\/]*$/,"")+f),t.forEach(function(n){n=n.replace(/^(['"]?)(.*?)\1$/,"$2"),i&&(n+="|bold"),u&&(n+="|italic"),r[n]=f})}var r,t;for(null==n&&(n=document),r={},t=0;t<n.styleSheets.length;++t)u(n.styleSheets[t]);return r}function or(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function aa(n){return n="_counter_"+n,u[n]}function ha(n){var i=[],t=u;for(n="_counter_"+n;t;)or(t,n)&&i.push(t[n]),t=Object.getPrototypeOf(t);return i.reverse()}function ca(n,t){var i=u;for(n="_counter_"+n;i&&!or(i,n);)i=Object.getPrototypeOf(i);i||(i=u._root),i[n]=(i[n]||0)+(null==t?1:t)}function la(n,t){n="_counter_"+n,u[n]=null==t?0:t}function fc(n,t,i){for(var f,u,r=0;r<n.length;)f=n[r++],u=parseFloat(n[r]),isNaN(u)?t(f,i):(t(f,u),++r)}function ec(n){var t,r=i(n,"counter-reset");r&&fc(d(r,/^\s+/),la,0),t=i(n,"counter-increment"),t&&fc(d(t,/^\s+/),ca,1)}function oc(n,t){var i=kendo.parseColor(n,!0);return i&&(i=i.toRGB(),t?i=i.toCssRgba():0===i.a&&(i=null)),i}function kl(n,t){function r(){--i<=0&&t()}var i=0;n.forEach(function(n){for(var t,f=n.querySelectorAll("img"),u=0;u<f.length;++u)t=f[u],t.complete||(i++,t.onload=t.onerror=r)}),i||r()}function wc(n,t){function e(n){pi[n]||(pi[n]=!0,u.push(n))}function r(){--f<=0&&t()}var f,u=[];!function o(n){/^img$/i.test(n.tagName)&&e(n.src),be(i(p(n),"background-image")).forEach(function(n){"url"==n.type&&e(n.url)}),n.children&&pt(n.children).forEach(o)}(n),f=u.length,0===f&&r(),u.forEach(function(n){var t=pi[n]=new window.Image;/^data:/i.test(n)||(t.crossOrigin="Anonymous"),t.src=n,t.complete?r():(t.onload=r,t.onerror=function(){pi[n]=null,r()})})}function pe(n){var i,t="";do i=n%26,t=String.fromCharCode(97+i)+t,n=Math.floor(n/26);while(n>0);return t}function bc(n,t,r){var f,e;u=Object.create(u),u[n.tagName.toLowerCase()]={element:n,style:t},f=i(t,"text-decoration"),f&&"none"!=f&&(e=i(t,"color"),f.split(/\s+/g).forEach(function(n){u[n]||(u[n]=e)})),na(t)&&(u._stackingContext={element:n,group:r})}function kc(){u=Object.getPrototypeOf(u)}function pc(n){if(null!=u._clipbox){var t=n.bbox(u._matrix);u._clipbox=u._clipbox?f.intersect(u._clipbox,t):t}}function ta(){var n=u._clipbox;return null==n||(n?0===n.width()||0===n.height():void 0)}function na(n){function t(t){return i(n,t)}if("none"!=t("transform")||"static"!=t("position")||"auto"!=t("z-index")||t("opacity")<1)return!0}function p(n,t){return window.getComputedStyle(n,t||null)}function i(n,t,i){var r=n.getPropertyValue(t);return null!=r&&""!==r||(v.webkit?r=n.getPropertyValue("-webkit-"+t):v.mozilla?r=n.getPropertyValue("-moz-"+t):v.opera?r=n.getPropertyValue("-o-"+t):v.msie&&(r=n.getPropertyValue("-ms-"+t))),arguments.length>2&&(null==r||""===r)?i:r}function vo(n,t,i,r){n.setProperty(t,i,r),v.webkit?n.setProperty("-webkit-"+t,i,r):v.mozilla?n.setProperty("-moz-"+t,i,r):v.opera?n.setProperty("-o-"+t,i,r):v.msie&&(n.setProperty("-ms-"+t,i,r),t="ms"+t.replace(/(^|-)([a-z])/g,function(n,t,i){return t+i.toUpperCase()}),n[t]=i)}function lt(n,t){return t="border-"+t,{width:parseFloat(i(n,t+"-width")),style:i(n,t+"-style"),color:oc(i(n,t+"-color"),!0)}}function yc(n,t){var r=n.style.cssText,i=t();return n.style.cssText=r,i}function wt(n,t){var r=i(n,"border-"+t+"-radius").split(/\s+/g).map(parseFloat);return 1==r.length&&r.push(r[0]),lo({x:r[0],y:r[1]})}function bv(n){var t=n.getBoundingClientRect();return t=ci(t,"border-*-width",n),t=ci(t,"padding-*",n)}function ci(n,t,r){var u,o,s,f,e;return"string"==typeof t?(u=p(r),o=parseFloat(i(u,t.replace("*","top"))),s=parseFloat(i(u,t.replace("*","right"))),f=parseFloat(i(u,t.replace("*","bottom"))),e=parseFloat(i(u,t.replace("*","left")))):"number"==typeof t&&(o=s=f=e=t),{top:n.top+o,right:n.right-s,bottom:n.bottom-f,left:n.left+e,width:n.right-n.left-s-e,height:n.bottom-n.top-f-o}}function lv(n){var t,r,u=i(n,"transform");return"none"==u?null:(t=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(u),t?(r=i(n,"transform-origin"),t=t[1].split(/\s*,\s*/g).map(parseFloat),r=r.split(/\s+/g).map(parseFloat),{matrix:t,origin:r}):void 0)}function ph(n){return 180*n/Math.PI%360}function vv(n){var t=parseFloat(n);return/grad$/.test(n)?Math.PI*t/200:/rad$/.test(n)?t:/turn$/.test(n)?Math.PI*t*2:/deg$/.test(n)?Math.PI*t/180:void 0}function hu(n,t){return t=new o(t[0],t[1],t[2],t[3],t[4],t[5]),n.transform(t),t}function yr(n,t){n.clip(t)}function li(n,t,i,r){for(var f=new ut([t,i],r).curvePoints(),u=1;u<f.length;)n.curveTo(f[u++],f[u++],f[u++])}function lo(n){return(n.x<=0||n.y<=0)&&(n.x=n.y=0),n}function wh(n,t,i,r,u){var l=Math.max(0,t.x),s=Math.max(0,t.y),c=Math.max(0,i.x),v=Math.max(0,i.y),a=Math.max(0,r.x),o=Math.max(0,r.y),e=Math.max(0,u.x),h=Math.max(0,u.y),f=Math.min(n.width/(l+c),n.height/(v+o),n.width/(a+e),n.height/(h+s));return f<1&&(l*=f,s*=f,c*=f,v*=f,a*=f,o*=f,e*=f,h*=f),{tl:{x:l,y:s},tr:{x:c,y:v},br:{x:a,y:o},bl:{x:e,y:h}}}function ho(n,t,r){var a,h,c,w,l,y,v,b,u=p(n),e=wt(u,"top-left"),o=wt(u,"top-right"),f=wt(u,"bottom-left"),s=wt(u,"bottom-right");return"padding"!=r&&"content"!=r||(a=lt(u,"top"),h=lt(u,"right"),c=lt(u,"bottom"),w=lt(u,"left"),e.x-=w.width,e.y-=a.width,o.x-=h.width,o.y-=a.width,s.x-=h.width,s.y-=c.width,f.x-=w.width,f.y-=c.width,"content"==r&&(l=parseFloat(i(u,"padding-top")),y=parseFloat(i(u,"padding-right")),v=parseFloat(i(u,"padding-bottom")),b=parseFloat(i(u,"padding-left")),e.x-=b,e.y-=l,o.x-=y,o.y-=l,s.x-=y,s.y-=v,f.x-=b,f.y-=v)),"number"==typeof r&&(e.x-=r,e.y-=r,o.x-=r,o.y-=r,s.x-=r,s.y-=r,f.x-=r,f.y-=r),bh(t,e,o,s,f)}function bh(n,t,i,r,u){var l=wh(n,t,i,r,u),h=l.tl,c=l.tr,o=l.br,s=l.bl,f=new e({fill:null,stroke:null});return f.moveTo(n.left,n.top+h.y),h.x&&li(f,n.left+h.x,n.top+h.y,{startAngle:-180,endAngle:-90,radiusX:h.x,radiusY:h.y}),f.lineTo(n.right-c.x,n.top),c.x&&li(f,n.right-c.x,n.top+c.y,{startAngle:-90,endAngle:0,radiusX:c.x,radiusY:c.y}),f.lineTo(n.right,n.bottom-o.y),o.x&&li(f,n.right-o.x,n.bottom-o.y,{startAngle:0,endAngle:90,radiusX:o.x,radiusY:o.y}),f.lineTo(n.left+s.x,n.bottom),s.x&&li(f,n.left+s.x,n.bottom-s.y,{startAngle:90,endAngle:180,radiusX:s.x,radiusY:s.y}),f.close()}function yh(n,t){var i=parseFloat(n)+"";switch(t){case"decimal-leading-zero":return i.length<2&&(i="0"+i),i;case"lower-roman":return tf(n).toLowerCase();case"upper-roman":return tf(n).toUpperCase();case"lower-latin":case"lower-alpha":return pe(n-1);case"upper-latin":case"upper-alpha":return pe(n-1).toUpperCase();default:return i}}function ry(n,t){function u(n,t,i){return i?(i=i.replace(/^\s*(["'])(.*)\1\s*$/,"$2"),ha(n).map(function(n){return yh(n,t)}).join(i)):yh(aa(n)||0,t)}var i,f=d(t,/^\s+/),r=[];return f.forEach(function(t){var f;(i=/^\s*(["'])(.*)\1\s*$/.exec(t))?r.push(i[2].replace(/\\([0-9a-f]{4})/gi,function(n,t){return String.fromCharCode(parseInt(t,16))})):(i=/^\s*counter\((.*?)\)\s*$/.exec(t))?(f=d(i[1]),r.push(u(f[0],f[1]))):(i=/^\s*counters\((.*?)\)\s*$/.exec(t))?(f=d(i[1]),r.push(u(f[0],f[2],f[1]))):r.push((i=/^\s*attr\((.*?)\)\s*$/.exec(t))?n.getAttribute(i[1])||"":t)}),r.join("")}function cf(n){var r,t;if(n.cssText)return n.cssText;for(r=[],t=0;t<n.length;++t)r.push(n[t]+": "+i(n,n[t]));return r.join(";\n")}function lh(n,t){function u(t,r){var f,u=p(n,t);ec(u),u.content&&"normal"!=u.content&&"none"!=u.content&&"0px"!=u.width&&(f=n.ownerDocument.createElement(yi),f.style.cssText=cf(u),f.textContent=ry(n,u.content),n.insertBefore(f,r),i.push(f))}var i,r;return n.tagName==yi?void af(n,t):(i=[],u(":before",n.firstChild),u(":after",null),r=n.className,n.className+=" kendo-pdf-hide-pseudo-elements",af(n,t),n.className=r,void i.forEach(function(t){n.removeChild(t)}))}function af(n,t){function vt(t){var r,e,f,s,h,o;if(/^td$/i.test(n.tagName)&&(r=u.table,r&&"collapse"==i(r.style,"border-collapse"))){if(e=lt(r.style,"left").width,f=lt(r.style,"top").width,0===e&&0===f)return t;if(s=r.element.getBoundingClientRect(),h=r.element.rows[0].cells[0],o=h.getBoundingClientRect(),o.top==s.top||o.left==s.left)return pt(t).map(function(n){return{left:n.left+e,top:n.top+f,right:n.right+e,bottom:n.bottom+f,height:n.height,width:n.width}})}return t}function b(n,i,r,u,f,o,s,h){function v(t,i,u){var s=Math.PI/2*t/(t+r),f={x:i.x-t,y:i.y-r},o=new e({fill:{color:n},stroke:null}).moveTo(0,0);hu(o,u),li(o,0,i.y,{startAngle:-90,endAngle:-ph(s),radiusX:i.x,radiusY:i.y}),f.x>0&&f.y>0?(o.lineTo(f.x*Math.cos(s),i.y-f.y*Math.sin(s)),li(o,0,i.y,{startAngle:-ph(s),endAngle:-90,radiusX:f.x,radiusY:f.y,anticlockwise:!0})):f.x>0?o.lineTo(f.x,r).lineTo(0,r):o.lineTo(f.x,r).lineTo(f.x,0),c.append(o.close())}if(!(r<=0)){var a,c=new l;hu(c,h),t.append(c),lo(o),lo(s),a=new e({fill:{color:n},stroke:null}),c.append(a),a.moveTo(o.x?Math.max(o.x,u):0,0).lineTo(i-(s.x?Math.max(s.x,f):0),0).lineTo(i-Math.max(s.x,f),r).lineTo(Math.max(o.x,u),r).close(),o.x&&v(u,o,[-1,0,0,1,o.x,0]),s.x&&v(f,s,[1,0,0,1,i-s.x,0])}}function yt(i){var o,r,f=new l;for(yr(f,bh(i,it,ut,rt,tt)),t.append(f),"A"==n.tagName&&n.href&&!/^#?$/.test(n.getAttribute("href"))&&(u._avoidLinks&&fr(n,u._avoidLinks)||(f._pdfLink={url:n.href,top:i.top,right:i.right,bottom:i.bottom,left:i.left})),k&&(o=new e({fill:{color:k.toCssRgba()},stroke:null}),o.moveTo(i.left,i.top).lineTo(i.right,i.top).lineTo(i.right,i.bottom).lineTo(i.left,i.bottom).close(),f.append(o)),r=ft.length;--r>=0;)kt(f,i,ft[r],et[r%et.length],g[r%g.length],ot[r%ot.length],st[r%st.length])}function kt(t,i,r,u,e,o,s){function c(t,i,r,h,c){function d(){for(;a.origin.x>i.left;)a.origin.x-=r}function k(){for(;a.origin.y>i.top;)a.origin.y-=h}function b(){for(;a.origin.x<i.right;)c(t,a.clone()),a.origin.x+=r}var p,y,l,a,w,g=r/h,v=i;switch("content-box"==o?(v=ci(v,"border-*-width",n),v=ci(v,"padding-*",n)):"padding-box"==o&&(v=ci(v,"border-*-width",n)),/^\s*auto(\s+auto)?\s*$/.test(s)||("contain"==s?(p=Math.min(v.width/r,v.height/h),r*=p,h*=p):"cover"==s?(p=Math.max(v.width/r,v.height/h),r*=p,h*=p):(y=s.split(/\s+/g),r=/%$/.test(y[0])?v.width*parseFloat(y[0])/100:parseFloat(y[0]),h=1==y.length||"auto"==y[1]?r/g:/%$/.test(y[1])?v.height*parseFloat(y[1])/100:parseFloat(y[1]))),l=e+""){case"bottom":l="50% 100%";break;case"top":l="50% 0";break;case"left":l="0 50%";break;case"right":l="100% 50%";break;case"center":l="50% 50%"}if(l=l.split(/\s+/),1==l.length&&(l[1]="50%"),l[0]=/%$/.test(l[0])?parseFloat(l[0])/100*(v.width-r):parseFloat(l[0]),l[1]=/%$/.test(l[1])?parseFloat(l[1])/100*(v.height-h):parseFloat(l[1]),a=new f([v.left+l[0],v.top+l[1]],[r,h]),"no-repeat"==u)c(t,a);else if("repeat-x"==u)d(),b();else if("repeat-y"==u)for(k();a.origin.y<i.bottom;)c(t,a.clone()),a.origin.y+=h;else if("repeat"==u)for(d(),k(),w=a.origin.clone();a.origin.y<i.bottom;)a.origin.x=w.x,b(),a.origin.y+=h}if(r&&"none"!=r)if("url"==r.type){if(/^url\(\"data:image\/svg/i.test(r.url))return;var h=pi[r.url];h&&h.width>0&&h.height>0&&c(t,i,h.width,h.height,function(n,t){n.append(new vi(r.url,t))})}else{if("linear"!=r.type)return;c(t,i,i.width,i.height,uy(r))}}function at(){function f(i){yc(n,function(){n.style.position="relative";var r=n.ownerDocument.createElement(yi);r.style.position="absolute",r.style.boxSizing="border-box","outside"==o?(r.style.width="6em",r.style.left="-6.8em",r.style.textAlign="right"):r.style.left="0px",i(r),n.insertBefore(r,n.firstChild),wr(r,t),n.removeChild(r)})}function e(t){var i,r=n.parentNode.children,u=n.getAttribute("kendo-split-index");if(null!=u)return t(0|u,r.length);for(i=0;i<r.length;++i)if(r[i]===n)return t(i,r.length)}var o,u=i(r,"list-style-type");if("none"!=u)switch(o=i(r,"list-style-position"),u){case"circle":case"disc":case"square":f(function(n){n.style.fontSize="60%",n.style.lineHeight="200%",n.style.paddingRight="0.5em",n.style.fontFamily="DejaVu Serif",n.innerHTML={disc:"●",circle:"◯",square:"■"}[u]});break;case"decimal":case"decimal-leading-zero":f(function(n){e(function(t){++t,"decimal-leading-zero"==u&&t<10&&(t="0"+t),n.innerHTML=t+"."})});break;case"lower-roman":case"upper-roman":f(function(n){e(function(t){t=tf(t+1),"upper-roman"==u&&(t=t.toUpperCase()),n.innerHTML=t+"."})});break;case"lower-latin":case"lower-alpha":case"upper-latin":case"upper-alpha":f(function(n){e(function(t){t=pe(t),/^upper/i.test(u)&&(t=t.toUpperCase()),n.innerHTML=t+"."})})}}function bt(i,r,u){function l(n){return{x:n.y,y:n.x}}var w,k,d,f,p,v,y,a;if(0!==i.width&&0!==i.height&&(yt(i),w=h.width>0&&(r&&"ltr"==nt||u&&"rtl"==nt),k=s.width>0&&(u&&"ltr"==nt||r&&"rtl"==nt),0!==o.width||0!==h.width||0!==s.width||0!==c.width)){if(o.color==s.color&&o.color==c.color&&o.color==h.color&&o.width==s.width&&o.width==c.width&&o.width==h.width&&w&&k)return i=ci(i,o.width/2),d=ho(n,i,o.width/2),d.options.stroke={color:o.color,width:o.width},void t.append(d);if(0===it.x&&0===ut.x&&0===rt.x&&0===tt.x&&o.width<2&&h.width<2&&s.width<2&&c.width<2)return o.width>0&&t.append(new e({stroke:{width:o.width,color:o.color}}).moveTo(i.left,i.top+o.width/2).lineTo(i.right,i.top+o.width/2)),c.width>0&&t.append(new e({stroke:{width:c.width,color:c.color}}).moveTo(i.left,i.bottom-c.width/2).lineTo(i.right,i.bottom-c.width/2)),w&&t.append(new e({stroke:{width:h.width,color:h.color}}).moveTo(i.left+h.width/2,i.top).lineTo(i.left+h.width/2,i.bottom)),void(k&&t.append(new e({stroke:{width:s.width,color:s.color}}).moveTo(i.right-s.width/2,i.top).lineTo(i.right-s.width/2,i.bottom)));f=wh(i,it,ut,rt,tt),p=f.tl,v=f.tr,y=f.br,a=f.bl,b(o.color,i.width,o.width,h.width,s.width,p,v,[1,0,0,1,i.left,i.top]),b(c.color,i.width,c.width,s.width,h.width,y,a,[-1,0,0,-1,i.right,i.bottom]),b(h.color,i.height,h.width,c.width,o.width,l(a),l(p),[0,-1,1,0,i.left,i.bottom]),b(s.color,i.height,s.width,o.width,c.width,l(v),l(y),[0,1,-1,0,i.right,i.top])}}var ft,et,g,ot,st,y,a,w,ht,ct,r=p(n),o=lt(r,"top"),s=lt(r,"right"),c=lt(r,"bottom"),h=lt(r,"left"),it=wt(r,"top-left"),ut=wt(r,"top-right"),tt=wt(r,"bottom-left"),rt=wt(r,"bottom-right"),nt=i(r,"direction"),k=i(r,"background-color");if(k=oc(k),ft=be(i(r,"background-image")),et=d(i(r,"background-repeat")),g=d(i(r,"background-position")),ot=d(i(r,"background-origin")),st=d(i(r,"background-size")),v.msie&&v.version<10&&(g=d(n.currentStyle.backgroundPosition)),y=ci(n.getBoundingClientRect(),"border-*-width",n),function(){var n,s,h,c,f,u,o,v=i(r,"clip"),a=/^\s*rect\((.*)\)\s*$/.exec(v);a&&(n=a[1].split(/[ ,]+/g),s="auto"==n[0]?y.top:parseFloat(n[0])+y.top,h="auto"==n[1]?y.right:parseFloat(n[1])+y.left,c="auto"==n[2]?y.bottom:parseFloat(n[2])+y.top,f="auto"==n[3]?y.left:parseFloat(n[3])+y.left,u=new l,o=(new e).moveTo(f,s).lineTo(h,s).lineTo(h,c).lineTo(f,c).close(),yr(u,o),t.append(u),t=u,pc(o))}(),ct=i(r,"display"),"table-row"==ct)for(a=[],w=0,ht=n.children;w<ht.length;++w)a.push(ht[w].getBoundingClientRect());else a=n.getClientRects(),1==a.length&&(a=[n.getBoundingClientRect()]);for(a=vt(a),w=0;w<a.length;++w)bt(a[w],0===w,w==a.length-1);return a.length>0&&"list-item"==ct&&!n.getAttribute("kendo-no-bullet")&&at(a[0]),function(){function u(){var r=ho(n,y,"padding"),i=new l;yr(i,r),t.append(i),t=i,pc(r)}gv(n)?u():/^(hidden|auto|scroll)/.test(i(r,"overflow"))?u():/^(hidden|auto|scroll)/.test(i(r,"overflow-x"))?u():/^(hidden|auto|scroll)/.test(i(r,"overflow-y"))&&u()}(),ty(n,t)||vh(n,t),t}function uy(n){return function(t,i){var r,p,v,l,y,a,s,o,h,c,b,w,k,f=i.width(),u=i.height();switch(n.type){case"linear":switch(r=null!=n.angle?n.angle:Math.PI,n.to){case"top":r=0;break;case"left":r=-Math.PI/2;break;case"bottom":r=Math.PI;break;case"right":r=Math.PI/2;break;case"top left":case"left top":r=-Math.atan2(u,f);break;case"top right":case"right top":r=Math.atan2(u,f);break;case"bottom left":case"left bottom":r=Math.PI+Math.atan2(u,f);break;case"bottom right":case"right bottom":r=Math.PI-Math.atan2(u,f)}n.reverse&&(r-=Math.PI),r%=2*Math.PI,r<0&&(r+=2*Math.PI),p=Math.abs(f*Math.sin(r))+Math.abs(u*Math.cos(r)),v=Math.atan(f*Math.tan(r)/u),l=Math.sin(v),y=Math.cos(v),a=Math.abs(l)+Math.abs(y),s=a/2*l,o=a/2*y,r>Math.PI/2&&r<=3*Math.PI/2&&(s=-s,o=-o),h=[],c=0,b=n.stops.map(function(t,i){var u,r=t.percent;return r?r=parseFloat(r)/100:t.length?r=parseFloat(t.length)/p:0===i?r=0:i==n.stops.length-1&&(r=1),u={color:t.color.toCssRgba(),offset:r},null!=r?(c=r,h.forEach(function(n,t){var i=n.stop;i.offset=n.left+(c-n.left)*(t+1)/(h.length+1)}),h=[]):h.push({left:c,stop:u}),u}),w=[.5-s,.5+o],k=[.5+s,.5-o],t.append(e.fromRect(i).stroke(null).fill(new gi({start:w,end:k,stops:b,userSpace:!1})));break;case"radial":window.console&&window.console.log&&window.console.log("Radial gradients are not yet supported in HTML renderer")}}}function ty(n,t){var i,f,r,u;if(window.kendo&&window.kendo.jQuery&&n.getAttribute(window.kendo.attr("role"))&&(i=window.kendo.widgetInstance(window.kendo.jQuery(n)),i&&(i.exportDOMVisual||i.exportVisual)))return!!(f=i.exportDOMVisual?i.exportDOMVisual():i.exportVisual())&&(r=new l,r.children.push(f),u=n.getBoundingClientRect(),r.transform(w().translate(u.left,u.top)),t.append(r),!0)}function al(n,t,i){var r=bv(n),e=new f([r.left,r.top],[r.width,r.height]),u=new vi(t,e);yr(u,ho(n,r,"content")),i.append(u)}function vf(n,t){var o=p(n),s=p(t),r=parseFloat(i(o,"z-index")),u=parseFloat(i(s,"z-index")),e=i(o,"position"),f=i(s,"position");return isNaN(r)&&isNaN(u)?/static|absolute/.test(e)&&/static|absolute/.test(f)?0:"static"==e?-1:"static"==f?1:0:isNaN(r)?0===u?0:u>0?-1:1:isNaN(u)?0===r?0:r>0?1:-1:parseFloat(r)-parseFloat(u)}function gv(n){return/^(?:textarea|select|input)$/i.test(n.tagName)}function ny(n){return n.selectedOptions&&n.selectedOptions.length>0?n.selectedOptions[0]:n.options[n.selectedIndex]}function nv(n,t){var o=p(n),u=i(o,"color"),r=n.getBoundingClientRect();"checkbox"==n.type?(t.append(e.fromRect(new f([r.left+1,r.top+1],[r.width-2,r.height-2])).stroke(u,1)),n.checked&&t.append((new e).stroke(u,1.2).moveTo(r.left+.22*r.width,r.top+.55*r.height).lineTo(r.left+.45*r.width,r.top+.75*r.height).lineTo(r.left+.78*r.width,r.top+.22*r.width))):(t.append(new kt(new yt([(r.left+r.right)/2,(r.top+r.bottom)/2],Math.min(r.width-2,r.height-2)/2)).stroke(u,1)),n.checked&&t.append(new kt(new yt([(r.left+r.right)/2,(r.top+r.bottom)/2],Math.min(r.width-8,r.height-8)/2)).fill(u).stroke(null)))}function tv(n,t){var o,e,i,r,u,f=n.tagName.toLowerCase();if("input"==f&&("checkbox"==n.type||"radio"==n.type))return nv(n,t);if(o=n.parentNode,e=n.ownerDocument,i=e.createElement(yi),i.style.cssText=cf(p(n)),"input"==f&&(i.style.whiteSpace="pre"),"select"!=f&&"textarea"!=f||(i.style.overflow="auto"),"select"==f)if(n.multiple)for(u=0;u<n.options.length;++u)r=e.createElement(yi),r.style.cssText=cf(p(n.options[u])),r.style.display="block",r.textContent=n.options[u].textContent,i.appendChild(r);else r=ny(n),r&&(i.textContent=r.textContent);else i.textContent=n.value;o.insertBefore(i,n),i.scrollLeft=n.scrollLeft,i.scrollTop=n.scrollTop,n.style.display="none",vh(i,t),n.style.display="",o.removeChild(i)}function vh(n,t){var o,s,e,r,f,c,h;switch(u._stackingContext.element===n&&(u._stackingContext.group=t),n.tagName.toLowerCase()){case"img":al(n,n.src,t);break;case"canvas":try{al(n,n.toDataURL("image/png"),t)}catch(l){}break;case"textarea":case"input":case"select":tv(n,t);break;default:for(o=[],s=[],e=[],r=n.firstChild;r;r=r.nextSibling)switch(r.nodeType){case 3:/\S/.test(r.data)&&tc(n,r,t);break;case 1:f=p(r),c=i(f,"float"),h=i(f,"position"),"static"!=h?e.push(r):"none"!=c?s.push(r):o.push(r)}tu(o,vf).forEach(function(n){wr(n,t)}),tu(s,vf).forEach(function(n){wr(n,t)}),tu(e,vf).forEach(function(n){wr(n,t)})}}function tc(n,t,r){function y(n){var u,t,r,i;if(v.msie||v.chrome){for(u=n.getClientRects(),t={top:1/0,right:-(1/0),bottom:-(1/0),left:1/0},r=0;r<u.length;++r)i=u[r],i.width<=1||i.bottom===d||(t.left=Math.min(i.left,t.left),t.top=Math.min(i.top,t.top),t.right=Math.max(i.right,t.right),t.bottom=Math.max(i.bottom,t.bottom));return t.width=t.right-t.left,t.height=t.bottom-t.top,t}return n.getBoundingClientRect()}function lt(){var i,f,h,r,u,e,p,b=s,n=a.substr(s).search(/\S/);if(s+=n,n<0||s>=l)return!0;if(o.setStart(t,s),o.setEnd(t,s+1),i=y(o),f=!1,(ot||et>1)&&(n=a.substr(s).search(/\s/),n>=0&&(o.setEnd(t,s+n),h=y(o),h.bottom==i.bottom&&(i=h,f=!0,s+=n))),!f){if(n=function c(n,r,u){o.setEnd(t,r);var f=y(o);return f.bottom!=i.bottom&&n<r?c(n,n+r>>1,r):f.right!=i.right?(i=f,r<u?c(r,r+u>>1,u):r):r}(s,Math.min(l,s+w),l),n==s)return!0;if(s=n,n=(""+o).search(/\s+$/),0===n)return!1;n>0&&(o.setEnd(t,o.startOffset+n),i=y(o))}if(v.msie&&(i=o.getClientRects()[0]),r=""+o,/^(?:pre|pre-wrap)$/i.test(ht)){if(/\t/.test(r)){for(u=0,n=b;n<o.startOffset;++n)e=a.charCodeAt(n),9==e?u+=8-u%8:10==e||13==e?u=0:u++;for(;(n=r.search("\t"))>=0;)p="        ".substr(0,8-(u+n)%8),r=r.substr(0,n)+p+r.substr(n+1)}}else r=r.replace(/\s+/g," ");f||(d=i.bottom),at(r,i)}function at(n,t){var i,u,e;v.msie&&!isNaN(b)&&(i=ps(it),u=(t.top+t.bottom-i)/2,t={top:u,right:t.right,bottom:u+i,left:t.left,height:i,width:t.right-t.left}),e=new vs(n,new f([t.left,t.top],[t.width,t.height]),{font:it,fill:{color:ut}}),r.append(e)}function ct(n){function t(t,i){var f,u;t&&(f=c/12,u=new e({stroke:{width:f,color:t}}),i-=f,u.moveTo(n.left,i).lineTo(n.right,i),r.append(u))}t(tt,n.bottom),t(g,n.bottom-n.height/2.7),t(nt,n.top)}var h,a,s,l,c,b,it,ut,o,st,ot,et,ht,k,rt,w,d,tt,g,nt,ft;if(!ta()&&(h=p(n),!(parseFloat(i(h,"text-indent"))<-500)&&(a=t.data,s=0,l=a.search(/\S\s*$/)+1,l&&(c=i(h,"font-size"),b=i(h,"line-height"),it=[i(h,"font-style"),i(h,"font-variant"),i(h,"font-weight"),c,i(h,"font-family")].join(" "),c=parseFloat(c),b=parseFloat(b),0!==c)))){for(ut=i(h,"color"),o=n.ownerDocument.createRange(),st=i(h,"text-align"),ot="justify"==st,et=i(h,"column-count",1),ht=i(h,"white-space"),v.msie&&(k=h.textOverflow,"ellipsis"==k&&(rt=n.style.textOverflow,n.style.textOverflow="clip")),w=n.getBoundingClientRect().width/c*5,0===w&&(w=500),d=null,tt=u.underline,g=u["line-through"],nt=u.overline,ft=tt||g||nt;!lt(););v.msie&&"ellipsis"==k&&(n.style.textOverflow=rt),ft&&(o.selectNode(t),pt(o.getClientRects()).forEach(ct))}}function ga(n,t,i){var f,s,r,o,c,h;for("auto"!=i?(f=u._stackingContext.group,i=parseFloat(i)):(f=t,i=0),s=f.children,r=0;r<s.length&&!(null!=s[r]._dom_zIndex&&s[r]._dom_zIndex>i);++r);return o=new l,f.insert(r,o),o._dom_zIndex=i,f!==t&&u._clipbox&&(c=u._matrix.invert(),h=u._clipbox.transformCopy(c),yr(o,e.fromRect(h))),o}function wr(n,t){var o,c,h,e,f,s,r=p(n);ec(r),/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(n.tagName)||null!=u._clipbox&&(o=parseFloat(i(r,"opacity")),c=i(r,"visibility"),h=i(r,"display"),0!==o&&"hidden"!=c&&"none"!=h&&(e=lv(r),s=i(r,"z-index"),(e||o<1)&&"auto"==s&&(s=0),f=ga(n,t,s),o<1&&f.opacity(o*f.opacity()),bc(n,r,f),e?yc(n,function(){var o,h,s,t;vo(n.style,"transform","none","important"),vo(n.style,"transition","none","important"),"static"==i(r,"position")&&vo(n.style,"position","relative","important"),o=n.getBoundingClientRect(),h=o.left+e.origin[0],s=o.top+e.origin[1],t=[1,0,0,1,-h,-s],t=ic(t,e.matrix),t=ic(t,[1,0,0,1,h,s]),t=hu(f,t),u._matrix=u._matrix.multiplyCopy(t),lh(n,f)}):lh(n,f),kc()))}function ic(n,t){var s=n[0],o=n[1],h=n[2],l=n[3],c=n[4],e=n[5],r=t[0],i=t[1],f=t[2],u=t[3],v=t[4],a=t[5];return[s*r+o*f,s*i+o*u,h*r+l*f,h*i+l*u,c*r+e*f+v,c*i+e*u+a]}var rc,ie,h,bf,gf,gt,te,g,nc,kh,dh,fu,ei,ri,hr,ui,pl,vl,bt,o,t,y,f,rr,c,ne,yt,el,ni,ol,bi,ll,kt,ot,yl,k,ut,rl,tl,ul,gc,io,dc,pu,ke,rt,nr,e,ko,ki,ir,ts,rs,si,vi,vu,l,bo,ns,ai,us,ht,vt,gi,pr,is,lf,ku,br,yf,fe,th,ih,oe,rh,vr,ii,ds,a,nt,ct,tr,ar,df,nh,ue,oh,se,re,lr,b,wf,ef,ff,of,uf,sf,cu,du,pf,hf,eu,co,uh,ao,tt,fo,uo,oo,eo,po,yo,fh,eh,st,au,fi,ls,ou,ur,hi,ft,we,as,ru,os,cr,et,ce,he,ae,le,to,ro,ws,v,yi,pi,u,vs,fr,ys,be,d,ge,ps,hh;window.kendo=window.kendo||{},rc=kendo.drawing,ie=rc.util,h=kendo.Class,bf=kendo.util,gf=kendo.support,gt=ie.createPromise,te=ie.promiseAll,g={extend:function(n){var t,i=this;for(t in this)"extend"!==t&&(n[t]=i[t])},observers:function(){return this._observers=this._observers||[]},addObserver:function(n){return this._observers?this._observers.push(n):this._observers=[n],this},removeObserver:function(n){var i=this.observers(),t=i.indexOf(n);return t!==-1&&i.splice(t,1),this},trigger:function(n,t){var i,u,r=this._observers;if(r&&!this._suspended)for(i=0;i<r.length;i++)u=r[i],u[n]&&u[n](t);return this},optionsChange:function(n){void 0===n&&(n={}),n.element=this,this.trigger("optionsChange",n)},geometryChange:function(){this.trigger("geometryChange",{element:this})},suspend:function(){return this._suspended=(this._suspended||0)+1,this},resume:function(){return this._suspended=Math.max((this._suspended||0)-1,0),this},_observerField:function(n,t){this[n]&&this[n].removeObserver(this),this[n]=t,t.addObserver(this)}},nc={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"},kh="undefined",dh=1,fu=Math.PI/180,ei=Number.MAX_VALUE,ri=-Number.MAX_VALUE,hr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ui=String.fromCharCode,pl={append:dr,arabicToRoman:tf,createPromise:gt,defined:r,definitionId:yu,deg:wi,encodeBase64:ks,eventCoordinates:bs,eventElement:hs,isTransparent:ti,last:it,limitValue:ss,mergeSort:tu,promiseAll:te,rad:at,round:s,valueOrDefault:ve,bindEvents:ye,elementOffset:cs,elementSize:kr,elementStyles:so,unbindEvents:ee,DEG_TO_RAD:fu,MAX_NUM:ei,MIN_NUM:ri},vl={}.toString,bt=h.extend({init:function(n,t){var r,i,u=this;void 0===t&&(t=""),this.prefix=t;for(r in n)i=n[r],i=u._wrap(i,r),u[r]=i},get:function(n){for(var i,r=n.split("."),t=this;r.length&&t;)i=r.shift(),t=t[i];return t},set:function(n,t){var i=this.get(n);i!==t&&(this._set(n,this._wrap(t,n)),this.optionsChange({field:this.prefix+n,value:t}))},_set:function(n,t){var f,e,r,o=this,s=n.indexOf(".")>=0,u=this,i=n;if(s){for(f=i.split("."),e=this.prefix;f.length>1;)i=f.shift(),e+=i+".",r=u[i],r||(r=new bt({},e),r.addObserver(o),u[i]=r),u=r;i=f[0]}u._clear(i),u[i]=t},_clear:function(n){var t=this[n];t&&t.removeObserver&&t.removeObserver(this)},_wrap:function(n,t){var u=vl.call(n),i=n;return null!==i&&r(i)&&"[object Object]"===u&&(n instanceof bt||n instanceof h||(i=new bt(i,this.prefix+t+".")),i.addObserver(this)),i}}),g.extend(bt.prototype),o=h.extend({init:function(n,t,i,r,u,f){void 0===n&&(n=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===u&&(u=0),void 0===f&&(f=0),this.a=n,this.b=t,this.c=i,this.d=r,this.e=u,this.f=f},multiplyCopy:function(n){return new o(this.a*n.a+this.c*n.b,this.b*n.a+this.d*n.b,this.a*n.c+this.c*n.d,this.b*n.c+this.d*n.d,this.a*n.e+this.c*n.f+this.e,this.b*n.e+this.d*n.f+this.f)},invert:function(){var t=this,f=t.a,u=t.b,r=t.c,i=t.d,e=t.e,s=t.f,n=f*i-u*r;return 0===n?null:new o(i/n,-u/n,-r/n,f/n,(r*s-i*e)/n,(u*e-f*s)/n)},clone:function(){return new o(this.a,this.b,this.c,this.d,this.e,this.f)},equals:function(n){return!!n&&this.a===n.a&&this.b===n.b&&this.c===n.c&&this.d===n.d&&this.e===n.e&&this.f===n.f},round:function(n){return this.a=s(this.a,n),this.b=s(this.b,n),this.c=s(this.c,n),this.d=s(this.d,n),this.e=s(this.e,n),this.f=s(this.f,n),this},toArray:function(n){var t,i=[this.a,this.b,this.c,this.d,this.e,this.f];if(r(n))for(t=0;t<i.length;t++)i[t]=s(i[t],n);return i},toString:function(n,t){return void 0===t&&(t=","),this.toArray(n).join(t)}}),o.translate=function(n,t){return new o(1,0,0,1,n,t)},o.unit=function(){return new o(1,0,0,1,0,0)},o.rotate=function(n,t,i){var r=new o;return r.a=Math.cos(at(n)),r.b=Math.sin(at(n)),r.c=-r.b,r.d=r.a,r.e=t-t*r.a+i*r.b||0,r.f=i-i*r.a-t*r.b||0,r},o.scale=function(n,t){return new o(n,0,0,t,0,0)},o.IDENTITY=o.unit(),t=h.extend({init:function(n,t){this.x=n||0,this.y=t||0},equals:function(n){return n&&n.x===this.x&&n.y===this.y},clone:function(){return new t(this.x,this.y)},rotate:function(n,i){var r=t.create(i)||t.ZERO;return this.transform(o.rotate(n,r.x,r.y))},translate:function(n,t){return this.x+=n,this.y+=t,this.geometryChange(),this},translateWith:function(n){return this.translate(n.x,n.y)},move:function(n,t){return this.x=this.y=0,this.translate(n,t)},scale:function(n,t){return void 0===t&&(t=n),this.x*=n,this.y*=t,this.geometryChange(),this},scaleCopy:function(n,t){return this.clone().scale(n,t)},transform:function(n){var t=dt(n),u=this,r=u.x,i=u.y;return this.x=t.a*r+t.c*i+t.e,this.y=t.b*r+t.d*i+t.f,this.geometryChange(),this},transformCopy:function(n){var t=this.clone();return n&&t.transform(n),t},distanceTo:function(n){var i=this.x-n.x,t=this.y-n.y;return Math.sqrt(i*i+t*t)},round:function(n){return this.x=s(this.x,n),this.y=s(this.y,n),this.geometryChange(),this},toArray:function(n){var t=r(n),u=t?s(this.x,n):this.x,i=t?s(this.y,n):this.y;return[u,i]},toString:function(n,t){var f,i,u;return void 0===t&&(t=" "),f=this,i=f.x,u=f.y,r(n)&&(i=s(i,n),u=s(u,n)),i+t+u}}),t.create=function(n,i){if(r(n))return n instanceof t?n:1===arguments.length&&2===n.length?new t(n[0],n[1]):new t(n,i)},t.min=function(){for(var u,f=arguments,i=ei,r=ei,n=0;n<arguments.length;n++)u=f[n],i=Math.min(u.x,i),r=Math.min(u.y,r);return new t(i,r)},t.max=function(){for(var u,f=arguments,i=ri,r=ri,n=0;n<arguments.length;n++)u=f[n],i=Math.max(u.x,i),r=Math.max(u.y,r);return new t(i,r)},t.minPoint=function(){return new t(ri,ri)},t.maxPoint=function(){return new t(ei,ei)},Object.defineProperties&&Object.defineProperties(t,{ZERO:{get:function(){return new t(0,0)}}}),uu(t.prototype,["x","y"]),g.extend(t.prototype),y=h.extend({init:function(n,t){this.width=n||0,this.height=t||0},equals:function(n){return n&&n.width===this.width&&n.height===this.height},clone:function(){return new y(this.width,this.height)},toArray:function(n){var t=r(n),u=t?s(this.width,n):this.width,i=t?s(this.height,n):this.height;return[u,i]}}),y.create=function(n,t){if(r(n))return n instanceof y?n:1===arguments.length&&2===n.length?new y(n[0],n[1]):new y(n,t)},Object.defineProperties&&Object.defineProperties(y,{ZERO:{get:function(){return new y(0,0)}}}),uu(y.prototype,["width","height"]),g.extend(y.prototype),f=h.extend({init:function(n,i){void 0===n&&(n=new t),void 0===i&&(i=new y),this.setOrigin(n),this.setSize(i)},clone:function(){return new f(this.origin.clone(),this.size.clone())},equals:function(n){return n&&n.origin.equals(this.origin)&&n.size.equals(this.size)},setOrigin:function(n){return this._observerField("origin",t.create(n)),this.geometryChange(),this},getOrigin:function(){return this.origin},setSize:function(n){return this._observerField("size",y.create(n)),this.geometryChange(),this},getSize:function(){return this.size},width:function(){return this.size.width},height:function(){return this.size.height},topLeft:function(){return this.origin.clone()},bottomRight:function(){return this.origin.clone().translate(this.width(),this.height())},topRight:function(){return this.origin.clone().translate(this.width(),0)},bottomLeft:function(){return this.origin.clone().translate(0,this.height())},center:function(){return this.origin.clone().translate(this.width()/2,this.height()/2)},bbox:function(n){var r=this.topLeft().transformCopy(n),u=this.topRight().transformCopy(n),t=this.bottomRight().transformCopy(n),i=this.bottomLeft().transformCopy(n);return f.fromPoints(r,u,t,i)},transformCopy:function(n){return f.fromPoints(this.topLeft().transform(n),this.bottomRight().transform(n))},expand:function(n,t){return void 0===t&&(t=n),this.size.width+=2*n,this.size.height+=2*t,this.origin.translate(-n,-t),this},expandCopy:function(n,t){return this.clone().expand(n,t)},containsPoint:function(n){var i=this.origin,t=this.bottomRight();return!(n.x<i.x||n.y<i.y||t.x<n.x||t.y<n.y)},_isOnPath:function(n,t){var r=this.expandCopy(t,t),i=this.expandCopy(-t,-t);return r.containsPoint(n)&&!i.containsPoint(n)}}),f.fromPoints=function(){var n=t.min.apply(null,arguments),i=t.max.apply(null,arguments),r=new y(i.x-n.x,i.y-n.y);return new f(n,r)},f.union=function(n,i){return f.fromPoints(t.min(n.topLeft(),i.topLeft()),t.max(n.bottomRight(),i.bottomRight()))},f.intersect=function(n,i){var u={left:n.topLeft().x,top:n.topLeft().y,right:n.bottomRight().x,bottom:n.bottomRight().y},r={left:i.topLeft().x,top:i.topLeft().y,right:i.bottomRight().x,bottom:i.bottomRight().y};if(u.left<=r.right&&r.left<=u.right&&u.top<=r.bottom&&r.top<=u.bottom)return f.fromPoints(new t(Math.max(u.left,r.left),Math.max(u.top,r.top)),new t(Math.min(u.right,r.right),Math.min(u.bottom,r.bottom)))},g.extend(f.prototype),rr=h.extend({init:function(n){void 0===n&&(n=o.unit()),this._matrix=n},clone:function(){return new rr(this._matrix.clone())},equals:function(n){return n&&n._matrix.equals(this._matrix)},translate:function(n,t){return this._matrix=this._matrix.multiplyCopy(o.translate(n,t)),this._optionsChange(),this},scale:function(n,i,r){void 0===i&&(i=n),void 0===r&&(r=null);var u=r;return u&&(u=t.create(u),this._matrix=this._matrix.multiplyCopy(o.translate(u.x,u.y))),this._matrix=this._matrix.multiplyCopy(o.scale(n,i)),u&&(this._matrix=this._matrix.multiplyCopy(o.translate(-u.x,-u.y))),this._optionsChange(),this},rotate:function(n,i){var r=t.create(i)||t.ZERO;return this._matrix=this._matrix.multiplyCopy(o.rotate(n,r.x,r.y)),this._optionsChange(),this},multiply:function(n){var t=dt(n);return this._matrix=this._matrix.multiplyCopy(t),this._optionsChange(),this},matrix:function(n){return n?(this._matrix=n,this._optionsChange(),this):this._matrix},_optionsChange:function(){this.optionsChange({field:"transform",value:this})}}),g.extend(rr.prototype),c=h.extend({init:function(n){this._initOptions(n)},_initOptions:function(n){var t,i;void 0===n&&(n={}),t=n.clip,i=n.transform,i&&(n.transform=w(i)),t&&!t.id&&(t.id=yu()),this.options=new bt(n),this.options.addObserver(this)},transform:function(n){return r(n)?void this.options.set("transform",w(n)):this.options.get("transform")},parentTransform:function(){for(var t,i,n=this;n.parent;)n=n.parent,i=n.transform(),i&&(t=i.matrix().multiplyCopy(t||o.unit()));if(t)return w(t)},currentTransform:function(n){var u,i,t,r;if(void 0===n&&(n=this.parentTransform()),u=this.transform(),i=dt(u),t=dt(n),r=i&&t?t.multiplyCopy(i):i||t)return w(r)},visible:function(n){return r(n)?(this.options.set("visible",n),this):this.options.get("visible")!==!1},clip:function(n){var t=this.options;return r(n)?(n&&!n.id&&(n.id=yu()),t.set("clip",n),this):t.get("clip")},opacity:function(n){return r(n)?(this.options.set("opacity",n),this):ve(this.options.get("opacity"),1)},clippedBBox:function(n){var i,t=this._clippedBBox(n);if(t)return i=this.clip(),i?f.intersect(t,i.bbox(n)):t},containsPoint:function(n,t){var r,i;return!!this.visible()&&(r=this.currentTransform(t),i=n,r&&(i=n.transformCopy(r.matrix().invert())),this._hasFill()&&this._containsPoint(i)||this._isOnPath&&this._hasStroke()&&this._isOnPath(i))},_hasFill:function(){var n=this.options.fill;return n&&!ti(n.color)},_hasStroke:function(){var n=this.options.stroke;return n&&n.width>0&&!ti(n.color)},_clippedBBox:function(n){return this.bbox(n)}}),c.prototype.nodeType="Element",g.extend(c.prototype),ne=Math.PI/2,yt=h.extend({init:function(n,i){void 0===n&&(n=new t),void 0===i&&(i=0),this.setCenter(n),this.setRadius(i)},setCenter:function(n){return this._observerField("center",t.create(n)),this.geometryChange(),this},getCenter:function(){return this.center},equals:function(n){return n&&n.center.equals(this.center)&&n.radius===this.radius},clone:function(){return new yt(this.center.clone(),this.radius)},pointAt:function(n){return this._pointAt(at(n))},bbox:function(n){for(var s,o,e,h=this,c=gs(this.center,this.radius,this.radius,n),r=t.maxPoint(),u=t.minPoint(),i=0;i<4;i++)s=h._pointAt(c.x+i*ne).transformCopy(n),o=h._pointAt(c.y+i*ne).transformCopy(n),e=new t(s.x,o.y),r=t.min(r,e),u=t.max(u,e);return f.fromPoints(r,u)},_pointAt:function(n){var u=this,r=u.center,i=u.radius;return new t(r.x+i*Math.cos(n),r.y+i*Math.sin(n))},containsPoint:function(n){var i=this,t=i.center,u=i.radius;return Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(u,2)},_isOnPath:function(n,t){var u=this,f=u.center,i=u.radius,r=f.distanceTo(n);return i-t<=r&&r<=i+t}}),uu(yt.prototype,["radius"]),g.extend(yt.prototype),el="Gradient",ni={extend:function(n){n.fill=this.fill,n.stroke=this.stroke},fill:function(n,t){var u,i=this.options;return r(n)?(n&&n.nodeType!==el?(u={color:n},r(t)&&(u.opacity=t),i.set("fill",u)):i.set("fill",n),this):i.get("fill")},stroke:function(n,t,i){return r(n)?(this.options.set("stroke.color",n),r(t)&&this.options.set("stroke.width",t),r(i)&&this.options.set("stroke.opacity",i),this):this.options.get("stroke")}},ol=""+o.IDENTITY,bi={extend:function(n){n.bbox=this.bbox,n.geometryChange=this.geometryChange},bbox:function(n){var t,r,i=dt(this.currentTransform(n)),u=i?""+i:ol;return this._bboxCache&&this._matrixHash===u?t=this._bboxCache.clone():(t=this._bbox(i),this._bboxCache=t?t.clone():null,this._matrixHash=u),r=this.options.get("stroke.width"),r&&t&&t.expand(r/2),t},geometryChange:function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})}},ll="#000",kt=c.extend({init:function(n,t){void 0===n&&(n=new yt),void 0===t&&(t={}),c.fn.init.call(this,t),this.geometry(n),r(this.options.stroke)||this.stroke(ll)},rawBBox:function(){return this._geometry.bbox()},_bbox:function(n){return this._geometry.bbox(n)},_containsPoint:function(n){return this.geometry().containsPoint(n)},_isOnPath:function(n){return this.geometry()._isOnPath(n,this.options.stroke.width/2)}}),kt.prototype.nodeType="Circle",ni.extend(kt.prototype),bi.extend(kt.prototype),nf(kt.prototype,["geometry"]),ot=10,yl=45,k=Math.pow,ut=h.extend({init:function(n,i){void 0===n&&(n=new t),void 0===i&&(i={}),this.setCenter(n),this.radiusX=i.radiusX,this.radiusY=i.radiusY||i.radiusX,this.startAngle=i.startAngle,this.endAngle=i.endAngle,this.anticlockwise=i.anticlockwise||!1},clone:function(){return new ut(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},setCenter:function(n){return this._observerField("center",t.create(n)),this.geometryChange(),this},getCenter:function(){return this.center},pointAt:function(n){var r=this.center,i=at(n);return new t(r.x+this.radiusX*Math.cos(i),r.y+this.radiusY*Math.sin(i))},curvePoints:function(){for(var r,n,l=this,o=this.startAngle,h=this.anticlockwise?-1:1,s=[this.pointAt(o)],u=this._arcInterval(),e=u.endAngle-u.startAngle,f=Math.ceil(e/yl),c=e/f,t=o,i=1;i<=f;i++)r=t+h*c,n=l._intervalCurvePoints(t,r),s.push(n.cp1,n.cp2,n.p2),t=r;return s},bbox:function(n){for(var h,c,a=this,p=this._arcInterval(),l=p.startAngle,i=p.endAngle,v=gs(this.center,this.radiusX,this.radiusY,n),w=wi(v.x),b=wi(v.y),y=this.pointAt(i).transformCopy(n),e=go(w,l),u=go(b,l),r=this.pointAt(l).transformCopy(n),o=t.min(r,y),s=t.max(r,y);e<i||u<i;)h=void 0,e<i&&(h=a.pointAt(e).transformCopy(n),e+=90),c=void 0,u<i&&(c=a.pointAt(u).transformCopy(n),u+=90),r=new t(h.x,c.y),o=t.min(o,r),s=t.max(s,r);return f.fromPoints(o,s)},_arcInterval:function(){var u,i=this,t=i.startAngle,n=i.endAngle,r=i.anticlockwise;return r&&(u=t,t=n,n=u),(t>n||r&&t===n)&&(n+=360),{startAngle:t,endAngle:n}},_intervalCurvePoints:function(n,i){var u=this.pointAt(n),f=this.pointAt(i),o=this._derivativeAt(n),e=this._derivativeAt(i),r=(at(i)-at(n))/3,h=new t(u.x+r*o.x,u.y+r*o.y),s=new t(f.x-r*e.x,f.y-r*e.y);return{p1:u,cp1:h,cp2:s,p2:f}},_derivativeAt:function(n){var i=at(n);return new t(-this.radiusX*Math.sin(i),this.radiusY*Math.cos(i))},containsPoint:function(n){var c,i,f,u=this._arcInterval(),v=u.endAngle-u.startAngle,h=this,t=h.center,o=h.radiusX,e=h.radiusY,s=t.distanceTo(n),a=Math.atan2(n.y-t.y,n.x-t.x),l=o*e/Math.sqrt(k(o,2)*k(Math.sin(a),2)+k(e,2)*k(Math.cos(a),2)),p=this.pointAt(this.startAngle).round(ot),y=this.pointAt(this.endAngle).round(ot),r=av(t,n.round(ot),p,y);return v<180?c=r&&kf(t.distanceTo(r),s)&&kf(s,l):(i=di(t.x,t.y,o,e,n.x,n.y),360!==i&&(i=(360+i)%360),f=u.startAngle<=i&&i<=u.endAngle,c=f&&kf(s,l)||!f&&(!r||r.equals(n))),c},_isOnPath:function(n,t){var r,f=this._arcInterval(),u=this.center,i=di(u.x,u.y,this.radiusX,this.radiusY,n.x,n.y);return 360!==i&&(i=(360+i)%360),r=f.startAngle<=i&&i<=f.endAngle,r&&this.pointAt(i).distanceTo(n)<=t}}),ut.fromPoints=function(n,t,i,r,u,f){var e=pv({x1:n.x,y1:n.y,x2:t.x,y2:t.y,rx:i,ry:r,largeArc:u,swipe:f});return new ut(e.center,{startAngle:e.startAngle,endAngle:e.endAngle,radiusX:i,radiusY:r,anticlockwise:0===f})},uu(ut.prototype,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]),g.extend(ut.prototype),rl=[].push,tl=[].pop,ul=[].splice,gc=[].shift,io=[].slice,dc=[].unshift,pu=h.extend({init:function(n){void 0===n&&(n=[]),this.length=0,this._splice(0,n.length,n)},elements:function(n){return n?(this._splice(0,this.length,n),this._change(),this):this.slice(0)},push:function(){var n=arguments,t=rl.apply(this,n);return this._add(n),t},slice:function(){return io.call(this)},pop:function(){var t=this.length,n=tl.apply(this);return t&&this._remove([n]),n},splice:function(n,t){var r=io.call(arguments,2),i=this._splice(n,t,r);return this._change(),i},shift:function(){var t=this.length,n=gc.apply(this);return t&&this._remove([n]),n},unshift:function(){var n=arguments,t=dc.apply(this,n);return this._add(n),t},indexOf:function(n){for(var r=this,i=this.length,t=0;t<i;t++)if(r[t]===n)return t;return-1},_splice:function(n,t,i){var r=ul.apply(this,[n,t].concat(i));return this._clearObserver(r),this._setObserver(i),r},_add:function(n){this._setObserver(n),this._change()},_remove:function(n){this._clearObserver(n),this._change()},_setObserver:function(n){for(var i=this,t=0;t<n.length;t++)n[t].addObserver(i)},_clearObserver:function(n){for(var i=this,t=0;t<n.length;t++)n[t].removeObserver(i)},_change:function(){}}),g.extend(pu.prototype),ke=pu.extend({_change:function(){this.geometryChange()}}),rt=h.extend({init:function(n,t){void 0===n&&(n=0),void 0===t&&(t=0),this.real=n,this.img=t},add:function(n){return new rt(s(this.real+n.real,ot),s(this.img+n.img,ot))},addConstant:function(n){return new rt(this.real+n,this.img)},negate:function(){return new rt(-this.real,-this.img)},multiply:function(n){return new rt(this.real*n.real-this.img*n.img,this.real*n.img+this.img*n.real)},multiplyConstant:function(n){return new rt(this.real*n,this.img*n)},nthRoot:function(n){var i=Math.atan2(this.img,this.real),r=Math.sqrt(Math.pow(this.img,2)+Math.pow(this.real,2)),t=Math.pow(r,1/n);return new rt(t*Math.cos(i/n),t*Math.sin(i/n))},equals:function(n){return this.real===n.real&&this.img===n.img},isReal:function(){return 0===this.img}}),nr=h.extend({init:function(n,i,r){this.anchor(n||new t),this.controlIn(i),this.controlOut(r)},bboxTo:function(n,t){var u,i=this.anchor().transformCopy(t),r=n.anchor().transformCopy(t);return u=this.controlOut()&&n.controlIn()?this._curveBoundingBox(i,this.controlOut().transformCopy(t),n.controlIn().transformCopy(t),r):this._lineBoundingBox(i,r)},_lineBoundingBox:function(n,t){return f.fromPoints(n,t)},_curveBoundingBox:function(n,i,r,u){var h=[n,i,r,u],c=this._curveExtremesFor(h,"x"),s=this._curveExtremesFor(h,"y"),e=hl([c.min,c.max,n.x,u.x]),o=hl([s.min,s.max,n.y,u.y]);return f.fromPoints(new t(e.min,o.min),new t(e.max,o.max))},_curveExtremesFor:function(n,t){var i=this._curveExtremes(n[0][t],n[1][t],n[2][t],n[3][t]);return{min:wu(i.min,t,n),max:wu(i.max,t,n)}},_curveExtremes:function(n,t,i,r){var e,f,h=n-3*t+3*i-r,u=-2*(n-2*t+i),l=n-t,c=Math.sqrt(u*u-4*h*l),o=0,s=1;return 0===h?0!==u&&(o=s=-l/u):isNaN(c)||(o=(-u+c)/(2*h),s=(-u-c)/(2*h)),e=Math.max(Math.min(o,s),0),(e<0||e>1)&&(e=0),f=Math.min(Math.max(o,s),1),(f>1||f<0)&&(f=1),{min:e,max:f}},_intersectionsTo:function(n,t){var i;return i=this.controlOut()&&n.controlIn()?wl([this.anchor(),this.controlOut(),n.controlIn(),n.anchor()],t,this.bboxTo(n)):cl(this.anchor(),n.anchor(),t)},_isOnCurveTo:function(n,t,i,r){var e,o,s,u,c,f,h,l=this.bboxTo(n).expand(i,i);if(l.containsPoint(t))return e=this.anchor(),o=this.controlOut(),s=n.controlIn(),u=n.anchor(),"start"===r&&e.distanceTo(t)<=i?!fs(e,o,t):"end"===r&&u.distanceTo(t)<=i?!fs(u,s,t):(c=[e,o,s,u],!(!lu(c,t,"x","y",i)&&!lu(c,t,"y","x",i))||(f=w().rotate(45,t),h=[e.transformCopy(f),o.transformCopy(f),s.transformCopy(f),u.transformCopy(f)],lu(h,t,"x","y",i)||lu(h,t,"y","x",i)))},_isOnLineTo:function(n,t,i){var r=this.anchor(),u=n.anchor(),o=wi(Math.atan2(u.y-r.y,u.x-r.x)),e=new f([r.x,r.y-i/2],[r.distanceTo(u),i]);return e.containsPoint(t.transformCopy(w().rotate(-o,r)))},_isOnPathTo:function(n,t,i,r){var u;return u=this.controlOut()&&n.controlIn()?this._isOnCurveTo(n,t,i/2,r):this._isOnLineTo(n,t,i)}}),iu(nr.prototype,["anchor","controlIn","controlOut"]),g.extend(nr.prototype),e=c.extend({init:function(n){c.fn.init.call(this,n),this.segments=new ke,this.segments.addObserver(this),r(this.options.stroke)||(this.stroke("#000"),r(this.options.stroke.lineJoin)||this.options.set("stroke.lineJoin","miter"))},moveTo:function(n,t){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(n,t),this},lineTo:function(n,i){var f=r(i)?new t(n,i):n,u=new nr(f);return this.segments.push(u),this},curveTo:function(n,t,i){var u,r;return this.segments.length>0&&(u=it(this.segments),r=new nr(i,t),this.suspend(),u.controlOut(n),this.resume(),this.segments.push(r)),this},arc:function(n,i,r,u,f){var c,e,o,h,s;return this.segments.length>0&&(c=it(this.segments),e=c.anchor(),o=at(n),h=new t(e.x-r*Math.cos(o),e.y-u*Math.sin(o)),s=new ut(h,{startAngle:n,endAngle:i,radiusX:r,radiusY:u,anticlockwise:f}),this._addArcSegments(s)),this},arcTo:function(n,t,i,r,u){var o,e,f;return this.segments.length>0&&(o=it(this.segments),e=o.anchor(),f=ut.fromPoints(e,n,t,i,r,u),this._addArcSegments(f)),this},_addArcSegments:function(n){var i,t,r=this;for(this.suspend(),i=n.curvePoints(),t=1;t<i.length;t+=3)r.curveTo(i[t],i[t+1],i[t+2]);this.resume(),this.geometryChange()},close:function(){return this.options.closed=!0,this.geometryChange(),this},rawBBox:function(){return this._bbox()},_containsPoint:function(n){for(var e,f,t=this.segments,r=t.length,u=0,i=1;i<r;i++)e=t[i-1],f=t[i],u+=e._intersectionsTo(f,n);return!this.options.closed&&t[0].anchor().equals(t[r-1].anchor())||(u+=cl(t[0].anchor(),t[r-1].anchor(),n)),u%2!=0},_isOnPath:function(n,t){var r,i=this.segments,u=i.length,f=t||this.options.stroke.width;if(u>1){if(i[0]._isOnPathTo(i[1],n,f,"start"))return!0;for(r=2;r<=u-2;r++)if(i[r-1]._isOnPathTo(i[r],n,f))return!0;if(i[u-2]._isOnPathTo(i[u-1],n,f,"end"))return!0}return!1},_bbox:function(n){var i,o,t,e,r=this.segments,u=r.length;if(1===u)o=r[0].anchor().transformCopy(n),i=new f(o,y.ZERO);else if(u>0)for(t=1;t<u;t++)e=r[t-1].bboxTo(r[t],n),i=i?f.union(i,e):e;return i}}),e.fromRect=function(n,t){return new e(t).moveTo(n.topLeft()).lineTo(n.topRight()).lineTo(n.bottomRight()).lineTo(n.bottomLeft()).close()},e.fromPoints=function(n,i){var f,r,u;if(n){for(f=new e(i),r=0;r<n.length;r++)u=t.create(n[r]),u&&(0===r?f.moveTo(u):f.lineTo(u));return f}},e.fromArc=function(n,t){var i=new e(t),u=n.startAngle,r=n.pointAt(u);return i.moveTo(r.x,r.y),i.arc(u,n.endAngle,n.radiusX,n.radiusY,n.anticlockwise),i},e.prototype.nodeType="Path",ni.extend(e.prototype),bi.extend(e.prototype),ko="#000",ki=c.extend({init:function(n,t){void 0===n&&(n=new ut),void 0===t&&(t={}),c.fn.init.call(this,t),this.geometry(n),r(this.options.stroke)||this.stroke(ko)},_bbox:function(n){return this._geometry.bbox(n)},rawBBox:function(){return this.geometry().bbox()},toPath:function(){var t,i=new e,n=this.geometry().curvePoints();if(n.length>0)for(i.moveTo(n[0].x,n[0].y),t=1;t<n.length;t+=3)i.curveTo(n[t],n[t+1],n[t+2]);return i},_containsPoint:function(n){return this.geometry().containsPoint(n)},_isOnPath:function(n){return this.geometry()._isOnPath(n,this.options.stroke.width/2)}}),ki.prototype.nodeType="Arc",ni.extend(ki.prototype),bi.extend(ki.prototype),nf(ki.prototype,["geometry"]),ir=c.extend({init:function(n){c.fn.init.call(this,n),this.paths=new ke,this.paths.addObserver(this),r(this.options.stroke)||this.stroke("#000")},moveTo:function(n,t){var i=new e;return i.moveTo(n,t),this.paths.push(i),this},lineTo:function(n,t){return this.paths.length>0&&it(this.paths).lineTo(n,t),this},curveTo:function(n,t,i){return this.paths.length>0&&it(this.paths).curveTo(n,t,i),this},arc:function(n,t,i,r,u){return this.paths.length>0&&it(this.paths).arc(n,t,i,r,u),this},arcTo:function(n,t,i,r,u){return this.paths.length>0&&it(this.paths).arcTo(n,t,i,r,u),this},close:function(){return this.paths.length>0&&it(this.paths).close(),this},_bbox:function(n){return su(this.paths,!0,n)},rawBBox:function(){return su(this.paths,!1)},_containsPoint:function(n){for(var i=this.paths,t=0;t<i.length;t++)if(i[t]._containsPoint(n))return!0;return!1},_isOnPath:function(n){for(var i=this.paths,r=this.options.stroke.width,t=0;t<i.length;t++)if(i[t]._isOnPath(n,r))return!0;return!1},_clippedBBox:function(n){return sl(this.paths,this.currentTransform(n))}}),ir.prototype.nodeType="MultiPath",ni.extend(ir.prototype),bi.extend(ir.prototype),ts="12px sans-serif",rs="#000",si=c.extend({init:function(n,i,u){void 0===i&&(i=new t),void 0===u&&(u={}),c.fn.init.call(this,u),this.content(n),this.position(i),this.options.font||(this.options.font=ts),r(this.options.fill)||this.fill(rs)},content:function(n){return r(n)?(this.options.set("content",n),this):this.options.get("content")},measure:function(){return bf.measureText(this.content(),{font:this.options.get("font")})},rect:function(){var n=this.measure(),t=this.position().clone();return new f(t,[n.width,n.height])},bbox:function(n){var t=dt(this.currentTransform(n));return this.rect().bbox(t)},rawBBox:function(){return this.rect().bbox()},_containsPoint:function(n){return this.rect().containsPoint(n)}}),si.prototype.nodeType="Text",ni.extend(si.prototype),iu(si.prototype,["position"]),vi=c.extend({init:function(n,t,i){void 0===t&&(t=new f),void 0===i&&(i={}),c.fn.init.call(this,i),this.src(n),this.rect(t)},src:function(n){return r(n)?(this.options.set("src",n),this):this.options.get("src")},bbox:function(n){var t=dt(this.currentTransform(n));return this._rect.bbox(t)},rawBBox:function(){return this._rect.bbox()},_containsPoint:function(n){return this._rect.containsPoint(n)},_hasFill:function(){return this.src()}}),vi.prototype.nodeType="Image",nf(vi.prototype,["rect"]),vu={extend:function(n,t){n.traverse=function(n){for(var i,u=this[t],r=0;r<u.length;r++)i=u[r],i.traverse?i.traverse(n):n(i);return this}}},l=c.extend({init:function(n){c.fn.init.call(this,n),this.children=[]},childrenChange:function(n,t,i){this.trigger("childrenChange",{action:n,items:t,index:i})},append:function(){return dr(this.children,arguments),this._reparent(arguments,this),this.childrenChange("add",arguments),this},insert:function(n,t){return this.children.splice(n,0,t),t.parent=this,this.childrenChange("add",[t],n),this},insertAt:function(n,t){return this.insert(t,n)},remove:function(n){var t=this.children.indexOf(n);return t>=0&&(this.children.splice(t,1),n.parent=null,this.childrenChange("remove",[n],t)),this},removeAt:function(n){if(0<=n&&n<this.children.length){var t=this.children[n];this.children.splice(n,1),t.parent=null,this.childrenChange("remove",[t],n)}return this},clear:function(){var n=this.children;return this.children=[],this._reparent(n,null),this.childrenChange("remove",n,0),this},bbox:function(n){return su(this.children,!0,this.currentTransform(n))},rawBBox:function(){return su(this.children,!1)},_clippedBBox:function(n){return sl(this.children,this.currentTransform(n))},currentTransform:function(n){return c.prototype.currentTransform.call(this,n)||null},containsPoint:function(n,t){var r,u,i;if(this.visible())for(r=this.children,u=this.currentTransform(t),i=0;i<r.length;i++)if(r[i].containsPoint(n,u))return!0;return!1},_reparent:function(n,t){for(var r,i,f=this,u=0;u<n.length;u++)r=n[u],i=r.parent,i&&i!==f&&i.remove&&i.remove(r),r.parent=t}}),l.prototype.nodeType="Group",vu.extend(l.prototype,"children"),bo={alignContent:"start",justifyContent:"start",alignItems:"start",spacing:0,orientation:"horizontal",lineSpacing:0,wrap:!0},ns=l.extend({init:function(t,i){l.fn.init.call(this,n.extend({},bo,i)),this._rect=t,this._fieldMap={}},rect:function(n){return n?(this._rect=n,this):this._rect},_initMap:function(){var t=this.options,n=this._fieldMap;"horizontal"===t.orientation?(n.sizeField="width",n.groupsSizeField="height",n.groupAxis="x",n.groupsAxis="y"):(n.sizeField="height",n.groupsSizeField="width",n.groupAxis="y",n.groupsAxis="x")},reflow:function(){var i,r,it,tt,ot,p,u,e,v,s,nt,k,d,ft,ut,g,et,n,a,b,l,o,c,st,rt,h;if(this._rect&&0!==this.children.length){for(this._initMap(),this.options.transform&&this.transform(null),i=this.options,r=this._rect,it=this._initGroups(),tt=it.groups,ot=it.groupsSize,p=this._fieldMap,u=p.sizeField,e=p.groupsSizeField,v=p.groupAxis,s=p.groupsAxis,nt=new t,k=new t,d=new y,ft=gr(ot,r,i.alignContent,s,e),b=0;b<tt.length;b++){for(n=tt[b],nt[v]=ut=gr(n.size,r,i.justifyContent,v,u),nt[s]=ft,d[u]=n.size,d[e]=n.lineSize,a=new f(nt,d),l=0;l<n.bboxes.length;l++)et=n.elements[l],g=n.bboxes[l],k[v]=ut,k[s]=gr(g.size[e],a,i.alignItems,s,e),gu(k,g,et),ut+=g.size[u]+i.spacing;ft+=n.lineSize+i.lineSpacing}!i.wrap&&n.size>r.size[u]&&(o=r.size[u]/a.size[u],c=a.topLeft().scale(o,o),st=a.size[e]*o,rt=gr(st,r,i.alignContent,s,e),h=w(),"x"===v?h.translate(r.origin.x-c.x,rt-c.y):h.translate(rt-c.x,r.origin.y-c.y),h.scale(o,o),this.transform(h))}},_initGroups:function(){for(var u,t,i=this,a=this,o=a.options,e=a.children,l=o.lineSpacing,y=o.wrap,v=o.spacing,c=this._fieldMap.sizeField,n=this._newGroup(),h=[],f=function(){h.push(n),s+=n.lineSize+l},s=-l,r=0;r<e.length;r++)u=e[r],t=e[r].clippedBBox(),u.visible()&&t&&(y&&n.size+t.size[c]+v>i._rect.size[c]?0===n.bboxes.length?(i._addToGroup(n,t,u),f(),n=i._newGroup()):(f(),n=i._newGroup(),i._addToGroup(n,t,u)):i._addToGroup(n,t,u));return n.bboxes.length&&f(),{groups:h,groupsSize:s}},_addToGroup:function(n,t,i){n.size+=t.size[this._fieldMap.sizeField]+this.options.spacing,n.lineSize=Math.max(t.size[this._fieldMap.groupsSizeField],n.lineSize),n.bboxes.push(t),n.elements.push(i)},_newGroup:function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}}}),ai=c.extend({init:function(n,t){void 0===n&&(n=new f),void 0===t&&(t={}),c.fn.init.call(this,t),this.geometry(n),r(this.options.stroke)||this.stroke("#000")},_bbox:function(n){return this._geometry.bbox(n)},rawBBox:function(){return this._geometry.bbox()},_containsPoint:function(n){return this._geometry.containsPoint(n)},_isOnPath:function(n){return this.geometry()._isOnPath(n,this.options.stroke.width/2)}}),ai.prototype.nodeType="Rect",ni.extend(ai.prototype),bi.extend(ai.prototype),nf(ai.prototype,["geometry"]),us=pu.extend({_change:function(){this.optionsChange({field:"stops"})}}),ht=h.extend({init:function(n,t,i){this.options=new bt({offset:n,color:t,opacity:r(i)?i:1}),this.options.addObserver(this)}}),ht.create=function(n){if(r(n)){var t;return t=n instanceof ht?n:n.length>1?new ht(n[0],n[1],n[2]):new ht(n.offset,n.color,n.opacity)}},ba(ht.prototype,["offset","color","opacity"]),g.extend(ht.prototype),vt=h.extend({init:function(n){void 0===n&&(n={}),this.stops=new us(this._createStops(n.stops)),this.stops.addObserver(this),this._userSpace=n.userSpace,this.id=yu()},userSpace:function(n){return r(n)?(this._userSpace=n,this.optionsChange(),this):this._userSpace},_createStops:function(n){var i,t;for(void 0===n&&(n=[]),i=[],t=0;t<n.length;t++)i.push(ht.create(n[t]));return i},addStop:function(n,t,i){this.stops.push(new ht(n,t,i))},removeStop:function(n){var t=this.stops.indexOf(n);t>=0&&this.stops.splice(t,1)}}),vt.prototype.nodeType="Gradient",g.extend(vt.prototype),n.extend(vt.prototype,{optionsChange:function(n){this.trigger("optionsChange",{field:"gradient"+(n?"."+n.field:""),value:this})},geometryChange:function(){this.optionsChange()}}),gi=vt.extend({init:function(n){void 0===n&&(n={}),vt.fn.init.call(this,n),this.start(n.start||new t),this.end(n.end||new t(1,0))}}),iu(gi.prototype,["start","end"]),pr=vt.extend({init:function(n){void 0===n&&(n={}),vt.fn.init.call(this,n),this.center(n.center||new t),this._radius=r(n.radius)?n.radius:1,this._fallbackFill=n.fallbackFill},radius:function(n){return r(n)?(this._radius=n,this.geometryChange(),this):this._radius},fallbackFill:function(n){return r(n)?(this._fallbackFill=n,this.optionsChange(),this):this._fallbackFill}}),iu(pr.prototype,["center"]),is={swing:iy,linear:kv,easeOutElastic:yv},lf=Date.now||function(){return+new Date},ku=h.extend({init:function(t,i){this.options=n.extend({},this.options,i),this.element=t},setup:function(){},step:function(){},play:function(){var f,u,e,r=this,i=this.options,n=i.duration,t=i.delay;void 0===t&&(t=0),f=is[i.easing],u=lf()+t,e=u+n,0===n?(this.step(1),this.abort()):setTimeout(function(){var t=function(){var o,i,h,s;r._stopped||(o=lf(),i=ss(o-u,0,n),h=i/n,s=f(h,i,0,1,n),r.step(s),o<e?kendo.animationFrame(t):r.abort())};t()},t)},abort:function(){this._stopped=!0},destroy:function(){this.abort()}}),ku.prototype.options={duration:500,easing:"swing"},br=h.extend({init:function(){this._items=[]},register:function(n,t){this._items.push({name:n,type:t})},create:function(n,t){var u,f,i,r=this._items;if(t&&t.type)for(f=t.type.toLowerCase(),i=0;i<r.length;i++)if(r[i].name.toLowerCase()===f){u=r[i];break}if(u)return new u.type(n,t)}}),br.current=new br,ku.create=function(n,t,i){return br.current.create(n,t,i)},yf={l:function(n,i){for(var r,e=i.parameters,f=i.position,u=0;u<e.length;u+=2)r=new t(e[u],e[u+1]),i.isRelative&&r.translateWith(f),n.lineTo(r.x,r.y),f.x=r.x,f.y=r.y},c:function(n,i){for(var o,s,f,u=i.parameters,e=i.position,r=0;r<u.length;r+=6)o=new t(u[r],u[r+1]),s=new t(u[r+2],u[r+3]),f=new t(u[r+4],u[r+5]),i.isRelative&&(s.translateWith(e),o.translateWith(e),f.translateWith(e)),n.curveTo(o,s,f),e.x=f.x,e.y=f.y},v:function(n,t){var i=t.isRelative?0:t.position.x;uc(t.parameters,!0,i),this.l(n,t)},h:function(n,t){var i=t.isRelative?0:t.position.y;uc(t.parameters,!1,i),this.l(n,t)},a:function(n,i){for(var o,s,c,h,f,u=i.parameters,e=i.position,r=0;r<u.length;r+=7)o=u[r],s=u[r+1],c=u[r+3],h=u[r+4],f=new t(u[r+5],u[r+6]),i.isRelative&&f.translateWith(e),n.arcTo(f,o,s,c,h),e.x=f.x,e.y=f.y},s:function(n,i){var o,r,s,f,h,e=i.parameters,u=i.position,c=i.previousCommand;for("s"!==c&&"c"!==c||(o=it(it(n.paths).segments).controlIn()),r=0;r<e.length;r+=4)s=new t(e[r],e[r+1]),f=new t(e[r+2],e[r+3]),h=void 0,i.isRelative&&(s.translateWith(u),f.translateWith(u)),h=o?vc(o,u):u.clone(),o=s,n.curveTo(h,s,f),u.x=f.x,u.y=f.y},q:function(n,i){for(var o,u,s,f=i.parameters,e=i.position,r=0;r<f.length;r+=4)o=new t(f[r],f[r+1]),u=new t(f[r+2],f[r+3]),i.isRelative&&(o.translateWith(e),u.translateWith(e)),s=ac(e,o,u),n.curveTo(s.controlOut,s.controlIn,u),e.x=u.x,e.y=u.y},t:function(n,i){var e,c,f,u,s,o=i.parameters,r=i.position,h=i.previousCommand;for("q"!==h&&"t"!==h||(c=it(it(n.paths).segments),e=c.controlIn().clone().translateWith(r.scaleCopy(-1/3)).scale(1.5)),f=0;f<o.length;f+=2)u=new t(o[f],o[f+1]),i.isRelative&&u.translateWith(r),e=e?vc(e,r):r.clone(),s=ac(r,e,u),n.curveTo(s.controlOut,s.controlIn,u),r.x=u.x,r.y=u.y}},fe=1/3,th=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,ih=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g,oe="m",rh="z",vr=h.extend({parse:function(n,i){var f,u=new ir(i),r=new t;return n.replace(th,function(n,t,i,e){var o=t.toLowerCase(),h=o===t,s=wa(i.trim());if(o===oe&&(h?(r.x+=s[0],r.y+=s[1]):(r.x=s[0],r.y=s[1]),u.moveTo(r.x,r.y),s.length>2&&(o="l",s.splice(0,2))),yf[o])yf[o](u,{parameters:s,position:r,isRelative:h,previousCommand:f}),e&&e.toLowerCase()===rh&&u.close();else if(o!==oe)throw Error("Error while parsing SVG path. Unsupported command: "+o);f=o}),u}}),vr.current=new vr,e.parse=function(n,t){return vr.current.parse(n,t)},ii=h.extend({init:function(){this._items=[]},register:function(n,t,i){var r=this._items,f=r[0],u={name:n,type:t,order:i};!f||i<f.order?r.unshift(u):r.push(u)},create:function(n,t){var f,i,r=this._items,u=r[0];if(t&&t.type)for(f=t.type.toLowerCase(),i=0;i<r.length;i++)if(r[i].name===f){u=r[i];break}return u?new u.type(n,t):void kendo.logToConsole("Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n- The browser does not support SVG and Canvas. User agent: "+navigator.userAgent)}}),ii.current=new ii,ds=["click","mouseenter","mouseleave","mousemove","resize","tooltipOpen","tooltipClose"],a=kendo.Observable.extend({init:function(t,i){kendo.Observable.fn.init.call(this),this.options=n.extend({},i),this.element=t,this._click=this._handler("click"),this._mouseenter=this._handler("mouseenter"),this._mouseleave=this._handler("mouseleave"),this._mousemove=this._handler("mousemove"),this._visual=new l,kr(t,this.options),this.bind(ds,this.options),this._enableTracking()},draw:function(n){this._visual.children.push(n)},clear:function(){this._visual.children=[]},destroy:function(){this._visual=null,this.unbind()},eventTarget:function(n){for(var i,r=this,t=hs(n);!i&&t&&(i=t._kendoNode,t!==r.element);)t=t.parentElement;if(i)return i.srcElement},exportVisual:function(){return this._visual},getSize:function(){return kr(this.element)},currentSize:function(n){return n?void(this._size=n):this._size},setSize:function(n){kr(this.element,n),this.currentSize(n),this._resize()},resize:function(n){var t=this.getSize(),i=this.currentSize();(n||(t.width>0||t.height>0)&&(!i||t.width!==i.width||t.height!==i.height))&&(this.currentSize(t),this._resize(t,n),this.trigger("resize",t))},size:function(n){return n?void this.setSize(n):this.getSize()},suspendTracking:function(){this._suspendedTracking=!0},resumeTracking:function(){this._suspendedTracking=!1},_enableTracking:function(){},_resize:function(){},_handler:function(n){var t=this;return function(i){var r=t.eventTarget(i);r&&!t._suspendedTracking&&t.trigger(n,{element:r,originalEvent:i,type:n})}},_elementOffset:function(){var i=this.element,t=so(i,["paddingLeft","paddingTop"]),f=t.paddingLeft,e=t.paddingTop,n=cs(i),u=n.left,r=n.top;return{left:u+parseInt(f,10),top:r+parseInt(e,10)}},_surfacePoint:function(n){var r=this._elementOffset(),i=bs(n),f=i.x-r.left,u=i.y-r.top;return new t(f,u)}}),a.create=function(n,t){return ii.current.create(n,t)},a.support={},nt=h.extend({init:function(n){this.childNodes=[],this.parent=null,n&&(this.srcElement=n,this.observe())},destroy:function(){var t,n,i=this;for(this.srcElement&&this.srcElement.removeObserver(this),t=this.childNodes,n=0;n<t.length;n++)i.childNodes[n].destroy();this.parent=null},load:function(){},observe:function(){this.srcElement&&this.srcElement.addObserver(this)},append:function(n){this.childNodes.push(n),n.parent=this},insertAt:function(n,t){this.childNodes.splice(t,0,n),n.parent=this},remove:function(n,t){for(var u=this,r=n+t,i=n;i<r;i++)u.childNodes[i].removeSelf();this.childNodes.splice(n,t)},removeSelf:function(){this.clear(),this.destroy()},clear:function(){this.remove(0,this.childNodes.length)},invalidate:function(){this.parent&&this.parent.invalidate()},geometryChange:function(){this.invalidate()},optionsChange:function(){this.invalidate()},childrenChange:function(n){"add"===n.action?this.load(n.items,n.index):"remove"===n.action&&this.remove(n.index,n.items.length),this.invalidate()}}),ct={},tr="http://www.w3.org/2000/svg",ar="none",df=function(n,t){n.innerHTML=t},"undefined"!=typeof document&&(nh="<svg xmlns='"+tr+"'></svg>",ue=document.createElement("div"),oh="undefined"!=typeof DOMParser,ue.innerHTML=nh,oh&&ue.firstChild.namespaceURI!==tr&&(df=function(n,t){var u=new DOMParser,r=u.parseFromString(t,"text/xml"),i=document.adoptNode(r.documentElement);n.innerHTML="",n.appendChild(i)})),se=df,re="transform",lr={clip:"clip-path",fill:"fill"},b=nt.extend({init:function(n){nt.fn.init.call(this,n),this.definitions={}},destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),nt.fn.destroy.call(this)},load:function(n,t){for(var e,u,i,s,o=this,f=0;f<n.length;f++)e=n[f],u=e.children,i=new ct[e.nodeType](e),r(t)?o.insertAt(i,t):o.append(i),i.createDefinitions(),u&&u.length>0&&i.load(u),s=o.element,s&&i.attachTo(s,t)},root:function(){for(var n=this;n.parent;)n=n.parent;return n},attachTo:function(n,t){var i,u=document.createElement("div");se(u,"<svg xmlns='"+tr+"' version='1.1'>"+this.render()+"</svg>"),i=u.firstChild.firstChild,i&&(r(t)?n.insertBefore(i,n.childNodes[t]||null):n.appendChild(i),this.setElement(i))},setElement:function(n){var i,t,r;for(this.element&&(this.element._kendoNode=null),this.element=n,this.element._kendoNode=this,i=this.childNodes,t=0;t<i.length;t++)r=n.childNodes[t],i[t].setElement(r)},clear:function(){var t,n;for(this.clearDefinitions(),this.element&&(this.element.innerHTML=""),t=this.childNodes,n=0;n<t.length;n++)t[n].destroy();this.childNodes=[]},removeSelf:function(){if(this.element){var n=this.element.parentNode;n&&n.removeChild(this.element),this.element=null}nt.fn.removeSelf.call(this)},template:function(){return this.renderChildren()},render:function(){return this.template()},renderChildren:function(){for(var i=this.childNodes,t="",n=0;n<i.length;n++)t+=i[n].render();return t},optionsChange:function(n){var t=n.field,i=n.value;"visible"===t?this.css("display",i?"":ar):lr[t]&&cc(t,i)?this.updateDefinition(t,i):"opacity"===t?this.attr("opacity",i):"cursor"===t&&this.css("cursor",i),nt.fn.optionsChange.call(this,n)},attr:function(n,t){this.element&&this.element.setAttribute(n,t)},allAttr:function(n){for(var i=this,t=0;t<n.length;t++)i.attr(n[t][0],n[t][1])},css:function(n,t){this.element&&(this.element.style[n]=t)},allCss:function(n){for(var i=this,t=0;t<n.length;t++)i.css(n[t][0],n[t][1])},removeAttr:function(n){this.element&&this.element.removeAttribute(n)},mapTransform:function(n){var t=[];return n&&t.push([re,"matrix("+n.matrix().toString(6)+")"]),t},renderTransform:function(){return oi(this.mapTransform(this.srcElement.transform()))},transformChange:function(n){n?this.allAttr(this.mapTransform(n)):this.removeAttr(re)},mapStyle:function(){var t=this.srcElement.options,n=[["cursor",t.cursor]];return t.visible===!1&&n.push(["display",ar]),n},renderStyle:function(){return nu("style",lc(this.mapStyle(!0)))},renderOpacity:function(){return nu("opacity",this.srcElement.options.opacity)},createDefinitions:function(){var f,u,t,n,r=this.srcElement,i=this.definitions;if(r){f=r.options;for(t in lr)n=f.get(t),n&&cc(t,n)&&(i[t]=n,u=!0);u&&this.definitionChange({action:"add",definitions:i})}},definitionChange:function(n){this.parent&&this.parent.definitionChange(n)},updateDefinition:function(n,t){var r=this.definitions,u=r[n],f=lr[n],i={};u&&(i[n]=u,this.definitionChange({action:"remove",definitions:i}),delete r[n]),t?(i[n]=t,this.definitionChange({action:"add",definitions:i}),r[n]=t,this.attr(f,ah(t.id))):u&&this.removeAttr(f)},clearDefinitions:function(){var n=this.definitions;this.definitionChange({action:"remove",definitions:n}),this.definitions={}},renderDefinitions:function(){return oi(this.mapDefinitions())},mapDefinitions:function(){var n,i=this.definitions,t=[];for(n in i)t.push([lr[n],ah(i[n].id)]);return t}}),wf=b.extend({template:function(){return"<stop "+this.renderOffset()+" "+this.renderStyle()+" />"},renderOffset:function(){return nu("offset",this.srcElement.offset())},mapStyle:function(){var n=this.srcElement;return[["stop-color",n.color()],["stop-opacity",n.opacity()]]},optionsChange:function(n){"offset"===n.field?this.attr(n.field,n.value):"color"!==n.field&&"opacity"!==n.field||this.css("stop-"+n.field,n.value)}}),ef=b.extend({init:function(n){b.fn.init.call(this,n),this.id=n.id,this.loadStops()},loadStops:function(){for(var t,u=this,i=this.srcElement.stops,r=this.element,n=0;n<i.length;n++)t=new wf(i[n]),u.append(t),r&&t.attachTo(r)},optionsChange:function(n){"gradient.stops"===n.field?(nt.prototype.clear.call(this),this.loadStops()):"gradient"===n.field&&this.allAttr(this.mapCoordinates())},renderCoordinates:function(){return oi(this.mapCoordinates())},mapSpace:function(){return["gradientUnits",this.srcElement.userSpace()?"userSpaceOnUse":"objectBoundingBox"]}}),ff=ef.extend({template:function(){return"<linearGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</linearGradient>"},mapCoordinates:function(){var i=this.srcElement,t=i.start(),n=i.end();return[["x1",t.x],["y1",t.y],["x2",n.x],["y2",n.y],this.mapSpace()]}}),of=ef.extend({template:function(){return"<radialGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</radialGradient>"},mapCoordinates:function(){var t=this.srcElement,n=t.center(),r=t.radius();return[["cx",n.x],["cy",n.y],["r",r],this.mapSpace()]}}),uf=b.extend({init:function(n){b.fn.init.call(this),this.srcElement=n,this.id=n.id,this.load([n])},template:function(){return"<clipPath id='"+this.id+"'>"+this.renderChildren()+"</clipPath>"}}),sf=b.extend({init:function(){b.fn.init.call(this),this.definitionMap={}},attachTo:function(n){this.element=n},template:function(){return"<defs>"+this.renderChildren()+"</defs>"},definitionChange:function(n){var i=n.definitions,t=n.action;"add"===t?this.addDefinitions(i):"remove"===t&&this.removeDefinitions(i)},createDefinition:function(n,t){var i;return"clip"===n?i=uf:"fill"===n&&(t instanceof gi?i=ff:t instanceof pr&&(i=of)),new i(t)},addDefinitions:function(n){var t,i=this;for(t in n)i.addDefinition(t,n[t])},addDefinition:function(n,t){var i,e=this,o=e.element,f=e.definitionMap,r=t.id,u=f[r];u?u.count++:(i=this.createDefinition(n,t),f[r]={element:i,count:1},this.append(i),o&&i.attachTo(this.element))},removeDefinitions:function(n){var t,i=this;for(t in n)i.removeDefinition(n[t])},removeDefinition:function(n){var i=this.definitionMap,r=n.id,t=i[r];t&&(t.count--,0===t.count&&(this.remove(this.childNodes.indexOf(t.element),1),delete i[r]))}}),cu=b.extend({init:function(n){b.fn.init.call(this),this.options=n,this.defs=new sf},attachTo:function(n){this.element=n,this.defs.attachTo(n.firstElementChild)},clear:function(){nt.prototype.clear.call(this)},template:function(){return this.defs.render()+this.renderChildren()},definitionChange:function(n){this.defs.definitionChange(n)}}),du=a.extend({init:function(n,t){a.fn.init.call(this,n,t),this._root=new cu(this.options),se(this.element,this._template()),this._rootElement=this.element.firstElementChild,ea(this._rootElement),this._root.attachTo(this._rootElement),ye(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()},destroy:function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,ee(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),a.fn.destroy.call(this)},translate:function(n){var t=Math.round(n.x)+" "+Math.round(n.y)+" "+this._size.width+" "+this._size.height;this._offset=n,this._rootElement.setAttribute("viewBox",t)},draw:function(n){a.fn.draw.call(this,n),this._root.load([n])},clear:function(){a.fn.clear.call(this),this._root.clear()},svg:function(){return"<?xml version='1.0' ?>"+this._template()},exportVisual:function(){var n,r=this,t=r._visual,i=r._offset;return i&&(n=new l,n.children.push(t),n.transform(w().translate(-i.x,-i.y)),t=n),t},_resize:function(){this._offset&&this.translate(this._offset)},_template:function(){return"<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='"+tr+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+this._root.render()+"</svg>"}}),du.prototype.type="svg","undefined"!=typeof document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(a.support.svg=!0,ii.current.register("svg",du,10)),pf=b.extend({template:function(){return"<g"+(this.renderTransform()+this.renderStyle()+this.renderOpacity()+this.renderDefinitions())+">"+this.renderChildren()+"</g>"},optionsChange:function(n){"transform"===n.field&&this.transformChange(n.value),b.fn.optionsChange.call(this,n)}}),ct.Group=pf,hf={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},eu="solid",co="butt",uh={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},ao=" ",tt=b.extend({geometryChange:function(){this.attr("d",this.renderData()),this.invalidate()},optionsChange:function(n){switch(n.field){case"fill":n.value?this.allAttr(this.mapFill(n.value)):this.removeAttr("fill");break;case"fill.color":this.allAttr(this.mapFill({color:n.value}));break;case"stroke":n.value?this.allAttr(this.mapStroke(n.value)):this.removeAttr("stroke");break;case"transform":this.transformChange(n.value);break;default:var t=uh[n.field];t&&this.attr(t,n.value)}b.fn.optionsChange.call(this,n)},content:function(){this.element&&(this.element.textContent=this.srcElement.content())},renderData:function(){return this.printPath(this.srcElement)},printPath:function(n){var u,e,s,t,r,f=this,i=n.segments,o=i.length;if(o>0){for(u=[],t=1;t<o;t++)r=f.segmentType(i[t-1],i[t]),r!==s&&(s=r,u.push(r)),u.push("L"===r?f.printPoints(i[t].anchor()):f.printPoints(i[t-1].controlOut(),i[t].controlIn(),i[t].anchor()));return e="M"+this.printPoints(i[0].anchor())+ao+u.join(ao),n.options.closed&&(e+="Z"),e}},printPoints:function(){for(var i=arguments,r=i.length,t=[],n=0;n<r;n++)t.push(i[n].toString(3));return t.join(" ")},segmentType:function(n,t){return n.controlOut()&&t.controlIn()?"C":"L"},mapStroke:function(n){var t=[];return n&&!ti(n.color)?(t.push(["stroke",n.color]),t.push(["stroke-width",n.width]),t.push(["stroke-linecap",this.renderLinecap(n)]),t.push(["stroke-linejoin",n.lineJoin]),r(n.opacity)&&t.push(["stroke-opacity",n.opacity]),r(n.dashType)&&t.push(["stroke-dasharray",this.renderDashType(n)])):t.push(["stroke",ar]),t},renderStroke:function(){return oi(this.mapStroke(this.srcElement.options.stroke))},renderDashType:function(n){var u,f,t,r=n.dashType,i=n.width;if(void 0===i&&(i=1),r&&r!==eu){for(u=hf[r.toLowerCase()],f=[],t=0;t<u.length;t++)f.push(u[t]*i);return f.join(" ")}},renderLinecap:function(n){var t=n.dashType,i=n.lineCap;return t&&"solid"!==t?co:i},mapFill:function(n){var t=[];return n&&"Gradient"===n.nodeType||(n&&!ti(n.color)?(t.push(["fill",n.color]),r(n.opacity)&&t.push(["fill-opacity",n.opacity])):t.push(["fill",ar])),t},renderFill:function(){return oi(this.mapFill(this.srcElement.options.fill))},template:function(){return"<path "+this.renderStyle()+" "+this.renderOpacity()+" "+nu("d",this.renderData())+this.renderStroke()+this.renderFill()+this.renderDefinitions()+this.renderTransform()+"></path>"}}),ct.Path=tt,fo=tt.extend({renderData:function(){return this.printPath(this.srcElement.toPath())}}),ct.Arc=fo,uo=tt.extend({geometryChange:function(){var n=this.center();this.attr("cx",n.x),this.attr("cy",n.y),this.attr("r",this.radius()),this.invalidate()},center:function(){return this.srcElement.geometry().center},radius:function(){return this.srcElement.geometry().radius},template:function(){return"<circle "+this.renderStyle()+" "+this.renderOpacity()+"cx='"+this.center().x+"' cy='"+this.center().y+"' r='"+this.radius()+"'"+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+this.renderTransform()+" ></circle>"}}),ct.Circle=uo,oo=tt.extend({geometryChange:function(){var n=this.srcElement.geometry();this.attr("x",n.origin.x),this.attr("y",n.origin.y),this.attr("width",n.size.width),this.attr("height",n.size.height),this.invalidate()},size:function(){return this.srcElement.geometry().size},origin:function(){return this.srcElement.geometry().origin},template:function(){return"<rect "+this.renderStyle()+" "+this.renderOpacity()+" x='"+this.origin().x+"' y='"+this.origin().y+"' width='"+this.size().width+"' height='"+this.size().height+"' "+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+" "+this.renderTransform()+" />"}}),ct.Rect=oo,eo=tt.extend({geometryChange:function(){this.allAttr(this.mapPosition()),this.invalidate()},optionsChange:function(n){"src"===n.field&&this.allAttr(this.mapSource()),tt.fn.optionsChange.call(this,n)},mapPosition:function(){var n=this.srcElement.rect(),t=n.topLeft();return[["x",t.x],["y",t.y],["width",n.width()+"px"],["height",n.height()+"px"]]},renderPosition:function(){return oi(this.mapPosition())},mapSource:function(n){var t=this.srcElement.src();return n&&(t=kendo.htmlEncode(t)),[["xlink:href",t]]},renderSource:function(){return oi(this.mapSource(!0))},template:function(){return"<image preserveAspectRatio='none' "+this.renderStyle()+" "+this.renderTransform()+" "+this.renderOpacity()+this.renderPosition()+" "+this.renderSource()+" "+this.renderDefinitions()+"></image>"}}),ct.Image=eo,"undefined"!=typeof document&&(de._element=document.createElement("span")),po=tt.extend({geometryChange:function(){var n=this.pos();this.attr("x",n.x),this.attr("y",n.y),this.invalidate()},optionsChange:function(n){"font"===n.field?(this.attr("style",lc(this.mapStyle())),this.geometryChange()):"content"===n.field&&tt.fn.content.call(this,this.srcElement.content()),tt.fn.optionsChange.call(this,n)},mapStyle:function(n){var i=tt.fn.mapStyle.call(this,n),t=this.srcElement.options.font;return n&&(t=kendo.htmlEncode(t)),i.push(["font",t]),i},pos:function(){var n=this.srcElement.position(),t=this.srcElement.measure();return n.clone().setY(n.y+t.baseline)},renderContent:function(){var n=this.srcElement.content();return n=de(n),n=kendo.htmlEncode(n)},template:function(){return"<text "+this.renderStyle()+" "+this.renderOpacity()+" x='"+this.pos().x+"' y='"+this.pos().y+"'"+this.renderStroke()+" "+this.renderTransform()+" "+this.renderDefinitions()+this.renderFill()+">"+this.renderContent()+"</text>"}}),ct.Text=po,yo=tt.extend({renderData:function(){var i,n,r=this,t=this.srcElement.paths;if(t.length>0){for(i=[],n=0;n<t.length;n++)i.push(r.printPath(t[n]));return i.join(" ")}}}),ct.MultiPath=yo,fh={Circle:yt,Arc:ut,Rect:f,Point:t,Segment:nr,Matrix:o,Size:y,toMatrix:dt,Transformation:rr,transform:w},eh={Surface:du,RootNode:cu,Node:b,GroupNode:pf,ArcNode:fo,CircleNode:uo,RectNode:oo,ImageNode:eo,TextNode:po,PathNode:tt,MultiPathNode:yo,DefinitionNode:sf,ClipNode:uf,GradientStopNode:wf,LinearGradientNode:ff,RadialGradientNode:of,exportGroup:hc},st={},au=nt.extend({init:function(n){nt.fn.init.call(this,n),n&&this.initClip()},initClip:function(){var n=this.srcElement.clip();n&&(this.clip=n,n.addObserver(this))},clear:function(){this.srcElement&&this.srcElement.removeObserver(this),this.clearClip(),nt.fn.clear.call(this)},clearClip:function(){this.clip&&(this.clip.removeObserver(this),delete this.clip)},setClip:function(n){this.clip&&(n.beginPath(),bu(n,this.clip),n.clip())},optionsChange:function(n){"clip"===n.field&&(this.clearClip(),this.initClip()),nt.fn.optionsChange.call(this,n)},setTransform:function(n){if(this.srcElement){var t=this.srcElement.transform();t&&n.transform.apply(n,t.matrix().toArray(6))}},loadElements:function(n,t,i){for(var o,u,f,s=this,e=0;e<n.length;e++)o=n[e],u=o.children,f=new st[o.nodeType](o,i),u&&u.length>0&&f.load(u,t,i),r(t)?s.insertAt(f,t):s.append(f)},load:function(n,t,i){this.loadElements(n,t,i),this.invalidate()},setOpacity:function(n){if(this.srcElement){var t=this.srcElement.opacity();r(t)&&this.globalAlpha(n,t)}},globalAlpha:function(n,t){var i=t;i&&n.globalAlpha&&(i*=n.globalAlpha),n.globalAlpha=i},visible:function(){var n=this.srcElement;return!n||n&&n.options.visible!==!1}}),fi=au.extend({renderTo:function(n){var r,t,i;if(this.visible()){for(n.save(),this.setTransform(n),this.setClip(n),this.setOpacity(n),r=this.childNodes,t=0;t<r.length;t++)i=r[t],i.visible()&&i.renderTo(n);n.restore()}}}),vu.extend(fi.prototype,"childNodes"),st.Group=fi,ls=1e3/60,ou=fi.extend({init:function(n){fi.fn.init.call(this),this.canvas=n,this.ctx=n.getContext("2d");var t=this._invalidate.bind(this);this.invalidate=kendo.throttle(function(){kendo.animationFrame(t)},ls)},destroy:function(){fi.fn.destroy.call(this),this.canvas=null,this.ctx=null},load:function(n,t,i){this.loadElements(n,t,i),this._invalidate()},_invalidate:function(){this.ctx&&(this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx))}}),vu.extend(ou.prototype,"childNodes"),ur=h.extend({init:function(){this.shapes=[]},_add:function(n,t){this.shapes.push({bbox:t,shape:n}),n._quadNode=this},pointShapes:function(n){for(var i=this.shapes,u=i.length,r=[],t=0;t<u;t++)i[t].bbox.containsPoint(n)&&r.push(i[t].shape);return r},insert:function(n,t){this._add(n,t)},remove:function(n){for(var i=this.shapes,r=i.length,t=0;t<r;t++)if(i[t].shape===n){i.splice(t,1);break}}}),hi=ur.extend({init:function(n){ur.fn.init.call(this),this.children=[],this.rect=n},inBounds:function(n){var t=this.rect,r=t.bottomRight(),i=n.bottomRight();return t.origin.x<=n.origin.x&&t.origin.y<=n.origin.y&&i.x<=r.x&&i.y<=r.y},pointShapes:function(n){for(var r=this.children,u=r.length,i=ur.fn.pointShapes.call(this,n),t=0;t<u;t++)dr(i,r[t].pointShapes(n));return i},insert:function(n,t){var r,u=this.children,i=!1;if(this.inBounds(t)){if(this.shapes.length<4)this._add(n,t);else{for(u.length||this._initChildren(),r=0;r<u.length;r++)if(u[r].insert(n,t)){i=!0;break}i||this._add(n,t)}i=!0}return i},_initChildren:function(){var u=this,n=u.rect,e=u.children,t=n.center(),i=n.width()/2,r=n.height()/2;e.push(new hi(new f([n.origin.x,n.origin.y],[i,r])),new hi(new f([t.x,n.origin.y],[i,r])),new hi(new f([n.origin.x,t.y],[i,r])),new hi(new f([t.x,t.y],[i,r])))}}),ft=3e3,we=1e4,as=75,ru=h.extend({init:function(){this.initRoots()},initRoots:function(){this.rootMap={},this.root=new ur,this.rootElements=[]},clear:function(){for(var i=this,t=this.rootElements,n=0;n<t.length;n++)i.remove(t[n]);this.initRoots()},pointShape:function(n){var i,r=(this.rootMap[Math.floor(n.x/ft)]||{})[Math.floor(n.y/ft)],t=this.root.pointShapes(n);for(r&&(t=t.concat(r.pointShapes(n))),this.assignZindex(t),t.sort(oa),i=0;i<t.length;i++)if(t[i].containsPoint(n))return t[i]},assignZindex:function(n){for(var t,f,u,r,e=this,i=0;i<n.length;i++){for(t=n[i],f=0,u=Math.pow(we,as),r=[];t;)r.push(t),t=t.parent;for(;r.length;)t=r.pop(),f+=((t.parent?t.parent.children:e.rootElements).indexOf(t)+1)*u,u/=we;n[i]._zIndex=f}},optionsChange:function(n){"transform"!==n.field&&"stroke.width"!==n.field||this.bboxChange(n.element)},geometryChange:function(n){this.bboxChange(n.element)},bboxChange:function(n){var t,i=this;if("Group"===n.nodeType)for(t=0;t<n.children.length;t++)i.bboxChange(n.children[t]);else n._quadNode&&n._quadNode.remove(n),this._insertShape(n)},add:function(n){var t=Array.isArray(n)?n.slice(0):[n];dr(this.rootElements,t),this._insert(t)},childrenChange:function(n){var t,i=this;if("remove"===n.action)for(t=0;t<n.items.length;t++)i.remove(n.items[t]);else this._insert(Array.prototype.slice.call(n.items,0))},_insert:function(n){for(var t,i=this;n.length>0;)t=n.pop(),t.addObserver(i),"Group"===t.nodeType?dr(n,t.children):i._insertShape(t)},_insertShape:function(n){var e,t,r,i,u=n.bbox();u&&(e=this.getSectors(u),t=e[0][0],r=e[1][0],this.inRoot(e)?this.root.insert(n,u):(i=this.rootMap,i[t]||(i[t]={}),i[t][r]||(i[t][r]=new hi(new f([t*ft,r*ft],[ft,ft]))),i[t][r].insert(n,u)))},remove:function(n){var i,t,r=this;if(n.removeObserver(this),"Group"===n.nodeType)for(i=n.children,t=0;t<i.length;t++)r.remove(i[t]);else n._quadNode&&(n._quadNode.remove(n),delete n._quadNode)},inRoot:function(n){return n[0].length>1||n[1].length>1},getSectors:function(n){for(var t,u=n.bottomRight(),f=Math.floor(u.x/ft),e=Math.floor(u.y/ft),r=[[],[]],i=Math.floor(n.origin.x/ft);i<=f;i++)r[0].push(i);for(t=Math.floor(n.origin.y/ft);t<=e;t++)r[1].push(t);return r}}),os=h.extend({init:function(n){n.bind("mouseenter",this._mouseenter.bind(this)),n.bind("mouseleave",this._mouseleave.bind(this)),this.element=n.element},clear:function(){this._resetCursor()},destroy:function(){this._resetCursor(),delete this.element},_mouseenter:function(n){var t=this._shapeCursor(n);t?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(t)):this._resetCursor()},_mouseleave:function(){this._resetCursor()},_shapeCursor:function(n){for(var t=n.element;t&&!r(t.options.cursor);)t=t.parent;if(t)return t.options.cursor},_getCursor:function(){if(this.element)return this.element.style.cursor},_setCursor:function(n){this.element&&(this.element.style.cursor=n,this._current=n)},_resetCursor:function(){this._current&&(this._setCursor(this._defaultCursor||""),delete this._current)}}),cr=a.extend({init:function(n,t){var i,r;a.fn.init.call(this,n,t),this.element.innerHTML=this._template(this),i=this.element.firstElementChild,r=kr(n),i.width=r.width,i.height=r.height,this._rootElement=i,this._root=new ou(i),this._mouseTrackHandler=this._trackMouse.bind(this),ye(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},destroy:function(){a.fn.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),ee(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},draw:function(n){a.fn.draw.call(this,n),this._root.load([n],void 0,this.options.cors),this._searchTree&&this._searchTree.add([n])},clear:function(){a.fn.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()},eventTarget:function(n){var t,i;if(this._searchTree)return t=this._surfacePoint(n),i=this._searchTree.pointShape(t)},image:function(){var n,t,u=this,r=u._root,f=u._rootElement,i=[];return r.traverse(function(n){n.loading&&i.push(n.loading)}),n=gt(),t=function(){r._invalidate();try{var t=f.toDataURL();n.resolve(t)}catch(i){n.reject(i)}},te(i).then(t,t),n},suspendTracking:function(){a.fn.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},resumeTracking:function(){var t,i,n;if(a.fn.resumeTracking.call(this),!this._searchTree){for(this._searchTree=new ru,t=this._root.childNodes,i=[],n=0;n<t.length;n++)i.push(t[n].srcElement);this._searchTree.add(i)}},_resize:function(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.invalidate()},_template:function(){return"<canvas style='width: 100%; height: 100%;'></canvas>"},_enableTracking:function(){this._searchTree=new ru,this._cursor=new os(this),a.fn._enableTracking.call(this)},_trackMouse:function(n){var t,i;this._suspendedTracking||(t=this.eventTarget(n),"click"!==n.type?(i=this._currentShape,i&&i!==t&&this.trigger("mouseleave",{element:i,originalEvent:n,type:"mouseleave"}),t&&i!==t&&this.trigger("mouseenter",{element:t,originalEvent:n,type:"mouseenter"}),this.trigger("mousemove",{element:t,originalEvent:n,type:"mousemove"}),this._currentShape=t):t&&this.trigger("click",{element:t,originalEvent:n,type:"click"}))}}),cr.prototype.type="canvas","undefined"!=typeof document&&document.createElement("canvas").getContext&&(a.support.canvas=!0,ii.current.register("canvas",cr,20)),et=au.extend({renderTo:function(n){n.save(),this.setTransform(n),this.setClip(n),this.setOpacity(n),n.beginPath(),this.renderPoints(n,this.srcElement),this.setLineDash(n),this.setLineCap(n),this.setLineJoin(n),this.setFill(n),this.setStroke(n),n.restore()},setFill:function(n){var t=this.srcElement.options.fill,i=!1;return t&&("Gradient"===t.nodeType?(this.setGradientFill(n,t),i=!0):ti(t.color)||(n.fillStyle=t.color,n.save(),this.globalAlpha(n,t.opacity),n.fill(),n.restore(),i=!0)),i},setGradientFill:function(n,t){var u,f,e,i,r=this.srcElement.rawBBox();t instanceof gi?(f=t.start(),e=t.end(),u=n.createLinearGradient(f.x,f.y,e.x,e.y)):t instanceof pr&&(i=t.center(),u=n.createRadialGradient(i.x,i.y,0,i.x,i.y,t.radius())),sa(u,t.stops),n.save(),t.userSpace()||n.transform(r.width(),0,0,r.height(),r.origin.x,r.origin.y),n.fillStyle=u,n.fill(),n.restore()},setStroke:function(n){var t=this.srcElement.options.stroke;if(t&&!ti(t.color)&&t.width>0)return n.strokeStyle=t.color,n.lineWidth=ve(t.width,1),n.save(),this.globalAlpha(n,t.opacity),n.stroke(),n.restore(),!0},dashType:function(){var n=this.srcElement.options.stroke;if(n&&n.dashType)return n.dashType.toLowerCase()},setLineDash:function(n){var t,i=this.dashType();i&&i!==eu&&(t=hf[i],n.setLineDash?n.setLineDash(t):(n.mozDash=t,n.webkitLineDash=t))},setLineCap:function(n){var i=this.dashType(),t=this.srcElement.options.stroke;i&&i!==eu?n.lineCap=co:t&&t.lineCap&&(n.lineCap=t.lineCap)},setLineJoin:function(n){var t=this.srcElement.options.stroke;t&&t.lineJoin&&(n.lineJoin=t.lineJoin)},renderPoints:function(n,t){bu(n,t)}}),st.Path=et,ce=et.extend({renderPoints:function(n){var t=this.srcElement.toPath();bu(n,t)}}),st.Arc=ce,he=et.extend({renderPoints:function(n){var i=this.srcElement.geometry(),t=i.center,r=i.radius;n.arc(t.x,t.y,r,0,2*Math.PI)}}),st.Circle=he,ae=et.extend({renderPoints:function(n){var r=this.srcElement.geometry(),i=r.origin,t=r.size;n.rect(i.x,i.y,t.width,t.height)}}),st.Rect=ae,le=et.extend({init:function(n,t){et.fn.init.call(this,n),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=gt();var i=this.img=new Image;t&&!/^data:/i.test(n.src())&&(i.crossOrigin=t),i.src=n.src(),i.complete?this.onLoad():(i.onload=this.onLoad,i.onerror=this.onError)},renderTo:function(n){"resolved"===this.loading.state()&&(n.save(),this.setTransform(n),this.setClip(n),this.drawImage(n),n.restore())},optionsChange:function(n){"src"===n.field?(this.loading=gt(),this.img.src=this.srcElement.src()):et.fn.optionsChange.call(this,n)},onLoad:function(){this.loading.resolve(),this.invalidate()},onError:function(){this.loading.reject(Error("Unable to load image '"+this.img.src+"'. Check for connectivity and verify CORS headers."))},drawImage:function(n){var t=this.srcElement.rect(),i=t.topLeft();n.drawImage(this.img,i.x,i.y,t.width(),t.height())}}),st.Image=le,to=et.extend({renderTo:function(n){var t=this.srcElement,i=t.position(),r=t.measure();n.save(),this.setTransform(n),this.setClip(n),this.setOpacity(n),n.beginPath(),n.font=t.options.font,this.setFill(n)&&n.fillText(t.content(),i.x,i.y+r.baseline),this.setStroke(n)&&(this.setLineDash(n),n.strokeText(t.content(),i.x,i.y+r.baseline)),n.restore()}}),st.Text=to,ro=et.extend({renderPoints:function(n){for(var i=this.srcElement.paths,t=0;t<i.length;t++)bu(n,i[t])}}),st.MultiPath=ro,ws={Surface:cr,RootNode:ou,Node:au,GroupNode:fi,ArcNode:ce,CircleNode:he,RectNode:ae,ImageNode:le,TextNode:to,PathNode:et,MultiPathNode:ro},v=gf.browser,yi="KENDO-PSEUDO-ELEMENT",pi={},u={},u._root=u,vs=si.extend({init:function(n,t,i){si.fn.init.call(this,n,t.getOrigin(),i),this._pdfRect=t},rect:function(){return this._pdfRect},rawBBox:function(){return this._pdfRect}}),fr="undefined"!=typeof Element&&Element.prototype&&function(n){return n.matches?function(n,t){return n.matches(t)}:n.webkitMatchesSelector?function(n,t){return n.webkitMatchesSelector(t)}:n.mozMatchesSelector?function(n,t){return n.mozMatchesSelector(t)}:n.msMatchesSelector?function(n,t){return n.msMatchesSelector(t)}:function(n){return[].indexOf.call(document.querySelectorAll(n),this)!==-1}}(Element.prototype),ys=function(n){return n?function t(i){var o,e,u,f,r=i.cloneNode(!1);if(1==i.nodeType){o=n(i),e=n(r),f=o.data();for(u in f)e.data(u,f[u]);for(/^canvas$/i.test(i.tagName)?r.getContext("2d").drawImage(i,0,0):/^(?:input|select|textarea|option)$/i.test(i.tagName)&&(r.removeAttribute("id"),r.removeAttribute("name"),r.value=i.value,r.checked=i.checked,r.selected=i.selected),u=i.firstChild;u;u=u.nextSibling)r.appendChild(t(u))}return r}:function(n){var t,i=n.cloneNode(!0),r=n.querySelectorAll("canvas");return r.length&&pt(i.querySelectorAll("canvas")).forEach(function(n,t){n.getContext("2d").drawImage(r[t],0,0)}),t=n.querySelectorAll("input, select, textarea, option"),pt(i.querySelectorAll("input, select, textarea, option")).forEach(function(n,i){n.removeAttribute("id"),n.removeAttribute("name"),n.value=t[i].value,n.checked=t[i].checked,n.selected=t[i].selected}),i}}("undefined"!=typeof window&&window.kendo&&window.kendo.jQuery),no.getFontFaces=sc,no.drawText=function(n){var t=new l;return u._clipbox=!1,u._matrix=o.unit(),u._stackingContext={element:n,group:t},bc(n,p(n),t),3==n.firstChild.nodeType?tc(n,n.firstChild,t):af(n,t),kc(),t},be=function(){function o(i){function w(){var n=a.exec(i);n&&(i=i.substr(n[1].length))}function o(n){w();var t=n.exec(i);if(t)return i=i.substr(t[1].length),t[1]}function b(){var t,f,r,n=kendo.parseColor(i,!0);if(n)return r=/^#[0-9a-f]+/i.exec(i)||/^rgba?\(.*?\)/i.exec(i)||/^..*?\b/.exec(i),i=i.substr(r[0].length),n=n.toRGB(),(t=o(c))||(f=o(u)),{color:n,length:t,percent:f}}function k(r){var c,s,h,y,a,p,w=[],l=!1;if(o(e)){for(c=o(v),c?(c=vv(c),o(n)):(s=o(t),"to"==s?s=o(t):s&&/^-/.test(r)&&(l=!0),h=o(t),o(n)),/-moz-/.test(r)&&null==c&&null==s&&(y=o(u),a=o(u),l=!0,"0%"==y?s="left":"100%"==y&&(s="right"),"0%"==a?h="top":"100%"==a&&(h="bottom"),o(n));i&&!o(f)&&(p=b());)w.push(p),o(n);return{type:"linear",angle:c,to:s&&h?s+" "+h:s?s:h?h:null,stops:w,reverse:l}}}function d(){if(o(e)){var n=o(s);return n=n.replace(/^['"]+|["']+$/g,""),o(f),{type:"url",url:n}}}var y,p=i;return or(r,p)?r[p]:((y=o(l))?y=k(y):(y=o(h))&&(y=d()),r[p]=y||{type:"none"})}var l=/^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\s*)\(/,u=/^([-0-9.]+%)/,c=/^([-0-9.]+px)/,t=/^(left|right|top|bottom|to|center)\W/,v=/^([-0-9.]+(deg|grad|rad|turn))/,a=/^(\s+)/,e=/^(\()/,f=/^(\))/,n=/^(,)/,h=/^(url)\(/,s=/^(.*?)\)/,r={},i={};return function(n){return or(i,n)?i[n]:i[n]=d(n).map(o)}}(),d=function(){var n={};return function(t,i){function f(n){return o=n.exec(t.substr(r))}function l(n){return n.replace(/^\s+|\s+$/g,"")}var h,c,e,r,s,u,o;if(i||(i=/^\s*,\s*/),h=t+i,or(n,h))return n[h];for(c=[],e=0,r=0,s=0,u=!1;r<t.length;)!u&&f(/^[\(\[\{]/)?(s++,r++):!u&&f(/^[\)\]\}]/)?(s--,r++):!u&&f(/^[\"\']/)?(u=o[0],r++):"'"==u&&f(/^\\\'/)?r+=2:'"'==u&&f(/^\\\"/)?r+=2:"'"==u&&f(/^\'/)?(u=!1,r++):'"'==u&&f(/^\"/)?(u=!1,r++):f(i)?(!u&&!s&&r>e&&(c.push(l(t.substring(e,r))),e=r+o[0].length),r+=o[0].length):r++;return e<r&&c.push(l(t.substring(e,r))),n[h]=c}}(),ge=function(n){return function(t){var r,i=n[t];return i||((r=/url\((['"]?)([^'")]*?)\1\)\s+format\((['"]?)truetype\3\)/.exec(t))?i=n[t]=r[2]:(r=/url\((['"]?)([^'")]*?\.ttf)\1\)/.exec(t))&&(i=n[t]=r[2])),i}}(Object.create?Object.create(null):{}),ps=function(n){return function(t){var i=n[t];return null==i&&(i=n[t]=bf.measureText("Mapq",{font:t}).height),i}}(Object.create?Object.create(null):{}),hh={svg:eh,canvas:ws,util:pl,PathParser:vr,Surface:a,BaseNode:nt,SurfaceFactory:ii,OptionsStore:bt,exportImage:fa,exportSVG:ia,QuadNode:hi,ShapesQuadTree:ru,ObserversMixin:g,Element:c,Circle:kt,Arc:ki,Path:e,MultiPath:ir,Text:si,Image:vi,Group:l,Layout:ns,Rect:ai,align:dv,vAlign:iv,stack:ka,vStack:hv,wrap:fv,vWrap:sv,fit:rv,LinearGradient:gi,RadialGradient:pr,GradientStop:ht,Gradient:vt,Animation:ku,AnimationFactory:br,drawDOM:no},kendo.deepExtend(kendo,{drawing:hh,geometry:fh}),kendo.drawing.Segment=kendo.geometry.Segment,kendo.dataviz.drawing=kendo.drawing,kendo.dataviz.geometry=kendo.geometry,kendo.drawing.util.measureText=kendo.util.measureText,kendo.drawing.util.objectKey=kendo.util.objectKey,kendo.drawing.Color=kendo.Color,kendo.util.encodeBase64=kendo.drawing.util.encodeBase64}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.popup.min",["kendo.core.min"],n)}(function(){return function(n,t){function ut(t,i){return!(!t||!i)&&(t===i||n.contains(t,i))}var b,ht,ct,i=window.kendo,tt=i.ui,it=tt.Widget,bt=i.Class,r=i.support,o=i.getOffset,f=i._outerWidth,e=i._outerHeight,ft="open",rt="close",at="deactivate",lt="activate",s="center",vt="left",v="right",y="top",w="bottom",a="absolute",d="hidden",k="body",g="location",l="position",pt="visible",yt="effects",wt="k-state-active",p="k-state-border",ii=/k-state-border-(\w+)/,et=".k-picker-wrap, .k-dropdown-wrap, .k-link",gt="down",nt=n(document.documentElement),dt=n.proxy,ni=n(window),ot="scroll",ti=r.transitions.css,st=ti+"transform",u=n.extend,c=".kendoPopup",h=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],kt=it.extend({init:function(t,f){var o,e=this;f=f||{},f.isRtl&&(f.origin=f.origin||w+" "+v,f.position=f.position||y+" "+v),it.fn.init.call(e,t,f),t=e.element,f=e.options,e.collisions=f.collision?f.collision.split(" "):[],e.downEvent=i.applyEventMap(gt,i.guid()),1===e.collisions.length&&e.collisions.push(e.collisions[0]),o=n(e.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),f.appendTo=n(n(f.appendTo)[0]||o[0]||document.body),e.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!f.isRtl).css({position:a}).appendTo(f.appendTo).on("mouseenter"+c,function(){e._hovered=!0}).on("mouseleave"+c,function(){e._hovered=!1}),e.wrapper=n(),f.animation===!1&&(f.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),u(f.animation.open,{complete:function(){e.wrapper.css({overflow:pt}),e._activated=!0,e._trigger(lt)}}),u(f.animation.close,{complete:function(){e._animationClose()}}),e._mousedownProxy=function(n){e._mousedown(n)},e._resizeProxy=r.mobileOS.android?function(n){setTimeout(function(){e._resize(n)},600)}:function(n){e._resize(n)},f.toggleTarget&&n(f.toggleTarget).on(f.toggleEvent+c,n.proxy(e.toggle,e))},events:[ft,lt,rt,at],options:{name:"Popup",toggleEvent:"click",origin:w+" "+vt,position:y+" "+vt,anchor:k,appendTo:null,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,adjustSize:{width:0,height:0},animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},_animationClose:function(){var n=this,t=n.wrapper.data(g);n.wrapper.hide(),t&&n.wrapper.css(t),n.options.anchor!=k&&n._hideDirClass(),n._closing=!1,n._trigger(at)},destroy:function(){var f,t=this,r=t.options,u=t.element.off(c);it.fn.destroy.call(t),r.toggleTarget&&n(r.toggleTarget).off(c),r.modal||(nt.unbind(t.downEvent,t._mousedownProxy),t._toggleResize(!1)),i.destroy(t.element.children()),u.removeData(),r.appendTo[0]===document.body&&(f=u.parent(".k-animation-container"),f[0]?f.remove():u.remove())},open:function(t,u){var c,s,f=this,w={isFixed:!isNaN(parseInt(u,10)),x:t,y:u},o=f.element,e=f.options,p=n(e.anchor),v=o[0]&&o.hasClass("km-widget");if(!f.visible()){if(e.copyAnchorStyles&&(v&&"font-size"==h[0]&&h.shift(),o.css(i.getComputedStyles(p[0],h))),o.data("animating")||f._trigger(ft))return;f._activated=!1,e.modal||(nt.unbind(f.downEvent,f._mousedownProxy).bind(f.downEvent,f._mousedownProxy),f._toggleResize(!1),f._toggleResize(!0)),f.wrapper=s=i.wrap(o,e.autosize).css({overflow:d,display:"block",position:a}),r.mobileOS.android&&s.css(st,"translatez(0)"),s.css(l),n(e.appendTo)[0]==document.body&&s.css(y,"-10000px"),f.flipped=f._position(w),c=f._openAnimation(),e.anchor!=k&&f._showDirClass(c),o.data(yt,c.effects).kendoStop(!0).kendoAnimate(c)}},_location:function(t){var u,s,o=this,f=o.element,e=o.options,v=n(e.anchor),c=f[0]&&f.hasClass("km-widget");return e.copyAnchorStyles&&(c&&"font-size"==h[0]&&h.shift(),f.css(i.getComputedStyles(v[0],h))),o.wrapper=u=i.wrap(f,e.autosize).css({overflow:d,display:"block",position:a}),r.mobileOS.android&&u.css(st,"translatez(0)"),u.css(l),n(e.appendTo)[0]==document.body&&u.css(y,"-10000px"),o._position(t||{}),s=u.offset(),{width:i._outerWidth(u),height:i._outerHeight(u),left:s.left,top:s.top}},_openAnimation:function(){var n=u(!0,{},this.options.animation.open);return n.effects=i.parseEffects(n.effects,this.flipped),n},_hideDirClass:function(){var u=n(this.options.anchor),r=((u.attr("class")||"").match(ii)||["","down"])[1],t=p+"-"+r;u.removeClass(t).children(et).removeClass(wt).removeClass(t),this.element.removeClass(p+"-"+i.directions[r].reverse)},_showDirClass:function(t){var u=t.effects.slideIn?t.effects.slideIn.direction:"down",r=p+"-"+u;n(this.options.anchor).addClass(r).children(et).addClass(wt).addClass(r),this.element.addClass(p+"-"+i.directions[u].reverse)},position:function(){this.visible()&&(this.flipped=this._position())},toggle:function(){var n=this;n[n.visible()?rt:ft]()},visible:function(){return this.element.is(":"+pt)},close:function(r){var h,e,o,s,f=this,c=f.options;if(f.visible()){if(h=f.wrapper[0]?f.wrapper:i.wrap(f.element).hide(),f._toggleResize(!1),f._closing||f._trigger(rt))return f._toggleResize(!0),t;f.element.find(".k-popup").each(function(){var i=n(this),t=i.data("kendoPopup");t&&t.close(r)}),nt.unbind(f.downEvent,f._mousedownProxy),r?e={hide:!0,effects:{}}:(e=u(!0,{},c.animation.close),o=f.element.data(yt),s=e.effects,!s&&!i.size(s)&&o&&i.size(o)&&(e.effects=o,e.reverse=!0),f._closing=!0),f.element.kendoStop(!0),h.css({overflow:d}),f.element.kendoAnimate(e),r&&f._animationClose()}},_trigger:function(n){return this.trigger(n,{type:n})},_resize:function(n){var t=this;r.resize.indexOf(n.type)!==-1?(clearTimeout(t._resizeTimeout),t._resizeTimeout=setTimeout(function(){t._position(),t._resizeTimeout=null},50)):(!t._hovered||t._activated&&t.element.hasClass("k-list-container"))&&t.close()},_toggleResize:function(n){var i=n?"on":"off",t=r.resize;r.mobileOS.ios||r.mobileOS.android||(t+=" "+ot),this._scrollableParents()[i](ot,this._resizeProxy),ni[i](t,this._resizeProxy)},_mousedown:function(t){var f=this,h=f.element[0],o=f.options,c=n(o.anchor)[0],e=o.toggleTarget,u=i.eventTarget(t),r=n(u).closest(".k-popup"),s=r.parent().parent(".km-shim").length;r=r[0],!s&&r&&r!==f.element[0]||"popover"!==n(t.target).closest("a").data("rel")&&(ut(h,u)||ut(c,u)||e&&ut(n(e)[0],u)||f.close())},_fit:function(n,t,i){var r=0;return n+t>i&&(r=i-(n+t)),n<0&&(r=-n),r},_flip:function(n,t,i,r,u,f,e){var o=0;return e=e||t,f!==u&&f!==s&&u!==s&&(n+e>r&&(o+=-(i+t)),n+o<0&&(o+=i+t)),o},_scrollableParents:function(){return n(this.options.anchor).parentsUntil("body").filter(function(n,t){return i.isScrollable(t)})},_position:function(t){var ft,ht,y,bt,lt,d,et,ut,b,kt,w,c,vt,yt,nt,at,h=this,pt=h.element,s=h.wrapper,v=h.options,rt=n(v.viewport),k=r.zoomLevel(),dt=!!(rt[0]==window&&window.innerWidth&&k<=1.02),p=n(v.anchor),st=v.origin.toLowerCase().split(" "),ct=v.position.toLowerCase().split(" "),it=h.collisions,tt=10002,ot=0,wt=document.documentElement;if(lt=v.viewport===window?{top:window.pageYOffset||document.documentElement.scrollTop||0,left:window.pageXOffset||document.documentElement.scrollLeft||0}:rt.offset(),dt?(d=window.innerWidth,et=window.innerHeight):(d=rt.width(),et=rt.height()),dt&&wt.scrollHeight-wt.clientHeight>0&&(d-=i.support.scrollbar()),ft=p.parents().filter(s.siblings()),ft[0])if(y=Math.max(+ft.css("zIndex"),0))tt=y+10;else for(ht=p.parentsUntil(ft),bt=ht.length;ot<bt;ot++)y=+n(ht[ot]).css("zIndex"),y&&tt<y&&(tt=y+10);return s.css("zIndex",tt),s.css(t&&t.isFixed?{left:t.x,top:t.y}:h._align(st,ct)),ut=o(s,l,p[0]===s.offsetParent()[0]),b=o(s),kt=p.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),kt.length&&(ut=o(s,l,!0),b=o(s)),b.top-=lt.top,b.left-=lt.left,h.wrapper.data(g)||s.data(g,u({},ut)),w=u({},b),c=u({},ut),vt=v.adjustSize,"fit"===it[0]&&(c.top+=h._fit(w.top,e(s)+vt.height,et/k)),"fit"===it[1]&&(c.left+=h._fit(w.left,f(s)+vt.width,d/k)),yt=u({},c),nt=e(pt),at=e(s),!s.height()&&nt&&(at+=nt),"flip"===it[0]&&(c.top+=h._flip(w.top,nt,e(p),et/k,st[0],ct[0],at)),"flip"===it[1]&&(c.left+=h._flip(w.left,f(pt),f(p),d/k,st[1],ct[1],f(s))),pt.css(l,a),s.css(c),c.left!=yt.left||c.top!=yt.top},_align:function(t,i){var c,l=this,ut=l.wrapper,a=n(l.options.anchor),tt=t[0],nt=t[1],g=i[0],b=i[1],rt=o(a),it=n(l.options.appendTo),d=f(ut),p=e(ut),y=f(a),k=e(a),r=rt.top,u=rt.left,h=Math.round;return it[0]!=document.body&&(c=o(it),r-=c.top,u-=c.left),tt===w&&(r+=k),tt===s&&(r+=h(k/2)),g===w&&(r-=p),g===s&&(r-=h(p/2)),nt===v&&(u+=y),nt===s&&(u+=h(y/2)),b===v&&(u-=d),b===s&&(u-=h(d/2)),{top:r,left:u}}});tt.plugin(kt),b="kendoTabKeyTrap",ht="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], *[contenteditable]",ct=bt.extend({init:function(t){this.element=n(t),this.element.autoApplyNS(b)},trap:function(){this.element.on("keydown",dt(this._keepInTrap,this))},removeTrap:function(){this.element.kendoDestroy(b)},destroy:function(){this.element.kendoDestroy(b),this.element=t},shouldTrap:function(){return!0},_keepInTrap:function(n){var f,u,t,e,r,i;9===n.which&&this.shouldTrap()&&(f=n.target,u=this.element.find(ht).filter(":visible[tabindex!=-1]"),t=u.sort(function(n,t){return n.tabIndex-t.tabIndex}),e=t.length,r=e-1,i=t.index(f),n.shiftKey?0===i?t.get(r).focus():t.get(i-1).focus():i===r?t.get(0).focus():t.get(i+1).focus(),n.preventDefault())}}),tt.Popup.TabKeyTrap=ct}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("drawing/surface-tooltip.min",["kendo.popup.min","drawing/kendo-drawing.min"],n)}(function(){!function(n){var r=".kendo",t=window.kendo,u=t.deepExtend,f=t.drawing.util,o=f.defined,e=f.limitValue,v=f.eventCoordinates,l=t._outerWidth,a=t._outerHeight,i=n.proxy,s='<div class="k-tooltip"><div class="k-tooltip-content"></div></div>',h='<div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close">close</a></div>',c=t.Class.extend({init:function(t,i){this.element=n(s),this.content=this.element.children(".k-tooltip-content"),i=i||{},this.options=u({},this.options,this._tooltipOptions(i)),this.popupOptions={appendTo:i.appendTo,animation:i.animation,copyAnchorStyles:!1,collision:"fit fit"},this._openPopupHandler=n.proxy(this._openPopup,this),this.surface=t,this._bindEvents()},options:{position:"top",showOn:"mouseenter",offset:7,autoHide:!0,hideDelay:0,showAfter:100},_bindEvents:function(){this._showHandler=i(this._showEvent,this),this._surfaceLeaveHandler=i(this._surfaceLeave,this),this._mouseleaveHandler=i(this._mouseleave,this),this._mousemoveHandler=i(this._mousemove,this),this.surface.bind("click",this._showHandler),this.surface.bind("mouseenter",this._showHandler),this.surface.bind("mouseleave",this._mouseleaveHandler),this.surface.bind("mousemove",this._mousemoveHandler),this.surface.element.on("mouseleave"+r,this._surfaceLeaveHandler),this.element.on("click"+r,".k-tooltip-button",i(this._hideClick,this))},getPopup:function(){return this.popup||(this.popup=new t.ui.Popup(this.element,this.popupOptions)),this.popup},destroy:function(){var n=this.popup;this.surface.unbind("click",this._showHandler),this.surface.unbind("mouseenter",this._showHandler),this.surface.unbind("mouseleave",this._mouseleaveHandler),this.surface.unbind("mousemove",this._mousemoveHandler),this.surface.element.off("mouseleave"+r,this._surfaceLeaveHandler),this.element.off("click"+r),n&&(n.destroy(),delete this.popup),delete this.popupOptions,clearTimeout(this._timeout),delete this.element,delete this.content,delete this.surface},_tooltipOptions:function(n){return n=n||{},{position:n.position,showOn:n.showOn,offset:n.offset,autoHide:n.autoHide,width:n.width,height:n.height,content:n.content,shared:n.shared,hideDelay:n.hideDelay,showAfter:n.showAfter}},_tooltipShape:function(n){for(;n&&!n.options.tooltip;)n=n.parent;return n},_updateContent:function(n,i,r){var u=r.content;if(t.isFunction(u)&&(u=u({element:i,target:n})),u)return this.content.html(u),!0},_position:function(n,t,i,r){var y,a=t.position,h=t.offset||0,p=this.surface,f=p._instance._elementOffset(),b=p.getSize(),w=p._instance._offset,u=n.bbox(),c=i.width,l=i.height,o=0,s=0;return u.origin.translate(f.left,f.top),w&&u.origin.translate(-w.x,-w.y),"cursor"==a&&r?(y=v(r),o=y.x-c/2,s=y.y-l-h):"left"==a?(o=u.origin.x-c-h,s=u.center().y-l/2):"right"==a?(o=u.bottomRight().x+h,s=u.center().y-l/2):"bottom"==a?(o=u.center().x-c/2,s=u.bottomRight().y+h):(o=u.center().x-c/2,s=u.origin.y-l-h),{left:e(o,f.left,f.left+b.width),top:e(s,f.top,f.top+b.height)}},show:function(n,t){this._show(n,n,u({},this.options,this._tooltipOptions(n.options.tooltip),t))},hide:function(){var n=this.popup,t=this._current;delete this._current,clearTimeout(this._showTimeout),n&&n.visible()&&t&&!this.surface.trigger("tooltipClose",{element:t.shape,target:t.target,popup:n})&&n.close()},_hideClick:function(n){n.preventDefault(),this.hide()},_show:function(n,t,i,r,u){var f,o,e=this._current;clearTimeout(this._timeout),e&&(e.shape===t&&i.shared||e.target===n)||(clearTimeout(this._showTimeout),f=this.getPopup(),!this.surface.trigger("tooltipOpen",{element:t,target:n,popup:f})&&this._updateContent(n,t,i)&&(this._autoHide(i),o=this._measure(i),f.visible()&&f.close(!0),this._current={options:i,elementSize:o,shape:t,target:n,position:this._position(i.shared?t:n,i,o,r)},u?this._showTimeout=setTimeout(this._openPopupHandler,i.showAfter||0):this._openPopup()))},_openPopup:function(){var t=this._current,n=t.position;this.getPopup().open(n.left,n.top)},_autoHide:function(t){t.autoHide&&this._closeButton&&(this.element.removeClass("k-tooltip-closable"),this._closeButton.remove(),delete this._closeButton),t.autoHide||this._closeButton||(this.element.addClass("k-tooltip-closable"),this._closeButton=n(h).prependTo(this.element))},_showEvent:function(n){var t,i=this._tooltipShape(n.element);i&&(t=u({},this.options,this._tooltipOptions(i.options.tooltip)),t&&t.showOn==n.type&&this._show(n.element,i,t,n.originalEvent,!0))},_measure:function(n){var u,r,t,i=this.getPopup();return this.element.css({width:"auto",height:"auto"}),t=i.visible(),t||i.wrapper.show(),this.element.css({width:o(n.width)?n.width:"auto",height:o(n.height)?n.height:"auto"}),u=l(this.element),r=a(this.element),t||i.wrapper.hide(),{width:u,height:r}},_mouseleave:function(n){var t,i;this.popup&&!this._popupRelatedTarget(n.originalEvent)&&(t=this,i=t._current,i&&i.options.autoHide&&(t._timeout=setTimeout(function(){clearTimeout(t._showTimeout),t.hide()},i.options.hideDelay||0)))},_mousemove:function(n){var r,t,i=this._current;i&&n.element&&(r=i.options,"cursor"==r.position&&(t=this._position(n.element,r,i.elementSize,n.originalEvent),i.position=t,this.getPopup().wrapper.css({left:t.left,top:t.top})))},_surfaceLeave:function(n){this.popup&&!this._popupRelatedTarget(n)&&(clearTimeout(this._showTimeout),this.hide())},_popupRelatedTarget:function(t){return t.relatedTarget&&n(t.relatedTarget).closest(this.popup.wrapper).length}});t.drawing.SurfaceTooltip=c}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("drawing/surface.min",["drawing/kendo-drawing.min","drawing/surface-tooltip.min"],n)}(function(){!function(n){function s(n){this._instance.translate(n)}var i,t=window.kendo,f=t.drawing,r=f.Surface,u=t.ui.Widget,o=t.deepExtend,e=n.proxy;t.support.svg=r.support.svg,t.support.canvas=r.support.canvas,i=u.extend({init:function(n,t){this.options=o({},this.options,t),u.fn.init.call(this,n,this.options),this._instance=r.create(this.element[0],t),this._instance.translate&&(this.translate=s),this._triggerInstanceHandler=e(this._triggerInstanceEvent,this),this._bindHandler("click"),this._bindHandler("mouseenter"),this._bindHandler("mouseleave"),this._bindHandler("mousemove"),this._enableTracking()},options:{name:"Surface",tooltip:{}},events:["click","mouseenter","mouseleave","mousemove","resize","tooltipOpen","tooltipClose"],_triggerInstanceEvent:function(n){this.trigger(n.type,n)},_bindHandler:function(n){this._instance.bind(n,this._triggerInstanceHandler)},draw:function(n){this._instance.draw(n)},clear:function(){this._instance&&this._instance.clear(),this.hideTooltip()},destroy:function(){this._instance&&(this._instance.destroy(),delete this._instance),this._tooltip&&(this._tooltip.destroy(),delete this._tooltip),u.fn.destroy.call(this)},exportVisual:function(){return this._instance.exportVisual()},eventTarget:function(n){return this._instance.eventTarget(n)},showTooltip:function(n,t){this._tooltip&&this._tooltip.show(n,t)},hideTooltip:function(){this._tooltip&&this._tooltip.hide()},suspendTracking:function(){this._instance.suspendTracking(),this.hideTooltip()},resumeTracking:function(){this._instance.resumeTracking()},getSize:function(){return{width:this.element.width(),height:this.element.height()}},setSize:function(n){this.element.css({width:n.width,height:n.height}),this._size=n,this._instance.currentSize(n),this._resize()},_resize:function(){this._instance.currentSize(this._size),this._instance._resize()},_enableTracking:function(){t.ui.Popup&&(this._tooltip=new f.SurfaceTooltip(this,this.options.tooltip||{}))}}),t.ui.plugin(i),i.create=function(n,t){return new i(n,t)},t.drawing.Surface=i}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("drawing/html.min",["drawing/kendo-drawing.min"],n)}(function(){!function(n){var r=window.kendo,t=r.drawing,i=t.drawDOM;t.drawDOM=function(t,r){return i(n(t)[0],r)},t.drawDOM.drawText=i.drawText,t.drawDOM.getFontFaces=i.getFontFaces}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.drawing.min",["drawing/util.min","drawing/kendo-drawing.min","drawing/surface-tooltip.min","drawing/surface.min","drawing/html.min"],n)}(function(){},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.validator.min",["kendo.core.min"],n)}(function(){return function(n){function rt(t){var f,u=i.ui.validator.ruleResolvers||{},r={};for(f in u)n.extend(!0,r,u[f].resolve(t));return r}function ut(n){return n.replace(/&amp/g,"&amp;").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">")}function it(n){return n=(n+"").split("."),n.length>1?n[1].length:0}function nt(t){return n(n.parseHTML?n.parseHTML(t):t)}function tt(t,r){for(var f,o,e=n(),u=0,s=t.length;u<s;u++)f=t[u],st.test(f.className)&&(o=f.getAttribute(i.attr("for")),o===r&&(e=e.add(f)));return e}var p,i=window.kendo,o=i.ui.Widget,r=".kendoValidator",u="k-invalid-msg",st=RegExp(u,"i"),ht="k-invalid",ot="k-valid",ft=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/i,et=/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,f=":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",a=":checkbox:not([disabled],[readonly])",s="[type=number],[type=range]",l="blur",v="name",h="form",c="novalidate",b="validate",e="change",w="validateInput",d=n.proxy,k=function(n,t){return"string"==typeof t&&(t=RegExp("^(?:"+t+")$")),t.test(n)},y=function(n,t,i){var r=n.val();return!n.filter(t).length||""===r||k(r,i)},g=function(n,t){return!!n.length&&null!=n[0].attributes[t]};i.ui.validator||(i.ui.validator={rules:{},messages:{}}),p=o.extend({init:function(t,r){var u=this,s=rt(t),e="["+i.attr("validate")+"!=false]";r=r||{},r.rules=n.extend({},i.ui.validator.rules,s.rules,r.rules),r.messages=n.extend({},i.ui.validator.messages,s.messages,r.messages),o.fn.init.call(u,t,r),u._errorTemplate=i.template(u.options.errorTemplate),u.element.is(h)&&u.element.attr(c,c),u._inputSelector=f+e,u._checkboxSelector=a+e,u._errors={},u._attachEvents(),u._isValidated=!1},events:[b,e,w],options:{name:"Validator",errorTemplate:'<span class="k-widget k-tooltip k-tooltip-validation"><span class="k-icon k-i-warning"> </span> #=message#</span>',messages:{required:"{0} is required",pattern:"{0} is not valid",min:"{0} should be greater than or equal to {1}",max:"{0} should be smaller than or equal to {1}",step:"{0} is not valid",email:"{0} is not valid email",url:"{0} is not valid URL",date:"{0} is not valid date",dateCompare:"End date should be greater than or equal to the start date"},rules:{required:function(n){var i=n.filter("[type=checkbox]").length&&!n.is(":checked"),t=n.val();return!(g(n,"required")&&(!t||""===t||0===t.length||i))},pattern:function(n){return!n.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length||""===n.val()||k(n.val(),n.attr("pattern"))},min:function(n){if(n.filter(s+",["+i.attr("type")+"=number]").filter("[min]").length&&""!==n.val()){var r=parseFloat(n.attr("min"))||0,t=i.parseFloat(n.val());return r<=t}return!0},max:function(n){if(n.filter(s+",["+i.attr("type")+"=number]").filter("[max]").length&&""!==n.val()){var r=parseFloat(n.attr("max"))||0,t=i.parseFloat(n.val());return r>=t}return!0},step:function(n){if(n.filter(s+",["+i.attr("type")+"=number]").filter("[step]").length&&""!==n.val()){var u,f=parseFloat(n.attr("min"))||0,t=parseFloat(n.attr("step"))||1,e=parseFloat(n.val()),r=it(t);return r?(u=Math.pow(10,r),Math.floor((e-f)*u)%(t*u)/Math.pow(100,r)==0):(e-f)%t==0}return!0},email:function(n){return y(n,"[type=email],["+i.attr("type")+"=email]",ft)},url:function(n){return y(n,"[type=url],["+i.attr("type")+"=url]",et)},date:function(n){return!n.filter("[type^=date],["+i.attr("type")+"=date]").length||""===n.val()||null!==i.parseDate(n.val(),n.attr(i.attr("format")))}},validateOnBlur:!0},destroy:function(){o.fn.destroy.call(this),this.element.off(r)},value:function(){return!!this._isValidated&&0===this.errors().length},_submit:function(n){return!!this.validate()||(n.stopPropagation(),n.stopImmediatePropagation(),n.preventDefault(),!1)},_checkElement:function(n){var t=this.value();this.validateInput(n),this.value()!==t&&this.trigger(e)},_attachEvents:function(){var t=this;t.element.is(h)&&t.element.on("submit"+r,d(t._submit,t)),t.options.validateOnBlur&&(t.element.is(f)?(t.element.on(l+r,function(){t._checkElement(t.element)}),t.element.is(a)&&t.element.on("click"+r,function(){t._checkElement(t.element)})):(t.element.on(l+r,t._inputSelector,function(){t._checkElement(n(this))}),t.element.on("click"+r,t._checkboxSelector,function(){t._checkElement(n(this))})))},validate:function(){var r,t,u,i,n=!1,o=this.value();if(this._errors={},this.element.is(f))n=this.validateInput(this.element);else{for(i=!1,r=this.element.find(this._inputSelector),t=0,u=r.length;t<u;t++)this.validateInput(r.eq(t))||(i=!0);n=!i}return this.trigger(b,{valid:n}),o!==n&&this.trigger(e),n},validateInput:function(t){var r,y,c,f,a,e,h,s,p,o,l;return t=n(t),this._isValidated=!0,r=this,y=r._errorTemplate,c=r._checkValidity(t),f=c.valid,a="."+u,e=t.attr(v)||"",h=r._findMessageContainer(e).add(t.next(a).filter(function(){var t=n(this);return!t.filter("["+i.attr("for")+"]").length||t.attr(i.attr("for"))===e})).hide(),p=!t.attr("aria-invalid"),t.removeAttr("aria-invalid"),f?delete r._errors[e]:(s=r._extractMessage(t,c.key),r._errors[e]=s,o=nt(y({message:ut(s)})),l=h.attr("id"),r._decorateMessageContainer(o,e),l&&o.attr("id",l),h.replaceWith(o).length||o.insertAfter(t),o.show(),t.attr("aria-invalid",!0)),p!==f&&this.trigger(w,{valid:f,input:t}),t.toggleClass(ht,!f),t.toggleClass(ot,f),f},hideMessages:function(){var i=this,t="."+u,n=i.element;n.is(f)?n.next(t).hide():n.find(t).hide()},_findMessageContainer:function(t){for(var f,e=i.ui.validator.messageLocators,r=n(),u=0,o=this.element.length;u<o;u++)r=r.add(tt(this.element[u].getElementsByTagName("*"),t));for(f in e)r=r.add(e[f].locate(this.element,t));return r},_decorateMessageContainer:function(n,t){var f,r=i.ui.validator.messageLocators;n.addClass(u).attr(i.attr("for"),t||"");for(f in r)r[f].decorate(n,t);n.attr("role","alert")},_extractMessage:function(n,t){var f=this,r=f.options.messages[t],u=n.attr(v);return r=i.isFunction(r)?r(n):r,i.format(n.attr(i.attr(t+"-msg"))||n.attr("validationMessage")||n.attr("title")||r||"",u,n.attr(t)||n.attr(i.attr(t)))},_checkValidity:function(n){var t,i=this.options.rules;for(t in i)if(!i[t].call(this,n))return{valid:!1,key:t};return{valid:!0}},errors:function(){var i,t=[],n=this._errors;for(i in n)t.push(n[i]);return t}}),i.ui.plugin(p)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.userevents.min",["kendo.core.min"],n)}(function(){return function(n){function ut(n,t){var f=n.x.location,e=n.y.location,o=t.x.location,i=t.y.location,r=f-o,u=e-i;return{center:{x:(f+o)/2,y:(e+i)/2},distance:Math.sqrt(r*r+u*u)}}function c(n){var s,o,u,t=[],i=n.originalEvent,f=n.currentTarget,e=0;if(n.api)t.push({id:2,event:n,target:n.target,currentTarget:n.target,location:n,type:"api"});else if(n.type.match(/touch/))for(o=i?i.changedTouches:[],s=o.length;e<s;e++)u=o[e],t.push({location:u,event:n,target:u.target,currentTarget:f,id:u.identifier,type:"touch"});else t.push(r.pointers||r.msPointers?{location:i,event:n,target:n.target,currentTarget:f,id:i.pointerId,type:"pointer"}:{id:1,event:n,target:n.target,currentTarget:f,location:n,type:"mouse"});return t}function g(n){for(var r=i.eventMap.up.split(" "),t=0,u=r.length;t<u;t++)n(r[t])}var i=window.kendo,r=i.support,nt=i.Class,tt=i.Observable,f=n.now,e=n.extend,d=r.mobileOS,ot=d&&d.android,it=800,et=r.browser.msie?5:0,ft="press",l="hold",rt="select",k="start",h="move",s="end",a="cancel",o="tap",v="release",ht="gesturestart",w="gesturechange",b="gestureend",y="gesturetap",ct={api:0,touch:0,mouse:9,pointer:9},lt=!r.touch||r.mouseAndTouchPresent,p=nt.extend({init:function(n,t){var i=this;i.axis=n,i._updateLocationData(t),i.startLocation=i.location,i.velocity=i.delta=0,i.timeStamp=f()},move:function(n){var t=this,i=n["page"+t.axis],r=f(),u=r-t.timeStamp||1;!i&&ot||(t.delta=i-t.location,t._updateLocationData(n),t.initialDelta=i-t.startLocation,t.velocity=t.delta/u,t.timeStamp=r)},_updateLocationData:function(n){var t=this,i=t.axis;t.location=n["page"+i],t.client=n["client"+i],t.screen=n["screen"+i]}}),st=nt.extend({init:function(n,t,i){e(this,{x:new p("X",i.location),y:new p("Y",i.location),type:i.type,useClickAsTap:n.useClickAsTap,threshold:n.threshold||ct[i.type],userEvents:n,target:t,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_moved:!1,_finished:!1})},press:function(){this._holdTimeout=setTimeout(n.proxy(this,"_hold"),this.userEvents.minHold),this._trigger(ft,this.pressEvent)},_hold:function(){this._trigger(l,this.pressEvent)},move:function(n){var t=this;if(!t._finished){if(t.x.move(n.location),t.y.move(n.location),!t._moved){if(t._withinIgnoreThreshold())return;if(u.current&&u.current!==t.userEvents)return t.dispose();t._start(n)}t._finished||t._trigger(h,n)}},end:function(n){this.endTime=f(),this._finished||(this._finished=!0,this._trigger(v,n),this._moved?this._trigger(s,n):this.useClickAsTap||this._trigger(o,n),clearTimeout(this._holdTimeout),this.dispose())},dispose:function(){var i=this.userEvents,t=i.touches;this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),t.splice(n.inArray(this,t),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(n){clearTimeout(this._holdTimeout),this.startTime=f(),this._moved=!0,this._trigger(k,n)},_trigger:function(n,t){var i=this,r=t.event,u={touch:i,x:i.x,y:i.y,target:i.target,event:r};i.userEvents.notify(n,u)&&r.preventDefault()},_withinIgnoreThreshold:function(){var t=this.x.initialDelta,n=this.y.initialDelta;return Math.sqrt(t*t+n*n)<=this.threshold}}),u=tt.extend({init:function(t,u){var p,d,nt,f=this,c=i.guid();u=u||{},p=f.filter=u.filter,f.threshold=u.threshold||et,f.minHold=u.minHold||it,f.touches=[],f._maxTouches=u.multiTouch?2:1,f.allowSelection=u.allowSelection,f.captureUpIfMoved=u.captureUpIfMoved,f.useClickAsTap=!u.fastTap&&!r.delayedClick(),f.eventNS=c,t=n(t).handler(f),tt.fn.init.call(f),e(f,{element:t,surface:n(u.global&&lt?t[0].ownerDocument.documentElement:u.surface||t),stopPropagation:u.stopPropagation,pressed:!1}),f.surface.handler(f).on(i.applyEventMap("move",c),"_move").on(i.applyEventMap("up cancel",c),"_end"),t.on(i.applyEventMap("down",c),p,"_start"),f.useClickAsTap&&t.on(i.applyEventMap("click",c),p,"_click"),(r.pointers||r.msPointers)&&(r.browser.version<11?t.css("-ms-touch-action","pinch-zoom double-tap-zoom"):t.css("touch-action",u.touchAction||"none")),u.preventDragEvent&&t.on(i.applyEventMap("dragstart",c),i.preventDefault),t.on(i.applyEventMap("mousedown",c),p,{root:t},"_select"),f.captureUpIfMoved&&r.eventCapture&&(d=f.surface[0],nt=n.proxy(f.preventIfMoving,f),g(function(n){d.addEventListener(n,nt,!0)})),f.bind([ft,l,o,k,h,s,v,a,ht,w,b,y,rt],u)},preventIfMoving:function(n){this._isMoved()&&n.preventDefault()},destroy:function(){var t,n=this;n._destroyed||(n._destroyed=!0,n.captureUpIfMoved&&r.eventCapture&&(t=n.surface[0],g(function(i){t.removeEventListener(i,n.preventIfMoving)})),n.element.kendoDestroy(n.eventNS),n.surface.kendoDestroy(n.eventNS),n.element.removeData("handler"),n.surface.removeData("handler"),n._disposeAll(),n.unbind(),delete n.surface,delete n.element,delete n.currentTarget)},capture:function(){u.current=this},cancel:function(){this._disposeAll(),this.trigger(a)},notify:function(n,t){var r=this,i=r.touches;if(this._isMultiTouch()){switch(n){case h:n=w;break;case s:n=b;break;case o:n=y}e(t,{touches:i},ut(i[0],i[1]))}return this.trigger(n,e(t,{type:n}))},press:function(n,t,i){this._apiCall("_start",n,t,i)},move:function(n,t){this._apiCall("_move",n,t)},end:function(n,t){this._apiCall("_end",n,t)},_isMultiTouch:function(){return this.touches.length>1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var n=this.touches;n.length>0;)n.pop().dispose()},_isMoved:function(){return n.grep(this.touches,function(n){return n.isMoved()}).length},_select:function(n){this.allowSelection&&!this.trigger(rt,{event:n})||n.preventDefault()},_start:function(t){var e,r,i=this,f=0,h=i.filter,s=c(t),l=s.length,o=t.which;if(!(o&&o>1||i._maxTouchesReached()))for(u.current=null,i.currentTarget=t.currentTarget,i.stopPropagation&&t.stopPropagation();f<l&&!i._maxTouchesReached();f++)r=s[f],e=h?n(r.currentTarget):i.element,e.length&&(r=new st(i,e,r),i.touches.push(r),r.press(),i._isMultiTouch()&&i.notify("gesturestart",{}))},_move:function(n){this._eachTouch("move",n)},_end:function(n){this._eachTouch("end",n)},_click:function(t){var i={touch:{initialTouch:t.target,target:n(t.currentTarget),endTime:f(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:n(t.currentTarget),event:t,type:"tap"};this.trigger("tap",i)&&t.preventDefault()},_eachTouch:function(n,t){for(var f,u,r,h=this,s={},e=c(t),o=h.touches,i=0;i<o.length;i++)f=o[i],s[f.id]=f;for(i=0;i<e.length;i++)u=e[i],r=s[u.id],r&&r[n](u)},_apiCall:function(t,i,r,u){this[t]({api:!0,pageX:i,pageY:r,clientX:i,clientY:r,target:n(u||this.element)[0],stopPropagation:n.noop,preventDefault:n.noop})}});u.defaultThreshold=function(n){et=n},u.minHold=function(n){it=n},i.getTouches=c,i.touchDelta=ut,i.UserEvents=u}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.draganddrop.min",["kendo.core.min","kendo.userevents.min"],n)}(function(){return function(n,t){function ri(t,i){try{return n.contains(t,i)||t==i}catch(r){return!1}}function p(n,t){return parseInt(n.css(t),10)||0}function dt(n,t){return Math.min(Math.max(n,t.min),t.max)}function gt(n,t){var f=tt(n),s=i._outerWidth,h=i._outerHeight,r=f.left+p(n,"borderLeftWidth")+p(n,"paddingLeft"),u=f.top+p(n,"borderTopWidth")+p(n,"paddingTop"),o=r+n.width()-s(t,!0),e=u+n.height()-h(t,!0);return{x:{min:r,max:o},y:{min:u,max:e}}}function fi(i,r,u){for(var o,e,f=0,h=r&&r.length,s=u&&u.length;i&&i.parentNode;){for(f=0;f<h;f++)if(o=r[f],o.element[0]===i)return{target:o,targetElement:i};for(f=0;f<s;f++)if(e=u[f],n.contains(e.element[0],i)&&b.matchesSelector.call(i,e.options.filter))return{target:e,targetElement:i};i=i.parentNode}return t}function bt(n,t){var r,u=t.options.group,i=n[u];if(h.fn.destroy.call(t),i.length>1){for(r=0;r<i.length;r++)if(i[r]==t){i.splice(r,1);break}}else i.length=0,delete n[u]}function kt(n){var t,u,r,i=nt()[0];return n[0]===i?(u=i.scrollTop,r=i.scrollLeft,{top:u,left:r,bottom:u+v.height(),right:r+v.width()}):(t=n.offset(),t.bottom=t.top+n.height(),t.right=t.left+n.width(),t)}function nt(){return n(i.support.browser.chrome?e.body:e.documentElement)}function pt(t){var r,u=nt();if(!t||t===e.body||t===e.documentElement)return u;for(r=n(t)[0];r&&!i.isScrollable(r)&&r!==e.body;)r=r.parentNode;return r===e.body?u:n(r)}function wt(n,t,i){var u={x:0,y:0},r=50;return n-i.left<r?u.x=-(r-(n-i.left)):i.right-n<r&&(u.x=r-(i.right-n)),t-i.top<r?u.y=-(r-(t-i.top)):i.bottom-t<r&&(u.y=r-(i.bottom-t)),u}var f,g,at,l,vt,yt,i=window.kendo,b=i.support,e=window.document,v=n(window),ui=i.Class,h=i.ui.Widget,o=i.Observable,oi=i.UserEvents,u=n.proxy,r=n.extend,tt=i.getOffset,w={},s={},c={},k=i.elementUnderCursor,it="keyup",a="change",ct="dragstart",lt="hold",et="drag",ut="dragend",st="dragcancel",ot="hintDestroyed",d="dragenter",y="dragleave",ht="drop",ei=o.extend({init:function(t,r){var f=this,e=t[0];f.capture=!1,e.addEventListener?(n.each(i.eventMap.down.split(" "),function(){e.addEventListener(this,u(f._press,f),!0)}),n.each(i.eventMap.up.split(" "),function(){e.addEventListener(this,u(f._release,f),!0)})):(n.each(i.eventMap.down.split(" "),function(){e.attachEvent(this,u(f._press,f))}),n.each(i.eventMap.up.split(" "),function(){e.attachEvent(this,u(f._release,f))})),o.fn.init.call(f),f.bind(["press","release"],r||{})},captureNext:function(){this.capture=!0},cancelCapture:function(){this.capture=!1},_press:function(n){var t=this;t.trigger("press"),t.capture&&n.preventDefault()},_release:function(n){var t=this;t.trigger("release"),t.capture&&(n.preventDefault(),t.cancelCapture())}}),rt=o.extend({init:function(t){var i=this;o.fn.init.call(i),i.forcedEnabled=!1,n.extend(i,t),i.scale=1,i.horizontal?(i.measure="offsetWidth",i.scrollSize="scrollWidth",i.axis="x"):(i.measure="offsetHeight",i.scrollSize="scrollHeight",i.axis="y")},makeVirtual:function(){n.extend(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},virtualSize:function(n,t){this._virtualMin===n&&this._virtualMax===t||(this._virtualMin=n,this._virtualMax=t,this.update())},outOfBounds:function(n){return n>this.max||n<this.min},forceEnabled:function(){this.forcedEnabled=!0},getSize:function(){return this.container[0][this.measure]},getTotal:function(){return this.element[0][this.scrollSize]},rescale:function(n){this.scale=n},update:function(n){var t=this,u=t.virtual?t._virtualMax:t.getTotal(),r=u*t.scale,i=t.getSize();(0!==u||t.forcedEnabled)&&(t.max=t.virtual?-t._virtualMin:0,t.size=i,t.total=r,t.min=Math.min(t.max,i-r),t.minScale=i/u,t.centerOffset=(r-i)/2,t.enabled=t.forcedEnabled||r>i,n||t.trigger(a,t))}}),ni=o.extend({init:function(n){var t=this;o.fn.init.call(t),t.x=new rt(r({horizontal:!0},n)),t.y=new rt(r({horizontal:!1},n)),t.container=n.container,t.forcedMinScale=n.minScale,t.maxScale=n.maxScale||100,t.bind(a,n)},rescale:function(n){this.x.rescale(n),this.y.rescale(n),this.refresh()},centerCoordinates:function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},refresh:function(){var n=this;n.x.update(),n.y.update(),n.enabled=n.x.enabled||n.y.enabled,n.minScale=n.forcedMinScale||Math.min(n.x.minScale,n.y.minScale),n.fitScale=Math.max(n.x.minScale,n.y.minScale),n.trigger(a)}}),ft=o.extend({init:function(n){var t=this;r(t,n),o.fn.init.call(t)},outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},dragMove:function(n){var t=this,i=t.dimension,f=t.axis,u=t.movable,r=u[f]+n;i.enabled&&((r<i.min&&n<0||r>i.max&&n>0)&&(n*=t.resistance),u.translateAxis(f,n),t.trigger(a,t))}}),ii=ui.extend({init:function(t){var e,f,o,u,i=this;r(i,{elastic:!0},t),o=i.elastic?.5:0,u=i.movable,i.x=e=new ft({axis:"x",dimension:i.dimensions.x,resistance:o,movable:u}),i.y=f=new ft({axis:"y",dimension:i.dimensions.y,resistance:o,movable:u}),i.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(n){i.gesture=n,i.offset=i.dimensions.container.offset()},press:function(t){n(t.event.target).closest("a").is("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(n){var s,r,o,l=i.gesture,a=l.center,c=n.center,t=n.distance/l.distance,v=i.dimensions.minScale,h=i.dimensions.maxScale;u.scale<=v&&t<1&&(t+=.8*(1-t)),u.scale*t>=h&&(t=h/u.scale),r=u.x+i.offset.left,o=u.y+i.offset.top,s={x:(r-a.x)*t+c.x-r,y:(o-a.y)*t+c.y-o},u.scaleWith(t),e.dragMove(s.x),f.dragMove(s.y),i.dimensions.rescale(u.scale),i.gesture=n,n.preventDefault()},move:function(n){n.event.target.tagName.match(/textarea|input/i)||(e.dimension.enabled||f.dimension.enabled?(e.dragMove(n.x.delta),f.dragMove(n.y.delta),n.preventDefault()):n.touch.skip())},end:function(n){n.preventDefault()}})}}),ti=b.transitions.prefix+"Transform";g=b.hasHW3D?function(n,t,i){return"translate3d("+n+"px,"+t+"px,0) scale("+i+")"}:function(n,t,i){return"translate("+n+"px,"+t+"px) scale("+i+")"},at=o.extend({init:function(t){var i=this;o.fn.init.call(i),i.element=n(t),i.element[0].style.webkitTransformOrigin="left top",i.x=0,i.y=0,i.scale=1,i._saveCoordinates(g(i.x,i.y,i.scale))},translateAxis:function(n,t){this[n]+=t,this.refresh()},scaleTo:function(n){this.scale=n,this.refresh()},scaleWith:function(n){this.scale*=n,this.refresh()},translate:function(n){this.x+=n.x,this.y+=n.y,this.refresh()},moveAxis:function(n,t){this[n]=t,this.refresh()},moveTo:function(n){r(this,n),this.refresh()},refresh:function(){var t,n=this,u=n.x,r=n.y;n.round&&(u=Math.round(u),r=Math.round(r)),t=g(u,r,n.scale),t!=n.coordinates&&(i.support.browser.msie&&i.support.browser.version<10?(n.element[0].style.position="absolute",n.element[0].style.left=n.x+"px",n.element[0].style.top=n.y+"px"):n.element[0].style[ti]=t,n._saveCoordinates(t),n.trigger(a))},_saveCoordinates:function(n){this.coordinates=n}}),l=h.extend({init:function(n,t){var r,i=this;h.fn.init.call(i,n,t),r=i.options.group,r in s?s[r].push(i):s[r]=[i]},events:[d,y,ht],options:{name:"DropTarget",group:"default"},destroy:function(){bt(s,this)},_trigger:function(n,t){var u=this,i=w[u.options.group];if(i)return u.trigger(n,r({},t.event,{draggable:i,dropTarget:t.dropTarget}))},_over:function(n){this._trigger(d,n)},_out:function(n){this._trigger(y,n)},_drop:function(n){var i=this,t=w[i.options.group];t&&(t.dropped=!i._trigger(ht,n))}}),l.destroyGroup=function(n){var i,t=s[n]||c[n];if(t){for(i=0;i<t.length;i++)h.fn.destroy.call(t[i]);t.length=0,delete s[n],delete c[n]}},l._cache=s,vt=l.extend({init:function(n,t){var r,i=this;h.fn.init.call(i,n,t),r=i.options.group,r in c?c[r].push(i):c[r]=[i]},destroy:function(){bt(c,this)},options:{name:"DropTargetArea",group:"default",filter:null}}),yt=h.extend({init:function(n,t){var i=this;h.fn.init.call(i,n,t),i._activated=!1,i.userEvents=new oi(i.element,{global:!0,allowSelection:!0,filter:i.options.filter,threshold:i.options.distance,start:u(i._start,i),hold:u(i._hold,i),move:u(i._drag,i),end:u(i._end,i),cancel:u(i._cancel,i),select:u(i._select,i)}),i._afterEndHandler=u(i._afterEnd,i),i._captureEscape=u(i._captureEscape,i)},events:[lt,ct,et,ut,st,ot],options:{name:"Draggable",distance:i.support.touch?0:5,group:"default",cursorOffset:null,axis:null,container:null,filter:null,ignore:null,holdToDrag:!1,autoScroll:!1,dropped:!1},cancelHold:function(){this._activated=!1},_captureEscape:function(n){var t=this;n.keyCode===i.keys.ESC&&(t._trigger(st,{event:n}),t.userEvents.cancel())},_updateHint:function(t){var i,r=this,o=r.options,u=r.boundaries,e=o.axis,f=r.options.cursorOffset;f?i={left:t.x.location+f.left,top:t.y.location+f.top}:(r.hintOffset.left+=t.x.delta,r.hintOffset.top+=t.y.delta,i=n.extend({},r.hintOffset)),u&&(i.top=dt(i.top,u.y),i.left=dt(i.left,u.x)),"x"===e?delete i.top:"y"===e&&delete i.left,r.hint.css(i)},_shouldIgnoreTarget:function(t){var i=this.options.ignore;return i&&n(t).is(i)},_select:function(n){this._shouldIgnoreTarget(n.event.target)||n.preventDefault()},_start:function(r){var s,u=this,o=u.options,h=o.container,f=o.hint;return this._shouldIgnoreTarget(r.touch.initialTouch)||o.holdToDrag&&!u._activated?(u.userEvents.cancel(),t):(u.currentTarget=r.target,u.currentTargetOffset=tt(u.currentTarget),f&&(u.hint&&u.hint.stop(!0,!0).remove(),u.hint=i.isFunction(f)?n(f.call(u,u.currentTarget)):f,s=tt(u.currentTarget),u.hintOffset=s,u.hint.css({position:"absolute",zIndex:2e4,left:s.left,top:s.top}).appendTo(e.body),u.angular("compile",function(){u.hint.removeAttr("ng-repeat");for(var t=n(r.target);!t.data("$$kendoScope")&&t.length;)t=t.parent();return{elements:u.hint.get(),scopeFrom:t.data("$$kendoScope")}})),w[o.group]=u,u.dropped=!1,h&&(u.boundaries=gt(h,u.hint)),n(e).on(it,u._captureEscape),u._trigger(ct,r)&&(u.userEvents.cancel(),u._afterEnd()),u.userEvents.capture(),t)},_hold:function(n){this.currentTarget=n.target,this._trigger(lt,n)?this.userEvents.cancel():this._activated=!0},_drag:function(t){var i,r;t.preventDefault(),i=this._elementUnderCursor(t),this.options.autoScroll&&this._cursorElement!==i&&(this._scrollableParent=pt(i),this._cursorElement=i),this._lastEvent=t,this._processMovement(t,i),this.options.autoScroll&&this._scrollableParent[0]&&(r=wt(t.x.location,t.y.location,kt(this._scrollableParent)),this._scrollCompenstation=n.extend({},this.hintOffset),this._scrollVelocity=r,0===r.y&&0===r.x?(clearInterval(this._scrollInterval),this._scrollInterval=null):this._scrollInterval||(this._scrollInterval=setInterval(n.proxy(this,"_autoScroll"),50))),this.hint&&this._updateHint(t)},_processMovement:function(i,u){this._withDropTarget(u,function(u,e){if(!u)return f&&(f._trigger(y,r(i,{dropTarget:n(f.targetElement)})),f=null),t;if(f){if(e===f.targetElement)return;f._trigger(y,r(i,{dropTarget:n(f.targetElement)}))}u._trigger(d,r(i,{dropTarget:n(e)})),f=r(u,{targetElement:e})}),this._trigger(et,r(i,{dropTarget:f,elementUnderCursor:u}))},_autoScroll:function(){var l,s,o,c,h,r,u,i,n=this._scrollableParent[0],t=this._scrollVelocity,f=this._scrollCompenstation;n&&(l=this._elementUnderCursor(this._lastEvent),this._processMovement(this._lastEvent,l),c=n===nt()[0],c?(s=e.body.scrollHeight>v.height(),o=e.body.scrollWidth>v.width()):(s=n.offsetHeight<=n.scrollHeight,o=n.offsetWidth<=n.scrollWidth),h=n.scrollTop+t.y,r=s&&h>0&&h<n.scrollHeight,u=n.scrollLeft+t.x,i=o&&u>0&&u<n.scrollWidth,r&&(n.scrollTop+=t.y),i&&(n.scrollLeft+=t.x),this.hint&&c&&(i||r)&&(r&&(f.top+=t.y),i&&(f.left+=t.x),this.hint.css(f)))},_end:function(t){this._withDropTarget(this._elementUnderCursor(t),function(i,u){i&&(i._drop(r({},t,{dropTarget:n(u)})),f=null)}),this._cancel(this._trigger(ut,t))},_cancel:function(n){var t=this;t._scrollableParent=null,this._cursorElement=null,clearInterval(this._scrollInterval),t._activated=!1,t.hint&&!t.dropped?setTimeout(function(){t.hint.stop(!0,!0),n?t._afterEndHandler():t.hint.animate(t.currentTargetOffset,"fast",t._afterEndHandler)},0):t._afterEnd()},_trigger:function(n,t){var i=this;return i.trigger(n,r({},t.event,{x:t.x,y:t.y,currentTarget:i.currentTarget,initialTarget:t.touch?t.touch.initialTouch:null,dropTarget:t.dropTarget,elementUnderCursor:t.elementUnderCursor}))},_elementUnderCursor:function(n){var t=k(n),i=this.hint;return i&&ri(i[0],t)&&(i.hide(),t=k(n),t||(t=k(n)),i.show()),t},_withDropTarget:function(n,t){var i,f=this.options.group,u=s[f],r=c[f];(u&&u.length||r&&r.length)&&(i=fi(n,u,r),i?t(i.target,i.targetElement):t())},destroy:function(){var n=this;h.fn.destroy.call(n),n._afterEnd(),n.userEvents.destroy(),this._scrollableParent=null,this._cursorElement=null,clearInterval(this._scrollInterval),n.currentTarget=null},_afterEnd:function(){var t=this;t.hint&&t.hint.remove(),delete w[t.options.group],t.trigger("destroy"),t.trigger(ot),n(e).off(it,t._captureEscape)}}),i.ui.plugin(l),i.ui.plugin(vt),i.ui.plugin(yt),i.TapCapture=ei,i.containerBoundaries=gt,r(i.ui,{Pane:ii,PaneDimensions:ni,Movable:at}),i.ui.Draggable.utils={autoScrollVelocity:wt,scrollableViewPort:kt,findScrollableParent:pt}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.mobile.scroller.min",["kendo.fx.min","kendo.draganddrop.min"],n)}(function(){return function(n,t){var i=window.kendo,ot=i.mobile,w=i.effects,k=ot.ui,r=n.proxy,f=n.extend,s=k.Widget,st=i.Class,p=i.ui.Movable,ft=i.ui.Pane,et=i.ui.PaneDimensions,b=w.Transition,e=w.Animation,u=Math.abs,ht=500,at=.7,vt=.96,ct=10,y=55,v=.5,a=5,h="km-scroller-release",c="km-scroller-refresh",lt="pull",o="change",it="resize",l="scroll",rt=2,ut=e.extend({init:function(n){var t=this;e.fn.init.call(t),f(t,n),t.userEvents.bind("gestureend",r(t.start,t)),t.tapCapture.bind("press",r(t.cancel,t))},enabled:function(){return this.movable.scale<this.dimensions.minScale},done:function(){return this.dimensions.minScale-this.movable.scale<.01},tick:function(){var n=this.movable;n.scaleWith(1.1),this.dimensions.rescale(n.scale)},onEnd:function(){var n=this.movable;n.scaleTo(this.dimensions.minScale),this.dimensions.rescale(n.scale)}}),d=e.extend({init:function(n){var t=this;e.fn.init.call(t),f(t,n,{transition:new b({axis:n.axis,movable:n.movable,onEnd:function(){t._end()}})}),t.tapCapture.bind("press",function(){t.cancel()}),t.userEvents.bind("end",r(t.start,t)),t.userEvents.bind("gestureend",r(t.start,t)),t.userEvents.bind("tap",r(t.onEnd,t))},onCancel:function(){this.transition.cancel()},freeze:function(n){var t=this;t.cancel(),t._moveTo(n)},onEnd:function(){var n=this;n.paneAxis.outOfBounds()?n._snapBack():n._end()},done:function(){return u(this.velocity)<1},start:function(n){var i,t=this;t.dimension.enabled&&(t.paneAxis.outOfBounds()?t._snapBack():(i=n.touch.id===rt?0:n.touch[t.axis].velocity,t.velocity=Math.max(Math.min(i*t.velocityMultiplier,y),-y),t.tapCapture.captureNext(),e.fn.start.call(t)))},tick:function(){var n=this,i=n.dimension,r=n.paneAxis.outOfBounds()?v:n.friction,u=n.velocity*=r,t=n.movable[n.axis]+u;!n.elastic&&i.outOfBounds(t)&&(t=Math.max(Math.min(t,i.max),i.min),n.velocity=0),n.movable.moveAxis(n.axis,t)},_end:function(){this.tapCapture.cancelCapture(),this.end()},_snapBack:function(){var n=this,t=n.dimension,i=n.movable[n.axis]>t.max?t.max:t.min;n._moveTo(i)},_moveTo:function(n){this.transition.moveTo({location:n,duration:ht,ease:b.easeOutExpo})}}),nt=e.extend({init:function(n){var t=this;i.effects.Animation.fn.init.call(this),f(t,n,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return u(this.offset.y)<a&&u(this.offset.x)<a},onEnd:function(){this.moveTo(this.destination),this.callback&&this.callback.call()},setCoordinates:function(n,t){this.offset={},this.origin=n,this.destination=t},setCallback:function(n){n&&i.isFunction(n)?this.callback=n:n=t},_updateCoordinates:function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}}}),tt=st.extend({init:function(t){var i=this,e="x"===t.axis,u=n('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');f(i,t,{element:u,elementSize:0,movable:new p(u),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),i.scrollMovable.bind(o,r(i.refresh,i)),i.container.append(u),t.alwaysVisible&&i.show()},refresh:function(){var n=this,e=n.axis,f=n.dimension,r=f.size,o=n.scrollMovable,u=r/f.total,i=Math.round(-o[e]*u),t=Math.round(r*u);u>=1?this.element.css("display","none"):this.element.css("display",""),i+t>r?t=r-i:i<0&&(t+=i,i=0),n.elementSize!=t&&(n.element.css(n.size,t+"px"),n.elementSize=t),n.movable.moveAxis(e,i)},show:function(){this.element.css({opacity:at,visibility:"visible"})},hide:function(){this.alwaysVisible||this.element.css({opacity:0})}}),g=s.extend({init:function(e,h){var w,b,v,a,d,y,g,tt,k,c=this;return s.fn.init.call(c,e,h),e=c.element,(c._native=c.options.useNative&&i.support.hasNativeScrolling)?(e.addClass("km-native-scroller").prepend('<div class="km-scroll-header"/>'),f(c,{scrollElement:e,fixedContainer:e.children().first()}),t):(e.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>'),w=e.children().eq(1),b=new i.TapCapture(e),v=new p(w),a=new et({element:w,container:e,forcedEnabled:c.options.zoom}),d=this.options.avoidScrolling,y=new i.UserEvents(e,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:c.options.zoom,start:function(t){a.refresh();var r=u(t.x.velocity),i=u(t.y.velocity),o=2*r>=i,e=n.contains(c.fixedContainer[0],t.event.target),f=2*i>=r;!e&&!d(t)&&c.enabled&&(a.x.enabled&&o||a.y.enabled&&f)?y.capture():y.cancel()}}),g=new ft({movable:v,dimensions:a,userEvents:y,elastic:c.options.elastic}),tt=new ut({movable:v,dimensions:a,userEvents:y,tapCapture:b}),k=new nt({moveTo:function(n){c.scrollTo(n.x,n.y)}}),v.bind(o,function(){c.scrollTop=-v.y,c.scrollLeft=-v.x,c.trigger(l,{scrollTop:c.scrollTop,scrollLeft:c.scrollLeft})}),c.options.mousewheelScrolling&&e.on("DOMMouseScroll mousewheel",r(this,"_wheelScroll")),f(c,{movable:v,dimensions:a,zoomSnapBack:tt,animatedScroller:k,userEvents:y,pane:g,tapCapture:b,pulled:!1,enabled:!0,scrollElement:w,scrollTop:0,scrollLeft:0,fixedContainer:e.children().first()}),c._initAxis("x"),c._initAxis("y"),c._wheelEnd=function(){c._wheel=!1,c.userEvents.end(0,c._wheelY)},a.refresh(),c.options.pullToRefresh&&c._initPullToRefresh(),t)},_wheelScroll:function(n){this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50);var t=i.wheelDeltaY(n);t&&(this._wheelY+=t,this.userEvents.move(0,this._wheelY)),n.preventDefault()},makeVirtual:function(){this.dimensions.y.makeVirtual()},virtualSize:function(n,t){this.dimensions.y.virtualSize(n,t)},height:function(){return this.dimensions.y.size},scrollHeight:function(){return this.scrollElement[0].scrollHeight},scrollWidth:function(){return this.scrollElement[0].scrollWidth},options:{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}},events:[lt,l,it],_resize:function(){this._native||this.contentResized()},setOptions:function(n){var t=this;s.fn.setOptions.call(t,n),n.pullToRefresh&&t._initPullToRefresh()},reset:function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},contentResized:function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},zoomOut:function(){var n=this.dimensions;n.refresh(),this._scale(n.fitScale),this.movable.moveTo(n.centerCoordinates())},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},scrollTo:function(n,t){this._native?(this.scrollElement.scrollLeft(u(n)),this.scrollElement.scrollTop(u(t))):(this.dimensions.refresh(),this.movable.moveTo({x:n,y:t}))},animatedScrollTo:function(n,t,i){var u,r;this._native?this.scrollTo(n,t):(u={x:this.movable.x,y:this.movable.y},r={x:n,y:t},this.animatedScroller.setCoordinates(u,r),this.animatedScroller.setCallback(i),this.animatedScroller.start())},pullHandled:function(){var n=this;n.refreshHint.removeClass(c),n.hintContainer.html(n.pullTemplate({})),n.yinertia.onEnd(),n.xinertia.onEnd(),n.userEvents.cancel()},destroy:function(){s.fn.destroy.call(this),this.userEvents&&this.userEvents.destroy()},_scale:function(n){this.dimensions.rescale(n),this.movable.scaleTo(n)},_initPullToRefresh:function(){var n=this;n.dimensions.y.forceEnabled(),n.pullTemplate=i.template(n.options.messages.pullTemplate),n.releaseTemplate=i.template(n.options.messages.releaseTemplate),n.refreshTemplate=i.template(n.options.messages.refreshTemplate),n.scrollElement.prepend('<span class="km-scroller-pull"><span class="km-icon"></span><span class="km-loading-left"></span><span class="km-loading-right"></span><span class="km-template">'+n.pullTemplate({})+"</span></span>"),n.refreshHint=n.scrollElement.children().first(),n.hintContainer=n.refreshHint.children(".km-template"),n.pane.y.bind("change",r(n._paneChange,n)),n.userEvents.bind("end",r(n._dragEnd,n))},_dragEnd:function(){var n=this;n.pulled&&(n.pulled=!1,n.refreshHint.removeClass(h).addClass(c),n.hintContainer.html(n.refreshTemplate({})),n.yinertia.freeze(n.options.pullOffset/2),n.trigger("pull"))},_paneChange:function(){var n=this;n.movable.y/v>n.options.pullOffset?n.pulled||(n.pulled=!0,n.refreshHint.removeClass(c).addClass(h),n.hintContainer.html(n.releaseTemplate({}))):n.pulled&&(n.pulled=!1,n.refreshHint.removeClass(h),n.hintContainer.html(n.pullTemplate({})))},_initAxis:function(n){var t=this,u=t.movable,r=t.dimensions[n],e=t.tapCapture,f=t.pane[n],i=new tt({axis:n,movable:u,dimension:r,container:t.element,alwaysVisible:t.options.visibleScrollHints});r.bind(o,function(){i.refresh()}),f.bind(o,function(){i.show()}),t[n+"inertia"]=new d({axis:n,paneAxis:f,movable:u,tapCapture:e,userEvents:t.userEvents,dimension:r,elastic:t.options.elastic,friction:t.options.friction||vt,velocityMultiplier:t.options.velocityMultiplier||ct,end:function(){i.hide(),t.trigger("scrollEnd",{axis:n,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft})}})}});k.plugin(g)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.groupable.min",["kendo.core.min","kendo.draganddrop.min"],n)}(function(){return function(n,t){function h(n){return n.position().top+3}var i=window.kendo,s=i.ui.Widget,e=i._outerWidth,f=n.proxy,r=!1,o=".kendoGroupable",a="change",v=i.template('<div class="k-group-indicator" data-#=data.ns#field="${data.field}" data-#=data.ns#title="${data.title || ""}" data-#=data.ns#dir="${data.dir || "asc"}"><a href="\\#" class="k-link"><span class="k-icon k-i-sort-${(data.dir || "asc") == "asc" ? "asc-sm" : "desc-sm"}" title="(sorted ${(data.dir || "asc") == "asc" ? "ascending": "descending"})"></span>${data.title ? data.title: data.field}</a><a class="k-button k-button-icon k-bare"><span class="k-icon k-i-close"></span></a></div>',{useWithBlock:!1}),c=function(t){var r=t.attr(i.attr("title"));return r&&(r=i.htmlEncode(r)),n('<div class="k-header k-drag-clue" />').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(r||t.attr(i.attr("field"))).prepend('<span class="k-icon k-drag-status k-i-cancel" />')},u=n('<div class="k-grouping-dropclue"/>'),l=s.extend({init:function(l,v){var p,k,y=this,d=i.guid(),b=f(y._intializePositions,y),w=y._dropCuePositions=[];s.fn.init.call(y,l,v),r=i.support.isRtl(l),k=r?"right":"left",y.draggable=p=y.options.draggable||new i.ui.Draggable(y.element,{filter:y.options.draggableElements,hint:c,group:d}),y.groupContainer=n(y.options.groupContainer,y.element).kendoDropTarget({group:p.options.group,dragenter:function(n){y._canDrag(n.draggable.currentTarget)&&(n.draggable.hint.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus"),u.css("top",h(y.groupContainer)).css(k,0).appendTo(y.groupContainer))},dragleave:function(n){n.draggable.hint.find(".k-drag-status").removeClass("k-i-plus").addClass("k-i-cancel"),u.remove()},drop:function(t){var f,o=t.draggable.currentTarget,e=o.attr(i.attr("field")),c=o.attr(i.attr("title")),h=y.indicator(e),l=y._dropCuePositions,s=l[l.length-1];(o.hasClass("k-group-indicator")||y._canDrag(o))&&(s?(f=y._dropCuePosition(i.getOffset(u).left+parseInt(s.element.css("marginLeft"),10)*(r?-1:1)+parseInt(s.element.css("marginRight"),10)),f&&y._canDrop(n(h),f.element,f.left)&&(f.before?f.element.before(h||y.buildIndicator(e,c)):f.element.after(h||y.buildIndicator(e,c)),y._change())):(y.groupContainer.append(y.buildIndicator(e,c)),y._change()))}}).kendoDraggable({filter:"div.k-group-indicator",hint:c,group:p.options.group,dragcancel:f(y._dragCancel,y),dragstart:function(n){var t=n.currentTarget,o=parseInt(t.css("marginLeft"),10),i=t.position(),f=r?i.left-o:i.left+e(t);b(),u.css({top:h(y.groupContainer),left:f}).appendTo(y.groupContainer),this.hint.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus")},dragend:function(){y._dragEnd(this)},drag:f(y._drag,y)}).on("click"+o,".k-button",function(t){t.preventDefault(),y._removeIndicator(n(this).parent())}).on("click"+o,".k-link",function(t){var r=n(this).parent(),u=y.buildIndicator(r.attr(i.attr("field")),r.attr(i.attr("title")),"asc"==r.attr(i.attr("dir"))?"desc":"asc");r.before(u).remove(),y._change(),t.preventDefault()}),p.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){y._dragEnd(this)},dragcancel:f(y._dragCancel,y),dragstart:function(n){var i,u,r;return y.options.allowDrag||y._canDrag(n.currentTarget)?(b(),w.length?(i=w[w.length-1].element,u=parseInt(i.css("marginRight"),10),r=i.position().left+e(i)+u):r=0,t):(n.preventDefault(),t)},drag:f(y._drag,y)}),y.dataSource=y.options.dataSource,y.dataSource&&y._refreshHandler?y.dataSource.unbind(a,y._refreshHandler):y._refreshHandler=f(y.refresh,y),y.dataSource&&(y.dataSource.bind("change",y._refreshHandler),y.refresh())},refresh:function(){var t=this,r=t.dataSource;t.groupContainer&&t.groupContainer.empty().append(n.map(r.group()||[],function(r){var e=r.field,f=i.attr("field"),u=t.element.find(t.options.filter).filter(function(){return n(this).attr(f)===e});return t.buildIndicator(r.field,u.attr(i.attr("title")),r.dir)}).join("")),t._invalidateGroupContainer()},destroy:function(){var n=this;s.fn.destroy.call(n),n.groupContainer.off(o),n.groupContainer.data("kendoDropTarget")&&n.groupContainer.data("kendoDropTarget").destroy(),n.groupContainer.data("kendoDraggable")&&n.groupContainer.data("kendoDraggable").destroy(),n.options.draggable||n.draggable.destroy(),n.dataSource&&n._refreshHandler&&(n.dataSource.unbind("change",n._refreshHandler),n._refreshHandler=null),n.groupContainer=n.element=n.draggable=null},events:["change"],options:{name:"Groupable",filter:"th",draggableElements:"th",messages:{empty:"Drag a column header and drop it here to group by that column"}},indicator:function(t){var r=n(".k-group-indicator",this.groupContainer);return n.grep(r,function(r){return n(r).attr(i.attr("field"))===t})[0]},buildIndicator:function(n,t,r){return v({field:n.replace(/"/g,"'"),dir:r,title:t,ns:i.ns})},descriptors:function(){var o,u,e,t,f,r=this,s=n(".k-group-indicator",r.groupContainer);return o=r.element.find(r.options.filter).map(function(){var e=n(this),r=e.attr(i.attr("aggregates")),o=e.attr(i.attr("field"));if(r&&""!==r)for(u=r.split(","),r=[],t=0,f=u.length;t<f;t++)r.push({field:o,aggregate:u[t]});return r}).toArray(),n.map(s,function(t){return t=n(t),e=t.attr(i.attr("field")),{field:e,dir:t.attr(i.attr("dir")),aggregates:o||[]}})},_removeIndicator:function(n){var t=this;n.remove(),t._invalidateGroupContainer(),t._change()},_change:function(){var i,n=this;if(n.dataSource){if(i=n.descriptors(),n.trigger("change",{groups:i}))return n.refresh(),t;n.dataSource.group(i)}},_dropCuePosition:function(t){var i,c,h,s,o,f=this._dropCuePositions;if(u.is(":visible")&&0!==f.length)return t=Math.ceil(t),i=f[f.length-1],c=i.left,h=i.right,s=parseInt(i.element.css("marginLeft"),10),o=parseInt(i.element.css("marginRight"),10),t>=h&&!r||t<c&&r?t={left:i.element.position().left+(r?-s:e(i.element)+o),element:i.element,before:!1}:(t=n.grep(f,function(n){return n.left<=t&&t<=n.right||r&&t>n.right})[0],t&&(t={left:r?t.element.position().left+e(t.element)+o:t.element.position().left-s,element:t.element,before:!0})),t},_drag:function(n){var t=this._dropCuePosition(n.x.location);t&&u.css({left:t.left,right:"auto"})},_canDrag:function(n){var t=n.attr(i.attr("field"));return"false"!=n.attr(i.attr("groupable"))&&t&&(n.hasClass("k-group-indicator")||!this.indicator(t))},_canDrop:function(n,t,i){var u=n.next();return n[0]!==t[0]&&(!u[0]||t[0]!==u[0]||!r&&i>u.position().left||r&&i<u.position().left)},_dragEnd:function(t){var r=this,f=t.currentTarget.attr(i.attr("field")),u=r.indicator(f);t!==r.options.draggable&&!t.dropped&&u&&r._removeIndicator(n(u)),r._dragCancel()},_dragCancel:function(){u.remove(),this._dropCuePositions=[]},_intializePositions:function(){var t,r=this,u=n(".k-group-indicator",r.groupContainer);r._dropCuePositions=n.map(u,function(r){return r=n(r),t=i.getOffset(r).left,{left:parseInt(t,10),right:parseInt(t+e(r),10),element:r}})},_invalidateGroupContainer:function(){var n=this.groupContainer;n&&n.is(":empty")&&n.html(this.options.messages.empty)}});i.ui.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.reorderable.min",["kendo.core.min","kendo.draganddrop.min"],n)}(function(){return function(n){function e(t,i){t=n(t),i?t.find(".k-drag-status").removeClass("k-i-plus").addClass("k-i-cancel"):t.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus")}var i=window.kendo,o=i._outerWidth,c=i._outerHeight,r=i.getOffset,u=i.ui.Widget,f="change",h="k-reorderable",s=u.extend({init:function(t,s){var a,l=this,v=i.guid()+"-reorderable";u.fn.init.call(l,t,s),t=l.element.addClass(h),s=l.options,l.draggable=a=s.draggable||new i.ui.Draggable(t,{group:v,autoScroll:!0,filter:s.filter,hint:s.hint}),l.reorderDropCue=n('<div class="k-reorder-cue"><div class="k-icon k-i-arrow-60-down"></div><div class="k-icon k-i-arrow-60-up"></div></div>'),t.find(a.options.filter).kendoDropTarget({group:a.options.group,dragenter:function(n){var t,f,u,i;l._draggable&&(t=this.element,u=!l._dropTargetAllowed(t)||l._isLastDraggable(),e(n.draggable.hint,u),u||(f=r(t),i=f.left,s.inSameContainer&&!s.inSameContainer({source:t,target:l._draggable,sourceIndex:l._index(t),targetIndex:l._index(l._draggable)})?l._dropTarget=t:l._index(t)>l._index(l._draggable)&&(i+=o(t)),l.reorderDropCue.css({height:c(t),top:f.top,left:i}).appendTo(document.body)))},dragleave:function(n){e(n.draggable.hint,!0),l.reorderDropCue.remove(),l._dropTarget=null},drop:function(){var n,t;l._dropTarget=null,l._draggable&&(n=this.element,t=l._draggable,l._dropTargetAllowed(n)&&!l._isLastDraggable()&&l.trigger(f,{element:l._draggable,target:n,oldIndex:l._index(t),newIndex:l._index(n),position:r(l.reorderDropCue).left>r(n).left?"after":"before"}))}}),a.bind(["dragcancel","dragend","dragstart","drag"],{dragcancel:function(){l.reorderDropCue.remove(),l._draggable=null,l._elements=null},dragend:function(){l.reorderDropCue.remove(),l._draggable=null,l._elements=null},dragstart:function(n){l._draggable=n.currentTarget,l._elements=l.element.find(l.draggable.options.filter)},drag:function(n){var t,i;l._dropTarget&&!this.hint.find(".k-drag-status").hasClass("k-i-cancel")&&(t=r(l._dropTarget).left,i=o(l._dropTarget),l.reorderDropCue.css(n.pageX>t+i/2?{left:t+i}:{left:t}))}})},options:{name:"Reorderable",filter:"*"},events:[f],_isLastDraggable:function(){var n,r=this.options.inSameContainer,i=this._draggable[0],u=this._elements.get(),t=!1;if(!r)return!1;for(;!t&&u.length>0;)n=u.pop(),t=i!==n&&r({source:i,target:n,sourceIndex:this._index(i),targetIndex:this._index(n)});return!t},_dropTargetAllowed:function(n){var i=this.options.inSameContainer,r=this.options.dragOverContainers,t=this._draggable;return t[0]!==n[0]&&(!i||!r||!!i({source:t,target:n,sourceIndex:this._index(t),targetIndex:this._index(n)})||r(this._index(t),this._index(n)))},_index:function(n){return this._elements.index(n)},destroy:function(){var t=this;u.fn.destroy.call(t),t.element.find(t.draggable.options.filter).each(function(){var t=n(this);t.data("kendoDropTarget")&&t.data("kendoDropTarget").destroy()}),t.draggable&&(t.draggable.destroy(),t.draggable.element=t.draggable=null),t.elements=t.reorderDropCue=t._elements=t._draggable=null}});i.ui.plugin(s)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.resizable.min",["kendo.core.min","kendo.draganddrop.min"],n)}(function(){return function(n,t){var f=window.kendo,c=f.ui,e=c.Widget,r=n.proxy,u=f.isFunction,l=n.extend,i="horizontal",a="vertical",o="start",h="resize",s="resizeend",v=e.extend({init:function(n,t){var u=this;e.fn.init.call(u,n,t),u.orientation=u.options.orientation.toLowerCase()!=a?i:a,u._positionMouse=u.orientation==i?"x":"y",u._position=u.orientation==i?"left":"top",u._sizingDom=u.orientation==i?"outerWidth":"outerHeight",u.draggable=new c.Draggable(t.draggableElement||n,{distance:1,filter:t.handle,drag:r(u._resize,u),dragcancel:r(u._cancel,u),dragstart:r(u._start,u),dragend:r(u._stop,u)}),u.userEvents=u.draggable.userEvents},events:[h,s,o],options:{name:"Resizable",orientation:i},resize:function(){},_max:function(n){var r=this,f=r.hint?r.hint[r._sizingDom]():0,i=r.options.max;return u(i)?i(n):i!==t?r._initialElementPosition+i-f:i},_min:function(n){var r=this,i=r.options.min;return u(i)?i(n):i!==t?r._initialElementPosition+i:i},_start:function(t){var i=this,r=i.options.hint,f=n(t.currentTarget);i._initialElementPosition=f.position()[i._position],i._initialMousePosition=t[i._positionMouse].startLocation,r&&(i.hint=u(r)?n(r(f)):r,i.hint.css({position:"absolute"}).css(i._position,i._initialElementPosition).appendTo(i.element)),i.trigger(o,t),i._maxPosition=i._max(t),i._minPosition=i._min(t),n(document.body).css("cursor",f.css("cursor"))},_resize:function(n){var r,i=this,f=i._maxPosition,u=i._minPosition,e=i._initialElementPosition+(n[i._positionMouse].location-i._initialMousePosition);r=u!==t?Math.max(u,e):e,i.position=r=f!==t?Math.min(f,r):r,i.hint&&i.hint.toggleClass(i.options.invalidClass||"",r==f||r==u).css(i._position,r),i.resizing=!0,i.trigger(h,l(n,{position:r}))},_stop:function(t){var i=this;i.hint&&i.hint.remove(),i.resizing=!1,i.trigger(s,l(t,{position:i.position})),n(document.body).css("cursor","")},_cancel:function(n){var i=this;i.hint&&(i.position=t,i.hint.css(i._position,i._initialElementPosition),i._stop(n))},destroy:function(){var n=this;e.fn.destroy.call(n),n.draggable&&n.draggable.destroy()},press:function(n){if(n){var i=n.position(),t=this;t.userEvents.press(i.left,i.top,n[0]),t.targetPosition=i,t.target=n}},move:function(n){var r=this,f=r._position,i=r.targetPosition,u=r.position;u===t&&(u=i[f]),i[f]=u+n,r.userEvents.move(i.left,i.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});f.ui.plugin(v)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.sortable.min",["kendo.draganddrop.min"],n)}(function(){return function(n,t){function w(t,i){try{return n.contains(t,i)||t==i}catch(r){return!1}}function g(n){return n.clone()}function d(n){return n.clone().removeAttr("id").css("visibility","hidden")}var i=window.kendo,u=i.ui.Widget,v=i._outerWidth,a=i._outerHeight,p="start",y="beforeMove",l="move",r="end",f="change",c="cancel",h="sort",o="remove",s="receive",k=">*",e=-1,b=u.extend({init:function(n,t){var i=this;u.fn.init.call(i,n,t),i.options.placeholder||(i.options.placeholder=d),i.options.hint||(i.options.hint=g),i.draggable=i._createDraggable()},events:[p,y,l,r,f,c],options:{name:"Sortable",hint:null,placeholder:null,filter:k,holdToDrag:!1,disabled:null,container:null,connectWith:null,handler:null,cursorOffset:null,axis:null,ignore:null,autoScroll:!1,cursor:"auto",moveOnDragEnter:!1},destroy:function(){this.draggable.destroy(),u.fn.destroy.call(this)},_createDraggable:function(){var r=this,u=r.element,t=r.options;return new i.ui.Draggable(u,{filter:t.filter,hint:i.isFunction(t.hint)?t.hint:n(t.hint),holdToDrag:t.holdToDrag,container:t.container?n(t.container):null,cursorOffset:t.cursorOffset,axis:t.axis,ignore:t.ignore,autoScroll:t.autoScroll,dragstart:n.proxy(r._dragstart,r),dragcancel:n.proxy(r._dragcancel,r),drag:n.proxy(r._drag,r),dragend:n.proxy(r._dragend,r)})},_dragstart:function(t){var r=this.draggedElement=t.currentTarget,e=this.options.disabled,f=this.options.handler,u=this.options.placeholder,o=this.placeholder=n(i.isFunction(u)?u.call(this,r):u);e&&r.is(e)?t.preventDefault():f&&!n(t.initialTarget).is(f)?t.preventDefault():this.trigger(p,{item:r,draggableEvent:t})?t.preventDefault():(r.css("display","none"),r.before(o),this._setCursor())},_dragcancel:function(){this._cancel(),this.trigger(c,{item:this.draggedElement}),this._resetCursor()},_drag:function(i){var l,h,f,e,v,y=this.draggedElement,r=this._findTarget(i),a={left:i.x.location,top:i.y.location},o={x:i.x.delta,y:i.y.delta},c=this.options.axis,u=this.options.moveOnDragEnter,s={item:y,list:this,draggableEvent:i};if("x"===c||"y"===c)return this._movementByAxis(c,a,o[c],s),t;if(r){if(l=this._getElementCenter(r.element),h={left:Math.round(a.left-l.left),top:Math.round(a.top-l.top)},n.extend(s,{target:r.element}),r.appendToBottom)return this._movePlaceholder(r,null,s),t;if(r.appendAfterHidden&&this._movePlaceholder(r,"next",s),this._isFloating(r.element)?o.x<0&&u||!u&&h.left<0?f="prev":(o.x>0&&u||!u&&h.left>0)&&(f="next"):o.y<0&&u||!u&&h.top<0?f="prev":(o.y>0&&u||!u&&h.top>0)&&(f="next"),f){for(v="prev"===f?jQuery.fn.prev:jQuery.fn.next,e=v.call(r.element);e.length&&!e.is(":visible");)e=v.call(e);e[0]!=this.placeholder[0]&&this._movePlaceholder(r,f,s)}}},_dragend:function(i){var l,w,u,v,a=this.placeholder,c=this.draggedElement,p=this.indexOf(c),y=this.indexOf(a),b=this.options.connectWith;return this._resetCursor(),u={action:h,item:c,oldIndex:p,newIndex:y,draggableEvent:i},y>=0?w=this.trigger(r,u):(l=a.parents(b).getKendoSortable(),u.action=o,v=n.extend({},u,{action:s,oldIndex:e,newIndex:l.indexOf(a)}),w=!(!this.trigger(r,u)&&!l.trigger(r,v))),w||y===p?(this._cancel(),t):(a.replaceWith(c),c.show(),this.draggable.dropped=!0,u={action:this.indexOf(c)!=e?h:o,item:c,oldIndex:p,newIndex:this.indexOf(c),draggableEvent:i},this.trigger(f,u),l&&(v=n.extend({},u,{action:s,oldIndex:e,newIndex:l.indexOf(c)}),l.trigger(f,v)),t)},_findTarget:function(i){var f,u,r=this._findElementUnderCursor(i),e=this.options.connectWith;return n.contains(this.element[0],r)?(f=this.items(),u=f.filter(r)[0]||f.has(r)[0],u?{element:n(u),sortable:this}:null):this.element[0]==r&&this._isEmpty()?{element:this.element,sortable:this,appendToBottom:!0}:this.element[0]==r&&this._isLastHidden()?(u=this.items().eq(0),{element:u,sortable:this,appendAfterHidden:!0}):e?this._searchConnectedTargets(r,i):t},_findElementUnderCursor:function(n){var t=i.elementUnderCursor(n),r=n.sender;return w(r.hint[0],t)&&(r.hint.hide(),t=i.elementUnderCursor(n),t||(t=i.elementUnderCursor(n)),r.hint.show()),t},_searchConnectedTargets:function(t,i){for(var r,o,f,e=n(this.options.connectWith),u=0;u<e.length;u++)if(r=e.eq(u).getKendoSortable(),n.contains(e[u],t)){if(r)return o=r.items(),f=o.filter(t)[0]||o.has(t)[0],f?(r.placeholder=this.placeholder,{element:n(f),sortable:r}):null}else if(e[u]==t){if(r&&r._isEmpty())return{element:e.eq(u),sortable:r,appendToBottom:!0};if(this._isCursorAfterLast(r,i))return f=r.items().last(),{element:f,sortable:r}}},_isCursorAfterLast:function(n,t){var r,e,u=n.items().last(),f={left:t.x.location,top:t.y.location};return r=i.getOffset(u),r.top+=a(u),r.left+=v(u),e=this._isFloating(u)?r.left-f.left:r.top-f.top,e<0},_movementByAxis:function(t,i,r,u){var e,o="x"===t?i.left:i.top,f=r<0?this.placeholder.prev():this.placeholder.next();f.length&&!f.is(":visible")&&(f=r<0?f.prev():f.next()),n.extend(u,{target:f}),e=this._getElementCenter(f),e&&(e="x"===t?e.left:e.top),f.length&&r<0&&o-e<0?this._movePlaceholder({element:f,sortable:this},"prev",u):f.length&&r>0&&o-e>0&&this._movePlaceholder({element:f,sortable:this},"next",u)},_movePlaceholder:function(n,t,i){var r=this.placeholder;n.sortable.trigger(y,i)||(t?"prev"===t?n.element.before(r):"next"===t&&n.element.after(r):n.element.append(r),n.sortable.trigger(l,i))},_setCursor:function(){var i,t=this.options.cursor;t&&"auto"!==t&&(i=n(document.body),this._originalCursorType=i.css("cursor"),i.css({cursor:t}),this._cursorStylesheet||(this._cursorStylesheet=n("<style>* { cursor: "+t+" !important; }</style>")),this._cursorStylesheet.appendTo(i))},_resetCursor:function(){this._originalCursorType&&(n(document.body).css("cursor",this._originalCursorType),this._originalCursorType=null,this._cursorStylesheet.remove())},_getElementCenter:function(n){var t=n.length?i.getOffset(n):null;return t&&(t.top+=a(n)/2,t.left+=v(n)/2),t},_isFloating:function(n){return/left|right/.test(n.css("float"))||/inline|table-cell/.test(n.css("display"))},_cancel:function(){this.draggedElement.show(),this.placeholder.remove()},_items:function(){var t,n=this.options.filter;return t=n?this.element.find(n):this.element.children()},indexOf:function(n){var i=this._items(),t=this.placeholder,r=this.draggedElement;return t&&n[0]==t[0]?i.not(r).index(n):i.not(t).index(n)},items:function(){var t=this.placeholder,n=this._items();return t&&(n=n.not(t)),n},_isEmpty:function(){return!this.items().length},_isLastHidden:function(){return 1===this.items().length&&this.items().is(":hidden")}});i.ui.plugin(b)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.selectable.min",["kendo.core.min","kendo.userevents.min"],n)}(function(){return function(n,t){function w(n,t){if(!n.is(":visible"))return!1;var i=r.getOffset(n),f=t.left+t.width,u=t.top+t.height;return i.right=i.left+r._outerWidth(n),i.bottom=i.top+r._outerHeight(n),!(i.left>f||i.right<t.left||i.top>u||i.bottom<t.top)}var c,r=window.kendo,h=r.ui.Widget,e=n.proxy,y=Math.abs,p="aria-selected",i="k-state-selected",f="k-state-selecting",s="k-selectable",o="change",b=".kendoSelectable",u="k-state-unselecting",a="input,a,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up",v=r.support.browser.msie,l=!1;!function(n){!function(){n('<div class="parent"><span /></div>').on("click",">*",function(){l=!0}).find("span").click().end().off()}()}(n),c=h.extend({init:function(t,i){var f,u=this;h.fn.init.call(u,t,i),u._marquee=n("<div class='k-marquee'><div class='k-marquee-color'></div></div>"),u._lastActive=null,u.element.addClass(s),u.relatedTarget=u.options.relatedTarget,f=u.options.multiple,this.options.aria&&f&&u.element.attr("aria-multiselectable",!0),u.userEvents=new r.UserEvents(u.element,{global:!0,allowSelection:!0,filter:(l?"":"."+s+" ")+u.options.filter,tap:e(u._tap,u)}),f&&u.userEvents.bind("start",e(u._start,u)).bind("move",e(u._move,u)).bind("end",e(u._end,u)).bind("select",e(u._select,u))},events:[o],options:{name:"Selectable",filter:">*",multiple:!1,relatedTarget:n.noop},_isElement:function(n){var t,r=this.element,u=r.length,i=!1;for(n=n[0],t=0;t<u;t++)if(r[t]===n){i=!0;break}return i},_tap:function(t){var c,u=n(t.target),r=this,l=t.event.ctrlKey||t.event.metaKey,h=r.options.multiple,a=h&&t.event.shiftKey,f=t.event.which,e=t.event.button;!r._isElement(u.closest("."+s))||f&&3==f||e&&2==e||this._allowSelection(t.event.target)&&(c=u.hasClass(i),h&&l||r.clear(),u=u.add(r.relatedTarget(u)),a?r.selectRange(r._firstSelectee(),u):(c&&l?(r._unselect(u),r._notify(o)):r.value(u),r._lastActive=r._downTarget=u))},_start:function(r){var h,f=this,e=n(r.target),c=e.hasClass(i),o=r.event.ctrlKey||r.event.metaKey;if(this._allowSelection(r.event.target)){if(f._downTarget=e,!f._isElement(e.closest("."+s)))return f.userEvents.cancel(),t;f.options.useAllItems?f._items=f.element.find(f.options.filter):(h=e.closest(f.element),f._items=h.find(f.options.filter)),r.sender.capture(),f._marquee.appendTo(document.body).css({left:r.x.client+1,top:r.y.client+1,width:0,height:0}),o||f.clear(),e=e.add(f.relatedTarget(e)),c&&(f._selectElement(e,!0),o&&e.addClass(u))}},_move:function(n){var i=this,t={left:n.x.startLocation>n.x.location?n.x.location:n.x.startLocation,top:n.y.startLocation>n.y.location?n.y.location:n.y.startLocation,width:y(n.x.initialDelta),height:y(n.y.initialDelta)};i._marquee.css(t),i._invalidateSelectables(t,n.event.ctrlKey||n.event.metaKey),n.preventDefault()},_end:function(){var t,n=this;n._marquee.remove(),n._unselect(n.element.find(n.options.filter+"."+u)).removeClass(u),t=n.element.find(n.options.filter+"."+f),t=t.add(n.relatedTarget(t)),n.value(t),n._lastActive=n._downTarget,n._items=null},_invalidateSelectables:function(n,t){for(var e,r,c=this._downTarget[0],s=this._items,o=0,h=s.length;o<h;o++)r=s.eq(o),e=r.add(this.relatedTarget(r)),w(r,n)?r.hasClass(i)?t&&c!==r[0]&&e.removeClass(i).addClass(u):r.hasClass(f)||r.hasClass(u)||e.addClass(f):r.hasClass(f)?e.removeClass(f):t&&r.hasClass(u)&&e.removeClass(u).addClass(i)},value:function(n){var r=this,u=e(r._selectElement,r);return n?(n.each(function(){u(this)}),r._notify(o),t):r.element.find(r.options.filter+"."+i)},_firstSelectee:function(){var t,n=this;return null!==n._lastActive?n._lastActive:(t=n.value(),t.length>0?t[0]:n.element.find(n.options.filter)[0])},_selectElement:function(t,r){var u=n(t),e=!r&&this._notify("select",{element:t});u.removeClass(f),e||(u.addClass(i),this.options.aria&&u.attr(p,!0))},_notify:function(n,t){return t=t||{},this.trigger(n,t)},_unselect:function(n){return n.removeClass(i),this.options.aria&&n.attr(p,!1),n},_select:function(t){this._allowSelection(t.event.target)&&(!v||v&&!n(r._activeElement()).is(a))&&t.preventDefault()},_allowSelection:function(t){return!n(t).is(a)||(this.userEvents.cancel(),this._downTarget=null,!1)},resetTouchEvents:function(){this.userEvents.cancel()},clear:function(){var n=this.element.find(this.options.filter+"."+i);this._unselect(n)},selectRange:function(t,i){var f,e,u,r=this;for(r.clear(),r.element.length>1&&(u=r.options.continuousItems()),u&&u.length||(u=r.element.find(r.options.filter)),t=n.inArray(n(t)[0],u),i=n.inArray(n(i)[0],u),t>i&&(e=t,t=i,i=e),r.options.useAllItems||(i+=r.element.length-1),f=t;f<=i;f++)r._selectElement(u[f]);r._notify(o)},destroy:function(){var n=this;h.fn.destroy.call(n),n.element.off(b),n.userEvents.destroy(),n._marquee=n._lastActive=n.element=n.userEvents=null}}),c.parseOptions=function(n){var t="string"==typeof n&&n.toLowerCase();return{multiple:t&&t.indexOf("multiple")>-1,cell:t&&t.indexOf("cell")>-1}},r.ui.plugin(c)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.button.min",["kendo.core.min"],n)}(function(){return function(n,t){var u=window.kendo,e=u.ui.Widget,r=n.proxy,o=u.keys,f="click",v="k-button",y="k-button-icon",p="k-button-icontext",i=".kendoButton",s="disabled",a="k-state-disabled",h="k-state-focused",c="k-state-selected",l=e.extend({init:function(n,t){var o=this;e.fn.init.call(o,n,t),n=o.wrapper=o.element,t=o.options,n.addClass(v).attr("role","button"),t.enable=t.enable&&!n.attr(s),o.enable(t.enable),o._tabindex(),o._graphics(),n.on(f+i,r(o._click,o)).on("focus"+i,r(o._focus,o)).on("blur"+i,r(o._blur,o)).on("keydown"+i,r(o._keydown,o)).on("keyup"+i,r(o._keyup,o)),u.notify(o)},destroy:function(){var n=this;n.wrapper.off(i),e.fn.destroy.call(n)},events:[f],options:{name:"Button",icon:"",spriteCssClass:"",imageUrl:"",enable:!0},_isNativeButton:function(){return"button"==this.element.prop("tagName").toLowerCase()},_click:function(n){this.options.enable&&this.trigger(f,{event:n})&&n.preventDefault()},_focus:function(){this.options.enable&&this.element.addClass(h)},_blur:function(){this.element.removeClass(h)},_keydown:function(n){var t=this;t._isNativeButton()||n.keyCode!=o.ENTER&&n.keyCode!=o.SPACEBAR||(n.keyCode==o.SPACEBAR&&(n.preventDefault(),t.options.enable&&t.element.addClass(c)),t._click(n))},_keyup:function(){this.element.removeClass(c)},_graphics:function(){var i,r,s,h=this,t=h.element,o=h.options,u=o.icon,f=o.spriteCssClass,e=o.imageUrl;(f||e||u)&&(s=!0,t.contents().filter(function(){return!n(this).hasClass("k-sprite")&&!n(this).hasClass("k-icon")&&!n(this).hasClass("k-image")}).each(function(t,i){(1==i.nodeType||3==i.nodeType&&n.trim(i.nodeValue).length>0)&&(s=!1)}),t.addClass(s?y:p)),u?(i=t.children("span.k-icon").first(),i[0]||(i=n('<span class="k-icon"></span>').prependTo(t)),i.addClass("k-i-"+u)):f?(i=t.children("span.k-sprite").first(),i[0]||(i=n('<span class="k-sprite"></span>').prependTo(t)),i.addClass(f)):e&&(r=t.children("img.k-image").first(),r[0]||(r=n('<img alt="icon" class="k-image" />').prependTo(t)),r.attr("src",e))},enable:function(n){var r=this,i=r.element;n===t&&(n=!0),n=!!n,r.options.enable=n,i.toggleClass(a,!n).attr("aria-disabled",!n).attr(s,!n);try{i.blur()}catch(u){}}});u.ui.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.pager.min",["kendo.data.min"],n)}(function(){return function(n,t){function v(n,t,r,u,f){return n({idx:t,text:r,ns:i.ns,numeric:u,title:f||""})}function o(n,t,i){return g({className:n.substring(1),text:t,wrapClassName:i||""})}function e(n,t,r,u){n.find(t).parent().attr(i.attr("page"),r).attr("tabindex",-1).toggleClass("k-state-disabled",u)}function w(n,t){e(n,s,1,t<=1)}function p(n,t){e(n,h,Math.max(1,t-1),t<=1)}function d(n,t,i){e(n,l,Math.min(i,t+1),t>=i)}function k(n,t,i){e(n,c,i,t>=i)}var i=window.kendo,b=i.ui,y=b.Widget,f=n.proxy,s=".k-i-seek-w",c=".k-i-seek-e",h=".k-i-arrow-w",l=".k-i-arrow-e",r="change",u=".kendoPager",a="click",tt="keydown",it="disabled",g=i.template('<a href="\\#" aria-label="#=text#" title="#=text#" class="k-link k-pager-nav #= wrapClassName #"><span class="k-icon #= className #"></span></a>'),nt=y.extend({init:function(t,e){var g,b,nt,it,v=this;y.fn.init.call(v,t,e),e=v.options,v.dataSource=i.data.DataSource.create(e.dataSource),v.linkTemplate=i.template(v.options.linkTemplate),v.selectTemplate=i.template(v.options.selectTemplate),v.currentPageTemplate=i.template(v.options.currentPageTemplate),g=v.page(),b=v.totalPages(),v._refreshHandler=f(v.refresh,v),v.dataSource.bind(r,v._refreshHandler),e.previousNext&&(v.element.find(s).length||(v.element.append(o(s,e.messages.first,"k-pager-first")),w(v.element,g,b)),v.element.find(h).length||(v.element.append(o(h,e.messages.previous)),p(v.element,g,b))),e.numeric&&(v.list=v.element.find(".k-pager-numbers"),v.list.length||(v.list=n('<ul class="k-pager-numbers k-reset" />').appendTo(v.element))),e.input&&(v.element.find(".k-pager-input").length||v.element.append('<span class="k-pager-input k-label">'+e.messages.page+'<input class="k-textbox">'+i.format(e.messages.of,b)+"</span>"),v.element.on(tt+u,".k-pager-input input",f(v._keydown,v))),e.previousNext&&(v.element.find(l).length||(v.element.append(o(l,e.messages.next)),d(v.element,g,b)),v.element.find(c).length||(v.element.append(o(c,e.messages.last,"k-pager-last")),k(v.element,g,b))),e.pageSizes&&(v.element.find(".k-pager-sizes").length||(nt=e.pageSizes.length?e.pageSizes:["all",5,10,20],it=n.map(nt,function(n){return n.toLowerCase&&"all"===n.toLowerCase()?"<option value='all'>"+e.messages.allPages+"</option>":"<option>"+n+"</option>"}),n('<span class="k-pager-sizes k-label"><select/>'+e.messages.itemsPerPage+"</span>").appendTo(v.element).find("select").html(it.join("")).end().appendTo(v.element)),v.element.find(".k-pager-sizes select").val(v.pageSize()),i.ui.DropDownList&&v.element.find(".k-pager-sizes select").show().kendoDropDownList(),v.element.on(r+u,".k-pager-sizes select",f(v._change,v))),e.refresh&&(v.element.find(".k-pager-refresh").length||v.element.append('<a href="#" class="k-pager-refresh k-link" title="'+e.messages.refresh+'" aria-label="'+e.messages.refresh+'"><span class="k-icon k-i-reload"></span></a>'),v.element.on(a+u,".k-pager-refresh",f(v._refreshClick,v))),e.info&&(v.element.find(".k-pager-info").length||v.element.append('<span class="k-pager-info k-label" />')),v.element.on(a+u,"a",f(v._click,v)).addClass("k-pager-wrap k-widget k-floatwrap"),v.element.on(a+u,".k-current-page",f(v._toggleActive,v)),e.autoBind&&v.refresh(),i.notify(v)},destroy:function(){var n=this;y.fn.destroy.call(n),n.element.off(u),n.dataSource.unbind(r,n._refreshHandler),n._refreshHandler=null,i.destroy(n.element),n.element=n.list=null},events:[r],options:{name:"Pager",selectTemplate:'<li><span class="k-state-selected">#=text#</span></li>',currentPageTemplate:'<li class="k-current-page"><span class="k-link k-pager-nav">#=text#</span></li>',linkTemplate:'<li><a tabindex="-1" href="\\#" class="k-link" data-#=ns#page="#=idx#" #if (title !== "") {# title="#=title#" #}#>#=text#</a></li>',buttonCount:10,autoBind:!0,numeric:!0,info:!0,input:!1,previousNext:!0,pageSizes:!1,refresh:!1,messages:{allPages:"All",display:"{0} - {1} of {2} items",empty:"No items to display",page:"Page",of:"of {0}",itemsPerPage:"items per page",first:"Go to the first page",previous:"Go to the previous page",next:"Go to the next page",last:"Go to the last page",refresh:"Refresh",morePages:"More pages"}},setDataSource:function(n){var t=this;t.dataSource.unbind(r,t._refreshHandler),t.dataSource=t.options.dataSource=n,n.bind(r,t._refreshHandler),t.options.autoBind&&n.fetch()},refresh:function(n){var o,y,b,nt,tt,g,t=this,c=1,r=t.page(),f="",u=t.options,e=t.pageSize(),h=t.dataSource.total(),s=t.totalPages(),a=t.linkTemplate,l=u.buttonCount;if(!n||"itemchange"!=n.action){if(u.numeric){for(r>l&&(b=r%l,c=0===b?r-l+1:r-b+1),y=Math.min(c+l-1,s),c>1&&(f+=v(a,c-1,"...",!1,u.messages.morePages)),o=c;o<=y;o++)f+=v(o==r?t.selectTemplate:a,o,o,!0);y<s&&(f+=v(a,o,"...",!1,u.messages.morePages)),""===f&&(f=t.selectTemplate({text:0})),f=this.currentPageTemplate({text:r})+f,t.list.removeClass("k-state-expanded").html(f)}u.info&&(f=h>0?i.format(u.messages.display,Math.min((r-1)*e+1,h),Math.min(r*e,h),h):u.messages.empty,t.element.find(".k-pager-info").html(f)),u.input&&t.element.find(".k-pager-input").html(t.options.messages.page+'<input class="k-textbox" aria-label="'+r+'">'+i.format(u.messages.of,s)).find("input").val(r).attr(it,h<1).toggleClass("k-state-disabled",h<1),u.previousNext&&(w(t.element,r,s),p(t.element,r,s),d(t.element,r,s),k(t.element,r,s)),u.pageSizes&&(nt=t.element.find(".k-pager-sizes option[value='all']").length>0,tt=nt&&e===this.dataSource.total(),g=e,tt&&(e="all",g=u.messages.allPages),t.element.find(".k-pager-sizes select").val(e).attr("aria-label",e).filter("["+i.attr("role")+"=dropdownlist]").kendoDropDownList("value",e).kendoDropDownList("text",g))}},_keydown:function(n){if(n.keyCode===i.keys.ENTER){var r=this.element.find(".k-pager-input").find("input"),t=parseInt(r.val(),10);(isNaN(t)||t<1||t>this.totalPages())&&(t=this.page()),r.val(t),this.page(t)}},_refreshClick:function(n){n.preventDefault(),this.dataSource.read()},_change:function(n){var i=n.currentTarget.value,r=parseInt(i,10),t=this.dataSource;isNaN(r)?"all"==(i+"").toLowerCase()&&t.pageSize(t.total()):t.pageSize(r)},_toggleActive:function(){this.list.toggleClass("k-state-expanded")},_click:function(t){var r=n(t.currentTarget);t.preventDefault(),r.is(".k-state-disabled")||this.page(r.attr(i.attr("page")))},totalPages:function(){return Math.ceil((this.dataSource.total()||0)/(this.pageSize()||1))},pageSize:function(){return this.dataSource.pageSize()||this.dataSource.total()},page:function(n){return n===t?this.dataSource.total()>0?this.dataSource.page():0:(this.trigger("pageChange",{index:n})||(this.dataSource.page(n),this.trigger(r,{index:n})),t)}});b.plugin(nt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.notification.min",["kendo.core.min","kendo.popup.min"],n)}(function(){return function(n,t){var r=window.kendo,s=r.ui.Widget,nt=n.proxy,l=n.extend,e=window.setTimeout,k="click",d="show",b="hide",v="k-notification",f=".k-notification-wrap .k-i-close",a="k-hiding",w="info",ut="success",rt="warning",ft="error",i="top",o="left",h="bottom",c="right",p="up",u=".kendoNotification",it='<div class="k-widget k-notification"></div>',y='<div class="k-notification-wrap"><span class="k-icon k-i-#=typeIcon#" title="#=typeIcon#"></span>#=content#<span class="k-icon k-i-close" title="Hide"></span></div>',g=y.replace("#=content#","#:content#"),tt=s.extend({init:function(t,i){var u=this;s.fn.init.call(u,t,i),i=u.options,i.appendTo&&n(i.appendTo).is(t)||u.element.hide(),u._compileTemplates(i.templates),u._guid="_"+r.guid(),u._isRtl=r.support.isRtl(t),u._compileStacking(i.stacking,i.position.top,i.position.left),r.notify(u)},events:[d,b],options:{name:"Notification",position:{pinned:!0,top:null,left:null,bottom:20,right:20},stacking:"default",hideOnClick:!0,button:!1,allowHideAfter:0,autoHideAfter:5e3,appendTo:null,width:null,height:null,templates:[],animation:{open:{effects:"fade:in",duration:300},close:{effects:"fade:out",duration:600,hide:!0}}},_compileTemplates:function(t){var i=this,u=r.template;i._compiled={},n.each(t,function(t,r){i._compiled[r.type]=u(r.template||n("#"+r.templateId).html())}),i._defaultCompiled=u(y),i._safeCompiled=u(g)},_getCompiled:function(n,t){var i=t?this._safeCompiled:this._defaultCompiled;return n?this._compiled[n]||i:i},_compileStacking:function(n,t,r){var e,s,l=this,f={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},u=null!==r?o:c;switch(n){case"down":e=h+" "+u,s=i+" "+u,delete f.paddingBottom;break;case c:e=i+" "+c,s=i+" "+o,delete f.paddingRight;break;case o:e=i+" "+o,s=i+" "+c,delete f.paddingLeft;break;case p:e=i+" "+u,s=h+" "+u,delete f.paddingTop;break;default:null!==t?(e=h+" "+u,s=i+" "+u,delete f.paddingBottom):(e=i+" "+u,s=h+" "+u,delete f.paddingTop)}l._popupOrigin=e,l._popupPosition=s,l._popupPaddings=f},_attachPopupEvents:function(n,t){function r(n){n.on(k+u,function(){h._hidePopup(t)})}var o,h=this,i=n.allowHideAfter,s=!isNaN(i)&&i>0;n.hideOnClick?t.bind("activate",function(){s?e(function(){r(t.element)},i):r(t.element)}):n.button&&(o=t.element.find(f),s?e(function(){r(o)},i):r(o))},_showPopup:function(t,i){var s,h,o=this,y=i.autoHideAfter,c=i.position.left,v=i.position.top;h=n("."+o._guid+":not(."+a+")").last(),s=new r.ui.Popup(t,{anchor:h[0]?h:document.body,origin:o._popupOrigin,position:o._popupPosition,animation:i.animation,modal:!0,collision:"",isRtl:o._isRtl,close:function(){o._triggerHide(this.element)},deactivate:function(n){n.sender.element.off(u),n.sender.element.find(f).off(u),n.sender.destroy()}}),o._attachPopupEvents(i,s),h[0]?s.open():(null===c&&(c=n(window).width()-t.width()-i.position.right),null===v&&(v=n(window).height()-t.height()-i.position.bottom),s.open(c,v)),s.wrapper.addClass(o._guid).css(l({margin:0,zIndex:10050},o._popupPaddings)),i.position.pinned?(s.wrapper.css("position","fixed"),h[0]&&o._togglePin(s.wrapper,!0)):h[0]||o._togglePin(s.wrapper,!1),y>0&&e(function(){o._hidePopup(s)},y)},_hidePopup:function(n){n.wrapper.addClass(a),n.close()},_togglePin:function(t,r){var f=n(window),u=r?-1:1;t.css({top:parseInt(t.css(i),10)+u*f.scrollTop(),left:parseInt(t.css(o),10)+u*f.scrollLeft()})},_attachStaticEvents:function(n,t){function r(n){n.on(k+u,nt(s._hideStatic,s,t))}var s=this,i=n.allowHideAfter,o=!isNaN(i)&&i>0;n.hideOnClick?o?e(function(){r(t)},i):r(t):n.button&&(o?e(function(){r(t.find(f))},i):r(t.find(f)))},_showStatic:function(n,t){var i=this,r=t.autoHideAfter,f=t.animation,u=t.stacking==p||t.stacking==o?"prependTo":"appendTo";n.addClass(i._guid)[u](t.appendTo).hide().kendoAnimate(f.open||!1),i._attachStaticEvents(t,n),r>0&&e(function(){i._hideStatic(n)},r)},_hideStatic:function(n){n.kendoAnimate(l(this.options.animation.close||!1,{complete:function(){n.off(u).find(f).off(u),n.remove()}})),this._triggerHide(n)},_triggerHide:function(n){this.trigger(b,{element:n}),this.angular("cleanup",function(){return{elements:n}})},show:function(i,u,f){var h,c,e=this,o=e.options,s=n(it);return u||(u=w),null!==i&&i!==t&&""!==i&&(r.isFunction(i)&&(i=i()),c={typeIcon:u,content:""},h=n.isPlainObject(i)?l(c,i):l(c,{content:i}),s.addClass(v+"-"+u).toggleClass(v+"-button",o.button).attr("data-role","alert").css({width:o.width,height:o.height}).append(e._getCompiled(u,f)(h)),e.angular("compile",function(){return{elements:s,data:[{dataItem:h}]}}),n(o.appendTo)[0]?e._showStatic(s,o):e._showPopup(s,o),e.trigger(d,{element:s})),e},showText:function(n,t){this.show(n,t,!0)},info:function(n){return this.show(n,w)},success:function(n){return this.show(n,ut)},warning:function(n){return this.show(n,rt)},error:function(n){return this.show(n,ft)},hide:function(){var t=this,i=t.getNotifications();return i.each(t.options.appendTo?function(i,r){t._hideStatic(n(r))}:function(i,r){var u=n(r).data("kendoPopup");u&&t._hidePopup(u)}),t},getNotifications:function(){var i=this,t=n("."+i._guid+":not(."+a+")");return i.options.appendTo?t:t.children("."+v)},setOptions:function(n){var i,r=this;s.fn.setOptions.call(r,n),i=r.options,n.templates!==t&&r._compileTemplates(i.templates),n.stacking===t&&n.position===t||r._compileStacking(i.stacking,i.position.top,i.position.left)},destroy:function(){s.fn.destroy.call(this),this.getNotifications().off(u).find(f).off(u)}});r.ui.plugin(tt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.tooltip.min",["kendo.core.min","kendo.popup.min"],n)}(function(){return function(n){function k(n){for(;n.length;)d(n),n=n.parent()}function d(n){var t=n.data(i.ns+"title");t&&(n.attr("title",t),n.removeData(i.ns+"title"))}function ct(n){var t=n.attr("title");t&&(n.data(i.ns+"title",t),n.attr("title",""))}function w(n){for(;n.length&&!n.is("body");)ct(n),n=n.parent()}var i=window.kendo,o=i.ui.Widget,ot=i.ui.Popup,ut=i.isFunction,ft=n.isPlainObject,b=n.extend,u=n.proxy,f=n(document),et=i.isLocalUrl,p="_tt_active",h="aria-describedby",l="show",y="hide",v="error",e="contentLoad",a="requestStart",s="k-content-frame",ht='<div role="tooltip" class="k-widget k-tooltip#if (!autoHide) {# k-tooltip-closable#}#">#if (!autoHide) {# <div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close" title="Close"></a></div> #}#<div class="k-tooltip-content"></div>#if (callout){ #<div class="k-callout k-callout-#=dir#"></div>#}#</div>',st=i.template("<iframe frameborder='0' class='"+s+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),r=".kendoTooltip",nt={bottom:{origin:"bottom center",position:"top center"},top:{origin:"top center",position:"bottom center"},left:{origin:"center left",position:"center right",collision:"fit flip"},right:{origin:"center right",position:"center left",collision:"fit flip"},center:{position:"center center",origin:"center center"}},g={top:"bottom",bottom:"top",left:"right",right:"left",center:"center"},c={bottom:"n",top:"s",left:"e",right:"w",center:"n"},it={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}},tt=function(n){return n.target.data(i.ns+"title")},rt=o.extend({init:function(n,t){var f,i=this;o.fn.init.call(i,n,t),f=i.options.position.match(/left|right/)?"horizontal":"vertical",i.dimensions=it[f],i._documentKeyDownHandler=u(i._documentKeyDown,i),i.element.on(i.options.showOn+r,i.options.filter,u(i._showOn,i)).on("mouseenter"+r,i.options.filter,u(i._mouseenter,i)),this.options.autoHide&&i.element.on("mouseleave"+r,i.options.filter,u(i._mouseleave,i))},options:{name:"Tooltip",filter:"",content:tt,showAfter:100,callout:!0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{effects:"fade:out",duration:40,hide:!0}}},events:[l,y,e,v,a],_mouseenter:function(t){w(n(t.currentTarget))},_showOn:function(t){var i=this,r=n(t.currentTarget);i.options.showOn&&i.options.showOn.match(/click|focus/)?i._show(r):(clearTimeout(i.timeout),i.timeout=setTimeout(function(){i._show(r)},i.options.showAfter))},_appendContent:function(n){var o,f=this,t=f.options.content,u=f.content,h=f.options.iframe;ft(t)&&t.url?("iframe"in f.options||(h=!et(t.url)),f.trigger(a,{options:t,target:n}),h?(u.hide(),o=u.find("."+s)[0],o?o.src=t.url||o.src:u.html(st({content:t})),u.find("."+s).off("load"+r).on("load"+r,function(){f.trigger(e),u.show()})):(u.empty(),i.ui.progress(u,!0),f._ajaxRequest(t))):t&&ut(t)?(t=t({sender:this,target:n}),u.html(t||"")):u.html(t),f.angular("compile",function(){return{elements:u}})},_ajaxRequest:function(n){var t=this;jQuery.ajax(b({type:"GET",dataType:"html",cache:!1,error:function(n,r){i.ui.progress(t.content,!1),t.trigger(v,{status:r,xhr:n})},success:u(function(n){i.ui.progress(t.content,!1),t.content.html(n),t.trigger(e)},t)},n))},_documentKeyDown:function(n){n.keyCode===i.keys.ESC&&this.hide()},refresh:function(){var t=this,n=t.popup;n&&n.options.anchor&&t._appendContent(n.options.anchor)},hide:function(){this.popup&&this.popup.close()},show:function(n){n=n||this.element,w(n),this._show(n)},_show:function(n){var t=this,i=t.target();t.popup||t._initPopup(),i&&i[0]!=n[0]&&(t.popup.close(),t.popup.element.kendoStop(!0,!0)),i&&i[0]==n[0]||(t._appendContent(n),t.popup.options.anchor=n),t.popup.one("deactivate",function(){k(n),n.removeAttr(h),this.element.removeAttr("id").attr("aria-hidden",!0),f.off("keydown"+r,t._documentKeyDownHandler)}),t.popup.open()},_initPopup:function(){var t=this,e=t.options,o=n(i.template(ht)({callout:e.callout&&"center"!==e.position,dir:c[e.position],autoHide:e.autoHide}));t.popup=new ot(o,b({activate:function(){var i=this.options.anchor,n=i[0].id||t.element[0].id;n&&(i.attr(h,n+p),this.element.attr("id",n+p)),e.callout&&t._positionCallout(),this.element.removeAttr("aria-hidden"),f.on("keydown"+r,t._documentKeyDownHandler),t.trigger(l)},close:function(){t.trigger(y)},copyAnchorStyles:!1,animation:e.animation},nt[e.position])),o.css({width:e.width,height:e.height}),t.content=o.find(".k-tooltip-content"),t.arrow=o.find(".k-callout"),e.autoHide?o.on("mouseleave"+r,u(t._mouseleave,t)):o.on("click"+r,".k-tooltip-button",u(t._closeButtonClick,t))},_closeButtonClick:function(n){n.preventDefault(),this.hide()},_mouseleave:function(t){if(this.popup){var u=n(t.currentTarget),r=u.offset(),e=t.pageX,f=t.pageY;if(r.right=r.left+i._outerWidth(u),r.bottom=r.top+i._outerHeight(u),e>r.left&&e<r.right&&f>r.top&&f<r.bottom)return;this.popup.close()}else k(n(t.currentTarget));clearTimeout(this.timeout)},_positionCallout:function(){var t=this,f=t.options.position,e=t.dimensions,r=e.offset,i=t.popup,u=i.options.anchor,l=n(u).offset(),a=parseInt(t.arrow.css("border-top-width"),10),h=n(i.element).offset(),o=c[i.flipped?g[f]:f],s=l[r]-h[r]+n(u)[e.size]()/2-a;t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-"+o).css(r,s)},target:function(){return this.popup?this.popup.options.anchor:null},destroy:function(){var n=this.popup;n&&(n.element.off(r),n.destroy()),clearTimeout(this.timeout),this.element.off(r),f.off("keydown"+r,this._documentKeyDownHandler),o.fn.destroy.call(this)}});i.ui.plugin(rt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.list.min",["kendo.data.min","kendo.popup.min"],n)}(function(){return function(n,t){function g(n,i){return n!==t&&""!==n&&null!==n&&("boolean"===i?n=!!n:"number"===i?n=+n:"string"===i&&(n=""+n)),n}function s(n){return n[n.length-1]}function b(n){var t=n.selectedIndex;return t>-1?n.options[t]:{}}function ni(n,t){var u,f,i,r,h=t.length,o=n.length,e=[],s=[];if(o)for(i=0;i<o;i++){for(u=n[i],f=!1,r=0;r<h;r++)if(u===t[r]){f=!0,e.push({index:i,item:u});break}f||s.push(u)}return{changed:e,unchanged:s}}function st(t){return!(!t||n.isEmptyObject(t))&&!(t.filters&&!t.filters.length)}function d(t,i){var u,r=!1;return t.filters&&(u=n.grep(t.filters,function(n){return r=d(n,i),n.filters?n.filters.length:n.field!=i}),r||t.filters.length===u.length||(r=!0),t.filters=u),r}var l,lt,i=window.kendo,y=i.ui,ot=i._outerWidth,ct=i._outerHeight,e=y.Widget,f=i.keys,o=i.support,ii=i.htmlEncode,ht=i._activeElement,gt=i.data.ObservableArray,a="id",u="change",vt="k-state-focused",w="k-state-hover",pt="k-i-loading",yt="k-hidden",at=".k-group-header",kt="_label",nt="open",tt="close",v="cascade",p="select",ft="selected",et="requestStart",ut="requestEnd",it="width",c=n.extend,r=n.proxy,ti=n.isArray,k=o.browser,rt=k.msie,bt=rt&&k.version<9,dt=/"/g,wt={ComboBox:"DropDownList",DropDownList:"ComboBox"},h=i.ui.DataBoundWidget.extend({init:function(t,i){var f,u=this,o=u.ns;e.fn.init.call(u,t,i),t=u.element,i=u.options,u._isSelect=t.is(p),u._isSelect&&u.element[0].length&&(i.dataSource||(i.dataTextField=i.dataTextField||"text",i.dataValueField=i.dataValueField||"value")),u.ul=n('<ul unselectable="on" class="k-list k-reset"/>').attr({tabIndex:-1,"aria-hidden":!0}),u.list=n("<div class='k-list-container'/>").append(u.ul).on("mousedown"+o,r(u._listMousedown,u)),f=t.attr(a),f&&(u.list.attr(a,f+"-list"),u.ul.attr(a,f+"_listbox")),u._header(),u._noData(),u._footer(),u._accessors(),u._initValue()},options:{valuePrimitive:!1,footerTemplate:"",headerTemplate:"",noDataTemplate:"No data found."},setOptions:function(n){e.fn.setOptions.call(this,n),n&&n.enable!==t&&(n.enabled=n.enable),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData()},focus:function(){this._focused.focus()},readonly:function(n){this._editable({readonly:n===t||n,disable:!1})},enable:function(n){this._editable({readonly:!1,disable:!(n=n===t||n)})},_listOptions:function(t){var u=this,f=u.options,e=f.virtual,o=r(u._listBound,u);return e="object"==typeof e?e:{},t=n.extend({autoBind:!1,selectable:!0,dataSource:u.dataSource,click:r(u._click,u),change:r(u._listChange,u),activate:r(u._activateItem,u),deactivate:r(u._deactivateItem,u),dataBinding:function(){u.trigger("dataBinding")},dataBound:o,height:f.height,dataValueField:f.dataValueField,dataTextField:f.dataTextField,groupTemplate:f.groupTemplate,fixedGroupTemplate:f.fixedGroupTemplate,template:f.template},t,e),t.template||(t.template="#:"+i.expr(t.dataTextField,"data")+"#"),f.$angular&&(t.$angular=f.$angular),t},_initList:function(){var n=this,t=n._listOptions({selectedItemChange:r(n._listChange,n)});n.listView=n.options.virtual?new i.ui.VirtualList(n.ul,t):new i.ui.StaticList(n.ul,t),n.listView.bind("listBound",r(n._listBound,n)),n._setListValue()},_setListValue:function(n){n=n||this.options.value,n!==t&&this.listView.value(n).done(r(this._updateSelectionState,this))},_updateSelectionState:n.noop,_listMousedown:function(n){this.filterInput&&this.filterInput[0]===n.target||n.preventDefault()},_isFilterEnabled:function(){var n=this.options.filter;return n&&"none"!==n},_hideClear:function(){var n=this;n._clear&&this._clear.addClass(yt)},_showClear:function(){var n=this;n._clear&&this._clear.removeClass(yt)},_clearValue:function(){this._clearText(),this._accessor(""),this.listView.value([]),this._isFilterEnabled()&&!this.options.enforceMinLength&&this._filter({word:"",open:!1}),this._change()},_clearText:function(){this.text("")},_clearFilter:function(){this.options.virtual||this.listView.bound(!1),this._filterSource()},_filterSource:function(n,t){var r,o,f=this,h=f.options,i=f.dataSource,u=c({},i.filter()||{}),e=n||u.filters&&u.filters.length&&!n,s=d(u,h.dataTextField);(n||s)&&f.trigger("filtering",{filter:n})||(r={filters:[],logic:"and"},st(n)&&r.filters.push(n),st(u)&&(r.logic===u.logic?r.filters=r.filters.concat(u.filters):r.filters.push(u)),f._cascading&&this.listView.setDSFilter(r),o=c({},{page:e?1:i.page(),pageSize:e?i.options.pageSize:i.pageSize(),sort:i.sort(),filter:i.filter(),group:i.group(),aggregate:i.aggregate()},{filter:r}),i[t?"read":"query"](i._mergeState(o)))},_angularElement:function(n,t){n&&this.angular(t,function(){return{elements:n}})},_noData:function(){var u=n(this.noData),r=this.options.noDataTemplate;return this.angular("cleanup",function(){return{elements:u}}),i.destroy(u),u.remove(),r?(this.noData=n('<div class="k-nodata" style="display:none"><div></div></div>').appendTo(this.list),this.noDataTemplate="function"!=typeof r?i.template(r):r,t):(this.noData=null,t)},_renderNoData:function(){var n=this.noData;n&&(this._angularElement(n,"cleanup"),n.children(":first").html(this.noDataTemplate({instance:this})),this._angularElement(n,"compile"))},_toggleNoData:function(t){n(this.noData).toggle(t)},_toggleHeader:function(n){var t=this.listView.content.prev(at);t.toggle(n)},_footer:function(){var u=n(this.footer),r=this.options.footerTemplate;return this._angularElement(u,"cleanup"),i.destroy(u),u.remove(),r?(this.footer=n('<div class="k-footer"></div>').appendTo(this.list),this.footerTemplate="function"!=typeof r?i.template(r):r,t):(this.footer=null,t)},_renderFooter:function(){var n=this.footer;n&&(this._angularElement(n,"cleanup"),n.html(this.footerTemplate({instance:this})),this._angularElement(n,"compile"))},_header:function(){var f,r=n(this.header),u=this.options.headerTemplate;return this._angularElement(r,"cleanup"),i.destroy(r),r.remove(),u?(f="function"!=typeof u?i.template(u):u,r=n(f({})),this.header=r[0]?r:null,this.list.prepend(r),this._angularElement(this.header,"compile"),t):(this.header=null,t)},_allowOpening:function(){return this.options.noDataTemplate||this.dataSource.flatView().length},_initValue:function(){var t=this,n=t.options.value;null!==n?t.element.val(n):(n=t._accessor(),t.options.value=n),t._old=n},_ignoreCase:function(){var n,i=this,t=i.dataSource.reader.model;t&&t.fields&&(n=t.fields[i.options.dataTextField],n&&n.type&&"string"!==n.type&&(i.options.ignoreCase=!1))},_focus:function(n){return this.listView.focus(n)},_filter:function(n){var i=this,t=i.options,r=t.ignoreCase,f=t.dataTextField,u={value:r?n.word.toLowerCase():n.word,field:f,operator:t.filter,ignoreCase:r};i._open=n.open,i._filterSource(u)},search:function(n){var t=this.options;n="string"==typeof n?n:this._inputValue(),clearTimeout(this._typingTimeout),(!t.enforceMinLength&&!n.length||n.length>=t.minLength)&&(this._state="filter",this._isFilterEnabled()?this._filter({word:n,open:!0}):this._searchByWord(n))},current:function(n){return this._focus(n)},items:function(){return this.ul[0].children},destroy:function(){var n=this,t=n.ns;e.fn.destroy.call(n),n._unbindDataSource(),n.listView.destroy(),n.list.off(t),n.popup.destroy(),n._form&&n._form.off("reset",n._resetHandler)},dataItem:function(i){var r=this;if(i===t)return r.listView.selectedDataItems()[0];if("number"!=typeof i){if(r.options.virtual)return r.dataSource.getByUid(n(i).data("uid"));i=n(r.items()).index(i)}return r.dataSource.flatView()[i]},_activateItem:function(){var n=this.listView.focus();n&&this._focused.add(this.filterInput).attr("aria-activedescendant",n.attr("id"))},_deactivateItem:function(){this._focused.add(this.filterInput).removeAttr("aria-activedescendant")},_accessors:function(){var t=this,f=t.element,n=t.options,e=i.getter,r=f.attr(i.attr("text-field")),u=f.attr(i.attr("value-field"));!n.dataTextField&&r&&(n.dataTextField=r),!n.dataValueField&&u&&(n.dataValueField=u),t._text=e(n.dataTextField),t._value=e(n.dataValueField)},_aria:function(n){var i=this,u=i.options,r=i._focused.add(i.filterInput);u.suggest!==t&&r.attr("aria-autocomplete",u.suggest?"both":"list"),n=n?n+" "+i.ul[0].id:i.ul[0].id,r.attr("aria-owns",n),i.ul.attr("aria-live",i._isFilterEnabled()?"polite":"off"),i._ariaLabel()},_ariaLabel:function(){var o,u=this,t=u._focused,i=u.element,s=i.attr("id"),r=n("label[for='"+s+"']"),e=i.attr("aria-label"),f=i.attr("aria-labelledby");t!==i&&(e?t.attr("aria-label",e):f?t.attr("aria-labelledby",f):r.length&&(o=r.attr("id")||u._generateLabelId(r,s),t.attr("aria-labelledby",o)))},_generateLabelId:function(n,t){var i=t+kt;return n.attr("id",i),i},_blur:function(){var n=this;n._change(),n.close()},_change:function(){var r,n=this,f=n.selectedIndex,e=n.options.value,i=n.value();n._isSelect&&!n.listView.bound()&&e&&(i=e),i!==g(n._old,typeof i)?r=!0:f!==t&&f!==n._oldIndex&&(r=!0),r&&(n._old=i,n._oldIndex=f,n._typing||n.element.trigger(u),n.trigger(u)),n.typing=!1},_data:function(){return this.dataSource.view()},_enable:function(){var n=this,i=n.options,r=n.element.is("[disabled]");i.enable!==t&&(i.enabled=i.enable),!i.enabled||r?n.enable(!1):n.readonly(n.element.is("[readonly]"))},_dataValue:function(n){var i=this._value(n);return i===t&&(i=this._text(n)),i},_offsetHeight:function(){var t=0,i=this.listView.content.prevAll(":visible");return i.each(function(){var i=n(this);t+=ct(i)}),t},_height:function(i){var o,f,s,u=this,e=u.list,r=u.options.height,h=u.popup.visible();if(i||u.options.noDataTemplate){if(f=e.add(e.parent(".k-animation-container")).show(),!e.is(":visible"))return f.hide(),t;r=u.listView.content[0].scrollHeight>r?r:"auto",f.height(r),"auto"!==r&&(o=u._offsetHeight(),s=ct(n(u.footer))||0,r=r-o-s),u.listView.content.height(r),h||f.hide()}return r},_adjustListWidth:function(){var n,r,t=this.list,i=t[0].style.width,u=this.wrapper;if(t.data(it)||!i)return n=window.getComputedStyle?window.getComputedStyle(u[0],null):0,r=parseFloat(n&&n.width)||ot(u),n&&k.msie&&(r+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)),i="border-box"!==t.css("box-sizing")?r-(ot(t)-t.width()):r,t.css({fontFamily:u.css("font-family"),width:this.options.autoWidth?"auto":i,minWidth:i}).data(it,i),!0},_openHandler:function(n){this._adjustListWidth(),this.trigger(nt)?n.preventDefault():(this._focused.attr("aria-expanded",!0),this.ul.attr("aria-hidden",!1))},_closeHandler:function(n){this.trigger(tt)?n.preventDefault():(this._focused.attr("aria-expanded",!1),this.ul.attr("aria-hidden",!0))},_focusItem:function(){var i=this.listView,r=!i.focus(),n=s(i.select());n===t&&this.options.highlightFirst&&r&&(n=0),n!==t?i.focus(n):r&&i.scrollToIndex(0)},_calculateGroupPadding:function(n){var u=this.ul.children(".k-first:first"),t=this.listView.content.prev(at),r=0;t[0]&&"none"!==t[0].style.display&&("auto"!==n&&(r=i.support.scrollbar()),r+=parseFloat(u.css("border-right-width"),10)+parseFloat(u.children(".k-group").css("padding-right"),10),t.css("padding-right",r))},_calculatePopupHeight:function(n){var t=this._height(this.dataSource.flatView().length||n);this._calculateGroupPadding(t)},_resizePopup:function(n){this.options.virtual||(this.popup.element.is(":visible")?this._calculatePopupHeight(n):this.popup.one("open",function(n){return r(function(){this._calculatePopupHeight(n)},this)}.call(this,n)))},_popup:function(){var n=this;n.popup=new y.Popup(n.list,c({},n.options.popup,{anchor:n.wrapper,open:r(n._openHandler,n),close:r(n._closeHandler,n),animation:n.options.animation,isRtl:o.isRtl(n.wrapper)}))},_makeUnselectable:function(){bt&&this.list.find("*").not(".k-textbox").attr("unselectable","on")},_toggleHover:function(t){n(t.currentTarget).toggleClass(w,"mouseenter"===t.type)},_toggle:function(n,i){var r=this,u=o.mobileOS&&(o.touch||o.MSPointers||o.pointers);n=n!==t?n:!r.popup.visible(),i||u||r._focused[0]===ht()||(r._prevent=!0,r._focused.focus(),r._prevent=!1),r[n?nt:tt]()},_triggerCascade:function(){var n=this;n._cascadeTriggered&&n._old===n.value()&&n._oldIndex===n.selectedIndex||(n._cascadeTriggered=!0,n.trigger(v,{userTriggered:n._userTriggered}))},_triggerChange:function(){this._valueBeforeCascade!==this.value()&&this.trigger(u)},_unbindDataSource:function(){var n=this;n.dataSource.unbind(et,n._requestStartHandler).unbind(ut,n._requestEndHandler).unbind("error",n._errorHandler)},requireValueMapper:function(n,t){var i=(n.value instanceof Array?n.value.length:n.value)||(t instanceof Array?t.length:t);if(i&&n.virtual&&"function"!=typeof n.virtual.valueMapper)throw Error("ValueMapper is not provided while the value is being set. See http://docs.telerik.com/kendo-ui/controls/editors/combobox/virtualization#the-valuemapper-function");}});c(h,{inArray:function(n,t){var i,u,r=t.children;if(!n||n.parentNode!==t)return-1;for(i=0,u=r.length;i<u;i++)if(n===r[i])return i;return-1},unifyType:g}),i.ui.List=h,y.Select=h.extend({init:function(n,t){h.fn.init.call(this,n,t),this._initial=this.element.val()},setDataSource:function(n){var i,t=this;t.options.dataSource=n,t._dataSource(),t.listView.bound()&&(t._initialIndex=null),t.listView.setDataSource(t.dataSource),t.options.autoBind&&t.dataSource.fetch(),i=t._parentWidget(),i&&t._cascadeSelect(i)},close:function(){this.popup.close()},select:function(n){var i=this;return n===t?i.selectedIndex:i._select(n).done(function(){i._old=i._accessor(),i._oldIndex=i.selectedIndex})},_accessor:function(n,t){return this[this._isSelect?"_accessorSelect":"_accessorInput"](n,t)},_accessorInput:function(n){var i=this.element[0];return n===t?i.value:(null===n&&(n=""),i.value=n,t)},_accessorSelect:function(n,i){var u,r=this.element[0];return n===t?b(r).value||"":(b(r).selected=!1,i===t&&(i=-1),u=null!==n&&""!==n,u&&i==-1?this._custom(n):n?r.value=n:r.selectedIndex=i,t)},_custom:function(t){var r=this,u=r.element,i=r._customOption;i||(i=n("<option/>"),r._customOption=i,u.append(i)),i.text(t),i[0].selected=!0},_hideBusy:function(){var n=this;clearTimeout(n._busy),n._arrowIcon.removeClass(pt),n._focused.attr("aria-busy",!1),n._busy=null,n._showClear()},_showBusy:function(){var n=this;n._request=!0,n._busy||(n._busy=setTimeout(function(){n._arrowIcon&&(n._focused.attr("aria-busy",!0),n._arrowIcon.addClass(pt),n._hideClear())},100))},_requestEnd:function(){this._request=!1,this._hideBusy()},_dataSource:function(){var e,t=this,o=t.element,f=t.options,u=f.dataSource||{};u=n.isArray(u)?{data:u}:u,t._isSelect&&(e=o[0].selectedIndex,e>-1&&(f.index=e),u.select=o,u.fields=[{field:f.dataTextField},{field:f.dataValueField}]),t.dataSource?t._unbindDataSource():(t._requestStartHandler=r(t._showBusy,t),t._requestEndHandler=r(t._requestEnd,t),t._errorHandler=r(t._hideBusy,t)),t.dataSource=i.data.DataSource.create(u).bind(et,t._requestStartHandler).bind(ut,t._requestEndHandler).bind("error",t._errorHandler)},_firstItem:function(){this.listView.focusFirst()},_lastItem:function(){this.listView.focusLast()},_nextItem:function(){this.listView.focusNext()},_prevItem:function(){this.listView.focusPrev()},_move:function(n){var r,c,e,v,a,y,i=this,s=i.listView,o=n.keyCode,l=o===f.DOWN;if(o===f.UP||l){if(n.altKey)i.toggle(l);else{if(!s.bound())return i._fetch||(i.dataSource.one(u,function(){i._fetch=!1,i._move(n)}),i._fetch=!0,i._filterSource()),n.preventDefault(),!0;if(e=i._focus(),i._fetch||e&&!e.hasClass("k-state-selected")||(l?(i._nextItem(),i._focus()||i._lastItem()):(i._prevItem(),i._focus()||i._firstItem())),r=s.dataItemByIndex(s.getElementIndex(i._focus())),i.trigger(p,{dataItem:r,item:i._focus()}))return i._focus(e),t;i._select(i._focus(),!0).done(function(){i.popup.visible()||i._blur()})}n.preventDefault(),c=!0}else if(o===f.ENTER||o===f.TAB){if(i.popup.visible()&&n.preventDefault(),e=i._focus(),r=i.dataItem(),i.popup.visible()||r&&i.text()===i._text(r)||(e=null),v=i.filterInput&&i.filterInput[0]===ht(),e){if(r=s.dataItemByIndex(s.getElementIndex(e)),a=!0,r&&(a=i._value(r)!==h.unifyType(i.value(),typeof i._value(r))),a&&i.trigger(p,{dataItem:r,item:e}))return;i._select(e)}else i.input&&(i._accessor(i.input.val()),i.listView.value(i.input.val()));i._focusElement&&i._focusElement(i.wrapper),v&&o===f.TAB?i.wrapper.focusout():i._blur(),i.close(),c=!0}else o===f.ESC?(i.popup.visible()&&n.preventDefault(),i.close(),c=!0):!i.popup.visible()||o!==f.PAGEDOWN&&o!==f.PAGEUP||(n.preventDefault(),y=o===f.PAGEDOWN?1:-1,s.scrollWith(y*s.screenHeight()),c=!0);return c},_fetchData:function(){var n=this,t=!!n.dataSource.view().length;n._request||n.options.cascadeFrom||n.listView.bound()||n._fetch||t||(n._fetch=!0,n.dataSource.fetch().done(function(){n._fetch=!1}))},_options:function(n,i,r){var u,c,h,f,l=this,a=l.element,e=a[0],v=n.length,s="",o=0;for(i&&(s=i);o<v;o++)u="<option",c=n[o],h=l._text(c),f=l._value(c),f!==t&&(f+="",f.indexOf('"')!==-1&&(f=f.replace(dt,"&quot;")),u+=' value="'+f+'"'),u+=">",h!==t&&(u+=ii(h)),u+="</option>",s+=u;a.html(s),r!==t&&(e.value=r,e.value&&!r&&(e.selectedIndex=-1)),e.selectedIndex!==-1&&(u=b(e),u&&u.setAttribute(ft,ft))},_reset:function(){var t=this,u=t.element,r=u.attr("form"),i=r?n("#"+r):u.closest("form");i[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=i.on("reset",t._resetHandler))},_parentWidget:function(){var i,t,r=this.options.name;if(this.options.cascadeFrom)return i=n("#"+this.options.cascadeFrom),t=i.data("kendo"+r),t||(t=i.data("kendo"+wt[r])),t},_cascade:function(){var t,n=this,i=n.options,u=i.cascadeFrom;if(u){if(t=n._parentWidget(),!t)return;n._cascadeHandlerProxy=r(n._cascadeHandler,n),n._cascadeFilterRequests=[],i.autoBind=!1,t.bind("set",function(){n.one("set",function(t){n._selectedValue=t.value})}),t.first(v,n._cascadeHandlerProxy),t.listView.bound()?(n._toggleCascadeOnFocus(),n._cascadeSelect(t)):(t.one("dataBound",function(){n._toggleCascadeOnFocus()}),t.value()||n.enable(!1))}},_toggleCascadeOnFocus:function(){var t=this,n=t._parentWidget(),i=rt?"blur":"focusout";n._focused.add(n.filterInput).bind("focus",function(){n.unbind(v,t._cascadeHandlerProxy),n.first(u,t._cascadeHandlerProxy)}),n._focused.add(n.filterInput).bind(i,function(){n.unbind(u,t._cascadeHandlerProxy),n.first(v,t._cascadeHandlerProxy)})},_cascadeHandler:function(n){var t=this._parentWidget(),i=this.value();this._userTriggered=n.userTriggered,this.listView.bound()&&this._clearSelection(t,!0),this._cascadeSelect(t,i)},_cascadeChange:function(n){var t=this,i=t._accessor()||t._selectedValue;t._cascadeFilterRequests.length||(t._selectedValue=null),t._userTriggered?t._clearSelection(n,!0):i?(i!==t.listView.value()[0]&&t.value(i),t.dataSource.view()[0]&&t.selectedIndex!==-1||t._clearSelection(n,!0)):t.dataSource.flatView().length&&t.select(t.options.index),t.enable(),t._triggerCascade(),t._triggerChange(),t._userTriggered=!1},_cascadeSelect:function(n,i){var o,f,r=this,s=n.dataItem(),u=s?n._value(s):null,e=r.options.cascadeFromField||n.options.dataValueField;r._valueBeforeCascade=i!==t?i:r.value(),u||0===u?(o=r.dataSource.filter()||{},d(o,e),f=function(){var t=r._cascadeFilterRequests.shift();t&&r.unbind("dataBound",t),t=r._cascadeFilterRequests[0],t&&r.first("dataBound",t),r._cascadeChange(n)},r._cascadeFilterRequests.push(f),1===r._cascadeFilterRequests.length&&r.first("dataBound",f),r._cascading=!0,r._filterSource({field:e,operator:"eq",value:u}),r._cascading=!1):(r.enable(!1),r._clearSelection(n),r._triggerCascade(),r._triggerChange(),r._userTriggered=!1)}}),l=".StaticList",lt=i.ui.DataBoundWidget.extend({init:function(t,u){e.fn.init.call(this,t,u),this.element.attr("role","listbox").on("click"+l,"li",r(this._click,this)).on("mouseenter"+l,"li",function(){n(this).addClass(w)}).on("mouseleave"+l,"li",function(){n(this).removeClass(w)}),this.content=this.element.wrap("<div class='k-list-scroller' unselectable='on'></div>").parent(),this.header=this.content.before('<div class="k-group-header" style="display:none"></div>').prev(),this.bound(!1),this._optionID=i.guid(),this._selectedIndices=[],this._view=[],this._dataItems=[],this._values=[];var f=this.options.value;f&&(this._values=n.isArray(f)?f.slice(0):[f]),this._getter(),this._templates(),this.setDataSource(this.options.dataSource),this._onScroll=r(function(){var n=this;clearTimeout(n._scrollId),n._scrollId=setTimeout(function(){n._renderHeader()},50)},this)},options:{name:"StaticList",dataValueField:null,valuePrimitive:!1,selectable:!0,template:null,groupTemplate:null,fixedGroupTemplate:null},events:["click",u,"activate","deactivate","dataBinding","dataBound","selectedItemChange"],setDataSource:function(t){var o,f=this,e=t||{};e=n.isArray(e)?{data:e}:e,e=i.data.DataSource.create(e),f.dataSource?(f.dataSource.unbind(u,f._refreshHandler),o=f.value(),f.value([]),f.bound(!1),f.value(o)):f._refreshHandler=r(f.refresh,f),f.setDSFilter(e.filter()),f.dataSource=e.bind(u,f._refreshHandler),f._fixedHeader()},skip:function(){return this.dataSource.skip()},setOptions:function(n){e.fn.setOptions.call(this,n),this._getter(),this._templates(),this._render()},destroy:function(){this.element.off(l),this._refreshHandler&&this.dataSource.unbind(u,this._refreshHandler),clearTimeout(this._scrollId),e.fn.destroy.call(this)},dataItemByIndex:function(n){return this.dataSource.flatView()[n]},screenHeight:function(){return this.content[0].clientHeight},scrollToIndex:function(n){var t=this.element[0].children[n];t&&this.scroll(t)},scrollWith:function(n){this.content.scrollTop(this.content.scrollTop()+n)},scroll:function(n){if(n){n[0]&&(n=n[0]);var r=this.content[0],i=n.offsetTop,e=n.offsetHeight,t=r.scrollTop,u=r.clientHeight,f=i+e;t>i?t=i:f>t+u&&(t=f-u),r.scrollTop=t}},selectedDataItems:function(n){return n===t?this._dataItems.slice():(this._dataItems=n,this._values=this._getValues(n),t)},_getValues:function(t){var i=this._valueGetter;return n.map(t,function(n){return i(n)})},focusNext:function(){var n=this.focus();n=n?n.next():0,this.focus(n)},focusPrev:function(){var n=this.focus();n=n?n.prev():this.element[0].children.length-1,this.focus(n)},focusFirst:function(){this.focus(this.element[0].children[0])},focusLast:function(){this.focus(s(this.element[0].children))},focus:function(i){var u,r=this,f=r._optionID;return i===t?r._current:(i=s(r._get(i)),i=n(this.element[0].children[i]),r._current&&(r._current.removeClass(vt).removeAttr("aria-selected").removeAttr(a),r.trigger("deactivate")),u=!!i[0],u&&(i.addClass(vt),r.scroll(i),i.attr("id",f)),r._current=u?i:null,r.trigger("activate"),t)},focusIndex:function(){return this.focus()?this.focus().index():t},skipUpdate:function(n){this._skipUpdate=n},select:function(i){var l,f,c,r=this,v=r.options.selectable,e="multiple"!==v&&v!==!1,o=r._selectedIndices,h=[],a=[];return i===t?o.slice():(i=r._get(i),1===i.length&&i[0]===-1&&(i=[]),f=n.Deferred().resolve(),c=r.isFiltered(),c&&!e&&r._deselectFiltered(i)?f:e&&!c&&n.inArray(s(i),o)!==-1?(r._dataItems.length&&r._view.length&&(r._dataItems=[r._view[o[0]].item]),f):(l=r._deselect(i),a=l.removed,i=l.indices,i.length&&(e&&(i=[s(i)]),h=r._select(i)),(h.length||a.length)&&(r._valueComparer=null,r.trigger(u,{added:h,removed:a})),f))},removeAt:function(n){return this._selectedIndices.splice(n,1),this._values.splice(n,1),this._valueComparer=null,{position:n,dataItem:this._dataItems.splice(n,1)[0]}},setValue:function(t){t=n.isArray(t)||t instanceof gt?t.slice(0):[t],this._values=t,this._valueComparer=null},value:function(i){var f,r=this,u=r._valueDeferred;return i===t?r._values.slice():(r.setValue(i),u&&"resolved"!==u.state()||(r._valueDeferred=u=n.Deferred()),r.bound()&&(f=r._valueIndices(r._values),"multiple"===r.options.selectable&&r.select(-1),r.select(f),u.resolve()),r._skipUpdate=!1,u)},items:function(){return this.element.children(".k-item")},_click:function(t){t.isDefaultPrevented()||this.trigger("click",{item:n(t.currentTarget)})||this.select(t.currentTarget)},_valueExpr:function(n,t){var e,f,i=this,r=0,u=[];if(!i._valueComparer||i._valueType!==n){for(i._valueType=n;r<t.length;r++)u.push(g(t[r],n));e="for (var idx = 0; idx < "+u.length+"; idx++) { if (current === values[idx]) {   return idx; }} return -1;",f=Function("current","values",e),i._valueComparer=function(n){return f(n,u)}}return i._valueComparer},_dataItemPosition:function(n,t){var i=this._valueGetter(n),r=this._valueExpr(typeof i,t);return r(i)},_getter:function(){this._valueGetter=i.getter(this.options.dataValueField)},_deselect:function(t){var r,e,s,u=this,h=u.element[0].children,l=u.options.selectable,f=u._selectedIndices,a=u._dataItems,v=u._values,o=[],i=0,c=0;if(t=t.slice(),l!==!0&&t.length){if("multiple"===l)for(;i<t.length;i++)if(e=t[i],n(h[e]).hasClass("k-state-selected"))for(r=0;r<f.length;r++)if(s=f[r],s===e){n(h[s]).removeClass("k-state-selected"),o.push({position:r+c,dataItem:a.splice(r,1)[0]}),f.splice(r,1),t.splice(i,1),v.splice(r,1),c+=1,i-=1,r-=1;break}}else{for(;i<f.length;i++)n(h[f[i]]).removeClass("k-state-selected"),o.push({position:i,dataItem:a[i]});u._values=[],u._dataItems=[],u._selectedIndices=[]}return{indices:t,removed:o}},_deselectFiltered:function(t){for(var o,e,f,s=this.element[0].children,i=[],r=0;r<t.length;r++)e=t[r],o=this._view[e].item,f=this._dataItemPosition(o,this._values),f>-1&&(i.push(this.removeAt(f)),n(s[e]).removeClass("k-state-selected"));return!!i.length&&(this.trigger(u,{added:[],removed:i}),!0)},_select:function(t){var r,u,i=this,o=i.element[0].children,h=i._view,e=[],f=0;for(s(t)!==-1&&i.focus(t);f<t.length;f++)u=t[f],r=h[u],u!==-1&&r&&(r=r.item,i._selectedIndices.push(u),i._dataItems.push(r),i._values.push(i._valueGetter(r)),n(o[u]).addClass("k-state-selected").attr("aria-selected",!0),e.push({dataItem:r}));return e},getElementIndex:function(t){return n(t).data("offset-index")},_get:function(n){return"number"==typeof n?n=[n]:ti(n)||(n=this.getElementIndex(n),n=[n!==t?n:-1]),n},_template:function(){var r=this,t=r.options,n=t.template;return n?(n=i.template(n),n=function(t){return'<li tabindex="-1" role="option" unselectable="on" class="k-item">'+n(t)+"</li>"}):n=i.template('<li tabindex="-1" role="option" unselectable="on" class="k-item">${'+i.expr(t.dataTextField,"data")+"}</li>",{useWithBlock:!1}),n},_templates:function(){var t,r,u=this.options,n={template:u.template,groupTemplate:u.groupTemplate,fixedGroupTemplate:u.fixedGroupTemplate};for(r in n)t=n[r],t&&"function"!=typeof t&&(n[r]=i.template(t));this.templates=n},_normalizeIndices:function(n){for(var r=[],i=0;i<n.length;i++)n[i]!==t&&r.push(n[i]);return r},_valueIndices:function(n,t){var r,u=this._view,i=0;if(t=t?t.slice():[],!n.length)return[];for(;i<u.length;i++)r=this._dataItemPosition(u[i].item,n),r!==-1&&(t[r]=i);return this._normalizeIndices(t)},_firstVisibleItem:function(){for(var r=this.element[0],e=this.content[0],i=e.scrollTop,u=n(r.children[0]).height(),o=Math.floor(i/u)||0,t=r.children[o]||r.lastChild,f=t.offsetTop<i;t;)if(f){if(t.offsetTop+u>i||!t.nextSibling)break;t=t.nextSibling}else{if(t.offsetTop<=i||!t.previousSibling)break;t=t.previousSibling}return this._view[n(t).data("offset-index")]},_fixedHeader:function(){this.isGrouped()&&this.templates.fixedGroupTemplate?(this.header.show(),this.content.scroll(this._onScroll)):(this.header.hide(),this.content.off("scroll",this._onScroll))},_renderHeader:function(){var n,t=this.templates.fixedGroupTemplate;t&&(n=this._firstVisibleItem(),n&&this.header.html(t(n.group)))},_renderItem:function(n){var t='<li tabindex="-1" role="option" unselectable="on" class="k-item',u=n.item,i=0!==n.index,r=n.selected;return i&&n.newGroup&&(t+=" k-first"),r&&(t+=" k-state-selected"),t+='"'+(r?' aria-selected="true"':"")+' data-offset-index="'+n.index+'">',t+=this.templates.template(u),i&&n.newGroup&&(t+='<div class="k-group">'+this.templates.groupTemplate(n.group)+"</div>"),t+"</li>"},_render:function(){var t,i,o,r,s="",n=0,e=0,f=[],u=this.dataSource.view(),c=this.value(),h=this.isGrouped();if(h)for(n=0;n<u.length;n++)for(i=u[n],o=!0,r=0;r<i.items.length;r++)t={selected:this._selected(i.items[r],c),item:i.items[r],group:i.value,newGroup:o,index:e},f[e]=t,e+=1,s+=this._renderItem(t),o=!1;else for(n=0;n<u.length;n++)t={selected:this._selected(u[n],c),item:u[n],index:n},f[n]=t,s+=this._renderItem(t);this._view=f,this.element[0].innerHTML=s,h&&f.length&&this._renderHeader()},_selected:function(n,t){var i=!this.isFiltered()||"multiple"===this.options.selectable;return i&&this._dataItemPosition(n,t)!==-1},setDSFilter:function(n){this._lastDSFilter=c({},n)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!i.data.Query.compareFilters(this.dataSource.filter(),this._lastDSFilter)},refresh:function(n){var r,t=this,i=n&&n.action,f=t.options.skipUpdateOnBind,u="itemchange"===i;t.trigger("dataBinding"),t._angularItems("cleanup"),t._fixedHeader(),t._render(),t.bound(!0),u||"remove"===i?(r=ni(t._dataItems,n.items),r.changed.length&&(u?t.trigger("selectedItemChange",{items:r.changed}):t.value(t._getValues(r.unchanged)))):t.isFiltered()||t._skipUpdate?(t.focus(0),t._skipUpdate&&(t._skipUpdate=!1,t._selectedIndices=t._valueIndices(t._values,t._selectedIndices))):f||i&&"add"!==i||t.value(t._values),t._valueDeferred&&t._valueDeferred.resolve(),t._angularItems("compile"),t.trigger("dataBound")},bound:function(n){return n===t?this._bound:(this._bound=n,t)},isGrouped:function(){return(this.dataSource.group()||[]).length}}),y.plugin(lt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.calendar.min",["kendo.core.min"],n)}(function(){return function(n,t){function ii(n,t,i,r){var f,u=n.getFullYear(),o=t.getFullYear(),e=i.getFullYear();return u-=u%r,f=u+(r-1),u<o&&(u=o),f>e&&(f=e),u+"-"+f}function g(n){var f,u=0,w=n.min,y=n.max,t=n.start,k=n.setter,h=n.build,e=n.weekNumberBuild,b=n.cells||12,s=n.isWeekColumnVisible,a=n.perRow||4,o=n.weekNumber||kr,l=n.content||wr,c=n.empty||pr,r=n.html||'<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><tbody><tr role="row">';for(s&&(r+=o(e(t)));u<b;u++)u>0&&u%a==0&&(r+='</tr><tr role="row">',s&&(r+=o(e(t)))),t=new i(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),p(t,0),f=h(t,u,n.disableDates),r+=v(t,w,y)?l(f):c(f),k(t,1);return r+"</tr></tbody></table>"}function vt(n,t,i){var f=n.getFullYear(),r=t.getFullYear(),e=r,u=0;return i&&(r-=r%i,e=r-r%i+i-1),f>e?u=1:f<r&&(u=-1),u}function a(){var n=new i;return new i(n.getFullYear(),n.getMonth(),n.getDate())}function y(n,t,r){var u=a();return n&&(u=new i(+n)),t>u?u=new i(+t):r<u&&(u=new i(+r)),u}function v(n,t,i){return+n>=+t&&+n<=+i}function fi(n,t){return n.slice(t).concat(n.slice(0,t))}function ri(n,t,r){t=t instanceof i?t.getFullYear():n.getFullYear()+r*t,n.setFullYear(t)}function wt(t){var i=n(this).hasClass("k-state-disabled");i||n(this).toggleClass(vr,tr.indexOf(t.type)>-1||t.type==ui)}function or(n){n.preventDefault()}function ht(n){return vi(n).calendars.standard}function ct(n){var i=o[n.start],r=o[n.depth],u=vi(n.culture);n.format=cr(n.format||u.calendars.standard.patterns.d),isNaN(i)&&(i=0,n.start=w),(r===t||r>i)&&(n.depth=w),null===n.dates&&(n.dates=[])}function yi(n){br&&n.find("*").attr("unselectable","on")}function wi(n,t){n.addClass("k-"+t)}function er(n,t){for(var i=0,r=t.length;i<r;i++)if(n===+t[i])return!0;return!1}function hr(n,t){return!!n&&n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()&&n.getDate()===t.getDate()}function sr(n,t){return!!n&&n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()}function ot(t){return r.isFunction(t)?t:n.isArray(t)?ir(t):n.noop}function rr(n){for(var i=[],t=0;t<n.length;t++)i.push(n[t].setHours(0,0,0,0));return i}function ir(t){var f,h,r,s,e,u=[],c=["su","mo","tu","we","th","fr","sa"],o="if (found) { return true } else {return false}";if(t[0]instanceof i)u=rr(t),f="var found = date && $.inArray(date.setHours(0, 0, 0, 0),["+u+"]) > -1;"+o;else{for(r=0;r<t.length;r++)s=t[r].slice(0,2).toLowerCase(),e=n.inArray(s,c),e>-1&&u.push(e);f="var found = date && $.inArray(date.getDay(),["+u+"]) > -1;"+o}return h=Function("date",f)}function lt(n,t){return n instanceof Date&&t instanceof Date&&(n=n.getTime(),t=t.getTime()),n===t}var f,r=window.kendo,at=r.support,si=r.ui,nt=si.Widget,e=r.keys,it=r.parseDate,p=r.date.adjustDST,fr=r.date.getDate,ur=r.date.weekInYear,cr=r._extractFormat,c=r.template,vi=r.getCulture,ai=r.support.transitions,oi=ai?ai.css+"transform-origin":"",wr=c('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>',{useWithBlock:!1}),pr=c('<td role="gridcell">&nbsp;</td>',{useWithBlock:!1}),kr=c('<td class="k-alt">#= data.weekNumber #</td>',{useWithBlock:!1}),bi=r.support.browser,br=bi.msie&&bi.version<9,ar=r._outerHeight,lr=r._outerWidth,u=".kendoCalendar",h="click"+u,yr="keydown"+u,tt="id",bt="min",kt="left",ut="slideIn",w="month",pt="century",et="change",yt="navigate",ft="value",vr="k-state-hover",s="k-state-disabled",l="k-state-focused",d="k-other-month",gt=' class="'+d+'"',ni="k-nav-today",ti="td:has(.k-link)",dt="blur"+u,ui="focus",pi=ui+u,tr=at.touch?"touchstart":"mouseenter",di=at.touch?"touchstart"+u:"mouseenter"+u,ki=at.touch?"touchend"+u+" touchmove"+u:"mouseleave"+u,gi=6e4,hi=864e5,k="_prevArrow",b="_nextArrow",rt="aria-disabled",li="aria-selected",st="aria-label",ci=n.proxy,ei=n.extend,i=Date,o={month:0,year:1,decade:2,century:3},nr=nt.extend({init:function(t,f){var c,v,e=this;nt.fn.init.call(e,t,f),t=e.wrapper=e.element,f=e.options,f.url=window.unescape(f.url),e.options.disableDates=ot(e.options.disableDates),e._templates(),e._header(),e._footer(e.footer),v=t.addClass("k-widget k-calendar "+(f.weekNumber?" k-week-number":"")).on(di+" "+ki,ti,wt).on(yr,"table.k-content",ci(e._move,e)).on(h,ti,function(t){var i=t.currentTarget.firstChild,r=e._toDateObject(i);i.href.indexOf("#")!=-1&&t.preventDefault(),"month"==e._view.name&&e.options.disableDates(r)||e._click(n(i))}).on("mouseup"+u,"table.k-content, .k-footer",function(){e._focusView(e.options.focusOnNav!==!1)}).attr(tt),v&&(e._cellID=v+"_cell_selected"),ct(f),c=it(f.value,f.format,f.culture),e._index=o[f.start],e._current=new i(+y(c,f.min,f.max)),e._addClassProxy=function(){if(e._active=!0,e._cell.hasClass(s)){var n=e._view.toDateString(a());e._cell=e._cellByDate(n)}e._cell.addClass(l)},e._removeClassProxy=function(){e._active=!1,e._cell.removeClass(l)},e.value(c),r.notify(e)},options:{name:"Calendar",value:null,min:new i(1900,0,1),max:new i(2099,11,31),dates:[],url:"",culture:"",footer:"",format:"",month:{},weekNumber:!1,start:w,depth:w,animation:{horizontal:{effects:ut,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}},messages:{weekColumnHeader:""}},events:[et,yt],setOptions:function(n){var t=this;ct(n),n.disableDates=ot(n.disableDates),nt.fn.setOptions.call(t,n),t._templates(),t._footer(t.footer),t._index=o[t.options.start],t.navigate()},destroy:function(){var n=this,t=n._today;n.element.off(u),n._title.off(u),n[k].off(u),n[b].off(u),r.destroy(n._table),t&&r.destroy(t.off(u)),nt.fn.destroy.call(n)},current:function(){return this._current},view:function(){return this._view},focus:function(n){n=n||this._table,this._bindTable(n),n.focus()},min:function(n){return this._option(bt,n)},max:function(n){return this._option("max",n)},navigateToPast:function(){this._navigate(k,-1)},navigateToFuture:function(){this._navigate(b,1)},navigateUp:function(){var n=this,t=n._index;n._title.hasClass(s)||n.navigate(n._current,++t)},navigateDown:function(n){var i=this,r=i._index,u=i.options.depth;if(n)return r===o[u]?(lt(i._value,i._current)&&lt(i._value,n)||(i.value(n),i.trigger(et)),t):(i.navigate(n,--r),t)},navigate:function(r,u){var e,h,ut,d,w,tt,c,nt,g,ft,ot,st,p,v,it,a,et;u=isNaN(u)?o[u]:u,e=this,h=e.options,ut=h.culture,d=h.min,w=h.max,tt=e._title,c=e._table,nt=e._oldTable,g=e._value,ft=e._current,ot=r&&+r>+ft,st=u!==t&&u!==e._index,r||(r=ft),e._current=r=new i(+y(r,d,w)),u===t?u=e._index:e._index=u,e._view=v=f.views[u],it=v.compare,a=u===o[pt],tt.toggleClass(s,a).attr(rt,a),a=it(r,d)<1,e[k].toggleClass(s,a).attr(rt,a),a=it(r,w)>-1,e[b].toggleClass(s,a).attr(rt,a),c&&nt&&nt.data("animating")&&(nt.kendoStop(!0,!0),c.kendoStop(!0,!0)),e._oldTable=c,c&&!e._changeView||(tt.html(v.title(r,d,w,ut)),e._table=p=n(v.content(ei({min:d,max:w,date:r,url:h.url,dates:h.dates,format:h.format,culture:ut,disableDates:h.disableDates,isWeekColumnVisible:h.weekNumber,messages:h.messages},e[v.name]))),wi(p,v.name),yi(p),et=c&&c.data("start")===p.data("start"),e._animate({from:c,to:p,vertical:st,future:ot,replace:et}),e.trigger(yt),e._focus(r)),u===o[h.depth]&&g&&!e.options.disableDates(g)&&e._class("k-state-selected",g),e._class(l,r),!c&&e._cell&&e._cell.removeClass(l),e._changeView=!0},value:function(n){var r=this,f=r._view,u=r.options,s=r._view,o=u.min,e=u.max;return n===t?r._value:(null===n&&(r._current=new Date(r._current.getFullYear(),r._current.getMonth(),r._current.getDate())),n=it(n,u.format,u.culture),null!==n&&(n=new i(+n),v(n,o,e)||(n=null)),null!==n&&r.options.disableDates(n)?r._value===t&&(r._value=null):r._value=n,s&&null===n&&r._cell?r._cell.removeClass("k-state-selected"):(r._changeView=!n||f&&0!==f.compare(n,r._current),r.navigate(n)),t)},_move:function(t){var c,o,a,l,u=this,b=u.options,f=t.keyCode,w=u._view,k=u._index,p=u.options.min,g=u.options.max,s=new i(+u._current),h=r.support.isRtl(u.wrapper),d=u.options.disableDates;return t.target===u._table[0]&&(u._active=!0),t.ctrlKey?f==e.RIGHT&&!h||f==e.LEFT&&h?(u.navigateToFuture(),o=!0):f==e.LEFT&&!h||f==e.RIGHT&&h?(u.navigateToPast(),o=!0):f==e.UP?(u.navigateUp(),o=!0):f==e.DOWN&&(u._click(n(u._cell[0].firstChild)),o=!0):(f==e.RIGHT&&!h||f==e.LEFT&&h?(c=1,o=!0):f==e.LEFT&&!h||f==e.RIGHT&&h?(c=-1,o=!0):f==e.UP?(c=0===k?-7:-4,o=!0):f==e.DOWN?(c=0===k?7:4,o=!0):f==e.ENTER?(u._click(n(u._cell[0].firstChild)),o=!0):f==e.HOME||f==e.END?(a=f==e.HOME?"first":"last",l=w[a](s),s=new i(l.getFullYear(),l.getMonth(),l.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()),o=!0):f==e.PAGEUP?(o=!0,u.navigateToPast()):f==e.PAGEDOWN&&(o=!0,u.navigateToFuture()),(c||a)&&(a||w.setDate(s,c),d(s)&&(s=u._nextNavigatable(s,c)),p=fr(p),v(s,p,g)&&u._focus(y(s,b.min,b.max)))),o&&t.preventDefault(),u._current},_nextNavigatable:function(n,t){var i=this,f=!0,u=i._view,e=i.options.min,s=i.options.max,o=i.options.disableDates,r=new Date(n.getTime());for(u.setDate(r,-t);f;){if(u.setDate(n,t),!v(n,e,s)){n=r;break}f=o(n)}return n},_animate:function(n){var i=this,t=n.from,r=n.to,f=i._active;t?t.parent().data("animating")?(t.off(u),t.parent().kendoStop(!0,!0).remove(),t.remove(),r.insertAfter(i.element[0].firstChild),i._focusView(f)):!t.is(":visible")||i.options.animation===!1||n.replace?(r.insertAfter(t),t.off(u).remove(),i._focusView(f)):i[n.vertical?"_vertical":"_horizontal"](t,r,n.future):(r.insertAfter(i.element[0].firstChild),i._bindTable(r))},_horizontal:function(n,t,i){var r=this,o=r._active,e=r.options.animation.horizontal,s=e.effects,f=lr(n);s&&s.indexOf(ut)!=-1&&(n.add(t).css({width:f}),n.wrap("<div/>"),r._focusView(o,n),n.parent().css({position:"relative",width:2*f,float:kt,"margin-left":i?0:-f}),t[i?"insertAfter":"insertBefore"](n),ei(e,{effects:ut+":"+(i?"right":kt),complete:function(){n.off(u).remove(),r._oldTable=null,t.unwrap(),r._focusView(o)}}),n.parent().kendoStop(!0,!0).kendoAnimate(e))},_vertical:function(n,t){var f,r,i=this,o=i.options.animation.vertical,e=o.effects,s=i._active;e&&e.indexOf("zoom")!=-1&&(t.css({position:"absolute",top:ar(n.prev()),left:0}).insertBefore(n),oi&&(f=i._cellByDate(i._view.toDateString(i._current)),r=f.position(),r=r.left+parseInt(f.width()/2,10)+"px "+(r.top+parseInt(f.height()/2,10)+"px"),t.css(oi,r)),n.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){n.off(u).remove(),i._oldTable=null,t.css({position:"static",top:0,left:0}),i._focusView(s)}}),t.kendoStop(!0,!0).kendoAnimate(o))},_cellByDate:function(t){return this._table.find("td:not(."+d+")").filter(function(){return n(this.firstChild).attr(r.attr(ft))===t})},_class:function(t,i){var o,u=this,e=u._cellID,f=u._cell,s=u._view.toDateString(i);f&&f.removeAttr(li).removeAttr(st).removeAttr(tt),i&&"month"==u._view.name&&(o=u.options.disableDates(i)),f=u._table.find("td:not(."+d+")").removeClass(t).filter(function(){return n(this.firstChild).attr(r.attr(ft))===s}).attr(li,!0),(t===l&&!u._active&&u.options.focusOnNav!==!1||o)&&(t=""),f.addClass(t),f[0]&&(u._cell=f),e&&(f.attr(tt,e),u._table.removeAttr("aria-activedescendant").attr("aria-activedescendant",e))},_bindTable:function(n){n.on(pi,this._addClassProxy).on(dt,this._removeClassProxy)},_click:function(n){var t=this,r=t.options,u=new Date(+t._current),i=t._toDateObject(n);p(i,0),"month"==t._view.name&&t.options.disableDates(i)&&(i=t._value),t._view.setDate(u,i),t.navigateDown(y(u,r.min,r.max))},_focus:function(n){var t=this,i=t._view;0!==i.compare(n,t._current)?t.navigate(n):(t._current=n,t._class(l,n))},_focusView:function(n,t){n&&this.focus(t)},_footer:function(i){var u=this,e=a(),o=u.element,f=o.find(".k-footer");return i?(f[0]||(f=n('<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>').appendTo(o)),u._today=f.show().find(".k-link").html(i(e)).attr("title",r.toString(e,"D",u.options.culture)),u._toggle(),t):(u._toggle(!1),f.hide(),t)},_header:function(){var t,n=this,i=n.element;i.find(".k-header")[0]||i.html('<div class="k-header"><a href="#" role="button" class="k-link k-nav-prev" '+st+'="Previous"><span class="k-icon k-i-arrow-60-left"></span></a><a href="#" role="button" aria-live="assertive" aria-atomic="true" class="k-link k-nav-fast"></a><a href="#" role="button" class="k-link k-nav-next" '+st+'="Next"><span class="k-icon k-i-arrow-60-right"></span></a></div>'),t=i.find(".k-link").on(di+" "+ki+" "+pi+" "+dt,wt).click(!1),n._title=t.eq(1).on(h,function(){n._active=n.options.focusOnNav!==!1,n.navigateUp()}),n[k]=t.eq(0).on(h,function(){n._active=n.options.focusOnNav!==!1,n.navigateToPast()}),n[b]=t.eq(2).on(h,function(){n._active=n.options.focusOnNav!==!1,n.navigateToFuture()})},_navigate:function(n,t){var u=this,e=u._index+1,r=new i(+u._current);n=u[n],n.hasClass(s)||(e>3?r.setFullYear(r.getFullYear()+100*t):f.views[e].setDate(r,t),u.navigate(r))},_option:function(n,r){var o,u=this,f=u.options,e=u._value||u._current;return r===t?f[n]:(r=it(r,f.format,f.culture),r&&(f[n]=new i(+r),o=n===bt?r>e:e>r,(o||sr(e,r))&&(o&&(u._value=null),u._changeView=!0),u._changeView||(u._changeView=!(!f.month.content&&!f.month.empty)),u.navigate(u._value),u._toggle()),t)},_toggle:function(n){var i=this,u=i.options,f=i.options.disableDates(a()),r=i._today;n===t&&(n=v(a(),u.min,u.max)),r&&(r.off(h),n&&!f?r.addClass(ni).removeClass(s).on(h,ci(i._todayClick,i)):r.removeClass(ni).addClass(s).on(h,or))},_todayClick:function(n){var t=this,r=o[t.options.depth],u=t.options.disableDates,i=a();n.preventDefault(),u(i)||(0===t._view.compare(t._current,i)&&t._index==r&&(t._changeView=!1),t._value=i,t.navigate(i,r),t.trigger(et))},_toDateObject:function(t){var u=n(t).attr(r.attr(ft)).split("/");return u=new i(u[0],u[1],u[2])},_templates:function(){var i=this,t=i.options,e=t.footer,n=t.month,o=n.content,u=n.weekNumber,f=n.empty;i.month={content:c('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" '+r.attr("value")+'="#=data.dateString#" title="#=data.title#">'+(o||"#=data.value#")+"</a></td>",{useWithBlock:!!o}),empty:c('<td role="gridcell">'+(f||"&nbsp;")+"</td>",{useWithBlock:!!f}),weekNumber:c('<td class="k-alt">'+(u||"#= data.weekNumber #")+"</td>",{useWithBlock:!!u})},i.footer=e!==!1?c(e||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}):null}});si.plugin(nr),f={firstDayOfMonth:function(n){return new i(n.getFullYear(),n.getMonth(),1)},firstVisibleDay:function(n,t){t=t||r.culture().calendar;for(var e=t.firstDay,u=new i(n.getFullYear(),n.getMonth(),0,n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds());u.getDay()!=e;)f.setTime(u,-1*hi);return u},setTime:function(n,t){var f=n.getTimezoneOffset(),r=new i(n.getTime()+t),u=r.getTimezoneOffset()-f;n.setTime(r.getTime()+u*gi)},views:[{name:w,title:function(n,t,i,r){return ht(r).months.names[n.getMonth()]+" "+n.getFullYear()},content:function(n){var u=this,e=0,l=n.min,v=n.max,a=n.date,y=n.dates,et=n.format,o=n.culture,nt=n.url,it=n.isWeekColumnVisible,ut=nt&&y[0],c=ht(o),k=c.firstDay,tt=c.days,ft=fi(tt.names,k),st=fi(tt.namesShort,k),w=f.firstVisibleDay(a,c),ot=u.first(a),rt=u.last(a),b=u.toDateString,t=new i,h='<table tabindex="0" role="grid" class="k-content" cellspacing="0" data-start="'+b(w)+'"><thead><tr role="row">';for(it&&(h+='<th scope="col" class="k-alt">'+n.messages.weekColumnHeader+"</th>");e<7;e++)h+='<th scope="col" title="'+ft[e]+'">'+st[e]+"</th>";return t=new i(t.getFullYear(),t.getMonth(),t.getDate()),p(t,0),t=+t,g({cells:42,perRow:7,html:h+='</tr></thead><tbody><tr role="row">',start:w,isWeekColumnVisible:it,weekNumber:n.weekNumber,min:new i(l.getFullYear(),l.getMonth(),l.getDate()),max:new i(v.getFullYear(),v.getMonth(),v.getDate()),content:n.content,empty:n.empty,setter:u.setDate,disableDates:n.disableDates,build:function(n,i,u){var f=[],c=n.getDay(),h="",e="#";return(n<ot||n>rt)&&f.push(d),u(n)&&f.push(s),+n===t&&f.push("k-today"),0!==c&&6!==c||f.push("k-weekend"),ut&&er(+n,y)&&(e=nt.replace("{0}",r.toString(n,et,o)),h=" k-action-link"),{date:n,dates:y,ns:r.ns,title:r.toString(n,"D",o),value:n.getDate(),dateString:b(n),cssClass:f[0]?' class="'+f.join(" ")+'"':"",linkClass:h,url:e}},weekNumberBuild:function(n){return{weekNumber:ur(n,r.culture().calendar.firstDay),currentDate:n}}})},first:function(n){return f.firstDayOfMonth(n)},last:function(n){var t=new i(n.getFullYear(),n.getMonth()+1,0),u=f.firstDayOfMonth(n),r=Math.abs(t.getTimezoneOffset()-u.getTimezoneOffset());return r&&t.setHours(u.getHours()+r/60),t},compare:function(n,t){var e,f=n.getMonth(),u=n.getFullYear(),i=t.getMonth(),r=t.getFullYear();return e=u>r?1:u<r?-1:f==i?0:f>i?1:-1},setDate:function(n,t){var r=n.getHours();t instanceof i?n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):f.setTime(n,t*hi),p(n,r)},toDateString:function(n){return n.getFullYear()+"/"+n.getMonth()+"/"+n.getDate()}},{name:"year",title:function(n){return n.getFullYear()},content:function(n){var e=ht(n.culture).months.namesAbbr,f=this.toDateString,t=n.min,u=n.max;return g({min:new i(t.getFullYear(),t.getMonth(),1),max:new i(u.getFullYear(),u.getMonth(),1),start:new i(n.date.getFullYear(),0,1),setter:this.setDate,build:function(n){return{value:e[n.getMonth()],ns:r.ns,dateString:f(n),cssClass:""}}})},first:function(n){return new i(n.getFullYear(),0,n.getDate())},last:function(n){return new i(n.getFullYear(),11,n.getDate())},compare:function(n,t){return vt(n,t)},setDate:function(n,t){var r,u=n.getHours();t instanceof i?(r=t.getMonth(),n.setFullYear(t.getFullYear(),r,n.getDate()),r!==n.getMonth()&&n.setDate(0)):(r=n.getMonth()+t,n.setMonth(r),r>11&&(r-=12),r>0&&n.getMonth()!=r&&n.setDate(0)),p(n,u)},toDateString:function(n){return n.getFullYear()+"/"+n.getMonth()+"/1"}},{name:"decade",title:function(n,t,i){return ii(n,t,i,10)},content:function(n){var t=n.date.getFullYear(),u=this.toDateString;return g({start:new i(t-t%10-1,0,1),min:new i(n.min.getFullYear(),0,1),max:new i(n.max.getFullYear(),0,1),setter:this.setDate,build:function(n,t){return{value:n.getFullYear(),ns:r.ns,dateString:u(n),cssClass:0===t||11==t?gt:""}}})},first:function(n){var t=n.getFullYear();return new i(t-t%10,n.getMonth(),n.getDate())},last:function(n){var t=n.getFullYear();return new i(t-t%10+9,n.getMonth(),n.getDate())},compare:function(n,t){return vt(n,t,10)},setDate:function(n,t){ri(n,t,1)},toDateString:function(n){return n.getFullYear()+"/0/1"}},{name:pt,title:function(n,t,i){return ii(n,t,i,100)},content:function(n){var o=n.date.getFullYear(),e=n.min.getFullYear(),f=n.max.getFullYear(),s=this.toDateString,u=e,t=f;return u-=u%10,t-=t%10,t-u<10&&(t=u+9),g({start:new i(o-o%100-10,0,1),min:new i(u,0,1),max:new i(t,0,1),setter:this.setDate,build:function(n,t){var i=n.getFullYear(),u=i+9;return i<e&&(i=e),u>f&&(u=f),{ns:r.ns,value:i+" - "+u,dateString:s(n),cssClass:0===t||11==t?gt:""}}})},first:function(n){var t=n.getFullYear();return new i(t-t%100,n.getMonth(),n.getDate())},last:function(n){var t=n.getFullYear();return new i(t-t%100+99,n.getMonth(),n.getDate())},compare:function(n,t){return vt(n,t,100)},setDate:function(n,t){ri(n,t,10)},toDateString:function(n){var t=n.getFullYear();return t-t%10+"/0/1"}}]},f.isEqualDatePart=hr,f.isEqualDate=lt,f.makeUnselectable=yi,f.restrictValue=y,f.isInRange=v,f.addClassToViewContainer=wi,f.normalize=ct,f.viewsEnum=o,f.disabled=ot,r.calendar=f}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.datepicker.min",["kendo.calendar.min","kendo.popup.min"],n)}(function(){return function(n,t){function w(t){var i=t.parseFormats,r=t.format;o.normalize(t),i=n.isArray(i)?i:[i],i.length||i.push("yyyy-MM-dd"),n.inArray(r,i)===-1&&i.splice(0,0,t.format),t.parseFormats=i}function rt(n){n.preventDefault()}var et,i=window.kendo,e=i.ui,l=e.Widget,u=i.parseDate,f=i.keys,dt=i.template,wt=i._activeElement,ot="<div />",vt="<span />",r=".kendoDatePicker",st="click"+r,d="open",b="close",v="change",ct="disabled",lt="readonly",k="k-state-default",ht="k-state-focused",at="k-state-selected",a="k-state-disabled",kt="k-state-hover",ni="mouseenter"+r+" mouseleave"+r,yt="mousedown"+r,p="id",tt="min",it="max",nt="month",g="aria-disabled",ft="aria-expanded",y="aria-hidden",o=i.calendar,gt=o.isInRange,ut=o.restrictValue,bt=o.isEqualDatePart,s=n.extend,c=n.proxy,pt=Date,h=function(t){var u,r=this,o=document.body,f=n(ot).attr(y,"true").addClass("k-calendar-container").appendTo(o);r.options=t=t||{},u=t.id,u&&(u+="_dateview",f.attr(p,u),r._dateViewID=u),r.popup=new e.Popup(f,s(t.popup,t,{name:"Popup",isRtl:i.support.isRtl(t.anchor)})),r.div=f,r.value(t.value)};h.prototype={_calendar:function(){var f,t=this,r=t.calendar,u=t.options;r||(f=n(ot).attr(p,i.guid()).appendTo(t.popup.element).on(yt,rt).on(st,"td:has(.k-link)",c(t._click,t)),t.calendar=r=new e.Calendar(f),t._setOptions(u),i.calendar.makeUnselectable(r.element),r.navigate(t._value||t._current,u.start),t.value(t._value))},_setOptions:function(n){this.calendar.setOptions({focusOnNav:!1,change:n.change,culture:n.culture,dates:n.dates,depth:n.depth,footer:n.footer,format:n.format,max:n.max,min:n.min,month:n.month,weekNumber:n.weekNumber,start:n.start,disableDates:n.disableDates})},setOptions:function(n){var t=this.options,i=n.disableDates;i&&(n.disableDates=o.disabled(i)),this.options=s(t,n,{change:t.change,close:t.close,open:t.open}),this.calendar&&this._setOptions(this.options)},destroy:function(){this.popup.destroy()},open:function(){var n=this;n._calendar(),n.popup.open()},close:function(){this.popup.close()},min:function(n){this._option(tt,n)},max:function(n){this._option(it,n)},toggle:function(){var n=this;n[n.popup.visible()?b:d]()},move:function(n){var t=this,i=n.keyCode,u=t.calendar,e=n.ctrlKey&&i==f.DOWN||i==f.ENTER,r=!1;if(n.altKey)i==f.DOWN?(t.open(),n.preventDefault(),r=!0):i==f.UP&&(t.close(),n.preventDefault(),r=!0);else if(t.popup.visible()){if(i==f.ESC||e&&u._cell.hasClass(at))return t.close(),n.preventDefault(),!0;t._current=u._move(n),r=!0}return r},current:function(n){this._current=n,this.calendar._focus(n)},value:function(n){var t=this,u=t.calendar,i=t.options,r=i.disableDates;r&&r(n)&&(n=null),t._value=n,t._current=new pt(+ut(n,i.min,i.max)),u&&u.value(n)},_click:function(n){n.currentTarget.className.indexOf(at)!==-1&&this.close()},_option:function(n,t){var r=this,i=r.calendar;r.options[n]=t,i&&i[n](t)}},h.normalize=w,i.DateView=h,et=l.extend({init:function(t,r){var c,o,f=this;l.fn.init.call(f,t,r),t=f.element,r=f.options,r.disableDates=i.calendar.disabled(r.disableDates),r.min=u(t.attr("min"))||u(r.min),r.max=u(t.attr("max"))||u(r.max),w(r),f._initialOptions=s({},r),f._wrapper(),f.dateView=new h(s({},r,{id:t.attr(p),anchor:f.wrapper,change:function(){f._change(this.value()),f.close()},close:function(n){f.trigger(b)?n.preventDefault():(t.attr(ft,!1),o.attr(y,!0))},open:function(n){var i,r=f.options;f.trigger(d)?n.preventDefault():(f.element.val()!==f._oldText&&(i=u(t.val(),r.parseFormats,r.culture),f.dateView[i?"current":"value"](i)),t.attr(ft,!0),o.attr(y,!1),f._updateARIA(i))}})),o=f.dateView.div,f._icon();try{t[0].setAttribute("type","text")}catch(a){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":f.dateView._dateViewID}),f._reset(),f._template(),c=t.is("[disabled]")||n(f.element).parents("fieldset").is(":disabled"),c?f.enable(!1):f.readonly(t.is("[readonly]")),r.dateInput&&(f._dateInput=new e.DateInput(t,{culture:r.culture,format:r.format,min:r.min,max:r.max,value:r.value})),f._old=f._update(r.value||f.element.val()),f._oldText=t.val(),i.notify(f)},events:[d,b,v],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:nt,depth:nt,animation:{},month:{},dates:[],ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#',dateInput:!1},setOptions:function(n){var t=this,r=t._value;l.fn.setOptions.call(t,n),n=t.options,n.min=u(n.min),n.max=u(n.max),w(n),t.dateView.setOptions(n),t._dateInput&&t._dateInput.setOptions({culture:n.culture,format:n.format,min:n.min,max:n.max,value:n.value}),r&&(t.element.val(i.toString(r,n.format,n.culture)),t._updateARIA(r))},_editable:function(n){var t=this,o=t._dateIcon.off(r),f=t.element.off(r),e=t._inputWrapper.off(r),u=n.readonly,i=n.disable;u||i?(e.addClass(i?a:k).removeClass(i?k:a),f.attr(ct,i).attr(lt,u).attr(g,i)):(e.addClass(k).removeClass(a).on(ni,t._toggleHover),f.removeAttr(ct).removeAttr(lt).attr(g,!1).on("keydown"+r,c(t._keydown,t)).on("focusout"+r,c(t._blur,t)).on("focus"+r,function(){t._inputWrapper.addClass(ht)}),o.on(st,c(t._click,t)).on(yt,rt))},readonly:function(n){this._editable({readonly:n===t||n,disable:!1})},enable:function(n){this._editable({readonly:!1,disable:!(n=n===t||n)})},destroy:function(){var n=this;l.fn.destroy.call(n),n.dateView.destroy(),n.element.off(r),n._dateIcon.off(r),n._inputWrapper.off(r),n._form&&n._form.off("reset",n._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(n){return this._option(tt,n)},max:function(n){return this._option(it,n)},value:function(n){var i=this;return n===t?i._value:(i._old=i._update(n),null===i._old&&i.element.val(""),i._oldText=i.element.val(),t)},_toggleHover:function(t){n(t.currentTarget).toggleClass(kt,"mouseenter"===t.type)},_blur:function(){var n=this,t=n.element.val();n.close(),t!==n._oldText&&n._change(t),n._inputWrapper.removeClass(ht)},_click:function(){var t=this,n=t.element;t.dateView.toggle(),i.support.touch||n[0]===wt()||n.focus()},_change:function(n){var r,f,u,t=this,e=t.element.val();n=t._update(n),r=!i.calendar.isEqualDate(t._old,n),f=r&&!t._typing,u=e!==t.element.val(),(f||u)&&t.element.trigger(v),r&&(t._old=n,t._oldText=t.element.val(),t.trigger(v)),t._typing=!1},_keydown:function(n){var t=this,i=t.dateView,u=t.element.val(),r=!1;i.popup.visible()||n.keyCode!=f.ENTER||u===t._oldText?(r=i.move(n),t._updateARIA(i._current),r?t._dateInput&&n.stopImmediatePropagation&&n.stopImmediatePropagation():t._typing=!0):t._change(u)},_icon:function(){var t,i=this,r=i.element;t=r.next("span.k-select"),t[0]||(t=n('<span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-calendar"></span></span>').insertAfter(r)),i._dateIcon=t.attr({role:"button","aria-controls":i.dateView._dateViewID})},_option:function(n,i){var f=this,r=f.options;return i===t?r[n]:(i=u(i,r.parseFormats,r.culture),i&&(r[n]=new pt(+i),f.dateView[n](i)),t)},_update:function(n){var o,r=this,f=r.options,s=f.min,h=f.max,e=r._value,t=u(n,f.parseFormats,f.culture),c=null===t&&null===e||t instanceof Date&&e instanceof Date;return f.disableDates(t)&&(t=null,r._old||r.element.val()||(n=null)),+t==+e&&c?(o=i.toString(t,f.format,f.culture),o!==n&&r.element.val(null===t?n:o),t):(null!==t&&bt(t,s)?t=ut(t,s,h):gt(t,s,h)||(t=null),r._value=t,r.dateView.value(t),r._dateInput?r._dateInput.value(t||n):r.element.val(i.toString(t||n,f.format,f.culture)),r._updateARIA(t),t)},_wrapper:function(){var t,r=this,i=r.element;t=i.parents(".k-datepicker"),t[0]||(t=i.wrap(vt).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(vt).parent()),t[0].style.cssText=i[0].style.cssText,i.css({width:"100%",height:i[0].style.height}),r.wrapper=t.addClass("k-widget k-datepicker k-header").addClass(i[0].className),r._inputWrapper=n(t[0].firstChild)},_reset:function(){var t=this,i=t.element,u=i.attr("form"),r=u?n("#"+u):i.closest("form");r[0]&&(t._resetHandler=function(){t.value(i[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=r.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=dt(this.options.ARIATemplate)},_updateARIA:function(n){var r,t=this,i=t.dateView.calendar;t.element.removeAttr("aria-activedescendant"),i&&(r=i._cell,r.attr("aria-label",t._ariaTemplate({current:n||i.current()})),t.element.attr("aria-activedescendant",r.attr("id")))}}),e.plugin(et)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.dateinput.min",["kendo.core.min"],n)}(function(){return function(n,t){function nt(n,t,i,r){var e,u,o,s,h=n[r+n.length-i.length];if(n=n.substring(0,r+n.length-i.length),i=i.substring(0,r),e=[],n===i&&r>0)return e.push([t[r-1],i[r-1]]),e;if(0===n.indexOf(i)&&(0===i.length||t[i.length-1]!==t[i.length])){for(o="",u=i.length;u<n.length;u++)t[u]!==o&&f.indexOf(t[u])>=0&&(o=t[u],e.push([o,""]));return e}if(" "===i[i.length-1]||i[i.length-1]===h)return[[t[r-1]," "]];if(0===i.indexOf(n)||f.indexOf(t[r-1])===-1){for(s=t[0],u=Math.max(0,n.length-1);u<t.length;u++)if(f.indexOf(t[u])>=0){s=t[u];break}return[[s,i[r-1]]]}return[[t[r-1],i[r-1]]]}var y,d=window,i=d.kendo,u=i.caret,v=i.ui,e=v.Widget,k=i.keys,r=".kendoDateInput",o=n.proxy,g={}.toString,c=(i.support.propertyChangeEvent?"propertychange.kendoDateInput input":"input")+r,a="k-state-disabled",l="k-state-default",h="k-state-invalid",w="disabled",p="readonly",s="change",f="dMyHhmftsz",b=e.extend({init:function(t,u){var o,s,f=this;e.fn.init.call(f,t,u),t=f.element,u=f.options,u.format=i._extractFormat(u.format||i.getCulture(u.culture).calendars.standard.patterns.d),u.min=i.parseDate(t.attr("min"))||i.parseDate(u.min),u.max=i.parseDate(t.attr("max"))||i.parseDate(u.max),o=(t.parent().attr("class")||"").indexOf("k-picker-wrap")>=0,o?f.wrapper=t.parent():(f.wrapper=t.wrap("<span class='k-widget k-dateinput'></span>").parent(),f.wrapper.addClass(t[0].className),f.wrapper[0].style.cssText=t[0].style.cssText,t.css({width:"100%",height:t[0].style.height})),n("<span class='k-icon k-i-warning'></span>").insertAfter(t),f._form(),f.element.addClass(o?" ":"k-textbox").attr("autocomplete","off").on("focusout"+r,function(){f._change()});try{t[0].setAttribute("type","text")}catch(h){t[0].type="text"}s=t.is("[disabled]")||n(f.element).parents("fieldset").is(":disabled"),s?f.enable(!1):f.readonly(t.is("[readonly]")),f.value(f.options.value||t.val()),i.notify(f)},options:{name:"DateInput",culture:"",value:"",format:"",min:new Date(1900,0,1),max:new Date(2099,11,31),messages:{year:"year",month:"month",day:"day",weekday:"day of the week",hour:"hours",minute:"minutes",second:"seconds",dayperiod:"AM/PM"}},events:[s],min:function(n){return n===t?this.options.min:(this.options.min=n,t)},max:function(n){return n===t?this.options.max:(this.options.max=n,t)},setOptions:function(n){var t=this;e.fn.setOptions.call(t,n),this._unbindInput(),this._bindInput(),this._updateElementValue()},destroy:function(){var n=this;n.element.off(r),n._formElement&&n._formElement.off("reset",n._resetHandler),e.fn.destroy.call(n)},value:function(n){return n===t?this._dateTime.getDateObject():(null===n&&(n=""),"[object Date]"!==g.call(n)&&(n=i.parseDate(n,this.options.format,this.options.culture)),n&&!n.getTime()&&(n=null),this._dateTime=new y(n,this.options.format,this.options.culture,this.options.messages),this._updateElementValue(),this._oldValue=n,t)},_updateElementValue:function(){var n=this._dateTime.toPair(this.options.format,this.options.culture,this.options.messages);this.element.val(n[0]),this._oldText=n[0],this._format=n[1]},readonly:function(n){this._editable({readonly:n===t||n,disable:!1})},enable:function(n){this._editable({readonly:!1,disable:!(n=n===t||n)})},_bindInput:function(){var n=this;n.element.on("keydown"+r,o(n._keydown,n)).on(c,o(n._input,n)).on("mouseup"+r,o(n._mouseUp,n)).on("DOMMouseScroll"+r+" mousewheel"+r,o(n._scroll,n))},_unbindInput:function(){this.element.off("keydown"+r).off("paste"+r).off(c).off("mouseup"+r).off("DOMMouseScroll"+r+" mousewheel"+r)},_editable:function(n){var t=this,u=t.element,f=n.disable,i=n.readonly,r=t.wrapper;t._unbindInput(),i||f?(r.addClass(a).removeClass(l),u.attr(w,f).attr(p,i)):(r.addClass(l).removeClass(a),u.removeAttr(w).removeAttr(p),t._bindInput())},_change:function(){var n=this,i=n._oldValue,t=n.value();t&&n.min()&&t<n.min()&&(n.value(n.min()),t=n.value()),t&&n.max()&&t>n.max()&&(n.value(n.max()),t=n.value()),(i&&t&&t.getTime()!==i.getTime()||i&&!t||!i&&t)&&(n._oldValue=t,n.trigger(s),n.element.trigger(s))},_input:function(){var n,f,r,o,s,c,l,t=this,a=t.element[0],e=!1;if(i._activeElement()===a){if(n=nt(this._oldText,this._format,this.element[0].value,u(this.element[0])[0]),f=1===n.length&&" "===n[0][1],!f)for(r=0;r<n.length;r++)o=this._dateTime.parsePart(n[r][0],n[r][1]),e=e||!o;this._updateElementValue(),n.length&&" "!==n[0][0]&&(this._selectSegment(n[0][0]),f||(s=n[0][0],setTimeout(function(){t._selectSegment(s)}))),f&&(c={keyCode:39,preventDefault:function(){}},this._keydown(c)),e&&(clearTimeout(t._blinkInvalidTimeout),l=h,t.wrapper.addClass(h),t._blinkInvalidTimeout=setTimeout(function(){t.wrapper.removeClass(l)},100))}},_mouseUp:function(){var n=u(this.element[0]);n[0]===n[1]&&this._selectNearestSegment()},_scroll:function(n){if(i._activeElement()===this.element[0]&&!this.element.is("[readonly]")){n=window.event||n;var t={keyCode:37,preventDefault:function(){}};t.keyCode=n.shiftKey?(n.wheelDelta||-n.detail)>0?37:39:(n.wheelDelta||-n.detail)>0?38:40,this._keydown(t),n.returnValue=!1,n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation()}},_form:function(){var t=this,i=t.element,u=i.attr("form"),r=u?n("#"+u):i.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(i[0].value)})},t._formElement=r.on("reset",t._resetHandler))},_keydown:function(n){var e,s,r,o,h,c,t=n.keyCode;if(37==t||39==t)for(n.preventDefault(),e=u(this.element[0]),e[0]!=e[1]&&this._selectNearestSegment(),s=37==t?-1:1,r=s==-1?u(this.element[0])[0]-1:u(this.element[0])[1]+1;r>=0&&r<this._format.length;){if(f.indexOf(this._format[r])>=0){this._selectSegment(this._format[r]);break}r+=s}38!=t&&40!=t||(n.preventDefault(),e=u(this.element[0]),o=this._format[e[0]],f.indexOf(o)>=0&&(this._dateTime.modifyPart(o,38==t?1:-1),this._updateElementValue(),this._selectSegment(o))),i.support.browser.msie&&i.support.browser.version<10&&(h=n.keyCode?n.keyCode:n.which,8!==h&&46!==h||(c=this,setTimeout(function(){c._input()},0))),t===k.ENTER&&this._change()},_selectNearestSegment:function(){for(var e=u(this.element[0]),r=e[0],i=r,n=r-1;i<this._format.length||n>=0;i++,n--){if(i<this._format.length&&f.indexOf(this._format[i])!==-1)return this._selectSegment(this._format[i]),t;if(n>=0&&f.indexOf(this._format[n])!==-1)return this._selectSegment(this._format[n]),t}},_selectSegment:function(n){for(var i=-1,r=0,t=0;t<this._format.length;t++)this._format[t]===n&&(r=t+1,i===-1&&(i=t));i<0&&(i=0),u(this.element,i,r)}});v.plugin(b),y=function(n,r,u,f){function s(n,t,i){return n+="",t=t||2,i=t-n.length,i?ot[t].substring(0,i)+n:n}function ut(n){return rt=n,et}function it(n,t){switch(n){case"y":v=t;break;case"M":c=t,t||(e.setMonth(0),p="");break;case"d":l=t;break;case"H":case"h":h=t,t||(y="");break;case"m":b=t;break;case"s":w=t;break;default:return}}var nt,d,e=null,v=!0,c=!0,l=!0,h=!0,b=!0,w=!0,k=!0,p="",y="",o={},ot=["","0","00","000","0000"],ft=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|zzz|zz|z|"[^"]*"|'[^']*'/g,g=null,a=null,tt=null,rt=!1,et=function(n){var r,u,i,y,f;switch(n){case"d":i=l?e.getDate():o.day;break;case"dd":i=l?s(e.getDate()):o.day;break;case"ddd":i=l&&c&&v?tt.namesAbbr[e.getDay()]:o.weekday;break;case"dddd":i=l&&c&&v?tt.names[e.getDay()]:o.weekday;break;case"M":i=c?e.getMonth()+1:o.month;break;case"MM":i=c?s(e.getMonth()+1):o.month;break;case"MMM":i=c?g.namesAbbr[e.getMonth()]:o.month;break;case"MMMM":i=c?g.names[e.getMonth()]:o.month;break;case"yy":i=v?s(e.getFullYear()%100):o.year;break;case"yyyy":i=v?s(e.getFullYear(),4):o.year;break;case"h":i=h?e.getHours()%12||12:o.hour;break;case"hh":i=h?s(e.getHours()%12||12):o.hour;break;case"H":i=h?e.getHours():o.hour;break;case"HH":i=h?s(e.getHours()):o.hour;break;case"m":i=b?e.getMinutes():o.minute;break;case"mm":i=b?s(e.getMinutes()):o.minute;break;case"s":i=w?e.getSeconds():o.second;break;case"ss":i=w?s(e.getSeconds()):o.second;break;case"f":i=k?Math.floor(e.getMilliseconds()/100):k;break;case"ff":i=e.getMilliseconds(),i>99&&(i=Math.floor(i/10)),i=k?s(i):n;break;case"fff":i=k?s(e.getMilliseconds(),3):n;break;case"tt":i=h?e.getHours()<12?a.AM[0]:a.PM[0]:o.dayperiod;break;case"zzz":r=e.getTimezoneOffset(),u=r<0,i=(""+Math.abs(r/60)).split(".")[0],r=Math.abs(r)-60*i,i=(u?"+":"-")+s(i),i+=":"+s(r);break;case"z":case"zz":i=e.getTimezoneOffset()/60,u=i<0,i=(""+Math.abs(i)).split(".")[0],i=(u?"+":"-")+("zz"===n?s(i):i)}if(i=i!==t?i:n.slice(1,n.length-1),rt){for(i=""+i,y="","ddd"==n&&(n="EEE"),"dddd"==n&&(n="EEEE"),f=0;f<i.length;f++)y+=n[0];return y}return i};if(this.setValue=function(n){l=n},this.getValue=function(){return l},this.modifyPart=function(n,t){var r,i=new Date(e&&e.getTime?e.getTime():e);switch(n){case"y":i.setFullYear(i.getFullYear()+t);break;case"M":r=i.getMonth()+t,i.setMonth(r),i.getMonth()%12!=(r+12)%12&&(i.setDate(1),i.setMonth(r));break;case"d":case"E":i.setDate(i.getDate()+t);break;case"H":case"h":i.setHours(i.getHours()+t);break;case"m":i.setMinutes(i.getMinutes()+t);break;case"s":i.setSeconds(i.getSeconds()+t);break;case"t":i.setHours((i.getHours()+12)%24)}i.getFullYear()>0&&(it(n,!0),e=i)},this.parsePart=function(n,t){var i,r,o,u,g,d,f,s,k;if(!t)return it(n,!1),!0;switch(i=new Date(e&&e.getTime?e.getTime():e),n){case"d":if(o=(l?10*i.getDate():0)+parseInt(t,10),isNaN(o))return;for(;o>31;)o=parseInt((""+o).slice(1),10);if(o<1)l=!1;else{if(i.setDate(o),i.getMonth()!==e.getMonth())return;l=!0}break;case"M":if(u=(c?10*(i.getMonth()+1):0)+parseInt(t,10),isNaN(u)){for(g=a.months.names,p+=t.toLowerCase();p.length>0;){for(d=0;d<g.length;d++)if(0===g[d].toLowerCase().indexOf(p))return i.setMonth(d),c=!0,e=i,!0;p=p.substring(1,p.length)}return!1}for(;u>12;)u=parseInt((""+u).slice(1),10);u<1?c=!1:(i.setMonth(u-1),i.getMonth()!==u-1&&(i.setDate(1),i.setMonth(u-1)),c=!0);break;case"y":if(f=(v?10*i.getFullYear():0)+parseInt(t,10),isNaN(f))return;for(;f>9999;)f=parseInt((""+f).slice(1),10);f<1?v=!1:(i.setFullYear(f),v=!0);break;case"h":if(r=(h?10*(i.getHours()%12||12):0)+parseInt(t,10),isNaN(r))return;for(;r>12;)r=parseInt((""+r).slice(1),10);i.setHours(12*Math.floor(i.getHours()/12)+r%12),h=!0;break;case"H":if(r=(h?10*i.getHours():0)+parseInt(t,10),isNaN(r))return;for(;r>23;)r=parseInt((""+r).slice(1),10);i.setHours(r),h=!0;break;case"m":if(s=(b?10*i.getMinutes():0)+parseInt(t,10),isNaN(s))return;for(;s>59;)s=parseInt((""+s).slice(1),10);i.setMinutes(s),b=!0;break;case"s":if(k=(w?10*i.getSeconds():0)+parseInt(t,10),isNaN(k))return;for(;k>59;)k=parseInt((""+k).slice(1),10);i.setSeconds(k),w=!0;break;case"t":if(h){for(y+=t.toLowerCase();y.length>0;){if(0===a.AM[0].toLowerCase().indexOf(y)&&i.getHours()>=12||0===a.PM[0].toLowerCase().indexOf(y)&&i.getHours()<12)return i.setHours((i.getHours()+12)%24),e=i,!0;y=y.substring(1,y.length)}return!1}}return e=i,!0},this.toPair=function(n,t,r){return n?(t=i.getCulture(t),a=t.calendars.standard,n=a.patterns[n]||n,tt=a.days,g=a.months,o=r,[n.replace(ft,ut(!1)),n.replace(ft,ut(!0))]):["",""]},this.getDateObject=function(){return v&&c&&l&&h&&b&&w&&k?new Date(e.getTime()):null},n)e=new Date(n.getTime());else for(e=new Date,nt=this.toPair(r,u,f)[1],d=0;d<nt.length;d++)it(nt[d],!1)}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.autocomplete.min",["kendo.list.min","kendo.mobile.scroller.min"],n)}(function(){return function(n,t){function h(n,t,i){return i?t.substring(0,n).split(i).length-1:0}function rt(n,t,i){return t.split(i)[h(n,t,i)]}function it(n,t,i,r,u){var f=t.split(r);return f.splice(h(n,t,r),1,i),r&&""!==f[f.length-1]&&f.push(""),f.join(u)}var f=window.kendo,ut=f.support,o=f.caret,a=f._activeElement,b=ut.placeholder,w=f.ui,u=w.List,r=f.keys,et=f.data.DataSource,k="aria-disabled",d="aria-readonly",c="change",s="k-state-default",y="disabled",v="readonly",p="k-state-focused",ft="k-state-selected",l="k-state-disabled",nt="k-state-hover",i=".kendoAutoComplete",g="mouseenter"+i+" mouseleave"+i,e=n.proxy,tt=u.extend({init:function(t,r){var s,h,o=this;o.ns=i,r=n.isArray(r)?{dataSource:r}:r,u.fn.init.call(o,t,r),t=o.element,r=o.options,r.placeholder=r.placeholder||t.attr("placeholder"),b&&t.attr("placeholder",r.placeholder),o._wrapper(),o._loader(),o._clearButton(),o._dataSource(),o._ignoreCase(),t[0].type="text",s=o.wrapper,o._popup(),t.addClass("k-input").on("keydown"+i,e(o._keydown,o)).on("keypress"+i,e(o._keypress,o)).on("paste"+i,e(o._search,o)).on("focus"+i,function(){o._prev=o._accessor(),o._oldText=o._prev,o._placeholder(!1),s.addClass(p)}).on("focusout"+i,function(){o._change(),o._placeholder(),s.removeClass(p)}).attr({autocomplete:"off",role:"textbox","aria-haspopup":!0}),o._clear.on("click"+i,e(o._clearValue,o)),o._enable(),o._old=o._accessor(),t[0].id&&t.attr("aria-owns",o.ul[0].id),o._aria(),o._placeholder(),o._initList(),h=n(o.element).parents("fieldset").is(":disabled"),h&&o.enable(!1),o.listView.bind("click",function(n){n.preventDefault()}),o._resetFocusItemHandler=n.proxy(o._resetFocusItem,o),f.notify(o),o._toggleCloseVisibility()},options:{name:"AutoComplete",enabled:!0,suggest:!1,template:"",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",dataTextField:"",minLength:1,enforceMinLength:!1,delay:200,height:200,filter:"startswith",ignoreCase:!0,highlightFirst:!1,separator:null,placeholder:"",animation:{},virtual:!1,value:null,clearButton:!0},_dataSource:function(){var n=this;n.dataSource&&n._refreshHandler?n._unbindDataSource():(n._progressHandler=e(n._showBusy,n),n._errorHandler=e(n._hideBusy,n)),n.dataSource=et.create(n.options.dataSource).bind("progress",n._progressHandler).bind("error",n._errorHandler)},setDataSource:function(n){this.options.dataSource=n,this._dataSource(),this.listView.setDataSource(this.dataSource)},events:["open","close",c,"select","filtering","dataBinding","dataBound"],setOptions:function(n){var t=this._listOptions(n);u.fn.setOptions.call(this,n),this.listView.setOptions(t),this._accessors(),this._aria()},_listOptions:function(t){var i=u.fn._listOptions.call(this,n.extend(t,{skipUpdateOnBind:!0}));return i.dataValueField=i.dataTextField,i.selectedItemChange=null,i},_editable:function(n){var u=this,f=u.element,e=u.wrapper.off(i),r=n.readonly,t=n.disable;r||t?(e.addClass(t?l:s).removeClass(t?s:l),f.attr(y,t).attr(v,r).attr(k,t).attr(d,r)):(e.addClass(s).removeClass(l).on(g,u._toggleHover),f.removeAttr(y).removeAttr(v).attr(k,!1).attr(d,!1))},close:function(){var t=this,n=t.listView.focus();n&&n.removeClass(ft),t.popup.close()},destroy:function(){var n=this;n.element.off(i),n._clear.off(i),n.wrapper.off(i),u.fn.destroy.call(n)},refresh:function(){this.listView.refresh()},select:function(n){this._select(n)},search:function(t){var u,i=this,r=i.options,e=r.ignoreCase,f=i._separator();t=t||i._accessor(),clearTimeout(i._typingTimeout),f&&(t=rt(o(i.element)[0],t,f)),u=t.length,(!r.enforceMinLength&&!u||u>=r.minLength)&&(i._open=!0,i._mute(function(){this.listView.value([])}),i._filterSource({value:e?t.toLowerCase():t,operator:r.filter,field:r.dataTextField,ignoreCase:e}),i.one("close",n.proxy(i._unifySeparators,i))),i._toggleCloseVisibility()},suggest:function(n){var s,e=this,w=e._last,f=e._accessor(),v=e.element[0],i=o(v)[0],l=e._separator(),c=f.split(l),p=h(i,f,l),y=i;return w==r.BACKSPACE||w==r.DELETE?(e._last=t,t):(n=n||"","string"!=typeof n&&(n[0]&&(n=e.dataSource.view()[u.inArray(n[0],e.ul[0])]),n=n?e._text(n):""),i<=0&&(i=f.toLowerCase().indexOf(n.toLowerCase())+1),s=f.substring(0,i).lastIndexOf(l),s=s>-1?i-(s+l.length):i,f=c[p].substring(0,s),n&&(n=""+n,s=n.toLowerCase().indexOf(f.toLowerCase()),s>-1&&(n=n.substring(s+f.length),y=i+n.length,f+=n),l&&""!==c[c.length-1]&&c.push("")),c[p]=f,e._accessor(c.join(l||"")),v===a()&&o(v,i,y),t)},value:function(n){return n===t?this._accessor():(this.listView.value(n),this._accessor(n),this._old=this._accessor(),this._oldText=this._accessor(),t)},_click:function(n){var u=n.item,i=this,r=i.element,f=i.listView.dataItemByIndex(i.listView.getElementIndex(u));return n.preventDefault(),i._active=!0,i.trigger("select",{dataItem:f,item:u})?(i.close(),t):(i._oldText=r.val(),i._select(u).done(function(){i._blur(),o(r,r.val().length)}),t)},_clearText:n.noop,_resetFocusItem:function(){var n=this.options.highlightFirst?0:-1;this.options.virtual&&this.listView.scrollTo(0),this.listView.focus(n)},_listBound:function(){var r,n=this,e=n.popup,o=n.options,f=n.dataSource.flatView(),i=f.length,s=n.dataSource._group.length,u=n.element[0]===a();n._renderFooter(),n._renderNoData(),n._toggleNoData(!i),n._toggleHeader(!!s&&!!i),n._resizePopup(),e.position(),i&&o.suggest&&u&&n.suggest(f[0]),n._open&&(n._open=!1,r=n._allowOpening()?"open":"close",n._typingTimeout&&!u&&(r="close"),i&&(n._resetFocusItem(),o.virtual&&n.popup.unbind("activate",n._resetFocusItemHandler).one("activate",n._resetFocusItemHandler)),e[r](),n._typingTimeout=t),n._touchScroller&&n._touchScroller.reset(),n._hideBusy(),n._makeUnselectable(),n.trigger("dataBound")},_mute:function(n){this._muted=!0,n.call(this),this._muted=!1},_listChange:function(){var n=this._active||this.element[0]===a();n&&!this._muted&&this._selectValue(this.listView.selectedDataItems()[0])},_selectValue:function(n){var i=this._separator(),t="";n&&(t=this._text(n)),null===t&&(t=""),i&&(t=it(o(this.element)[0],this._accessor(),t,i,this._defaultSeparator())),this._prev=t,this._accessor(t),this._placeholder()},_unifySeparators:function(){return this._accessor(this.value().split(this._separator()).join(this._defaultSeparator())),this},_change:function(){var n=this,t=n._unifySeparators().value(),i=t!==u.unifyType(n._old,typeof t),f=i&&!n._typing,r=n._oldText!==t;n._old=t,n._oldText=t,(f||r)&&n.element.trigger(c),i&&n.trigger(c),n.typing=!1,n._toggleCloseVisibility()},_accessor:function(n){var r=this,i=r.element[0];return n===t?(n=i.value,i.className.indexOf("k-readonly")>-1&&n===r.options.placeholder?"":n):(i.value=null===n?"":n,r._placeholder(),t)},_keydown:function(n){var s,o,i=this,t=n.keyCode,e=i.listView,f=i.popup.visible(),u=e.focus();if(i._last=t,t===r.DOWN)f&&this._move(u?"focusNext":"focusFirst"),n.preventDefault();else if(t===r.UP)f&&this._move(u?"focusPrev":"focusLast"),n.preventDefault();else if(t===r.ENTER||t===r.TAB){if(t===r.ENTER&&f&&n.preventDefault(),f&&u){if(s=e.dataItemByIndex(e.getElementIndex(u)),i.trigger("select",{dataItem:s,item:u}))return;this._select(u)}this._blur()}else t===r.ESC?(f&&n.preventDefault(),i.close()):!i.popup.visible()||t!==r.PAGEDOWN&&t!==r.PAGEUP?i._search():(n.preventDefault(),o=t===r.PAGEDOWN?1:-1,e.scrollWith(o*e.screenHeight()))},_keypress:function(){this._oldText=this.element.val(),this._typing=!0},_move:function(n){this.listView[n](),this.options.suggest&&this.suggest(this.listView.focus())},_hideBusy:function(){var n=this;clearTimeout(n._busy),n._loading.hide(),n.element.attr("aria-busy",!1),n._busy=null,n._showClear()},_showBusy:function(){var n=this;n._busy||(n._busy=setTimeout(function(){n.element.attr("aria-busy",!0),n._loading.show(),n._hideClear()},100))},_placeholder:function(n){if(!b){var r,f=this,u=f.element,i=f.options.placeholder;if(i){if(r=u.val(),n===t&&(n=!r),n||(i=r!==i?r:""),r===f._old&&!n)return;u.toggleClass("k-readonly",n).val(i),i||u[0]!==document.activeElement||o(u[0],0,0)}}},_separator:function(){var n=this.options.separator;return n instanceof Array?RegExp(n.join("|"),"gi"):n},_defaultSeparator:function(){var n=this.options.separator;return n instanceof Array?n[0]:n},_inputValue:function(){return this.element.val()},_search:function(){var n=this;clearTimeout(n._typingTimeout),n._typingTimeout=setTimeout(function(){n._prev!==n._accessor()&&(n._prev=n._accessor(),n.search())},n.options.delay)},_select:function(n){var t=this;return t._active=!0,t.listView.select(n).done(function(){t._active=!1})},_loader:function(){this._loading=n('<span class="k-icon k-i-loading" style="display:none"></span>').insertAfter(this.element)},_clearButton:function(){this._clear=n('<span unselectable="on" class="k-icon k-clear-value k-i-close" title="clear"></span>').attr({role:"button",tabIndex:-1}),this.options.clearButton&&this._clear.insertAfter(this.element)},_toggleHover:function(t){n(t.currentTarget).toggleClass(nt,"mouseenter"===t.type)},_toggleCloseVisibility:function(){this.value()?this._showClear():this._hideClear()},_wrapper:function(){var n,i=this,t=i.element,r=t[0];n=t.parent(),n.is("span.k-widget")||(n=t.wrap("<span />").parent()),n.attr("tabindex",-1),n.attr("role","presentation"),n[0].style.cssText=r.style.cssText,t.css({width:"100%",height:r.style.height}),i._focused=i.element,i.wrapper=n.addClass("k-widget k-autocomplete k-header").addClass(r.className)}});w.plugin(tt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.dropdownlist.min",["kendo.list.min","kendo.mobile.scroller.min"],n)}(function(){return function(n,t){function d(n,t,i){for(var r,u=0,f=t.length-1;u<f;++u)r=t[u],r in n||(n[r]={}),n=n[r];n[t[f]]=i}function g(n,t){return n>=t&&(n-=t),n}function et(n,t){for(var i=0;i<n.length;i++)if(n.charAt(i)!==t)return!1;return!0}var r=window.kendo,v=r.ui,ft=v.List,e=v.Select,o=r.support,w=r._activeElement,p=r.data.ObservableObject,f=r.keys,i=".kendoDropDownList",nt="disabled",it="readonly",h="change",tt="k-state-focused",l="k-state-default",a="k-state-disabled",k="aria-disabled",c="mouseenter"+i+" mouseleave"+i,s="tabindex",y="filter",b="accept",ut="The `optionLabel` option is not valid due to missing fields. Define a custom optionLabel as shown here http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#configuration-optionLabel",u=n.proxy,rt=e.extend({init:function(f,o){var l,c,v,h=this,a=o&&o.index;h.ns=i,o=n.isArray(o)?{dataSource:o}:o,e.fn.init.call(h,f,o),o=h.options,f=h.element.on("focus"+i,u(h._focusHandler,h)),h._focusInputHandler=n.proxy(h._focusInput,h),h.optionLabel=n(),h._optionLabel(),h._inputTemplate(),h._reset(),h._prev="",h._word="",h._wrapper(),h._tabindex(),h.wrapper.data(s,h.wrapper.attr(s)),h._span(),h._popup(),h._mobile(),h._dataSource(),h._ignoreCase(),h._filterHeader(),h._aria(),h._enable(),h._oldIndex=h.selectedIndex=-1,a!==t&&(o.index=a),h._initialIndex=o.index,h.requireValueMapper(h.options),h._initList(),h._cascade(),o.autoBind?h.dataSource.fetch():h.selectedIndex===-1&&(c=o.text||"",c||(l=o.optionLabel,l&&0===o.index?c=l:h._isSelect&&(c=f.children(":selected").text())),h._textAccessor(c)),v=n(h.element).parents("fieldset").is(":disabled"),v&&h.enable(!1),h.listView.bind("click",function(n){n.preventDefault()}),r.notify(h)},options:{name:"DropDownList",enabled:!0,autoBind:!0,index:0,text:null,value:null,delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{},filter:"none",minLength:1,enforceMinLength:!1,virtual:!1,template:null,valueTemplate:null,optionLabelTemplate:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#"},events:["open","close",h,"select","filtering","dataBinding","dataBound","cascade","set"],setOptions:function(n){e.fn.setOptions.call(this,n),this.listView.setOptions(this._listOptions(n)),this._optionLabel(),this._inputTemplate(),this._accessors(),this._filterHeader(),this._enable(),this._aria(),!this.value()&&this.hasOptionLabel()&&this.select(0)},destroy:function(){var n=this;e.fn.destroy.call(n),n.wrapper.off(i),n.element.off(i),n._inputWrapper.off(i),n._arrow.off(),n._arrow=null,n._arrowIcon=null,n.optionLabel.off()},open:function(){var n=this;n.popup.visible()||(n.listView.bound()&&n._state!==b?n._allowOpening()&&(n.popup.one("activate",n._focusInputHandler),n.popup.open(),n._resizeFilterInput(),n._focusItem()):(n._open=!0,n._state="rebind",n.filterInput&&(n.filterInput.val(""),n._prev=""),n.filterInput&&1!==n.options.minLength?(n.refresh(),n.popup.one("activate",n._focusInputHandler),n.popup.open(),n._resizeFilterInput()):n._filterSource()))},_focusInput:function(){this._focusElement(this.filterInput)},_resizeFilterInput:function(){var i,t,n=this.filterInput,u=this._prevent;n&&(i=this.filterInput[0]===w(),t=r.caret(this.filterInput[0])[0],this._prevent=!0,n.css("display","none").css("width",this.popup.element.css("width")).css("display","inline-block"),i&&(n.focus(),r.caret(n[0],t)),this._prevent=u)},_allowOpening:function(){return this.hasOptionLabel()||this.filterInput||e.fn._allowOpening.call(this)},toggle:function(n){this._toggle(n,!0)},current:function(n){var i;return n===t?(i=this.listView.focus(),!i&&0===this.selectedIndex&&this.hasOptionLabel()?this.optionLabel:i):(this._focus(n),t)},dataItem:function(i){var r=this,u=null;if(null===i)return i;if(i===t)u=r.listView.selectedDataItems()[0];else{if("number"!=typeof i){if(r.options.virtual)return r.dataSource.getByUid(n(i).data("uid"));i=i.hasClass("k-list-optionlabel")?-1:n(r.items()).index(i)}else r.hasOptionLabel()&&(i-=1);u=r.dataSource.flatView()[i]}return u||(u=r._optionLabelDataItem()),u},refresh:function(){this.listView.refresh()},text:function(n){var u,i=this,r=i.options.ignoreCase;return n=null===n?"":n,n===t?i._textAccessor():"string"!=typeof n?(i._textAccessor(n),t):(u=r?n.toLowerCase():n,i._select(function(n){return n=i._text(n),r&&(n=(n+"").toLowerCase()),n===u}).done(function(){i._textAccessor(i.dataItem()||n)}),t)},_clearFilter:function(){n(this.filterInput).val(""),e.fn._clearFilter.call(this)},value:function(n){var i=this,r=i.listView,f=i.dataSource;return n===t?(n=i._accessor()||i.listView.value()[0],n===t||null===n?"":n):(i.requireValueMapper(i.options,n),!n&&i.hasOptionLabel()||(i._initialIndex=null),this.trigger("set",{value:n}),i._request&&i.options.cascadeFrom&&i.listView.bound()?(i._valueSetter&&f.unbind(h,i._valueSetter),i._valueSetter=u(function(){i.value(n)},i),f.one(h,i._valueSetter),t):(i._isFilterEnabled()&&r.bound()&&r.isFiltered()?i._clearFilter():i._fetchData(),r.value(n).done(function(){i._old=i._accessor(),i._oldIndex=i.selectedIndex}),t))},hasOptionLabel:function(){return this.optionLabel&&!!this.optionLabel[0]},_optionLabel:function(){var i=this,e=i.options,o=e.optionLabel,f=e.optionLabelTemplate;return o?(f||(f="#:",f+="string"==typeof o?"data":r.expr(e.dataTextField,"data"),f+="#"),"function"!=typeof f&&(f=r.template(f)),i.optionLabelTemplate=f,i.hasOptionLabel()||(i.optionLabel=n('<div class="k-list-optionlabel"></div>').prependTo(i.list)),i.optionLabel.html(f(o)).off().click(u(i._click,i)).on(c,i._toggleHover),i.angular("compile",function(){return{elements:i.optionLabel,data:[{dataItem:i._optionLabelDataItem()}]}}),t):(i.optionLabel.off().remove(),i.optionLabel=n(),t)},_optionLabelText:function(){var n=this.options.optionLabel;return"string"==typeof n?n:this._text(n)},_optionLabelDataItem:function(){var t=this,i=t.options.optionLabel;return t.hasOptionLabel()?n.isPlainObject(i)?new p(i):t._assignInstance(t._optionLabelText(),""):null},_buildOptions:function(n){var r,u,f,i=this;i._isSelect&&(r=i.listView.value()[0],u=i._optionLabelDataItem(),f=u&&i._value(u),r!==t&&null!==r||(r=""),u&&(f!==t&&null!==f||(f=""),u='<option value="'+f+'">'+i._text(u)+"</option>"),i._options(n,u,r),r!==ft.unifyType(i._accessor(),typeof r)&&(i._customOption=null,i._custom(r)))},_listBound:function(){var t,n=this,r=n._initialIndex,u=n._state===y,i=n.dataSource.flatView();n._presetValue=!1,n._renderFooter(),n._renderNoData(),n._toggleNoData(!i.length),n._resizePopup(!0),n.popup.position(),n._buildOptions(i),n._makeUnselectable(),u||(n._open&&n.toggle(n._allowOpening()),n._open=!1,n._fetch||(i.length?(!n.listView.value().length&&r>-1&&null!==r&&n.select(r),n._initialIndex=null,t=n.listView.selectedDataItems()[0],t&&n.text()!==n._text(t)&&n._selectValue(t)):n._textAccessor()!==n._optionLabelText()&&(n.listView.value(""),n._selectValue(null),n._oldIndex=n.selectedIndex))),n._hideBusy(),n.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),(this._presetValue||this._old&&this._oldIndex===-1)&&(this._oldIndex=this.selectedIndex)},_filterPaste:function(){this._search()},_focusHandler:function(){this.wrapper.focus()},_focusinHandler:function(){this._inputWrapper.addClass(tt),this._prevent=!1},_focusoutHandler:function(){var n=this,t=window.self!==window.top;n._prevent||(clearTimeout(n._typingTimeout),o.mobileOS.ios&&t?n._change():n._blur(),n._inputWrapper.removeClass(tt),n._prevent=!0,n._open=!1,n.element.blur())},_wrapperMousedown:function(){this._prevent=!!this.filterInput},_wrapperClick:function(n){n.preventDefault(),this.popup.unbind("activate",this._focusInputHandler),this._focused=this.wrapper,this._toggle()},_editable:function(n){var t=this,h=t.element,f=n.disable,o=n.readonly,r=t.wrapper.add(t.filterInput).off(i),e=t._inputWrapper.off(c);o||f?f?(r.removeAttr(s),e.addClass(a).removeClass(l)):(e.addClass(l).removeClass(a),r.on("focusin"+i,u(t._focusinHandler,t)).on("focusout"+i,u(t._focusoutHandler,t))):(h.removeAttr(nt).removeAttr(it),e.addClass(l).removeClass(a).on(c,t._toggleHover),r.attr(s,r.data(s)).attr(k,!1).on("keydown"+i,u(t._keydown,t)).on("focusin"+i,u(t._focusinHandler,t)).on("focusout"+i,u(t._focusoutHandler,t)).on("mousedown"+i,u(t._wrapperMousedown,t)).on("paste"+i,u(t._filterPaste,t)),t.wrapper.on("click"+i,u(t._wrapperClick,t)),t.filterInput||r.on("keypress"+i,u(t._keypress,t))),h.attr(nt,f).attr(it,o),r.attr(k,f)},_keydown:function(n){var h,u,o,i=this,r=n.keyCode,s=n.altKey,e=i.popup.visible();if(i.filterInput&&(h=i.filterInput[0]===w()),r===f.LEFT?(r=f.UP,u=!0):r===f.RIGHT&&(r=f.DOWN,u=!0),!u||!h){if(n.keyCode=r,(s&&r===f.UP||r===f.ESC)&&i._focusElement(i.wrapper),i._state===y&&r===f.ESC&&i._clearFilter(),r===f.ENTER&&i._typingTimeout&&i.filterInput&&e)return n.preventDefault(),t;if(u=i._move(n),!u){if((!e||!i.filterInput)&&(o=i._focus(),r===f.HOME?(u=!0,i._firstItem()):r===f.END&&(u=!0,i._lastItem()),u)){if(i.trigger("select",{dataItem:i._getElementDataItem(i._focus()),item:i._focus()}))return i._focus(o),t;i._select(i._focus(),!0).done(function(){e||i._blur()}),n.preventDefault()}s||u||!i.filterInput||i._search()}}},_matchText:function(n,i){var r=this.options.ignoreCase;return n!==t&&null!==n&&(n+="",r&&(n=n.toLowerCase()),0===n.indexOf(i))},_shuffleData:function(n,t){var i=this._optionLabelDataItem();return i&&(n=[i].concat(n)),n.slice(t).concat(n.slice(0,t))},_selectNext:function(){var e,f,r,n=this,t=n.dataSource.flatView(),u=t.length+(n.hasOptionLabel()?1:0),o=et(n._word,n._last),i=n.selectedIndex;for(i===-1?i=0:(i+=o?1:0,i=g(i,u)),t=t.toJSON?t.toJSON():t.slice(),t=n._shuffleData(t,i),r=0;r<u&&(f=n._text(t[r]),!o||!n._matchText(f,n._last))&&!n._matchText(f,n._word);r++);r!==u&&(e=n._focus(),n._select(g(i+r,u)).done(function(){var t=function(){n.popup.visible()||n._change()};n.trigger("select",{dataItem:n._getElementDataItem(n._focus()),item:n._focus()})?n._select(e).done(t):t()}))},_keypress:function(n){var t,i=this;0!==n.which&&n.keyCode!==r.keys.ENTER&&(t=String.fromCharCode(n.charCode||n.keyCode),i.options.ignoreCase&&(t=t.toLowerCase())," "===t&&n.preventDefault(),i._word+=t,i._last=t,i._search())},_popupOpen:function(){var n=this.popup;n.wrapper=r.wrap(n.element),n.element.closest(".km-root")[0]&&(n.wrapper.addClass("km-popup km-widget"),this.wrapper.addClass("km-widget"))},_popup:function(){e.fn._popup.call(this),this.popup.one("open",u(this._popupOpen,this))},_getElementDataItem:function(n){return n&&n[0]?n[0]===this.optionLabel[0]?this._optionLabelDataItem():this.listView.dataItemByIndex(this.listView.getElementIndex(n)):null},_click:function(i){var r=this,u=i.item||n(i.currentTarget);return i.preventDefault(),r.trigger("select",{dataItem:r._getElementDataItem(u),item:u})?(r.close(),t):(r._userTriggered=!0,r._select(u).done(function(){r._focusElement(r.wrapper),r._blur()}),t)},_focusElement:function(n){var u=w(),f=this.wrapper,t=this.filterInput,r=n===t?f:t,i=o.mobileOS&&(o.touch||o.MSPointers||o.pointers);t&&t[0]===n[0]&&i||t&&r[0]===u&&(this._prevent=!0,this._focused=n.focus())},_searchByWord:function(n){var t,i;n&&(t=this,i=t.options.ignoreCase,i&&(n=n.toLowerCase()),t._select(function(i){return t._matchText(t._text(i),n)}))},_inputValue:function(){return this.text()},_search:function(){var n=this,i=n.dataSource;if(clearTimeout(n._typingTimeout),n._isFilterEnabled())n._typingTimeout=setTimeout(function(){var t=n.filterInput.val();n._prev!==t&&(n._prev=t,n.search(t),n._resizeFilterInput()),n._typingTimeout=null},n.options.delay);else{if(n._typingTimeout=setTimeout(function(){n._word=""},n.options.delay),!n.listView.bound())return i.fetch().done(function(){n._selectNext()}),t;n._selectNext()}},_get:function(t){var r,f,i,u="function"==typeof t,e=u?n():n(t);if(this.hasOptionLabel()&&("number"==typeof t?t>-1&&(t-=1):e.hasClass("k-list-optionlabel")&&(t=-1)),u){for(r=this.dataSource.flatView(),i=0;i<r.length;i++)if(t(r[i])){t=i,f=!0;break}f||(t=-1)}return t},_firstItem:function(){this.hasOptionLabel()?this._focus(this.optionLabel):this.listView.focusFirst()},_lastItem:function(){this._resetOptionLabel(),this.listView.focusLast()},_nextItem:function(){this.optionLabel.hasClass("k-state-focused")?(this._resetOptionLabel(),this.listView.focusFirst()):this.listView.focusNext()},_prevItem:function(){this.optionLabel.hasClass("k-state-focused")||(this.listView.focusPrev(),this.listView.focus()||this._focus(this.optionLabel))},_focusItem:function(){var i=this.options,r=this.listView,u=r.focus(),n=r.select();n=n[n.length-1],n===t&&i.highlightFirst&&!u&&(n=0),n!==t?r.focus(n):!i.optionLabel||i.virtual&&"dataItem"===i.virtual.mapValueTo?r.scrollToIndex(0):(this._focus(this.optionLabel),this._select(this.optionLabel))},_resetOptionLabel:function(n){this.optionLabel.removeClass("k-state-focused"+(n||"")).removeAttr("id")},_focus:function(n){var i=this.listView,r=this.optionLabel;return n===t?(n=i.focus(),!n&&r.hasClass("k-state-focused")&&(n=r),n):(this._resetOptionLabel(),n=this._get(n),i.focus(n),n===-1&&(r.addClass("k-state-focused").attr("id",i._optionID),this._focused.add(this.filterInput).removeAttr("aria-activedescendant").attr("aria-activedescendant",i._optionID)),t)},_select:function(n,t){var i=this;return n=i._get(n),i.listView.select(n).done(function(){t||i._state!==y||(i._state=b),n===-1&&i._selectValue(null)})},_selectValue:function(n){var i=this,f=i.options.optionLabel,r=i.listView.select(),u="",e="";r=r[r.length-1],r===t&&(r=-1),this._resetOptionLabel(" k-state-selected"),n?(e=n,u=i._dataValue(n),f&&(r+=1)):f&&(i._focus(i.optionLabel.addClass("k-state-selected")),e=i._optionLabelText(),u="string"==typeof f?"":i._value(f),r=0),i.selectedIndex=r,null===u&&(u=""),i._textAccessor(e),i._accessor(u,r),i._triggerCascade()},_mobile:function(){var r=this,t=r.popup,n=o.mobileOS,i=t.element.parents(".km-root").eq(0);i.length&&n&&(t.options.animation.open.effects=n.android||n.meego?"fadeIn":n.ios||n.wp?"slideIn:up":t.options.animation.open.effects)},_filterHeader:function(){var t;this.filterInput&&(this.filterInput.off(i).parent().remove(),this.filterInput=null),this._isFilterEnabled()&&(t='<span class="k-icon k-i-zoom"></span>',this.filterInput=n('<input class="k-textbox"/>').attr({placeholder:this.element.attr("placeholder"),title:this.element.attr("title"),role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),this.list.prepend(n('<span class="k-list-filter" />').append(this.filterInput.add(t))))},_span:function(){var r,t=this,i=t.wrapper,u="span.k-input";r=i.find(u),r[0]||(i.append('<span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input">&nbsp;</span><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>').append(t.element),r=i.find(u)),t.span=r,t._inputWrapper=n(i[0].firstChild),t._arrow=i.find(".k-select"),t._arrowIcon=t._arrow.find(".k-icon")},_wrapper:function(){var n,r=this,t=r.element,i=t[0];n=t.parent(),n.is("span.k-widget")||(n=t.wrap("<span />").parent(),n[0].style.cssText=i.style.cssText,n[0].title=i.title),r._focused=r.wrapper=n.addClass("k-widget k-dropdown k-header").addClass(i.className).css("display","").attr({accesskey:t.attr("accesskey"),unselectable:"on",role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),t.hide().removeAttr("accesskey")},_clearSelection:function(n){this.select(n.value()?0:-1)},_inputTemplate:function(){var t=this,i=t.options.valueTemplate;if(i=i?r.template(i):n.proxy(r.template("#:this._text(data)#",{useWithBlock:!1}),t),t.valueTemplate=i,t.hasOptionLabel()&&!t.options.optionLabelTemplate)try{t.valueTemplate(t._optionLabelDataItem())}catch(u){throw Error(ut);}},_textAccessor:function(i){var e,r=null,o=this.valueTemplate,u=this._optionLabelText(),f=this.span;if(i===t)return f.text();n.isPlainObject(i)||i instanceof p?r=i:u&&u===i&&(r=this.options.optionLabel),r||(r=this._assignInstance(i,this._accessor())),this.hasOptionLabel()&&(r!==u&&this._text(r)!==u||(o=this.optionLabelTemplate,"string"!=typeof this.options.optionLabel||this.options.optionLabelTemplate||(r=u))),e=function(){return{elements:f.get(),data:[{dataItem:r}]}},this.angular("cleanup",e);try{f.html(o(r))}catch(s){f.html("")}this.angular("compile",e)},_preselect:function(n,t){n||t||(t=this._optionLabelText()),this._accessor(n),this._textAccessor(t),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(n),this._initialIndex=null,this._presetValue=!0},_assignInstance:function(n,t){var r=this.options.dataTextField,i={};return r?(d(i,r.split("."),n),d(i,this.options.dataValueField.split("."),t),i=new p(i)):i=n,i}});v.plugin(rt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.combobox.min",["kendo.list.min","kendo.mobile.scroller.min"],n)}(function(){return function(n,t){var u=window.kendo,c=u.ui,nt=c.List,o=c.Select,p=u.caret,ut=u.support,k=ut.placeholder,y=u._activeElement,w=u.keys,i=".kendoComboBox",e="click"+i,f="mousedown"+i,it="disabled",d="readonly",h="change",l="k-state-default",tt="k-state-focused",v="k-state-disabled",g="aria-disabled",s="filter",a="accept",b="rebind",ft="mouseenter"+i+" mouseleave"+i,r=n.proxy,rt=o.extend({init:function(t,f){var s,h,e=this;e.ns=i,f=n.isArray(f)?{dataSource:f}:f,o.fn.init.call(e,t,f),f=e.options,t=e.element.on("focus"+i,r(e._focusHandler,e)),f.placeholder=f.placeholder||t.attr("placeholder"),e._reset(),e._wrapper(),e._input(),e._clearButton(),e._tabindex(e.input),e._popup(),e._dataSource(),e._ignoreCase(),e._enable(),e._oldIndex=e.selectedIndex=-1,e._aria(),e._initialIndex=f.index,e.requireValueMapper(e.options),e._initList(),e._cascade(),f.autoBind?e._filterSource():(s=f.text,!s&&e._isSelect&&(s=t.children(":selected").text()),s&&e._setText(s)),s||e._placeholder(),h=n(e.element).parents("fieldset").is(":disabled"),h&&e.enable(!1),u.notify(e),e._toggleCloseVisibility()},options:{name:"ComboBox",enabled:!0,index:-1,text:null,value:null,autoBind:!0,delay:200,dataTextField:"",dataValueField:"",minLength:1,enforceMinLength:!1,height:200,highlightFirst:!0,filter:"none",placeholder:"",suggest:!1,cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{},virtual:!1,template:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0,syncValueAndText:!0},events:["open","close",h,"select","filtering","dataBinding","dataBound","cascade","set"],setOptions:function(n){o.fn.setOptions.call(this,n),this.listView.setOptions(n),this._accessors(),this._aria()},destroy:function(){var n=this;n.input.off(i),n.element.off(i),n._inputWrapper.off(i),clearTimeout(n._pasteTimeout),n._arrow.off(e+" "+f),n._clear.off(e+" "+f),o.fn.destroy.call(n)},_change:function(){var n=this,i=n.text(),f=i&&i!==n._oldText&&i!==n.options.placeholder,r=n.selectedIndex,u=r===-1;return!n.options.syncValueAndText&&!n.value()&&u&&f?(n._old="",n._oldIndex=r,n._oldText=i,n._typing||n.element.trigger(h),n.trigger(h),n._typing=!1,t):(o.fn._change.call(n),n._toggleCloseVisibility(),t)},_focusHandler:function(){this.input.focus()},_arrowClick:function(){this._toggle()},_inputFocus:function(){this._inputWrapper.addClass(tt),this._placeholder(!1)},_inputFocusout:function(){var i,u,n=this,r=n.value();return n._inputWrapper.removeClass(tt),clearTimeout(n._typingTimeout),n._typingTimeout=null,n.text(n.text()),i=n._focus(),u=this.listView.dataItemByIndex(this.listView.getElementIndex(i)),r!==n.value()&&n.trigger("select",{dataItem:u,item:i})?(n.value(r),t):(n._placeholder(),n._blur(),n.element.blur(),t)},_inputPaste:function(){var n=this;clearTimeout(n._pasteTimeout),n._pasteTimeout=null,n._pasteTimeout=setTimeout(function(){n.search()})},_editable:function(n){var t=this,u=n.disable,h=n.readonly,s=t._inputWrapper.off(i),o=t.element.add(t.input.off(i)),a=t._arrow.off(e+" "+f),c=t._clear;h||u?(s.addClass(u?v:l).removeClass(u?l:v),o.attr(it,u).attr(d,h).attr(g,u)):(s.addClass(l).removeClass(v).on(ft,t._toggleHover),o.removeAttr(it).removeAttr(d).attr(g,!1),a.on(e,r(t._arrowClick,t)).on(f,function(n){n.preventDefault()}),c.on(e,r(t._clearValue,t)).on(f,function(n){n.preventDefault()}),t.input.on("keydown"+i,r(t._keydown,t)).on("focus"+i,r(t._inputFocus,t)).on("focusout"+i,r(t._inputFocusout,t)).on("paste"+i,r(t._inputPaste,t)))},open:function(){var n=this,t=n._state;n.popup.visible()||(!n.listView.bound()&&t!==s||t===a?(n._open=!0,n._state=b,1!==n.options.minLength?(n.refresh(),n._openPopup()):n._filterSource()):n._allowOpening()&&(n._openPopup(),n._focusItem()))},_scrollToFocusedItem:function(){var n=this.listView;n.scrollToIndex(n.getElementIndex(n.focus()))},_openPopup:function(){this.popup.one("activate",r(this._scrollToFocusedItem,this)),this.popup.open()},_updateSelectionState:function(){var n=this,i=n.options.text,r=n.options.value;n.listView.isFiltered()||(n.selectedIndex===-1?(i!==t&&null!==i||(i=r),n._accessor(r),n.input.val(i||n.input.val()),n._placeholder()):n._oldIndex===-1&&(n._oldIndex=n.selectedIndex))},_buildOptions:function(n){var r,i=this;i._isSelect&&(r=i._customOption,i._state===b&&(i._state=""),i._customOption=t,i._options(n,"",i.value()),r&&r[0].selected&&i._custom(r.val()))},_updateSelection:function(){var r,i=this,u=i.listView,f=i._initialIndex,o=null!==f&&f>-1,e=i._state===s;return e?(n(u.focus()).removeClass("k-state-selected"),t):(i._fetch||(u.value().length||(o?i.select(f):i._accessor()&&u.value(i._accessor())),i._initialIndex=null,r=u.selectedDataItems()[0],r&&(i._value(r)!==i.value()&&i._custom(i._value(r)),i.text()&&i.text()!==i._text(r)&&i._selectValue(r))),t)},_updateItemFocus:function(){var n=this.listView;this.options.highlightFirst?n.focus()||n.focusIndex()||n.focus(0):n.focus(-1)},_listBound:function(){var n=this,u=n.input[0]===y(),i=n.dataSource.flatView(),r=n.listView.skip(),f=r===t||0===r;n._presetValue=!1,n._renderFooter(),n._renderNoData(),n._toggleNoData(!i.length),n._resizePopup(),n.popup.position(),n._buildOptions(i),n._makeUnselectable(),n._updateSelection(),i.length&&f&&(n._updateItemFocus(),n.options.suggest&&u&&n.input.val()&&n.suggest(i[0])),n._open&&(n._open=!1,n._typingTimeout&&!u?n.popup.close():n.toggle(n._allowOpening()),n._typingTimeout=null),n._hideBusy(),n.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),this._presetValue&&(this._oldIndex=this.selectedIndex)},_get:function(n){var i,r,t;if("function"==typeof n){for(i=this.dataSource.flatView(),t=0;t<i.length;t++)if(n(i[t])){n=t,r=!0;break}r||(n=-1)}return n},_select:function(n,t){var i=this;return n=i._get(n),n===-1&&(i.input[0].value="",i._accessor("")),i.listView.select(n).done(function(){t||i._state!==s||(i._state=a)})},_selectValue:function(n){var i=this.listView.select(),r="",u="";i=i[i.length-1],i===t&&(i=-1),this.selectedIndex=i,i!==-1||n?(n&&(r=this._dataValue(n),u=this._text(n)),null===r&&(r="")):(u=this.input[0].value,this.options.syncValueAndText&&(r=u),this.listView.focus(-1)),this._prev=this.input[0].value=u,this._accessor(r!==t?r:u,i),this._placeholder(),this._triggerCascade()},refresh:function(){this.listView.refresh()},_toggleCloseVisibility:function(){this.text()?this._showClear():this._hideClear()},suggest:function(n){var e,r=this,f=r.input[0],i=r.text(),u=p(f)[0],o=r._last;return o==w.BACKSPACE||o==w.DELETE?(r._last=t,t):(n=n||"","string"!=typeof n&&(n[0]&&(n=r.dataSource.view()[nt.inArray(n[0],r.ul[0])]),n=n?r._text(n):""),u<=0&&(u=i.toLowerCase().indexOf(n.toLowerCase())+1),n?(n=""+n,e=n.toLowerCase().indexOf(i.toLowerCase()),e>-1&&(i+=n.substring(e+i.length))):i=i.substring(0,u),i.length===u&&n||(f.value=i,f===y()&&p(f,u,i.length)),t)},text:function(n){var i,f,o,r,u,e;return n=null===n?"":n,i=this,f=i.input[0],o=i.options.ignoreCase,r=n,n===t?f.value:i.options.autoBind!==!1||i.listView.bound()?(u=i.dataItem(),u&&i._text(u)===n&&(e=i._value(u),e===nt.unifyType(i._old,typeof e))?(i._triggerCascade(),t):(o&&!i.listView.value().length&&(r=r.toLowerCase()),i._select(function(n){return n=i._text(n),o&&!i.listView.value().length&&(n=(n+"").toLowerCase()),n===r}).done(function(){i.selectedIndex<0&&(f.value=n,i.options.syncValueAndText&&i._accessor(n),i._triggerCascade()),i._prev=f.value}),t)):(i._setText(n),t)},toggle:function(n){this._toggle(n,!0)},value:function(n){var i=this,u=i.options,r=i.listView;return n===t?(n=i._accessor()||i.listView.value()[0],n===t||null===n?"":n):(i.requireValueMapper(i.options,n),i.trigger("set",{value:n}),n===u.value&&i.input.val()===u.text||(i._accessor(n),i._isFilterEnabled()&&r.bound()&&r.isFiltered()?i._clearFilter():i._fetchData(),r.value(n).done(function(){i.selectedIndex===-1&&(i._accessor(n),i.input.val(n),i._placeholder(!0)),i._old=i._accessor(),i._oldIndex=i.selectedIndex,i._prev=i.input.val(),i._state===s&&(i._state=a)})),t)},_click:function(n){var i=this,r=n.item,u=i.listView.dataItemByIndex(i.listView.getElementIndex(r));return n.preventDefault(),i.trigger("select",{dataItem:u,item:r})?(i.close(),t):(i._userTriggered=!0,i._select(r).done(function(){i._blur()}),t)},_inputValue:function(){return this.text()},_searchByWord:function(n){var r,i=this,e=i.options,f=i.dataSource,u=e.ignoreCase,o=function(r){var f=i._text(r);if(f!==t)return f+="",(""===f||""!==n)&&(u&&(f=f.toLowerCase()),0===f.indexOf(n))};return u&&(n=n.toLowerCase()),i.ul[0].firstChild?(this.listView.focus(this._get(o)),r=this.listView.focus(),r&&(e.suggest&&i.suggest(r),this.open()),this.options.highlightFirst&&!n&&this.listView.focusFirst(),t):(f.one(h,function(){f.view()[0]&&i.search(n)}).fetch(),t)},_input:function(){var i,e,t=this,r=t.element.removeClass("k-input")[0],o=r.accessKey,u=t.wrapper,s="input.k-input",f=r.name||"";f&&(f='name="'+f+'_input" '),i=u.find(s),i[0]||(u.append('<span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-default"><input '+f+'class="k-input" type="text" autocomplete="off"/><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>').append(t.element),i=u.find(s)),i[0].style.cssText=r.style.cssText,i[0].title=r.title,e=parseInt(this.element.prop("maxlength")||this.element.attr("maxlength"),10),e>-1&&(i[0].maxLength=e),i.addClass(r.className).css({width:"100%",height:r.style.height}).attr({role:"combobox","aria-expanded":!1}).show(),k&&i.attr("placeholder",t.options.placeholder),o&&(r.accessKey="",i[0].accessKey=o),t._focused=t.input=i,t._inputWrapper=n(u[0].firstChild),t._arrow=u.find(".k-select").attr({role:"button",tabIndex:-1}),t._arrowIcon=t._arrow.find(".k-icon"),r.id&&t._arrow.attr("aria-controls",t.ul[0].id)},_clearButton:function(){this._clear=n('<span unselectable="on" class="k-icon k-clear-value k-i-close" title="clear"></span>').attr({role:"button",tabIndex:-1}),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-combobox-clearable"))},_keydown:function(n){var t=this,i=n.keyCode;t._last=i,clearTimeout(t._typingTimeout),t._typingTimeout=null,i==w.TAB||t._move(n)||t._search()},_placeholder:function(n){if(!k){var f,u=this,i=u.input,r=u.options.placeholder;if(r){if(f=u.value(),n===t&&(n=!f),i.toggleClass("k-readonly",n),!n){if(f)return;r=""}i.val(r),r||i[0]!==y()||p(i[0],0,0)}}},_search:function(){var n=this;n._typingTimeout=setTimeout(function(){var t=n.text();n._prev!==t&&(n._prev=t,"none"===n.options.filter&&n.listView.select(-1),n.search(t),n._toggleCloseVisibility()),n._typingTimeout=null},n.options.delay)},_setText:function(n){this.input.val(n),this._prev=n},_wrapper:function(){var i=this,t=i.element,n=t.parent();n.is("span.k-widget")||(n=t.hide().wrap("<span />").parent(),n[0].style.cssText=t[0].style.cssText),i.wrapper=n.addClass("k-widget k-combobox k-header").addClass(t[0].className).css("display","")},_clearSelection:function(n,t){var r=this,i=n.value(),u=i&&n.selectedIndex===-1;this.selectedIndex==-1&&this.value()||(t||!i||u)&&(r.options.value="",r.value(""))},_preselect:function(n,t){this.input.val(t),this._accessor(n),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(n),this._placeholder(),this._initialIndex=null,this._presetValue=!0}});c.plugin(rt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.multiselect.min",["kendo.list.min","kendo.mobile.scroller.min"],n)}(function(){return function(n,t){function vt(n,t){var i;if(null===n&&null!==t||null!==n&&null===t||(i=n.length,i!==t.length))return!1;for(;i--;)if(n[i]!==t[i])return!1;return!0}var i=window.kendo,ut=i.ui,e=ut.List,r=i.keys,rt=i._activeElement,at=i.data.ObservableArray,f=n.proxy,o="id",a="li",c="accept",b="filter",w="rebind",it="open",ot="close",l="change",yt="progress",ft="select",y="deselect",et="aria-disabled",s="k-state-focused",v="k-hidden",tt="k-state-hover",p="k-state-disabled",g="disabled",d="readonly",u=".kendoMultiSelect",wt="click"+u,pt="keydown"+u,k="mouseenter"+u,nt="mouseleave"+u,ht=k+" "+nt,lt=/"/g,h=n.isArray,ct=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],st=e.extend({init:function(t,r){var s,h,f=this;f.ns=u,e.fn.init.call(f,t,r),f._optionsMap={},f._customOptions={},f._wrapper(),f._tagList(),f._input(),f._textContainer(),f._loader(),f._clearButton(),f._tabindex(f.input),t=f.element.attr("multiple","multiple").hide(),r=f.options,r.placeholder||(r.placeholder=t.data("placeholder")),s=t.attr(o),s&&(f._tagID=s+"_tag_active",s+="_taglist",f.tagList.attr(o,s)),f._aria(s),f._dataSource(),f._ignoreCase(),f._popup(),f._tagTemplate(),f.requireValueMapper(f.options),f._initList(),f._reset(),f._enable(),f._placeholder(),r.autoBind?f.dataSource.fetch():r.value&&f._preselect(r.value),h=n(f.element).parents("fieldset").is(":disabled"),h&&f.enable(!1),i.notify(f),f._toggleCloseVisibility()},options:{name:"MultiSelect",tagMode:"multiple",enabled:!0,autoBind:!0,autoClose:!0,highlightFirst:!0,dataTextField:"",dataValueField:"",filter:"startswith",ignoreCase:!0,minLength:1,enforceMinLength:!1,delay:100,value:null,maxSelectedItems:null,placeholder:"",height:200,animation:{},virtual:!1,itemTemplate:"",tagTemplate:"",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0},events:[it,ot,l,ft,y,"filtering","dataBinding","dataBound"],setDataSource:function(n){this.options.dataSource=n,this._state="",this._dataSource(),this.listView.setDataSource(this.dataSource),this.options.autoBind&&this.dataSource.fetch()},setOptions:function(n){var t=this._listOptions(n);e.fn.setOptions.call(this,n),this.listView.setOptions(t),this._accessors(),this._aria(this.tagList.attr(o)),this._tagTemplate()},currentTag:function(n){var i=this;return n===t?i._currentTag:(i._currentTag&&(i._currentTag.removeClass(s).removeAttr(o),i.input.removeAttr("aria-activedescendant")),n&&(n.addClass(s).attr(o,i._tagID),i.input.attr("aria-activedescendant",i._tagID)),i._currentTag=n,t)},dataItems:function(){return this.listView.selectedDataItems()},destroy:function(){var n=this,t=n.ns;clearTimeout(n._busy),clearTimeout(n._typingTimeout),n.wrapper.off(t),n.tagList.off(t),n.input.off(t),n._clear.off(t),e.fn.destroy.call(n)},_activateItem:function(){e.fn._activateItem.call(this),this.currentTag(null)},_listOptions:function(t){var o=this,r=e.fn._listOptions.call(o,n.extend(t,{selectedItemChange:f(o._selectedItemChange,o),selectable:"multiple"})),s=this.options.itemTemplate||this.options.template,u=r.itemTemplate||s||r.template;return u||(u="#:"+i.expr(r.dataTextField,"data")+"#"),r.template=u,r},_setListValue:function(){e.fn._setListValue.call(this,this._initialValues.slice(0))},_listChange:function(n){var i,f=this.dataSource.flatView(),u=this._optionsMap,r=this._value;for(this._state===w&&(this._state=""),i=0;i<n.added.length;i++)if(u[r(n.added[i].dataItem)]===t){this._render(f);break}this._selectValue(n.added,n.removed)},_selectedItemChange:function(n){for(var i,r=n.items,t=0;t<r.length;t++)i=r[t],this.tagList.children().eq(i.index).children("span:first").html(this.tagTextTemplate(i.item))},_wrapperMousedown:function(t){var u=this,e="input"!==t.target.nodeName.toLowerCase(),f=n(t.target),r=f.hasClass("k-select")||f.hasClass("k-icon");r&&(r=!f.closest(".k-select").children(".k-i-arrow-60-down").length),!e||r&&i.support.mobileOS||t.preventDefault(),r||(u.input[0]!==rt()&&e&&u.input.focus(),1===u.options.minLength&&u.open())},_inputFocus:function(){this._placeholder(!1),this.wrapper.addClass(s)},_inputFocusout:function(){var n=this;clearTimeout(n._typingTimeout),n.wrapper.removeClass(s),n._placeholder(!n.listView.selectedDataItems()[0],!0),n.close(),n._state===b&&(n._state=c,n.listView.skipUpdate(!0)),n.element.blur()},_removeTag:function(n){var h,e,i=this,o=i._state,u=n.index(),r=i.listView,s=r.value()[u],l=i.listView.selectedDataItems()[u],f=i._customOptions[s];return i.trigger(y,{dataItem:l,item:n})?(i._close(),t):(f!==t||o!==c&&o!==b||(f=i._optionsMap[s]),e=function(){i.currentTag(null),i._change(),i._close()},f===t?r.select(r.select()[u]).done(e):(h=i.element[0].children[f],h.selected=!1,r.removeAt(u),n.remove(),e()),t)},_tagListClick:function(t){var i=n(t.currentTarget);i.children(".k-i-arrow-60-down").length||this._removeTag(i.closest(a))},_clearClick:function(){var t=this;t.tagList.children().each(function(i,r){t._removeTag(n(r))}),t.input.val(""),t._search(),t.trigger("change"),t.focus()},_editable:function(t){var i=this,r=t.disable,s=t.readonly,e=i.wrapper.off(u),h=i.tagList.off(u),o=i.element.add(i.input.off(u));s||r?(r?e.addClass(p):e.removeClass(p),o.attr(g,r).attr(d,s).attr(et,r)):(e.removeClass(p).on(ht,i._toggleHover).on("mousedown"+u+" touchend"+u,f(i._wrapperMousedown,i)),i.input.on(pt,f(i._keydown,i)).on("paste"+u,f(i._search,i)).on("focus"+u,f(i._inputFocus,i)).on("focusout"+u,f(i._inputFocusout,i)),i._clear.on("click"+u,f(i._clearClick,i)),o.removeAttr(g).removeAttr(d).attr(et,!1),h.on(k,a,function(){n(this).addClass(tt)}).on(nt,a,function(){n(this).removeClass(tt)}).on(wt,"li.k-button .k-select",f(i._tagListClick,i)))},_close:function(){var n=this;n.options.autoClose?n.close():n.popup.position()},_filterSource:function(n,t){t||(t=this._retrieveData),this._retrieveData=!1,e.fn._filterSource.call(this,n,t)},close:function(){this.popup.close()},open:function(){var n=this;n._request&&(n._retrieveData=!1),n._retrieveData||!n.listView.bound()||n._state===c?(n._open=!0,n._state=w,n.listView.skipUpdate(!0),n._filterSource()):n._allowOpening()&&(n.popup.open(),n._focusItem())},toggle:function(n){n=n!==t?n:!this.popup.visible(),this[n?it:ot]()},refresh:function(){this.listView.refresh()},_listBound:function(){var n=this,r=n.dataSource.flatView(),i=n.listView.skip();n._render(r),n._renderFooter(),n._renderNoData(),n._toggleNoData(!r.length),n._resizePopup(),n._open&&(n._open=!1,n.toggle(n._allowOpening())),n.popup.position(),!n.options.highlightFirst||i!==t&&0!==i||n.listView.focusFirst(),n._touchScroller&&n._touchScroller.reset(),n._hideBusy(),n._makeUnselectable(),n.trigger("dataBound")},_inputValue:function(){var t=this,n=t.input.val();return t.options.placeholder===n&&(n=""),n},value:function(n){var i=this,r=i.listView,e=r.value().slice(),u=i.options.maxSelectedItems,f=r.bound()&&r.isFiltered();return n===t?e:(i.requireValueMapper(i.options,n),n=i._normalizeValues(n),null!==u&&n.length>u&&(n=n.slice(0,u)),f&&i._clearFilter(),r.value(n),i._old=r.value(),f||i._fetchData(),t)},_preselect:function(t,r){var u=this;h(t)||t instanceof i.data.ObservableArray||(t=[t]),(n.isPlainObject(t[0])||t[0]instanceof i.data.ObservableObject||!u.options.dataValueField)&&(u.dataSource.data(t),u.value(r||u._initialValues),u._retrieveData=!0)},_setOption:function(n,t){var i=this.element[0].children[this._optionsMap[n]];i&&(i.selected=t)},_fetchData:function(){var n=this,i=!!n.dataSource.view().length,t=0===n.listView.value().length;t||n._request||(n._retrieveData||!n._fetch&&!i)&&(n._fetch=!0,n._retrieveData=!1,n.dataSource.read().done(function(){n._fetch=!1}))},_isBound:function(){return this.listView.bound()&&!this._retrieveData},_dataSource:function(){var n=this,u=n.element,r=n.options,t=r.dataSource||{};t=h(t)?{data:t}:t,t.select=u,t.fields=[{field:r.dataTextField},{field:r.dataValueField}],n.dataSource&&n._refreshHandler?n._unbindDataSource():(n._progressHandler=f(n._showBusy,n),n._errorHandler=f(n._hideBusy,n)),n.dataSource=i.data.DataSource.create(t).bind(yt,n._progressHandler).bind("error",n._errorHandler)},_reset:function(){var t=this,u=t.element,r=u.attr("form"),i=r?n("#"+r):u.closest("form");i[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initialValues),t._placeholder()})},t._form=i.on("reset",t._resetHandler))},_initValue:function(){var n=this.options.value||this.element.val();this._old=this._initialValues=this._normalizeValues(n)},_normalizeValues:function(t){var i=this;return null===t?t=[]:t&&n.isPlainObject(t)?t=[i._value(t)]:t&&n.isPlainObject(t[0])?t=n.map(t,function(n){return i._value(n)}):h(t)||t instanceof at?h(t)&&(t=t.slice()):t=[t],t},_change:function(){var n=this,t=n.value();vt(t,n._old)||(n._old=t.slice(),n.trigger(l),n.element.trigger(l)),n._toggleCloseVisibility()},_click:function(n){var t=this,i=n.item;n.preventDefault(),t._select(i).done(function(){t._change(),t._close()})},_keydown:function(u){var v,f=this,o=u.keyCode,e=f._currentTag,s=f.listView,a=s.focus(),c=f.input.val(),l=i.support.isRtl(f.wrapper),h=f.popup.visible();if(o===r.DOWN){if(u.preventDefault(),!h)return f.open(),a||s.focusFirst(),t;a?(s.focusNext(),s.focus()||s.focusLast()):s.focusFirst()}else if(o===r.UP)h&&(a&&s.focusPrev(),s.focus()||f.close()),u.preventDefault();else if(o===r.LEFT&&!l||o===r.RIGHT&&l)c||(e=e?e.prev():n(f.tagList[0].lastChild),e[0]&&f.currentTag(e));else if(o===r.RIGHT&&!l||o===r.LEFT&&l)!c&&e&&(e=e.next(),f.currentTag(e[0]?e:null));else if(o===r.ENTER&&h)f._select(a).done(function(){f._change(),f._close()}),u.preventDefault();else if(o===r.ESC)h?u.preventDefault():f.currentTag(null),f.close();else if(o===r.HOME)h?s.focusFirst():c||(e=f.tagList[0].firstChild,e&&f.currentTag(n(e)));else if(o===r.END)h?s.focusLast():c||(e=f.tagList[0].lastChild,e&&f.currentTag(n(e)));else if(o!==r.DELETE&&o!==r.BACKSPACE||c)!f.popup.visible()||o!==r.PAGEDOWN&&o!==r.PAGEUP?(clearTimeout(f._typingTimeout),setTimeout(function(){f._scale()}),f._search()):(u.preventDefault(),v=o===r.PAGEDOWN?1:-1,s.scrollWith(v*s.screenHeight()));else{if("single"===f.options.tagMode)return s.value([]),f._change(),f._close(),t;o!==r.BACKSPACE||e||(e=n(f.tagList[0].lastChild)),e&&e[0]&&f._removeTag(e)}},_hideBusy:function(){var n=this;clearTimeout(n._busy),n.input.attr("aria-busy",!1),n._loading.addClass(v),n._request=!1,n._busy=null,n._showClear()},_showBusyHandler:function(){this.input.attr("aria-busy",!0),this._loading.removeClass(v),this._hideClear()},_showBusy:function(){var n=this;n._request=!0,n._busy||(n._busy=setTimeout(f(n._showBusyHandler,n),100))},_placeholder:function(n,r){var u=this,e=u.input,s=rt(),c=u.options.placeholder,f=e.val(),h=e[0]===s,o=f.length;h&&!u.options.autoClose&&f!==c||(o=0,f=""),n===t&&(n=!1,e[0]!==s&&(n=!u.listView.selectedDataItems()[0])),u._prev=f,e.toggleClass("k-readonly",n).val(n?c:f),h&&!r&&i.caret(e[0],o,o),u._scale()},_scale:function(){var i,t=this,r=t.wrapper,u=r.width(),n=t._span.text(t.input.val());r.is(":visible")?i=n.width()+25:(n.appendTo(document.documentElement),u=i=n.width()+25,n.appendTo(r)),t.input.width(i>u?u:i)},_option:function(n,r,u){var f="<option";return n!==t&&(n+="",n.indexOf('"')!==-1&&(n=n.replace(lt,"&quot;")),f+=' value="'+n+'"'),u&&(f+=" selected"),f+=">",r!==t&&(f+=i.htmlEncode(r)),f+="</option>"},_render:function(n){var e,u,i,t,h,f,r=this.listView.selectedDataItems(),c=this.listView.value(),o=n.length,s="";for(c.length!==r.length&&(r=this._buildSelectedItems(c)),h={},f={},t=0;t<o;t++)u=n[t],i=this._value(u),e=this._selectedItemIndex(i,r),e!==-1&&r.splice(e,1),f[i]=t,s+=this._option(i,this._text(u),e!==-1);if(r.length)for(t=0;t<r.length;t++)u=r[t],i=this._value(u),h[i]=o,f[i]=o,o+=1,s+=this._option(i,this._text(u),!0);this._customOptions=h,this._optionsMap=f,this.element.html(s)},_buildSelectedItems:function(n){for(var i,u=this.options.dataValueField,f=this.options.dataTextField,r=[],t=0;t<n.length;t++)i={},i[u]=n[t],i[f]=n[t],r.push(i);return r},_selectedItemIndex:function(n,t){for(var r=this._value,i=0;i<t.length;i++)if(n===r(t[i]))return i;return-1},_search:function(){var n=this;n._typingTimeout=setTimeout(function(){var t=n._inputValue();n._prev!==t&&(n._prev=t,n.search(t),n._toggleCloseVisibility())},n.options.delay)},_toggleCloseVisibility:function(){this.value().length||this.input.val()&&this.input.val()!==this.options.placeholder?this._showClear():this._hideClear()},_allowOpening:function(){return this._allowSelection()&&e.fn._allowOpening.call(this)},_allowSelection:function(){var n=this.options.maxSelectedItems;return null===n||n>this.listView.value().length},_angularTagItems:function(t){var i=this;i.angular(t,function(){return{elements:i.tagList[0].children,data:n.map(i.dataItems(),function(n){return{dataItem:n}})}})},_selectValue:function(n,t){var o,s,r,i=this,h=i.value(),e=i.dataSource.total(),u=i.tagList,f=i._value;if(i._angularTagItems("cleanup"),"multiple"===i.options.tagMode){for(r=t.length-1;r>-1;r--)o=t[r],u[0].removeChild(u[0].children[o.position]),i._setOption(f(o.dataItem),!1);for(r=0;r<n.length;r++)s=n[r],u.append(i.tagTemplate(s.dataItem)),i._setOption(f(s.dataItem),!0)}else{for((!i._maxTotal||i._maxTotal<e)&&(i._maxTotal=e),u.html(""),h.length&&u.append(i.tagTemplate({values:h,dataItems:i.dataItems(),maxTotal:i._maxTotal,currentTotal:e})),r=t.length-1;r>-1;r--)i._setOption(f(t[r].dataItem),!1);for(r=0;r<n.length;r++)i._setOption(f(n[r].dataItem),!0)}i._angularTagItems("compile"),i._placeholder()},_select:function(t){var i,r,f,e,u=n.Deferred().resolve();return t?(i=this,r=i.listView,f=r.dataItemByIndex(r.getElementIndex(t)),e=t.hasClass("k-state-selected"),i._state===w&&(i._state=""),i._allowSelection()?i.trigger(e?y:ft,{dataItem:f,item:t})?(i._close(),u):r.select(t).done(function(){i._placeholder(),i._state===b&&(i._state=c,r.skipUpdate(!0))}):u):u},_input:function(){var t=this,r=t.element,u=r[0].accessKey,i=t._innerWrapper.children("input.k-input");i[0]||(i=n('<input class="k-input" style="width: 25px" />').appendTo(t._innerWrapper)),r.removeAttr("accesskey"),t._focused=t.input=i.attr({accesskey:u,autocomplete:"off",role:"listbox",title:r[0].title,"aria-expanded":!1})},_tagList:function(){var i=this,t=i._innerWrapper.children("ul");t[0]||(t=n('<ul role="listbox" deselectable="on" class="k-reset"/>').appendTo(i._innerWrapper)),i.tagList=t},_tagTemplate:function(){var f,r=this,n=r.options,t=n.tagTemplate,e=n.dataSource,u="multiple"===n.tagMode;r.element[0].length&&!e&&(n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value"),f=u?i.template("#:"+i.expr(n.dataTextField,"data")+"#",{useWithBlock:!1}):i.template("#:values.length# item(s) selected"),r.tagTextTemplate=t=t?i.template(t):f,r.tagTemplate=function(n){return'<li class="k-button" deselectable="on"><span deselectable="on">'+t(n)+'</span><span unselectable="on" aria-label="'+(u?"delete":"open")+'" class="k-select"><span class="k-icon '+(u?"k-i-close":"k-i-arrow-60-down")+'"></span></span></li>'}},_loader:function(){this._loading=n('<span class="k-icon k-i-loading '+v+'"></span>').insertAfter(this.input)},_clearButton:function(){this._clear=n('<span deselectable="on" class="k-icon k-clear-value k-i-close" title="clear"></span>').attr({role:"button",tabIndex:-1}),this.options.clearButton&&this._clear.insertAfter(this.input)},_textContainer:function(){var t=i.getComputedStyles(this.input[0],ct);t.position="absolute",t.visibility="hidden",t.top=-3333,t.left=-3333,this._span=n("<span/>").css(t).appendTo(this.wrapper)},_wrapper:function(){var r=this,i=r.element,t=i.parent("span.k-multiselect");t[0]||(t=i.wrap('<div class="k-widget k-multiselect k-header" deselectable="on" />').parent(),t[0].style.cssText=i[0].style.cssText,t[0].title=i[0].title,n('<div class="k-multiselect-wrap k-floatwrap" deselectable="on" />').insertBefore(i)),r.wrapper=t.addClass(i[0].className).css("display",""),r._innerWrapper=n(t[0].firstChild)}});ut.plugin(st)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.slider.min",["kendo.draganddrop.min"],n)}(function(){return function(n,t){function hi(n,t,i){var f=i?" k-slider-horizontal":" k-slider-vertical",r=n.style?n.style:t.attr("style"),e=t.attr("class")?" "+t.attr("class"):"",u="";return"bottomRight"==n.tickPlacement?u=" k-slider-bottomright":"topLeft"==n.tickPlacement&&(u=" k-slider-topleft"),r=r?" style='"+r+"'":"","<div class='k-widget k-slider"+f+e+"'"+r+"><div class='k-slider-wrap"+(n.showButtons?" k-slider-buttons":"")+u+"'></div></div>"}function ti(n,t,i,r){var u="";return u=i?!r&&"increase"==t||r&&"increase"!=t?"k-i-arrow-60-right":"k-i-arrow-60-left":"increase"==t?"k-i-arrow-60-up":"k-i-arrow-60-down","<a class='k-button k-button-"+t+"' title='"+n[t+"ButtonTitle"]+"' aria-label='"+n[t+"ButtonTitle"]+"'><span class='k-icon "+u+"'></span></a>"}function ci(n,t){for(var u="<ul class='k-reset k-slider-items'>",f=i.floor(o(t/n.smallStep))+1,r=0;r<f;r++)u+="<li class='k-tick' role='presentation'>&nbsp;</li>";return u+="</ul>"}function si(n,t){var i=t.is("input")?1:2,r=2==i?n.leftDragHandleTitle:n.dragHandleTitle;return"<div class='k-slider-track'><div class='k-slider-selection'><!-- --></div><a href='#' class='k-draghandle' title='"+r+"' role='slider' aria-valuemin='"+n.min+"' aria-valuemax='"+n.max+"' aria-valuenow='"+(i>1?n.selectionStart||n.min:n.value||n.min)+"'>Drag</a>"+(i>1?"<a href='#' class='k-draghandle' title='"+n.rightDragHandleTitle+"'role='slider' aria-valuemin='"+n.min+"' aria-valuemax='"+n.max+"' aria-valuenow='"+(n.selectionEnd||n.max)+"'>Drag</a>":"")+"</div>"}function b(n){return function(t){return t+n}}function ii(n){return function(){return n}}function h(n){return(n+"").replace(".",r.cultures.current.numberFormat["."])}function ai(n){var i=""+n,t=0;return i=i.split("."),i[1]&&(t=i[1].length),t=t>10?10:t}function o(n){var r,t;return n=parseFloat(n,10),r=ai(n),t=i.pow(10,r||0),i.round(n*t)/t}function s(n,i){var r=ei(n.getAttribute(i));return null===r&&(r=t),r}function kt(n){return typeof n!==li}function it(n){return 1e4*n}var et,r=window.kendo,at=r.ui.Widget,oi=r.ui.Draggable,g=r._outerWidth,vt=r._outerHeight,ri=n.extend,yt=r.format,ei=r.parseFloat,f=n.proxy,gt=n.isArray,i=Math,dt=r.support,fi=dt.pointers,ui=dt.msPointers,tt="change",wt="slide",u=".slider",rt="touchstart"+u+" mousedown"+u,k=fi?"pointerdown"+u:ui?"MSPointerDown"+u:rt,v="touchend"+u+" mouseup"+u,ht=fi?"pointerup":ui?"MSPointerUp"+u:v,ot="moveSelection",p="keydown"+u,ft="click"+u,ut="mouseover"+u,ct="focus"+u,st="blur"+u,e=".k-draghandle",w=".k-slider-track",c=".k-tick",y="k-state-selected",l="k-state-focused",bt="k-state-default",pt="k-state-disabled",d="disabled",li="undefined",lt="tabindex",ni=r.getTouches,nt=at.extend({init:function(n,t){var u,i=this;if(at.fn.init.call(i,n,t),t=i.options,i._isHorizontal="horizontal"==t.orientation,i._isRtl=i._isHorizontal&&r.support.isRtl(n),i._position=i._isHorizontal?"left":"bottom",i._sizeFn=i._isHorizontal?"width":"height",i._outerSize=i._isHorizontal?g:vt,t.tooltip.format=t.tooltip.enabled?t.tooltip.format||"{0}":"{0}",t.smallStep<=0)throw Error("Kendo UI Slider smallStep must be a positive number.");i._createHtml(),i.wrapper=i.element.closest(".k-slider"),i._trackDiv=i.wrapper.find(w),i._setTrackDivWidth(),i._maxSelection=i._trackDiv[i._sizeFn](),i._sliderItemsInit(),i._reset(),i._tabindex(i.wrapper.find(e)),i[t.enabled?"enable":"disable"](),u=r.support.isRtl(i.wrapper)?-1:1,i._keyMap={37:b(-1*u*t.smallStep),40:b(-t.smallStep),39:b(1*u*t.smallStep),38:b(+t.smallStep),35:ii(t.max),36:ii(t.min),33:b(+t.largeStep),34:b(-t.largeStep)},r.notify(i)},events:[tt,wt],options:{enabled:!0,min:0,max:10,smallStep:1,largeStep:5,orientation:"horizontal",tickPlacement:"both",tooltip:{enabled:!0,format:"{0}"}},_distance:function(){return o(this.options.max-this.options.min)},_resize:function(){this._setTrackDivWidth(),this.wrapper.find(".k-slider-items").remove(),this._maxSelection=this._trackDiv[this._sizeFn](),this._sliderItemsInit(),this._refresh(),this.options.enabled&&this.enable(!0)},_sliderItemsInit:function(){var t=this,r=t.options,f=t._maxSelection/((r.max-r.min)/r.smallStep),u=t._calculateItemsWidth(i.floor(t._distance()/r.smallStep));"none"!=r.tickPlacement&&f>=2&&(n(this.element).parent().find(".k-slider-items").remove(),t._trackDiv.before(ci(r,t._distance())),t._setItemsWidth(u),t._setItemsTitle()),t._calculateSteps(u),"none"!=r.tickPlacement&&f>=2&&r.largeStep>=r.smallStep&&t._setItemsLargeTick()},getSize:function(){return r.dimensions(this.wrapper)},_setTrackDivWidth:function(){var n=this,t=2*parseFloat(n._trackDiv.css(n._isRtl?"right":n._position),10);n._trackDiv[n._sizeFn](n.wrapper[n._sizeFn]()-2-t)},_setItemsWidth:function(t){for(var i=this,h=i.options,s=0,u=t.length-1,f=i.wrapper.find(c),e=0,a=2,l=f.length,o=0,r=0;r<l-2;r++)n(f[r+1])[i._sizeFn](t[r]);if(i._isHorizontal?(n(f[s]).addClass("k-first")[i._sizeFn](t[u-1]),n(f[u]).addClass("k-last")[i._sizeFn](t[u])):(n(f[u]).addClass("k-first")[i._sizeFn](t[u]),n(f[s]).addClass("k-last")[i._sizeFn](t[u-1])),i._distance()%h.smallStep!=0&&!i._isHorizontal){for(r=0;r<t.length;r++)o+=t[r];e=i._maxSelection-o,e+=parseFloat(i._trackDiv.css(i._position),10)+a,i.wrapper.find(".k-slider-items").css("padding-top",e)}},_setItemsTitle:function(){for(var t=this,r=t.options,f=t.wrapper.find(c),e=r.min,u=f.length,i=t._isHorizontal&&!t._isRtl?0:u-1,h=t._isHorizontal&&!t._isRtl?u:-1,s=t._isHorizontal&&!t._isRtl?1:-1;i-h!=0;i+=s)n(f[i]).attr("title",yt(r.tooltip.format,o(e))),e+=r.smallStep},_setItemsLargeTick:function(){var f,s,e,i=this,r=i.options,u=i.wrapper.find(c),t=0;if(it(r.largeStep)%it(r.smallStep)==0||i._distance()/r.largeStep>=3)for(i._isHorizontal||i._isRtl||(u=n.makeArray(u).reverse()),t=0;t<u.length;t++)f=n(u[t]),s=i._values[t],e=o(it(s-this.options.min)),e%it(r.smallStep)==0&&e%it(r.largeStep)==0&&(f.addClass("k-tick-large").html("<span class='k-label'>"+f.attr("title")+"</span>"),0!==t&&t!==u.length-1&&f.css("line-height",f[i._sizeFn]()+"px"))},_calculateItemsWidth:function(n){var o,r,f,t=this,s=t.options,e=parseFloat(t._trackDiv.css(t._sizeFn))+1,u=t._distance(),h=e/u;for(u/s.smallStep-i.floor(u/s.smallStep)>0&&(e-=u%s.smallStep*h),o=e/n,r=[],f=0;f<n-1;f++)r[f]=o;return r[n-1]=r[n]=o/2,t._roundWidths(r)},_roundWidths:function(n){for(var r=0,u=n.length,t=0;t<u;t++)r+=n[t]-i.floor(n[t]),n[t]=i.floor(n[t]);return r=i.round(r),this._addAdditionalSize(r,n)},_addAdditionalSize:function(n,t){if(0===n)return t;for(var u=parseFloat(t.length-1)/parseFloat(1==n?n:n-1),r=0;r<n;r++)t[parseInt(i.round(u*r),10)]+=1;return t},_calculateSteps:function(n){var e,t=this,f=t.options,s=f.min,h=0,c=t._distance(),r=i.ceil(c/f.smallStep),u=1;if(r+=c/f.smallStep%1==0?1:0,n.splice(0,0,2*n[r-2]),n.splice(r-1,1,2*n.pop()),t._pixelSteps=[h],t._values=[s],0!==r){for(;u<r;)h+=(n[u-1]+n[u])/2,t._pixelSteps[u]=h,s+=f.smallStep,t._values[u]=o(s),u++;e=c%f.smallStep==0?r-1:r,t._pixelSteps[e]=t._maxSelection,t._values[e]=f.max,t._isRtl&&(t._pixelSteps.reverse(),t._values.reverse())}},_getValueFromPosition:function(n,t){var f,r=this,s=r.options,e=i.max(s.smallStep*(r._maxSelection/r._distance()),0),u=0,h=e/2;if(r._isHorizontal?(u=n-t.startPoint,r._isRtl&&(u=r._maxSelection-u)):u=t.startPoint-n,r._maxSelection-(parseInt(r._maxSelection%e,10)-3)/2<u)return s.max;for(f=0;f<r._pixelSteps.length;f++)if(i.abs(r._pixelSteps[f]-u)-1<=h)return o(r._values[f])},_getFormattedValue:function(n,t){var i,f,u,s=this,o="",e=s.options.tooltip;return gt(n)?(f=n[0],u=n[1]):t&&t.type&&(f=t.selectionStart,u=t.selectionEnd),t&&(i=t.tooltipTemplate),!i&&e.template&&(i=r.template(e.template)),gt(n)||t&&t.type?i?o=i({selectionStart:f,selectionEnd:u}):(f=yt(e.format,f),u=yt(e.format,u),o=f+" - "+u):(t&&(t.val=n),o=i?i({value:n}):yt(e.format,n)),o},_getDraggableArea:function(){var n=this,t=r.getOffset(n._trackDiv);return{startPoint:n._isHorizontal?t.left:t.top+n._maxSelection,endPoint:n._isHorizontal?t.left+n._maxSelection:t.top}},_createHtml:function(){var i=this,t=i.element,n=i.options,r=t.find("input");2==r.length?(r.eq(0).prop("value",h(n.selectionStart)),r.eq(1).prop("value",h(n.selectionEnd))):t.prop("value",h(n.value)),t.wrap(hi(n,t,i._isHorizontal)).hide(),n.showButtons&&t.before(ti(n,"increase",i._isHorizontal,i._isRtl)).before(ti(n,"decrease",i._isHorizontal,i._isRtl)),t.before(si(n,t))},_focus:function(t){var i=this,f=t.target,u=i.value(),r=i._drag;r||(f==i.wrapper.find(e).eq(0)[0]?(r=i._firstHandleDrag,i._activeHandle=0):(r=i._lastHandleDrag,i._activeHandle=1),u=u[i._activeHandle]),n(f).addClass(l+" "+y),r&&(i._activeHandleDrag=r,r.selectionStart=i.options.selectionStart,r.selectionEnd=i.options.selectionEnd,r._updateTooltip(u))},_focusWithMouse:function(t){t=n(t);var i=this,r=t.is(e)?t.index():0;window.setTimeout(function(){i.wrapper.find(e)[2==r?1:0].focus()},1),i._setTooltipTimeout()},_blur:function(t){var i=this,r=i._activeHandleDrag;n(t.target).removeClass(l+" "+y),r&&(r._removeTooltip(),delete i._activeHandleDrag,delete i._activeHandle)},_setTooltipTimeout:function(){var n=this;n._tooltipTimeout=window.setTimeout(function(){var t=n._drag||n._activeHandleDrag;t&&t._removeTooltip()},300)},_clearTooltipTimeout:function(){var n,t=this;window.clearTimeout(this._tooltipTimeout),n=t._drag||t._activeHandleDrag,n&&n.tooltipDiv&&n.tooltipDiv.stop(!0,!1).css("opacity",1)},_reset:function(){var t=this,u=t.element,r=u.attr("form"),i=r?n("#"+r):u.closest("form");i[0]&&(t._form=i.on("reset",f(t._formResetHandler,t)))},min:function(n){return n?(this.setOptions({min:n}),t):this.options.min},max:function(n){return n?(this.setOptions({max:n}),t):this.options.max},setOptions:function(n){at.fn.setOptions.call(this,n),this._sliderItemsInit(),this._refresh()},destroy:function(){this._form&&this._form.off("reset",this._formResetHandler),at.fn.destroy.call(this)}}),a=nt.extend({init:function(r,u){var o,f=this;r.type="text",u=ri({},{value:s(r,"value"),min:s(r,"min"),max:s(r,"max"),smallStep:s(r,"step")},u),r=n(r),u&&u.enabled===t&&(u.enabled=!r.is("[disabled]")),nt.fn.init.call(f,r,u),u=f.options,kt(u.value)&&null!==u.value||(u.value=u.min,r.prop("value",h(u.min))),u.value=i.max(i.min(u.value,u.max),u.min),o=f.wrapper.find(e),this._selection=new a.Selection(o,f,u),f._drag=new a.Drag(o,"",f,u)},options:{name:"Slider",showButtons:!0,increaseButtonTitle:"Increase",decreaseButtonTitle:"Decrease",dragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},value:null},enable:function(i){var b,h,s,o=this,a=o.options;o.disable(),i!==!1&&(o.wrapper.removeClass(pt).addClass(bt),o.wrapper.find("input").removeAttr(d),b=function(i){var e,f,r,u=ni(i)[0];if(u){if(e=o._isHorizontal?u.location.pageX:u.location.pageY,f=o._getDraggableArea(),r=n(i.target),r.hasClass("k-draghandle"))return r.addClass(l+" "+y),t;o._update(o._getValueFromPosition(e,f)),o._focusWithMouse(i.target),o._drag.dragstart(i),i.preventDefault()}},o.wrapper.find(c+", "+w).on(k,b).end().on(k,function(){n(document.documentElement).one("selectstart",r.preventDefault)}).on(ht,function(){o._drag._end()}),o.wrapper.find(e).attr(lt,0).on(v,function(){o._setTooltipTimeout()}).on(ft,function(n){o._focusWithMouse(n.target),n.preventDefault()}).on(ct,f(o._focus,o)).on(st,f(o._blur,o)),h=f(function(n){var t=o._nextValueByIndex(o._valueIndex+1*n);o._setValueInRange(t),o._drag._updateTooltip(t)},o),a.showButtons&&(s=f(function(n,t){this._clearTooltipTimeout(),(1===n.which||dt.touch&&0===n.which)&&(h(t),this.timeout=setTimeout(f(function(){this.timer=setInterval(function(){h(t)},60)},this),200))},o),o.wrapper.find(".k-button").on(v,f(function(n){this._clearTimer(),o._focusWithMouse(n.target)},o)).on(ut,function(t){n(t.currentTarget).addClass("k-state-hover")}).on("mouseout"+u,f(function(t){n(t.currentTarget).removeClass("k-state-hover"),this._clearTimer()},o)).eq(0).on(rt,f(function(n){s(n,1)},o)).click(!1).end().eq(1).on(rt,f(function(n){s(n,-1)},o)).click(r.preventDefault)),o.wrapper.find(e).off(p,!1).on(p,f(this._keydown,o)),a.enabled=!0)},disable:function(){var t=this;t.wrapper.removeClass(bt).addClass(pt),n(t.element).prop(d,d),t.wrapper.find(".k-button").off(rt).on(rt,function(t){t.preventDefault(),n(this).addClass("k-state-active")}).off(v).on(v,function(t){t.preventDefault(),n(this).removeClass("k-state-active")}).off("mouseleave"+u).on("mouseleave"+u,r.preventDefault).off(ut).on(ut,r.preventDefault),t.wrapper.find(c+", "+w).off(k).off(ht),t.wrapper.find(e).attr(lt,-1).off(v).off(p).off(ft).off(ct).off(st),t.options.enabled=!1},_update:function(n){var t=this,i=t.value()!=n;t.value(n),i&&t.trigger(tt,{value:t.options.value})},value:function(n){var r=this,i=r.options;return n=o(n),isNaN(n)?i.value:(n>=i.min&&n<=i.max&&i.value!=n&&(r.element.prop("value",h(n)),i.value=n,r._refreshAriaAttr(n),r._refresh()),t)},_refresh:function(){this.trigger(ot,{value:this.options.value})},_refreshAriaAttr:function(n){var i,r=this,t=r._drag;i=t&&t._tooltipDiv?t._tooltipDiv.text():r._getFormattedValue(n,null),this.wrapper.find(e).attr("aria-valuenow",n).attr("aria-valuetext",i)},_clearTimer:function(){clearTimeout(this.timeout),clearInterval(this.timer)},_keydown:function(n){var t=this;n.keyCode in t._keyMap&&(t._clearTooltipTimeout(),t._setValueInRange(t._keyMap[n.keyCode](t.options.value)),t._drag._updateTooltip(t.value()),n.preventDefault())},_setValueInRange:function(n){var u=this,r=u.options;return n=o(n),isNaN(n)?(u._update(r.min),t):(n=i.max(i.min(n,r.max),r.min),u._update(n),t)},_nextValueByIndex:function(n){var t=this._values.length;return this._isRtl&&(n=t-1-n),this._values[i.max(0,i.min(n,t-1))]},_formResetHandler:function(){var n=this,t=n.options.min;setTimeout(function(){var i=n.element[0].value;n.value(""===i||isNaN(i)?t:i)})},destroy:function(){var n=this;nt.fn.destroy.call(n),n.wrapper.off(u).find(".k-button").off(u).end().find(e).off(u).end().find(c+", "+w).off(u).end(),n._drag.draggable.destroy(),n._drag._removeTooltip(!0)}});a.Selection=function(n,t,r){function u(u){var l=u-r.min,c=t._valueIndex=i.ceil(o(l/r.smallStep)),f=parseInt(t._pixelSteps[c],10),h=t._trackDiv.find(".k-slider-selection"),e=parseInt(t._outerSize(n)/2,10),s=t._isRtl?2:0;h[t._sizeFn](t._isRtl?t._maxSelection-f:f),n.css(t._position,f-e-s)}u(r.value),t.bind([wt,ot],function(n){u(parseFloat(n.value,10))}),t.bind(tt,function(n){u(parseFloat(n.sender.value(),10))})},a.Drag=function(n,t,i,r){var u=this;u.owner=i,u.options=r,u.element=n,u.type=t,u.draggable=new oi(n,{distance:0,dragstart:f(u._dragstart,u),drag:f(u.drag,u),dragend:f(u.dragend,u),dragcancel:f(u.dragcancel,u)}),n.click(!1)},a.Drag.prototype={dragstart:function(n){this.owner._activeDragHandle=this,this.draggable.userEvents.cancel(),this._dragstart(n),this.dragend()},_dragstart:function(r){var u=this,f=u.owner,e=u.options;return e.enabled?(this.owner._activeDragHandle=this,f.element.off(ut),f.wrapper.find("."+l).removeClass(l+" "+y),u.element.addClass(l+" "+y),n(document.documentElement).css("cursor","pointer"),u.dragableArea=f._getDraggableArea(),u.step=i.max(e.smallStep*(f._maxSelection/f._distance()),0),u.type?(u.selectionStart=e.selectionStart,u.selectionEnd=e.selectionEnd,f._setZIndex(u.type)):u.oldVal=u.val=e.value,u._removeTooltip(!0),u._createTooltip(),t):(r.preventDefault(),t)},_createTooltip:function(){var s,e,t=this,u=t.owner,i=t.options.tooltip,f="",o=n(window);i.enabled&&(i.template&&(s=t.tooltipTemplate=r.template(i.template)),n(".k-slider-tooltip").remove(),t.tooltipDiv=n("<div class='k-widget k-tooltip k-slider-tooltip'><!-- --></div>").appendTo(document.body),f=u._getFormattedValue(t.val||u.value(),t),t.type||(e="k-callout-"+(u._isHorizontal?"s":"e"),t.tooltipInnerDiv="<div class='k-callout "+e+"'><!-- --></div>",f+=t.tooltipInnerDiv),t.tooltipDiv.html(f),t._scrollOffset={top:o.scrollTop(),left:o.scrollLeft()},t.moveTooltip())},drag:function(n){var e,t=this,f=t.owner,r=n.x.location,o=n.y.location,u=t.dragableArea.startPoint,i=t.dragableArea.endPoint;n.preventDefault(),t.val=f._isHorizontal?f._isRtl?t.constrainValue(r,u,i,r<i):t.constrainValue(r,u,i,r>=i):t.constrainValue(o,i,u,o<=i),t.oldVal!=t.val&&(t.oldVal=t.val,t.type?("firstHandle"==t.type?t.selectionStart=t.val<t.selectionEnd?t.val:t.selectionEnd=t.val:t.val>t.selectionStart?t.selectionEnd=t.val:t.selectionStart=t.selectionEnd=t.val,e={values:[t.selectionStart,t.selectionEnd],value:[t.selectionStart,t.selectionEnd]}):e={value:t.val},f.trigger(wt,e)),t._updateTooltip(t.val)},_updateTooltip:function(n){var t=this,r=t.options,u=r.tooltip,i="";u.enabled&&(t.tooltipDiv||t._createTooltip(),i=t.owner._getFormattedValue(o(n),t),t.type||(i+=t.tooltipInnerDiv),t.tooltipDiv.html(i),t.moveTooltip())},dragcancel:function(){return this.owner._refresh(),n(document.documentElement).css("cursor",""),this._end()},dragend:function(){var t=this,i=t.owner;return n(document.documentElement).css("cursor",""),t.type?i._update(t.selectionStart,t.selectionEnd):(i._update(t.val),t.draggable.userEvents._disposeAll()),t.draggable.userEvents.cancel(),t._end()},_end:function(){var t=this,n=t.owner;return n._focusWithMouse(t.element),n.element.on(ut),!1},_removeTooltip:function(t){var i=this,r=i.owner;i.tooltipDiv&&r.options.tooltip.enabled&&r.options.enabled&&(t?(i.tooltipDiv.remove(),i.tooltipDiv=null):i.tooltipDiv.fadeOut("slow",function(){n(this).remove(),i.tooltipDiv=null}))},moveTooltip:function(){var y,s,c,p,t=this,o=t.owner,u=0,i=0,b=t.element,f=r.getOffset(b),w=8,l=n(window),h=t.tooltipDiv.find(".k-callout"),v=g(t.tooltipDiv),a=vt(t.tooltipDiv);t.type?(y=o.wrapper.find(e),f=r.getOffset(y.eq(0)),s=r.getOffset(y.eq(1)),o._isHorizontal?(u=s.top,i=f.left+(s.left-f.left)/2):(u=f.top+(s.top-f.top)/2,i=s.left),p=g(y.eq(0))+2*w):(u=f.top,i=f.left,p=g(b)+2*w),o._isHorizontal?(i-=parseInt((v-o._outerSize(b))/2,10),u-=a+h.height()+w):(u-=parseInt((a-o._outerSize(b))/2,10),i-=v+h.width()+w),o._isHorizontal?(c=t._flip(u,a,p,vt(l)+t._scrollOffset.top),u+=c,i+=t._fit(i,v,g(l)+t._scrollOffset.left)):(c=t._flip(i,v,p,g(l)+t._scrollOffset.left),u+=t._fit(u,a,vt(l)+t._scrollOffset.top),i+=c),c>0&&h&&(h.removeClass(),h.addClass("k-callout k-callout-"+(o._isHorizontal?"n":"w"))),t.tooltipDiv.css({top:u,left:i})},_fit:function(n,t,i){var r=0;return n+t>i&&(r=i-(n+t)),n<0&&(r=-n),r},_flip:function(n,t,i,r){var u=0;return n+t>r&&(u+=-(i+t)),n+u<0&&(u+=i+t),u},constrainValue:function(n,t,i,r){var u=this,f=0;return f=t<n&&n<i?u.owner._getValueFromPosition(n,u.dragableArea):r?u.options.max:u.options.min}},r.ui.plugin(a),et=nt.extend({init:function(i,r){var l,u=this,c=n(i).find("input"),f=c.eq(0)[0],o=c.eq(1)[0];f.type="text",o.type="text",r&&r.showButtons&&(window.console&&window.console.warn("showbuttons option is not supported for the range slider, ignoring"),r.showButtons=!1),r=ri({},{selectionStart:s(f,"value"),min:s(f,"min"),max:s(f,"max"),smallStep:s(f,"step")},{selectionEnd:s(o,"value"),min:s(o,"min"),max:s(o,"max"),smallStep:s(o,"step")},r),r&&r.enabled===t&&(r.enabled=!c.is("[disabled]")),nt.fn.init.call(u,i,r),r=u.options,kt(r.selectionStart)&&null!==r.selectionStart||(r.selectionStart=r.min,c.eq(0).prop("value",h(r.min))),kt(r.selectionEnd)&&null!==r.selectionEnd||(r.selectionEnd=r.max,c.eq(1).prop("value",h(r.max))),l=u.wrapper.find(e),this._selection=new et.Selection(l,u,r),u._firstHandleDrag=new a.Drag(l.eq(0),"firstHandle",u,r),u._lastHandleDrag=new a.Drag(l.eq(1),"lastHandle",u,r)},options:{name:"RangeSlider",leftDragHandleTitle:"drag",rightDragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},selectionStart:null,selectionEnd:null},enable:function(i){var s,u=this,o=u.options;u.disable(),i!==!1&&(u.wrapper.removeClass(pt).addClass(bt),u.wrapper.find("input").removeAttr(d),s=function(i){var a,v,r,c,e,s,f,h=ni(i)[0];if(h){if(a=u._isHorizontal?h.location.pageX:h.location.pageY,v=u._getDraggableArea(),r=u._getValueFromPosition(a,v),c=n(i.target),c.hasClass("k-draghandle"))return u.wrapper.find("."+l).removeClass(l+" "+y),c.addClass(l+" "+y),t;r<o.selectionStart?(e=r,s=o.selectionEnd,f=u._firstHandleDrag):r>u.selectionEnd?(e=o.selectionStart,s=r,f=u._lastHandleDrag):r-o.selectionStart<=o.selectionEnd-r?(e=r,s=o.selectionEnd,f=u._firstHandleDrag):(e=o.selectionStart,s=r,f=u._lastHandleDrag),f.dragstart(i),u._setValueInRange(e,s),u._focusWithMouse(f.element)}},u.wrapper.find(c+", "+w).on(k,s).end().on(k,function(){n(document.documentElement).one("selectstart",r.preventDefault)}).on(ht,function(){u._activeDragHandle&&u._activeDragHandle._end()}),u.wrapper.find(e).attr(lt,0).on(v,function(){u._setTooltipTimeout()}).on(ft,function(n){u._focusWithMouse(n.target),n.preventDefault()}).on(ct,f(u._focus,u)).on(st,f(u._blur,u)),u.wrapper.find(e).off(p,r.preventDefault).eq(0).on(p,f(function(n){this._keydown(n,"firstHandle")},u)).end().eq(1).on(p,f(function(n){this._keydown(n,"lastHandle")},u)),u.options.enabled=!0)},disable:function(){var n=this;n.wrapper.removeClass(bt).addClass(pt),n.wrapper.find("input").prop(d,d),n.wrapper.find(c+", "+w).off(k).off(ht),n.wrapper.find(e).attr(lt,-1).off(v).off(p).off(ft).off(ct).off(st),n.options.enabled=!1},_keydown:function(n,t){var s,e,f,i=this,r=i.options.selectionStart,u=i.options.selectionEnd;n.keyCode in i._keyMap&&(i._clearTooltipTimeout(),"firstHandle"==t?(f=i._activeHandleDrag=i._firstHandleDrag,r=i._keyMap[n.keyCode](r),r>u&&(u=r)):(f=i._activeHandleDrag=i._lastHandleDrag,u=i._keyMap[n.keyCode](u),r>u&&(r=u)),i._setValueInRange(o(r),o(u)),s=Math.max(r,i.options.selectionStart),e=Math.min(u,i.options.selectionEnd),f.selectionEnd=Math.max(e,i.options.selectionStart),f.selectionStart=Math.min(s,i.options.selectionEnd),f._updateTooltip(i.value()[i._activeHandle]),n.preventDefault())},_update:function(n,t){var i=this,r=i.value(),u=r[0]!=n||r[1]!=t;i.value([n,t]),u&&i.trigger(tt,{values:[n,t],value:[n,t]})},value:function(n){return n&&n.length?this._value(n[0],n[1]):this._value()},_value:function(n,i){var u=this,r=u.options,e=r.selectionStart,f=r.selectionEnd;return isNaN(n)&&isNaN(i)?[e,f]:(n=o(n),i=o(i),n>=r.min&&n<=r.max&&i>=r.min&&i<=r.max&&n<=i&&(e==n&&f==i||(u.element.find("input").eq(0).prop("value",h(n)).end().eq(1).prop("value",h(i)),r.selectionStart=n,r.selectionEnd=i,u._refresh(),u._refreshAriaAttr(n,i))),t)},values:function(n,t){return gt(n)?this._value(n[0],n[1]):this._value(n,t)},_refresh:function(){var t=this,n=t.options;t.trigger(ot,{values:[n.selectionStart,n.selectionEnd],value:[n.selectionStart,n.selectionEnd]}),n.selectionStart==n.max&&n.selectionEnd==n.max&&t._setZIndex("firstHandle")},_refreshAriaAttr:function(n,t){var u,i=this,r=i.wrapper.find(e),f=i._activeHandleDrag;u=i._getFormattedValue([n,t],f),r.eq(0).attr("aria-valuenow",n),r.eq(1).attr("aria-valuenow",t),r.attr("aria-valuetext",u)},_setValueInRange:function(n,t){var r=this.options;n=i.max(i.min(n,r.max),r.min),t=i.max(i.min(t,r.max),r.min),n==r.max&&t==r.max&&this._setZIndex("firstHandle"),this._update(i.min(n,t),i.max(n,t))},_setZIndex:function(t){this.wrapper.find(e).each(function(i){n(this).css("z-index","firstHandle"==t?1-i:i)})},_formResetHandler:function(){var n=this,t=n.options;setTimeout(function(){var u=n.element.find("input"),r=u[0].value,i=u[1].value;n.values(""===r||isNaN(r)?t.min:r,""===i||isNaN(i)?t.max:i)})},destroy:function(){var n=this;nt.fn.destroy.call(n),n.wrapper.off(u).find(c+", "+w).off(u).end().find(e).off(u),n._firstHandleDrag.draggable.destroy(),n._lastHandleDrag.draggable.destroy()}}),et.Selection=function(n,t,r){function u(u){u=u||[];var l=u[0]-r.min,y=u[1]-r.min,v=i.ceil(o(l/r.smallStep)),a=i.ceil(o(y/r.smallStep)),e=t._pixelSteps[v],s=t._pixelSteps[a],h=parseInt(t._outerSize(n.eq(0))/2,10),c=t._isRtl?2:0;n.eq(0).css(t._position,e-h-c).end().eq(1).css(t._position,s-h-c),f(e,s)}function f(n,r){var e,u,f=t._trackDiv.find(".k-slider-selection");e=i.abs(n-r),f[t._sizeFn](e),t._isRtl?(u=i.max(n,r),f.css("right",t._maxSelection-u-1)):(u=i.min(n,r),f.css(t._position,u-1))}u(t.value()),t.bind([tt,wt,ot],function(n){u(n.values)})},r.ui.plugin(et)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.colorpicker.min",["kendo.core.min","kendo.color.min","kendo.popup.min","kendo.slider.min","kendo.userevents.min","kendo.button.min"],n)}(function(){return function(n,t,i){function b(n,t,i){i=e(i),i&&!i.equals(n.color())&&("change"==t&&(n._value=i),i=1!=i.a?i.toCssRgba():i.toCss(),n.trigger(t,{value:i}))}function p(n,t,i){var u,r;return n=Array.prototype.slice.call(n),u=n.length,r=n.indexOf(t),r<0?i<0?n[u-1]:n[0]:(r+=i,r<0?r+=u:r%=u,n[r])}function h(n){n.preventDefault()}function w(n,t){return function(){return n.apply(t,arguments)}}var f=window.kendo,v=f.ui,c=v.Widget,e=f.parseColor,nt=f.Color,r=f.keys,s="background-color",a="k-state-selected",ut="000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7",et="FFFFFF,FFCCFF,FF99FF,FF66FF,FF33FF,FF00FF,CCFFFF,CCCCFF,CC99FF,CC66FF,CC33FF,CC00FF,99FFFF,99CCFF,9999FF,9966FF,9933FF,9900FF,FFFFCC,FFCCCC,FF99CC,FF66CC,FF33CC,FF00CC,CCFFCC,CCCCCC,CC99CC,CC66CC,CC33CC,CC00CC,99FFCC,99CCCC,9999CC,9966CC,9933CC,9900CC,FFFF99,FFCC99,FF9999,FF6699,FF3399,FF0099,CCFF99,CCCC99,CC9999,CC6699,CC3399,CC0099,99FF99,99CC99,999999,996699,993399,990099,FFFF66,FFCC66,FF9966,FF6666,FF3366,FF0066,CCFF66,CCCC66,CC9966,CC6666,CC3366,CC0066,99FF66,99CC66,999966,996666,993366,990066,FFFF33,FFCC33,FF9933,FF6633,FF3333,FF0033,CCFF33,CCCC33,CC9933,CC6633,CC3333,CC0033,99FF33,99CC33,999933,996633,993333,990033,FFFF00,FFCC00,FF9900,FF6600,FF3300,FF0000,CCFF00,CCCC00,CC9900,CC6600,CC3300,CC0000,99FF00,99CC00,999900,996600,993300,990000,66FFFF,66CCFF,6699FF,6666FF,6633FF,6600FF,33FFFF,33CCFF,3399FF,3366FF,3333FF,3300FF,00FFFF,00CCFF,0099FF,0066FF,0033FF,0000FF,66FFCC,66CCCC,6699CC,6666CC,6633CC,6600CC,33FFCC,33CCCC,3399CC,3366CC,3333CC,3300CC,00FFCC,00CCCC,0099CC,0066CC,0033CC,0000CC,66FF99,66CC99,669999,666699,663399,660099,33FF99,33CC99,339999,336699,333399,330099,00FF99,00CC99,009999,006699,003399,000099,66FF66,66CC66,669966,666666,663366,660066,33FF66,33CC66,339966,336666,333366,330066,00FF66,00CC66,009966,006666,003366,000066,66FF33,66CC33,669933,666633,663333,660033,33FF33,33CC33,339933,336633,333333,330033,00FF33,00CC33,009933,006633,003333,000033,66FF00,66CC00,669900,666600,663300,660000,33FF00,33CC00,339900,336600,333300,330000,00FF00,00CC00,009900,006600,003300,000000",tt="#ffffff",it={apply:"Apply",cancel:"Cancel",noColor:"no color",clearColor:"Clear color",previewInput:"Color Hexadecimal Code"},u=".kendoColorTools",l="click"+u,y="keydown"+u,g=f.support.browser,ft=g.msie&&g.version<9,o=c.extend({init:function(n,t){var r,i=this;c.fn.init.call(i,n,t),n=i.element,t=i.options,i._value=t.value=e(t.value),i._tabIndex=n.attr("tabIndex")||0,r=i._ariaId=t.ariaId,r&&n.attr("aria-labelledby",r),t._standalone&&(i._triggerSelect=i._triggerChange)},options:{name:"ColorSelector",value:null,_standalone:!0},events:["change","select","cancel"],color:function(n){return n!==i&&(this._value=e(n),this._updateUI(this._value)),this._value},value:function(n){return n=this.color(n),n&&(n=this.options.opacity?n.toCssRgba():n.toCss()),n||null},enable:function(t){0===arguments.length&&(t=!0),n(".k-disabled-overlay",this.wrapper).remove(),t||this.wrapper.append("<div class='k-disabled-overlay'></div>"),this._onEnable(t)},_select:function(n,t){var i=this._value;n=this.color(n),t||(this.element.trigger("change"),n.equals(i)?this._standalone||this.trigger("cancel"):this.trigger("change",{value:this.value()}))},_triggerSelect:function(n){b(this,"select",n)},_triggerChange:function(n){b(this,"change",n)},destroy:function(){this.element&&this.element.off(u),this.wrapper&&this.wrapper.off(u).find("*").off(u),this.wrapper=null,c.fn.destroy.call(this)},_updateUI:n.noop,_selectOnHide:function(){return null},_cancel:function(){this.trigger("cancel")}}),d=o.extend({init:function(t,i){var r,h,c,a,u=this;if(o.fn.init.call(u,t,i),t=u.wrapper=u.element,i=u.options,r=i.palette,"websafe"==r?(r=et,i.columns=18):"basic"==r&&(r=ut),"string"==typeof r&&(r=r.split(",")),n.isArray(r)&&(r=n.map(r,function(n){return e(n)})),u._selectedID=(i.ariaId||f.guid())+"_selected",t.addClass("k-widget k-colorpalette").attr("role","grid").attr("aria-readonly","true").append(n(u._template({colors:r,columns:i.columns,tileSize:i.tileSize,value:u._value,id:i.ariaId}))).on(l,".k-item",function(t){u._select(n(t.currentTarget).css(s))}).attr("tabIndex",u._tabIndex).on(y,w(u._keydown,u)),h=i.tileSize){if(/number|string/.test(typeof h))c=a=parseFloat(h);else{if("object"!=typeof h)throw Error("Unsupported value for the 'tileSize' argument");c=parseFloat(h.width),a=parseFloat(h.height)}t.find(".k-item").css({width:c,height:a})}},focus:function(){this.wrapper.focus()},options:{name:"ColorPalette",columns:10,tileSize:null,palette:"basic"},_onEnable:function(n){n?this.wrapper.attr("tabIndex",this._tabIndex):this.wrapper.removeAttr("tabIndex")},_keydown:function(t){var i,c,l=this.wrapper,o=l.find(".k-item"),f=o.filter("."+a).get(0),u=t.keyCode;if(u==r.LEFT?i=p(o,f,-1):u==r.RIGHT?i=p(o,f,1):u==r.DOWN?i=p(o,f,this.options.columns):u==r.UP?i=p(o,f,-this.options.columns):u==r.ENTER?(h(t),f&&this._select(n(f).css(s))):u==r.ESC&&this._cancel(),i){h(t),this._current(i);try{c=e(i.css(s)),this._triggerSelect(c)}catch(v){}}},_current:function(t){this.wrapper.find("."+a).removeClass(a).attr("aria-selected",!1).removeAttr("id"),n(t).addClass(a).attr("aria-selected",!0).attr("id",this._selectedID),this.element.removeAttr("aria-activedescendant").attr("aria-activedescendant",this._selectedID)},_updateUI:function(t){var i=null;this.wrapper.find(".k-item").each(function(){var r=e(n(this).css(s));if(r&&r.equals(t))return i=this,!1}),this._current(i)},_template:f.template('<table class="k-palette k-reset" role="presentation"><tr role="row"># for (var i = 0; i < colors.length; ++i) { ## var selected = colors[i].equals(value); ## if (i && i % columns == 0) { # </tr><tr role="row"> # } #<td role="gridcell" unselectable="on" style="background-color:#= colors[i].toCss() #"#= selected ? " aria-selected=true" : "" # #=(id && i === 0) ? "id=\\""+id+"\\" " : "" # class="k-item#= selected ? " '+a+'" : "" #" aria-label="#= colors[i].toCss() #"></td># } #</tr></table>')}),k=o.extend({init:function(t,i){var u=this;o.fn.init.call(u,t,i),i=u.options,i.messages=i.options?n.extend(u.options.messages,i.options.messages):u.options.messages,t=u.element,u.wrapper=t.addClass("k-widget k-flatcolorpicker").append(u._template(i)),u._hueElements=n(".k-hsv-rectangle, .k-transparency-slider .k-slider-track",t),u._selectedColor=n(".k-selected-color-display",t),u._colorAsText=n("input.k-color-value",t),u._sliders(),u._hsvArea(),u._updateUI(u._value||e("#f00")),t.find("input.k-color-value").on(y,function(t){var f,o,i=this;if(t.keyCode==r.ENTER)try{f=e(i.value),o=u.color(),u._select(f,f.equals(o))}catch(s){n(i).addClass("k-state-error")}else u.options.autoupdate&&setTimeout(function(){var n=e(i.value,!0);n&&u._updateUI(n,!0)},10)}).end().on(l,".k-controls button.apply",function(){u.options._clearedColor?u.trigger("change"):u._select(u._getHSV())}).on(l,".k-controls button.cancel",function(){u._updateUI(u.color()),u._cancel()}),ft&&u._applyIEFilter()},destroy:function(){this._hueSlider.destroy(),this._opacitySlider&&this._opacitySlider.destroy(),this._hueSlider=this._opacitySlider=this._hsvRect=this._hsvHandle=this._hueElements=this._selectedColor=this._colorAsText=null,o.fn.destroy.call(this)},options:{name:"FlatColorPicker",opacity:!1,buttons:!1,input:!0,preview:!0,clearButton:!1,autoupdate:!0,messages:it},_applyIEFilter:function(){var t=this.element.find(".k-hue-slider .k-slider-track")[0],n=t.currentStyle.backgroundImage;n=n.replace(/^url\([\'\"]?|[\'\"]?\)$/g,""),t.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+n+"', sizingMethod='scale')"},_sliders:function(){function f(t){n._updateUI(n._getHSV(t.value,null,null,null))}function u(t){n._updateUI(n._getHSV(null,null,null,t.value/100))}var n=this,r=n.element,t=r.find(".k-hue-slider"),i=r.find(".k-transparency-slider");t.attr("aria-label","hue saturation"),n._hueSlider=t.kendoSlider({min:0,max:360,tickPlacement:"none",showButtons:!1,slide:f,change:f}).data("kendoSlider"),i.attr("aria-label","opacity"),n._opacitySlider=i.kendoSlider({min:0,max:100,tickPlacement:"none",showButtons:!1,slide:u,change:u}).data("kendoSlider")},_hsvArea:function(){function r(n,i){var o=this.offset,u=n-o.left,r=i-o.top,e=this.width,f=this.height;u=u<0?0:u>e?e:u,r=r<0?0:r>f?f:r,t._svChange(u/e,1-r/f)}var t=this,u=t.element,n=u.find(".k-hsv-rectangle"),i=n.find(".k-draghandle").attr("tabIndex",0).on(y,w(t._keydown,t));t._hsvEvents=new f.UserEvents(n,{global:!0,press:function(t){this.offset=f.getOffset(n),this.width=n.width(),this.height=n.height(),i.focus(),r.call(this,t.x.location,t.y.location)},start:function(){n.addClass("k-dragging"),i.focus()},move:function(n){n.preventDefault(),r.call(this,n.x.location,n.y.location)},end:function(){n.removeClass("k-dragging")}}),t._hsvRect=n,t._hsvHandle=i},_onEnable:function(n){this._hueSlider.enable(n),this._opacitySlider&&this._opacitySlider.enable(n),this.wrapper.find("input").attr("disabled",!n);var t=this._hsvRect.find(".k-draghandle");n?t.attr("tabIndex",this._tabIndex):t.removeAttr("tabIndex")},_keydown:function(n){function i(i,r){var u=t._getHSV();u[i]+=r*(n.shiftKey?.01:.05),u[i]<0&&(u[i]=0),u[i]>1&&(u[i]=1),t._updateUI(u),h(n)}function u(i){var r=t._getHSV();r.h+=i*(n.shiftKey?1:5),r.h<0&&(r.h=0),r.h>359&&(r.h=359),t._updateUI(r),h(n)}var t=this;switch(n.keyCode){case r.LEFT:n.ctrlKey?u(-1):i("s",-1);break;case r.RIGHT:n.ctrlKey?u(1):i("s",1);break;case r.UP:i(n.ctrlKey&&t._opacitySlider?"a":"v",1);break;case r.DOWN:i(n.ctrlKey&&t._opacitySlider?"a":"v",-1);break;case r.ENTER:t._select(t._getHSV());break;case r.F2:t.wrapper.find("input.k-color-value").focus().select();break;case r.ESC:t._cancel()}},focus:function(){this._hsvHandle.focus()},_getHSV:function(n,t,i,r){var f=this._hsvRect,e=f.width(),o=f.height(),u=this._hsvHandle.position();return null==n&&(n=this._hueSlider.value()),null==t&&(t=u.left/e),null==i&&(i=1-u.top/o),null==r&&(r=this._opacitySlider?this._opacitySlider.value()/100:1),nt.fromHSV(n,t,i,r)},_svChange:function(n,t){var i=this._getHSV(null,n,t,null);this._updateUI(i)},_updateUI:function(n,t){var i=this,r=i._hsvRect;n&&(this._colorAsText.attr("title",i.options.messages.previewInput),this._colorAsText.removeClass("k-state-error"),i._selectedColor.css(s,n.toDisplay()),t||i._colorAsText.val(i._opacitySlider?n.toCssRgba():n.toCss()),i._triggerSelect(n),n=n.toHSV(),i._hsvHandle.css({left:n.s*r.width()+"px",top:(1-n.v)*r.height()+"px"}),i._hueElements.css(s,nt.fromHSV(n.h,1,1,1).toCss()),i._hueSlider.value(n.h),i._opacitySlider&&i._opacitySlider.value(100*n.a))},_selectOnHide:function(){return this.options.buttons?null:this._getHSV()},_template:f.template('# if (preview) { #<div class="k-selected-color"><div class="k-selected-color-display"><div class="k-color-input"><input class="k-color-value" # if (clearButton && !_standalone) { #placeholder="#: messages.noColor #" # } ##= !data.input ? \'style="visibility: hidden;"\' : "" #># if (clearButton && !_standalone) { #<span class="k-clear-color k-button k-bare" title="#: messages.clearColor #"></span># } #</div></div></div># } ## if (clearButton && !_standalone && !preview) { #<div class="k-clear-color-container"><span class="k-clear-color k-button k-bare">#: messages.clearColor #</span></div># } #<div class="k-hsv-rectangle"><div class="k-hsv-gradient"></div><div class="k-draghandle"></div></div><input class="k-hue-slider" /># if (opacity) { #<input class="k-transparency-slider" /># } ## if (buttons) { #<div unselectable="on" class="k-controls"><button class="k-button k-primary apply">#: messages.apply #</button> <button class="k-button cancel">#: messages.cancel #</button></div># } #')}),rt=c.extend({init:function(t,i){var u,f,o,s,h,r=this;c.fn.init.call(r,t,i),i=r.options,t=r.element,u=t.attr("value")||t.val(),u=u?e(u,!0):e(i.value,!0),r._value=i.value=u,f=r.wrapper=n(r._template(i)),t.hide().after(f),t.is("input")&&(t.appendTo(f),o=t.closest("label"),s=t.attr("id"),s&&(o=o.add('label[for="'+s+'"]')),o.click(function(n){r.open(),n.preventDefault()})),r._tabIndex=t.attr("tabIndex")||0,r.enable(!t.attr("disabled")),h=t.attr("accesskey"),h&&(t.attr("accesskey",null),f.attr("accesskey",h)),r.bind("activate",function(n){n.isDefaultPrevented()||r.toggle()}),r._updateUI(u)},destroy:function(){this.wrapper.off(u).find("*").off(u),this._popup&&(this._selector.destroy(),this._popup.destroy()),this._selector=this._popup=this.wrapper=null,c.fn.destroy.call(this)},enable:function(n){var t=this,r=t.wrapper,i=r.children(".k-picker-wrap"),f=i.find(".k-select");0===arguments.length&&(n=!0),t.element.attr("disabled",!n),r.attr("aria-disabled",!n),f.off(u).on("mousedown"+u,h),r.addClass("k-state-disabled").removeAttr("tabIndex").add("*",r).off(u),n?r.removeClass("k-state-disabled").attr("tabIndex",t._tabIndex).on("mouseenter"+u,function(){i.addClass("k-state-hover")}).on("mouseleave"+u,function(){i.removeClass("k-state-hover")}).on("focus"+u,function(){i.addClass("k-state-focused")}).on("blur"+u,function(){i.removeClass("k-state-focused")}).on(y,w(t._keydown,t)).on(l,".k-select",w(t.toggle,t)).on(l,t.options.toolIcon?".k-tool-icon":".k-selected-color",function(){t.trigger("activate")}):t.close()},_template:f.template('<span role="textbox" aria-haspopup="true" class="k-widget k-colorpicker k-header"><span class="k-picker-wrap k-state-default"># if (toolIcon) { #<span class="k-icon k-tool-icon #= toolIcon #"><span class="k-selected-color"></span></span># } else { #<span class="k-selected-color"><span class="k-icon k-i-line" style="display: none;"></span></span># } #<span class="k-select" unselectable="on" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span></span>'),options:{name:"ColorPicker",palette:null,columns:10,toolIcon:null,value:null,messages:it,opacity:!1,buttons:!0,preview:!0,clearButton:!1,ARIATemplate:'Current selected color is #=data || ""#'},events:["activate","change","select","open","close"],open:function(){this.element.prop("disabled")||this._getPopup().open()},close:function(){var n=this._selector&&this._selector.options||{};n._closing=!0,this._getPopup().close(),delete n._closing},toggle:function(){this.element.prop("disabled")||this._getPopup().toggle()},_noColorIcon:function(){return this.wrapper.find(".k-picker-wrap > .k-selected-color > .k-icon.k-i-line")},color:o.fn.color,value:o.fn.value,_select:o.fn._select,_triggerSelect:o.fn._triggerSelect,_isInputTypeColor:function(){var n=this.element[0];return/^input$/i.test(n.tagName)&&/^color$/i.test(n.type)},_updateUI:function(n){var t="";n&&(t=this._isInputTypeColor()||1==n.a?n.toCss():n.toCssRgba(),this.element.val(t)),this._ariaTemplate||(this._ariaTemplate=f.template(this.options.ARIATemplate)),this.wrapper.attr("aria-label",this._ariaTemplate(t)),this._triggerSelect(n),this.wrapper.find(".k-selected-color").css(s,n?n.toDisplay():tt),this._noColorIcon()[t?"hide":"show"]()},_keydown:function(n){var t=n.keyCode;this._getPopup().visible()?(t==r.ESC?this._selector._cancel():this._selector._keydown(n),h(n)):t!=r.ENTER&&t!=r.DOWN||(this.open(),h(n))},_getPopup:function(){var u,c,h,r,t=this,o=t._popup;return o||(u=t.options,c=u.palette?d:k,u._standalone=!1,delete u.select,delete u.change,delete u.cancel,h=f.guid(),r=t._selector=new c(n('<div id="'+h+'"/>').appendTo(document.body),u),t.wrapper.attr("aria-owns",h),t._popup=o=r.wrapper.kendoPopup({anchor:t.wrapper,adjustSize:{width:5,height:0}}).data("kendoPopup"),r.element.find(".k-clear-color").kendoButton({icon:"reset-color",click:function(n){r.options._clearedColor=!0,t.value(null),t.element.val(null),t._updateUI(null),r._colorAsText.val(""),r._hsvHandle.css({top:"0px",left:"0px"}),r._selectedColor.css(s,tt),t.trigger("change",{value:t.value()}),n.preventDefault()}}),r.bind({select:function(n){t._updateUI(e(n.value)),delete r.options._clearedColor},change:function(){r.options._clearedColor||t._select(r.color()),t.close()},cancel:function(){r.options._clearedColor&&!t.value()&&r.value()&&t._select(r.color(),!0),t.close()}}),o.bind({close:function(n){var o,f,e,u;return t.trigger("close")?(n.preventDefault(),i):(t.wrapper.children(".k-picker-wrap").removeClass("k-state-focused"),o=r._selectOnHide(),f=r.value(),e=t.value(),u=r.options,o?u._clearedColor&&!e||t._select(o):(setTimeout(function(){t.wrapper&&t.wrapper.focus()}),!u._closing&&u._clearedColor&&!e&&f?t._select(f,!0):t._updateUI(t.color())),i)},open:function(n){t.trigger("open")?n.preventDefault():t.wrapper.children(".k-picker-wrap").addClass("k-state-focused")},activate:function(){r._select(t.color(),!0),r.focus(),t.wrapper.children(".k-picker-wrap").addClass("k-state-focused")}})),o}});v.plugin(d),v.plugin(k),v.plugin(rt)}(jQuery,parseInt),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.numerictextbox.min",["kendo.core.min","kendo.userevents.min"],n)}(function(){return function(n,t){function nt(n,t){var i="k-i-arrow-"+("increase"===n?"60-up":"60-down");return'<span unselectable="on" class="k-link k-link-'+n+'" aria-label="'+t+'" title="'+t+'"><span unselectable="on" class="'+a+" "+i+'"></span></span>'}function ht(n,t){var i=(""+parseFloat(n,10)).split(f);return i[1]&&(i[1]=i[1].substring(0,t)),i.join(f)}var u=window.kendo,s=u.caret,o=u.keys,tt=u.ui,v=tt.Widget,et=u._activeElement,yt=u._extractFormat,pt=u.parseFloat,wt=u.support.placeholder,vt=u.getCulture,c="change",it="disabled",rt="readonly",ct="k-input",ut="spin",r=".kendoNumericTextBox",lt="touchend",at="mouseleave"+r,w="mouseenter"+r+" "+at,h="k-state-default",g="k-state-focused",d="k-state-hover",l="focus",f=".",a="k-icon",p="k-state-selected",y="k-state-disabled",k="k-state-invalid",b="aria-disabled",ft=/^(-)?(\d*)$/,i=null,e=n.proxy,ot=n.extend,st=v.extend({init:function(f,o){var a,y,c,h,p,s=this,w=o&&o.step!==t;v.fn.init.call(s,f,o),o=s.options,f=s.element.on("focusout"+r,e(s._focusout,s)).attr("role","spinbutton"),o.placeholder=o.placeholder||f.attr("placeholder"),s._initialOptions=ot({},o),a=s.min(f.attr("min")),y=s.max(f.attr("max")),c=s._parse(f.attr("step")),o.min===i&&a!==i&&(o.min=a),o.max===i&&y!==i&&(o.max=y),w||c===i||(o.step=c),s._reset(),s._wrapper(),s._arrows(),s._validation(),s._input(),u.support.mobileOS?s._text.on(lt+r+" "+l+r,function(){u.support.browser.edge?s._text.one(l+r,function(){s._toggleText(!1),f.focus()}):(s._toggleText(!1),f.focus())}):s._text.on(l+r,e(s._click,s)),f.attr("aria-valuemin",o.min!==i?o.min*o.factor:o.min).attr("aria-valuemax",o.max!==i?o.max*o.factor:o.max),o.format=yt(o.format),h=o.value,s.value(h!==i?h:f.val()),p=f.is("[disabled]")||n(s.element).parents("fieldset").is(":disabled"),p?s.enable(!1):s.readonly(f.is("[readonly]")),u.notify(s)},options:{name:"NumericTextBox",decimals:i,restrictDecimals:!1,min:i,max:i,value:i,step:1,round:!0,culture:"",format:"n",spinners:!0,placeholder:"",factor:1,upArrowText:"Increase value",downArrowText:"Decrease value"},events:[c,ut],_editable:function(n){var t=this,o=t.element,i=n.disable,s=n.readonly,u=t._text.add(o),f=t._inputWrapper.off(w);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),o.off("keydown"+r).off("keypress"+r).off("keyup"+r).off("paste"+r),s||i?(f.addClass(i?y:h).removeClass(i?h:y),u.attr(it,i).attr(rt,s).attr(b,i)):(f.addClass(h).removeClass(y).on(w,t._toggleHover),u.removeAttr(it).removeAttr(rt).attr(b,!1),t._upArrowEventHandler.bind("press",function(n){n.preventDefault(),t._spin(1),t._upArrow.addClass(p)}),t._downArrowEventHandler.bind("press",function(n){n.preventDefault(),t._spin(-1),t._downArrow.addClass(p)}),t.element.on("keydown"+r,e(t._keydown,t)).on("keypress"+r,e(t._keypress,t)).on("keyup"+r,e(t._keyup,t)).on("paste"+r,e(t._paste,t)))},readonly:function(n){this._editable({readonly:n===t||n,disable:!1})},enable:function(n){this._editable({readonly:!1,disable:!(n=n===t||n)})},destroy:function(){var n=this;n.element.add(n._text).add(n._upArrow).add(n._downArrow).add(n._inputWrapper).off(r),n._upArrowEventHandler.destroy(),n._downArrowEventHandler.destroy(),n._form&&n._form.off("reset",n._resetHandler),v.fn.destroy.call(n)},min:function(n){return this._option("min",n)},max:function(n){return this._option("max",n)},step:function(n){return this._option("step",n)},value:function(n){var r,i=this;return n===t?i._value:(n=i._parse(n),r=i._adjust(n),n===r&&(i._update(n),i._old=i._value),t)},focus:function(){this._focusin()},_adjust:function(n){var f=this,u=f.options,t=u.min,r=u.max;return n===i?n:(t!==i&&n<t?n=t:r!==i&&n>r&&(n=r),n)},_arrows:function(){var i,t=this,o=function(){clearTimeout(t._spinning),i.removeClass(p)},r=t.options,e=r.spinners,f=t.element;i=f.siblings("."+a),i[0]||(i=n(nt("increase",r.upArrowText)+nt("decrease",r.downArrowText)).insertAfter(f),i.wrapAll('<span class="k-select"/>')),e||(i.parent().toggle(e),t._inputWrapper.addClass("k-expand-padding")),t._upArrow=i.eq(0),t._upArrowEventHandler=new u.UserEvents(t._upArrow,{release:o}),t._downArrow=i.eq(1),t._downArrowEventHandler=new u.UserEvents(t._downArrow,{release:o})},_validation:function(){var t=this,i=t.element;t._validationIcon=n("<span class='"+a+" k-i-warning'></span>").hide().insertAfter(i)},_blur:function(){var n=this;n._toggleText(!0),n._change(n.element.val())},_click:function(n){var t=this;clearTimeout(t._focusing),t._focusing=setTimeout(function(){var e,l,u,c=n.target,a=s(c)[0],h=c.value.substring(0,a),o=t._format(t.options.format),r=o[","],i=0;r&&(l=RegExp("\\"+r,"g"),u=RegExp("([\\d\\"+r+"]+)(\\"+o[f]+")?(\\d+)?")),u&&(e=u.exec(h)),e&&(i=e[0].replace(l,"").length,h.indexOf("(")!=-1&&t._value<0&&i++),t._focusin(),s(t.element[0],i)})},_change:function(n){var t=this,i=t.options.factor;i&&1!==i&&(n=parseFloat(n),null!==n&&(n/=i)),t._update(n),n=t._value,t._old!=n&&(t._old=n,t._typing||t.element.trigger(c),t.trigger(c)),t._typing=!1},_culture:function(n){return n||vt(this.options.culture)},_focusin:function(){var n=this;n._inputWrapper.addClass(g),n._toggleText(!1),n.element[0].focus()},_focusout:function(){var n=this;clearTimeout(n._focusing),n._inputWrapper.removeClass(g).removeClass(d),n._blur(),n._removeInvalidState()},_format:function(n,t){var i=this._culture(t).numberFormat;return n=n.toLowerCase(),n.indexOf("c")>-1?i=i.currency:n.indexOf("p")>-1&&(i=i.percent),i},_input:function(){var r,e=this,u=e.options,s="k-formatted-value",t=e.element.addClass(ct).show()[0],o=t.accessKey,h=e.wrapper;r=h.find(f+s),r[0]||(r=n('<input type="text"/>').insertBefore(t).addClass(s));try{t.setAttribute("type","text")}catch(c){t.type="text"}e._initialTitle=t.title,r[0].title=t.title,r[0].tabIndex=t.tabIndex,r[0].style.cssText=t.style.cssText,r.prop("placeholder",u.placeholder),o&&(r.attr("accesskey",o),t.accessKey=""),e._text=r.addClass(t.className).attr({role:"spinbutton","aria-valuemin":u.min!==i?u.min*u.factor:u.min,"aria-valuemax":u.max!==i?u.max*u.factor:u.max})},_keydown:function(n){var t=this,i=n.keyCode;t._key=i,i==o.DOWN?t._step(-1):i==o.UP?t._step(1):i==o.ENTER?t._change(t.element.val()):t._typing=!0},_keypress:function(n){var t,a,r,l,v,y,u,h,c,i,e;0===n.which||n.metaKey||n.ctrlKey||n.keyCode===o.BACKSPACE||n.keyCode===o.ENTER||(t=this,a=t.options.min,r=t.element,l=s(r),v=l[0],y=l[1],u=String.fromCharCode(n.which),h=t._format(t.options.format),c=t._key===o.NUMPAD_DOT,i=r.val(),c&&(u=h[f]),i=i.substring(0,v)+u+i.substring(y),e=t._numericRegex(h).test(i),e&&c?(r.val(i),s(r,v+u.length),n.preventDefault()):(null!==a&&a>=0&&"-"===i.charAt(0)||!e)&&(t._addInvalidState(),n.preventDefault()),t._key=0)},_keyup:function(){this._removeInvalidState()},_addInvalidState:function(){var n=this;n._inputWrapper.addClass(k),n._validationIcon.show()},_removeInvalidState:function(){var n=this;n._inputWrapper.removeClass(k),n._validationIcon.hide()},_numericRegex:function(n){var r=this,t=n[f],u=r.options.decimals,e="*";return t===f&&(t="\\"+t),u===i&&(u=n.decimals),0===u?ft:(r.options.restrictDecimals&&(e="{0,"+u+"}"),r._separator!==t&&(r._separator=t,r._floatRegExp=RegExp("^(-)?(((\\d+("+t+"\\d"+e+")?)|("+t+"\\d"+e+")))?$")),r._floatRegExp)},_paste:function(n){var t=this,r=n.target,f=r.value,u=t._format(t.options.format);setTimeout(function(){var n=t._parse(r.value),e=t._numericRegex(u).test(r.value);n!==i&&t._adjust(n)===n&&e||t._update(f)})},_option:function(n,i){var r=this,f=r.element,u=r.options;return i===t?u[n]:(i=r._parse(i),(i||"step"!==n)&&(u[n]=i,f.add(r._text).attr("aria-value"+n,i),f.attr(n,i)),t)},_spin:function(n,t){var i=this;t=t||500,clearTimeout(i._spinning),i._spinning=setTimeout(function(){i._spin(n,50)},t),i._step(n)},_step:function(n){var t=this,r=t.element,i=t._parse(r.val())||0;et()!=r[0]&&t._focusin(),t.options.factor&&i&&(i/=t.options.factor),i+=t.options.step*n,t._update(t._adjust(i)),t._typing=!1,t.trigger(ut)},_toggleHover:function(t){n(t.currentTarget).toggleClass(d,"mouseenter"===t.type)},_toggleText:function(n){var t=this;t._text.toggle(n),t.element.toggle(!n)},_parse:function(n,t){return pt(n,this._culture(t),this.options.format)},_round:function(n,t){var i=this.options.round?u._round:ht;return i(n,t)},_update:function(n){var s,t=this,o=t.options,c=o.factor,l=o.format,r=o.decimals,e=t._culture(),h=t._format(l,e);r===i&&(r=h.decimals),n=t._parse(n,e),s=n!==i,s&&(n=parseFloat(t._round(n,r),10)),t._value=n=t._adjust(n),t._placeholder(u.toString(n,l,e)),s?(c&&(n=parseFloat(t._round(n*c,r),10)),n=""+n,n.indexOf("e")!==-1&&(n=t._round(+n,r)),n=n.replace(f,h[f])):n=null,t.element.val(n),t.element.add(t._text).attr("aria-valuenow",n)},_placeholder:function(n){var t=this._text;t.val(n),wt||n||t.val(this.options.placeholder),t.attr("title",this._initialTitle||t.val())},_wrapper:function(){var t,u=this,r=u.element,i=r[0];t=r.parents(".k-numerictextbox"),t.is("span.k-numerictextbox")||(t=r.hide().wrap('<span class="k-numeric-wrap k-state-default" />').parent(),t=t.wrap("<span/>").parent()),t[0].style.cssText=i.style.cssText,i.style.width="",u.wrapper=t.addClass("k-widget k-numerictextbox").addClass(i.className).css("display",""),u._inputWrapper=n(t[0].firstChild)},_reset:function(){var t=this,i=t.element,u=i.attr("form"),r=u?n("#"+u):i.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(i[0].value),t.max(t._initialOptions.max),t.min(t._initialOptions.min)})},t._form=r.on("reset",t._resetHandler))}});tt.plugin(st)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.filtermenu.min",["kendo.datepicker.min","kendo.numerictextbox.min","kendo.dropdownlist.min","kendo.binder.min"],n)}(function(){return function(n,t){function d(t,i){t.filters&&(t.filters=n.grep(t.filters,function(n){return d(n,i),n.filters?n.filters.length:n.field!=i}))}function tt(n){var i,u,t,e,f,r;if(n&&n.length)for(r=[],i=0,u=n.length;i<u;i++)t=n[i],f=""!==t.text?t.text||t.value||t:t.text,e=null==t.value?t.text||t:t.value,r[i]={text:f,value:e};return r}function it(t,i){return n.grep(t,function(t){return t.filters?(t.filters=n.grep(t.filters,function(n){return n.field!=i}),t.filters.length):t.field!=i})}function k(t,i){t.filters&&(t.filters=n.grep(t.filters,function(n){return k(n,i),n.filters?n.filters.length:n.field==i&&"eq"==n.operator}))}function g(i){return"and"==i.logic&&i.filters.length>1?[]:i.filters?n.map(i.filters,function(n){return g(n)}):null!==i.value&&i.value!==t?[i.value]:[]}function w(n,r){for(var f,u,h=i.getter(r,!0),s=[],e=0,o={};e<n.length;)f=n[e++],u=h(f),u===t||null===u||o.hasOwnProperty(u)||(s.push(f),o[u]=!0);return s}function ft(n,t){return function(i){var r=n(i);return w(r,t)}}var i=window.kendo,c=i.ui,r=n.proxy,s="kendoPopup",v="init",a="open",nt="refresh",e="change",u=".kendoFilterMenu",l="Is equal to",p="Is not equal to",ht={number:"numerictextbox",date:"datepicker"},st={string:"text",number:"number",date:"date"},ot=i.isFunction,h=c.Widget,rt='<div><div class="k-filter-help-text">#=messages.info#</div><label><input type="radio" data-#=ns#bind="checked: filters[0].value" value="true" name="filters[0].value"/>#=messages.isTrue#</label><label><input type="radio" data-#=ns#bind="checked: filters[0].value" value="false" name="filters[0].value"/>#=messages.isFalse#</label><div><button type="submit" class="k-button k-primary">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div></div>',lt='<div><div class="k-filter-help-text">#=messages.info#</div><select title="#=messages.operator#" data-#=ns#bind="value: filters[0].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select title="#=messages.value#" data-#=ns#bind="value:filters[0].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#" data-#=ns#value-primitive="true"></select>#}else{#<input title="#=messages.value#" data-#=ns#bind="value:filters[0].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}##if(extra){#<select title="#=messages.logic#" class="k-filter-and" data-#=ns#bind="value: logic" data-#=ns#role="dropdownlist"><option value="and">#=messages.and#</option><option value="or">#=messages.or#</option></select><select title="#=messages.additionalOperator#" data-#=ns#bind="value: filters[1].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select title="#=messages.additionalValue#" data-#=ns#bind="value:filters[1].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#" data-#=ns#value-primitive="true"></select>#}else{#<input title="#=messages.additionalValue#" data-#=ns#bind="value: filters[1].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""#/>#}##}#<div><button type="submit" class="k-button k-primary">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div></div>',ct='<div data-#=ns#role="view" data-#=ns#init-widgets="false" data-#=ns#use-native-scrolling="true" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><button class="k-button k-i-cancel">#=messages.cancel#</button>#=title#<button type="submit" class="k-button k-submit">#=messages.filter#</button></div><form title="#=messages.info#" class="k-filter-menu k-mobile-list"><ul class="k-filter-help-text"><li><span class="k-link">#=messages.info#</span><ul><li class="k-item"><label class="k-label">#=messages.operator#<select data-#=ns#bind="value: filters[0].operator">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select></label></li><li class="k-item"><label class="k-label">#=messages.value##if(values){#<select data-#=ns#bind="value:filters[0].value"><option value="">#=messages.selectValue#</option>#for(var val in values){#<option value="#=values[val].value#">#=values[val].text#</option>#}#</select>#}else{#<input data-#=ns#bind="value:filters[0].value" class="k-textbox" type="#=inputType#" #=useRole ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}#</label></li>#if(extra){#</ul><ul class="k-filter-help-text"><li><span class="k-link"></span><li class="k-item"><label class="k-label"><input type="radio" name="logic" class="k-check" data-#=ns#bind="checked: logic" value="and" />#=messages.and#</label></li><li class="k-item"><label class="k-label"><input type="radio" name="logic" class="k-check" data-#=ns#bind="checked: logic" value="or" />#=messages.or#</label></li></ul><ul class="k-filter-help-text"><li><span class="k-link"></span><li class="k-item"><label class="k-label">#=messages.additionalOperator#<select data-#=ns#bind="value: filters[1].operator">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select></label></li><li class="k-item"><label class="k-label">#=messages.additionalValue##if(values){#<select data-#=ns#bind="value:filters[1].value"><option value="">#=messages.selectValue#</option>#for(var val in values){#<option value="#=values[val].value#">#=values[val].text#</option>#}#</select>#}else{#<input data-#=ns#bind="value:filters[1].value" class="k-textbox" type="#=inputType#" #=useRole ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}#</label></li>#}#</ul></li><li class="k-button-container"><button type="reset" class="k-button">#=messages.clear#</button></li></ul></div></form></div>',et='<div data-#=ns#role="view" data-#=ns#init-widgets="false" data-#=ns#use-native-scrolling="true" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><button class="k-button k-i-cancel">#=messages.cancel#</button>#=title#<button type="submit" class="k-button k-submit">#=messages.filter#</button></div><form title="#=messages.info#" class="k-filter-menu k-mobile-list"><ul class="k-filter-help-text"><li><span class="k-link">#=messages.info#</span><ul><li class="k-item"><label class="k-label"><input class="k-check" type="radio" data-#=ns#bind="checked: filters[0].value" value="true" name="filters[0].value"/>#=messages.isTrue#</label></li><li class="k-item"><label class="k-label"><input class="k-check" type="radio" data-#=ns#bind="checked: filters[0].value" value="false" name="filters[0].value"/>#=messages.isFalse#</label></li></ul></li><li class="k-button-container"><button type="reset" class="k-button">#=messages.clear#</button></li></ul></form></div>',o=h.extend({init:function(t,f){var a,v,c,s,o=this,l="string";h.fn.init.call(o,t,f),a=o.operators=f.operators||{},t=o.element,f=o.options,f.appendToElement||(c=t.addClass("k-with-icon k-filterable").find(".k-grid-filter"),c[0]||(c=t.prepend('<a class="k-grid-filter" href="#" title="'+f.messages.filter+'" aria-label="'+f.messages.filter+'"><span class="k-icon k-i-filter"></span></a>').find(".k-grid-filter")),c.attr("tabindex",-1).on("click"+u,r(o._click,o))),o.link=c||n(),o.dataSource=y.create(f.dataSource),o.field=f.field||t.attr(i.attr("field")),o.model=o.dataSource.reader.model,o._parse=function(n){return null!=n?n+"":n},o.model&&o.model.fields&&(s=o.model.fields[o.field],s&&(l=s.type||"string",s.parse&&(o._parse=r(s.parse,s)))),f.values&&(l="enums"),o.type=l,a=a[l]||f.operators[l];for(v in a)break;o._defaultFilter=function(){return{field:o.field,operator:v||"eq",value:""}},o._refreshHandler=r(o.refresh,o),o.dataSource.bind(e,o._refreshHandler),f.appendToElement?o._init():o.refresh()},_init:function(){var e,t=this,f=t.options.ui,o=ot(f);t.pane=t.options.pane,t.pane&&(t._isMobile=!0),o||(e=f||ht[t.type]),t._isMobile?t._createMobileForm(e):t._createForm(e),t.form.on("submit"+u,r(t._submit,t)).on("reset"+u,r(t._reset,t)),o&&t.form.find(".k-textbox").removeClass("k-textbox").each(function(){f(n(this))}),t.form.find("["+i.attr("role")+"=numerictextbox]").removeClass("k-textbox").end().find("["+i.attr("role")+"=datetimepicker]").removeClass("k-textbox").end().find("["+i.attr("role")+"=timepicker]").removeClass("k-textbox").end().find("["+i.attr("role")+"=datepicker]").removeClass("k-textbox"),t.refresh(),t.trigger(v,{field:t.field,container:t.form}),i.cycleForm(t.form)},_createForm:function(t){var f=this,e=f.options,h=f.operators||{},o=f.type;h=h[o]||e.operators[o],f.form=n('<form title="'+f.options.messages.info+'" class="k-filter-menu"/>').html(i.template("boolean"===o?rt:lt)({field:f.field,format:e.format,ns:i.ns,messages:e.messages,extra:e.extra,operators:h,type:o,role:t,values:tt(e.values)})),e.appendToElement?(f.element.append(f.form),f.popup=f.element.closest(".k-popup").data(s)):f.popup=f.form[s]({anchor:f.link,open:r(f._open,f),activate:r(f._activate,f),close:function(){f.options.closeCallback&&f.options.closeCallback(f.element)}}).data(s),f.form.on("keydown"+u,r(f._keydown,f))},_createMobileForm:function(t){var r=this,f=r.options,e=r.operators||{},u=r.type;e=e[u]||f.operators[u],r.form=n("<div />").html(i.template("boolean"===u?et:ct)({field:r.field,title:f.title||r.field,format:f.format,ns:i.ns,messages:f.messages,extra:f.extra,operators:e,type:u,role:t,useRole:!i.support.input.date&&"date"===u||"number"===u,inputType:st[u],values:tt(f.values)})),r.view=r.pane.append(r.form.html()),r.form=r.view.element.find("form"),r.view.element.on("click",".k-submit",function(n){r.form.submit(),n.preventDefault()}).on("click",".k-i-cancel",function(n){r._closeForm(),n.preventDefault()})},refresh:function(){var n=this,u=n.dataSource.filter()||{filters:[],logic:"and"},t=[n._defaultFilter()],r=n._defaultFilter().operator;(n.options.extra||"isnull"!==r&&"isnotnull"!==r)&&t.push(n._defaultFilter()),n.filterModel=i.observable({logic:"and",filters:t}),n.form&&i.bind(n.form.children().first(),n.filterModel),n._bind(u)?n.link.addClass("k-state-active"):n.link.removeClass("k-state-active")},destroy:function(){var n=this;h.fn.destroy.call(n),n.form&&(i.unbind(n.form),i.destroy(n.form),n.form.unbind(u),n.popup&&(n.popup.destroy(),n.popup=null),n.form=null),n.view&&(n.view.purge(),n.view=null),n.link.unbind(u),n._refreshHandler&&(n.dataSource.unbind(e,n._refreshHandler),n.dataSource=null),n.element=n.link=n._refreshHandler=n.filterModel=null},_bind:function(n){for(var i,t,r=this,h=n.filters,u=!1,o=0,f=r.filterModel,e=0,s=h.length;e<s;e++)t=h[e],t.field==r.field?(f.set("logic",n.logic),i=f.filters[o],i||(f.filters.push({field:r.field}),i=f.filters[o]),i.set("value",r._parse(t.value)),i.set("operator",t.operator),o++,u=!0):t.filters&&(u=u||r._bind(t));return u},_stripFilters:function(t){return n.grep(t,function(n){return""!==n.value&&null!=n.value||"isnull"===n.operator||"isnotnull"===n.operator||"isempty"===n.operator||"isnotempty"===n.operator})},_merge:function(n){var f,r,e,u=this,o=n.logic||"and",i=this._stripFilters(n.filters),t=u.dataSource.filter()||{filters:[],logic:"and"};for(d(t,u.field),r=0,e=i.length;r<e;r++)f=i[r],f.value=u._parse(f.value);return i.length&&(t.filters.length?(n.filters=i,"and"!==t.logic&&(t.filters=[{logic:t.logic,filters:t.filters}],t.logic="and"),t.filters.push(i.length>1?n:i[0])):(t.filters=i,t.logic=o)),t},filter:function(n){var t=this._stripFilters(n.filters);t.length&&this.trigger("change",{filter:{logic:n.logic,filters:t},field:this.field})||(n=this._merge(n),n.filters.length&&this.dataSource.filter(n))},clear:function(){var i=this,t=i.dataSource.filter()||{filters:[]};this.trigger("change",{filter:null,field:i.field})||(t.filters=n.grep(t.filters,function(n){return n.filters?(n.filters=it(n.filters,i.field),n.filters.length):n.field!=i.field}),t.filters.length||(t=null),i.dataSource.filter(t))},_submit:function(n){n.preventDefault(),n.stopPropagation(),this.filter(this.filterModel.toJSON()),this._closeForm()},_reset:function(){this.clear(),this.options.search&&this.container&&this.container.find("label").parent().show(),this._closeForm()},_closeForm:function(){this._isMobile?this.pane.navigate("",this.options.animations.right):this.popup.close()},_click:function(n){n.preventDefault(),n.stopPropagation(),this.popup||this.pane||this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle()},_open:function(){var t;n(".k-filter-menu").not(this.form).each(function(){t=n(this).data(s),t&&t.close()})},_activate:function(){this.form.find(":kendoFocusable:first").focus(),this.trigger(a,{field:this.field,container:this.form})},_keydown:function(n){n.keyCode==i.keys.ESC&&this.popup.close()},events:[v,"change",a],options:{name:"FilterMenu",extra:!0,appendToElement:!1,type:"string",operators:{string:{eq:l,neq:p,startswith:"Starts with",contains:"Contains",doesnotcontain:"Does not contain",endswith:"Ends with",isnull:"Is null",isnotnull:"Is not null",isempty:"Is empty",isnotempty:"Is not empty"},number:{eq:l,neq:p,gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than",isnull:"Is null",isnotnull:"Is not null"},date:{eq:l,neq:p,gte:"Is after or equal to",gt:"Is after",lte:"Is before or equal to",lt:"Is before",isnull:"Is null",isnotnull:"Is not null"},enums:{eq:l,neq:p,isnull:"Is null",isnotnull:"Is not null"}},messages:{info:"Show items with value that:",isTrue:"is true",isFalse:"is false",filter:"Filter",clear:"Clear",and:"And",or:"Or",selectValue:"-Select value-",operator:"Operator",value:"Value",additionalValue:"Additional value",additionalOperator:"Additional operator",logic:"Filters logic",cancel:"Cancel"},animations:{left:"slide",right:"slide:right"}}}),f=".kendoFilterMultiCheck",y=i.data.DataSource,ut='<div data-#=ns#role="view" data-#=ns#init-widgets="false" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><button class="k-button k-i-cancel">#=messages.cancel#</button>#=title#<button type="submit" class="k-button k-submit">#=messages.filter#</button></div><form class="k-filter-menu k-mobile-list">#if(search){#<div class=\'k-textbox k-space-right\'><input placeholder=\'#=messages.search#\'/><span class=\'k-icon k-i-zoom\' /></div>#}#<ul class="k-multicheck-wrap"></ul></li><li class="k-button-container">#if(messages.selectedItemsFormat){#<div class=\'k-filter-selected-items\'></div>#}#<button type="reset" class="k-button">#=messages.clear#</button></li></ul></form></div>',b=h.extend({init:function(t,u){var f,o;h.fn.init.call(this,t,u),u=this.options,this.element=n(t),f=this.field=this.options.field||this.element.attr(i.attr("field")),o=u.checkSource,this._foreignKeyValues()?(this.checkSource=y.create(u.values),this.checkSource.fetch()):u.forceUnique?(o=u.dataSource.options,delete o.pageSize,this.checkSource=y.create(o),this.checkSource.reader.data=ft(this.checkSource.reader.data,this.field)):this.checkSource=y.create(o),this.dataSource=u.dataSource,this.model=this.dataSource.reader.model,this._parse=function(n){return n+""},this.model&&this.model.fields&&(f=this.model.fields[this.field],f&&("number"==f.type?this._parse=parseFloat:f.parse&&(this._parse=r(f.parse,f)),this.type=f.type||"string")),u.appendToElement?this._init():this._createLink(),this._refreshHandler=r(this.refresh,this),this.dataSource.bind(e,this._refreshHandler)},_createLink:function(){var t=this.element,n=t.addClass("k-with-icon k-filterable").find(".k-grid-filter");n[0]||(n=t.prepend('<a class="k-grid-filter" href="#" aria-label="'+this.options.messages.filter+'"><span class="k-icon k-i-filter"/></a>').find(".k-grid-filter")),this._link=n.attr("tabindex",-1).on("click"+u,r(this._click,this))},_init:function(){var n=this,i=this.options.forceUnique,t=this.options;this.pane=t.pane,this.pane&&(this._isMobile=!0),this._createForm(),this._foreignKeyValues()?this.refresh():i&&!this.checkSource.options.serverPaging&&this.dataSource.data().length?(this.checkSource.data(w(this.dataSource.data(),this.field)),this.refresh()):(this._attachProgress(),this.checkSource.fetch(function(){n.refresh.call(n)})),this.options.forceUnique||(this.checkChangeHandler=function(){n.container.empty(),n.refresh()},this.checkSource.bind(e,this.checkChangeHandler)),this.form.on("keydown"+f,r(this._keydown,this)).on("submit"+f,r(this._filter,this)).on("reset"+f,r(this._reset,this)),this.trigger(v,{field:this.field,container:this.form})},_attachProgress:function(){var n=this;this._progressHandler=function(){c.progress(n.container,!0)},this._progressHideHandler=function(){c.progress(n.container,!1)},this.checkSource.bind("progress",this._progressHandler).bind("change",this._progressHideHandler)},_input:function(){var n=this;n._clearTypingTimeout(),n._typingTimeout=setTimeout(function(){n.search()},100)},_clearTypingTimeout:function(){this._typingTimeout&&(clearTimeout(this._typingTimeout),this._typingTimeout=null)},search:function(){var n,r,u,f=this.options.ignoreCase,t=this.searchTextBox[0].value,i=this.container.find("label");for(f&&(t=t.toLowerCase()),n=0,this.options.checkAll&&i.length&&(i[0].parentNode.style.display=t?"none":"",n++);n<i.length;)r=i[n],u=r.textContent||r.innerText,f&&(u=u.toLowerCase()),r.parentNode.style.display=u.indexOf(t)>=0?"":"none",n++},_activate:function(){this.form.find(":kendoFocusable:first").focus(),this.trigger(a,{field:this.field,container:this.form})},_createForm:function(){var u,e,t=this.options,f="";this._isMobile||(t.search&&(f+="<div class='k-textbox k-space-right'><input placeholder='"+t.messages.search+"'/><span class='k-icon k-i-zoom' /></div>"),f+="<ul class='k-reset k-multicheck-wrap'></ul>",t.messages.selectedItemsFormat&&(f+="<div class='k-filter-selected-items'>"+i.format(t.messages.selectedItemsFormat,0)+"</div>"),f+="<button type='submit' class='k-button k-primary'>"+t.messages.filter+"</button>",f+="<button type='reset' class='k-button'>"+t.messages.clear+"</button>",this.form=n('<form class="k-filter-menu"/>').html(f),this.container=this.form.find(".k-multicheck-wrap")),this._isMobile?(u=this,u.form=n("<div />").html(i.template(ut)({field:u.field,title:t.title||u.field,ns:i.ns,messages:t.messages,search:t.search})),u.view=u.pane.append(u.form.html()),u.form=u.view.element.find("form"),e=this.view.element,this.container=e.find(".k-multicheck-wrap"),e.on("click",".k-submit",function(n){u.form.submit(),n.preventDefault()}).on("click",".k-i-cancel",function(n){u._closeForm(),n.preventDefault()})):t.appendToElement?(this.popup=this.element.closest(".k-popup").data(s),this.element.append(this.form)):this.popup=this.form.kendoPopup({anchor:this._link,activate:r(this._activate,this)}).data(s),t.search&&(this.searchTextBox=this.form.find(".k-textbox > input"),this.searchTextBox.on("input",r(this._input,this)))},createCheckAllItem:function(){var u=this.options,o=i.template(u.itemTemplate({field:"all",mobile:this._isMobile})),t=n(o({all:u.messages.checkAll}));this.container.prepend(t),this.checkBoxAll=t.find(":checkbox").eq(0).addClass("k-check-all"),this.checkAllHandler=r(this.checkAll,this),this.checkBoxAll.on(e+f,this.checkAllHandler)},updateCheckAllState:function(){if(this.options.messages.selectedItemsFormat&&this.form.find(".k-filter-selected-items").text(i.format(this.options.messages.selectedItemsFormat,this.container.find(":checked:not(.k-check-all)").length)),this.checkBoxAll){var n=this.container.find(":checkbox:not(.k-check-all)").length==this.container.find(":checked:not(.k-check-all)").length;this.checkBoxAll.prop("checked",n)}},refresh:function(n){var r=this.options.forceUnique,t=this.dataSource,i=this.getFilterArray();this._link&&this._link.toggleClass("k-state-active",0!==i.length),this.form&&(n&&r&&n.sender===t&&!t.options.serverPaging&&("itemchange"==n.action||"add"==n.action||"remove"==n.action||t.options.autoSync&&"sync"===n.action)&&!this._foreignKeyValues()&&(this.checkSource.data(w(this.dataSource.data(),this.field)),this.container.empty()),this.container.is(":empty")&&this.createCheckBoxes(),this.checkValues(i),this.trigger(nt))},getFilterArray:function(){var i,t=n.extend(!0,{},{filters:[],logic:"and"},this.dataSource.filter());return k(t,this.field),i=g(t)},createCheckBoxes:function(){var n,s,o,t=this.options,u={field:this.field,format:t.format,mobile:this._isMobile,type:this.type};this.options.forceUnique?this._foreignKeyValues()?(n=this.checkSource.data(),u.valueField="value",u.field="text"):n=this.checkSource.data():n=this.checkSource.view(),s=i.template(t.itemTemplate(u)),o=i.render(s,n),t.checkAll&&this.createCheckAllItem(),this.container.on(e+f,":checkbox",r(this.updateCheckAllState,this)),this.container.append(o)},checkAll:function(){var n=this.checkBoxAll.is(":checked");this.container.find(":checkbox").prop("checked",n)},checkValues:function(t){var i=this;n(n.grep(this.container.find(":checkbox").prop("checked",!1),function(r){var f,u,e=!1;if(!n(r).is(".k-check-all"))for(f=i._parse(n(r).val()),u=0;u<t.length;u++)if(e="date"==i.type?t[u].getTime()==f.getTime():t[u]==f)return e})).prop("checked",!0),this.updateCheckAllState()},_filter:function(t){var i,r;t.preventDefault(),t.stopPropagation(),i={logic:"or"},r=this,i.filters=n.map(this.form.find(":checkbox:checked:not(.k-check-all)"),function(t){return{value:n(t).val(),operator:"eq",field:r.field}}),i.filters.length&&this.trigger("change",{filter:i,field:r.field})||(i=this._merge(i),i.filters.length&&this.dataSource.filter(i),this._closeForm())},_stripFilters:function(t){return n.grep(t,function(n){return null!=n.value})},_foreignKeyValues:function(){var n=this.options;return n.values&&!n.checkSource},destroy:function(){var n=this;h.fn.destroy.call(n),n.form&&(i.unbind(n.form),i.destroy(n.form),n.form.unbind(f),n.popup&&(n.popup.destroy(),n.popup=null),n.form=null,n.container&&(n.container.unbind(f),n.container=null),n.checkBoxAll&&n.checkBoxAll.unbind(f)),n.view&&(n.view.purge(),n.view=null),n._link&&n._link.unbind(u),n._refreshHandler&&(n.dataSource.unbind(e,n._refreshHandler),n.dataSource=null),n.checkChangeHandler&&n.checkSource.unbind(e,n.checkChangeHandler),n._progressHandler&&n.checkSource.unbind("progress",n._progressHandler),n._progressHideHandler&&n.checkSource.unbind("change",n._progressHideHandler),this._clearTypingTimeout(),this.searchTextBox=null,n.element=n.checkSource=n.container=n.checkBoxAll=n._link=n._refreshHandler=n.checkAllHandler=null},options:{name:"FilterMultiCheck",itemTemplate:function(n){var u=n.field,f=n.format,i=n.valueField,e=n.mobile,r="";return i===t&&(i=u),"date"==n.type&&(r=":yyyy-MM-ddTHH:mm:sszzz"),"<li class='k-item'><label class='k-label'><input type='checkbox' class='"+(e?"k-check":"")+"'  value='#:kendo.format('{0"+r+"}',"+i+")#'/>#:kendo.format('"+(f?f:"{0}")+"', "+u+")#</label></li>"},checkAll:!0,search:!1,ignoreCase:!0,appendToElement:!1,messages:{checkAll:"Select All",clear:"Clear",filter:"Filter",search:"Search",cancel:"Cancel",selectedItemsFormat:"{0} items selected"},forceUnique:!0,animations:{left:"slide",right:"slide:right"}},events:[v,nt,"change",a]});n.extend(b.fn,{_click:o.fn._click,_keydown:o.fn._keydown,_reset:o.fn._reset,_closeForm:o.fn._closeForm,clear:o.fn.clear,_merge:o.fn._merge}),c.plugin(o),c.plugin(b)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.menu.min",["kendo.popup.min"],n)}(function(){return function(n,t){function fu(n,t){return n=n.split(" ")[!t+0]||n,n.replace("top","up").replace("bottom","down")}function sr(n,t,r){n=n.split(" ")[!t+0]||n;var u={origin:["bottom",r?"right":"left"],position:["top",r?"right":"left"]},f=/left|right/.test(n);return f?(u.origin=["top",n],u.position[1]=i.directions[n].reverse):(u.origin[0]=n,u.position[0]=i.directions[n].reverse),u.origin=u.origin.join(" "),u.position=u.position.join(" "),u}function o(t,i){try{return n.contains(t,i)}catch(r){return!1}}function rr(t){t=n(t),t.addClass("k-item").children(gi).addClass(kt),t.children("a").addClass(st).children(gi).addClass(kt),t.filter(":not([disabled])").addClass(pi),t.filter(".k-separator").empty().append("&nbsp;"),t.filter("li[disabled]").addClass(g).removeAttr("disabled").attr("aria-disabled",!0),t.filter("[role]").length||t.attr("role","menuitem"),t.children("."+st).length||t.contents().filter(function(){return!(this.nodeName.match(lr)||3==this.nodeType&&!n.trim(this.nodeValue))}).wrapAll("<span class='"+st+"'/>"),ot(t),tt(t)}function ot(t){t=n(t),t.find("> .k-link > [class*=k-i-arrow]:not(.k-sprite)").remove(),t.filter(":has(.k-menu-group)").children(".k-link:not(:has([class*=k-i-arrow]:not(.k-sprite)))").each(function(){var t=n(this),i=ar(t);t.append("<span class='k-icon "+i+"'/>")})}function ar(n){var u,t=n.parent().parent(),r=i.support.isRtl(t);return u=t.hasClass(p+"-horizontal")?" k-i-arrow-60-down":r?" k-i-arrow-60-left":" k-i-arrow-60-right"}function tt(t){t=n(t),t.filter(".k-first:not(:first-child)").removeClass(ki),t.filter(".k-last:not(:last-child)").removeClass(wi),t.filter(":first-child").addClass(ki),t.filter(":last-child").addClass(wi)}function bt(t,i){var r=iu(i);r&&ru(t,r),i.items&&n(t).children("ul").children("li").each(function(n){bt(this,i.items[n])})}function ru(t,i){n(t).children(".k-link").data({selectHandler:i})}function iu(n){var t=n.select,r=i.isFunction;return t&&r(t)?t:null}function v(n){return n?"li[data-groupparent='"+n+"']":"li[data-groupparent]"}function et(n){return n?"ul[data-group='"+n+"']":"ul[data-group]"}function at(t,i){var u=t.find(v()),r=[];return u.each(function(u,f){var o,e;for(f=n(f),o=f.data(a),e=t;o;)e=i.find(et(o)+":visible"),e.length&&r.push(e),f=e.find(v()),o=f.data(a)}),r}function hi(t,i){var r=t.data(c);return r?i.find(v(r)):n([])}function bi(t,i){var r=t.data(a);return r?i.children(e).children(et(r)):n([])}function uu(t,i){var f,o,r=[],s=function(n){for(;n.parentNode&&!i.is(n.parentNode);)r.push(n.parentNode),n=n.parentNode},u=t[0]||t;for(s(u),f=r[r.length-1];n(f).is(e)&&(o=n(f).children("ul"),u=hi(o,i)[0]);)r.push(u),s(u),f=r[r.length-1];return r}function dr(n){var t=0;return n.wheelDelta&&(t=-n.wheelDelta/120,t=t>0?Math.ceil(t):Math.floor(t)),n.detail&&(t=Math.round(n.detail/3)),t}function er(n,t){for(var r=0,i=n.parentNode;i&&!isNaN(i[t]);)r+=i[t],i=i.parentNode;return r}function wt(n){return ti&&n.originalEvent.pointerType in vr}function wr(n){var t=n.originalEvent;return vt&&/touch/i.test(t.type||"")}function di(n){n.contents().filter(function(){return"LI"!=this.nodeName}).remove()}var ur,i=window.kendo,yi=i.ui,eu=i._activeElement,vt=i.support.touch&&i.support.mobileOS,oi="mousedown",li="click",nr=30,gr=50,s=n.extend,u=n.proxy,gt=n.each,y=i.template,w=i.keys,dt=yi.Widget,lr=/^(ul|a|div)$/i,r=".kendoMenu",gi="img",ht="open",p="k-menu",st="k-link",wi="k-last",ft="close",yt="timer",ki="k-first",kt="k-image",ut="select",rt="zIndex",ai="activate",vi="deactivate",or="touchstart"+r+" MSPointerDown"+r+" pointerdown"+r,ri=i.support.pointers,ni=i.support.msPointers,ti=ni||ri,k=ri?"pointerenter":ni?"MSPointerEnter":"mouseenter",ct=ri?"pointerleave":ni?"MSPointerLeave":"mouseleave",ii="DOMMouseScroll"+r+" mousewheel"+r,fr=i.support.resize+r,nu="scrollWidth",hr="scrollHeight",br="offsetWidth",kr="offsetHeight",c="group",a="groupparent",pt=n(document.documentElement),d="kendoPopup",pi="k-state-default",si="k-state-hover",l="k-state-focused",g="k-state-disabled",tu="k-state-selected",ci=".k-menu",fi=".k-menu-group",e=".k-animation-container",ui=fi+","+e,b=":not(.k-list) > .k-item",cr=".k-item.k-state-disabled",lt=".k-item:not(.k-state-disabled)",yr=".k-item:not(.k-state-disabled) > .k-link",tr=":not(.k-item.k-separator)",it=tr+":eq(0)",ir=tr+":last",pr="div:not(.k-animation-container,.k-list-container)",nt=".k-menu-scroll-button",vr={2:1,touch:1},h={content:y("<div #= contentCssAttributes(item) # tabindex='-1'>#= content(item) #</div>"),group:y("<ul class='#= groupCssClass(group) #'#= groupAttributes(group) # role='menu' aria-hidden='true'>#= renderItems(data) #</ul>"),itemWrapper:y("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(data) ##= sprite(item) ##= text(item) ##= arrow(data) #</#= tag(item) #>"),item:y("<li class='#= wrapperCssClass(group, item) #' #= itemCssAttributes(item) # role='menuitem'  #=item.items ? \"aria-haspopup='true'\": \"\"##=item.enabled === false ? \"aria-disabled='true'\" : ''#>#= itemWrapper(data) ## if (item.items) { ##= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #</li>"),scrollButton:y("<span class='k-button k-button-icon k-menu-scroll-button k-scroll-#= direction #' unselectable='on'><span class='k-icon k-i-arrow-60-#= direction #'></span></span>"),image:y("<img #= imageCssAttributes(item) # alt='' src='#= item.imageUrl #' />"),arrow:y("<span class='#= arrowClass(item, group) #'></span>"),sprite:y("<span class='k-sprite #= spriteCssClass #'></span>"),empty:y("")},ei={wrapperCssClass:function(n,t){var i="k-item",r=t.index;return i+=t.enabled===!1?" k-state-disabled":" k-state-default",n.firstLevel&&0===r&&(i+=" k-first"),r==n.length-1&&(i+=" k-last"),t.cssClass&&(i+=" "+t.cssClass),t.attr&&t.attr.hasOwnProperty("class")&&(i+=" "+t.attr["class"]),t.selected&&(i+=" "+tu),i},itemCssAttributes:function(n){var t,r="",i=n.attr||{};for(t in i)i.hasOwnProperty(t)&&"class"!==t&&(r+=t+'="'+i[t]+'" ');return r},imageCssAttributes:function(n){var i,r="",t=n.imageAttr||{};t["class"]?t["class"]+=" "+kt:t["class"]=kt;for(i in t)t.hasOwnProperty(i)&&(r+=i+'="'+t[i]+'" ');return r},contentCssAttributes:function(n){var i,u="",t=n.contentAttr||{},r="k-content k-group k-menu-group";t["class"]?t["class"]+=" "+r:t["class"]=r;for(i in t)t.hasOwnProperty(i)&&(u+=i+'="'+t[i]+'" ');return u},textClass:function(){return st},textAttributes:function(n){return n.url?" href='"+n.url+"'":""},arrowClass:function(n,t){var i="k-icon";return i+=t.horizontal?" k-i-arrow-60-down":" k-i-arrow-60-right"},text:function(n){return n.encoded===!1?n.text:i.htmlEncode(n.text)},tag:function(n){return n.url?"a":"span"},groupAttributes:function(n){return n.expanded!==!0?" style='display:none'":""},groupCssClass:function(){return"k-group k-menu-group"},content:function(n){return n.content?n.content:"&nbsp;"}},f=dt.extend({init:function(n,t){var r=this;dt.fn.init.call(r,n,t),n=r.wrapper=r.element,t=r.options,r._initData(t),r._updateClasses(),r._animations(t),r.nextItemZIndex=100,r._tabindex(),r._initOverflow(t),r._attachMenuEventsHandlers(),t.openOnClick&&(r.clicked=!1),n.attr("role","menubar"),n[0].id&&(r._ariaId=i.format("{0}_mn_active",n[0].id)),i.notify(r)},events:[ht,ft,ai,vi,ut],options:{name:"Menu",animation:{open:{duration:200},close:{duration:100}},orientation:"horizontal",direction:"default",openOnClick:!1,closeOnClick:!0,hoverDelay:100,scrollable:!1,popupCollision:t},_initData:function(n){var t=this;n.dataSource&&(t.angular("cleanup",function(){return{elements:t.element.children()}}),t.element.empty(),t.append(n.dataSource,t.element),t.angular("compile",function(){return{elements:t.element.children()}}))},_attachMenuEventsHandlers:function(){var t=this,f=t.element,e=t.options,i=t._overflowWrapper();(i||f).on(or,lt,u(t._focusHandler,t)).on(li+r,cr,!1).on(li+r,lt,u(t._click,t)).on(or+" "+oi+r,".k-content",u(t._preventClose,t)).on(k+r,lt,u(t._mouseenter,t)).on(ct+r,lt,u(t._mouseleave,t)).on(k+r+" "+ct+r+" "+oi+r+" "+li+r,yr,u(t._toggleHover,t)),f.on("keydown"+r,u(t._keydown,t)).on("focus"+r,u(t._focus,t)).on("focus"+r,".k-content",u(t._focus,t)).on("blur"+r,u(t._removeHoverItem,t)).on("blur"+r,"[tabindex]",u(t._checkActiveElement,t)),i&&i.on(ct+r,ui,u(t._mouseleavePopup,t)).on(k+r,ui,u(t._mouseenterPopup,t)),e.openOnClick&&(t._documentClickHandler=u(t._documentClick,t),n(document).click(t._documentClickHandler))},_detachMenuEventsHandlers:function(){var t=this,i=t._overflowWrapper();i&&i.off(r),t.element.off(r),t._documentClickHandler&&n(document).unbind("click",t._documentClickHandler)},_initOverflow:function(t){var e,o,s,f,r=this,u="horizontal"==t.orientation;t.scrollable&&(r._openedPopups={},r._scrollWrapper=r.element.wrap("<div class='k-menu-scroll-wrapper "+t.orientation+"'></div>").parent(),u&&di(r.element),e=n(h.scrollButton({direction:u?"left":"up"})),o=n(h.scrollButton({direction:u?"right":"down"})),e.add(o).appendTo(r._scrollWrapper),r._initScrolling(r.element,e,o,u),s=r.element.outerWidth(),f=r.element[0].style.width,f="auto"===f?"":f,u&&n(window).on(fr,i.throttle(function(){r._setOverflowWrapperWidth(s,f),r._toggleScrollButtons(r.element,e,o,u)},100)),r._setOverflowWrapperWidth(s,f),r._toggleScrollButtons(r.element,e,o,u))},_overflowWrapper:function(){return this._scrollWrapper||this._popupsWrapper},_setOverflowWrapperWidth:function(n,t){var r,f,e,u,i=this,o=i._scrollWrapper.css("width");i._scrollWrapper.css({width:""}),r=i._scrollWrapper.outerWidth(),i._scrollWrapper.css({width:o}),f=i.element.outerWidth(),e=i.element[0].offsetWidth-i.element[0].clientWidth,f!=r&&(u=t?Math.min(n,r):r,i.element.width(u-e),i._scrollWrapper.width(u))},_reinitOverflow:function(n){var t=this,i=n.scrollable&&!t.options.scrollable||!n.scrollable&&t.options.scrollable||n.scrollable&&t.options.scrollable&&n.scrollable.distance!=t.options.scrollable.distance||n.orientation!=t.options.orientation;i&&(t._detachMenuEventsHandlers(),t._destroyOverflow(),t._initOverflow(n),t._attachMenuEventsHandlers())},_destroyOverflow:function(){var u=this,i=u._overflowWrapper();i&&(i.off(r),i.find(nt).off(r).remove(),i.children(e).each(function(t,r){var u,f=n(r).children(fi);f.off(ii),u=hi(f,i),u.length&&u.append(r)}),i.find(v()).removeAttr("data-groupparent"),i.find(et()).removeAttr("data-group"),u.element.off(ii),n(window).off(fr),i.contents().unwrap(),u._scrollWrapper=u._popupsWrapper=u._openedPopups=t)},_initScrolling:function(t,u,f,e){var s=this,v=s.options.scrollable,h=n.isNumeric(v.distance)?v.distance:gr,p=h/2,w="-="+h,d="+="+h,g="-="+2*h,b="+="+2*h,o=!1,c=!1,a=function(n){var i=e?{scrollLeft:n}:{scrollTop:n};t.finish().animate(i,"fast","linear",function(){o&&a(n)}),s._toggleScrollButtons(t,u,f,e)},l=function(n){o||c||(a(n.data.direction),o=!0)},y=function(i){var r=e?{scrollLeft:i.data.direction}:{scrollTop:i.data.direction};c=wr(i)||wt(i),t.stop().animate(r,"fast","linear",function(){c?(s._toggleScrollButtons(t,u,f,e),o=!0):n(i.currentTarget).trigger(k)}),o=!1,i.stopPropagation(),i.preventDefault()};u.on(k+r,{direction:w},l).on(i.eventMap.down+r,{direction:g},y),f.on(k+r,{direction:d},l).on(i.eventMap.down+r,{direction:b},y),u.add(f).on(ct+r,function(){t.stop(),o=!1,s._toggleScrollButtons(t,u,f,e)}),t.on(ii,function(n){var r,h,i,o;n.ctrlKey||n.shiftKey||n.altKey||(r=dr(n.originalEvent),h=Math.abs(r)*p,i=(r>0?"+=":"-=")+h,o=e?{scrollLeft:i}:{scrollTop:i},s._closeChildPopups(t),t.finish().animate(o,"fast","linear",function(){s._toggleScrollButtons(t,u,f,e)}),n.preventDefault())})},_toggleScrollButtons:function(n,t,i,r){var u=r?n.scrollLeft():n.scrollTop(),e=r?nu:hr,f=r?br:kr;t.toggle(0!==u),i.toggle(u<n[0][e]-n[0][f]-1)},setOptions:function(n){var t=this.options.animation;this._animations(n),n.animation=s(!0,t,n.animation),"dataSource"in n&&this._initData(n),this._updateClasses(),this._reinitOverflow(n),dt.fn.setOptions.call(this,n)},destroy:function(){var n=this;dt.fn.destroy.call(n),n._detachMenuEventsHandlers(),n._destroyOverflow(),i.destroy(n.element)},enable:function(n,t){return this._toggleDisabled(n,t!==!1),this},disable:function(n){return this._toggleDisabled(n,!1),this},append:function(n,t){t=this.element.find(t);var i=this._insert(n,t,t.length?t.find("> .k-menu-group, > .k-animation-container > .k-menu-group"):null);return gt(i.items,function(t){i.group.append(this),ot(this),bt(this,n[t]||n)}),ot(t),tt(i.group.find(".k-first, .k-last").add(i.items)),this},insertBefore:function(n,t){t=this.element.find(t);var i=this._insert(n,t,t.parent());return gt(i.items,function(i){t.before(this),ot(this),tt(this),bt(this,n[i]||n)}),tt(t),this},insertAfter:function(n,t){t=this.element.find(t);var i=this._insert(n,t,t.parent());return gt(i.items,function(i){t.after(this),ot(this),tt(this),bt(this,n[i]||n)}),tt(t),this},_insert:function(t,i,r){var u,c,o,e,h=this;return i&&i.length||(r=h.element),o=n.isPlainObject(t),e={firstLevel:r.hasClass(p),horizontal:r.hasClass(p+"-horizontal"),expanded:!0,length:r.children().length},i&&!r.length&&(r=n(f.renderGroup({group:e})).appendTo(i)),o||n.isArray(t)?u=n(n.map(o?[t]:t,function(t,i){return"string"==typeof t?n(t).get():n(f.renderItem({group:e,item:s(t,{index:i})})).get()})):(u="string"==typeof t&&"<"!=t.charAt(0)?h.element.find(t):n(t),c=u.find("> ul").addClass("k-menu-group").attr("role","menu"),u=u.filter("li"),u.add(c.find("> li")).each(function(){rr(this)})),{items:u,group:r}},remove:function(n){var u,t,i,r;return n=this.element.find(n),u=this,t=n.parentsUntil(u.element,b),i=n.parent("ul:not(.k-menu)"),n.remove(),i&&!i.children(b).length&&(r=i.parent(e),r.length?r.remove():i.remove()),t.length&&(t=t.eq(0),ot(t),tt(t)),u},open:function(r){var a,y,f=this,o=f.options,w="horizontal"==o.orientation,h=o.direction,b=i.support.isRtl(f.wrapper),e=f._overflowWrapper();return r=(e||f.element).find(r),/^(top|bottom|default)$/.test(h)&&(h=b?w?(h+" left").replace("default","bottom"):"left":w?(h+" right").replace("default","bottom"):"right"),a=">.k-popup:visible,>.k-animation-container>.k-popup:visible",y=function(){var t=n(this).data(d);t&&t.close(!0)},r.siblings().find(a).each(y),e&&(r.find(a).each(y),e.find("."+l).removeClass(l)),r.each(function(){var r=n(this);clearTimeout(r.data(yt)),r.data(yt,setTimeout(function(){var a,et,ot,ut,it,k,st,y,tt,g,l=r.find(".k-menu-group:first:hidden");!l[0]&&e&&(et=f._getPopup(r),l=et&&et.element),l.is(":visible")||l[0]&&f._triggerEvent({item:r[0],type:ht})===!1&&(!l.find(".k-menu-group")[0]&&l.children(".k-item").length>1?(ot=n(window).height(),ut=function(){l.css({maxHeight:ot-(i._outerHeight(l)-l.height())-i.getShadows(l).bottom,overflow:"auto"})},i.support.browser.msie&&i.support.browser.version<=7?setTimeout(ut,0):ut()):l.css({maxHeight:"",overflow:""}),r.data(rt,r.css(rt)),it=f.nextItemZIndex++,r.css(rt,it),f.options.scrollable&&r.parent().siblings(nt).css({zIndex:++it}),a=l.data(d),k=r.parent().hasClass(p),st=k&&w,y=sr(h,k,b),tt=o.animation.open.effects,g=tt!==t?tt:"slideIn:"+fu(h,k),a?(a=l.data(d),a.options.origin=y.origin,a.options.position=y.position,a.options.animation.open.effects=g):a=l.kendoPopup({activate:function(){f._triggerEvent({item:this.wrapper.parent(),type:ai})},deactivate:function(n){n.sender.element.removeData("targetTransform").css({opacity:""}),f._triggerEvent({item:this.wrapper.parent(),type:vi})},origin:y.origin,position:y.position,collision:o.popupCollision!==t?o.popupCollision:st?"fit":"fit flip",anchor:r,appendTo:e||r,animation:{open:s(!0,{effects:g},o.animation.open),close:o.animation.close},open:u(f._popupOpen,f),close:function(n){var i,t=n.sender.wrapper.parent();e&&(i=n.sender.element.data(c),i&&(t=(e||f.element).find(v(i))),n.sender.wrapper.children(nt).hide()),f._triggerEvent({item:t[0],type:ft})?n.preventDefault():(t.css(rt,t.data(rt)),t.removeData(rt),f.options.scrollable&&t.parent().siblings(nt).css({zIndex:""}),(vt||ti)&&(t.removeClass(si),f._removeHoverItem()))}}).data(d),l.removeAttr("aria-hidden"),f._configurePopupOverflow(a,r),a.open(),f._initPopupScrolling(a))},f.options.hoverDelay))}),f},_configurePopupOverflow:function(n,t){var i,r=this;r.options.scrollable&&(r._wrapPopupElement(n),t.attr("data-groupparent")||(i=+new Date,t.attr("data-groupparent",i),n.element.attr("data-group",i)))},_wrapPopupElement:function(n){n.element.parent().is(e)||(n.wrapper=i.wrap(n.element,n.options.autosize).css({overflow:"hidden",display:"block",position:"absolute"}))},_initPopupScrolling:function(n,t,i){var r=this;r.options.scrollable&&n.element[0].scrollHeight>n.element[0].offsetHeight&&r._initPopupScrollButtons(n,t,i)},_initPopupScrollButtons:function(t,i,u){var f=this,e=t.wrapper.children(nt),o=f.options.animation,s=(o&&o.open&&o.open.duration||0)+nr;setTimeout(function(){var s,o;e.length||(s=n(h.scrollButton({direction:i?"left":"up"})),o=n(h.scrollButton({direction:i?"right":"down"})),e=s.add(o).appendTo(t.wrapper),f._initScrolling(t.element,s,o,i),u||e.on(k+r,function(){var i=f._overflowWrapper();n(at(t.element,i)).each(function(n,t){var r=i.find(v(t.data(c)));f.close(r)})}).on(ct+r,function(){setTimeout(function(){n.isEmptyObject(f._openedPopups)&&f._closeParentPopups(t.element)},nr)})),f._toggleScrollButtons(t.element,e.first(),e.last(),i)},s)},_popupOpen:function(n){this.options.scrollable&&this._setPopupHeight(n.sender)},_setPopupHeight:function(t,r){var c,h,v,s,o,y,u,w,l,f=t.element,a=f.add(f.parent(e));a.height(f.hasClass(p)&&this._initialHeight||""),c=t._location(r),h=n(window).height(),v=c.height,s=r?0:Math.max(c.top,0),o=r?0:er(this._overflowWrapper()[0],"scrollTop"),y=window.innerHeight-h,u=h-i.getShadows(f).bottom+y,w=u+o>v+s,w||(l=Math.min(u,u-s+o),a.css({overflow:"hidden",height:l+"px"}))},close:function(t,i){var e,o,r=this,u=r._overflowWrapper(),f=u||r.element;return t=f.find(t),t.length||(t=f.find(">.k-item")),e=function(t){var i=!1;return n.isEmptyObject(r._openedPopups)?i:(n(at(t,u)).each(function(n,t){return i=!!r._openedPopups[""+t.data(c)],!i}),i)},o=function(n){var t=n.data(a);return!u||!t||!r._openedPopups[""+t]},t.each(function(){var f=n(this);!i&&r._isRootItem(f)&&(r.clicked=!1),clearTimeout(f.data(yt)),f.data(yt,setTimeout(function(){var n=r._getPopup(f);if(n&&(o(f)||r._forceClose)){if(!r._forceClose&&e(n.element))return;n.close(),n.element.attr("aria-hidden",!0),u&&r._forceClose&&t.last().is(f[0])&&delete r._forceClose}},r.options.hoverDelay))}),r},_getPopup:function(n){var i,u,f=this,t=n.find(".k-menu-group:not(.k-list-container):not(.k-calendar-container):first:visible").data(d),r=f._overflowWrapper();return!t&&r&&(i=n.data(a),i&&(u=r.find(et(i)),t=u.data(d))),t},_toggleDisabled:function(t,i){this.element.find(t).each(function(){n(this).toggleClass(pi,i).toggleClass(g,!i).attr("aria-disabled",!i)})},_toggleHover:function(t){var r=n(i.eventTarget(t)||t.target).closest(b),u=t.type==k||oi.indexOf(t.type)!==-1;r.parents("li."+g).length||r.toggleClass(si,u||"mousedown"==t.type||"click"==t.type),this._removeHoverItem()},_preventClose:function(){this.options.closeOnClick||(this._closurePrevented=!0)},_checkActiveElement:function(t){var u=this,f=n(t?t.currentTarget:this._hoverItem()),r=u._findRootParent(f)[0];this._closurePrevented||setTimeout(function(){document.hasFocus()&&(o(r,i._activeElement())||!t||o(r,t.currentTarget))||u.close(r)},0),this._closurePrevented=!1},_removeHoverItem:function(){var n=this._hoverItem();n&&n.hasClass(l)&&(n.removeClass(l),this._oldHoverItem=null)},_updateClasses:function(){var t,n=this.element,r=".k-menu-init div ul";n.removeClass("k-menu-horizontal k-menu-vertical"),n.addClass("k-widget k-reset k-header k-menu-init "+p).addClass(p+"-"+this.options.orientation),n.find("li > ul").filter(function(){return!i.support.matchesSelector.call(this,r)}).addClass("k-group k-menu-group").attr("role","menu").attr("aria-hidden",n.is(":visible")).end().find("li > div").addClass("k-content").attr("tabindex","-1"),t=n.find("> li,.k-menu-group > li"),n.removeClass("k-menu-init"),t.each(function(){rr(this)})},_mouseenter:function(t){var i=this,r=n(t.currentTarget),s=i._itemHasChildren(r),f=r.data(a)||r.parent().data(c),e=wt(t);f&&(i._openedPopups[""+f]=!0),t.delegateTarget!=r.parents(ci)[0]&&t.delegateTarget!=r.parents(".k-menu-scroll-wrapper,.k-popups-wrapper")[0]||(i.options.openOnClick&&!i.clicked||vt||e&&i._isRootItem(r.closest(b))||!o(t.currentTarget,t.relatedTarget)&&s&&i.open(r),(i.options.openOnClick&&i.clicked||vt)&&r.siblings().each(u(function(n,t){i.close(t,!0)},i)))},_mouseleave:function(r){var f=this,u=n(r.currentTarget),s=u.data(a),c=u.children(e).length||u.children(fi).length||s,h=n(window);return s&&delete f._openedPopups[""+s],u.parentsUntil(e,".k-list-container,.k-calendar-container")[0]?(r.stopImmediatePropagation(),t):f.options.openOnClick||vt||wt(r)||o(r.currentTarget,r.relatedTarget||r.target)||!c||o(r.currentTarget,i._activeElement())?((!r.toElement&&!r.relatedTarget||r.clientX<0||r.clientY<0||r.clientY>h.height()||r.clientX>h.width())&&f.close(u),t):(f.close(u),t)},_mouseenterPopup:function(t){var r,u=this,i=n(t.currentTarget);i.parent().is(e)||(i=i.children("ul"),r=i.data(c),r&&(u._openedPopups[""+r]=!0))},_mouseleavePopup:function(t){var r=this,i=n(t.currentTarget);!wt(t)&&i.is(e)&&r._closePopups(i.children("ul"))},_closePopups:function(t){var u,i=this,f=i._overflowWrapper(),r=t.data(c);r&&(delete i._openedPopups[""+r],u=f.find(v(r)),setTimeout(function(){if(i.options.openOnClick)i._closeChildPopups(t);else if(n.isEmptyObject(i._openedPopups)){var r=i._innerPopup(t);i._closeParentPopups(r)}else i.close(u,!0)},0))},_closeChildPopups:function(t){var r=this,i=r._overflowWrapper();n(at(t,i)).each(function(){var n=i.find(v(this.data(c)));r.close(n,!0)})},_innerPopup:function(n){var i=this._overflowWrapper(),t=at(n,i);return t[t.length-1]||n},_closeParentPopups:function(n){var r=this,u=r._overflowWrapper(),t=n.data(c),i=u.find(v(t));for(t=i.parent().data(c),r.close(i,!0);t&&!r._openedPopups[t]&&!i.parent().is(ci);)i=u.find(v(t)),r.close(i,!0),t=i.parent().data(c)},_click:function(r){for(var v,s,ot,rt,w,d,u=this,l=u.options,e=n(i.eventTarget(r)),o=e[0],h=e[0]?e[0].nodeName.toUpperCase():"",it="INPUT"==h||"SELECT"==h||"BUTTON"==h||"LABEL"==h,y=e.closest("."+st),f=e.closest(b),ut=f[0],p=y.attr("href"),nt=e.attr("href"),tt=n("<a href='#' />").attr("href"),c=!!p&&p!==tt,ct=c&&!!p.match(/^#/),lt=!!nt&&nt!==tt,k=u._overflowWrapper();o&&o.parentNode!=ut;)o=o.parentNode;if(!n(o).is(pr)){if(f.hasClass(g))return r.preventDefault(),t;if(r.handled||!u._triggerSelect(e,ut)||it||r.preventDefault(),r.handled=!0,s=f.children(ui),k&&(w=f.data(a),w&&(s=k.find(et(w)))),ot=s.is(":visible"),rt=l.openOnClick&&ot&&u._isRootItem(f),l.closeOnClick&&(!c||ct)&&(!s.length||rt))return f.removeClass(si).css("height"),u._oldHoverItem=u._findRootParent(f),d=u._parentsUntil(y,u.element,b),u._forceClose=!!k,u.close(d),u.clicked=!1,"MSPointerUp".indexOf(r.type)!=-1&&r.preventDefault(),t;c&&r.enterKey&&y[0].click(),(u._isRootItem(f)&&l.openOnClick||i.support.touch||ti&&u._isRootItem(f.closest(b)))&&(c||it||lt||r.preventDefault(),u.clicked=!0,v=s.is(":visible")?ft:ht,(l.closeOnClick||v!=ft)&&u[v](f))}},_parentsUntil:function(i,r,u){var o,f,e=this._overflowWrapper();return e?(o=uu(i,e),f=[],n(o).each(function(){var i=n(this);return!i.is(r)&&(i.is(u)&&f.push(this),t)}),n(f)):i.parentsUntil(r,u)},_triggerSelect:function(n,t){var i,f,u,r=n.data("selectHandler");return r&&(i=this._getEventData(n),r.call(this,i)),f=i&&i.isDefaultPrevented(),u=this._triggerEvent({item:t,type:ut}),f||u},_getEventData:function(n){return{sender:this,target:n,_defaultPrevented:!1,preventDefault:function(){this._defaultPrevented=!0},isDefaultPrevented:function(){return this._defaultPrevented}}},_documentClick:function(n){var t=this;o((t._overflowWrapper()||t.element)[0],n.target)||(t.clicked=!1)},_focus:function(i){var r=this,u=i.target,f=r._hoverItem(),e=eu();return u==r.wrapper[0]||n(u).is(":kendoFocusable")?(e===i.currentTarget&&(f.length?r._moveHover([],f):r._oldHoverItem||r._moveHover([],r.wrapper.children().first())),t):(i.stopPropagation(),n(u).closest(".k-content").closest(".k-menu-group").closest(".k-item").addClass(l),r.wrapper.focus(),t)},_keydown:function(n){var f,o,s,r=this,e=n.keyCode,u=r._oldHoverItem,h=i.support.isRtl(r.wrapper);if(n.target==n.currentTarget||e==w.ESC){if(u||(u=r._oldHoverItem=r._hoverItem()),o=r._itemBelongsToVertival(u),s=r._itemHasChildren(u),e==w.RIGHT)f=r[h?"_itemLeft":"_itemRight"](u,o,s);else if(e==w.LEFT)f=r[h?"_itemRight":"_itemLeft"](u,o,s);else if(e==w.DOWN)f=r._itemDown(u,o,s);else if(e==w.UP)f=r._itemUp(u,o,s);else if(e==w.ESC)f=r._itemEsc(u,o);else if(e==w.ENTER||e==w.SPACEBAR)f=u.children(".k-link"),f.length>0&&(r._click({target:f[0],preventDefault:function(){},enterKey:!0}),r._moveHover(u,r._findRootParent(u)));else if(e==w.TAB)return f=r._findRootParent(u),r._moveHover(u,f),r._checkActiveElement(),t;f&&f[0]&&(n.preventDefault(),n.stopPropagation())}},_hoverItem:function(){return this.wrapper.find(".k-item.k-state-hover,.k-item.k-state-focused").filter(":visible")},_itemBelongsToVertival:function(n){var t=this.wrapper.hasClass("k-menu-vertical");return n.length?n.parent().hasClass("k-menu-group")||t:t},_itemHasChildren:function(n){return!!(n&&n.length&&n[0].nodeType)&&(n.children("ul.k-menu-group, div.k-animation-container").length>0||!!n.data(a)&&!!this._overflowWrapper().children(et(n.data(a))))},_moveHover:function(t,i){var u=this,r=u._ariaId;t.length&&i.length&&t.removeClass(l),i.length&&(i[0].id&&(r=i[0].id),i.addClass(l),u._oldHoverItem=i,r&&(u.element.removeAttr("aria-activedescendant"),n("#"+r).removeAttr("id"),i.attr("id",r),u.element.attr("aria-activedescendant",r)),u._scrollToItem(i))},_findRootParent:function(n){return this._isRootItem(n)?n:this._parentsUntil(n,ci,"li.k-item").last()},_isRootItem:function(n){return n.parent().hasClass(p)},_itemRight:function(n,t,i){var r,f,e,o,u=this;if(!n.hasClass(g))return t?i?(u.open(n),r=u._childPopupElement(n).children().first()):"horizontal"==u.options.orientation&&(f=u._findRootParent(n),e=u._overflowWrapper(),e&&(o=bi(f,e),u._closeChildPopups(o)),u.close(f),r=f.nextAll(it)):(r=n.nextAll(it),r.length||(r=n.prevAll(ir))),r&&!r.length?r=u.wrapper.children(".k-item").first():r||(r=[]),u._moveHover(n,r),r},_itemLeft:function(n,t){var i,u,r=this;return t?(i=n.parent().closest(".k-item"),u=r._overflowWrapper(),!i.length&&u&&(i=hi(n.parent(),u)),r.close(i),r._isRootItem(i)&&"horizontal"==r.options.orientation&&(i=i.prevAll(it))):(i=n.prevAll(it),i.length||(i=n.nextAll(ir))),i.length||(i=r.wrapper.children(".k-item").last()),r._moveHover(n,i),i},_itemDown:function(n,t,i){var r,u=this;if(t)r=n.nextAll(it);else{if(!i||n.hasClass(g))return;u.open(n),r=u._childPopupElement(n).children().first()}return!r.length&&n.length?r=n.parent().children().first():n.length||(r=u.wrapper.children(".k-item").first()),u._moveHover(n,r),r},_itemUp:function(n,t){var i,r=this;if(t)return i=n.prevAll(it),!i.length&&n.length?i=n.parent().children().last():n.length||(i=r.wrapper.children(".k-item").last()),r._moveHover(n,i),i},_scrollToItem:function(n){var t,e,a,o,l,y,r,v,f,u,s,h,c=this;c.options.scrollable&&n&&n.length&&(t=n.parent(),e=!!t.hasClass(p)&&"horizontal"==c.options.orientation,a=e?"scrollLeft":"scrollTop",o=e?i._outerWidth:i._outerHeight,l=t[a](),y=o(n),r=n[0][e?"offsetLeft":"offsetTop"],v=o(t),f=t.siblings(nt),u=f.length?o(f.first()):0,l+v<r+y+u?s=r+y-v+u:l>r-u&&(s=r-u),isNaN(s)||(h={},h[a]=s,t.finish().animate(h,"fast","linear",function(){c._toggleScrollButtons(t,f.first(),f.last(),e)})))},_itemEsc:function(n,t){var i,r=this;return t?(i=n.parent().closest(".k-item"),r.close(i),r._moveHover(n,i),i):n},_childPopupElement:function(n){var t=n.find(".k-menu-group"),i=this._overflowWrapper();return!t.length&&i&&(t=bi(n,i)),t},_triggerEvent:function(n){var t=this;return t.trigger(n.type,{type:n.type,item:n.item})},_focusHandler:function(t){var u=this,r=n(i.eventTarget(t)).closest(b);r.hasClass(g)||setTimeout(function(){u._moveHover([],r),r.children(".k-content")[0]&&r.parent().closest(".k-item").removeClass(l)},200)},_animations:function(n){n&&"animation"in n&&!n.animation&&(n.animation={open:{effects:{}},close:{hide:!0,effects:{}}})}});s(f,{renderItem:function(n){n=s({menu:{},group:{}},n);var i=h.empty,t=n.item;return h.item(s(n,{image:t.imageUrl?h.image:i,sprite:t.spriteCssClass?h.sprite:i,itemWrapper:h.itemWrapper,renderContent:f.renderContent,arrow:t.items||t.content?h.arrow:i,subGroup:f.renderGroup},ei))},renderGroup:function(n){return h.group(s({renderItems:function(n){for(var u="",t=0,i=n.items,r=i?i.length:0,e=s({length:r},n.group);t<r;t++)u+=f.renderItem(s(n,{group:e,item:s({index:t},i[t])}));return u}},n,ei))},renderContent:function(n){return h.content(s(n,ei))}}),ur=f.extend({init:function(t,r){var u=this;f.fn.init.call(u,t,r),u._marker=i.guid().substring(0,8),u.target=n(u.options.target),u._popup(),u._wire()},_initOverflow:function(n){var t=this;n.scrollable&&!t._overflowWrapper()&&(t._openedPopups={},t._popupsWrapper=(t.element.parent().is(e)?t.element.parent():t.element).wrap("<div class='k-popups-wrapper "+n.orientation+"'></div>").parent(),"horizontal"==t.options.orientation&&di(t.element),n.appendTo&&n.appendTo.append(t._popupsWrapper),t._initialHeight=t.element[0].style.height,t._initialWidth=t.element[0].style.width)},options:{name:"ContextMenu",filter:null,showOn:"contextmenu",orientation:"vertical",alignToAnchor:!1,target:"body"},events:[ht,ft,ai,vi,ut],setOptions:function(t){var i=this;f.fn.setOptions.call(i,t),i.target.off(i.showOn+r+i._marker,i._showProxy),i.userEvents&&i.userEvents.destroy(),i.target=n(i.options.target),t.orientation&&i.popup.wrapper[0]&&i.popup.element.unwrap(),i._wire(),f.fn.setOptions.call(this,t)},destroy:function(){var n=this;n.target.off(n.options.showOn+r+n._marker),pt.off(i.support.mousedown+r+n._marker,n._closeProxy),n.userEvents&&n.userEvents.destroy(),f.fn.destroy.call(n)},open:function(u,e){var h,c,s=this;return u=n(u)[0],o(s.element[0],n(u)[0])||s._itemHasChildren(n(u))?f.fn.open.call(s,u):s._triggerEvent({item:s.element,type:ht})===!1&&(s.popup.visible()&&s.options.filter&&(s.popup.close(!0),s.popup.element.kendoStop(!0)),e!==t?(h=s._overflowWrapper(),h&&(c=h.offset(),u-=c.left,e-=c.top),s.popup.wrapper.hide(),s._configurePopupScrolling(u,e),s.popup.open(u,e)):(s.popup.options.anchor=(u?u:s.popup.anchor)||s.target,s.popup.element.kendoStop(!0),s._configurePopupScrolling(),s.popup.open()),pt.off(s.popup.downEvent,s.popup._mousedownProxy),pt.on(i.support.mousedown+r+s._marker,s._closeProxy)),s},_configurePopupScrolling:function(n,i){var u=this,r=u.popup,f="horizontal"==u.options.orientation;u.options.scrollable&&(u._wrapPopupElement(r),r.element.parent().css({position:"",height:""}),r.element.css({visibility:"hidden",display:"",position:""}),f?u._setPopupWidth(r,isNaN(n)?t:{isFixed:!0,x:n,y:i}):u._setPopupHeight(r,isNaN(n)?t:{isFixed:!0,x:n,y:i}),r.element.css({visibility:"",display:"none",position:"absolute"}),u._initPopupScrollButtons(r,f,!0),r.element.siblings(nt).hide())},_setPopupWidth:function(t,r){var h,y,v,c,f,u,s,a,o=t.element,l=o.add(o.parent(e));l.width(this._initialWidth||""),h=t._location(r),y=n(window).width(),v=h.width,c=Math.max(h.left,0),f=r?0:er(this._overflowWrapper()[0],"scrollLeft"),u=i.getShadows(o),s=y-u.left-u.right,a=s+f>v+c,a||l.css({overflow:"hidden",width:s-c+f+"px"})},close:function(){var t=this;o(t.element[0],n(arguments[0])[0])||t._itemHasChildren(arguments[0])?f.fn.close.call(t,arguments[0]):t.popup.visible()&&t._triggerEvent({item:t.element,type:ft})===!1&&(t.popup.close(),pt.off(i.support.mousedown+r,t._closeProxy),t.unbind(ut,t._closeTimeoutProxy))},_showHandler:function(n){var f,t=n,r=this,u=r.options;n.event&&(t=n.event,t.pageX=n.x.location,t.pageY=n.y.location),o(r.element[0],n.relatedTarget||n.target)||(r._eventOrigin=t,t.preventDefault(),t.stopImmediatePropagation(),r.element.find("."+l).removeClass(l),(u.filter&&i.support.matchesSelector.call(t.currentTarget,u.filter)||!u.filter)&&(u.alignToAnchor?(r.popup.options.anchor=t.currentTarget,r.open(t.currentTarget)):(r.popup.options.anchor=t.currentTarget,r._targetChild?(f=r.target.offset(),r.open(t.pageX-f.left,t.pageY-f.top)):r.open(t.pageX,t.pageY))))},_closeHandler:function(t){var s,i=this,r=n(t.relatedTarget||t.target),f=r.closest(i.target.selector)[0]==i.target[0],c=r.closest(lt),h=i._itemHasChildren(c),e=i._overflowWrapper(),u=o(i.element[0],r[0])||e&&o(e[0],r[0]);i._eventOrigin=t,s=3!==t.which,i.popup.visible()&&(s&&f||!f)&&(i.options.closeOnClick&&!h&&u||!u)&&(u?(this.unbind(ut,this._closeTimeoutProxy),i.bind(ut,i._closeTimeoutProxy)):i.close())},_wire:function(){var n=this,t=n.options,f=n.target;n._showProxy=u(n._showHandler,n),n._closeProxy=u(n._closeHandler,n),n._closeTimeoutProxy=u(n.close,n),f[0]&&(i.support.mobileOS&&"contextmenu"==t.showOn?(n.userEvents=new i.UserEvents(f,{filter:t.filter,allowSelection:!1}),f.on(t.showOn+r+n._marker,!1),n.userEvents.bind("hold",n._showProxy)):t.filter?f.on(t.showOn+r+n._marker,t.filter,n._showProxy):f.on(t.showOn+r+n._marker,n._showProxy))},_triggerEvent:function(i){var r=this,f=n(r.popup.options.anchor)[0],u=r._eventOrigin;return r._eventOrigin=t,r.trigger(i.type,s({type:i.type,item:i.item||this.element[0],target:f},u?{event:u}:{}))},_popup:function(){var t=this,i=t._overflowWrapper();t._triggerProxy=u(t._triggerEvent,t),t.popup=t.element.addClass("k-context-menu").kendoPopup({anchor:t.target||"body",copyAnchorStyles:t.options.copyAnchorStyles,collision:t.options.popupCollision||"fit",animation:t.options.animation,activate:t._triggerProxy,deactivate:t._triggerProxy,appendTo:i||t.options.appendTo,close:i?function(t){n(at(t.sender.element,i)).each(function(n,t){var i=t.data(d);i&&i.close(!0)})}:n.noop}).data(d),t._targetChild=o(t.target[0],t.popup.element[0])}}),yi.plugin(f),yi.plugin(ur)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.columnmenu.min",["kendo.popup.min","kendo.filtermenu.min","kendo.menu.min"],n)}(function(){return function(n,t){function ft(t){return n.trim(t).replace(/&nbsp;/gi,"")}function et(n,t){for(var r,u={},i=0,f=n.length;i<f;i++)r=n[i],u[r[t]]=r;return u}function a(n){for(var i=[],t=0;t<n.length;t++)n[t].columns?i=i.concat(a(n[t].columns)):i.push(n[t]);return i}var i=window.kendo,v=i.ui,f=n.proxy,rt=n.extend,r=n.grep,l=n.map,w=n.inArray,e="k-state-selected",c="asc",b="desc",k="change",d="init",y="open",s="select",h="kendoPopup",ut="kendoFilterMenu",p="kendoMenu",u=".kendoColumnMenu",o=v.Widget,nt=o.extend({init:function(t,r){var s,e=this;o.fn.init.call(e,t,r),t=e.element,r=e.options,e.owner=r.owner,e.dataSource=r.dataSource,e.field=t.attr(i.attr("field")),e.title=t.attr(i.attr("title")),s=t.find(".k-header-column-menu"),s[0]||(s=t.addClass("k-with-icon").prepend('<a class="k-header-column-menu" href="#" title="'+r.messages.settings+'" aria-label="'+r.messages.settings+'"><span class="k-icon k-i-more-vertical"></span></a>').find(".k-header-column-menu")),e.link=s.attr("tabindex",-1).on("click"+u,f(e._click,e)),e.wrapper=n('<div class="k-column-menu"/>'),e._refreshHandler=f(e.refresh,e),e.dataSource.bind(k,e._refreshHandler)},_init:function(){var n=this;n.pane=n.options.pane,n.pane&&(n._isMobile=!0),n._isMobile?n._createMobileMenu():n._createMenu(),n.owner._muteAngularRebind(function(){n._angularItems("compile")}),n._sort(),n._columns(),n._filter(),n._lockColumns(),n.trigger(d,{field:n.field,container:n.wrapper})},events:[d,y,"sort","filtering"],options:{name:"ColumnMenu",messages:{sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filter:"Filter",columns:"Columns",done:"Done",settings:"Column Settings",lock:"Lock",unlock:"Unlock"},filter:"",columns:!0,sortable:!0,filterable:!0,animations:{left:"slide"}},_createMenu:function(){var n=this,t=n.options;n.wrapper.html(i.template(g)({uid:i.guid(),ns:i.ns,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:n._ownerColumns(),showColumns:t.columns,lockedColumns:t.lockedColumns})),n.popup=n.wrapper[h]({anchor:n.link,open:f(n._open,n),activate:f(n._activate,n),close:function(){n.options.closeCallback&&n.options.closeCallback(n.element)}}).data(h),n.menu=n.wrapper.children()[p]({orientation:"vertical",closeOnClick:!1}).data(p)},_createMobileMenu:function(){var n=this,t=n.options,r=i.template(it)({ns:i.ns,field:n.field,title:n.title||n.field,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:n._ownerColumns(),showColumns:t.columns,lockedColumns:t.lockedColumns});n.view=n.pane.append(r),n.wrapper=n.view.element.find(".k-column-menu"),n.menu=new tt(n.wrapper.children(),{pane:n.pane}),n.view.element.on("click",".k-done",function(t){n.close(),t.preventDefault()}),n.options.lockedColumns&&n.view.bind("show",function(){n._updateLockedColumns()})},_angularItems:function(t){var r=this;r.angular(t,function(){var u=r.wrapper.find(".k-columns-item input["+i.attr("field")+"]").map(function(){return n(this).closest("li")}),t=l(r._ownerColumns(),function(n){return{column:n._originalObject}});return{elements:u,data:t}})},destroy:function(){var n=this;n._angularItems("cleanup"),o.fn.destroy.call(n),n.filterMenu&&n.filterMenu.destroy(),n._refreshHandler&&n.dataSource.unbind(k,n._refreshHandler),n.options.columns&&n.owner&&(n._updateColumnsMenuHandler&&(n.owner.unbind("columnShow",n._updateColumnsMenuHandler),n.owner.unbind("columnHide",n._updateColumnsMenuHandler)),n._updateColumnsLockedStateHandler&&(n.owner.unbind("columnLock",n._updateColumnsLockedStateHandler),n.owner.unbind("columnUnlock",n._updateColumnsLockedStateHandler))),n.menu&&(n.menu.element.off(u),n.menu.destroy()),n.wrapper.off(u),n.popup&&n.popup.destroy(),n.view&&n.view.purge(),n.link.off(u),n.owner=null,n.wrapper=null,n.element=null},close:function(){this.menu.close(),this.popup&&(this.popup.close(),this.popup.element.off("keydown"+u))},_click:function(n){n.preventDefault(),n.stopPropagation();var t=this.options;t.filter&&this.element.is(!t.filter)||(this.popup||this.pane||this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle())},_open:function(){var t=this;n(".k-column-menu").not(t.wrapper).each(function(){n(this).data(h).close()}),t.popup.element.on("keydown"+u,function(n){n.keyCode==i.keys.ESC&&t.close()}),t.options.lockedColumns&&t._updateLockedColumns()},_activate:function(){this.menu.element.focus(),this.trigger(y,{field:this.field,container:this.wrapper})},_ownerColumns:function(){var n=a(this.owner.columns),t=r(n,function(n){var t=!0,i=ft(n.title||"");return n.menu!==!1&&(n.field||i.length)||(t=!1),t});return l(t,function(t){return{originalField:t.field,field:t.field||t.title,title:t.title||t.field,hidden:t.hidden,index:w(t,n),locked:!!t.locked,_originalObject:t}})},_sort:function(){var t=this;t.options.sortable&&(t.refresh(),t.menu.bind(s,function(i){var r,u=n(i.item);u.hasClass("k-sort-asc")?r=c:u.hasClass("k-sort-desc")&&(r=b),r&&(u.parent().find(".k-sort-"+(r==c?b:c)).removeClass(e),t._sortDataSource(u,r),t.close())}))},_sortDataSource:function(n,i){var o,c,r=this,f=r.options.sortable,s=null===f.compare?t:f.compare,l=r.dataSource,u=l.sort()||[],h=n.hasClass(e)&&f&&f.allowUnsort!==!1;if(i=h?t:i,!r.trigger("sort",{sort:{field:r.field,dir:i,compare:s}})){if(h?n.removeClass(e):n.addClass(e),"multiple"===f.mode){for(o=0,c=u.length;o<c;o++)if(u[o].field===r.field){u.splice(o,1);break}u.push({field:r.field,dir:i,compare:s})}else u=[{field:r.field,dir:i,compare:s}];l.sort(u)}},_columns:function(){var t=this;t.options.columns&&(t._updateColumnsMenu(),t._updateColumnsMenuHandler=f(t._updateColumnsMenu,t),t.owner.bind(["columnHide","columnShow"],t._updateColumnsMenuHandler),t._updateColumnsLockedStateHandler=f(t._updateColumnsLockedState,t),t.owner.bind(["columnUnlock","columnLock"],t._updateColumnsLockedStateHandler),t.menu.bind(s,function(u){var o,f,e,s=n(u.item),h=a(t.owner.columns);t._isMobile&&u.preventDefault(),s.parent().closest("li.k-columns-item")[0]&&(o=s.find(":checkbox"),o.attr("disabled")||(e=o.attr(i.attr("field")),f=r(h,function(n){return n.field==e||n.title==e})[0],f.hidden===!0?t.owner.showColumn(f):t.owner.hideColumn(f)))}))},_updateColumnsMenu:function(){var u,s,n,t,o,e,c=i.attr("field"),y=i.attr("locked"),f=r(this._ownerColumns(),function(n){return!n.hidden}),h=r(f,function(n){return n.originalField}),v=r(h,function(n){return n.locked===!0}).length,a=r(h,function(n){return n.locked!==!0}).length;for(f=l(f,function(n){return n.field}),this.wrapper.find("[role='menuitemcheckbox']").attr("aria-checked",!1),e=this.wrapper.find(".k-columns-item input["+c+"]").prop("disabled",!1).prop("checked",!1),u=0,s=e.length;u<s;u++)n=e.eq(u),o="true"===n.attr(y),t=!1,w(n.attr(c),f)>-1&&(t=!0,n.prop("checked",t)),n.closest("[role='menuitemcheckbox']").attr("aria-checked",t),t&&(1==v&&o&&n.prop("disabled",!0),1!=a||o||n.prop("disabled",!0))},_updateColumnsLockedState:function(){for(var r,t,s=i.attr("field"),e=i.attr("locked"),o=et(this._ownerColumns(),"field"),u=this.wrapper.find(".k-columns-item input[type=checkbox]"),n=0,f=u.length;n<f;n++)r=u.eq(n),t=o[r.attr(s)],t&&r.attr(e,t.locked);this._updateColumnsMenu()},_filter:function(){var t=this,r=ut,i=t.options;i.filterable!==!1&&(i.filterable.multi&&(r="kendoFilterMultiCheck",i.filterable.dataSource&&(i.filterable.checkSource=i.filterable.dataSource,delete i.filterable.dataSource)),t.filterMenu=t.wrapper.find(".k-filterable")[r](rt(!0,{},{appendToElement:!0,dataSource:i.dataSource,values:i.values,field:t.field,title:t.title,change:function(n){t.trigger("filtering",{filter:n.filter,field:n.field})&&n.preventDefault()}},i.filterable)).data(r),t._isMobile&&t.menu.bind(s,function(i){var r=n(i.item);r.hasClass("k-filter-item")&&t.pane.navigate(t.filterMenu.view,t.options.animations.left)}))},_lockColumns:function(){var t=this;t.menu.bind(s,function(i){var r=n(i.item);r.hasClass("k-lock")?(t.owner.lockColumn(t.field),t.close()):r.hasClass("k-unlock")&&(t.owner.unlockColumn(t.field),t.close())})},_updateLockedColumns:function(){var n,t,e,o,f=this.field,i=this.owner.columns,u=r(i,function(n){return n.field==f||n.title==f})[0];u&&(n=u.locked===!0,t=r(i,function(t){return!t.hidden&&(t.locked&&n||!t.locked&&!n)}).length,e=this.wrapper.find(".k-lock").removeClass("k-state-disabled"),o=this.wrapper.find(".k-unlock").removeClass("k-state-disabled"),(n||1==t)&&e.addClass("k-state-disabled"),n&&1!=t||o.addClass("k-state-disabled"),this._updateColumnsLockedState())},refresh:function(){var i,t,u,n=this,r=n.options.dataSource.sort()||[],f=n.field;for(n.wrapper.find(".k-sort-asc, .k-sort-desc").removeClass(e),t=0,u=r.length;t<u;t++)i=r[t],f==i.field&&n.wrapper.find(".k-sort-"+i.dir).addClass(e);n.link[n._filterExist(n.dataSource.filter())?"addClass":"removeClass"]("k-state-active")},_filterExist:function(n){var r,i,u,t=!1;if(n){for(n=n.filters,i=0,u=n.length;i<u;i++)r=n[i],r.field==this.field?t=!0:r.filters&&(t=t||this._filterExist(r));return t}}}),g='<ul id="#=uid#">#if(sortable){#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc-sm"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc-sm"></span>${messages.sortDescending}</span></li>#if(showColumns || filterable){#<li class="k-separator" role="presentation"></li>#}##}##if(showColumns){#<li class="k-item k-columns-item" aria-haspopup="true"><span class="k-link"><span class="k-icon k-i-columns"></span>${messages.columns}</span><ul>#for (var idx = 0; idx < columns.length; idx++) {#<li role="menuitemcheckbox" aria-checked="false"><input type="checkbox" data-#=ns#field="#=columns[idx].field.replace(/"/g,"&\\#34;")#" data-#=ns#index="#=columns[idx].index#" data-#=ns#locked="#=columns[idx].locked#"/>#=columns[idx].title#</li>#}#</ul></li>#if(filterable || lockedColumns){#<li class="k-separator" role="presentation"></li>#}##}##if(filterable){#<li class="k-item k-filter-item" aria-haspopup="true"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.filter}</span><ul><li><div class="k-filterable"></div></li></ul></li>#if(lockedColumns){#<li class="k-separator" role="presentation"></li>#}##}##if(lockedColumns){#<li class="k-item k-lock"><span class="k-link"><span class="k-icon k-i-lock"></span>${messages.lock}</span></li><li class="k-item k-unlock"><span class="k-link"><span class="k-icon k-i-unlock"></span>${messages.unlock}</span></li>#}#</ul>',it='<div data-#=ns#role="view" data-#=ns#init-widgets="false" data-#=ns#use-native-scrolling="true" class="k-grid-column-menu"><div data-#=ns#role="header" class="k-header">${messages.settings}<button class="k-button k-done">#=messages.done#</button></div><div class="k-column-menu k-mobile-list"><ul><li><span class="k-link">${title}</span><ul>#if(sortable){#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc-sm"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc-sm"></span>${messages.sortDescending}</span></li>#}##if(lockedColumns){#<li class="k-item k-lock"><span class="k-link"><span class="k-icon k-i-lock"></span>${messages.lock}</span></li><li class="k-item k-unlock"><span class="k-link"><span class="k-icon k-i-unlock"></span>${messages.unlock}</span></li>#}##if(filterable){#<li class="k-item k-filter-item"><span class="k-link k-filterable"><span class="k-icon k-i-filter"></span>${messages.filter}</span></li>#}#</ul></li>#if(showColumns){#<li class="k-columns-item"><span class="k-link">${messages.columns}</span><ul>#for (var idx = 0; idx < columns.length; idx++) {#<li class="k-item"><label class="k-label"><input type="checkbox" class="k-check" data-#=ns#field="#=columns[idx].field.replace(/"/g,"&\\#34;")#" data-#=ns#index="#=columns[idx].index#" data-#=ns#locked="#=columns[idx].locked#"/>#=columns[idx].title#</label></li>#}#</ul></li>#}#</ul></div></div>',tt=o.extend({init:function(n,t){o.fn.init.call(this,n,t),this.element.on("click"+u,"li.k-item:not(.k-separator):not(.k-state-disabled)","_click")},events:[s],_click:function(t){n(t.target).is("[type=checkbox]")||t.preventDefault(),this.trigger(s,{item:t.currentTarget})},close:function(){this.options.pane.navigate("")},destroy:function(){o.fn.destroy.call(this),this.element.off(u)}});v.plugin(nt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.columnsorter.min",["kendo.core.min"],n)}(function(){return function(n,t){var i=window.kendo,l=i.ui,o=l.Widget,u="dir",r="asc",a="single",v="field",f="desc",c=".kendoColumnSorter",h=".k-link",e="aria-sort",s=n.proxy,y=o.extend({init:function(n,t){var u,i=this;o.fn.init.call(i,n,t),i._refreshHandler=s(i.refresh,i),i.dataSource=i.options.dataSource.bind("change",i._refreshHandler),i.directions=i.options.initialDirection===r?[r,f]:[f,r],u=i.element.find(h),u[0]||(u=i.element.wrapInner('<a class="k-link" href="#"/>').find(h)),i.link=u,i.element.on("click"+c,s(i._click,i))},options:{name:"ColumnSorter",mode:a,allowUnsort:!0,compare:null,filter:"",initialDirection:r,showIndexes:!1},events:["change"],destroy:function(){var n=this;o.fn.destroy.call(n),n.element.off(c),n.dataSource.unbind("change",n._refreshHandler),n._refreshHandler=n.element=n.link=n.dataSource=null},refresh:function(){var s,y,l,a,c,o=this,h=o.dataSource.sort()||[],t=o.element,p=t.attr(i.attr(v));for(t.removeAttr(i.attr(u)),t.removeAttr(e),s=0,y=h.length;s<y;s++)l=h[s],p==l.field&&(t.attr(i.attr(u),l.dir),c=s+1);a=t.attr(i.attr(u)),t.find(".k-i-sort-asc-sm,.k-i-sort-desc-sm,.k-sort-order").remove(),a===r?(n('<span class="k-icon k-i-sort-asc-sm" />').appendTo(o.link),t.attr(e,"ascending")):a===f&&(n('<span class="k-icon k-i-sort-desc-sm" />').appendTo(o.link),t.attr(e,"descending")),o.options.showIndexes&&h.length>1&&c&&n('<span class="k-sort-order" />').html(c).appendTo(o.link)},_toggleSortDirection:function(n){var i=this.directions;return n===i[i.length-1]&&this.options.allowUnsort?t:i[0]===n?i[1]:i[0]},_click:function(n){var o,y,e=this,l=e.element,h=l.attr(i.attr(v)),f=l.attr(i.attr(u)),s=e.options,c=null===e.options.compare?t:e.options.compare,r=e.dataSource.sort()||[];if(n.preventDefault(),(!s.filter||l.is(s.filter))&&(f=this._toggleSortDirection(f),!this.trigger("change",{sort:{field:h,dir:f,compare:c}}))){if(s.mode===a)r=[{field:h,dir:f,compare:c}];else if("multiple"===s.mode){for(o=0,y=r.length;o<y;o++)if(r[o].field===h){r.splice(o,1);break}r.push({field:h,dir:f,compare:c})}this.dataSource.sort(r)}}});l.plugin(y)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.editable.min",["kendo.datepicker.min","kendo.numerictextbox.min","kendo.validator.min","kendo.binder.min"],n)}(function(){return function(n,t){function c(t){return t=null!=t?t:"",t.type||n.type(t)||"string"}function k(t){t.find(":input:not(:button, ["+i.attr("role")+"=upload], ["+i.attr("skip")+"], [type=file]), select").each(function(){var f=i.attr("bind"),t=this.getAttribute(f)||"",u="checkbox"===this.type||"radio"===this.type?"checked:":"value:",r=this.name;t.indexOf(u)===-1&&r&&(t+=(t.length?",":"")+u+r,n(this).attr(f,t))})}function r(n){var t,f,l=(n.model.fields||n.model)[n.field],e=c(l),a=l?l.validation:{},v=i.attr("type"),y=i.attr("bind"),r={name:n.field,title:n.title};for(t in a)f=a[t],s(t,o)>=0?r[v]=t:h(f)||(r[t]=u(f)?f.value||t:f),r[i.attr(t+"-msg")]=f.message;return s(e,o)>=0&&(r[v]=e),r[y]=("boolean"===e?"checked:":"value:")+n.field,r}function b(n){var i,u,t,e,f,r;if(n&&n.length)for(r=[],i=0,u=n.length;i<u;i++)t=n[i],f=t.text||t.value||t,e=null==t.value?t.text||t:t.value,r[i]={text:f,value:e};return r}function l(n,t){var r,i,f=n?n.validation||{}:{};for(r in f)i=f[r],u(i)&&i.value&&(i=i.value),h(i)&&(t[r]=i)}var i=window.kendo,v=i.ui,f=v.Widget,g=n.extend,d=i.support.browser.msie&&i.support.browser.version<9,h=i.isFunction,u=n.isPlainObject,s=n.inArray,a=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,w='<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-i-warning"> </span>#=message#<div class="k-callout k-callout-n"></div></div>',e="change",o=["url","email","number","date","boolean"],p={number:function(t,u){var f=r(u);n('<input type="text"/>').attr(f).appendTo(t).kendoNumericTextBox({format:u.format}),n("<span "+i.attr("for")+'="'+u.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},date:function(t,u){var e=r(u),f=u.format;f&&(f=i._extractFormat(f)),e[i.attr("format")]=f,n('<input type="text"/>').attr(e).appendTo(t).kendoDatePicker({format:u.format}),n("<span "+i.attr("for")+'="'+u.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},string:function(t,i){var u=r(i);n('<input type="text" class="k-input k-textbox"/>').attr(u).appendTo(t)},boolean:function(t,i){var u=r(i);n('<input type="checkbox" />').attr(u).appendTo(t)},values:function(t,u){var e=r(u),f=i.stringify(b(u.values));n("<select "+i.attr("text-field")+'="text"'+i.attr("value-field")+'="value"'+i.attr("source")+"='"+(f?f.replace(/\'/g,"&apos;"):f)+"'"+i.attr("role")+'="dropdownlist"/>').attr(e).appendTo(t),n("<span "+i.attr("for")+'="'+u.field+'" class="k-invalid-msg"/>').hide().appendTo(t)}},y=f.extend({init:function(t,i){var r=this;i.target&&(i.$angular=i.target.options.$angular),f.fn.init.call(r,t,i),r._validateProxy=n.proxy(r._validate,r),r.refresh()},events:[e],options:{name:"Editable",editors:p,clearContainer:!0,errorTemplate:w},editor:function(n,t){var o=this,l=o.options.editors,e=u(n),s=e?n.field:n,p=o.options.model||{},y=e&&n.values,v=y?"values":c(t),h=e&&n.editor,r=h?n.editor:l[v],f=o.element.find("["+i.attr("container-for")+"="+s.replace(a,"\\$1")+"]");r=r?r:l.string,h&&"string"==typeof n.editor&&(r=function(t){t.append(n.editor)}),f=f.length?f:o.element,r(f,g(!0,{},e?n:{field:s},{model:p}))},_validate:function(t){var u,r=this,c=t.value,l=r._validationEventInProgress,f={},s=i.attr("bind"),o=t.field.replace(a,"\\$1"),h=RegExp("(value|checked)\\s*:\\s*"+o+"\\s*(,|$)");f[t.field]=t.value,u=n(":input["+s+'*="'+o+'"]',r.element).filter("["+i.attr("validate")+"!='false']").filter(function(){return h.test(n(this).attr(s))}),u.length>1&&(u=u.filter(function(){var t=n(this);return!t.is(":radio")||t.val()==c}));try{r._validationEventInProgress=!0,(!r.validatable.validateInput(u)||!l&&r.trigger(e,{values:f}))&&t.preventDefault()}finally{r._validationEventInProgress=!1}},end:function(){return this.validatable.validate()},destroy:function(){var n=this;n.angular("cleanup",function(){return{elements:n.element}}),f.fn.destroy.call(n),n.options.model.unbind("set",n._validateProxy),i.unbind(n.element),n.validatable&&n.validatable.destroy(),i.destroy(n.element),n.element.removeData("kendoValidator"),n.element.is("["+i.attr("role")+"=editable]")&&n.element.removeAttr(i.attr("role"))},refresh:function(){var h,v,s,b,c,p,y,w,r=this,e=r.options.fields||[],f=r.options.clearContainer?r.element.empty():r.element,o=r.options.model||{},a={};for(n.isArray(e)||(e=[e]),h=0,v=e.length;h<v;h++)s=e[h],b=u(s),c=b?s.field:s,p=(o.fields||o)[c],l(p,a),r.editor(s,p);if(r.options.target&&r.angular("compile",function(){return{elements:f,data:f.map(function(){return{dataItem:o}})}}),!v){y=o.fields||o;for(c in y)l(y[c],a)}k(f),r.validatable&&r.validatable.destroy(),i.bind(f,r.options.model),r.options.model.unbind("set",r._validateProxy),r.options.model.bind("set",r._validateProxy),r.validatable=new i.ui.Validator(f,{validateOnBlur:!1,errorTemplate:r.options.errorTemplate||t,rules:a}),w=f.find(":kendoFocusable").eq(0).focus(),d&&w.focus()}});v.plugin(y)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.window.min",["kendo.draganddrop.min","kendo.popup.min"],n)}(function(){return function(n,t){function k(n){return t!==n}function o(n,t,i){return Math.max(Math.min(parseInt(n,10),i===1/0?i:parseInt(i,10)),parseInt(t,10))}function wi(){return!this.type||this.type.toLowerCase().indexOf("script")>=0}function ei(n){var t=this;t.owner=n,t._preventDragging=!1,t._draggable=new ti(n.wrapper,{filter:">"+c,group:n.wrapper.id+"-resizing",dragstart:r(t.dragstart,t),drag:r(t.drag,t),dragend:r(t.dragend,t)}),t._draggable.userEvents.bind("press",r(t.addOverlay,t)),t._draggable.userEvents.bind("release",r(t.removeOverlay,t))}function gt(n,t){var i=this;i.owner=n,i._preventDragging=!1,i._draggable=new ti(n.wrapper,{filter:t,group:n.wrapper.id+"-moving",dragstart:r(i.dragstart,i),drag:r(i.drag,i),dragend:r(i.dragend,i),dragcancel:r(i.dragcancel,i)}),i._draggable.userEvents.stopPropagation=!1}var i=window.kendo,nt=i.ui.Widget,ci=i.ui.Popup.TabKeyTrap,ti=i.ui.Draggable,dt=n.isPlainObject,oi=i._activeElement,it=i._outerWidth,yi=i._outerHeight,r=n.proxy,rt=n.extend,pi=n.each,h=i.template,ut="body",u=".kendoWindow",v=".k-window",ot=".k-window-title",f=ot+"bar",s=".k-window-content",c=".k-resize-handle",d=".k-overlay",b="k-content-frame",ii="k-i-loading",at="k-state-hover",ni="k-state-focused",ui="k-window-maximized",y=":visible",g="hidden",a="cursor",ft="open",et="activate",fi="deactivate",ri="close",tt="refresh",vi="minimize",ai="maximize",ht="resizeStart",li="resize",lt="resizeEnd",wt="dragstart",bt="dragend",kt="error",l="overflow",w="zIndex",st=".k-window-actions .k-i-window-minimize,.k-window-actions .k-i-window-maximize",ct=".k-i-pin",pt=".k-i-unpin",yt=ct+","+pt,p=".k-window-titlebar .k-window-action",vt=".k-window-titlebar .k-i-refresh",hi=i.isLocalUrl,si=nt.extend({init:function(e,o){var c,tt,it,a,l,b,w,h=this,d={},ut=!1,rt=o&&o.actions&&!o.actions.length;nt.fn.init.call(h,e,o),o=h.options,a=o.position,e=h.element,l=o.content,rt&&(o.actions=[]),h.appendTo=n(o.appendTo),l&&!dt(l)&&(l=o.content={url:l}),e.find("script").filter(wi).remove(),e.parent().is(h.appendTo)||a.top!==t&&a.left!==t||(e.is(y)?(d=e.offset(),ut=!0):(tt=e.css("visibility"),it=e.css("display"),e.css({visibility:g,display:""}),d=e.offset(),e.css({visibility:tt,display:it})),a.top===t&&(a.top=d.top),a.left===t&&(a.left=d.left)),k(o.visible)&&null!==o.visible||(o.visible=e.is(y)),c=h.wrapper=e.closest(v),e.is(".k-content")&&c[0]||(e.addClass("k-window-content k-content"),h._createWindow(e,o),c=h.wrapper=e.closest(v),h._dimensions()),h._position(),o.pinned&&h.pin(!0),l&&h.refresh(l),o.visible&&h.toFront(),b=c.children(s),h._tabindex(b),o.visible&&o.modal&&h._overlay(c.is(y)).css({opacity:.5}),c.on("mouseenter"+u,p,r(h._buttonEnter,h)).on("mouseleave"+u,p,r(h._buttonLeave,h)).on("click"+u,"> "+p,r(h._windowActionHandler,h)),b.on("keydown"+u,r(h._keydown,h)).on("focus"+u,r(h._focus,h)).on("blur"+u,r(h._blur,h)),this._resizable(),this._draggable(),w=e.attr("id"),w&&(w+="_wnd_title",c.children(f).children(ot).attr("id",w),b.attr({role:"dialog","aria-labelledby":w})),c.add(c.children(".k-resize-handle,"+f)).on("mousedown"+u,r(h.toFront,h)),h.touchScroller=i.touchScroller(e),h._resizeHandler=r(h._onDocumentResize,h),h._marker=i.guid().substring(0,8),n(window).on("resize"+u+h._marker,h._resizeHandler),o.visible&&(h.trigger(ft),h.trigger(et)),i.notify(h),this.options.modal&&(this._tabKeyTrap=new ci(c),this._tabKeyTrap.trap(),this._tabKeyTrap.shouldTrap=function(){return b.data("isFront")})},_buttonEnter:function(t){n(t.currentTarget).addClass(at)},_buttonLeave:function(t){n(t.currentTarget).removeClass(at)},_focus:function(){this.wrapper.addClass(ni)},_blur:function(){this.wrapper.removeClass(ni)},_dimensions:function(){var t,e,u=this.wrapper,n=this.options,i=n.width,r=n.height,s=n.maxHeight,f=["minWidth","minHeight","maxWidth","maxHeight"];for(this.title(n.title),t=0;t<f.length;t++)e=n[f[t]]||"",e!=1/0&&u.css(f[t],e);s!=1/0&&this.element.css("maxHeight",s),u.width(i?(""+i).indexOf("%")>0?i:o(i,n.minWidth,n.maxWidth):""),u.height(r?(""+r).indexOf("%")>0?r:o(r,n.minHeight,n.maxHeight):""),n.visible||u.hide()},_position:function(){var t=this.wrapper,n=this.options.position;0===n.top&&(n.top=""+n.top),0===n.left&&(n.left=""+n.left),t.css({top:n.top||"",left:n.left||""})},_animationOptions:function(n){var t=this.options.animation,i={open:{effects:{}},close:{hide:!0,effects:{}}};return t&&t[n]||i[n]},_resize:function(){i.resize(this.element.children())},_resizable:function(){var i=this.options.resizable,t=this.wrapper;this.resizing&&(t.off("dblclick"+u).children(c).remove(),this.resizing.destroy(),this.resizing=null),i&&(t.on("dblclick"+u,f,r(function(t){n(t.target).closest(".k-window-action").length||this.toggleMaximization()},this)),pi("n e s w se sw ne nw".split(" "),function(n,i){t.append(e.resizeHandle(i))}),this.resizing=new ei(this)),t=null},_draggable:function(){var n=this.options.draggable;this.dragging&&(this.dragging.destroy(),this.dragging=null),n&&(this.dragging=new gt(this,n.dragHandle||f))},_actions:function(){var t=this.options.actions,o=this.wrapper.children(f),u=o.find(".k-window-actions"),r=["maximize","minimize"];t=n.map(t,function(n){return{name:r.indexOf(n.toLowerCase())>-1?"window-"+n:n}}),u.html(i.render(e.action,t))},setOptions:function(n){var r,i;nt.fn.setOptions.call(this,n),r=this.options.scrollable!==!1,this.restore(),this._dimensions(),this._position(),this._resizable(),this._draggable(),this._actions(),t!==n.modal&&(i=this.options.visible!==!1,this._overlay(n.modal&&i)),this.element.css(l,r?"":"hidden")},events:[ft,et,fi,ri,vi,ai,tt,ht,li,lt,wt,bt,kt],options:{name:"Window",animation:{open:{effects:{zoom:{direction:"in"},fade:{direction:"in"}},duration:350},close:{effects:{zoom:{direction:"out",properties:{scale:.7}},fade:{direction:"out"}},duration:350,hide:!0}},title:"",actions:["Close"],autoFocus:!0,modal:!1,resizable:!0,draggable:!0,minWidth:90,minHeight:50,maxWidth:1/0,maxHeight:1/0,pinned:!1,scrollable:!0,position:{},content:null,visible:null,height:null,width:null,appendTo:"body",isMaximized:!1,isMinimized:!1},_closable:function(){return n.inArray("close",n.map(this.options.actions,function(n){return n.toLowerCase()}))>-1},_keydown:function(n){var c,r,v,y,l,a,f=this,h=f.options,u=i.keys,e=n.keyCode,t=f.wrapper,s=10,p=f.options.isMaximized;e==u.ESC&&f._closable()&&f._close(!1),n.target!=n.currentTarget||f._closing||(!h.draggable||n.ctrlKey||p||(c=i.getOffset(t),e==u.UP?r=t.css("top",c.top-s):e==u.DOWN?r=t.css("top",c.top+s):e==u.LEFT?r=t.css("left",c.left-s):e==u.RIGHT&&(r=t.css("left",c.left+s))),h.resizable&&n.ctrlKey&&!p&&(e==u.UP?(r=!0,y=t.height()-s):e==u.DOWN&&(r=!0,y=t.height()+s),e==u.LEFT?(r=!0,v=t.width()-s):e==u.RIGHT&&(r=!0,v=t.width()+s),r&&(l=o(v,h.minWidth,h.maxWidth),a=o(y,h.minHeight,h.maxHeight),isNaN(l)||(t.width(l),f.options.width=l+"px"),isNaN(a)||(t.height(a),f.options.height=a+"px"),f.resize())),r&&n.preventDefault())},_overlay:function(t){var i=this.appendTo.children(d),r=this.wrapper;return i.length||(i=n("<div class='k-overlay' />")),i.insertBefore(r[0]).toggle(t).css(w,parseInt(r.css(w),10)-1),i},_actionForIcon:function(n){var t=/\bk-i(-\w+)+\b/.exec(n[0].className)[0];return{"k-i-close":"_close","k-i-window-maximize":"maximize","k-i-window-minimize":"minimize","k-i-window-restore":"restore","k-i-refresh":"refresh","k-i-pin":"pin","k-i-unpin":"unpin"}[t]},_windowActionHandler:function(i){var u,r;if(!this._closing)return u=n(i.target).closest(".k-window-action").find(".k-icon"),r=this._actionForIcon(u),r?(i.preventDefault(),this[r](),!1):t},_modals:function(){var t=this,i=n(v).filter(function(){var r=n(this),u=t._object(r),i=u&&u.options;return i&&i.modal&&i.visible&&i.appendTo===t.options.appendTo&&r.is(y)}).sort(function(t,i){return+n(t).css("zIndex")-+n(i).css("zIndex")});return t=null,i},_object:function(n){var u=n.children(s),r=i.widgetInstance(u);return r?r:t},center:function(){var u,f,t=this,s=t.options.position,i=t.wrapper,r=n(window),o=0,e=0;return t.options.isMaximized?t:(t.options.pinned||(o=r.scrollTop(),e=r.scrollLeft()),f=e+Math.max(0,(r.width()-i.width())/2),u=o+Math.max(0,(r.height()-i.height()-parseInt(i.css("paddingTop"),10))/2),i.css({left:f,top:u}),s.top=u,s.left=f,t)},title:function(n){var o,u=this,r=u.wrapper,h=u.options,t=r.children(f),s=t.children(ot);return arguments.length?(n===!1?(r.addClass("k-window-titleless"),t.remove()):(t.length?s.html(i.htmlEncode(n)):(r.prepend(e.titlebar(h)),u._actions(),t=r.children(f)),o=parseInt(yi(t),10),r.css("padding-top",o),t.css("margin-top",-o)),u.options.title=n,u):s.html()},content:function(n,t){var r=this.wrapper.children(s),u=r.children(".km-scroll-container");return r=u[0]?u:r,k(n)?(this.angular("cleanup",function(){return{elements:r.children()}}),i.destroy(this.element.children()),r.empty().html(n),this.angular("compile",function(){for(var n=[],i=r.length;--i>=0;)n.push({dataItem:t});return{elements:r.children(),data:n}}),this):r.html()},open:function(){var u,c,h,t=this,o=t.wrapper,e=t.options,f=this._animationOptions("open"),v=o.children(s),a=n(document);return t.trigger(ft)||(t._closing&&o.kendoStop(!0,!0),t._closing=!1,t.toFront(),e.autoFocus&&t.element.focus(),e.visible=!0,e.modal&&(c=!!t._modals().length,u=t._overlay(c),u.kendoStop(!0,!0),f.duration&&i.effects.Fade&&!c?(h=i.fx(u).fadeIn(),h.duration(f.duration||0),h.endValue(.5),h.play()):u.css("opacity",.5),u.show(),n(window).on("focus",function(){v.data("isFront")&&t.element.focus()})),o.is(y)||(v.css(l,g),o.show().kendoStop().kendoAnimate({effects:f.effects,duration:f.duration,complete:r(this._activate,this)}))),e.isMaximized&&(t._documentScrollTop=a.scrollTop(),t._documentScrollLeft=a.scrollLeft(),n("html, body").css(l,g)),t},_activate:function(){var n=this.options.scrollable!==!1;this.options.autoFocus&&this.element.focus(),this.element.css(l,n?"":"hidden"),i.resize(this.element.children()),this.trigger(et)},_removeOverlay:function(r){var u,f=this._modals(),o=this.options,s=o.modal&&!f.length,h=o.modal?this._overlay(!0):n(t),e=this._animationOptions("close");s?!r&&e.duration&&i.effects.Fade?(u=i.fx(h).fadeOut(),u.duration(e.duration||0),u.startValue(.5),u.play()):this._overlay(!1).remove():f.length&&this._object(f.last())._overlay(!0)},_close:function(t){var i=this,f=i.wrapper,o=i.options,h=this._animationOptions("open"),u=this._animationOptions("close"),e=n(document);if(f.is(y)&&!i.trigger(ri,{userTriggered:!t})){if(i._closing)return;i._closing=!0,o.visible=!1,n(v).each(function(t,i){var r=n(i).children(s);i!=f&&r.find("> ."+b).length>0&&r.children(d).remove()}),this._removeOverlay(),f.kendoStop().kendoAnimate({effects:u.effects||h.effects,reverse:u.reverse===!0,duration:u.duration,complete:r(this._deactivate,this)})}i.options.isMaximized&&(n("html, body").css(l,""),i._documentScrollTop&&i._documentScrollTop>0&&e.scrollTop(i._documentScrollTop),i._documentScrollLeft&&i._documentScrollLeft>0&&e.scrollLeft(i._documentScrollLeft))},_deactivate:function(){var t,n=this;n.wrapper.hide().css("opacity",""),n.trigger(fi),n.options.modal&&(t=n._object(n._modals().last()),t&&t.toFront())},close:function(){return this._close(!0),this},_actionable:function(t){return n(t).is(p+","+p+" .k-icon,:input,a")},_shouldFocus:function(t){var r=oi(),i=this.element;return this.options.autoFocus&&!n(r).is(i)&&!this._actionable(t)&&(!i.find(r).length||!i.find(t).length)},toFront:function(t){var o,f,r=this,i=r.wrapper,h=i[0],u=+i.css(w),l=u,c=t&&t.target||null;return n(v).each(function(t,i){var f=n(i),o=f.css(w),r=f.children(s);isNaN(o)||(u=Math.max(+o,u)),r.data("isFront",i==h),i!=h&&r.find("> ."+b).length>0&&r.append(e.overlay)}),(!i[0].style.zIndex||l<u)&&i.css(w,u+2),r.element.find("> .k-overlay").remove(),r._shouldFocus(c)&&(r.element.focus(),o=n(window).scrollTop(),f=parseInt(i.position().top,10),!r.options.pinned&&f>0&&f<o&&(o>0?n(window).scrollTop(f):i.css("top",o))),i=null,r},toggleMaximization:function(){return this._closing?this:this[this.options.isMaximized?"restore":"maximize"]()},restore:function(){var t=this,r=t.options,u=r.minHeight,i=t.restoreOptions,f=n(document);return r.isMaximized||r.isMinimized?(u&&u!=1/0&&t.wrapper.css("min-height",u),t.wrapper.css({position:r.pinned?"fixed":"absolute",left:i.left,top:i.top,width:i.width,height:i.height}).removeClass(ui).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-window-restore").parent().remove().end().end().find(st).parent().show().end().end().find(yt).parent().show(),t.options.width=i.width,t.options.height=i.height,n("html, body").css(l,""),this._documentScrollTop&&this._documentScrollTop>0&&f.scrollTop(this._documentScrollTop),this._documentScrollLeft&&this._documentScrollLeft>0&&f.scrollLeft(this._documentScrollLeft),r.isMaximized=r.isMinimized=!1,t.resize(),t):t},_sizingAction:function(n,t){var i=this,o=i.wrapper,u=o[0].style,r=i.options;return r.isMaximized||r.isMinimized?i:(i.restoreOptions={width:u.width,height:u.height},o.children(c).hide().end().children(f).find(st).parent().hide().eq(0).before(e.action({name:"window-restore"})),t.call(i),i.wrapper.children(f).find(yt).parent().toggle("maximize"!==n),i.trigger(n),i)},maximize:function(){return this._sizingAction("maximize",function(){var t=this,u=t.wrapper,r=u.position(),i=n(document);rt(t.restoreOptions,{left:r.left,top:r.top}),u.css({left:0,top:0,position:"fixed"}).addClass(ui),this._documentScrollTop=i.scrollTop(),this._documentScrollLeft=i.scrollLeft(),n("html, body").css(l,g),t.options.isMaximized=!0,t._onDocumentResize()}),this},isMaximized:function(){return this.options.isMaximized},minimize:function(){return this._sizingAction("minimize",function(){var n=this;n.wrapper.css({height:"",minHeight:""}),n.element.hide(),n.options.isMinimized=!0}),this},isMinimized:function(){return this.options.isMinimized},pin:function(t){var r=this,u=n(window),i=r.wrapper,o=parseInt(i.css("top"),10),e=parseInt(i.css("left"),10);(t||!r.options.pinned&&!r.options.isMaximized)&&(i.css({position:"fixed",top:o-u.scrollTop(),left:e-u.scrollLeft()}),i.children(f).find(ct).addClass("k-i-unpin").removeClass("k-i-pin"),r.options.pinned=!0)},unpin:function(){var i=this,r=n(window),t=i.wrapper,e=parseInt(t.css("top"),10),u=parseInt(t.css("left"),10);i.options.pinned&&!i.options.isMaximized&&(t.css({position:"",top:e+r.scrollTop(),left:u+r.scrollLeft()}),t.children(f).find(pt).addClass("k-i-pin").removeClass("k-i-unpin"),i.options.pinned=!1)},_onDocumentResize:function(){var r,u,t=this,o=t.wrapper,e=n(window),f=i.support.zoomLevel();t.options.isMaximized&&(r=e.width()/f,u=e.height()/f-parseInt(o.css("padding-top"),10),o.css({width:r,height:u}),t.options.width=r,t.options.height=u,t.resize())},refresh:function(t){var c,f,l,i=this,s=i.options,o=n(i.element);return dt(t)||(t={url:t}),t=rt({},s.content,t),f=k(s.iframe)?s.iframe:t.iframe,l=t.url,l?(k(f)||(f=!hi(l)),f?(c=o.find("."+b)[0],c?c.src=l||c.src:o.html(e.contentFrame(rt({},s,{content:t}))),o.find("."+b).unbind("load"+u).on("load"+u,r(this._triggerRefresh,this))):i._ajaxRequest(t)):(t.template&&i.content(h(t.template)({})),i.trigger(tt)),o.toggleClass("k-window-iframecontent",!!f),i},_triggerRefresh:function(){this.trigger(tt)},_ajaxComplete:function(){clearTimeout(this._loadingIconTimeout),this.wrapper.find(vt).removeClass(ii)},_ajaxError:function(n,t){this.trigger(kt,{status:t,xhr:n})},_ajaxSuccess:function(n){return function(t){var i=t;n&&(i=h(n)(t||{})),this.content(i,t),this.element.prop("scrollTop",0),this.trigger(tt)}},_showLoading:function(){this.wrapper.find(vt).addClass(ii)},_ajaxRequest:function(t){this._loadingIconTimeout=setTimeout(r(this._showLoading,this),100),n.ajax(rt({type:"GET",dataType:"html",cache:!1,error:r(this._ajaxError,this),complete:r(this._ajaxComplete,this),success:r(this._ajaxSuccess(t.template),this)},t))},_destroy:function(){this.resizing&&this.resizing.destroy(),this.dragging&&this.dragging.destroy(),this.wrapper.off(u).children(s).off(u).end().find(".k-resize-handle,.k-window-titlebar").off(u),n(window).off("resize"+u+this._marker),clearTimeout(this._loadingIconTimeout),nt.fn.destroy.call(this),this.unbind(t),i.destroy(this.wrapper),this._removeOverlay(!0)},destroy:function(){this._destroy(),this.wrapper.empty().remove(),this.wrapper=this.appendTo=this.element=n()},_createWindow:function(){var o,r,t=this.element,f=this.options,u=i.support.isRtl(t);f.scrollable===!1&&t.css("overflow","hidden"),r=n(e.wrapper(f)),o=t.find("iframe:not(.k-content)").map(function(){var n=this.getAttribute("src");return this.src="",n}),r.toggleClass("k-rtl",u).appendTo(this.appendTo).append(t).find("iframe:not(.k-content)").each(function(n){this.src=o[n]}),r.find(".k-window-title").css(u?"left":"right",it(r.find(".k-window-actions"))+10),t.css("visibility","").show(),t.find("[data-role=editor]").each(function(){var t=n(this).data("kendoEditor");t&&t.refresh()}),r=t=null}}),e={wrapper:h("<div class='k-widget k-window' />"),action:h("<a role='button' href='\\#' class='k-button k-bare k-button-icon k-window-action' aria-label='#= name #'><span class='k-icon k-i-#= name.toLowerCase() #'></span></a>"),titlebar:h("<div class='k-window-titlebar k-header'>&nbsp;<span class='k-window-title'>#: title #</span><div class='k-window-actions' /></div>"),overlay:"<div class='k-overlay' />",contentFrame:h("<iframe frameborder='0' title='#= title #' class='"+b+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),resizeHandle:h("<div class='k-resize-handle k-resize-#= data #'></div>")};ei.prototype={addOverlay:function(){this.owner.wrapper.append(e.overlay)},removeOverlay:function(){this.owner.wrapper.find(d).remove()},dragstart:function(t){var r=this,f=r.owner,u=f.wrapper;r._preventDragging=f.trigger(ht),r._preventDragging||(r.elementPadding=parseInt(u.css("padding-top"),10),r.initialPosition=i.getOffset(u,"position"),r.resizeDirection=t.currentTarget.prop("className").replace("k-resize-handle k-resize-",""),r.initialSize={width:u.width(),height:u.height()},r.containerOffset=i.getOffset(f.appendTo,"position"),u.children(c).not(t.currentTarget).hide(),n(ut).css(a,t.currentTarget.css(a)))},drag:function(t){var f,e,l,i,c,r,h,y,u,s,p,w,v,b,a;this._preventDragging||(f=this,e=f.owner,l=e.wrapper,i=e.options,c=f.resizeDirection,r=f.containerOffset,h=f.initialPosition,y=f.initialSize,v=Math.max(t.x.location,0),b=Math.max(t.y.location,0),c.indexOf("e")>=0?(u=v-h.left-r.left,l.width(o(u,i.minWidth,i.maxWidth))):c.indexOf("w")>=0&&(w=h.left+y.width+r.left,u=o(w-v,i.minWidth,i.maxWidth),l.css({left:w-u-r.left,width:u})),a=b,e.options.pinned&&(a-=n(window).scrollTop()),c.indexOf("s")>=0?(s=a-h.top-f.elementPadding-r.top,l.height(o(s,i.minHeight,i.maxHeight))):c.indexOf("n")>=0&&(p=h.top+y.height+r.top,s=o(p-a,i.minHeight,i.maxHeight),l.css({top:p-s-r.top,height:s})),u&&(e.options.width=u+"px"),s&&(e.options.height=s+"px"),e.resize())},dragend:function(t){if(!this._preventDragging){var r=this,i=r.owner,u=i.wrapper;return u.children(c).not(t.currentTarget).show(),n(ut).css(a,""),i.touchScroller&&i.touchScroller.reset(),27==t.keyCode&&u.css(r.initialPosition).css(r.initialSize),i.trigger(lt),!1}},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},gt.prototype={dragstart:function(t){var r=this.owner,f=r.element,u=f.find(".k-window-actions"),o=i.getOffset(r.appendTo);this._preventDragging=r.trigger(wt),this._preventDragging||(r.initialWindowPosition=i.getOffset(r.wrapper,"position"),r.initialPointerPosition={left:t.x.client,top:t.y.client},r.startPosition={left:t.x.client-r.initialWindowPosition.left,top:t.y.client-r.initialWindowPosition.top},r.minLeftPosition=u.length>0?it(u)+parseInt(u.css("right"),10)-it(f):20-it(f),r.minLeftPosition-=o.left,r.minTopPosition=-o.top,r.wrapper.append(e.overlay).children(c).hide(),n(ut).css(a,t.currentTarget.css(a)))},drag:function(t){var r,u;this._preventDragging||(r=this.owner,u=r.options.position,u.top=Math.max(t.y.client-r.startPosition.top,r.minTopPosition),u.left=Math.max(t.x.client-r.startPosition.left,r.minLeftPosition),i.support.transforms?n(r.wrapper).css("transform","translate("+(t.x.client-r.initialPointerPosition.left)+"px, "+(t.y.client-r.initialPointerPosition.top)+"px)"):n(r.wrapper).css(u))},_finishDrag:function(){var t=this.owner;t.wrapper.children(c).toggle(!t.options.isMinimized).end().find(d).remove(),n(ut).css(a,"")},dragcancel:function(n){this._preventDragging||(this._finishDrag(),n.currentTarget.closest(v).css(this.owner.initialWindowPosition))},dragend:function(){if(!this._preventDragging)return n(this.owner.wrapper).css(this.owner.options.position).css("transform",""),this._finishDrag(),this.owner.trigger(bt),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},i.ui.plugin(si)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.mobile.view.min",["kendo.core.min","kendo.fx.min","kendo.mobile.scroller.min","kendo.view.min"],n)}(function(){return function(n,t){function ut(n){for(var f=n.find(r("popover")),o=u.roles,t=0,e=f.length;t<e;t++)i.initWidget(f[t],{},o)}function ft(n){i.triggeredByInput(n)||n.preventDefault()}function rt(t){t.each(function(){i.initWidget(n(this),{},u.roles)})}var i=window.kendo,f=i.mobile,u=f.ui,l=i.attr,e=u.Widget,lt=i.ViewClone,s="init",yt='<div style="height: 100%; width: 100%; position: absolute; top: 0; left: 0; z-index: 20000; display: none" />',tt="beforeShow",o="show",it="afterShow",et="beforeHide",st="transitionEnd",ot="transitionStart",h="hide",ht="destroy",nt=i.attrValue,r=i.roleSelector,p=i.directiveSelector,c=i.compileMobileDirective,pt=e.extend({init:function(t,i){e.fn.init.call(this,t,i),this.params={},n.extend(this,i),this.transition=this.transition||this.defaultTransition,this._id(),this.options.$angular?this._overlay():(this._layout(),this._overlay(),this._scroller(),this._model())},events:[s,tt,o,it,et,h,ht,ot,st],options:{name:"View",title:"",layout:null,getLayout:n.noop,reload:!1,transition:"",defaultTransition:"",useNativeScrolling:!1,stretch:!1,zoom:!1,model:null,modelScope:window,scroller:{},initWidgets:!0},enable:function(n){t===n&&(n=!0),n?this.overlay.hide():this.overlay.show()},destroy:function(){this.layout&&this.layout.detach(this),this.trigger(ht),e.fn.destroy.call(this),this.scroller&&this.scroller.destroy(),this.options.$angular&&this.element.scope().$destroy(),i.destroy(this.element)},purge:function(){this.destroy(),this.element.remove()},triggerBeforeShow:function(){return!this.trigger(tt,{view:this})},triggerBeforeHide:function(){return!this.trigger(et,{view:this})},showStart:function(){var n=this.element;n.css("display",""),this.inited?this._invokeNgController():(this.inited=!0,this.trigger(s,{view:this})),this.layout&&this.layout.attach(this),this._padIfNativeScrolling(),this.trigger(o,{view:this}),i.resize(n)},showEnd:function(){this.trigger(it,{view:this}),this._padIfNativeScrolling()},hideEnd:function(){var n=this;n.element.hide(),n.trigger(h,{view:n}),n.layout&&n.layout.trigger(h,{view:n,layout:n.layout})},beforeTransition:function(n){this.trigger(ot,{type:n})},afterTransition:function(n){this.trigger(st,{type:n})},_padIfNativeScrolling:function(){if(f.appLevelNativeScrolling()){var u=i.support.mobileOS&&i.support.mobileOS.android,n=f.application.skin()||"",r=f.application.os.android||n.indexOf("android")>-1,t="flat"===n||n.indexOf("material")>-1,o=!u&&!r||t?"header":"footer",e=!u&&!r||t?"footer":"header";this.content.css({paddingTop:this[o].height(),paddingBottom:this[e].height()})}},contentElement:function(){var n=this;return n.options.stretch?n.content:n.scrollerContent},clone:function(){return new lt(this)},_scroller:function(){var t=this;f.appLevelNativeScrolling()||(t.options.stretch?t.content.addClass("km-stretched-view"):(t.content.kendoMobileScroller(n.extend(t.options.scroller,{zoom:t.options.zoom,useNative:t.options.useNativeScrolling})),t.scroller=t.content.data("kendoMobileScroller"),t.scrollerContent=t.scroller.scrollElement),i.support.kineticScrollNeeded&&(n(t.element).on("touchmove",".km-header",ft),t.options.useNativeScrolling||t.options.stretch||n(t.element).on("touchmove",".km-content",ft)))},_model:function(){var n=this,r=n.element,t=n.options.model;"string"==typeof t&&(t=i.getter(t)(n.options.modelScope)),n.model=t,ut(r),n.element.css("display",""),n.options.initWidgets&&(t?i.bind(r,t,u,i.ui,i.dataviz.ui):f.init(r.children())),n.element.css("display","none")},_id:function(){var n=this.element,t=n.attr("id")||"";this.id=nt(n,"url")||"#"+t,"#"==this.id&&(this.id=i.guid(),n.attr("id",this.id))},_layout:function(){var t=r("content"),n=this.element;n.addClass("km-view"),this.header=n.children(r("header")).addClass("km-header"),this.footer=n.children(r("footer")).addClass("km-footer"),n.children(t)[0]||n.wrapInner("<div "+l("role")+'="content"></div>'),this.content=n.children(r("content")).addClass("km-content"),this.element.prepend(this.header).append(this.footer),this.layout=this.options.getLayout(this.layout),this.layout&&this.layout.setup(this)},_overlay:function(){this.overlay=n(yt).appendTo(this.element)},_invokeNgController:function(){var r,t,i;this.options.$angular&&(r=this.element.controller(),t=this.options.$angular[0],r&&(i=n.proxy(this,"_callController",r,t),/^\$(digest|apply)$/.test(t.$$phase)?i():t.$apply(i)))},_callController:function(n,t){this.element.injector().invoke(n.constructor,n,{$scope:t})}}),at=e.extend({init:function(n,t){e.fn.init.call(this,n,t),n=this.element,this.header=n.children(this._locate("header")).addClass("km-header"),this.footer=n.children(this._locate("footer")).addClass("km-footer"),this.elements=this.header.add(this.footer),ut(n),this.options.$angular||i.mobile.init(this.element.children()),this.element.detach(),this.trigger(s,{layout:this})},_locate:function(n){return this.options.$angular?p(n):r(n)},options:{name:"Layout",id:null,platform:null},events:[s,o,h],setup:function(n){n.header[0]||(n.header=this.header),n.footer[0]||(n.footer=this.footer)},detach:function(n){var t=this;n.header===t.header&&t.header[0]&&n.element.prepend(t.header.detach()[0].cloneNode(!0)),n.footer===t.footer&&t.footer.length&&n.element.append(t.footer.detach()[0].cloneNode(!0))},attach:function(n){var t=this,i=t.currentView;i&&t.detach(i),n.header===t.header&&(t.header.detach(),n.element.children(r("header")).remove(),n.element.prepend(t.header)),n.footer===t.footer&&(t.footer.detach(),n.element.children(r("footer")).remove(),n.element.append(t.footer)),t.trigger(o,{layout:t,view:n}),t.currentView=n}}),v=i.Observable,vt=/<body[^>]*>(([\u000a\u000d\u2028\u2029]|.)*)<\/body>/i,d="loadStart",g="loadComplete",k="showStart",y="sameViewRequested",b="viewShow",w="viewTypeDetermined",a="after",ct=v.extend({init:function(t){var o,e,u,f,r=this;if(v.fn.init.call(r),n.extend(r,t),r.sandbox=n("<div />"),u=r.container,o=r._hideViews(u),r.rootView=o.first(),!r.rootView[0]&&t.rootNeeded)throw e=u[0]==i.mobile.application.element[0]?'Your kendo mobile application element does not contain any direct child elements with data-role="view" attribute set. Make sure that you instantiate the mobile application using the correct container.':'Your pane element does not contain any direct child elements with data-role="view" attribute set.',Error(e);r.layouts={},r.viewContainer=new i.ViewContainer(r.container),r.viewContainer.bind("accepted",function(n){n.view.params=r.params}),r.viewContainer.bind("complete",function(n){r.trigger(b,{view:n.view})}),r.viewContainer.bind(a,function(){r.trigger(a)}),this.getLayoutProxy=n.proxy(this,"_getLayout"),r._setupLayouts(u),f=u.children(r._locate("modalview drawer")),r.$angular?(r.$angular[0].viewOptions={defaultTransition:r.transition,loader:r.loader,container:r.container,getLayout:r.getLayoutProxy},f.each(function(i,r){c(n(r),t.$angular[0])})):rt(f),this.bind(this.events,t)},events:[k,a,b,d,g,y,w],destroy:function(){i.destroy(this.container);for(var n in this.layouts)this.layouts[n].destroy()},view:function(){return this.viewContainer.view},showView:function(n,t,r){if(n=n.replace(RegExp("^"+this.remoteViewURLPrefix),""),""===n&&this.remoteViewURLPrefix&&(n="/"),n.replace(/^#/,"")===this.url)return this.trigger(y),!1;this.trigger(k);var f=this,o=function(i){return f.viewContainer.show(i,t,n)},e=f._findViewElement(n),u=i.widgetInstance(e);return f.url=n.replace(/^#/,""),f.params=r,u&&u.reload&&(u.purge(),e=[]),this.trigger(w,{remote:0===e.length,url:n}),e[0]?(u||(u=f._createView(e)),o(u)):(this.serverNavigation?location.href=n:f._loadView(n,o),!0)},append:function(n,t){var u,o,r,i=this.sandbox,e=(t||"").split("?")[0],f=this.container;return vt.test(n)&&(n=RegExp.$1),i[0].innerHTML=n,f.append(i.children("script, style")),u=this._hideViews(i),r=u.first(),r.length||(u=r=i.wrapInner("<div data-role=view />").children()),e&&r.hide().attr(l("url"),e),this._setupLayouts(i),o=i.children(this._locate("modalview drawer")),f.append(i.children(this._locate("layout modalview drawer")).add(u)),rt(o),this._createView(r)},_locate:function(n){return this.$angular?p(n):r(n)},_findViewElement:function(n){var i,t=n.split("?")[0];return t?(i=this.container.children("["+l("url")+"='"+t+"']"),i[0]||t.indexOf("/")!==-1||(i=this.container.children("#"===t.charAt(0)?t:"#"+t)),i):this.rootView},_createView:function(n){return this.$angular?c(n,this.$angular[0]):i.initWidget(n,{defaultTransition:this.transition,loader:this.loader,container:this.container,getLayout:this.getLayoutProxy,modelScope:this.modelScope,reload:nt(n,"reload")},u.roles)},_getLayout:function(n){return""===n?null:n?this.layouts[n]:this.layouts[this.layout]},_loadView:function(t,r){this._xhr&&this._xhr.abort(),this.trigger(d),this._xhr=n.get(i.absoluteURL(t,this.remoteViewURLPrefix),"html").always(n.proxy(this,"_xhrComplete",r,t))},_xhrComplete:function(n,t,i){var r=!0;if("object"==typeof i&&0===i.status){if(!(i.responseText&&i.responseText.length>0))return;r=!0,i=i.responseText}this.trigger(g),r&&n(this.append(i,t))},_hideViews:function(n){return n.children(this._locate("view splitview")).hide()},_setupLayouts:function(t){var r,e=this;t.children(e._locate("layout")).each(function(){r=e.$angular?c(n(this),e.$angular[0]):i.initWidget(n(this),{},u.roles);var t=r.options.platform;t&&t!==f.application.os.name?r.destroy():e.layouts[r.options.id]=r})}});i.mobile.ViewEngine=ct,u.plugin(pt),u.plugin(at)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.mobile.loader.min",["kendo.core.min"],n)}(function(){return function(n){var u=window.kendo,f=u.mobile.ui,i=f.Widget,r=n.map(u.eventMap,function(n){return n}).join(" ").split(" "),e=i.extend({init:function(t,r){var u=this,f=n('<div class="km-loader"><span class="km-loading km-spin"></span><span class="km-loading-left"></span><span class="km-loading-right"></span></div>');i.fn.init.call(u,f,r),u.container=t,u.captureEvents=!1,u._attachCapture(),f.append(u.options.loading).hide().appendTo(t)},options:{name:"Loader",loading:"<h1>Loading...</h1>",timeout:100},show:function(){var n=this;clearTimeout(n._loading),n.options.loading!==!1&&(n.captureEvents=!0,n._loading=setTimeout(function(){n.element.show()},n.options.timeout))},hide:function(){this.captureEvents=!1,clearTimeout(this._loading),this.element.hide()},changeMessage:function(n){this.options.loading=n,this.element.find(">h1").html(n)},transition:function(){this.captureEvents=!0,this.container.css("pointer-events","none")},transitionDone:function(){this.captureEvents=!1,this.container.css("pointer-events","")},_attachCapture:function(){function i(n){t.captureEvents&&n.preventDefault()}var n,t=this;for(t.captureEvents=!1,n=0;n<r.length;n++)t.container[0].addEventListener(r[n],i,!0)}});f.plugin(e)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.mobile.pane.min",["kendo.mobile.view.min","kendo.mobile.loader.min"],n)}(function(){return function(n,t){var i=window.kendo,e=i.mobile,u=i.roleSelector,r=e.ui,l=r.Widget,g=e.ViewEngine,a=r.View,k=e.ui.Loader,y="external",o="href",w="#!",p="navigate",b="viewShow",s="sameViewRequested",h=i.support.mobileOS,v=h.ios&&!h.appMode&&h.flatVersion>=700,nt=/popover|actionsheet|modalview|drawer/,d="#:back",f=i.attrValue,c=l.extend({init:function(n,t){var r=this;l.fn.init.call(r,n,t),t=r.options,n=r.element,n.addClass("km-pane"),r.options.collapsible&&n.addClass("km-collapsible-pane"),this.history=[],this.historyCallback=function(n,t,i){var u=r.transition;return r.transition=null,v&&i&&(u="none"),r.viewEngine.showView(n,u,t)},this._historyNavigate=function(n){if(n===d){if(1===r.history.length)return;r.history.pop(),n=r.history[r.history.length-1]}else r.history.push(n);r.historyCallback(n,i.parseQueryStringParams(n))},this._historyReplace=function(n){var t=i.parseQueryStringParams(n);r.history[r.history.length-1]=n,r.historyCallback(n,t)},r.loader=new k(n,{loading:r.options.loading}),r.viewEngine=new g({container:n,transition:t.transition,modelScope:t.modelScope,rootNeeded:!t.initial,serverNavigation:t.serverNavigation,remoteViewURLPrefix:t.root||"",layout:t.layout,$angular:t.$angular,loader:r.loader,showStart:function(){r.loader.transition(),r.closeActiveDialogs()},after:function(){r.loader.transitionDone()},viewShow:function(n){r.trigger(b,n)},loadStart:function(){r.loader.show()},loadComplete:function(){r.loader.hide()},sameViewRequested:function(){r.trigger(s)},viewTypeDetermined:function(n){n.remote&&r.options.serverNavigation||r.trigger(p,{url:n.url})}}),this._setPortraitWidth(),i.onResize(function(){r._setPortraitWidth()}),r._setupAppLinks()},closeActiveDialogs:function(){var t=this.element.find(u("actionsheet popover modalview")).filter(":visible");t.each(function(){i.widgetInstance(n(this),r).close()})},navigateToInitial:function(){var n=this.options.initial;return n&&this.navigate(n),n},options:{name:"Pane",portraitWidth:"",transition:"",layout:"",collapsible:!1,initial:null,modelScope:window,loading:"<h1>Loading...</h1>"},events:[p,b,s],append:function(n){return this.viewEngine.append(n)},destroy:function(){l.fn.destroy.call(this),this.viewEngine.destroy(),this.userEvents.destroy()},navigate:function(n,t){n instanceof a&&(n=n.id),this.transition=t,this._historyNavigate(n)},replace:function(n,t){n instanceof a&&(n=n.id),this.transition=t,this._historyReplace(n)},bindToRouter:function(n){var t=this,r=this.history,u=this.viewEngine;n.bind("init",function(t){var f,e=t.url,o=n.pushState?e:"/";u.rootView.attr(i.attr("url"),o),f=r.length,"/"===e&&f&&(n.navigate(r[f-1],!0),t.preventDefault())}),n.bind("routeMissing",function(n){t.historyCallback(n.url,n.params,n.backButtonPressed)||n.preventDefault()}),n.bind("same",function(){t.trigger(s)}),t._historyNavigate=function(t){n.navigate(t)},t._historyReplace=function(t){n.replace(t)}},hideLoading:function(){this.loader.hide()},showLoading:function(){this.loader.show()},changeLoadingMessage:function(n){this.loader.changeMessage(n)},view:function(){return this.viewEngine.view()},_setPortraitWidth:function(){var t,n=this.options.portraitWidth;n&&(t=i.mobile.application.element.is(".km-vertical")?n:"auto",this.element.css("width",t))},_setupAppLinks:function(){var e=this,f="tab",t="[data-"+i.ns+"navigate-on-press]",r=n.map(["button","backbutton","detailbutton","listview-link"],function(n){return u(n)+":not("+t+")"}).join(",");this.element.handler(this).on("down",u(f)+","+t,"_mouseup").on("click",u(f)+","+r+","+t,"_appLinkClick"),this.userEvents=new i.UserEvents(this.element,{fastTap:!0,filter:r,tap:function(n){n.event.currentTarget=n.touch.currentTarget,e._mouseup(n.event)}}),this.element.css("-ms-touch-action","")},_appLinkClick:function(t){var i=n(t.currentTarget).attr("href"),r=i&&"#"!==i[0]&&this.options.serverNavigation;r||f(n(t.currentTarget),"rel")==y||t.preventDefault()},_mouseup:function(u){if(!(u.which>1||u.isDefaultPrevented())){var a=this,s=n(u.currentTarget),k=f(s,"transition"),c=f(s,"rel")||"",l=f(s,"target"),h=s.attr(o),b=v&&0===s[0].offsetHeight,p=h&&"#"!==h[0]&&this.options.serverNavigation;b||p||c===y||t===h||h===w||(s.attr(o,w),setTimeout(function(){s.attr(o,h)}),c.match(nt)?(i.widgetInstance(n(h),r).openFor(s),"actionsheet"!==c&&"drawer"!==c||u.stopPropagation()):("_top"===l?a=e.application.pane:l&&(a=n("#"+l).data("kendoMobilePane")),a.navigate(h,k)),u.preventDefault())}}});c.wrap=function(n){n.is(u("view"))||(n=n.wrap("<div data-"+i.ns+'role="view" data-stretch="true"></div>').parent());var r=n.wrap('<div class="km-pane-wrapper"><div></div></div>').parent(),t=new c(r);return t.navigate(""),t},r.plugin(c)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.mobile.popover.min",["kendo.popup.min","kendo.mobile.pane.min"],n)}(function(){return function(n){var u=window.kendo,p=u.mobile,r=p.ui,s="hide",e="open",o="close",y='<div class="km-popup-wrapper" />',w='<div class="km-popup-arrow" />',k='<div class="km-popup-overlay" />',b="km-up km-down km-left km-right",i=r.Widget,v={down:{origin:"bottom center",position:"top center"},up:{origin:"top center",position:"bottom center"},left:{origin:"center left",position:"center right",collision:"fit flip"},right:{origin:"center right",position:"center left",collision:"fit flip"}},h={animation:{open:{effects:"fade:in",duration:0},close:{effects:"fade:out",duration:400}}},a={horizontal:{offset:"top",size:"height"},vertical:{offset:"left",size:"width"}},l={up:"down",down:"up",left:"right",right:"left"},f=i.extend({init:function(t,r){var c,l,f=this,p=t.closest(".km-modalview-wrapper"),e=t.closest(".km-root").children(".km-pane").first(),o=p[0]?p:e;r.viewport?e=r.viewport:e[0]||(e=window),r.container?o=r.container:o[0]||(o=document.body),c={viewport:e,copyAnchorStyles:!1,autosize:!0,open:function(){f.overlay.show()},activate:n.proxy(f._activate,f),deactivate:function(){f.overlay.hide(),f._apiCall||f.trigger(s),f._apiCall=!1}},i.fn.init.call(f,t,r),t=f.element,r=f.options,t.wrap(y).addClass("km-popup").show(),l=f.options.direction.match(/left|right/)?"horizontal":"vertical",f.dimensions=a[l],f.wrapper=t.parent().css({width:r.width,height:r.height}).addClass("km-popup-wrapper km-"+r.direction).hide(),f.arrow=n(w).prependTo(f.wrapper).hide(),f.overlay=n(k).appendTo(o).hide(),c.appendTo=f.overlay,r.className&&f.overlay.addClass(r.className),f.popup=new u.ui.Popup(f.wrapper,n.extend(!0,c,h,v[r.direction]))},options:{name:"Popup",width:240,height:"",direction:"down",container:null,viewport:null},events:[s],show:function(t){this.popup.options.anchor=n(t),this.popup.open()},hide:function(){this._apiCall=!0,this.popup.close()},destroy:function(){i.fn.destroy.call(this),this.popup.destroy(),this.overlay.remove()},target:function(){return this.popup.options.anchor},_activate:function(){var t=this,s=t.options.direction,r=t.dimensions,f=r.offset,u=t.popup,h=u.options.anchor,c=n(h).offset(),v=n(u.element).offset(),y=u.flipped?l[s]:s,e=2*t.arrow[r.size](),o=t.element[r.size]()-t.arrow[r.size](),a=n(h)[r.size](),i=c[f]-v[f]+a/2;i<e&&(i=e),i>o&&(i=o),t.wrapper.removeClass(b).addClass("km-"+y),t.arrow.css(f,i).show()}}),c=i.extend({init:function(t,e){var h,s=this;s.initialOpen=!1,i.fn.init.call(s,t,e),h=n.extend({className:"km-popover-root",hide:function(){s.trigger(o)}},this.options.popup),s.popup=new f(s.element,h),s.popup.overlay.on("move",function(n){n.target==s.popup.overlay[0]&&n.preventDefault()}),s.pane=new r.Pane(s.element,n.extend(this.options.pane,{$angular:this.options.$angular})),u.notify(s,r)},options:{name:"PopOver",popup:{},pane:{}},events:[e,o],open:function(n){this.popup.show(n),this.initialOpen?this.pane.view()._invokeNgController():(this.pane.navigateToInitial()||this.pane.navigate(""),this.popup.popup._position(),this.initialOpen=!0)},openFor:function(n){this.open(n),this.trigger(e,{target:this.popup.target()})},close:function(){this.popup.hide()},destroy:function(){i.fn.destroy.call(this),this.pane.destroy(),this.popup.destroy(),u.destroy(this.element)}});r.plugin(f),r.plugin(c)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.mobile.shim.min",["kendo.popup.min"],n)}(function(){return function(n,t){var i=window.kendo,f=i.mobile.ui,o=i.ui.Popup,s='<div class="km-shim"/>',u="hide",r=f.Widget,e=r.extend({init:function(t,f){var e=this,c=i.mobile.application,y=i.support.mobileOS,l=c?c.os.name:y?y.name:"ios",a="ios"===l||"wp"===l||!!c&&c.os.skin,v="blackberry"===l,b=f.align||(a?"bottom center":v?"center right":"center center"),p=f.position||(a?"bottom center":v?"center right":"center center"),w=f.effect||(a?"slideIn:up":v?"slideIn:left":"fade:in"),h=n(s).handler(e).hide();r.fn.init.call(e,t,f),e.shim=h,t=e.element,f=e.options,f.className&&e.shim.addClass(f.className),f.modal||e.shim.on("down","_hide"),(c?c.element:n(document.body)).append(h),e.popup=new o(e.element,{anchor:h,modal:!0,appendTo:h,origin:b,position:p,animation:{open:{effects:w,duration:f.duration},close:{duration:f.duration}},close:function(n){var t=!1;e._apiCall||(t=e.trigger(u)),t&&n.preventDefault(),e._apiCall=!1},deactivate:function(){h.hide()},open:function(){h.show()}}),i.notify(e)},events:[u],options:{name:"Shim",modal:!1,align:t,position:t,effect:t,duration:200},show:function(){this.popup.open()},hide:function(){this._apiCall=!0,this.popup.close()},destroy:function(){r.fn.destroy.call(this),this.shim.kendoDestroy(),this.popup.destroy(),this.shim.remove()},_hide:function(t){t&&n.contains(this.shim.children().children(".k-popup")[0],t.target)||this.popup.close()}});f.plugin(e)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.mobile.actionsheet.min",["kendo.mobile.popover.min","kendo.mobile.shim.min"],n)}(function(){return function(n){var i=window.kendo,y=i.support,r=i.mobile.ui,v=r.Shim,p=r.Popup,u=r.Widget,s="open",f="close",h="command",o="li>a",a="actionsheetContext",l='<div class="km-actionsheet-wrapper" />',e=i.template('<li class="km-actionsheet-cancel"><a href="\\#">#:cancel#</a></li>'),c=u.extend({init:function(t,f){var w,a,h,s=this,c=y.mobileOS;u.fn.init.call(s,t,f),f=s.options,h=f.type,t=s.element,a="auto"===h?c&&c.tablet:"tablet"===h,w=a?p:v,f.cancelTemplate&&(e=i.template(f.cancelTemplate)),t.addClass("km-actionsheet").append(e({cancel:s.options.cancel})).wrap(l).on("up",o,"_click").on("click",o,i.preventDefault),s.view().bind("destroy",function(){s.destroy()}),s.wrapper=t.parent().addClass(h?" km-actionsheet-"+h:""),s.shim=new w(s.wrapper,n.extend({modal:c.ios&&c.majorVersion<7,className:"km-actionsheet-root"},s.options.popup)),s._closeProxy=n.proxy(s,"_close"),s._shimHideProxy=n.proxy(s,"_shimHide"),s.shim.bind("hide",s._shimHideProxy),a&&i.onResize(s._closeProxy),i.notify(s,r)},events:[s,f,h],options:{name:"ActionSheet",cancel:"Cancel",type:"auto",popup:{height:"auto"}},open:function(t,i){var r=this;r.target=n(t),r.context=i,r.shim.show(t)},close:function(){this.context=this.target=null,this.shim.hide()},openFor:function(n){var i=this,t=n.data(a);i.open(n,t),i.trigger(s,{target:n,context:t})},destroy:function(){u.fn.destroy.call(this),i.unbindResize(this._closeProxy),this.shim.destroy()},_click:function(t){var e,r,f,u;t.isDefaultPrevented()||(e=n(t.currentTarget),r=e.data("action"),r&&(f={target:this.target,context:this.context},u=this.options.$angular,u?this.element.injector().get("$parse")(r)(u[0])(f):i.getter(r)(window)(f)),this.trigger(h,{target:this.target,context:this.context,currentTarget:e}),t.preventDefault(),this._close())},_shimHide:function(n){this.trigger(f)?n.preventDefault():this.context=this.target=null},_close:function(n){this.trigger(f)?n.preventDefault():this.close()}});r.plugin(c)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.progressbar.min",["kendo.core.min"],n)}(function(){return function(n,t){var s=window.kendo,rt=s.ui,e=rt.Widget,u="horizontal",b="vertical",tt=0,ht=100,ft=0,et=5,k="k-progressbar",ot="k-progressbar-reverse",h="k-progressbar-indeterminate",g="k-complete",d="k-state-selected",w="k-progress-status",o="k-state-selected",a="k-state-default",p="k-state-disabled",i={VALUE:"value",PERCENT:"percent",CHUNK:"chunk"},l="change",v="complete",ct="boolean",r=Math,st=n.extend,f=n.proxy,c=100,nt=400,ut=3,y={progressStatus:"<span class='k-progress-status-wrap'><span class='k-progress-status'></span></span>"},it=e.extend({init:function(n,t){var i=this;e.fn.init.call(this,n,t),t=i.options,i._progressProperty=t.orientation===u?"width":"height",i._fields(),t.value=i._validateValue(t.value),i._validateType(t.type),i._wrapper(),i._progressAnimation(),t.value!==t.min&&t.value!==!1&&i._updateProgress()},setOptions:function(n){var t=this;e.fn.setOptions.call(t,n),n.hasOwnProperty("reverse")&&t.wrapper.toggleClass("k-progressbar-reverse",n.reverse),n.hasOwnProperty("enable")&&t.enable(n.enable),t._progressAnimation(),t._validateValue(),t._updateProgress()},events:[l,v],options:{name:"ProgressBar",orientation:u,reverse:!1,min:tt,max:ht,value:ft,enable:!0,type:i.VALUE,chunkCount:et,showStatus:!0,animation:{}},_fields:function(){var t=this;t._isStarted=!1,t.progressWrapper=t.progressStatus=n()},_validateType:function(t){var r=!1;if(n.each(i,function(n,i){if(i===t)return r=!0,!1}),!r)throw Error(s.format("Invalid ProgressBar type '{0}'",t));},_wrapper:function(){var f,t=this,r=t.wrapper=t.element,n=t.options,e=n.orientation;r.addClass("k-widget "+k),r.addClass(k+"-"+(e===u?u:b)),n.enable===!1&&r.addClass(p),n.reverse&&r.addClass(ot),n.value===!1&&r.addClass(h),n.type===i.CHUNK?t._addChunkProgressWrapper():n.showStatus&&(t.progressStatus=t.wrapper.prepend(y.progressStatus).find("."+w),f=n.value!==!1?n.value:n.min,t.progressStatus.text(n.type===i.VALUE?f:t._calculatePercentage(f).toFixed()+"%"))},value:function(n){return this._value(n)},_value:function(n){var u,i=this,r=i.options;return n===t?r.value:(typeof n!==ct?(n=i._roundValue(n),isNaN(n)||(u=i._validateValue(n),u!==r.value&&(i.wrapper.removeClass(h),r.value=u,i._isStarted=!0,i._updateProgress()))):n||(i.wrapper.addClass(h),r.value=!1),t)},_roundValue:function(n){n=parseFloat(n);var t=r.pow(10,ut);return r.floor(n*t)/t},_validateValue:function(n){var i=this,t=i.options;if(n!==!1){if(n<=t.min||n===!0)return t.min;if(n>=t.max)return t.max}else if(n===!1)return!1;return isNaN(i._roundValue(n))?t.min:n},_updateProgress:function(){var n=this,r=n.options,t=n._calculatePercentage();r.type===i.CHUNK?(n._updateChunks(t),n._onProgressUpdateAlways(r.value)):n._updateProgressWrapper(t)},_updateChunks:function(n){var e,i=this,t=i.options,s=t.chunkCount,l=parseInt(c/s*100,10)/100,h=parseInt(100*n,10)/100,f=r.floor(h/l);e=i.wrapper.find(t.orientation===u&&!t.reverse||t.orientation===b&&t.reverse?"li.k-item:lt("+f+")":"li.k-item:gt(-"+(f+1)+")"),i.wrapper.find("."+o).removeClass(o).addClass(a),e.removeClass(a).addClass(o)},_updateProgressWrapper:function(n){var t=this,r=t.options,u=t.wrapper.find("."+d),e=t._isStarted?t._animation.duration:0,i={};0===u.length&&t._addRegularProgressWrapper(),i[t._progressProperty]=n+"%",t.progressWrapper.animate(i,{duration:e,start:f(t._onProgressAnimateStart,t),progress:f(t._onProgressAnimate,t),complete:f(t._onProgressAnimateComplete,t,r.value),always:f(t._onProgressUpdateAlways,t,r.value)})},_onProgressAnimateStart:function(){this.progressWrapper.show()},_onProgressAnimate:function(n){var u,t=this,r=t.options,f=parseFloat(n.elem.style[t._progressProperty],10);r.showStatus&&(u=1e4/parseFloat(t.progressWrapper[0].style[t._progressProperty]),t.progressWrapper.find(".k-progress-status-wrap").css(t._progressProperty,u+"%")),r.type!==i.CHUNK&&f<=98&&t.progressWrapper.removeClass(g)},_onProgressAnimateComplete:function(n){var f,t=this,u=t.options,e=parseFloat(t.progressWrapper[0].style[t._progressProperty]);u.type!==i.CHUNK&&e>98&&t.progressWrapper.addClass(g),u.showStatus&&(f=u.type===i.VALUE?n:u.type==i.PERCENT?t._calculatePercentage(n).toFixed()+"%":r.floor(t._calculatePercentage(n))+"%",t.progressStatus.text(f)),n===u.min&&t.progressWrapper.hide()},_onProgressUpdateAlways:function(n){var t=this,i=t.options;t._isStarted&&t.trigger(l,{value:n}),n===i.max&&t._isStarted&&t.trigger(v,{value:i.max})},enable:function(n){var r=this,i=r.options;i.enable=t===n||n,r.wrapper.toggleClass(p,!i.enable)},destroy:function(){var n=this;e.fn.destroy.call(n)},_addChunkProgressWrapper:function(){var r,t=this,i=t.options,u=t.wrapper,f=c/i.chunkCount,n="";for(i.chunkCount<=1&&(i.chunkCount=1),n+="<ul class='k-reset'>",r=i.chunkCount-1;r>=0;r--)n+="<li class='k-item k-state-default'></li>";n+="</ul>",u.append(n).find(".k-item").css(t._progressProperty,f+"%").first().addClass("k-first").end().last().addClass("k-last"),t._normalizeChunkSize()},_normalizeChunkSize:function(){var n=this,u=n.options,r=n.wrapper.find(".k-item:last"),t=parseFloat(r[0].style[n._progressProperty]),i=c-u.chunkCount*t;i>0&&r.css(n._progressProperty,t+i+"%")},_addRegularProgressWrapper:function(){var t=this;t.progressWrapper=n("<div class='"+d+"'></div>").appendTo(t.wrapper),t.options.showStatus&&(t.progressWrapper.append(y.progressStatus),t.progressStatus=t.wrapper.find("."+w))},_calculateChunkSize:function(){var n=this,t=n.options.chunkCount,i=n.wrapper.find("ul.k-reset");return(parseInt(i.css(n._progressProperty),10)-(t-1))/t},_calculatePercentage:function(n){var u=this,i=u.options,o=n!==t?n:i.value,f=i.min,e=i.max;return u._onePercent=r.abs((e-f)/100),r.abs((o-f)/u._onePercent)},_progressAnimation:function(){var t=this,n=t.options,i=n.animation;t._animation=i===!1?{duration:0}:st({duration:nt},n.animation)}});s.ui.plugin(it)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("pdf/core.min",["kendo.core.min","kendo.color.min","kendo.drawing.min"],n)}(function(){return function(n){function u(n){function nt(){return t>=i}function f(){return t<i?n[t++]:0}function r(r){s(t),n[t++]=255&r,t>i&&(i=t)}function e(){return f()<<8|f()}function o(n){r(n>>8),r(n)}function rt(){var n=e();return n>=32768?n-65536:n}function it(n){o(n<0?n+65536:n)}function a(){return 65536*e()+e()}function l(n){o(n>>>16&65535),o(65535&n)}function d(){var n=a();return n>=2147483648?n-4294967296:n}function p(n){l(n<0?n+4294967296:n)}function tt(){return a()/65536}function g(n){l(Math.round(65536*n))}function et(){return d()/65536}function ft(n){p(Math.round(65536*n))}function v(n){return y(n,f)}function ut(n){return String.fromCharCode.apply(String,v(n))}function u(n){for(var t=0;t<n.length;++t)r(n.charCodeAt(t))}function y(n,t){for(var r=Array(n),i=0;i<n;++i)r[i]=t();return r}var s,h,c,k,b,t=0,i=0;return null==n?n=w?new Uint8Array(256):[]:i=n.length,s=w?function(t){if(t>=n.length){var i=new Uint8Array(Math.max(t+256,2*n.length));i.set(n,0),n=i}}:function(){},h=w?function(){return new Uint8Array(n.buffer,0,i)}:function(){return n},c=w?function(r){if("string"==typeof r)return u(r);var f=r.length;s(t+f),n.set(r,t),t+=f,t>i&&(i=t)}:function(n){if("string"==typeof n)return u(n);for(var t=0;t<n.length;++t)r(n[t])},k=w?function(t,i){if(n.buffer.slice)return new Uint8Array(n.buffer.slice(t,t+i));var r=new Uint8Array(i);return r.set(new Uint8Array(n.buffer,t,i)),r}:function(t,i){return n.slice(t,t+i)},b={eof:nt,readByte:f,writeByte:r,readShort:e,writeShort:o,readLong:a,writeLong:l,readFixed:tt,writeFixed:g,readShort_:rt,writeShort_:it,readLong_:d,writeLong_:p,readFixed_:et,writeFixed_:ft,read:v,write:c,readString:ut,writeString:u,times:y,get:h,slice:k,offset:function(n){return null!=n?(t=n,b):t},skip:function(n){t+=n},toString:function(){throw Error("FIX CALLER.  BinaryStream is no longer convertible to string!");},length:function(){return i},saveExcursion:function(n){var i=t;try{return n()}finally{t=i}},writeBase64:function(n){window.atob?u(window.atob(n)):c(pt.decode(n))},base64:function(){return pt.encode(h())}}}function ou(n){for(var t,u,r=[],i=0,f=n.length;i<f;)t=n.charCodeAt(i++),t>=55296&&t<=56319&&i<f?(u=n.charCodeAt(i++),56320==(64512&u)?r.push(((1023&t)<<10)+(1023&u)+65536):(r.push(t),i--)):r.push(t);return r}function au(n){return n.map(function(n){var t="";return n>65535&&(n-=65536,t+=String.fromCharCode(n>>>10&1023|55296),n=56320|1023&n),t+=String.fromCharCode(n)}).join("")}function b(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function ti(n){return Object.keys(n).sort(function(n,t){return n-t}).map(parseFloat)}function nr(n){var r,t,i;for(this.raw=n,this.scalerType=n.readLong(),this.tableCount=n.readShort(),this.searchRange=n.readShort(),this.entrySelector=n.readShort(),this.rangeShift=n.readShort(),r=this.tables={},t=0;t<this.tableCount;++t)i={tag:n.readString(4),checksum:n.readLong(),offset:n.readLong(),length:n.readLong()},r[i.tag]=i}function l(n){function i(n,t){this.definition=t,this.length=t.length,this.offset=t.offset,this.file=n,this.rawData=n.raw,this.parse(n.raw)}i.prototype.raw=function(){return this.rawData.slice(this.offset,this.length)};for(var t in n)b(n,t)&&(i[t]=i.prototype[t]=n[t]);return i}function hf(){for(var i="",t=dt+"",n=0;n<t.length;++n)i+=String.fromCharCode(t.charCodeAt(n)- -17);return++dt,i}function gi(n){this.font=n,this.subset={},this.unicodes={},this.ogid2ngid={0:0},this.ngid2ogid={0:0},this.ncid2ogid={},this.next=this.firstChar=1,this.nextGid=1,this.psName=hf()+"+"+this.font.psName}function rr(n,t){var s,e,o,f,r=this,i=r.contents=u(n);if("ttcf"==i.readString(4)){if(e=function(){i.offset(s),r.parse()},!t)throw Error("Must specify a name for TTC files");for(i.readLong(),o=i.readLong(),f=0;f<o;++f)if(s=i.readLong(),i.saveExcursion(e),r.psName==t)return;throw Error("Font "+t+" not found in collection");}i.offset(0),r.parse()}function gt(){function n(){for(var i,u,e=arguments,f=0;f<arguments.length;++f){if(i=e[f],void 0===i)throw Error("Cannot output undefined to PDF");if(i instanceof ii)i.beforeRender(n),i.render(n);else if(ui(i))su(i,n);else if(gr(i))hu(i,n);else if("number"==typeof i){if(isNaN(i))throw Error("Cannot output NaN to PDF");u=i.toFixed(7),u.indexOf(".")>=0&&(u=u.replace(/\.?0+$/,"")),"-0"==u&&(u="0"),t.writeString(u)}else/string|boolean/.test(typeof i)?t.writeString(i+""):"function"==typeof i.get?t.write(i.get()):"object"==typeof i&&(i?n(new r(i)):t.writeString("null"))}}var f=0,t=u();return n.writeData=function(n){t.write(n)},n.withIndent=function(t){++f,t(n),--f},n.indent=function(){n(i,ar("",2*f,"  ")),n.apply(null,arguments)},n.offset=function(){return t.offset()},n.toString=function(){throw Error("FIX CALLER");},n.get=function(){return t.get()},n.stream=function(){return t},n}function rf(n,t){var r=n.beforeRender,i=n.render;n.beforeRender=function(){},n.render=function(n){n(t," 0 R")},n.renderFull=function(u){n._offset=u.offset(),u(t," 0 obj "),r.call(n,u),i.call(n,u),u(" endobj")}}function vi(n){var r,i,t;if("function"!=typeof n&&(r=n,n=function(n,t){return n in r?r[n]:t}),i=n("paperSize",ct.a4),!i)return{};if("string"==typeof i&&(i=ct[i.toLowerCase()],null==i))throw Error("Unknown paper size");return i[0]=y(i[0]),i[1]=y(i[1]),n("landscape",!1)&&(i=[Math.max(i[0],i[1]),Math.min(i[0],i[1])]),t=n("margin"),t&&("string"==typeof t||"number"==typeof t?(t=y(t,0),t={left:t,top:t,right:t,bottom:t}):t={left:y(t.left,0),top:y(t.top,0),right:y(t.right,0),bottom:y(t.bottom,0)},n("addMargin")&&(i[0]+=t.left+t.right,i[1]+=t.top+t.bottom)),{paperSize:i,margin:t}}function vt(n){function o(t,i){return n&&null!=n[t]?n[t]:i}var l,s,t=this,u=gt(),a=0,f=[];t.getOption=o,t.attach=function(n){return f.indexOf(n)<0&&(rf(n,++a),f.push(n)),n},t.pages=[],t.FONTS={},t.IMAGES={},t.GRAD_COL_FUNCTIONS={},t.GRAD_OPC_FUNCTIONS={},t.GRAD_COL={},t.GRAD_OPC={},l=t.attach(new ir),s=t.attach(new ki),l.setPages(s),t.addPage=function(n){var f,h,i,l=vi(function(t,i){return n&&null!=n[t]?n[t]:i}),u=l.paperSize,r=l.margin,o=u[0],e=u[1];return r&&(o-=r.left+r.right,e-=r.top+r.bottom),f=new c(gt(),null,!0),h={Contents:t.attach(f),Parent:s,MediaBox:[0,0,u[0],u[1]]},i=new fr(t,h),i._content=f,s.addPage(t.attach(i)),i.transform(1,0,0,-1,0,u[1]),r&&(i.translate(r.left,r.top),i.rect(0,0,o,e),i.clip()),t.pages.push(i),i},t.render=function(){var n,t;for(u("%PDF-1.4",i,"%ÂÁÚÏÎ",i,i),n=0;n<f.length;++n)f[n].renderFull(u),u(i,i);for(t=u.offset(),u("xref",i,0," ",f.length+1,i),u("0000000000 65535 f ",i),n=0;n<f.length;++n)u(h(f[n]._offset,10)," 00000 n ",i);return u(i),u("trailer",i),u(new r({Size:f.length+1,Root:l,Info:new r({Producer:new e(o("producer","Kendo UI PDF Generator")),Title:new e(o("title","")),Author:new e(o("author","")),Subject:new e(o("subject","")),Keywords:new e(o("keywords","")),Creator:new e(o("creator","Kendo UI PDF Generator")),CreationDate:o("date",new Date)})}),i,i),u("startxref",i,t,i),u("%%EOF",i),u.stream().offset(0)}}function vf(n,t){function r(){window.console&&(window.console.error?window.console.error("Cannot load URL: %s",n):window.console.log("Cannot load URL: %s",n)),t(null)}var i=new XMLHttpRequest;i.open("GET",n,!0),ft&&(i.responseType="arraybuffer"),i.onload=function(){200==i.status||304==i.status?t(ft?new Uint8Array(i.response):new window.VBArray(i.responseBody).toArray()):r()},i.onerror=r,i.send(null)}function pu(n,t){var i=ut[n];i?t(i):vf(n,function(i){if(null==i)throw Error("Cannot load font from "+n);var r=new rr(i);ut[n]=r,t(r)})}function yu(n,t){function h(n){i.src=n,i.complete&&!hr.msie?s():(i.onload=s,i.onerror=o)}function o(){t(p[n]="TAINTED")}function s(){var y,c,w,d,k,h,b,s,r,v,l,a;if(f&&/^image\/jpe?g$/i.test(f.type))return y=new FileReader,y.onload=function(){i=new wr(u(new Uint8Array(this.result))),URL.revokeObjectURL(e),t(p[n]=i)},void y.readAsArrayBuffer(f);c=document.createElement("canvas"),c.width=i.width,c.height=i.height,w=c.getContext("2d"),w.drawImage(i,0,0);try{d=w.getImageData(0,0,i.width,i.height)}catch(g){return void o()}finally{e&&URL.revokeObjectURL(e)}for(k=!1,h=u(),b=u(),s=d.data,r=0;r<s.length;)h.writeByte(s[r++]),h.writeByte(s[r++]),h.writeByte(s[r++]),v=s[r++],v<255&&(k=!0),b.writeByte(v);k?i=new vu(i.width,i.height,h,b):(l=c.toDataURL("image/jpeg"),l=l.substr(l.indexOf(";base64,")+8),a=u(),a.writeBase64(l),i=new wr(a)),t(p[n]=i)}var e,f,r,i=p[n];i?t(i):(i=new Image,/^data:/i.test(n)||(i.crossOrigin="Anonymous"),ft&&!/^data:/i.test(n)?(r=new XMLHttpRequest,r.onload=function(){f=r.response,e=URL.createObjectURL(f),h(e)},r.onerror=o,r.open("GET",n,!0),r.responseType="blob",r.send()):h(n))}function lr(n){return function(t,i){function f(){0==--r&&i()}var r=t.length,u=r;if(0===r)return i();for(;u-->0;)n(t[u],f)}}function ar(n,t,i){for(;n.length<t;)n=i+n;return n}function h(n,t){return ar(n+"",t,"0")}function tt(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function gr(n){return n instanceof Date}function su(n,t){t("["),n.length>0&&t.withIndent(function(){for(var i=0;i<n.length;++i)i>0&&i%8==0?t.indent(n[i]):t(" ",n[i])}),t(" ]")}function hu(n,t){t("(D:",h(n.getUTCFullYear(),4),h(n.getUTCMonth()+1,2),h(n.getUTCDate(),2),h(n.getUTCHours(),2),h(n.getUTCMinutes(),2),h(n.getUTCSeconds(),2),"Z)")}function br(n){return n*(72/25.4)}function eu(n){return br(10*n)}function cu(n){return 72*n}function y(n,t){var i,r;if("number"==typeof n)return n;if("string"==typeof n&&(i=/^\s*([0-9.]+)\s*(mm|cm|in|pt)\s*$/.exec(n),i&&(r=parseFloat(i[1]),!isNaN(r))))return"pt"==i[2]?r:{mm:br,cm:eu,"in":cu}[i[2]](r);if(null!=t)return t;throw Error("Can't parse unit: "+n);}function ii(){}function s(n,t,i){i||(i=ii),n.prototype=new i;for(var r in t)tt(t,r)&&(n.prototype[r]=t[r]);return n}function t(n){return tt(rt,n)?rt[n]:rt[n]=new fi(n)}function wr(n){var h,s,r,e,l,o,u,f,i;if(n.offset(0),l=n.readShort(),65496!=l)throw Error("Invalid JPEG image");for(;!n.eof();){if(o=n.readByte(),255!=o)throw Error("Invalid JPEG image");if(u=n.readByte(),f=n.readShort(),di.indexOf(u)>=0){e=n.readByte(),s=n.readShort(),h=n.readShort(),r=n.readByte();break}n.skip(f-2)}if(null==r)throw Error("Invalid JPEG image");switch(i={Type:t("XObject"),Subtype:t("Image"),Width:h,Height:s,BitsPerComponent:e,Filter:t("DCTDecode")},r){case 1:i.ColorSpace=t("DeviceGray");break;case 3:i.ColorSpace=t("DeviceRGB");break;case 4:i.ColorSpace=t("DeviceCMYK"),i.Decode=[1,0,1,0,1,0,1,0]}this.asStream=function(){n.offset(0);var r=new c(n,i);return r._resourceName=t("I"+ ++v),r}}function vu(n,i,r,u){this.asStream=function(f){var o=new c(u,{Type:t("XObject"),Subtype:t("Image"),Width:n,Height:i,BitsPerComponent:8,ColorSpace:t("DeviceGray")},!0),e=new c(r,{Type:t("XObject"),Subtype:t("Image"),Width:n,Height:i,BitsPerComponent:8,ColorSpace:t("DeviceRGB"),SMask:f.attach(o)},!0);return e._resourceName=t("I"+ ++v),e}}function nt(n){return n.map(function(n){return ui(n)?nt(n):"number"==typeof n?(Math.round(1e3*n)/1e3).toFixed(3):n}).join(" ")}function lu(n,t,i,u,f,e,o){var h=nt([t,i,u,f,e,o]),s=n.GRAD_COL_FUNCTIONS[h];return s||(s=n.GRAD_COL_FUNCTIONS[h]=n.attach(new r({FunctionType:2,Domain:[0,1],Range:[0,1,0,1,0,1],N:1,C0:[t,i,u],C1:[f,e,o]}))),s}function nu(n,t,i){var f=nt([t,i]),u=n.GRAD_OPC_FUNCTIONS[f];return u||(u=n.GRAD_OPC_FUNCTIONS[f]=n.attach(new r({FunctionType:2,Domain:[0,1],Range:[0,1],N:1,C0:[t],C1:[i]}))),u}function tu(n,t){function l(n){return 1==n.length?n[0]:{FunctionType:3,Functions:n,Domain:[0,1],Bounds:s,Encode:h}}for(var o,f,r,u,e=!1,a=[],c=[],s=[],h=[],i=1;i<t.length;++i)o=t[i-1],f=t[i],r=o.color,u=f.color,c.push(lu(n,r.r,r.g,r.b,u.r,u.g,u.b)),(r.a<1||u.a<1)&&(e=!0),s.push(f.offset),h.push(0,1);if(e)for(i=1;i<t.length;++i)o=t[i-1],f=t[i],r=o.color,u=f.color,a.push(nu(n,r.a,u.a));return s.pop(),{hasAlpha:e,colors:l(c),opacities:e?l(a):null}}function uu(n,i,u,f,e,o){var s,h,c;return o||(c=[i].concat(f),u.forEach(function(n){c.push(n.offset,n.color.r,n.color.g,n.color.b)}),h=nt(c),s=n.GRAD_COL[h]),s||(s=new r({Type:t("Shading"),ShadingType:i?3:2,ColorSpace:t("DeviceRGB"),Coords:f,Domain:[0,1],Function:e,Extend:[!0,!0]}),n.attach(s),s._resourceName="S"+ ++v,h&&(n.GRAD_COL[h]=s)),s}function fu(n,i,u,f,e,o){var s,h,l;return o||(l=[i].concat(f),u.forEach(function(n){l.push(n.offset,n.color.a)}),h=nt(l),s=n.GRAD_OPC[h]),s||(s=new r({Type:t("ExtGState"),AIS:!1,CA:1,ca:1,SMask:{Type:t("Mask"),S:t("Luminosity"),G:n.attach(new c("/a0 gs /s0 sh",{Type:t("XObject"),Subtype:t("Form"),FormType:1,BBox:o?[o.left,o.top+o.height,o.left+o.width,o.top]:[0,1,1,0],Group:{Type:t("Group"),S:t("Transparency"),CS:t("DeviceGray"),I:!0},Resources:{ExtGState:{a0:{CA:1,ca:1}},Shading:{s0:{ColorSpace:t("DeviceGray"),Coords:f,Domain:[0,1],ShadingType:i?3:2,Function:e,Extend:[!0,!0]}}}}))}}),n.attach(s),s._resourceName="O"+ ++v,h&&(n.GRAD_OPC[h]=s)),s}function ru(n,t,i){var u="radial"==t.type,r=tu(n,t.stops),f=u?[t.start.x,t.start.y,t.start.r,t.end.x,t.end.y,t.end.r]:[t.start.x,t.start.y,t.end.x,t.end.y],o=uu(n,u,t.stops,f,r.colors,t.userSpace&&i),e=r.hasAlpha?fu(n,u,t.stops,f,r.opacities,t.userSpace&&i):null;return{hasAlpha:r.hasAlpha,shading:o,opacity:e}}function iu(n){return n.replace(/^\s*(['"])(.*)\1\s*$/,"$2")}function at(n){var i,r=/^\s*((normal|italic)\s+)?((normal|small-caps)\s+)?((normal|bold|\d+)\s+)?(([0-9.]+)(px|pt))(\/(([0-9.]+)(px|pt)|normal))?\s+(.*?)\s*$/i,t=r.exec(n);return t?(i=t[8]?parseInt(t[8],10):12,{italic:t[2]&&"italic"==t[2].toLowerCase(),variant:t[4],bold:t[6]&&/bold|700/i.test(t[6]),fontSize:i,lineHeight:t[12]?"normal"==t[12]?i:parseInt(t[12],10):null,fontFamily:t[14].split(/\s*,\s*/g).map(iu)}):{fontSize:12,fontFamily:"sans-serif"}}function lt(n){function e(t){return n.bold&&(t+="|bold"),n.italic&&(t+="|italic"),t.toLowerCase()}var u,t,i,r=n.fontFamily;if(r instanceof Array)for(i=0;i<r.length&&(u=e(r[i]),!(t=f[u]));++i);else t=f[r.toLowerCase()];for(;"function"==typeof t;)t=t();return t||(t="Times-Roman"),t}function a(n,t){n=n.toLowerCase(),f[n]=function(){return f[t]},f[n+"|bold"]=function(){return f[t+"|bold"]},f[n+"|italic"]=function(){return f[t+"|italic"]},f[n+"|bold|italic"]=function(){return f[t+"|bold|italic"]}}function kr(n,t){if(1==arguments.length)for(var i in n)tt(n,i)&&kr(i,n[i]);else switch(n=n.toLowerCase(),f[n]=t,n){case"dejavu sans":f["sans-serif"]=t;break;case"dejavu sans|bold":f["sans-serif|bold"]=t;break;case"dejavu sans|italic":f["sans-serif|italic"]=t;break;case"dejavu sans|bold|italic":f["sans-serif|bold|italic"]=t;break;case"dejavu serif":f.serif=t;break;case"dejavu serif|bold":f["serif|bold"]=t;break;case"dejavu serif|italic":f["serif|italic"]=t;break;case"dejavu serif|bold|italic":f["serif|bold|italic"]=t;break;case"dejavu mono":f.monospace=t;break;case"dejavu mono|bold":f["monospace|bold"]=t;break;case"dejavu mono|italic":f["monospace|italic"]=t;break;case"dejavu mono|bold|italic":f["monospace|bold|italic"]=t}}function cf(n,t){var s=n[0],o=n[1],h=n[2],l=n[3],c=n[4],e=n[5],r=t[0],i=t[1],f=t[2],u=t[3],v=t[4],a=t[5];return[s*r+o*f,s*i+o*u,h*r+l*f,h*i+l*u,c*r+e*f+v,c*i+e*u+a]}function sf(n){return 1===n[0]&&0===n[1]&&0===n[2]&&1===n[3]&&0===n[4]&&0===n[5]}function ht(n,t){function i(n,t,i){return i||(i=h),i.pdf&&null!=i.pdf[n]?i.pdf[n]:t}function f(){function u(n){var u,h,s,c,l,f=n.options,t=nf(n),e=t.bbox;n=t.root,u=i("paperSize",i("paperSize","auto"),f),h=!1,"auto"==u&&(e?(s=e.getSize(),u=[s.width,s.height],h=!0,c=e.getOrigin(),t=new o.Group,t.transform(new k.Matrix(1,0,0,1,-c.x,-c.y)),t.append(n),n=t):u="A4"),l=r.addPage({paperSize:u,margin:i("margin",i("margin"),f),addMargin:h,landscape:i("landscape",i("landscape",!1),f)}),pr(n,l,r)}if(!(--e>0)){var r=new vt({producer:i("producer"),title:i("title"),author:i("author"),subject:i("subject"),keywords:i("keywords"),creator:i("creator"),date:i("date")});s?n.children.forEach(u):u(n),t(r.render(),r)}}var e,r=[],u=[],h=n.options,s=i("multiPage");n.traverse(function(n){bt({Image:function(n){u.indexOf(n.src())<0&&u.push(n.src())},Text:function(n){var i=at(n.options.font),t=lt(i);r.indexOf(t)<0&&r.push(t)}},n)}),e=2,it(r,f),st(u,f)}function kt(n,t){ht(n,function(n){t("data:application/pdf;base64,"+n.base64())})}function vr(n,t){ht(n,function(n){t(new window.Blob([n.get()],{type:"application/pdf"}))})}function ef(t,i,r,u){window.Blob&&!bi.safari?vr(t,function(t){n.saveAs({dataURI:t,fileName:i}),u&&u(t)}):kt(t,function(t){n.saveAs({dataURI:t,fileName:i,proxyURL:r}),u&&u(t)})}function bt(n,t){var i=n[t.nodeType];return i?i.call.apply(i,arguments):t}function pr(n,t,i){var f,u,r;n.options._pdfDebug&&t.comment("BEGIN: "+n.options._pdfDebug),f=n.transform(),u=n.opacity(),t.save(),null!=u&&u<1&&t.setOpacity(u),of(n,t,i),yf(n,t,i),f&&(r=f.matrix(),t.transform(r.a,r.b,r.c,r.d,r.e,r.f)),pf(n,t,i),bt({Path:af,MultiPath:du,Circle:gu,Arc:ku,Text:wu,Image:uf,Group:bu,Rect:ff},n,t,i),t.restore(),n.options._pdfDebug&&t.comment("END: "+n.options._pdfDebug)}function of(n,t){var i,u,e,o,s,f,r=n.stroke&&n.stroke();if(r){if(i=r.color){if(i=ni(i),null==i)return;t.setStrokeColor(i.r,i.g,i.b),1!=i.a&&t.setStrokeOpacity(i.a)}if(u=r.width,null!=u){if(0===u)return;t.setLineWidth(u)}e=r.dashType,e&&t.setDashPattern(ci[e],0),o=r.lineCap,o&&t.setLineCap(ai[o]),s=r.lineJoin,s&&t.setLineJoin(dr[s]),f=r.opacity,null!=f&&t.setStrokeOpacity(f)}}function yf(n,t){var i,u,r=n.fill&&n.fill();if(r&&!(r instanceof o.Gradient)){if(i=r.color){if(i=ni(i),null==i)return;t.setFillColor(i.r,i.g,i.b),1!=i.a&&t.setFillOpacity(i.a)}u=r.opacity,null!=u&&t.setFillOpacity(u)}}function pf(n,t,i){var r=n.clip();r&&(wt(r,t,i),t.clip())}function d(n){return n&&(n instanceof o.Gradient||n.color&&!/^(none|transparent)$/i.test(n.color)&&(null==n.width||n.width>0)&&(null==n.opacity||n.opacity>0))}function yr(n,t,i,r){var l,c,a,f,v,e,h,s,u=n.fill();if(u instanceof o.Gradient)return r?t.clipStroke():t.clip(),l=u instanceof o.RadialGradient,l?(c={x:u.center().x,y:u.center().y,r:0},a={x:u.center().x,y:u.center().y,r:u.radius()}):(c={x:u.start().x,y:u.start().y},a={x:u.end().x,y:u.end().y}),f=u.stops.elements().map(function(n){var i,t=n.offset();return t=/%$/.test(t)?parseFloat(t)/100:parseFloat(t),i=ni(n.color()),i.a*=n.opacity(),{offset:t,color:i}}),f.unshift(f[0]),f.push(f[f.length-1]),v={userSpace:u.userSpace(),type:l?"radial":"linear",start:c,end:a,stops:f},e=n.rawBBox(),h=e.topLeft(),s=e.getSize(),e={left:h.x,top:h.y,width:s.width,height:s.height},t.gradient(v,e),!0}function g(n,t,i){d(n.fill())&&d(n.stroke())?yr(n,t,i,!0)||t.fillStroke():d(n.fill())?yr(n,t,i,!1)||t.fill():d(n.stroke())?t.stroke():t.nop()}function lf(n,t){var i,r,f,u=n.segments;if(4==u.length&&n.options.closed){for(i=[],r=0;r<u.length;++r){if(u[r].controlIn())return!1;i[r]=u[r].anchor()}if(f=i[0].y==i[1].y&&i[1].x==i[2].x&&i[2].y==i[3].y&&i[3].x==i[0].x||i[0].x==i[1].x&&i[1].y==i[2].y&&i[2].x==i[3].x&&i[3].y==i[0].y)return t.rect(i[0].x,i[0].y,i[2].x-i[0].x,i[2].y-i[0].y),!0}}function wt(n,t,i){var h,e,o,r,f,u,s=n.segments;if(0!==s.length&&!lf(n,t,i)){for(e=0;e<s.length;++e)o=s[e],r=o.anchor(),h?(f=h.controlOut(),u=o.controlIn(),f&&u?t.bezier(f.x,f.y,u.x,u.y,r.x,r.y):t.lineTo(r.x,r.y)):t.moveTo(r.x,r.y),h=o;n.options.closed&&t.close()}}function af(n,t,i){wt(n,t,i),g(n,t,i)}function du(n,t,i){for(var u=n.paths,r=0;r<u.length;++r)wt(u[r],t,i);g(n,t,i)}function gu(n,t,i){var r=n.geometry();t.circle(r.center.x,r.center.y,r.radius),g(n,t,i)}function ku(n,t,i){var u,r=n.geometry().curvePoints();for(t.moveTo(r[0].x,r[0].y),u=1;u<r.length;)t.bezier(r[u].x,r[u++].y,r[u].x,r[u++].y,r[u].x,r[u++].y);g(n,t,i)}function wu(n,t){var i,r=at(n.options.font),u=n._position;n.fill()&&n.stroke()?i=ot.fillAndStroke:n.fill()?i=ot.fill:n.stroke()&&(i=ot.stroke),t.transform(1,0,0,-1,u.x,u.y+r.fontSize),t.beginText(),t.setFont(lt(r),r.fontSize),t.setTextRenderingMode(i),t.showText(n.content(),n._pdfRect?n._pdfRect.width():null),t.endText()}function bu(n,t,i){var u,r;for(n._pdfLink&&t.addLink(n._pdfLink.url,n._pdfLink),u=n.children,r=0;r<u.length;++r)pr(u[r],t,i)}function uf(n,t){var u,r,i,f=n.src();f&&(u=n.rect(),r=u.getOrigin(),i=u.getSize(),t.transform(i.width,0,0,-i.height,r.x,r.y+i.height),t.drawImage(f))}function ff(n,t,i){var r=n.geometry();t.rect(r.origin.x,r.origin.y,r.size.width,r.size.height),g(n,t,i)}function ni(t){var i=n.parseColor(t,!0);return i?i.toRGB():null}function nf(n){function t(n){return e=!0,n}function r(n){return n.visible()&&n.opacity()>0&&(d(n.fill())||d(n.stroke()))}function s(n){for(var i,r=[],t=0;t<n.length;++t)i=h(n[t]),null!=i&&r.push(i);return r}function l(n,t){var r,e=i,f=u;n.transform()&&(u=u.multiplyCopy(n.transform().matrix())),r=n.clip(),r&&(r=r.bbox(),r&&(r=r.bbox(u),i=i?k.Rect.intersect(i,r):r));try{return t()}finally{i=e,u=f}}function c(n){if(null==i)return!1;var t=n.rawBBox().bbox(u);return i&&t&&(t=k.Rect.intersect(t,i)),t}function h(i){return l(i,function(){if(!(i instanceof o.Group||i instanceof o.MultiPath)){var u=c(i);if(!u)return t(null);f=f?k.Rect.union(f,u):u}return bt({Path:function(n){return 0!==n.segments.length&&r(n)?n:t(null)},MultiPath:function(n){if(!r(n))return t(null);var i=new o.MultiPath(n.options);return i.paths=s(n.paths),0===i.paths.length?t(null):i},Circle:function(n){return r(n)?n:t(null)},Arc:function(n){return r(n)?n:t(null)},Text:function(n){return/\S/.test(n.content())&&r(n)?n:t(null)},Image:function(n){return n.visible()&&n.opacity()>0?n:t(null)},Group:function(i){var r=new o.Group(i.options);return r.children=s(i.children),r._pdfLink=i._pdfLink,i===n||0!==r.children.length||i._pdfLink?r:t(null)},Rect:function(n){return r(n)?n:t(null)}},i)})}var e,i=!1,u=k.Matrix.unit(),f=null;do e=!1,n=h(n);while(n&&e);return{root:n,bbox:f}}function tf(n,t){var i,r=yi.createPromise();for(i in t)"margin"==i&&n.options.pdf&&n.options.pdf._ignoreMargin||n.options.set("pdf."+i,t[i]);return kt(n,r.resolve),r}var cr,bi,o,yi,k,w,pt,si,wi,pi,li,oi,ei,hi,er,yt,ur,dt,hr,ft,i,v,ct,ut,p,it,st,ui,e,tr,fi,rt,r,c,ir,ki,di,or,et,sr,fr,f,ri,ot,ci,ai,dr;window.kendo.pdf=window.kendo.pdf||{},cr=n.support,bi=cr.browser,o=n.drawing,yi=o.util,k=n.geometry,w="undefined"!=typeof Uint8Array,pt=function(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{decode:function(t){for(var h,e,f,o,s,c,l,i=t.replace(/[^A-Za-z0-9\+\/\=]/g,""),r=0,a=i.length,u=[];r<a;)h=n.indexOf(i.charAt(r++)),e=n.indexOf(i.charAt(r++)),f=n.indexOf(i.charAt(r++)),o=n.indexOf(i.charAt(r++)),s=h<<2|e>>>4,c=(15&e)<<4|f>>>2,l=(3&f)<<6|o,u.push(s),64!=f&&u.push(c),64!=o&&u.push(l);return u},encode:function(t){for(var s,e,o,c,l,f,r,i=0,u=t.length,h="";i<u;)s=t[i++],e=t[i++],o=t[i++],c=s>>>2,l=(3&s)<<4|e>>>4,f=(15&e)<<2|o>>>6,r=63&o,i-u==2?f=r=64:i-u==1&&(r=64),h+=n.charAt(c)+n.charAt(l)+n.charAt(f)+n.charAt(r);return h}}}(),nr.prototype={readTable:function(n,t){var i=this.tables[n];if(!i)throw Error("Table "+n+" not found in directory");return this[n]=i.table=new t(this,i)},render:function(n){var v,i,s,o,r,f,h,a,y=this,e=Object.keys(n).length,c=Math.pow(2,Math.floor(Math.log(e)/Math.LN2)),l=16*c,w=Math.floor(Math.log(c)/Math.LN2),p=16*e-l,t=u();t.writeLong(this.scalerType),t.writeShort(e),t.writeShort(l),t.writeShort(w),t.writeShort(p),v=16*e,i=t.offset()+v,s=null,o=u();for(r in n)if(b(n,r))for(f=n[r],t.writeString(r),t.writeLong(y.checksum(f)),t.writeLong(i),t.writeLong(f.length),o.write(f),"head"==r&&(s=i),i+=f.length;i%4;)o.writeByte(0),i++;return t.write(o.get()),h=this.checksum(t.get()),a=2981146554-h,t.offset(s+8),t.writeLong(a),t.get()},checksum:function(n){n=u(n);for(var t=0;!n.eof();)t+=n.readLong();return 4294967295&t}},si=l({parse:function(n){n.offset(this.offset),this.version=n.readLong(),this.revision=n.readLong(),this.checkSumAdjustment=n.readLong(),this.magicNumber=n.readLong(),this.flags=n.readShort(),this.unitsPerEm=n.readShort(),this.created=n.read(8),this.modified=n.read(8),this.xMin=n.readShort_(),this.yMin=n.readShort_(),this.xMax=n.readShort_(),this.yMax=n.readShort_(),this.macStyle=n.readShort(),this.lowestRecPPEM=n.readShort(),this.fontDirectionHint=n.readShort_(),this.indexToLocFormat=n.readShort_(),this.glyphDataFormat=n.readShort_()},render:function(n){var t=u();return t.writeLong(this.version),t.writeLong(this.revision),t.writeLong(0),t.writeLong(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.write(this.created),t.write(this.modified),t.writeShort_(this.xMin),t.writeShort_(this.yMin),t.writeShort_(this.xMax),t.writeShort_(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort_(this.fontDirectionHint),t.writeShort_(n),t.writeShort_(this.glyphDataFormat),t.get()}}),wi=l({parse:function(n){n.offset(this.offset);var t=this.file.head.indexToLocFormat;this.offsets=0===t?n.times(this.length/2,function(){return 2*n.readShort()}):n.times(this.length/4,n.readLong)},offsetOf:function(n){return this.offsets[n]},lengthOf:function(n){return this.offsets[n+1]-this.offsets[n]},render:function(n){for(var i=u(),r=n[n.length-1]>65535,t=0;t<n.length;++t)r?i.writeLong(n[t]):i.writeShort(n[t]/2);return{format:r?1:0,table:i.get()}}}),pi=l({parse:function(n){n.offset(this.offset),this.version=n.readLong(),this.ascent=n.readShort_(),this.descent=n.readShort_(),this.lineGap=n.readShort_(),this.advanceWidthMax=n.readShort(),this.minLeftSideBearing=n.readShort_(),this.minRightSideBearing=n.readShort_(),this.xMaxExtent=n.readShort_(),this.caretSlopeRise=n.readShort_(),this.caretSlopeRun=n.readShort_(),this.caretOffset=n.readShort_(),n.skip(8),this.metricDataFormat=n.readShort_(),this.numOfLongHorMetrics=n.readShort()},render:function(n){var t=u();return t.writeLong(this.version),t.writeShort_(this.ascent),t.writeShort_(this.descent),t.writeShort_(this.lineGap),t.writeShort(this.advanceWidthMax),t.writeShort_(this.minLeftSideBearing),t.writeShort_(this.minRightSideBearing),t.writeShort_(this.xMaxExtent),t.writeShort_(this.caretSlopeRise),t.writeShort_(this.caretSlopeRun),t.writeShort_(this.caretOffset),t.write([0,0,0,0,0,0,0,0]),t.writeShort_(this.metricDataFormat),t.writeShort(n.length),t.get()}}),li=l({parse:function(n){n.offset(this.offset),this.version=n.readLong(),this.numGlyphs=n.readShort(),this.maxPoints=n.readShort(),this.maxContours=n.readShort(),this.maxComponentPoints=n.readShort(),this.maxComponentContours=n.readShort(),this.maxZones=n.readShort(),this.maxTwilightPoints=n.readShort(),this.maxStorage=n.readShort(),this.maxFunctionDefs=n.readShort(),this.maxInstructionDefs=n.readShort(),this.maxStackElements=n.readShort(),this.maxSizeOfInstructions=n.readShort(),this.maxComponentElements=n.readShort(),this.maxComponentDepth=n.readShort()},render:function(n){var t=u();return t.writeLong(this.version),t.writeShort(n.length),t.writeShort(this.maxPoints),t.writeShort(this.maxContours),t.writeShort(this.maxComponentPoints),t.writeShort(this.maxComponentContours),t.writeShort(this.maxZones),t.writeShort(this.maxTwilightPoints),t.writeShort(this.maxStorage),t.writeShort(this.maxFunctionDefs),t.writeShort(this.maxInstructionDefs),t.writeShort(this.maxStackElements),t.writeShort(this.maxSizeOfInstructions),t.writeShort(this.maxComponentElements),t.writeShort(this.maxComponentDepth),t.get()}}),oi=l({parse:function(n){var t,r,i;n.offset(this.offset),t=this.file,r=t.hhea,this.metrics=n.times(r.numOfLongHorMetrics,function(){return{advance:n.readShort(),lsb:n.readShort_()}}),i=t.maxp.numGlyphs-t.hhea.numOfLongHorMetrics,this.leftSideBearings=n.times(i,n.readShort_)},forGlyph:function(n){var i=this.metrics,t=i.length;return n<t?i[n]:{advance:i[t-1].advance,lsb:this.leftSideBearings[n-t]}},render:function(n){for(var r,f=this,i=u(),t=0;t<n.length;++t)r=f.forGlyph(n[t]),i.writeShort(r.advance),i.writeShort_(r.lsb);return i.get()}}),ei=function(){function f(n){this.raw=n}function e(u){var e,s,f;for(this.raw=u,e=this.glyphIds=[],s=this.idOffsets=[];;){if(f=u.readShort(),s.push(u.offset()),e.push(u.readShort()),!(f&n))break;u.skip(f&o?4:2),f&i?u.skip(8):f&t?u.skip(4):f&r&&u.skip(2)}}var o,r,n,t,i;return f.prototype={compound:!1,render:function(){return this.raw.get()}},o=1,r=8,n=32,t=64,i=128,e.prototype={compound:!0,render:function(n){for(var r,f=this,i=u(this.raw.get()),t=0;t<this.glyphIds.length;++t)r=f.glyphIds[t],i.offset(f.idOffsets[t]),i.writeShort(n[r]);return i.get()}},l({parse:function(){this.cache={}},glyphFor:function(n){var s,o,v,l,t,h,y,p,a,c,i,r=this.cache;return b(r,n)?r[n]:(s=this.file.loca,o=s.lengthOf(n),0===o?r[n]=null:(v=this.rawData,l=this.offset+s.offsetOf(n),t=u(v.slice(l,o)),h=t.readShort_(),y=t.readShort_(),p=t.readShort_(),a=t.readShort_(),c=t.readShort_(),i=r[n]=h==-1?new e(t):new f(t),i.numberOfContours=h,i.xMin=y,i.yMin=p,i.xMax=a,i.yMax=c,i))},render:function(n,t,i){for(var s,o,r=u(),e=[],f=0;f<t.length;++f)s=t[f],o=n[s],e.push(r.offset()),o&&r.write(o.render(i));return e.push(r.offset()),{table:r.get(),offsets:e}}})}(),hi=function(){function n(n,t){this.text=n,this.length=n.length,this.platformID=t.platformID,this.platformSpecificID=t.platformSpecificID,this.languageID=t.languageID,this.nameID=t.nameID}return l({parse:function(t){var o,s,f,r,u,i,e;for(t.offset(this.offset),t.readShort(),o=t.readShort(),s=this.offset+t.readShort(),f=t.times(o,function(){return{platformID:t.readShort(),platformSpecificID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:t.readShort()+s}}),r=this.strings={},u=0;u<f.length;++u)i=f[u],t.offset(i.offset),e=t.readString(i.length),r[i.nameID]||(r[i.nameID]=[]),r[i.nameID].push(new n(e,i));this.postscriptEntry=r[6][0],this.postscriptName=this.postscriptEntry.text.replace(/[^\x20-\x7F]/g,"")},render:function(t){var f,i,o,c,s,r,l=this,e=this.strings,h=0;for(f in e)b(e,f)&&(h+=e[f].length);i=u(),o=u(),i.writeShort(0),i.writeShort(h),i.writeShort(6+12*h);for(f in e)if(b(e,f))for(c=6==f?[new n(t,l.postscriptEntry)]:e[f],s=0;s<c.length;++s)r=c[s],i.writeShort(r.platformID),i.writeShort(r.platformSpecificID),i.writeShort(r.languageID),i.writeShort(r.nameID),i.writeShort(r.length),i.writeShort(o.offset()),o.writeString(r.text);return i.write(o.get()),i.get()}})}(),er=function(){var n=".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent ampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore grave a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis Udieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave ecircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve ocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent sterling section bullet paragraph germandbls registered copyright trademark acute dieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu partialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash questiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft guillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash quotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis fraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered quotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis Egrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute Ucircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla hungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth eth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior onehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla Cacute cacute Ccaron ccaron dcroat".split(/\s+/g);return l({parse:function(n){var t,i,r=this;switch(n.offset(this.offset),this.format=n.readLong(),this.italicAngle=n.readFixed_(),this.underlinePosition=n.readShort_(),this.underlineThickness=n.readShort_(),this.isFixedPitch=n.readLong(),this.minMemType42=n.readLong(),this.maxMemType42=n.readLong(),this.minMemType1=n.readLong(),this.maxMemType1=n.readLong(),this.format){case 131072:for(t=n.readShort(),this.glyphNameIndex=n.times(t,n.readShort),this.names=[],i=this.offset+this.length;n.offset()<i;)r.names.push(n.readString(n.readByte()));break;case 151552:t=n.readShort(),this.offsets=n.read(t);break;case 262144:this.map=n.times(this.file.maxp.numGlyphs,n.readShort)}},glyphFor:function(t){switch(this.format){case 65536:return n[t]||".notdef";case 131072:var i=this.glyphNameIndex[t];return i<n.length?n[i]:this.names[i-n.length]||".notdef";case 151552:case 196608:return".notdef";case 262144:return this.map[t]||65535}},render:function(t){var r,e,f,i,h,o,s,c=this;if(196608==this.format)return this.raw();for(r=u(this.rawData.slice(this.offset,32)),r.writeLong(131072),r.offset(32),e=[],f=[],i=0;i<t.length;++i)h=t[i],o=c.glyphFor(h),s=n.indexOf(o),s>=0?e.push(s):(e.push(n.length+f.length),f.push(o));for(r.writeShort(t.length),i=0;i<e.length;++i)r.writeShort(e[i]);for(i=0;i<f.length;++i)r.writeByte(f[i].length),r.writeString(f[i]);return r.get()}})}(),yt=function(){function t(n,t,i){var r=this;r.platformID=n.readShort(),r.platformSpecificID=n.readShort(),r.offset=t+n.readLong(),n.saveExcursion(function(){var u,t,f,w,p,h,o,b,d,s,k,e,l,y,v,c,a;switch(n.offset(r.offset),r.format=n.readShort()){case 0:for(r.length=n.readShort(),r.language=n.readShort(),t=0;t<256;++t)i[t]=n.readByte();break;case 4:for(r.length=n.readShort(),r.language=n.readShort(),f=n.readShort()/2,n.skip(6),w=n.times(f,n.readShort),n.skip(2),p=n.times(f,n.readShort),h=n.times(f,n.readShort_),o=n.times(f,n.readShort),b=(r.length+r.offset-n.offset())/2,d=n.times(b,n.readShort),t=0;t<f;++t)for(s=p[t],k=w[t],u=s;u<=k;++u)0===o[t]?e=u+h[t]:(l=o[t]/2-(f-t)+(u-s),e=d[l]||0,0!==e&&(e+=h[t])),i[u]=65535&e;break;case 6:for(r.length=n.readShort(),r.language=n.readShort(),u=n.readShort(),y=n.readShort();y-->0;)i[u++]=n.readShort();break;case 12:for(n.readShort(),r.length=n.readLong(),r.language=n.readLong(),v=n.readLong();v-->0;)for(u=n.readLong(),c=n.readLong(),a=n.readLong();u<=c;)i[u++]=a++;break;default:window.console&&window.console.error("Unhandled CMAP format: "+r.format)}})}function n(n,t){function d(i){return t[n[i]]}for(var v,g,b,f,k,y,it,ut,s,h,c,o,tt,w,p,i,rt=ti(n),a=[],l=[],e=null,nt=null,r=0;r<rt.length;++r)v=rt[r],g=d(v),b=g-v,null!=e&&b===nt||(e&&l.push(e),a.push(v),nt=b),e=v;for(e&&l.push(e),l.push(65535),a.push(65535),f=a.length,k=2*f,y=2*Math.pow(2,Math.floor(Math.log(f)/Math.LN2)),it=Math.log(y/2)/Math.LN2,ut=k-y,s=[],h=[],c=[],r=0;r<f;++r){if(o=a[r],tt=l[r],65535==o){s.push(0),h.push(0);break}if(w=d(o),o-w>=32768)for(s.push(0),h.push(2*(c.length+f-r)),p=o;p<=tt;++p)c.push(d(p));else s.push(w-o),h.push(0)}return i=u(),i.writeShort(3),i.writeShort(1),i.writeLong(12),i.writeShort(4),i.writeShort(16+8*f+2*c.length),i.writeShort(0),i.writeShort(k),i.writeShort(y),i.writeShort(it),i.writeShort(ut),l.forEach(i.writeShort),i.writeShort(0),a.forEach(i.writeShort),s.forEach(i.writeShort_),h.forEach(i.writeShort),c.forEach(i.writeShort),i.get()}return l({parse:function(n){var u,i=this,r=i.offset;n.offset(r),i.codeMap={},i.version=n.readShort(),u=n.readShort(),i.tables=n.times(u,function(){return new t(n,r,i.codeMap)})},render:function(t,i){var r=u();return r.writeShort(0),r.writeShort(1),r.write(n(t,i)),r.get()}})}(),ur=l({parse:function(n){n.offset(this.offset),this.version=n.readShort(),this.averageCharWidth=n.readShort_(),this.weightClass=n.readShort(),this.widthClass=n.readShort(),this.type=n.readShort(),this.ySubscriptXSize=n.readShort_(),this.ySubscriptYSize=n.readShort_(),this.ySubscriptXOffset=n.readShort_(),this.ySubscriptYOffset=n.readShort_(),this.ySuperscriptXSize=n.readShort_(),this.ySuperscriptYSize=n.readShort_(),this.ySuperscriptXOffset=n.readShort_(),this.ySuperscriptYOffset=n.readShort_(),this.yStrikeoutSize=n.readShort_(),this.yStrikeoutPosition=n.readShort_(),this.familyClass=n.readShort_(),this.panose=n.times(10,n.readByte),this.charRange=n.times(4,n.readLong),this.vendorID=n.readString(4),this.selection=n.readShort(),this.firstCharIndex=n.readShort(),this.lastCharIndex=n.readShort(),this.version>0&&(this.ascent=n.readShort_(),this.descent=n.readShort_(),this.lineGap=n.readShort_(),this.winAscent=n.readShort(),this.winDescent=n.readShort(),this.codePageRange=n.times(2,n.readLong),this.version>1&&(this.xHeight=n.readShort(),this.capHeight=n.readShort(),this.defaultChar=n.readShort(),this.breakChar=n.readShort(),this.maxContext=n.readShort()))},render:function(){return this.raw()}}),dt=1e5,gi.prototype={use:function(n){var i,r,u,t=this;return"string"==typeof n?ou(n).reduce(function(n,i){return n+String.fromCharCode(t.use(i))},""):(i=t.unicodes[n],i||(i=t.next++,t.subset[i]=n,t.unicodes[n]=i,r=t.font.cmap.codeMap[n],r&&(t.ncid2ogid[i]=r,null==t.ogid2ngid[r]&&(u=t.nextGid++,t.ogid2ngid[r]=u,t.ngid2ogid[u]=r))),i)},encodeText:function(n){return this.use(n)},glyphIds:function(){return ti(this.ogid2ngid)},glyphsFor:function(n,t){var u,r,i,f=this;for(t||(t={}),u=0;u<n.length;++u)r=n[u],t[r]||(i=t[r]=f.font.glyf.glyphFor(r),i&&i.compound&&f.glyphsFor(i.glyphIds,t));return t},render:function(){var t,o,s,i,n,e,u,h,r=this,f=this.glyphsFor(this.glyphIds());for(t in f)b(f,t)&&(t=parseInt(t,10),null==r.ogid2ngid[t]&&(o=r.nextGid++,r.ogid2ngid[t]=o,r.ngid2ogid[o]=t));return s=ti(this.ngid2ogid),i=s.map(function(n){return this.ngid2ogid[n]},this),n=this.font,e=n.glyf.render(f,i,this.ogid2ngid),u=n.loca.render(e.offsets),this.lastChar=this.next-1,h={cmap:yt.render(this.ncid2ogid,this.ogid2ngid),glyf:e.table,loca:u.table,hmtx:n.hmtx.render(i),hhea:n.hhea.render(i),maxp:n.maxp.render(i),post:n.post.render(i),name:n.name.render(this.psName),head:n.head.render(u.format),"OS/2":n.os2.render()},this.font.directory.render(h)},cidToGidMap:function(){for(var r,f,e=this,t=u(),i=0,n=this.firstChar;n<this.next;++n){for(;i<n;)t.writeShort(0),i++;r=e.ncid2ogid[n],r?(f=e.ogid2ngid[r],t.writeShort(f)):t.writeShort(0),i++}return t.get()}},rr.prototype={parse:function(){var n=this.directory=new nr(this.contents);this.head=n.readTable("head",si),this.loca=n.readTable("loca",wi),this.hhea=n.readTable("hhea",pi),this.maxp=n.readTable("maxp",li),this.hmtx=n.readTable("hmtx",oi),this.glyf=n.readTable("glyf",ei),this.name=n.readTable("name",hi),this.post=n.readTable("post",er),this.cmap=n.readTable("cmap",yt),this.os2=n.readTable("OS/2",ur),this.psName=this.name.postscriptName,this.ascent=this.os2.ascent||this.hhea.ascent,this.descent=this.os2.descent||this.hhea.descent,this.lineGap=this.os2.lineGap||this.hhea.lineGap,this.scale=1e3/this.head.unitsPerEm},widthOfGlyph:function(n){return this.hmtx.forGlyph(n).advance*this.scale},makeSubset:function(){return new gi(this)}},hr=n.support.browser,ft="undefined"!=typeof Uint8Array,i="\n",v=0,ct={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],executive:[521.86,756],folio:[612,936],legal:[612,1008],letter:[612,792],tabloid:[792,1224]},ut={"Times-Roman":!0,"Times-Bold":!0,"Times-Italic":!0,"Times-BoldItalic":!0,Helvetica:!0,"Helvetica-Bold":!0,"Helvetica-Oblique":!0,"Helvetica-BoldOblique":!0,Courier:!0,"Courier-Bold":!0,"Courier-Oblique":!0,"Courier-BoldOblique":!0,Symbol:!0,ZapfDingbats:!0},p={},it=lr(pu),st=lr(yu),vt.prototype={loadFonts:it,loadImages:st,getFont:function(n){var t=this.FONTS[n];if(!t){if(t=ut[n],!t)throw Error("Font "+n+" has not been loaded");t=this.attach(t===!0?new or(n):new et(this,t)),this.FONTS[n]=t}return t},getImage:function(n){var t=this.IMAGES[n];if(!t){if(t=p[n],!t)throw Error("Image "+n+" has not been loaded");if("TAINTED"===t)return null;t=this.IMAGES[n]=this.attach(t.asStream(this))}return t},getOpacityGS:function(n,i){var o,u,f,e=parseFloat(n).toFixed(3);return n=parseFloat(e),e+=i?"S":"F",o=this._opacityGSCache||(this._opacityGSCache={}),u=o[e],u||(f={Type:t("ExtGState")},i?f.CA=n:f.ca=n,u=this.attach(new r(f)),u._resourceName=t("GS"+ ++v),o[e]=u),u},dict:function(n){return new r(n)},name:function(n){return t(n)},stream:function(n,t){return new c(t,n)}},ui=Array.isArray||function(n){return n instanceof Array},ii.prototype.beforeRender=function(){},e=s(function(n){this.value=n},{render:function(n){for(var r="",i=this.value,t=0;t<i.length;++t)r+=String.fromCharCode(255&i.charCodeAt(t));n("(",r.replace(/([\(\)\\])/g,"\\$1"),")")},toString:function(){return this.value}}),tr=s(function(n){this.value=n},{render:function(n){var t,i=this;for(n("<"),t=0;t<this.value.length;++t)n(h(i.value.charCodeAt(t).toString(16),4));n(">")}},e),fi=s(function(n){this.name=n},{render:function(n){n("/"+this.escape())},escape:function(){return this.name.replace(/[^\x21-\x7E]/g,function(n){return"#"+h(n.charCodeAt(0).toString(16),2)})},toString:function(){return this.name}}),rt={},fi.get=t,r=s(function(n){this.props=n},{render:function(n){var i=this.props,r=!0;n("<<"),n.withIndent(function(){for(var u in i)tt(i,u)&&!/^_/.test(u)&&(r=!1,n.indent(t(u)," ",i[u]))}),r||n.indent(),n(">>")}}),c=s(function(n,t,i){if("string"==typeof n){var r=u();r.write(n),n=r}this.data=n,this.props=t||{},this.compress=i},{render:function(n){var f=this.data.get(),u=this.props;this.compress&&window.pako&&"function"==typeof window.pako.deflate&&(u.Filter?u.Filter instanceof Array||(u.Filter=[u.Filter]):u.Filter=[],u.Filter.unshift(t("FlateDecode")),f=window.pako.deflate(f)),u.Length=f.length,n(new r(u)," stream",i),n.writeData(f),n(i,"endstream")}}),ir=s(function(n){n=this.props=n||{},n.Type=t("Catalog")},{setPages:function(n){this.props.Pages=n}},r),ki=s(function(){this.props={Type:t("Pages"),Kids:[],Count:0}},{addPage:function(n){this.props.Kids.push(n),this.props.Count++}},r),di=[192,193,194,195,197,198,199,201,202,203,205,206,207],or=s(function(n){this.props={Type:t("Font"),Subtype:t("Type1"),BaseFont:t(n)},this._resourceName=t("F"+ ++v)},{encodeText:function(n){return new e(n+"")}},r),et=s(function(n,i,r){var f,u;r=this.props=r||{},r.Type=t("Font"),r.Subtype=t("Type0"),r.Encoding=t("Identity-H"),this._pdf=n,this._font=i,this._sub=i.makeSubset(),this._resourceName=t("F"+ ++v),f=i.head,this.name=i.psName,u=this.scale=i.scale,this.bbox=[f.xMin*u,f.yMin*u,f.xMax*u,f.yMax*u],this.italicAngle=i.post.italicAngle,this.ascent=i.ascent*u,this.descent=i.descent*u,this.lineGap=i.lineGap*u,this.capHeight=i.os2.capHeight||this.ascent,this.xHeight=i.os2.xHeight||0,this.stemV=0,this.familyClass=(i.os2.familyClass||0)>>8,this.isSerif=this.familyClass>=1&&this.familyClass<=7,this.isScript=10==this.familyClass,this.flags=(i.post.isFixedPitch?1:0)|(this.isSerif?2:0)|(this.isScript?8:0)|(0!==this.italicAngle?64:0)|32},{encodeText:function(n){return new tr(this._sub.encodeText(n+""))},getTextWidth:function(n,t){for(var u,e=this,r=0,f=this._font.cmap.codeMap,i=0;i<t.length;++i)u=f[t.charCodeAt(i)],r+=e._font.widthOfGlyph(u||0);return r*n/1e3},beforeRender:function(){var p,f,v,s,n=this,i=n._sub,y=i.render(),k=new c(u(y),{Length1:y.length},!0),w=n._pdf.attach(new r({Type:t("FontDescriptor"),FontName:t(n._sub.psName),FontBBox:n.bbox,Flags:n.flags,StemV:n.stemV,ItalicAngle:n.italicAngle,Ascent:n.ascent,Descent:n.descent,CapHeight:n.capHeight,XHeight:n.xHeight,FontFile2:n._pdf.attach(k)})),b=i.ncid2ogid,h=i.firstChar,o=i.lastChar,a=[];!function l(t,i){if(t<=o){var r=b[t];null==r?l(t+1):(i||a.push(t,i=[]),i.push(n._font.widthOfGlyph(r)),l(t+1,i))}}(h),p=new r({Type:t("Font"),Subtype:t("CIDFontType2"),BaseFont:t(n._sub.psName),CIDSystemInfo:new r({Registry:new e("Adobe"),Ordering:new e("Identity"),Supplement:0}),FontDescriptor:w,FirstChar:h,LastChar:o,DW:Math.round(n._font.widthOfGlyph(0)),W:a,CIDToGIDMap:n._pdf.attach(n._makeCidToGidMap())}),f=n.props,f.BaseFont=t(n._sub.psName),f.DescendantFonts=[n._pdf.attach(p)],v=new sr(h,o,i.subset),s=new c(gt(),null,!0),s.data(v),f.ToUnicode=n._pdf.attach(s)},_makeCidToGidMap:function(){return new c(u(this._sub.cidToGidMap()),null,!0)}},r),sr=s(function(n,t,i){this.firstChar=n,this.lastChar=t,this.map=i},{render:function(n){n.indent("/CIDInit /ProcSet findresource begin"),n.indent("12 dict begin"),n.indent("begincmap"),n.indent("/CIDSystemInfo <<"),n.indent("  /Registry (Adobe)"),n.indent("  /Ordering (UCS)"),n.indent("  /Supplement 0"),n.indent(">> def"),n.indent("/CMapName /Adobe-Identity-UCS def"),n.indent("/CMapType 2 def"),n.indent("1 begincodespacerange"),n.indent("  <0000><ffff>"),n.indent("endcodespacerange");var t=this;n.indent(t.lastChar-t.firstChar+1," beginbfchar"),n.withIndent(function(){for(var f,u,r,i=t.firstChar;i<=t.lastChar;++i){for(f=t.map[i],u=au([f]),n.indent("<",h(i.toString(16),4),">","<"),r=0;r<u.length;++r)n(h(u.charCodeAt(r).toString(16),4));n(">")}}),n.indent("endbfchar"),n.indent("endcmap"),n.indent("CMapName currentdict /CMap defineresource pop"),n.indent("end"),n.indent("end")}}),fr=s(function(n,i){this._pdf=n,this._rcount=0,this._textMode=!1,this._fontResources={},this._gsResources={},this._xResources={},this._patResources={},this._shResources={},this._opacity=1,this._matrix=[1,0,0,1,0,0],this._annotations=[],this._font=null,this._fontSize=null,this._contextStack=[],i=this.props=i||{},i.Type=t("Page"),i.ProcSet=[t("PDF"),t("Text"),t("ImageB"),t("ImageC"),t("ImageI")],i.Resources=new r({Font:new r(this._fontResources),ExtGState:new r(this._gsResources),XObject:new r(this._xResources),Pattern:new r(this._patResources),Shading:new r(this._shResources)}),i.Annots=this._annotations},{_out:function(){this._content.data.apply(null,arguments)},transform:function(n,t,r,u,f,e){sf(arguments)||(this._matrix=cf(arguments,this._matrix),this._out(n," ",t," ",r," ",u," ",f," ",e," cm"),this._out(i))},translate:function(n,t){this.transform(1,0,0,1,n,t)},scale:function(n,t){this.transform(n,0,0,t,0,0)},rotate:function(n){var i=Math.cos(n),t=Math.sin(n);this.transform(i,t,-t,i,0,0)},beginText:function(){this._textMode=!0,this._out("BT",i)},endText:function(){this._textMode=!1,this._out("ET",i)},_requireTextMode:function(){if(!this._textMode)throw Error("Text mode required; call page.beginText() first");},_requireFont:function(){if(!this._font)throw Error("No font selected; call page.setFont() first");},setFont:function(n,t){this._requireTextMode(),null==n?n=this._font:n instanceof et||(n=this._pdf.getFont(n)),null==t&&(t=this._fontSize),this._fontResources[n._resourceName]=n,this._font=n,this._fontSize=t,this._out(n._resourceName," ",t," Tf",i)},setTextLeading:function(n){this._requireTextMode(),this._out(n," TL",i)},setTextRenderingMode:function(n){this._requireTextMode(),this._out(n," Tr",i)},showText:function(n,t){var u,r;this._requireFont(),n.length>1&&t&&this._font instanceof et&&(u=this._font.getTextWidth(this._fontSize,n),r=t/u*100,this._out(r," Tz ")),this._out(this._font.encodeText(n)," Tj",i)},showTextNL:function(n){this._requireFont(),this._out(this._font.encodeText(n)," '",i)},addLink:function(n,i){var f=this._toPage({x:i.left,y:i.bottom}),u=this._toPage({x:i.right,y:i.top});this._annotations.push(new r({Type:t("Annot"),Subtype:t("Link"),Rect:[f.x,f.y,u.x,u.y],Border:[0,0,0],A:new r({Type:t("Action"),S:t("URI"),URI:new e(n)})}))},setStrokeColor:function(n,t,r){this._out(n," ",t," ",r," RG",i)},setOpacity:function(n){this.setFillOpacity(n),this.setStrokeOpacity(n),this._opacity*=n},setStrokeOpacity:function(n){if(n<1){var t=this._pdf.getOpacityGS(this._opacity*n,!0);this._gsResources[t._resourceName]=t,this._out(t._resourceName," gs",i)}},setFillColor:function(n,t,r){this._out(n," ",t," ",r," rg",i)},setFillOpacity:function(n){if(n<1){var t=this._pdf.getOpacityGS(this._opacity*n,!1);this._gsResources[t._resourceName]=t,this._out(t._resourceName," gs",i)}},gradient:function(n,t){var r,f,u;this.save(),this.rect(t.left,t.top,t.width,t.height),this.clip(),n.userSpace||this.transform(t.width,0,0,t.height,t.left,t.top),r=ru(this._pdf,n,t),f=r.shading._resourceName,this._shResources[f]=r.shading,r.hasAlpha&&(u=r.opacity._resourceName,this._gsResources[u]=r.opacity,this._out("/"+u+" gs ")),this._out("/"+f+" sh",i),this.restore()},setDashPattern:function(n,t){this._out(n," ",t," d",i)},setLineWidth:function(n){this._out(n," w",i)},setLineCap:function(n){this._out(n," J",i)},setLineJoin:function(n){this._out(n," j",i)},setMitterLimit:function(n){this._out(n," M",i)},save:function(){this._contextStack.push(this._context()),this._out("q",i)},restore:function(){this._out("Q",i),this._context(this._contextStack.pop())},moveTo:function(n,t){this._out(n," ",t," m",i)},lineTo:function(n,t){this._out(n," ",t," l",i)},bezier:function(n,t,r,u,f,e){this._out(n," ",t," ",r," ",u," ",f," ",e," c",i)},bezier1:function(n,t,r,u){this._out(n," ",t," ",r," ",u," y",i)},bezier2:function(n,t,r,u){this._out(n," ",t," ",r," ",u," v",i)},close:function(){this._out("h",i)},rect:function(n,t,r,u){this._out(n," ",t," ",r," ",u," re",i)},ellipse:function(n,t,i,r){function f(t){return n+t}function u(n){return t+n}var e=.55228474983079356;this.moveTo(f(0),u(r)),this.bezier(f(i*e),u(r),f(i),u(r*e),f(i),u(0)),this.bezier(f(i),u(-r*e),f(i*e),u(-r),f(0),u(-r)),this.bezier(f(-i*e),u(-r),f(-i),u(-r*e),f(-i),u(0)),this.bezier(f(-i),u(r*e),f(-i*e),u(r),f(0),u(r))},circle:function(n,t,i){this.ellipse(n,t,i,i)},stroke:function(){this._out("S",i)},nop:function(){this._out("n",i)},clip:function(){this._out("W n",i)},clipStroke:function(){this._out("W S",i)},closeStroke:function(){this._out("s",i)},fill:function(){this._out("f",i)},fillStroke:function(){this._out("B",i)},drawImage:function(n){var t=this._pdf.getImage(n);t&&(this._xResources[t._resourceName]=t,this._out(t._resourceName," Do",i))},comment:function(n){var t=this;n.split(/\r?\n/g).forEach(function(n){t._out("% ",n,i)})},_context:function(n){return null==n?{opacity:this._opacity,matrix:this._matrix}:(this._opacity=n.opacity,void(this._matrix=n.matrix))},_toPage:function(n){var t=this._matrix,f=t[0],e=t[1],o=t[2],i=t[3],r=t[4],u=t[5];return{x:f*n.x+o*n.y+r,y:e*n.x+i*n.y+u}}},r),f={serif:"Times-Roman","serif|bold":"Times-Bold","serif|italic":"Times-Italic","serif|bold|italic":"Times-BoldItalic","sans-serif":"Helvetica","sans-serif|bold":"Helvetica-Bold","sans-serif|italic":"Helvetica-Oblique","sans-serif|bold|italic":"Helvetica-BoldOblique",monospace:"Courier","monospace|bold":"Courier-Bold","monospace|italic":"Courier-Oblique","monospace|bold|italic":"Courier-BoldOblique",zapfdingbats:"ZapfDingbats","zapfdingbats|bold":"ZapfDingbats","zapfdingbats|italic":"ZapfDingbats","zapfdingbats|bold|italic":"ZapfDingbats"},a("Times New Roman","serif"),a("Courier New","monospace"),a("Arial","sans-serif"),a("Helvetica","sans-serif"),a("Verdana","sans-serif"),a("Tahoma","sans-serif"),a("Georgia","sans-serif"),a("Monaco","monospace"),a("Andale Mono","monospace"),ri={fill:0,stroke:1,fillAndStroke:2,invisible:3,fillAndClip:4,strokeAndClip:5,fillStrokeClip:6,clip:7},ot=ri,ci={dash:[4],dashDot:[4,2,1,2],dot:[1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2],solid:[]},ai={butt:0,round:1,square:2},dr={miter:0,round:1,bevel:2},n.deepExtend(n.pdf,{Document:vt,BinaryStream:u,defineFont:kr,parseFontDef:at,getFontURL:lt,loadFonts:it,loadImages:st,getPaperOptions:vi,TEXT_RENDERING_MODE:ri,exportPDF:tf,saveAs:ef,toDataURL:kt,toBlob:vr,render:ht}),n.drawing.exportPDF=n.pdf.exportPDF,n.drawing.pdf=n.pdf}(kendo),kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("pdf/mixins.min",["pdf/core.min"],n)}(function(){return function(n){kendo.PDFMixin={extend:function(n){n.events.push("pdfExport"),n.options.pdf=this.options,n.saveAsPDF=this.saveAsPDF,n._drawPDF=this._drawPDF,n._drawPDFShadow=this._drawPDFShadow},options:{fileName:"Export.pdf",proxyURL:"",paperSize:"auto",allPages:!1,landscape:!1,margin:null,title:null,author:null,subject:null,keywords:null,creator:"Kendo UI PDF Generator v."+kendo.version,date:null},saveAsPDF:function(){var t,i=new n.Deferred,r=i.promise(),u={promise:r};if(!this.trigger("pdfExport",u))return t=this.options.pdf,t.multiPage=t.multiPage||t.allPages,this._drawPDF(i).then(function(n){return kendo.drawing.exportPDF(n,t)}).done(function(n){kendo.saveAs({dataURI:n,fileName:t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy,proxyTarget:t.proxyTarget}),i.resolve()}).fail(function(n){i.reject(n)}),r},_drawPDF:function(t){var i=new n.Deferred;return kendo.drawing.drawDOM(this.wrapper).done(function(n){var r={page:n,pageNumber:1,progress:1,totalPages:1};t.notify(r),i.resolve(r.page)}).fail(function(n){i.reject(n)}),i},_drawPDFShadow:function(t,i){var f,u,r;return t=t||{},f=this.wrapper,u=n("<div class='k-pdf-export-shadow'>"),t.width&&u.css({width:t.width,overflow:"visible"}),f.before(u),u.append(t.content||f.clone(!0,!0)),r=n.Deferred(),setTimeout(function(){var n=kendo.drawing.drawDOM(u,i);n.always(function(){u.remove()}).then(function(){r.resolve.apply(r,arguments)}).fail(function(){r.reject.apply(r,arguments)}).progress(function(){r.progress.apply(r,arguments)})},15),r.promise()}}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.pdf.min",["kendo.core.min","kendo.drawing.min","pdf/core.min","pdf/mixins.min"],n)}(function(){},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.grid.min",["kendo.data.min","kendo.columnsorter.min","kendo.editable.min","kendo.window.min","kendo.filtermenu.min","kendo.columnmenu.min","kendo.groupable.min","kendo.pager.min","kendo.selectable.min","kendo.sortable.min","kendo.reorderable.min","kendo.resizable.min","kendo.mobile.actionsheet.min","kendo.mobile.pane.min","kendo.ooxml.min","kendo.excel.min","kendo.progressbar.min","kendo.pdf.min"],n)}(function(){return function(n,t){function wi(n){return Array(n+1).join('<td class="k-group-cell">&nbsp;</td>')}function ui(n){var t,i=" ";if(n){if(typeof n===v)return n;for(t in n)i+=t+'="'+n[t]+'"'}return i}function ki(t,i){n("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",i)}function vt(t,i,r,u,f){var e,o=i;for(i=n(),f=f||1,e=0;e<f;e++)i=i.add(t.eq(o+e));"number"==typeof r?i[u?"insertBefore":"insertAfter"](t.eq(r)):i.appendTo(r)}function rt(t,i,r){return n(t).add(i).find(r)}function ce(n,t,i){var f,s,u,o;for(i=yt(i)?i:[i],f=0,s=i.length;f<s;f++)u=i[f],c(u)&&u.click&&(o=u.name||u.text,t.on(a+r,"a.k-grid-"+(o||"").replace(/\s/g,""),{commandName:o},e(u.click,n)))}function tf(n,t,r){return si(n,function(n){var u,e;return n=typeof n===v?{field:n}:n,ot(n)&&!r||(n.attributes=ai(n.attributes),n.footerAttributes=ai(n.footerAttributes),n.headerAttributes=ai(n.headerAttributes),u=!0),n.columns&&(n.columns=tf(n.columns,t,u)),e=i.guid(),n.headerAttributes=f({id:e},n.headerAttributes),f({encoded:t,hidden:u},n)})}function sr(n,t){var i=[];return gi(n,t,i),i[i.length-1]}function gi(n,t,i){var r,u;for(i=i||[],r=0;r<t.length;r++){if(n===t[r])return!0;if(t[r].columns){if(u=i.length,i.push(t[r]),gi(n,t[r].columns,i))return!0;i.splice(u,i.length-u)}}return!1}function fi(n,t){var i=t?he:ai;n.hidden=!t,n.attributes=i(n.attributes),n.footerAttributes=i(n.footerAttributes),n.headerAttributes=i(n.headerAttributes)}function tr(){return"none"!==this.style.display}function ot(n){return b([n]).length>0}function b(n){return l(n,function(n){var t=!n.hidden;return t&&n.columns&&(t=b(n.columns).length>0),t})}function ne(t){return n(t).map(function(){return this.toArray()})}function df(n,t,i){var u=ri(s(t)),r=ri(ht(t)),f=n.rowSpan;n.rowSpan=i?u>r?f-(u-r)||1:f+(r-u):u>r?f+(u-r):f-(r-u)||1}function uf(t,i,r,u,f,e,o){var l,c,s=ri(t),h=ri([i]);s>h&&(l=Array(o+1).join('<th class="k-group-cell k-header" scope="col">&nbsp;</th>'),c=e.children(":not(.k-filter-row)"),n(Array(s-h+1).join("<tr>"+l+"</tr>")).insertAfter(c.last())),re(e,s-h),yu(r,u,f,e)}function ef(t,r,f){var e,l,a,s,v,h,o,c;for(f=f||0,a=r,r=u(r),s={},v=t.find(">tr:not(.k-filter-row)"),h=function(){var t=n(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},o=0,c=r.length;o<c;o++)e=gt(r[o],a),s[e.row]||(s[e.row]=v.eq(e.row).find(".k-header").filter(h)),l=s[e.row].eq(e.cell),l.attr(i.attr("index"),f+o);return r.length}function ri(n){for(var r,u=1,i=0,t=0;t<n.length;t++)n[t].columns&&(r=ri(n[t].columns),r>i&&(i=r));return u+i}function yu(t,i,r,u){for(var e,s=di(t[0],i),c=r.find(">tr:not(.k-filter-row):eq("+s.row+")>th.k-header"),o=n(),h=s.cell,f=0;f<t.length;f++)o=o.add(c.eq(h+f));for(u.find(">tr:not(.k-filter-row)").eq(s.row).append(o),e=[],f=0;f<t.length;f++)t[f].columns&&(e=e.concat(t[f].columns));e.length&&yu(e,i,r,u)}function gt(n,t,i,r){var f,u;for(i=i||0,r=r||{},r[i]=r[i]||0,u=0;u<t.length;u++){if(t[u]==n){f={cell:r[i],row:i};break}if(t[u].columns&&(f=gt(n,t[u].columns,i+1,r)))break;r[i]++}return f}function we(n,t,i,r){var u,f=i.locked;do u=n[t],t+=r?1:-1;while(u&&t>-1&&t<n.length&&u!=i&&!u.columns&&u.locked==f);return u}function hu(n,t,i,r){var e,f,u,o;return t.columns?(t=t.columns,t[r?0:t.length-1]):(e=sr(t,n),f=e?e.columns:n,u=h(t,f),0===u&&r?u++:u!=f.length-1||r?(u>0||0===u&&!r)&&(u+=r?-1:1):u--,o=h(i,f),t=we(f,u,i,o>u),t&&t!=i&&t.columns?hu(n,t,i,r):null)}function di(n,t,i,r){var f,u;for(i=i||0,r=r||{},r[i]=r[i]||0,u=0;u<t.length;u++){if(t[u]==n){f={cell:r[i],row:i};break}if(t[u].columns&&(f=di(n,t[u].columns,i+1,r)))break;t[u].hidden||r[i]++}return f}function kr(n){var t=et(s(n));return t.concat(et(ht(n)))}function et(n){for(var r=[],i=[],t=0;t<n.length;t++)r.push(n[t]),n[t].columns&&(i=i.concat(n[t].columns));return i.length&&(r=r.concat(et(i))),r}function dt(n){for(var i,r=0,t=0;t<n.length;t++)i=n[t],i.columns?r+=dt(i.columns):i.hidden&&r++;return r}function vu(n){for(var i,r=0,t=0,u=n.length;t<u;t++)i=n[t].style.width,i&&i.indexOf("%")==-1&&(r+=parseInt(i,10));return r}function te(n,t){for(var u,r=n.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)"),i=0;i<r.length;i++)u=r[i].rowSpan,u>1&&(r[i].rowSpan=u-t||1)}function re(n,t){for(var r=n.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)"),i=0;i<r.length;i++)r[i].rowSpan+=t}function pr(t){for(var u=t.find("tr:not(.k-filter-row)"),f=u.filter(function(){return!n(this).children().length}).remove().length,r=u.find("th:not(.k-group-cell,.k-hierarchy-cell)"),i=0;i<r.length;i++)r[i].rowSpan>1&&(r[i].rowSpan-=f);return u.length-f}function yi(n,t,i,r,u){for(var o,e=[],f=0,s=n.length;f<s;f++)o=i[r]||[],o.push(t.eq(u+f)),i[r]=o,n[f].columns&&(e=e.concat(n[f].columns));e.length&&yi(e,t,i,r+1,u+n.length)}function s(n){return l(n,function(n){return n.locked})}function ht(n){return l(n,function(n){return!n.locked})}function cu(n){return l(n,function(n){return!n.locked&&ot(n)})}function yr(n){return l(n,function(n){return n.locked&&ot(n)})}function tt(n){for(var i=[],t=0;t<n.length;t++)n[t].hidden||(n[t].columns?i=i.concat(tt(n[t].columns)):i.push(n[t]));return i}function u(n){for(var i=[],t=0;t<n.length;t++)n[t].columns?i=i.concat(u(n[t].columns)):i.push(n[t]);return i}function g(r){var e,f=r.find(">tr:not(.k-filter-row)"),o=function(){var t=n(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},u=n();return f.length>1&&(u=f.find("th").filter(o).filter(function(){return this.rowSpan>1})),u=u.add(f.last().find("th").filter(o)),e=i.attr("index"),u.sort(function(i,r){var f,u;return i=n(i),r=n(r),f=i.attr(e),u=r.attr(e),f===t&&(f=n(i).index()),u===t&&(u=n(r).index()),f=parseInt(f,10),u=parseInt(u,10),f>u?1:f<u?-1:0}),u}function ku(t){var a,e,r,u,s,i,f,v=t.closest("table"),o=n().add(t),l=t.closest("tr"),h=v.find("tr:not(.k-filter-row)"),c=h.index(l);if(c>0){for(a=h.eq(c-1),e=a.find("th:not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return!n(this).attr("rowspan")}),r=0,u=l.find("th:not(.k-group-cell,.k-hierarchy-cell)").index(t),s=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return this.colSpan>1}),i=0;i<s.length;i++)r+=s[i].colSpan||1;for(u+=Math.max(r-1,0),r=0,i=0;i<e.length;i++)if(f=e.eq(i),r+=f.attr("colSpan")?f[0].colSpan:1,u>=i&&u<r){o=ku(f).add(o);break}}return o}function li(t){var u,f,r,h,v,c,e,y=t.closest("thead"),o=n().add(t),a=t.closest("tr"),l=y.find("tr:not(.k-filter-row)"),p=l.index(a)+t[0].rowSpan,s=i.attr("colspan");if(p<=l.length-1){for(u=a.next(),f=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)"),f=f.filter(function(){return!this.rowSpan||1===this.rowSpan}),h=0,r=0;r<f.length;r++)h+=parseInt(f.eq(r).attr(s),10)||1;for(v=u.find("th:not(.k-group-cell,.k-hierarchy-cell)"),c=parseInt(t.attr(s),10)||1,r=0;r<c;)u=v.eq(r+h),o=o.add(li(u)),e=parseInt(u.attr(s),10),e>1&&(c-=e-1),r++}return o}function du(t,i,r,u){var f,e=t;return u&&t.empty(),ue?t[0].innerHTML=r:(f=document.createElement("div"),f.innerHTML="<table><tbody>"+r+"</tbody></table>",t=f.firstChild.firstChild,i[0].replaceChild(t,e[0]),t=n(t)),t}function ai(n){n=n||{};var t=n.style;return t?(t=t.replace(/((.*)?display)(.*)?:([^;]*)/i,"$1:none"),t===n.style&&(t=t.replace(/(.*)?/i,"display:none;$1"))):t="display:none",f({},n,{style:t})}function he(n){n=n||{};var t=n.style;return t&&(n.style=t.replace(/(display\s*:\s*none\s*;?)*/gi,"")),n}function wt(t,r,u,f){var s,e=t.find(">colgroup"),h=si(r,function(n){return s=n.width,s&&0!==parseInt(s,10)?i.format('<col style="width:{0}"/>',typeof s===v?s:s+"px"):"<col />"});(u||e.find(".k-hierarchy-col").length)&&h.splice(0,0,'<col class="k-hierarchy-col" />'),e.length&&e.remove(),e=n(Array(f+1).join('<col class="k-group-col">')+h.join("")),e.is("colgroup")||(e=n("<colgroup/>").append(e)),t.prepend(e),o.msie&&8==o.version&&(t.css("display","inline-table"),window.setTimeout(function(){t.css("display","")},1))}function se(n,t){for(var f=0,r=n.find("th:not(.k-group-cell)"),i=0,u=t.length;i<u;i++)t[i].locked&&(r.eq(i).insertBefore(r.eq(f)),r=n.find("th:not(.k-group-cell)"),f++)}function nu(n){for(var i,r={},t=0,u=n.length;t<u;t++)i=n[t],r[i.value]=i.text;return r}function le(n,t,r,u){var e=r&&r.length&&c(r[0])&&"value"in r[0],f=e?nu(r)[n]:n;return f=null!=f?f:"",t?i.format(t,f):u===!1?f:i.htmlEncode(f)}function ct(n,t,i){for(var u,f=0,r=n[f];r;){if(u=!!i||"none"!==r.style.display,u&&!kf.test(r.className)&&--t<0){r.style.display=i?"":"none";break}r=n[++f]}}function ru(t,i){for(var r,u,f=0,e=t.length;f<e;f+=1)u=t.eq(f),u.is(".k-grouping-row,.k-detail-row")?(r=u.children(":not(.k-group-cell):first,.k-detail-cell").last(),r.attr("colspan",parseInt(r.attr("colspan"),10)-1)):(u.hasClass("k-grid-edit-row")&&(r=u.children(".k-edit-container")[0])&&(r=n(r),r.attr("colspan",parseInt(r.attr("colspan"),10)-1),r.find("col").eq(i).remove(),u=r.find("tr:first")),ct(u[0].cells,i,!1))}function tu(n){for(var t,i=[],r=0;r<n.length&&(t=n[r],"field"in t&&"value"in t&&"items"in t);r++)i.push(t),t.hasSubgroups&&(i=i.concat(tu(t.items)));return i}function fu(n){for(var t,i=[],r=0;r<n.length&&(t=n[r],"field"in t&&"value"in t&&"items"in t);r++)t.hasSubgroups&&(i=i.concat(fu(t.items))),i.push(t.aggregates);return i}function lf(t,i){for(var r,u,o,f=0,e=t.length;f<e;f+=1)u=t.eq(f),u.is(".k-grouping-row,.k-detail-row")?(r=u.children(":not(.k-group-cell):first,.k-detail-cell").last(),r.attr("colspan",parseInt(r.attr("colspan"),10)+1)):(u.hasClass("k-grid-edit-row")&&(r=u.children(".k-edit-container")[0])&&(r=n(r),r.attr("colspan",parseInt(r.attr("colspan"),10)+1),wt(r.find(">form>table"),b(o),!1,0),u=r.find("tr:first")),ct(u[0].cells,i,!0))}function wf(n,t,i){i=i||1;for(var r,u=0,f=n.length;u<f;u++)r=n.eq(u).children().last(),r.attr("colspan",parseInt(r.attr("colspan"),10)+i),r=t.eq(u).children().last(),r.attr("colspan",parseInt(r.attr("colspan"),10)-i)}function hf(n){for(var r=0,i=n.find(">colgroup>col"),t=0,u=i.length;t<u;t+=1)r+=parseInt(i[t].style.width,10);return r}function ae(n,t){var u,r,i,f;n=n[0],t=t[0],n.rows.length!==t.rows.length&&(u=n.offsetHeight,r=t.offsetHeight,u>r?(i=t.rows[t.rows.length-1],lu.test(i.className)&&(i=t.rows[t.rows.length-2]),f=u-r):(i=n.rows[n.rows.length-1],lu.test(i.className)&&(i=n.rows[n.rows.length-2]),f=r-u),i.style.height=i.offsetHeight+f+"px")}function ei(n,t){var i,u=n.offsetHeight,r=t.offsetHeight;u>r?i=u+"px":u<r&&(i=r+"px"),i&&(n.style.height=t.style.height=i)}function br(n,t){var r,u,i;if(typeof n===v&&n===t||c(n)&&n.name===t)return n;if(yt(n))for(r=0,u=n.length;r<u;r++)if(i=n[r],typeof i===v&&i===t||i.name===t)return i;return null}function y(t,i){var u,r,f=o.msie||o.edge;if(i===!0){if(t=n(t),u=t.parent().scrollTop(),r=t.parent().scrollLeft(),f)try{t[0].setActive()}catch(e){t[0].focus()}else t[0].focus();t.parent().scrollTop(u).scrollLeft(r)}else n(t).one("focusin",function(n){n.preventDefault()}).focus()}function wr(n,t){return!!n.field&&!(t.editable&&!t.editable(n.field))&&!(n.editable&&!n.editable(t))}function gu(t){return n(t).is(":button,a,:input,a>.k-icon,textarea,span.k-select,span.k-icon,span.k-link,.k-input,.k-multiselect-wrap,.k-tool-icon")}function nf(r){var f=n(r.currentTarget),s=f.is("th"),o=this.table.add(this.lockedTable),h=this.thead.parent().add(n(">table",this.lockedHeader)),e=gu(r.target),u=f.closest("table")[0];if(!i.support.touch)return e&&f.find(i.roleSelector("filtercell")).length?(this._setCurrent(f),t):(u!==o[0]&&u!==o[1]&&u!==h[0]&&u!==h[1]||n(r.target).is("a.k-i-expand, a.k-i-collapse")||(this.options.navigatable&&this._setCurrent(f),!s&&e||setTimeout(function(){ie&&n(i._activeElement()).hasClass("k-widget")||gu(i._activeElement())||y(u,!0)}),s&&r.preventDefault()),t)}function ve(n){return n&&(n.hasClass("k-edit-cell")||n.parent().hasClass("k-grid-edit-row"))}function of(n,t,i){return'<tr role="row" class="k-grouping-row">'+wi(t)+'<td colspan="'+n+'" aria-expanded="true"><p class="k-reset"><a class="k-icon k-i-collapse" href="#" tabindex="-1" '+oi+'="'+er+'"></a>'+i+"</p></td></tr>"}function be(n){return'<tr role="row" class="k-grouping-row"><td colspan="'+n+'" aria-expanded="true"><p class="k-reset">&nbsp;</p></td></tr>'}var i=window.kendo,ut=i.ui,ff=i.data.DataSource,ue=i.support.tbodyInnerHtml,at=i._activeElement,ti=ut.Widget,nt=i._outerWidth,st=i._outerHeight,w=i.keys,c=n.isPlainObject,f=n.extend,si=n.map,l=n.grep,yt=n.isArray,h=n.inArray,sf=Array.prototype.push,e=n.proxy,ee=i.isFunction,ou=n.isEmptyObject,lt=Math,cr="progress",hr="error",p=":not(.k-group-cell):not(.k-hierarchy-cell):visible",oe="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",ft="tr:not(.k-footer-template):visible",bt=":not(.k-group-cell):not(.k-hierarchy-cell):visible",rf=ft+":first>"+bt+":first",vr="th.k-header:not(.k-group-cell):not(.k-hierarchy-cell)",r=".kendoGrid",bi="edit",pi="beforeEdit",ar="save",bf="remove",lr="detailInit",cf="filterMenuInit",vf="columnMenuInit",af="filterMenuOpen",pf="columnMenuOpen",iu="cellClose",d="change",ur="columnHide",rr="columnShow",uu="saveChanges",nr="dataBound",yf="detailExpand",eu="detailCollapse",ci="k-state-focused",gr="k-state-selected",dr="k-grid-norecords",ir="columnResize",su="columnReorder",wu="columnLock",pu="columnUnlock",bu="navigate",a="click",fr="height",hi="tabIndex",pt="function",v="string",ke="Are you sure you want to delete this record?",de="No records available.",ye="Delete",pe="Cancel",er="Collapse",or="Expand",oi="aria-label",gf=/(\}|\#)/gi,ii=/#/gi,vi="[\\x20\\t\\r\\n\\f]",kf=RegExp("(^|"+vi+")(k-group-cell|k-hierarchy-cell)("+vi+"|$)"),lu=RegExp("(^|"+vi+")(k-filter-row)("+vi+"|$)"),fe='<a role="button" class="k-button k-button-icontext #=className#" #=attr# href="\\#"><span class="#=iconClass# #=imageClass#"></span>#=text#</a>',it=!1,o=i.support.browser,ni=o.msie&&7==o.version,ie=o.msie&&8==o.version,au=ti.extend({init:function(n,t){var i=this;ti.fn.init.call(i,n,t),i._refreshHandler=e(i.refresh,i),i.setDataSource(t.dataSource),i.wrap()},setDataSource:function(n){var t=this;t.dataSource&&t.dataSource.unbind(d,t._refreshHandler),t.dataSource=n,t.dataSource.bind(d,t._refreshHandler)},options:{name:"VirtualScrollable",itemHeight:n.noop,prefetch:!0},destroy:function(){var n=this;ti.fn.destroy.call(n),n.dataSource.unbind(d,n._refreshHandler),n.wrapper.add(n.verticalScrollbar).off(r),n.drag&&(n.drag.destroy(),n.drag=null),n.wrapper=n.element=n.verticalScrollbar=null,n._refreshHandler=null},wrap:function(){var f,t=this,o=i.support.scrollbar()+1,u=t.element;u.css({width:"auto",overflow:"hidden"}).css(it?"padding-left":"padding-right",o),t.content=u.children().first(),f=t.wrapper=t.content.wrap('<div class="k-virtual-scrollable-wrap"/>').parent().bind("DOMMouseScroll"+r+" mousewheel"+r,e(t._wheelScroll,t)),i.support.kineticScrollNeeded&&(t.drag=new i.UserEvents(t.wrapper,{global:!0,start:function(n){n.sender.capture()},move:function(n){t.verticalScrollbar.scrollTop(t.verticalScrollbar.scrollTop()-n.y.delta),f.scrollLeft(f.scrollLeft()-n.x.delta),n.preventDefault()}})),t.verticalScrollbar=n('<div class="k-scrollbar k-scrollbar-vertical" />').css({width:o}).appendTo(u).bind("scroll"+r,e(t._scroll,t))},_wheelScroll:function(n){if(!n.ctrlKey){var r=this.verticalScrollbar,u=r.scrollTop(),t=i.wheelDeltaY(n);!t||t>0&&0===u||t<0&&u+r[0].clientHeight==r[0].scrollHeight||(n.preventDefault(),this.verticalScrollbar.scrollTop(u+-t))}},_scroll:function(n){var t=this,f=!t.options.prefetch,i=n.currentTarget.scrollTop,h=t.dataSource,r=t.itemHeight,c=h.skip()||0,l=t._rangeStart||c,s=t.element.innerHeight(),e=!!(t._scrollbarTop&&t._scrollbarTop>i),u=lt.max(lt.floor(i/r),0),o=lt.max(u+lt.floor(s/r),0);t._scrollTop=i-l*r,t._scrollbarTop=i,t._scrolling=f,t._fetch(u,o,e)||(t.wrapper[0].scrollTop=t._scrollTop),f&&(t._scrollingTimeout&&clearTimeout(t._scrollingTimeout),t._scrollingTimeout=setTimeout(function(){t._scrolling=!1,t._page(t._rangeStart,t.dataSource.take())},100))},itemIndex:function(n){var t=this._rangeStart||this.dataSource.skip()||0;return t+n},position:function(n){var i,t=this._rangeStart||this.dataSource.skip()||0,r=this.dataSource.pageSize();return i=n>t?n-t+1:t-n-1,i>r?r:i},scrollIntoView:function(n){var u=this.wrapper[0],t=u.clientHeight,r=this._scrollTop||u.scrollTop,i=n[0].offsetTop,f=n[0].offsetHeight;r>i?this.verticalScrollbar[0].scrollTop-=t/2:i+f>=r+t&&(this.verticalScrollbar[0].scrollTop+=t/2)},_fetch:function(t,i,r){var f=this,s=f.dataSource,l=f.itemHeight,u=s.take(),e=f._rangeStart||s.skip()||0,o=lt.floor(t/u)*u,h=!1,c=.33;return t<e?(h=!0,e=lt.max(0,i-u),f._scrollTop=(t-e)*l,f._page(e,u)):i>=e+u&&!r?(h=!0,e=t,f._scrollTop=l,f._page(e,u)):!f._fetching&&f.options.prefetch&&(t<o+u-u*c&&t>u&&s.prefetch(o-u,u,n.noop),i>o+u*c&&s.prefetch(o+u,u,n.noop)),h},fetching:function(){return this._fetching},_page:function(n,t){var r=this,f=!r.options.prefetch,u=r.dataSource;clearTimeout(r._timeout),r._fetching=!0,r._rangeStart=n,u.inRange(n,t)?u.range(n,t):(f||i.ui.progress(r.wrapper.parent(),!0),r._timeout=setTimeout(function(){r._scrolling||(f&&i.ui.progress(r.wrapper.parent(),!0),u.range(n,t))},100))},repaintScrollbar:function(){for(var n=this,e="",t=25e4,s=n.dataSource,h=i.support.kineticScrollNeeded?0:i.support.scrollbar(),r=n.wrapper[0],c=n.itemHeight=n.options.itemHeight()||0,o=r.scrollWidth>r.offsetWidth?h:0,u=s.total()*c+o,f=0;f<lt.floor(u/t);f++)e+='<div style="width:1px;height:'+t+'px"></div>';u%t&&(e+='<div style="width:1px;height:'+u%t+'px"></div>'),n.verticalScrollbar.html(e),r.scrollTop=n._scrollTop},refresh:function(){var n=this,t=n.dataSource,r=n._rangeStart;i.ui.progress(n.wrapper.parent(),!1),clearTimeout(n._timeout),n.repaintScrollbar(),n.drag&&n.drag.cancel(),r&&!n._fetching&&(n._rangeStart=t.skip(),1===t.page()&&(n.verticalScrollbar[0].scrollTop=0)),n._fetching=!1}}),k={create:{text:"Add new record",imageClass:"k-i-plus",className:"k-grid-add",iconClass:"k-icon"},cancel:{text:"Cancel changes",imageClass:"k-i-cancel",className:"k-grid-cancel-changes",iconClass:"k-icon"},save:{text:"Save changes",imageClass:"k-i-check",className:"k-grid-save-changes",iconClass:"k-icon"},destroy:{text:"Delete",imageClass:"k-i-close",className:"k-grid-delete",iconClass:"k-icon"},edit:{text:"Edit",imageClass:"k-i-edit",className:"k-grid-edit",iconClass:"k-icon"},update:{text:"Update",imageClass:"k-i-check",className:"k-primary k-grid-update",iconClass:"k-icon"},canceledit:{text:"Cancel",imageClass:"k-i-cancel",className:"k-grid-cancel",iconClass:"k-icon"},excel:{text:"Export to Excel",imageClass:"k-i-file-excel",className:"k-grid-excel",iconClass:"k-icon"},pdf:{text:"Export to PDF",imageClass:"k-i-file-pdf",className:"k-grid-pdf",iconClass:"k-icon"}},kt=i.ui.DataBoundWidget.extend({init:function(t,u,f){var e=this;u=yt(u)?{dataSource:u}:u,ti.fn.init.call(e,t,u),f&&(e._events=f),it=i.support.isRtl(t),e._element(),e._aria(),e._columns(e.options.columns),e._dataSource(),e._tbody(),e._pageable(),e._thead(),e._groupable(),e._toolbar(),e._setContentHeight(),e._templates(),e._navigatable(),e._selectable(),e._clipboard(),e._details(),e._editable(),e._attachCustomCommandsEvent(),e._minScreenSupport(),e.options.autoBind?e.dataSource.fetch():(e._group=e._groups()>0,e._footer()),e.lockedContent&&(e.wrapper.addClass("k-grid-lockedcolumns"),e._resizeHandler=function(){e.resize()},n(window).on("resize"+r,e._resizeHandler)),i.notify(e)},events:[d,"dataBinding","cancel",nr,yf,eu,lr,cf,af,vf,pf,bi,pi,ar,bf,uu,iu,ir,su,rr,ur,wu,pu,bu,"page","sort","filter","group"],setDataSource:function(n){var t=this,i=t.options.scrollable;t.options.dataSource=n,t._dataSource(),t._pageable(),t._thead(),i&&(i.virtual?t.content.find(">.k-virtual-scrollable-wrap").scrollLeft(0):t.content.scrollLeft(0)),t.options.groupable&&t._groupable(),t.virtualScrollable&&t.virtualScrollable.setDataSource(t.options.dataSource),t.options.navigatable&&t._navigatable(),t.options.selectable&&t._selectable(),t.options.autoBind&&n.fetch()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,allowCopy:!1,navigatable:!1,pageable:!1,persistSelection:!1,editable:!1,groupable:!1,rowTemplate:"",altRowTemplate:"",noRecords:!1,dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1,detailTemplate:null,columnResizeHandleWidth:3,mobile:"",messages:{editable:{cancelDelete:pe,confirmation:ke,confirmDelete:ye},commands:{create:k.create.text,cancel:k.cancel.text,save:k.save.text,destroy:k.destroy.text,edit:k.edit.text,update:k.update.text,canceledit:k.canceledit.text,excel:k.excel.text,pdf:k.pdf.text},noRecords:de,expandCollapseColumnHeader:""}},destroy:function(){var u,t=this;t._angularItems("cleanup"),t._destroyColumnAttachments(),ti.fn.destroy.call(t),this._navigatableTables=null,t._resizeHandler&&n(window).off("resize"+r,t._resizeHandler),t.pager&&t.pager.element&&t.pager.destroy(),t.pager=null,t.groupable&&t.groupable.element&&t.groupable.element.kendoGroupable("destroy"),t.groupable=null,t.options.reorderable&&t.wrapper.data("kendoReorderable").destroy(),t.selectable&&t.selectable.element&&(t.selectable.destroy(),t.clearArea(),t.options.persistSelection===!0&&(t._selectedIds=null),t.copyHandler&&(t.wrapper.off("keydown",t.copyHandler),t.unbind(t.copyHandler)),t.updateClipBoardState&&(t.unbind(t.updateClipBoardState),t.updateClipBoardState=null),t.clearAreaHandler&&t.wrapper.off("keyup",t.clearAreaHandler)),t.selectable=null,t.resizable&&(t.resizable.destroy(),t._resizeUserEvents&&(t._resizeHandleDocumentClickHandler&&n(document).off("click",t._resizeHandleDocumentClickHandler),t._resizeUserEvents.destroy(),t._resizeUserEvents=null),t.resizable=null),t.virtualScrollable&&t.virtualScrollable.element&&t.virtualScrollable.destroy(),t.virtualScrollable=null,t._destroyEditable(),t.dataSource&&(t.dataSource.unbind(d,t._refreshHandler).unbind(cr,t._progressHandler).unbind(hr,t._errorHandler),t._refreshHandler=t._progressHandler=t._errorHandler=null),u=t.element.add(t.wrapper).add(t.table).add(t.thead).add(t.wrapper.find(">.k-grid-toolbar")),t.content&&(u=u.add(t.content).add(t.content.find(">.k-virtual-scrollable-wrap"))),t.lockedHeader&&t._removeLockedContainers(),t.pane&&t.pane.destroy(),t.minScreenResizeHandler&&n(window).off("resize",t.minScreenResizeHandler),t._draggableInstance&&t._draggableInstance.element&&t._draggableInstance.destroy(),t._draggableInstance=null,u.off(r),i.destroy(t.wrapper),t.rowTemplate=t.altRowTemplate=t.lockedRowTemplate=t.lockedAltRowTemplate=t.detailTemplate=t.footerTemplate=t.groupFooterTemplate=t.lockedGroupFooterTemplate=t.noRecordsTemplate=null,t.scrollables=t.thead=t.tbody=t.element=t.table=t.content=t.footer=t.wrapper=t.lockedTable=t.lockedContent=t.lockedHeader=t.lockedFooter=t._groupableClickHandler=t._setContentWidthHandler=null},getOptions:function(){var r,u,e,o=this.options;return o.dataSource=null,r=f(!0,{},this.options),r.columns=i.deepExtend([],this.columns),u=this.dataSource,e=u.options.data&&u._data,u.options.data=null,r.dataSource=n.extend(!0,{},u.options),u.options.data=e,r.dataSource.data=e,r.dataSource.page=u.page(),r.dataSource.filter=u.filter(),r.dataSource.pageSize=u.pageSize(),r.dataSource.sort=u.sort(),r.dataSource.group=u.group(),r.dataSource.aggregate=u.aggregate(),r.dataSource.transport&&(r.dataSource.transport.dataSource=null),r.pageable&&r.pageable.pageSize&&(r.pageable.pageSize=u.pageSize()),r.$angular=t,r},setOptions:function(n){var t,e,r,f,u=this.getOptions();i.deepExtend(u,n),n.dataSource||(u.dataSource=this.dataSource),t=this.wrapper,e=this._events,r=this.element,this.destroy(),this.options=null,this._isMobile&&(f=t.closest(i.roleSelector("pane")).parent(),f.after(t),f.remove(),t.removeClass("k-grid-mobile")),t[0]!==r[0]&&(t.before(r),t.remove()),r.empty(),this.init(r,u,e),this._setEvents(u)},items:function(){return this.lockedContent?this._items(this.tbody).add(this._items(this.lockedTable.children("tbody"))):this._items(this.tbody)},_items:function(t){return t.children().filter(function(){var t=n(this);return!t.hasClass("k-grouping-row")&&!t.hasClass("k-detail-row")&&!t.hasClass("k-group-footer")})},dataItems:function(){var r,u,n,t=i.ui.DataBoundWidget.fn.dataItems.call(this);if(this.lockedContent){for(r=t.length,u=Array(2*r),n=r;--n>=0;)u[n]=u[n+r]=t[n];t=u}return t},_destroyColumnAttachments:function(){var t=this;t.resizeHandle=null,t.thead&&(this.angular("cleanup",function(){return{elements:t.thead.get()}}),t.thead.add(t.lockedHeader).find("th").each(function(){var t=n(this),u=t.data("kendoFilterMenu"),r=t.data("kendoColumnSorter"),i=t.data("kendoColumnMenu");u&&u.destroy(),r&&r.destroy(),i&&i.destroy()}))},_attachCustomCommandsEvent:function(){for(var i,t=this,r=u(t.columns||[]),n=0,f=r.length;n<f;n++)i=r[n].command,i&&ce(t,t.wrapper,i)},_aria:function(){var n=this.element.attr("id")||"aria";n&&(this._cellId=n+"_active_cell")},_element:function(){var t=this,i=t.element;i.is("table")||(i=t.options.scrollable?t.element.find("> .k-grid-content > table"):t.element.children("table"),i.length||(i=n("<table />").appendTo(t.element))),ni&&i.attr("cellspacing",0),t.table=i.attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_createResizeHandle:function(t,i){var s,c,h,u,y,v,p,e=this,a=e.options.columnResizeHandleWidth,w=e.options.scrollable,f=e.resizeHandle,l=this._groups();if(f&&e.lockedContent&&f.data("th")[0]!==i[0]&&(f.off(r).remove(),f=null),f||(f=e.resizeHandle=n('<div class="k-resize-handle"><div class="k-resize-handle-inner"></div></div>'),t.append(f)),it)s=i.position().left,w&&(u=i.closest(".k-grid-header-wrap, .k-grid-header-locked"),y=o.msie?u.scrollLeft():0,v=o.webkit?u[0].scrollWidth-u[0].offsetWidth-u.scrollLeft():0,p=o.mozilla?u[0].scrollWidth-u[0].offsetWidth-(u[0].scrollWidth-u[0].offsetWidth-u.scrollLeft()):0,s-=v-p+y);else{for(s=i[0].offsetWidth,c=g(i.closest("thead")).filter(":visible"),h=0;h<c.length&&c[h]!=i[0];h++)s+=c[h].offsetWidth;l>0&&(s+=nt(t.find(".k-group-cell:first"))*l),e._hasDetails()&&(s+=nt(t.find(".k-hierarchy-cell:first")))}f.css({top:i.position().top,left:s-a,height:st(i),width:3*a}).data("th",i).show(),f.off("dblclick"+r).on("dblclick"+r,function(){e._autoFitLeafColumn(i.data("index"))})},_positionColumnResizeHandle:function(){var t=this,i=t.options.columnResizeHandleWidth,u=t.lockedHeader?t.lockedHeader.find("thead:first"):n();t.thead.add(u).on("mousemove"+r,"th",function(r){function s(){var t,i=parseFloat(n(document.documentElement).css("zoom"));return isNaN(i)&&(i=1),t=parseFloat(n(document.body).css("zoom")),isNaN(t)&&(t=1),i*t}var e,o,f,u=n(this);u.hasClass("k-group-cell")||u.hasClass("k-hierarchy-cell")||(e=r.clientX/s(),o=n(window).scrollLeft(),f=u.offset().left+(it?0:this.offsetWidth),e+o>f-i&&e+o<f+i?t._createResizeHandle(u.closest("div"),u):t.resizeHandle?t.resizeHandle.hide():ki(t.wrapper,""))})},_resizeHandleDocumentClick:function(t){n(t.target).closest(".k-column-active").length||(n(document).off(t),this._hideResizeHandle())},_hideResizeHandle:function(){this.resizeHandle&&(this.resizeHandle.data("th").removeClass("k-column-active"),this.lockedContent&&!this._isMobile?(this.resizeHandle.off(r).remove(),this.resizeHandle=null):this.resizeHandle.hide())},_positionColumnResizeHandleTouch:function(){var t=this,r=t.lockedHeader?t.lockedHeader.find("thead:first"):n();t._resizeUserEvents=new i.UserEvents(r.add(t.thead),{filter:"th:not(.k-group-cell):not(.k-hierarchy-cell)",threshold:10,hold:function(i){var r=n(i.target);i.preventDefault(),r.addClass("k-column-active"),t._createResizeHandle(r.closest("div"),r),t._resizeHandleDocumentClickHandler||(t._resizeHandleDocumentClickHandler=e(t._resizeHandleDocumentClick,t)),n(document).on("click",t._resizeHandleDocumentClickHandler)}})},_resizable:function(){var c,l,e,y,h,f,v,r,t=this,s=t.options,p=this._isMobile,a=i.support.mobileOS?0:i.support.scrollbar();s.resizable&&(c=s.scrollable?t.wrapper.find(".k-grid-header-wrap:first"):t.wrapper,p?t._positionColumnResizeHandleTouch(c):t._positionColumnResizeHandle(c),t.resizable&&t.resizable.destroy(),t.resizable=new ut.Resizable(c.add(t.lockedHeader),{handle:(s.scrollable?"":">")+".k-resize-handle",hint:function(i){return n('<div class="k-grid-resize-indicator" />').css({height:st(i.data("th"))+t.tbody.attr("clientHeight")})},start:function(i){var b,c,a,w;r=n(i.currentTarget).data("th"),p&&t._hideResizeHandle(),b=r.closest("table"),c=n.inArray(r[0],g(r.closest("thead")).filter(":visible")),f=b.parent().hasClass("k-grid-header-locked"),a=f?t.lockedTable:t.table,w=t.footer||n(),t.footer&&t.lockedContent&&(w=t.footer.children(f?".k-grid-footer-locked":".k-grid-footer-wrap")),ki(t.wrapper,"col-resize"),v=s.scrollable?b.find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+c+")").add(a.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+c+")")).add(w.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+c+")")):a.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+c+")"),l=i.x.location,e=nt(r),y=u(t.columns)[c].minResizableWidth||10,h=nt(f?a.children("tbody"):t.tbody),o.webkit&&t.wrapper.addClass("k-grid-column-resizing")},resize:function(i){var o,d,k,b,w,u,p=it?-1:1,c=e+i.x.location*p-l*p;s.scrollable?(f&&t.lockedFooter?o=t.lockedFooter.children("table"):t.footer&&(o=t.footer.find(">.k-grid-footer-wrap>table")),o&&o[0]||(o=n()),d=r.closest("table"),k=f?t.lockedTable:t.table,b=!1,w=t.wrapper.width()-a,u=c,f&&h-e+u>w&&(u=e+(w-h-2*a),u<0&&(u=c),b=!0),u>10&&u>=y&&(v.css("width",u),h&&(u=b?w-2*a:h+i.x.location*p-l*p,k.add(d).add(o).css("width",u),f||(t._footerWidth=u)))):c>10&&c>=y&&v.css("width",c)},resizeend:function(){var s,h,n,f=nt(r);ki(t.wrapper,""),o.webkit&&t.wrapper.removeClass("k-grid-column-resizing"),e!=f&&(h=t.lockedHeader?t.lockedHeader.find("thead:first tr:first").add(t.thead.find("tr:first")):r.parent(),n=r.attr(i.attr("index")),n||(n=h.find("th:not(.k-group-cell):not(.k-hierarchy-cell)").index(r)),s=u(t.columns)[n],s.width=f,t.trigger(ir,{column:s,oldWidth:e,newWidth:f}),t._applyLockedContainersWidth(),t._syncLockedContentHeight(),t._syncLockedHeaderHeight()),t._hideResizeHandle(),r=null}}))},_draggable:function(){var u,t=this;t.options.reorderable&&(t._draggableInstance&&t._draggableInstance.destroy(),u=t.wrapper.children(".k-grid-header"),t._draggableInstance=t.wrapper.kendoDraggable({group:i.guid(),autoScroll:!0,filter:t.content?".k-grid-header:first "+vr:"table:first>.k-grid-header "+vr,dragstart:function(){u.children(".k-grid-header-wrap").unbind("scroll"+r+"scrolling").bind("scroll"+r+"scrolling",function(n){t.virtualScrollable?t.content.find(">.k-virtual-scrollable-wrap").scrollLeft(this.scrollLeft):t.scrollables.not(n.currentTarget).scrollLeft(this.scrollLeft)})},dragend:function(){u.children(".k-grid-header-wrap").unbind("scroll"+r+"scrolling")},drag:function(){t._hideResizeHandle()},hint:function(t){var r=t.attr(i.attr("title"));return r&&(r=i.htmlEncode(r)),n('<div class="k-header k-drag-clue" />').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(r||t.attr(i.attr("field"))||t.text()).prepend('<span class="k-icon k-drag-status k-i-cancel" />')}}).data("kendoDraggable"))},_reorderable:function(){var i,t=this;t.options.reorderable&&(t.wrapper.data("kendoReorderable")&&t.wrapper.data("kendoReorderable").destroy(),i=function(n,i,r){var f=n[i],e=n[r],u=sr(f,t.columns);return n=u?u.columns:t.columns,h(e,n)},t.wrapper.kendoReorderable({draggable:t._draggableInstance,dragOverContainers:function(n,r){var u=kr(t.columns);return u[n].lockable!==!1&&i(u,n,r)>-1},inSameContainer:function(r){return n(r.source).parent()[0]===n(r.target).parent()[0]&&i(kr(t.columns),r.sourceIndex,r.targetIndex)>-1},change:function(n){var u=kr(t.columns),r=u[n.oldIndex],f=i(u,n.oldIndex,n.newIndex);t.trigger(su,{newIndex:f,oldIndex:h(r,u),column:r}),t.reorderColumn(f,r,"before"===n.position)}}))},_reorderHeader:function(n,t,i){for(var c,f,h,r=this,e=gt(n[0],r.columns),l=gt(t,r.columns),u=[],o=0;o<n.length;o++)n[o].columns&&(u=u.concat(n[o].columns));c=rt(r.lockedHeader,r.thead,"tr:eq("+e.row+")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"),f=s(n).length,h=s([t]).length,u.length?(f>0&&0===h?uf(n,t,u,r.columns,r.lockedHeader.find("thead"),r.thead,this._groups()):0===f&&h>0&&uf(n,t,u,r.columns,r.thead,r.lockedHeader.find("thead"),this._groups()),(t.columns||e.cell-l.cell>1||l.cell-e.cell>1)&&(t=hu(r.columns,t,n[0],i),t&&r._reorderHeader(u,t,i))):f!==h&&df(c[e.cell],r.columns,f),vt(c,e.cell,l.cell,i,n.length)},_reorderContent:function(t,i,r){var a,w,o,it,f=this,nt=n(),g=t[0],d=b(t),e=h(g,u(f.columns)),l=h(i,u(f.columns)),p=h(g,tt(f.columns)),v=h(i,tt(f.columns)),y=s(f.columns).length,ut=!!i.locked,c=f.footer||f.wrapper.find(".k-grid-footer"),k=a=v;for(i.hidden&&(ut?(v=f.lockedTable.find("colgroup"),k=f.lockedHeader.find("colgroup"),a=n(f.lockedFooter).find(">table>colgroup")):(v=f.tbody.prev(),k=f.thead.prev(),a=c.find(".k-grid-footer-wrap").find(">table>colgroup"))),f._hasFilterRow()&&vt(f.wrapper.find(".k-filter-row th:not(.k-group-cell,.k-hierarchy-cell)"),e,l,r,t.length),vt(rt(f.lockedHeader,f.thead.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),p,k,r,d.length),f.options.scrollable&&vt(rt(f.lockedTable,f.tbody.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),p,v,r,d.length),c&&c.length&&(vt(rt(f.lockedFooter,c.find(".k-grid-footer-wrap"),">table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),p,a,r,d.length),vt(c.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),e,l,r,t.length)),w=f.tbody.children(":not(.k-grouping-row,.k-detail-row)"),f.lockedTable&&(y>l?y<=e&&wf(f.lockedTable.find(">tbody>tr.k-grouping-row"),f.table.find(">tbody>tr.k-grouping-row"),t.length):y>e&&wf(f.table.find(">tbody>tr.k-grouping-row"),f.lockedTable.find(">tbody>tr.k-grouping-row"),t.length),nt=f.lockedTable.find(">tbody>tr:not(.k-grouping-row,.k-detail-row)")),o=0,it=w.length;o<it;o+=1)vt(rt(nt[o],w[o],">td:not(.k-group-cell,.k-hierarchy-cell)"),e,l,r,t.length)},_autoFitLeafColumn:function(n){this.autoFitColumn(u(this.columns)[n])},autoFitColumn:function(t){var r,rt,v,a,p,ut,ft,s,ht,it,w,f,lt,tt,st,b,y,d,at,i=this,vt=i.options,e=i.columns,yt=i.lockedHeader?g(i.lockedHeader.find(">table>thead")).filter(tr).length:0,k="col:not(.k-group-col):not(.k-hierarchy-col)",ct="td:visible:not(.k-group-cell):not(.k-hierarchy-cell)";if(t="number"==typeof t?e[t]:c(t)?l(et(e),function(n){return n===t})[0]:l(et(e),function(n){return n.field===t})[0],t&&ot(t)){for(r=h(t,u(e)),a=t.locked,v=a?i.lockedHeader.children("table"):i.thead.parent(),rt=v.find("[data-index='"+r+"']"),s=a?i.lockedTable:i.table,ht=i.footer||n(),i.footer&&i.lockedContent&&(ht=i.footer.children(a?".k-grid-footer-locked":".k-grid-footer-wrap")),it=ht.find("table").first(),i.lockedHeader&&!a&&(r-=yt),w=0;w<e.length&&e[w]!==t;w++)e[w].hidden&&r--;if(vt.scrollable?(p=v.find(k).eq(r).add(s.children("colgroup").find(k).eq(r)).add(it.find("colgroup").find(k).eq(r)),a||(ut=s.parent(),ft=ut.scrollLeft())):p=s.children("colgroup").find(k).eq(r),f=v.add(s).add(it),lt=nt(rt),p.width(""),f.css("table-layout","fixed"),p.width("auto"),f.addClass("k-autofitting"),f.css("table-layout",""),tt=Math.ceil(Math.max(nt(rt),nt(s.find("tr:not(.k-grouping-row)").eq(0).children(ct).eq(r)),nt(it.find("tr").eq(0).children(ct).eq(r))))+1,p.width(tt),t.width=tt,vt.scrollable){for(st=v.find("col"),y=0,d=0,at=st.length;d<at;d+=1){if(b=st[d].style.width,!b||b.indexOf("%")!=-1){y=0;break}y+=parseInt(b,10)}y&&f.each(function(){this.style.width=y+"px"})}o.msie&&8==o.version&&(f.css("display","inline-table"),setTimeout(function(){f.css("display","table")},1)),f.removeClass("k-autofitting"),ft&&ut.scrollLeft(ft),i.trigger(ir,{column:t,oldWidth:lt,newWidth:tt}),i._applyLockedContainersWidth(),i._syncLockedContentHeight(),i._syncLockedHeaderHeight()}},reorderColumn:function(n,i,r){var v,a,f=this,y=sr(i,f.columns),l=y?y.columns:f.columns,o=h(i,l),e=l[n],c=!!e.locked,p=s(f.columns).length;o!==n&&(!i.locked&&c&&1==ht(f.columns).length||i.locked&&!c&&1==p||(f._hideResizeHandle(),r===t&&(r=n<o),a=[i],f._reorderHeader(a,e,r),f.lockedHeader&&(pr(f.thead),pr(f.lockedHeader)),e.columns&&(e=u(e.columns),e=e[r?0:e.length-1]),i.columns&&(a=u(i.columns)),f._reorderContent(a,e,r),v=!!i.locked,v=v!=c,i.locked=c,l.splice(r?n:n+1,0,i),l.splice(o<n?o:o+1,1),f._templates(),f._updateColumnCellIndex(),f._updateTablesWidth(),f._applyLockedContainersWidth(),f._syncLockedHeaderHeight(),f._syncLockedContentHeight(),f._updateFirstColumnClass(),v&&(c?f.trigger(wu,{column:i}):f.trigger(pu,{column:i}))))},_updateColumnCellIndex:function(){var t,n=0;this.lockedHeader&&(t=this.lockedHeader.find("thead"),n=ef(t,s(this.columns))),ef(this.thead,ht(this.columns),n)},lockColumn:function(n){var i,t=this.columns;n="number"==typeof n?t[n]:l(t,function(t){return t.field===n})[0],!n||n.locked||n.hidden||(i=s(t).length-1,this.reorderColumn(i,n,!1))},unlockColumn:function(n){var i,t=this.columns;n="number"==typeof n?t[n]:l(t,function(t){return t.field===n})[0],n&&n.locked&&!n.hidden&&(i=s(t).length,this.reorderColumn(i,n,!0))},cellIndex:function(t){var i=0;return this.lockedTable&&!n.contains(this.lockedTable[0],t[0])&&(i=u(s(this.columns)).length),n(t).parent().children("td:not(.k-group-cell,.k-hierarchy-cell)").index(t)+i},_modelForContainer:function(t){t=n(t),t.is("tr")||"popup"===this._editMode()||(t=t.closest("tr"));var r=t.attr(i.attr("uid"));return this.dataSource.getByUid(r)},_editable:function(){var u,t=this,e=t.selectable&&t.selectable.options.multiple,i=t.options.editable,f=function(){var r=at(),i=t._editContainer;!i||n.contains(i[0],r)||i[0]===r||n(r).closest(".k-animation-container").length||t.editable.end()&&t.closeCell()};i&&(this.wrapper.addClass("k-editable"),u=t._editMode(),"incell"===u?i.update!==!1&&t.wrapper.on(a+r,"tr:not(.k-grouping-row) > td",function(i){var r=n(this),u=t.lockedTable&&r.closest("table")[0]===t.lockedTable[0];r.hasClass("k-hierarchy-cell")||r.hasClass("k-detail-cell")||r.hasClass("k-group-cell")||r.hasClass("k-edit-cell")||r.has("a.k-grid-delete").length||r.has("button.k-grid-delete").length||r.closest("tbody")[0]!==t.tbody[0]&&!u||n(i.target).is(":input")||(t.editable?t.editable.end()&&(e&&n(at()).blur(),t.closeCell(),t.editCell(r)):t.editCell(r))}).on("focusin"+r,function(){n.contains(this,at())||(clearTimeout(t.timer),t.timer=null)}).on("focusout"+r,function(){t.timer=setTimeout(f,1)}):i.update!==!1&&t.wrapper.on(a+r,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit",function(i){i.preventDefault(),t.editRow(n(this).closest("tr"))}),i.destroy!==!1?t.wrapper.on(a+r,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible .k-grid-delete",function(i){i.preventDefault(),i.stopPropagation(),t.removeRow(n(this).closest("tr"))}):t.wrapper.on(a+r,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible button.k-grid-delete",function(n){n.stopPropagation(),t._confirmation()||n.preventDefault()}))},editCell:function(t){var i,f,r,e;if(t=n(t),i=this,f=u(i.columns)[i.cellIndex(t)],r=i._modelForContainer(t),i.closeCell(),r&&wr(f,r)&&!f.command){if(i.trigger(pi,{model:r}))return;i._attachModelChange(r),i._editContainer=t,i.editable=t.addClass("k-edit-cell").kendoEditable({fields:{field:f.field,format:f.format,editor:f.editor,values:f.values},model:r,target:i,change:function(n){i.trigger(ar,{values:n.values,container:t,model:r})&&n.preventDefault()}}).data("kendoEditable"),e=t.parent().addClass("k-grid-edit-row"),i.lockedContent&&ei(e[0],i._relatedRow(e).addClass("k-grid-edit-row")[0]),i.trigger(bi,{container:t,model:r})}},_adjustLockedHorizontalScrollBar:function(){var t=this.table,n=t.parent(),r=t[0].offsetWidth>n[0].clientWidth?i.support.scrollbar():0;this.lockedContent.height(n.height()-r)},_syncLockedContentHeight:function(){this.lockedTable&&(this.touchScroller||this._adjustLockedHorizontalScrollBar(),this._adjustRowsHeight(this.table,this.lockedTable))},_syncLockedHeaderHeight:function(){var t,n;this.lockedHeader&&(t=this.lockedHeader.children("table"),n=this.thead.parent(),this._adjustRowsHeight(t,n),ae(t,n))},_syncLockedFooterHeight:function(){this.lockedFooter&&this.footer&&this.footer.length&&this._adjustRowsHeight(this.lockedFooter.children("table"),this.footer.find(".k-grid-footer-wrap > table"))},_destroyEditable:function(){var n=this,t=function(){if(n.editable){var t=n.editView?n.editView.element:n._editContainer;t&&(t.off(a+r,"a.k-grid-cancel",n._editCancelClickHandler),t.off(a+r,"a.k-grid-update",n._editUpdateClickHandler)),n._detachModelChange(),n.editable.destroy(),n.editable=null,n._editContainer=null,n._destroyEditView()}};n.editable&&("popup"!==n._editMode()||n._isMobile?t():n._editContainer.data("kendoWindow").bind("deactivate",t).close()),n._actionSheet&&(n._actionSheet.destroy(),n._actionSheet=null)},_destroyEditView:function(){this.editView&&(this.editView.purge(),this.editView=null,this.pane.navigate(""))},_attachModelChange:function(n){var t=this;t._modelChangeHandler=function(n){t._modelChange({field:n.field,model:this})},n.bind("change",t._modelChangeHandler)},_detachModelChange:function(){var n=this,i=n._editContainer,t=n._modelForContainer(i);t&&t.unbind(d,n._modelChangeHandler)},closeCell:function(t){var h,s,o,e,r=this,f=r._editContainer;f&&(h=f.closest("tr").attr(i.attr("uid")),e=r.dataSource.getByUid(h),t&&r.trigger("cancel",{container:f,model:e})||(r.trigger(iu,{type:t?"cancel":"save",model:e,container:f}),f.removeClass("k-edit-cell"),s=u(r.columns)[r.cellIndex(f)],o=f.parent().removeClass("k-grid-edit-row"),r._destroyEditable(),r._displayCell(f,s,e),f.hasClass("k-dirty-cell")&&n('<span class="k-dirty"/>').prependTo(f),r.trigger("itemChange",{item:o,data:e,ns:ut}),r.lockedContent&&ei(o.css("height","")[0],r._relatedRow(o).css("height","")[0])))},_displayCell:function(n,t,r){var s=this,o={storage:{},count:0},h=f({},i.Template,s.options.templateSettings),u=i.template(s._cellTmpl(t,o),h);o.count>0&&(u=e(u,o.storage)),n.empty().html(u(r)),s.angular("compile",function(){return{elements:n,data:[{dataItem:r}]}})},removeRow:function(n){this._confirmation(n)&&this._removeRow(n)},_removeRow:function(t){var u,i=this,r=i._editMode();"incell"!==r&&i.cancelRow(),t=n(t),i.lockedContent&&(t=t.add(i._relatedRow(t))),t=t.hide(),u=i._modelForContainer(t),u&&!i.trigger(bf,{row:t,model:u})?(i.dataSource.remove(u),"inline"!==r&&"popup"!==r||i.dataSource.sync()):"incell"===r&&i._destroyEditable()},_editMode:function(){var t="incell",n=this.options.editable;return n!==!0&&(t="string"==typeof n?n:n.mode||t),t},editRow:function(t){var o,s,h,f=this;t instanceof i.data.ObservableObject?o=t:(t=n(t),o=f._modelForContainer(t)),s=f._editMode(),f.cancelRow(),o&&(t=f.tbody.children("["+i.attr("uid")+"="+o.uid+"]"),f._attachModelChange(o),"popup"===s?f._createPopupEditor(o):"inline"===s?f._createInlineEditor(t,o):"incell"===s&&n(t).children(p).each(function(){var t=n(this),i=u(f.columns)[f.cellIndex(t)];if(o=f._modelForContainer(t),o&&(!o.editable||o.editable(i.field))&&i.field)return f.editCell(t),!1}),h=f.editView?f.editView.element:f._editContainer,h&&(this._editCancelClickHandler||(this._editCancelClickHandler=e(this._editCancelClick,this)),h.on(a+r,"a.k-grid-cancel",this._editCancelClickHandler),this._editUpdateClickHandler||(this._editUpdateClickHandler=e(this._editUpdateClick,this)),h.on(a+r,"a.k-grid-update",this._editUpdateClickHandler)))},_editUpdateClick:function(n){n.preventDefault(),n.stopPropagation(),this.saveRow()},_editCancelClick:function(t){var r,i=this,e=i.options.navigatable,f=i.editable.options.model,u=i.editView?i.editView.element:i._editContainer;t.preventDefault(),t.stopPropagation(),i.trigger("cancel",{container:u,model:f})||(r=i.items().index(n(i.current()).parent()),i.cancelRow(),e&&(i._setCurrent(i.items().eq(r).children().filter(bt).first()),y(i.table,!0)))},_createPopupEditor:function(r){var s,l,a,nt,tt,ut,ft,p,k,it,b,o=this,h="<div "+i.attr("uid")+'="'+r.uid+'" class="k-popup-edit-form'+(o._isMobile?" k-mobile-list":"")+'"><div class="k-edit-form-container">',ot=[],g=u(o.columns),rt=o.options.editable,w=rt.template,d=c(rt)?rt.window:{},et=f({},i.Template,o.options.templateSettings);if(!o.trigger(pi,{model:r})){if(d=d||{},w)for(typeof w===v&&(w=window.unescape(w)),h+=i.template(w,et)(r),a=0,nt=g.length;a<nt;a++)s=g[a],s.command&&(p=br(s.command,"edit"),p&&(l=p));else for(a=0,nt=g.length;a<nt;a++)s=g[a],s.command?s.command&&(p=br(s.command,"edit"),p&&(l=p)):(h+='<div class="k-edit-label"><label for="'+s.field+'">'+(s.title||s.field||"")+"</label></div>",wr(s,r)?(ot.push({field:s.field,format:s.format,editor:s.editor,values:s.values}),h+="<div "+i.attr("container-for")+'="'+s.field+'" class="k-edit-field"></div>'):(it={storage:{},count:0},tt=i.template(o._cellTmpl(s,it),et),it.count>0&&(tt=e(tt,it.storage)),h+='<div class="k-edit-field">'+tt(r)+"</div>"));l&&c(l)&&(l.text&&c(l.text)&&(ut=l.text.update,ft=l.text.cancel),l.attr&&(k=l.attr)),o._isMobile?(h+="</div></div>",o.editView=o.pane.append("<div data-"+i.ns+'role="view" data-'+i.ns+'use-native-scrolling="true" data-'+i.ns+'init-widgets="false" class="k-grid-edit-form"><div data-'+i.ns+'role="header" class="k-header">'+o._createButton({name:"update",text:ut,attr:k})+(d.title||"Edit")+o._createButton({name:"canceledit",text:ft,attr:k})+"</div>"+h+"</div>"),b=o._editContainer=o.editView.element.find(".k-popup-edit-form")):(h+='<div class="k-edit-buttons k-state-default">',h+=o._createButton({name:"update",text:ut,attr:k})+o._createButton({name:"canceledit",text:ft,attr:k}),h+="</div></div></div>",b=o._editContainer=n(h).appendTo(o.wrapper).eq(0).kendoWindow(f({modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1,close:function(i){if(i.userTriggered){if(i.sender.element.focus(),o.trigger("cancel",{container:b,model:r}))return i.preventDefault(),t;var u=o.items().index(n(o.current()).parent());o.cancelRow(),o.options.navigatable&&(o._setCurrent(o.items().eq(u).children().filter(bt).first()),y(o.table,!0))}}},d))),o.editable=o._editContainer.kendoEditable({fields:ot,model:r,clearContainer:!1,target:o}).data("kendoEditable"),o._isMobile&&b.find("input[type=checkbox],input[type=radio]").parent(".k-edit-field").addClass("k-check").prev(".k-edit-label").addClass("k-check").click(function(){n(this).next().children("input").click()}),o._openPopUpEditor(),o.trigger(bi,{container:b,model:r})}},_openPopUpEditor:function(){this._isMobile?this.pane.navigate(this.editView,this._editAnimation):this._editContainer.data("kendoWindow").center().open()},_createInlineEditor:function(t,r){var e,s,o,f=this,h=[];f.trigger(pi,{model:r})||(f.lockedContent&&(t=t.add(f._relatedRow(t))),t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){if(s=n(this),e=u(f.columns)[f.cellIndex(s)],!e.command&&wr(e,r))h.push({field:e.field,format:e.format,editor:e.editor,values:e.values}),s.attr(i.attr("container-for"),e.field),s.empty();else if(e.command&&(o=br(e.command,"edit"))){s.empty();var l,a,t;c(o)&&(o.text&&c(o.text)&&(l=o.text.update,a=o.text.cancel),o.attr&&(t=o.attr)),n(f._createButton({name:"update",text:l,attr:t})+f._createButton({name:"canceledit",text:a,attr:t})).appendTo(s)}}),f._editContainer=t,f.editable=new i.ui.Editable(t.addClass("k-grid-edit-row"),{target:f,fields:h,model:r,clearContainer:!1}),t.length>1&&(ei(t[0],t[1]),f._applyLockedContainersWidth()),f.trigger(bi,{container:t,model:r}))},cancelRow:function(n){var u,t=this,r=t._editContainer;if(r){if(u=t._modelForContainer(r),n&&t.trigger("cancel",{container:r,model:u}))return;t._destroyEditable(),t.dataSource.cancelChanges(u),t._displayRow("popup"!==t._editMode()?r:t.tbody.find("["+i.attr("uid")+"="+u.uid+"]"))}},saveRow:function(){var t=this._editContainer,r=this._modelForContainer(t),i=n.Deferred();return t&&this.editable?!this.editable.end()||this.trigger(ar,{container:t,model:r})?i.reject().promise():this.dataSource.sync():i.resolve().promise()},_displayRow:function(t){var r,u,o,s,e,i=this,f=i._modelForContainer(t),c=t.hasClass("k-state-selected"),h=t.hasClass("k-alt");f&&(i.lockedContent&&(r=n((h?i.lockedAltRowTemplate:i.lockedRowTemplate)(f)),i._relatedRow(t.last()).replaceWith(r)),i.angular("cleanup",function(){return{elements:t.get()}}),u=n((h?i.altRowTemplate:i.rowTemplate)(f)),t.replaceWith(u),i.trigger("itemChange",{item:u,data:f,ns:ut}),r&&r.length&&i.trigger("itemChange",{item:r,data:f,ns:ut}),s=u,e=[{dataItem:f}],r&&r.length&&(s=u.add(r),e.push({dataItem:f})),i.angular("compile",function(){return{elements:s.get(),data:e}}),c&&i.options.selectable&&i.select(u.add(r)),r&&ei(u[0],r[0]),o=u.next(),o.hasClass("k-detail-row")&&o.is(":visible")&&u.find(".k-hierarchy-cell .k-icon").removeClass("k-i-expand").addClass("k-i-collapse"))},_showMessage:function(t,r){var f,o,e,u=this;return u._isMobile?(f=i.template('<ul><li class="km-actionsheet-title">#:title#</li><li><a href="\\#" class="k-button k-grid-delete">#:confirmDelete#</a></li></ul>'),o=n(f(t)).appendTo(u.view.element),e=u._actionSheet=new i.mobile.ui.ActionSheet(o,{cancel:t.cancelDelete,cancelTemplate:'<li class="km-actionsheet-cancel"><a class="k-button" href="\\#">#:cancel#</a></li>',close:function(){this.destroy()},command:function(t){var i=n(t.currentTarget).parent();i.hasClass("km-actionsheet-cancel")||u._removeRow(r)},popup:u._actionSheetPopupOptions}),e.open(r),!1):window.confirm(t.title)},_confirmation:function(n){var i=this,r=i.options.editable,t=r===!0||typeof r===v?i.options.messages.editable.confirmation:r.confirmation;return c(r)&&typeof r.mode===v&&typeof t!==v&&t!==!1&&(t=i.options.messages.editable.confirmation),t===!1||null==t||(typeof t===pt&&(t=t(i._modelForContainer(n))),i._showMessage({confirmDelete:r.confirmDelete||i.options.messages.editable.confirmDelete,cancelDelete:r.cancelDelete||i.options.messages.editable.cancelDelete,title:t===!0?i.options.messages.editable.confirmation:t},n))},cancelChanges:function(){this.dataSource.cancelChanges()},saveChanges:function(){var n=this;(n.editable&&n.editable.end()||!n.editable)&&!n.trigger(uu)&&n.dataSource.sync()},addRow:function(){var r,s,l,a,u,h,n=this,t=n.dataSource,f=n._editMode(),c=n.options.editable.createAt||"",o=t.pageSize(),e=t.view()||[];(n.editable&&n.editable.end()||!n.editable)&&("incell"!=f&&n.cancelRow(),r=t.indexOf(e[0]),"bottom"==c.toLowerCase()&&(r+=e.length,o&&!t.options.serverPaging&&o<=e.length&&(r-=1)),r<0&&(r=t.page()>t.totalPages()?(t.page()-1)*o:0),s=t.insert(r,{}),l=s.uid,a=n.lockedContent?n.lockedTable:n.table,u=a.find("tr["+i.attr("uid")+"="+l+"]"),h=u.children("td:not(.k-group-cell,.k-hierarchy-cell)").eq(n._firstEditableColumnIndex(u)),"inline"===f&&u.length?n.editRow(u):"popup"===f?n.editRow(s):h.length&&n.editCell(h),"bottom"==c.toLowerCase()&&n.lockedContent&&(n.lockedContent[0].scrollTop=n.content[0].scrollTop=n.table[0].offsetHeight))},_firstEditableColumnIndex:function(n){for(var i,o=this,e=u(o.columns),r=o._modelForContainer(n),t=0,f=e.length;t<f;t++)if(i=e[t],r&&(!r.editable||r.editable(i.field))&&!i.command&&i.field&&i.hidden!==!0)return t;return-1},_toolbar:function(){var f,t=this,s=t.wrapper,u=t.options.toolbar,o=t.options.editable;u&&(f=t.wrapper.find(".k-grid-toolbar"),f.length||(ee(u)||(u=typeof u===v?u:t._toolbarTmpl(u).replace(ii,"\\#"),u=e(i.template(u),t)),f=n('<div class="k-header k-grid-toolbar" />').html(u({})).prependTo(s),t.angular("compile",function(){return{elements:f.get()}})),o&&o.create!==!1&&f.on(a+r,".k-grid-add",function(n){n.preventDefault(),t.addRow()}).on(a+r,".k-grid-cancel-changes",function(n){n.preventDefault(),t.cancelChanges()}).on(a+r,".k-grid-save-changes",function(n){n.preventDefault(),t.saveChanges()}),f.on(a+r,".k-grid-excel",function(n){n.preventDefault(),t.saveAsExcel()}),f.on(a+r,".k-grid-pdf",function(n){n.preventDefault(),t.saveAsPDF()}))},_toolbarTmpl:function(n){var t,r,u=this,i="";if(yt(n))for(t=0,r=n.length;t<r;t++)i+=u._createButton(n[t]);return i},_createButton:function(n){var e,s=n.template||fe,r=typeof n===v?n:n.name||n.text,l=k[r]?k[r].className:"k-grid-"+(r||"").replace(/\s/g,""),u={className:l,text:r,imageClass:"",attr:"",iconClass:""},o=this.options.messages.commands;if(!(r||c(n)&&n.template))throw Error("Custom commands should have name specified");return c(n)?(n=f(!0,{},n),n.className&&h(u.className,n.className.split(" "))<0?n.className+=" "+u.className:n.className===t&&(n.className=u.className),"edit"===r&&c(n.text)&&(n=f(!0,{},n),n.text=n.text.edit),n.attr&&(c(n.attr)&&(n.attr=ui(n.attr)),typeof n.attr===v&&(e=n.attr.match(/class="(.+?)"/),e&&h(e[1],n.className.split(" "))<0&&(n.className+=" "+e[1]))),u=f(!0,u,k[r],{text:o[r]},n)):u=f(!0,u,k[r],{text:o[r]}),i.template(s)(u)},_hasFooters:function(){return!!this.footerTemplate||!!this.groupFooterTemplate||this.footer&&this.footer.length>0||this.wrapper.find(".k-grid-footer").length>0},_groupable:function(){var t=this;t._groupableClickHandler?t.table.add(t.lockedTable).off(a+r,t._groupableClickHandler):t._groupableClickHandler=function(i){var u=n(this),r=u.closest("tr");u.hasClass("k-i-collapse")?t.collapseGroup(r):t.expandGroup(r),i.preventDefault(),i.stopPropagation()},t._isLocked()?t.lockedTable.on(a+r,".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",t._groupableClickHandler):t.table.on(a+r,".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",t._groupableClickHandler),t._attachGroupable()},_attachGroupable:function(){var t=this,u=t.wrapper,r=t.options.groupable,o=vr+"["+i.attr("field")+"]",e=t.content?".k-grid-header:first "+o:"table:first>.k-grid-header "+o;r&&r.enabled!==!1&&(u.has("div.k-grouping-header")[0]||n("<div>&nbsp;</div>").addClass("k-grouping-header").prependTo(u),t.groupable&&t.groupable.destroy(),t.groupable=new ut.Groupable(u,f({},r,{draggable:t._draggableInstance,groupContainer:">div.k-grouping-header",dataSource:t.dataSource,draggableElements:e,filter:e,allowDrag:t.options.reorderable,change:function(n){t.trigger("group",{groups:n.groups})&&n.preventDefault()}})))},_continuousItems:function(t,i){var u,h,o,c,e,l,f,r;if(this.lockedContent){for(u=this,h=u.table.add(u.lockedTable),o=n(t,h[0]),c=n(t,h[1]),e=i?s(u.columns).length:1,l=i?u.columns.length-e:1,f=[],r=0;r<o.length;r+=e)sf.apply(f,o.slice(r,r+e)),sf.apply(f,c.splice(0,l));return f}},_selectable:function(){var a,e,o,v,u=this,f=[],l=u._isLocked(),s=u.options.selectable,c=u.dataSource.options;if(s){if(u.selectable&&u.selectable.destroy(),u.options.persistSelection===!0){if(!c.schema||!c.schema.model||!c.schema.model.id)throw Error("Selection persistence requires a data source with a model that has e defined id");u._selectedIds={}}s=i.ui.Selectable.parseOptions(s),a=s.multiple,e=s.cell,u._hasDetails()&&(f[f.length]=".k-detail-row"),(u.options.groupable||u._hasFooters())&&(f[f.length]=".k-grouping-row,.k-group-footer"),f=f.join(","),""!==f&&(f=":not("+f+")"),o=u.table,l&&(o=o.add(u.lockedTable)),v=">"+(e?oe:"tbody>tr"+f),u.selectable=new i.ui.Selectable(o,{filter:v,aria:!0,multiple:a,change:function(){var i,t,r,o,f,n;if(u.options.persistSelection&&!e)for(r=u.tbody.children(":not(.k-grouping-row,.k-detail-row)"),o=c.schema.model.id,f={},this.value().each(function(){t=u.dataItem(this),f[t[o]]=!0}),n=0;n<r.length;n++)t=u.dataItem(r[n]),i=t[o],f[i]?u._selectedIds[i]=!0:delete u._selectedIds[i];u.trigger(d)},useAllItems:l&&a&&e,relatedTarget:function(t){var f,r,i,o;if(!e&&l){for(r=n(),i=0,o=t.length;i<o;i++)f=u._relatedRow(t[i]),h(f[0],t)<0&&(r=r.add(f));return r}},continuousItems:function(){return u._continuousItems(v,e)}}),u.options.navigatable&&o.on("keydown"+r,function(i){var r=u.current(),f=i.target;if(i.keyCode===w.SPACEBAR&&n.inArray(f,o)>-1&&!r.is(".k-edit-cell,.k-header")&&r.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")){if(i.preventDefault(),i.stopPropagation(),r=e?r:r.parent(),l&&!e&&(r=r.add(u._relatedRow(r))),a)if(i.ctrlKey){if(r.hasClass(gr))return r.removeClass(gr),u.trigger(d),t}else u.selectable.clear();else u.selectable.clear();u.selectable.value(r)}})}},_clipboard:function(){var n,t=this.options,i=t.selectable;i&&t.allowCopy&&(n=this,t.navigatable||n.table.add(n.lockedTable).attr("tabindex",0).on("mousedown"+r+" keydown"+r,".k-detail-cell",function(n){n.target!==n.currentTarget&&n.stopImmediatePropagation()}).on("mousedown"+r,ft+">"+bt,e(nf,n)),n.copyHandler=e(n.copySelection,n),n.updateClipBoardState=function(){n.areaClipBoard&&n.areaClipBoard.val(n.getTSV()).focus().select()},n.bind("change",n.updateClipBoardState),n.wrapper.on("keydown",n.copyHandler),n.clearAreaHandler=e(n.clearArea,n),n.wrapper.on("keyup",n.clearAreaHandler))},copySelection:function(t){t instanceof jQuery.Event&&!t.ctrlKey&&!t.metaKey||n(t.target).is("input:visible,textarea:visible")||window.getSelection&&""+window.getSelection()||document.selection&&document.selection.createRange().text||(this.areaClipBoard||(this.areaClipBoard=n("<textarea />").css({position:"fixed",top:"50%",left:"50%",opacity:0,width:0,height:0}).appendTo(this.wrapper)),this.areaClipBoard.val(this.getTSV()).focus().select())},getTSV:function(){var c,t,f,h,u,e,i=this,r=i.select(),a="\t",o=i.options.allowCopy,l=!0;return n.isPlainObject(o)&&o.delimeter&&(a=o.delimeter),c="",r.length&&(r.eq(0).is("tr")&&(r=r.find("td:not(.k-group-cell)")),l&&r.filter(":visible"),t=[],f=this.columns.length,h=i._isLocked()&&s(i.columns).length,u=!0,n.each(r,function(r,e){var a,s,o,c;e=n(e),a=e.closest("tr"),s=a.index(),o=e.index(),l&&(o-=e.prevAll(":hidden").length),h&&u&&(u=n.contains(i.lockedTable[0],e[0])),i._groups()&&u&&(o-=i._groups()),o=u?o:o+h,f>o&&(f=o),c=e.text(),t[s]||(t[s]=[]),t[s][o]=c}),e=t.length,t=n.each(t,function(n,i){i&&(t[n]=i.slice(f),e>n&&(e=n))}),n.each(t.slice(e),function(n,t){c+=t?t.join(a)+"\r\n":"\r\n"})),c},clearArea:function(t){var i;this.areaClipBoard&&t&&t.target===this.areaClipBoard[0]&&(i=this.options.navigatable?n(this.current()).closest("table"):this.table,y(i,!0)),this.areaClipBoard&&(this.areaClipBoard.remove(),this.areaClipBoard=null)},_minScreenSupport:function(){var t=this.hideMinScreenCols();t&&(this.minScreenResizeHandler=e(this.hideMinScreenCols,this),n(window).on("resize",this.minScreenResizeHandler))},hideMinScreenCols:function(){var t=this.columns,n=window.innerWidth>0?window.innerWidth:screen.width;return this._iterateMinScreenCols(t,n)},_iterateMinScreenCols:function(n,i){for(var r,f,u=!1,e=0;e<n.length;e++)r=n[e],f=r.minScreenWidth,f!==t&&null!==f&&(u=!0,f>i?this.hideColumn(r):this.showColumn(r)),!r.hidden&&r.columns&&(u=this._iterateMinScreenCols(r.columns,i)||u);return u},_relatedRow:function(t){var i,u,r=this.lockedTable;return t=n(t),r?(i=t.closest(this.table.add(this.lockedTable)),u=i.find(">tbody>tr").index(t),i=i[0]===this.table[0]?r:this.table,i.find(">tbody>tr").eq(u)):t},clearSelection:function(){var n=this;n.selectable.clear(),n.trigger(d)},select:function(n){var i=this,r=i.selectable;return n=i.table.add(i.lockedTable).find(n),n.length?(r.options.multiple||(r.clear(),n=n.first()),i._isLocked()&&(n=n.add(n.map(function(){return i._relatedRow(this)}))),r.value(n),t):r.value()},selectedKeyNames:function(){var t,i=this,n=[];for(t in i._selectedIds)n.push(t);return n.sort(),n},_updateCurrentAttr:function(t,i){var r=n(t).data("headerId");n(t).removeClass(ci).closest("table").removeAttr("aria-activedescendant"),r?(r=r.replace(this._cellId,""),n(t).attr("id",r)):n(t).removeAttr("id"),i.data("headerId",i.attr("id")).attr("id",this._cellId).addClass(ci).closest("table").attr("aria-activedescendant",this._cellId),this._current=i},_scrollCurrent:function(){var t,u,o,s,i,e,r=this._current,f=this.options.scrollable;r&&f&&(t=r.parent(),u=t.closest("table").parent(),o=u.is(".k-grid-content-locked,.k-grid-header-locked"),s=u.is(".k-grid-content-locked,.k-grid-content,.k-virtual-scrollable-wrap"),i=n(this.content).find(">.k-virtual-scrollable-wrap").addBack().last()[0],s&&(f.virtual?(e=Math.max(h(t[0],this._items(t.parent())),0),this._rowVirtualIndex=this.virtualScrollable.itemIndex(e),this.virtualScrollable.scrollIntoView(t)):this._scrollTo(this._relatedRow(t)[0],i)),this.lockedContent&&(this.lockedContent[0].scrollTop=i.scrollTop),o||this._scrollTo(r[0],i))},current:function(n){return this._setCurrent(n,!0)},_setCurrent:function(t,i){var r=this._current;return t=n(t),t.length&&(r&&r[0]===t[0]||(this._updateCurrentAttr(r,t),this._scrollCurrent(),i||this.trigger(bu,{element:t}))),this._current},_removeCurrent:function(){this._current&&(this._current.removeClass(ci),this._current=null)},_scrollTo:function(t,r){var l,p=t.tagName.toLowerCase(),u="td"===p||"th"===p,s=t[u?"offsetLeft":"offsetTop"],v=t[u?"offsetWidth":"offsetHeight"],f=r[u?"scrollLeft":"scrollTop"],c=r[u?"clientWidth":"clientHeight"],y=s+v,e=0,h=0,a=0;it&&u&&(l=n(t).closest("table")[0],o.msie?h=l.offsetLeft:o.mozilla&&(a=l.offsetLeft-i.support.scrollbar())),f=Math.abs(f+h-a),e=f>s?s:y>f+c?v<=c?y-c:s:f,e=Math.abs(e+h)+a,r[u?"scrollLeft":"scrollTop"]=e},_navigatable:function(){var f,o,u,t=this;t.options.navigatable&&(f=t.table.add(t.lockedTable),o=t.thead.parent().add(n(">table",t.lockedHeader)),u=f,t.options.scrollable&&(u=u.add(o),o.attr(hi,-1)),this._navigatableTables=u,u.off("mousedown"+r+" focus"+r+" focusout"+r+" keydown"+r),o.on("keydown"+r,e(t._openHeaderMenu,t)).find("a.k-link").attr("tabIndex",-1),f.attr(hi,lt.max(f.attr(hi)||0,0)).on("mousedown"+r+" keydown"+r,".k-detail-cell",function(n){n.target!==n.currentTarget&&n.stopImmediatePropagation()}),u.on(i.support.touch?"touchstart"+r:"mousedown"+r,ft+">"+bt,e(nf,t)).on("focus"+r,e(t._tableFocus,t)).on("focusout"+r,e(t._tableBlur,t)).on("keydown"+r,e(t._tableKeyDown,t)))},_openHeaderMenu:function(n){n.altKey&&n.keyCode==w.DOWN&&(this.current().find(".k-grid-filter, .k-header-column-menu").click(),n.stopImmediatePropagation())},_setTabIndex:function(n){this._navigatableTables.attr(hi,-1),n.attr(hi,0)},_tableFocus:function(t){var r,u;i.support.touch||(r=this.current(),u=n(t.currentTarget),r&&r.is(":visible")?r.addClass(ci):this._setCurrent(u.find(rf)),this._setTabIndex(u))},_tableBlur:function(){var n=this.current();n&&n.removeClass(ci)},_tableKeyDown:function(i){var u,r=this.current(),o=this.virtualScrollable&&this.virtualScrollable.fetching(),e=n(i.target),f=!i.isDefaultPrevented()&&!e.is(":button,a,:input,a>.k-icon");return o?(i.preventDefault(),t):(r=r?r:n(this.lockedTable).add(this.table).find(rf),r.length&&(u=!1,f&&i.keyCode==w.UP&&(u=this._moveUp(r)),f&&i.keyCode==w.DOWN&&(u=this._moveDown(r)),f&&i.keyCode==(it?w.LEFT:w.RIGHT)&&(u=this._moveRight(r,i.altKey)),f&&i.keyCode==(it?w.RIGHT:w.LEFT)&&(u=this._moveLeft(r,i.altKey)),f&&i.keyCode==w.PAGEDOWN&&(u=this._handlePageDown()),f&&i.keyCode==w.PAGEUP&&(u=this._handlePageUp()),i.keyCode!=w.ENTER&&i.keyCode!=w.F2||(u=this._handleEnterKey(r,i.currentTarget,e)),i.keyCode==w.ESC&&(u=this._handleEscKey(r,i.currentTarget)),i.keyCode==w.TAB&&(u=this._handleTabKey(r,i.currentTarget,i.shiftKey)),u&&(i.preventDefault(),i.stopPropagation())),t)},_moveLeft:function(n,t){var r,u,f=n.parent(),i=f.parent();return t?this.collapseRow(f):(u=i.find(ft).index(f),r=this._prevHorizontalCell(i,n,u),r[0]||(i=this._horizontalContainer(i),r=this._prevHorizontalCell(i,n,u),r[0]!==n[0]&&y(i.parent(),!0)),this._setCurrent(r)),!0},_moveRight:function(n,t){var r,u,f=n.parent(),i=f.parent();return t?this.expandRow(f):(u=i.find(ft).index(f),r=this._nextHorizontalCell(i,n,u),r[0]||(i=this._horizontalContainer(i,!0),r=this._nextHorizontalCell(i,n,u),r[0]!==n[0]&&y(i.parent(),!0)),this._setCurrent(r)),!0},_moveUp:function(n){var t=n.parent().parent(),i=this._prevVerticalCell(t,n);return i[0]||(t=this._verticalContainer(t,!0),i=this._prevVerticalCell(t,n),i[0]&&y(t.parent(),!0)),this._setCurrent(i),!0},_moveDown:function(n){var t=n.parent().parent(),i=this._nextVerticalCell(t,n);return i[0]||(t=this._verticalContainer(t),i=this._nextVerticalCell(t,n),i[0]&&y(t.parent(),!0)),this._setCurrent(i),!0},_handlePageDown:function(){return!!this.options.pageable&&(this.dataSource.page(this.dataSource.page()+1),!0)},_handlePageUp:function(){return!!this.options.pageable&&(this.dataSource.page(this.dataSource.page()-1),!0)},_handleTabKey:function(t,i,r){var u,f=this.options.editable&&"incell"==this._editMode();return!(!f||t.is("th"))&&(u=n(at()).closest(".k-edit-cell"),u[0]&&u[0]!==t[0]&&(t=u),u=this._tabNext(t,i,r),!!u.length&&(this._handleEditing(t,u,u.closest("table")),!0))},_handleEscKey:function(t,i){var u,r=at(),f="incell"==this._editMode();return ve(t)?(f?this.closeCell(!0):(u=n(t).parent().index(),r&&r.blur(),this.cancelRow(!0),u>=0&&this._setCurrent(this.items().eq(u).children(bt).first())),o.msie&&o.version<9&&document.body.focus(),y(i,!0),!0):!!t.has(r).length&&(y(i,!0),!0)},_toggleCurrent:function(n,t){var i=n.parent();return i.is(".k-grouping-row")?(i.find(".k-icon:first").click(),!0):!(t||!i.is(".k-master-row"))&&(i.find(".k-icon:first").click(),!0)},_handleEnterKey:function(t,i,r){var f,e=this.options.editable&&this.options.editable.update!==!1,u=r.closest("[role=gridcell]");return r.is("table")||n.contains(t[0],r[0])||(t=u),t.is("th")?(t.find(".k-link").click(),!0):!!this._toggleCurrent(t,e)||(f=t.find(":kendoFocusable:first"),f[0]&&!t.hasClass("k-edit-cell")&&t.hasClass("k-state-focused")?(f.focus(),!0):!(!e||r.is(":button,.k-button,textarea"))&&(u[0]||(u=t),this._handleEditing(u,!1,i),!0))},_nextHorizontalCell:function(n,t,i){var r,e,u,f=t.nextAll(p);return f.length||(r=n.find(ft),e=r.index(t.parent()),e!=-1)?f.first():t.hasClass("k-header")?(u=[],yi([s(this.columns)[0]],li(r.eq(0).children().first()),u,0,0),u[i]?u[i][0]:t):t.parent().hasClass("k-filter-row")?r.last().children(p).first():r.eq(i).children(p).first()},_prevHorizontalCell:function(n,t,i){var r,o,u,f,e=t.prevAll(p);return e.length||(r=n.find(ft),o=r.index(t.parent()),o!=-1)?e.first():t.hasClass("k-header")?(u=[],f=s(this.columns),yi([f[f.length-1]],li(r.eq(0).children().last()),u,0,0),u[i]?u[i][0]:t):t.parent().hasClass("k-filter-row")?r.last().children(p).last():r.eq(i).children(p).last()},_currentDataIndex:function(n,i){var u,r=i.attr("data-index");return r?(u=s(this.columns).length,u&&!n.closest("div").hasClass("k-grid-content-locked")[0]?r-u:r):t},_prevVerticalCell:function(t,i){var f,r=i.parent(),o=t.children(ft),e=o.index(r),u=this._currentDataIndex(t,i);if(u||i.hasClass("k-header"))return f=ku(i),f.eq(f.length-2);if(u=r.children(p).index(i),r.hasClass("k-filter-row"))return g(t).eq(u);if(e==-1){if(r=t.find(".k-filter-row"),!r[0])return g(t).eq(u)}else r=0===e?n():o.eq(e-1);return f=r.children(p),f.eq(f.length>u?u:0)},_nextVerticalCell:function(n,i){var e,u=i.parent(),o=n.children(ft),f=o.index(u),r=this._currentDataIndex(n,i);return f!=-1&&r===t&&i.hasClass("k-header")?li(i).eq(1):(r=r?parseInt(r,10):u.children(p).index(i),u=o.eq(f==-1?0:f+i[0].rowSpan),e=u.children(p),e.eq(e.length>r?r:0))},_verticalContainer:function(n,t){var r=n.parent(),u=this._navigatableTables.length,f=Math.floor(u/2),i=h(r[0],this._navigatableTables);return t&&(f*=-1),i+=f,(i>=0||i<u)&&(r=this._navigatableTables.eq(i)),r.find(t?"thead":"tbody")},_horizontalContainer:function(n,t){var u,i,r=this._navigatableTables.length;return r<=2?n:(u=n.parent(),i=h(u[0],this._navigatableTables),i+=t?1:-1,!t||2!=i&&i!=r?!t&&(1==i||i<0)?n:this._navigatableTables.eq(i).find("thead, tbody"):n)},_tabNext:function(n,t,i){var u=!0,r=i?n.prevAll(p+":first"):n.nextAll(":visible:first");return r.length||(r=n.parent(),this.lockedTable&&(u=i&&t==this.lockedTable[0]||!i&&t==this.table[0],r=this._relatedRow(r)),u&&(r=r[i?"prevAll":"nextAll"]("tr:not(.k-grouping-row):not(.k-detail-row):visible:first")),r=r.children(p+(i?":last":":first"))),r},_handleEditing:function(i,r,u){var l,c,f=this,e=n(at()),h=f._editMode(),v=o.msie,a=v&&o.version<9,s=f._editContainer,w=f.options.editable&&f.options.editable.update!==!1;if(u=n(u),c="incell"==h?i.hasClass("k-edit-cell"):i.parent().hasClass("k-grid-edit-row"),f.editable){if(n.contains(s[0],e[0])&&(o.opera||a?e.blur().change().triggerHandler("blur"):(e.blur(),v&&e.blur())),!f.editable)return y(u),t;if(!f.editable.end())return f._setCurrent("incell"==h?s:s.children().filter(p).first()),l=s.find(":kendoFocusable:first")[0],l&&l.focus(),t;"incell"==h?f.closeCell():(f.saveRow(),c=!0)}r&&f._setCurrent(r),a&&document.body.focus(),y(u,!0),w&&(!c&&!r||r)&&("incell"==h?f.editCell(f.current()):f.editRow(f.current().parent()))},_wrapper:function(){var n=this,r=n.table,i=n.options.height,t=n.element;t.is("div")||(t=t.wrap("<div/>").parent()),n.wrapper=t.addClass("k-grid k-widget k-display-block"),i&&(n.wrapper.css(fr,i),r.css(fr,"auto")),n._initMobile()},_initMobile:function(){var u,r=this.options,t=this;this._isMobile=r.mobile===!0&&i.support.mobileOS||"phone"===r.mobile||"tablet"===r.mobile,this._isMobile&&(u=this.wrapper.addClass("k-grid-mobile").wrap("<div data-"+i.ns+'stretch="true" data-'+i.ns+'role="view" data-'+i.ns+'init-widgets="false"></div>').parent(),this.pane=i.mobile.ui.Pane.wrap(u),this.view=this.pane.view(),this._actionSheetPopupOptions=n(document.documentElement).hasClass("km-root")?{modal:!1}:{align:"bottom center",position:"bottom center",effect:"slideIn:up"},r.height&&this.pane.element.parent().css(fr,r.height),this._editAnimation="slide",this.view.bind("show",function(){t._isLocked()&&(t._updateTablesWidth(),t._applyLockedContainersWidth(),t._syncLockedContentHeight(),t._syncLockedHeaderHeight(),t._syncLockedFooterHeight())}))},_tbody:function(){var t,r=this,i=r.table;t=i.find(">tbody"),t.length||(t=n("<tbody/>").appendTo(i)),r.tbody=t.attr("role","rowgroup")},_scrollable:function(){var f,o,s,u,t=this,l=t.options,e=l.scrollable,h=e!==!0&&e.virtual&&!t.virtualScrollable,c=!i.support.kineticScrollNeeded||h?i.support.scrollbar():0;e&&(f=t.wrapper.children(".k-grid-header"),f[0]||(f=n('<div class="k-grid-header" />').insertBefore(t.table)),f.css(it?"padding-left":"padding-right",e.virtual?c+1:c),o=n('<table role="grid" />'),ni&&o.attr("cellspacing",0),o.width(t.table[0].style.width),o.append(t.thead),f.empty().append(n('<div class="k-grid-header-wrap k-auto-scrollable" />').append(o)),t.content=t.table.parent(),t.content.is(".k-virtual-scrollable-wrap, .km-scroll-container")&&(t.content=t.content.parent()),t.content.is(".k-grid-content, .k-virtual-scrollable-wrap")||(t.content=t.table.wrap('<div class="k-grid-content k-auto-scrollable" />').parent()),h&&(t.virtualScrollable=new au(t.content,{dataSource:t.dataSource,itemHeight:function(){return t._averageRowHeight()}})),t.scrollables=f.children(".k-grid-header-wrap").add(t.content),s=t.wrapper.find(".k-grid-footer"),s.length&&(t.scrollables=t.scrollables.add(s.children(".k-grid-footer-wrap"))),e.virtual?t.content.find(">.k-virtual-scrollable-wrap").unbind("scroll"+r).bind("scroll"+r,function(){t.scrollables.scrollLeft(this.scrollLeft),t.lockedContent&&(t.lockedContent[0].scrollTop=this.scrollTop)}):(t.content.unbind("scroll"+r).bind("scroll"+r,function(n){t.scrollables.not(n.currentTarget).scrollLeft(this.scrollLeft),t.lockedContent&&n.currentTarget==t.content[0]&&(t.lockedContent[0].scrollTop=this.scrollTop)}),u=t.content.data("kendoTouchScroller"),u&&u.destroy(),u=i.touchScroller(t.content),u&&u.movable&&(t.touchScroller=u,u.movable.bind("change",function(n){t.scrollables.scrollLeft(-n.sender.x),t.lockedContent&&t.lockedContent.scrollTop(-n.sender.y)}),t.one(nr,function(n){n.sender.wrapper.addClass("k-grid-backface")}))))},_renderNoRecordsContent:function(){var i,t=this;t.options.noRecords&&(i=t.table.parent().children("."+dr),i.length&&(t.angular("cleanup",function(){return{elements:i.get()}}),i.remove()),t.dataSource&&t.dataSource.view().length||(i=n(t.noRecordsTemplate({})).insertAfter(t.table),t.angular("compile",function(){return{elements:i.get(),data:[{}]}})))},_setContentWidth:function(t){var r,i=this,f="k-grid-content-expander",o='<div class="'+f+'"></div>',u=i.resizable;i.options.scrollable&&i.wrapper.is(":visible")&&(r=i.table.parent().children("."+f),i._setContentWidthHandler=e(i._setContentWidth,i),i.dataSource&&i.dataSource.view().length?r[0]&&(r.remove(),u&&u.unbind("resize",i._setContentWidthHandler)):(r[0]||(r=n(o).appendTo(i.table.parent()),u&&u.bind("resize",i._setContentWidthHandler)),i.thead&&(r.width(i.thead.width()),isNaN(parseFloat(t,10))||i.content.scrollLeft(t))),i._applyLockedContainersWidth(),i.lockedHeader&&0===i.table[0].clientWidth&&(i.table[0].style.width="1px"))},_applyLockedContainersWidth:function(){if(this.options.scrollable&&this.lockedHeader){var r,u=this.thead.parent(),f=u.parent(),t=this.wrapper[0].clientWidth,s=this._groups(),o=i.support.scrollbar(),h=this.lockedHeader.find(">table>colgroup>col:not(.k-group-col, .k-hierarchy-col)"),c=u.find(">colgroup>col:not(.k-group-col, .k-hierarchy-col)"),n=vu(h),e=vu(c);s>0&&(n+=nt(this.lockedHeader.find(".k-group-cell:first"))*s),n>=t&&(n=t-3*o),this.lockedHeader.add(this.lockedContent).width(n),f[0].style.width=f.parent().width()-n-2+"px",u.add(this.table).width(e),this.virtualScrollable&&(t-=o),this.content[0].style.width=t-n-2+"px",this.lockedFooter&&this.lockedFooter.length&&(this.lockedFooter.width(n),r=this.footer.find(".k-grid-footer-wrap"),r[0].style.width=f[0].clientWidth+"px",r.children().first().width(e))}},_setContentHeight:function(){var f,n=this,u=n.options,t=n.wrapper.innerHeight(),e=n.wrapper.children(".k-grid-header"),r=i.support.scrollbar();u.scrollable&&n.wrapper.is(":visible")&&(t-=st(e),n.pager&&(t-=st(n.pager.element)),u.groupable&&(t-=st(n.wrapper.children(".k-grouping-header"))),u.toolbar&&(t-=st(n.wrapper.children(".k-grid-toolbar"))),n.footerTemplate&&(t-=st(n.wrapper.children(".k-grid-footer"))),f=function(n){var i,t;return!!n[0].style.height||(i=n.height(),n.height("auto"),t=n.height(),i!=t?(n.height(""),!0):(n.height(""),!1))},f(n.wrapper)&&(t>2*r?(n.lockedContent&&(r=n.table[0].offsetWidth>n.table.parent()[0].clientWidth?r:0,n.lockedContent.height(t-r)),n.content.height(t)):n.content.height(2*r+1)))},_averageRowHeight:function(){var i,n=this,r=n._items(n.tbody).length,t=n._rowHeight;return 0===r?t:(n._rowHeight||(n._rowHeight=t=st(n.table)/r,n._sum=t,n._measures=1),i=st(n.table)/r,t!==i&&(n._measures++,n._sum+=i,n._rowHeight=n._sum/n._measures),t)},_dataSource:function(){var r,n=this,u=n.options,i=u.dataSource;i=yt(i)?{data:i}:i,c(i)&&(f(i,{table:n.table,fields:n.columns}),r=u.pageable,c(r)&&r.pageSize!==t&&(i.pageSize=r.pageSize)),n.dataSource&&n._refreshHandler?n.dataSource.unbind(d,n._refreshHandler).unbind(cr,n._progressHandler).unbind(hr,n._errorHandler):(n._refreshHandler=e(n.refresh,n),n._progressHandler=e(n._requestStart,n),n._errorHandler=e(n._error,n)),n.dataSource=ff.create(i).bind(d,n._refreshHandler).bind(cr,n._progressHandler).bind(hr,n._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_modelChange:function(t){var s,o,l,f,p,a,g,b,k,v,r=this,d=r.tbody,h=t.model,e=r.tbody.find("tr["+i.attr("uid")+"="+h.uid+"]"),w=e.hasClass("k-alt"),c=r._items(d).index(e),y=r.lockedContent;if(y&&(s=r._relatedRow(e)),e.add(s).children(".k-edit-cell").length&&!r.options.rowTemplate)e.add(s).children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){o=n(this),l=u(r.columns)[r.cellIndex(o)],l.field===t.field&&(o.hasClass("k-edit-cell")?o.addClass("k-dirty-cell"):(r._displayCell(o,l,h),n('<span class="k-dirty"/>').prependTo(o)))});else if(!e.hasClass("k-grid-edit-row")){for(a=n().add(e),y&&(f=(w?r.lockedAltRowTemplate:r.lockedRowTemplate)(h),a=a.add(s),s.replaceWith(f)),r.angular("cleanup",function(){return{elements:a.get()}}),f=(w?r.altRowTemplate:r.rowTemplate)(h),e.replaceWith(f),f=r._items(d).eq(c),v=[{dataItem:h}],y&&(e=e.add(s),s=r._relatedRow(f)[0],ei(f[0],s),f=f.add(s),v.push({dataItem:h})),r.angular("compile",function(){return{elements:f.get(),data:v}}),p=r.options.selectable,p&&e.hasClass("k-state-selected")&&r.select(f),b=a.children(":not(.k-group-cell,.k-hierarchy-cell)"),g=f.children(":not(.k-group-cell,.k-hierarchy-cell)"),c=0,k=r.columns.length;c<k;c++)l=r.columns[c],o=g.eq(c),p&&b.eq(c).hasClass("k-state-selected")&&o.addClass("k-state-selected"),l.field===t.field&&n('<span class="k-dirty"/>').prependTo(o);r.trigger("itemChange",{item:f,data:h,ns:ut})}},_pageable:function(){var u,t=this,r=t.options.pageable;r&&(u=t.wrapper.children("div.k-grid-pager"),u.length||(u=n('<div class="k-pager-wrap k-grid-pager"/>').appendTo(t.wrapper)),t.pager&&t.pager.destroy(),t.pager="object"==typeof r&&r instanceof i.ui.Pager?r:new i.ui.Pager(u,f({},r,{dataSource:t.dataSource})),t.pager.bind("pageChange",function(n){t.trigger("page",{page:n.index})&&n.preventDefault()}))},_footer:function(){var f,e,o,t=this,s=t.dataSource.aggregates(),u="",h=t.footerTemplate,r=t.options,i=t.footer||t.wrapper.find(".k-grid-footer");h?(u=n(t._wrapFooter(h(s))),i.length?(e=u,t.angular("cleanup",function(){return{elements:i.get()}}),i.replaceWith(e),i=t.footer=e):i=t.footer=r.scrollable?r.pageable?u.insertBefore(t.wrapper.children("div.k-grid-pager")):u.appendTo(t.wrapper):u.insertBefore(t.tbody),t.angular("compile",function(){return{elements:i.find("td:not(.k-group-cell, .k-hierarchy-cell)").get(),data:si(t.columns,function(n){return{column:n,aggregate:s[n.field]}})}})):i&&!t.footer&&(t.footer=i),i.length&&(r.scrollable&&(f=i.attr("tabindex",-1).children(".k-grid-footer-wrap"),t.scrollables=n(t.scrollables.filter(function(){return!n(this).is(".k-grid-footer-wrap")}).toArray()).add(f)),t._footerWidth&&i.find("table").css("width",t._footerWidth),f&&(o=t.content.scrollLeft(),r.scrollable!==!0&&r.scrollable.virtual&&(o=t.wrapper.find(".k-virtual-scrollable-wrap").scrollLeft()),f.scrollLeft(o))),t.lockedContent&&(t._appendLockedColumnFooter(),t._applyLockedContainersWidth(),t._syncLockedFooterHeight())},_wrapFooter:function(t){var u=this,r="",f=i.support.mobileOS?0:i.support.scrollbar();return u.options.scrollable?(r=n('<div class="k-grid-footer"><div class="k-grid-footer-wrap"><table'+(ni?' cellspacing="0"':"")+"><tbody>"+t+"</tbody></table></div></div>"),u._appendCols(r.find("table")),r.css(it?"padding-left":"padding-right",f),r):'<tfoot class="k-grid-footer">'+t+"</tfoot>"},_columnMenu:function(){var v,n,p,k,o,w,c,d,a,r=this,nt=u(r.columns),h=r.options,e=h.columnMenu,ft=l(r.columns,function(n){return n.columns!==t}).length>0,et=this._isMobile,it=function(n){r.trigger(vf,{field:n.field,container:n.container})},ot=function(n){r.trigger(pf,{field:n.field,container:n.container})},ut=function(n){y(n.closest("table"),!0)},tt=function(n){r.trigger("sort",{sort:n.sort})&&n.preventDefault()},rt=function(n){r.trigger("filter",{filter:n.filter,field:n.field})&&n.preventDefault()},b=h.$angular;if(e)for("boolean"==typeof e&&(e={}),w=g(r.thead),c=0,d=w.length;c<d;c++)n=nt[c],a=w.eq(c),n.command||!n.field&&!a.attr("data-"+i.ns+"field")||(v=a.data("kendoColumnMenu"),v&&v.destroy(),k=n.sortable!==!1&&e.sortable!==!1&&h.sortable!==!1&&f({},h.sortable,{compare:(n.sortable||{}).compare}),o=!(!h.filterable||n.filterable===!1||e.filterable===!1)&&f({pane:r.pane},h.filterable,n.filterable),n.filterable&&n.filterable.dataSource&&(o.forceUnique=!1,o.checkSource=n.filterable.dataSource),o&&(o.format=n.format),p={dataSource:r.dataSource,values:n.values,columns:e.columns,sortable:k,filterable:o,messages:e.messages,owner:r,closeCallback:ut,init:it,open:ot,pane:r.pane,sort:tt,filtering:rt,filter:et?":not(.k-column-active)":"",lockedColumns:!ft&&n.lockable!==!1&&s(nt).length>0},b&&(p.$angular=b),a.kendoColumnMenu(p))},_headerCells:function(){return this.thead.find("th").filter(function(){var t=n(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")})},_filterable:function(){var s,l,c,n,a,t,h,r=this,e=u(r.columns),b=function(n){r.trigger(cf,{field:n.field,container:n.container})},w=function(n){y(n.closest("table"),!0)},k=function(n){r.trigger("filter",{filter:n.filter,field:n.field})&&n.preventDefault()},p=function(n){r.trigger(af,{field:n.field,container:n.container})},o=r.options.filterable;if(o&&typeof o.mode==v&&o.mode.indexOf("menu")==-1&&(o=!1),o&&!r.options.columnMenu)for(l=g(r.thead),n=0,a=l.length;n<a;n++)c=l.eq(n),e[n].filterable===!1||e[n].command||!e[n].field&&!c.attr("data-"+i.ns+"field")||(s=c.data("kendoFilterMenu"),s&&s.destroy(),s=c.data("kendoFilterMultiCheck"),s&&s.destroy(),t=e[n].filterable,h=f({},o,t,{dataSource:r.dataSource,values:e[n].values,format:e[n].format,closeCallback:w,title:e[n].title||e[n].field,init:b,open:p,pane:r.pane,change:k}),t&&t.messages&&(h.messages=f(!0,{},o.messages,t.messages)),t&&t.dataSource&&(h.forceUnique=!1,h.checkSource=t.dataSource),t&&t.multi?c.kendoFilterMultiCheck(h):c.kendoFilterMenu(h))},_filterRow:function(){var y,v,l,k,d,b,c,s,t,w,p,o,h,r,a,e=this;if(e._hasFilterRow())for(v=e.options.$angular,l=u(e.columns),k=e.options.filterable,d=e.thead.find(".k-filter-row"),b=function(n){e.trigger("filter",{filter:n.filter,field:n.field})&&n.preventDefault()},this._updateHeader(this.dataSource.group().length),c=0;c<l.length;c++)if(t=l[c],w=e.options.filterable.operators,p=!1,o=n("<th/>"),h=t.field,t.hidden&&o.hide(),d.append(o),h&&t.filterable!==!1){if(r=t.filterable&&t.filterable.cell||{},s=e.options.dataSource,s instanceof ff&&(s=e.options.dataSource.options),a=f(!0,{},k.messages),t.filterable&&f(!0,a,t.filterable.messages),r.enabled===!1){o.html("&nbsp;");continue}r.dataSource&&(s=r.dataSource,p=!0),t.filterable&&t.filterable.operators&&(w=t.filterable.operators),y={column:t,dataSource:e.dataSource,suggestDataSource:s,customDataSource:p,field:h,messages:a,values:t.values,template:r.template,delay:r.delay,inputWidth:r.inputWidth,suggestionOperator:r.suggestionOperator,minLength:r.minLength,dataTextField:r.dataTextField,operator:r.operator,operators:w,showOperators:r.showOperators,change:b},v&&(y.$angular=v),n("<span/>").attr(i.attr("field"),h).appendTo(o).kendoFilterCell(y)}else o.html("&nbsp;")},_sortable:function(){var n,o,s,e,t,c,r=this,a=u(r.columns),h=r.options.sortable,l=function(n){r.trigger("sort",{sort:n.sort})&&n.preventDefault()};if(h){for(e=g(r.thead),t=0,c=e.length;t<c;t++)n=a[t],n.sortable!==!1&&!n.command&&n.field&&(s=e.eq(t),o=s.data("kendoColumnSorter"),o&&o.destroy(),s.attr("data-"+i.ns+"field",n.field).kendoColumnSorter(f({},h,n.sortable,{dataSource:r.dataSource,aria:!0,filter:":not(.k-column-active)",change:l})));e=null}},_columns:function(t){var o,u,h,r=this,e=r.table,c=e.find("col"),f=r.options.dataSource;if(t=t.length?t:si(e.find("th"),function(t,r){t=n(t);var s=t.attr(i.attr("sortable")),h=t.attr(i.attr("filterable")),l=t.attr(i.attr("type")),o=t.attr(i.attr("groupable")),u=t.attr(i.attr("field")),e=t.attr(i.attr("title")),f=t.attr(i.attr("menu"));return u||(u=t.text().replace(/\s|[^A-z0-9]/g,"")),{field:u,type:l,title:e,sortable:"false"!==s,filterable:"false"!==h,groupable:"false"!==o,menu:f,template:t.attr(i.attr("template")),width:c.eq(r).css("width")}}),o=!(r.table.find("tbody tr").length>0&&(!f||!f.transport)),r.options.scrollable){if(h=t,u=s(t),t=ht(t),u.length>0&&0===t.length)throw Error("There should be at least one non locked column");se(r.element.find("tr:has(th):first"),h),t=u.concat(t)}r.columns=tf(t,o)},_groups:function(){var n=this.dataSource.group();return n?n.length:0},_tmpl:function(n,t,r,u){var h,y,o,k,s=this,w=f({},i.Template,s.options.templateSettings),v=t.length,l={storage:{},count:0},a=s._hasDetails(),c=[],p=s._groups(),b=s.options.navigatable;if(!n){for(n="<tr",r&&c.push("k-alt"),a&&c.push("k-master-row"),c.length&&(n+=' class="'+c.join(" ")+'"'),v&&(n+=" "+i.attr("uid")+'="#='+i.expr("uid",w.paramName)+'#"'),n+=" role='row'>",p>0&&!u&&(n+=wi(p)),a&&(n+='<td class="k-hierarchy-cell"><a class="k-icon k-i-expand" href="\\#" '+oi+'="'+or+'" tabindex="-1"></a></td>'),h=0;h<v;h++)o=t[h],y=o.template,k=typeof y,n+="<td"+ui(o.attributes),b&&(n+=" aria-describedby='"+o.headerAttributes.id+"'"),n+=" role='gridcell'>",n+=s._cellTmpl(o,l),n+="</td>";n+="</tr>"}return n=i.template(n,w),l.count>0?e(n,l.storage):n},_headerCellText:function(n){var o=this,e=f({},i.Template,o.options.templateSettings),t=n.headerTemplate,u=typeof t,r=n.title||n.field||"";return u===pt?r=i.template(t,e)({}):u===v&&(r=t),r},_cellTmpl:function(n,t){var e,w,s=this,y=f({},i.Template,s.options.templateSettings),l=n.template,a=y.paramName,u=n.field,r="",h=n.format,p=typeof l,o=n.values;if(n.command){if(yt(n.command)){for(e=0,w=n.command.length;e<w;e++)r+=n.command[e].visible?i.format("#= {0}(data)? '{1}':'' #",n.command[e].visible,s._createButton(n.command[e]).replace(ii,"\\#")):s._createButton(n.command[e]).replace(ii,"\\#");return r}return s._createButton(n.command).replace(ii,"\\#")}return p===pt?(t.storage["tmpl"+t.count]=l,r+="#=this.tmpl"+t.count+"("+a+")#",t.count++):p===v?r+=l:o&&o.length&&c(o[0])&&"value"in o[0]&&u?(r+="#var v ="+i.stringify(nu(o)).replace(ii,"\\#")+"#",r+="#var f = v[",y.useWithBlock||(r+=a+"."),r+=u+"]#",r+="${f != null ? f : ''}"):(r+=n.encoded?"#:":"#=",h&&(r+='kendo.format("'+h.replace(gf,"\\$1")+'",'),u?(u=i.expr(u,a),r+=u+"==null?'':"+u):r+="''",h&&(r+=")"),r+="#"),r},_templates:function(){var t=this,i=t.options,h=t.dataSource,c=h.group(),a=t.footer||t.wrapper.find(".k-grid-footer"),r=h.aggregate(),o=u(t.columns),f=u(s(t.columns)),e=i.scrollable?u(ht(t.columns)):o;if(i.scrollable&&f.length){if(i.rowTemplate||i.altRowTemplate)throw Error("Having both row template and locked columns is not supported");t.rowTemplate=t._tmpl(i.rowTemplate,e,!1,!0),t.altRowTemplate=t._tmpl(i.altRowTemplate||i.rowTemplate,e,!0,!0),t.lockedRowTemplate=t._tmpl(i.rowTemplate,f),t.lockedAltRowTemplate=t._tmpl(i.altRowTemplate||i.rowTemplate,f,!0)}else t.rowTemplate=t._tmpl(i.rowTemplate,e),t.altRowTemplate=t._tmpl(i.altRowTemplate||i.rowTemplate,e,!0);t._hasDetails()&&(t.detailTemplate=t._detailTmpl(i.detailTemplate||"")),(t._group&&!ou(r)||!ou(r)&&!a.length||l(o,function(n){return n.footerTemplate}).length)&&(t.footerTemplate=t._footerTmpl(o,r,"footerTemplate","k-footer-template")),c&&l(o,function(n){return n.groupFooterTemplate}).length&&(r=n.map(c,function(n){return n.aggregates}),t.groupFooterTemplate=t._footerTmpl(e,r,"groupFooterTemplate","k-group-footer",f.length),i.scrollable&&f.length&&(t.lockedGroupFooterTemplate=t._footerTmpl(f,r,"groupFooterTemplate","k-group-footer"))),t.options.noRecords&&(t.noRecordsTemplate=t._noRecordsTmpl())},_noRecordsTmpl:function(){var u,e,r,l='<div class="{0}">{1}</div>',s='<div class="k-grid-norecords-template"{1}>{0}</div>',c=this.options.scrollable&&!this.wrapper[0].style.height?' style="margin:0 auto;position:static;"':"",t={storage:{},count:0},o=n.extend({},i.Template,this.options.templateSettings),h=o.paramName,f="";return u=this.options.noRecords.template?this.options.noRecords.template:i.format(s,this.options.messages.noRecords,c),e=typeof u,"function"===e?(t.storage["tmpl"+t.count]=u,f+="#=this.tmpl"+t.count+"("+h+")#",t.count++):"string"===e&&(f+=u),r=i.template(i.format(l,dr,f),o),t.count>0&&(r=n.proxy(r,t.storage)),r},_footerTmpl:function(n,t,r,u,o){var v,k,h,g,c,l=this,y=f({},i.Template,l.options.templateSettings),d=y.paramName,s="",b={},a=0,w={},p=l._groups(),nt=l.dataSource._emptyAggregates(t);for(s+='<tr class="'+u+'">',p>0&&!o&&(s+=wi(p)),l._hasDetails()&&(s+='<td class="k-hierarchy-cell">&nbsp;</td>'),v=0,k=n.length;v<k;v++)c=n[v],h=c[r],g=typeof h,s+="<td"+ui(c.footerAttributes)+">",h?(g!==pt&&(w=nt[c.field]?f({},y,{paramName:d+"['"+c.field+"']"}):{},h=i.template(h,w)),b["tmpl"+a]=h,s+="#=this.tmpl"+a+"("+d+")#",a++):s+="&nbsp;",s+="</td>";return s+="</tr>",s=i.template(s,y),a>0?e(s,b):s},_detailTmpl:function(n){var o=this,t="",c=f({},i.Template,o.options.templateSettings),v=c.paramName,h={},r=0,s=o._groups(),l=b(u(o.columns)).length,a=typeof n;return t+='<tr class="k-detail-row">',s>0&&(t+=wi(s)),t+='<td class="k-hierarchy-cell"></td><td class="k-detail-cell"'+(l?' colspan="'+l+'"':"")+">",a===pt?(h["tmpl"+r]=n,t+="#=this.tmpl"+r+"("+v+")#",r++):t+=n,t+="</td></tr>",t=i.template(t,c),r>0?e(t,h):t},_hasDetails:function(){var n=this;return null!==n.options.detailTemplate||(n._events[lr]||[]).length},_hasFilterRow:function(){var i=this.options.filterable,r=i&&typeof i.mode==v&&i.mode.indexOf("row")!=-1,t=this.columns,u=n.grep(t,function(n){return n.filterable===!1});return t.length&&u.length==t.length&&(r=!1),r},_details:function(){var t=this;if(t.options.scrollable&&t._hasDetails()&&s(t.columns).length)throw Error("Having both detail template and locked columns is not supported");t.table.on(a+r,".k-hierarchy-cell .k-i-expand, .k-hierarchy-cell .k-i-collapse",function(i){var r,e,o=n(this),u=o.hasClass("k-i-expand"),f=o.closest("tr.k-master-row"),c=t.detailTemplate,h=t._hasDetails(),s=u?er:or;return o.toggleClass("k-i-expand",!u).toggleClass("k-i-collapse",u).attr(oi,s),r=f.next(),h&&!r.hasClass("k-detail-row")&&(e=t.dataItem(f),r=n(c(e)).addClass(f.hasClass("k-alt")?"k-alt":"").insertAfter(f),t.angular("compile",function(){return{elements:r.get(),data:[{dataItem:e}]}}),t.trigger(lr,{masterRow:f,detailRow:r,data:e,detailCell:r.find(".k-detail-cell")})),t.trigger(u?yf:eu,{masterRow:f,detailRow:r}),r.toggle(u),t._current&&t._current.attr("aria-expanded",u),i.preventDefault(),!1})},dataItem:function(t){if(t=n(t)[0],!t)return null;for(var f=this.tbody.children(),e=/k-grouping-row|k-detail-row|k-group-footer/,u=t.sectionRowIndex,r=u,i=0;i<u;i++)e.test(f[i].className)&&r--;return this._data[r]},expandRow:function(t){n(t).find("> td .k-i-expand").click()},collapseRow:function(t){n(t).find("> td .k-i-collapse").click()},_createHeaderCells:function(n,r){for(var e,c,l,s,a=this,f="",y=u(a.columns),o=0,v=n.length;o<v;o++)e=n[o].column||n[o],c=a._headerCellText(e),l="",s=h(e,y),e.command?(f+="<th scope='col'"+ui(e.headerAttributes),r&&!n[o].colSpan&&(f+=" rowspan='"+r+"'"),s>-1&&(f+=i.attr("index")+"='"+s+"'"),f+=">"+c+"</th>"):(e.field&&(l=i.attr("field")+"='"+e.field+"' "),f+="<th scope='col' role='columnheader' "+l,f+=" aria-haspopup='true'",r&&!n[o].colSpan&&(f+=" rowspan='"+r+"'"),n[o].colSpan>1&&(f+='colspan="'+(n[o].colSpan-dt(e.columns))+'" ',f+=i.attr("colspan")+"='"+n[o].colSpan+"'"),e.title&&(f+=i.attr("title")+'="'+e.title.replace('"',"&quot;").replace(/'/g,"'")+'" '),e.groupable!==t&&(f+=i.attr("groupable")+"='"+e.groupable+"' "),e.aggregates&&e.aggregates.length&&(f+=i.attr("aggregates")+"='"+e.aggregates+"'"),s>-1&&(f+=i.attr("index")+"='"+s+"'"),f+=ui(e.headerAttributes),f+=">"+c+"</th>");return f},_appendLockedColumnContent:function(){for(var e,i,f,r=this.columns,s=this.table.find("colgroup"),a=s.find("col:not(.k-group-col,.k-hierarchy-col)"),o=n(),h=0,c=0,t=0,l=r.length;t<l;t++)if(r[t].locked)if(ot(r[t])){for(i=1,r[t].columns&&(i=u(r[t].columns).length-dt(r[t].columns)),i=i||1,f=0;f<i;f++)o=o.add(a.eq(t+c+f-h));c+=i-1}else h++;e=n('<div class="k-grid-content-locked"><table'+(ni?' cellspacing="0"':"")+"><colgroup/><tbody></tbody></table></div>"),s.detach(),e.find("colgroup").append(o),s.insertBefore(this.table.find("tbody")),this.lockedContent=e.insertBefore(this.content),this.lockedTable=e.children("table")},_appendLockedColumnFooter:function(){for(var f=this,h=f.footer,c=h.find(".k-footer-template>td"),l=h.find(".k-grid-footer-wrap>table>colgroup>col"),o=n('<div class="k-grid-footer-locked"><table><colgroup /><tbody><tr class="k-footer-template"></tr></tbody></table></div>'),a=f._groups(),r=n(),i=n(),r=r.add(c.filter(".k-group-cell")),t=0,e=u(s(f.columns)).length;t<e;t++)r=r.add(c.eq(t+a));for(i=i.add(l.filter(".k-group-col")),t=0,e=b(u(yr(f.columns))).length;t<e;t++)i=i.add(l.eq(t+a));r.appendTo(o.find("tr")),i.appendTo(o.find("colgroup")),f.lockedFooter=o.prependTo(h)},_appendLockedColumnHeader:function(t){for(var l,nt,it,s,tt,o,a,c,w,f=this,r=this.columns,e=[],b=0,p=n(),ut=f._hasFilterRow(),rt=0,y=n(),h=0,d=n(),k=f.thead.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),et=f.thead.find("tr:first .k-header:not(.k-group-cell,.k-hierarchy-cell)"),ft=f.thead.find(".k-filter-row").find("th:not(.k-group-cell,.k-hierarchy-cell)"),g=0,i=0,v=r.length;i<v;i++){if(r[i].locked){if(tt=et.eq(i),h=u(r[i].columns||[]).length,ot(r[i])){for(o=null,r[i].columns&&(o=h-dt(r[i].columns)),o=o||1,a=0;a<o;a++)p=p.add(k.eq(i+g+a-b));g+=o-1}for(yi([r[i]],li(tt),e,0,0),h=h||1,c=0;c<h;c++)y=y.add(ft.eq(rt+c));rt+=h}r[i].columns&&(b+=dt(r[i].columns)),ot(r[i])||b++}if(e.length){for(l='<div class="k-grid-header-locked" style="width:1px"><table'+(ni?' cellspacing="0"':"")+"><colgroup/><thead>",l+=Array(e.length+1).join("<tr></tr>"),l+=(ut?'<tr class="k-filter-row" />':"")+"</thead></table></div>",s=n(l),k=s.find("colgroup"),k.append(f.thead.prev().find("col.k-group-col").add(p)),nt=s.find("thead tr:not(.k-filter-row)"),i=0,v=e.length;i<v;i++)d=ne(e[i]),nt.eq(i).append(f.thead.find("tr:eq("+i+") .k-group-cell").add(d));return w=pr(this.thead),e.length<w&&te(s,w-e.length),it=s.find(".k-filter-row"),it.append(f.thead.find(".k-filter-row .k-group-cell").add(y)),this.lockedHeader=s.prependTo(t),this.thead.find(".k-group-cell").remove(),!0}return!1},_removeLockedContainers:function(){var n=this.lockedHeader.add(this.lockedContent).add(this.lockedFooter);i.destroy(n),n.off(r).remove(),this.lockedHeader=this.lockedContent=this.lockedFooter=null,this.selectable=null},_thead:function(){var c,u,h,v,y,w,p,t=this,a=t.columns,l=t._hasDetails()&&a.length,k=t._hasFilterRow(),o="",f=t.table.find(">thead"),b=t.element.find("thead:first").length>0;if(f.length||(f=n("<thead/>").insertBefore(t.tbody)),t.lockedHeader&&t.thead?(u=t.thead.find("tr:has(th):not(.k-filter-row)").html(""),u.remove(),u=n(),t._removeLockedContainers()):u=t.element.find(b?"thead:first tr:has(th):not(.k-filter-row)":"tr:has(th):first"),!u.length&&(u=f.children().first(),!u.length)){for(h=[{rowSpan:1,cells:[],index:0}],t._prepareColumns(h,a),c=0;c<h.length;c++)o+="<tr>",l&&(o+='<th class="k-hierarchy-cell" scope="col">'+t.options.messages.expandCollapseColumnHeader+"</th>"),o+=t._createHeaderCells(h[c].cells,h[c].rowSpan),o+="</tr>";u=n(o)}k&&(v=n("<tr/>"),v.addClass("k-filter-row"),(l||u.find(".k-hierarchy-cell").length)&&v.prepend('<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'),y=(t.thead||f).find(".k-filter-row"),y.length&&(i.destroy(y),y.remove()),f.append(v)),u.children().length?l&&!u.find(".k-hierarchy-cell")[0]&&u.prepend('<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'):(o="",l&&(o+='<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'),o+=t._createHeaderCells(a),u.html(o)),u.attr("role","row").find("th").addClass("k-header"),t.options.scrollable||f.addClass("k-grid-header"),u.find("script").remove().end().prependTo(f),t.thead&&t._destroyColumnAttachments(),this.angular("cleanup",function(){return{elements:f.find("th").get()}}),this.angular("compile",function(){return{elements:f.find("th").get(),data:si(a,function(n){return{column:n}})}}),t.thead=f.attr("role","rowgroup"),t._sortable(),t._filterable(),t._filterRow(),t._scrollable(),t._updateCols(),t._columnMenu(),p=this.options.scrollable&&s(this.columns).length,p&&(w=t._appendLockedColumnHeader(t.thead.closest(".k-grid-header")),t._appendLockedColumnContent(),t.lockedContent.bind("DOMMouseScroll"+r+" mousewheel"+r,e(t._wheelScroll,t))),t._updateColumnCellIndex(),t._updateFirstColumnClass(),t._resizable(),t._draggable(),t._reorderable(),t._updateHeader(t._groups()),p&&(w&&t._syncLockedHeaderHeight(),t._applyLockedContainersWidth()),t.groupable&&t._attachGroupable()},_retrieveFirstColumn:function(t,i){var r,u=n();if(i.length&&t[0]){for(r=t[0];r.columns&&r.columns.length;)r=r.columns[0],i=i.filter(":not(:first())");u=u.add(i)}return u},_updateFirstColumnClass:function(){var r,u,t=this,i=t.columns||[],f=t._hasDetails()&&i.length;f||t._groups()||(r=t.thead.find(">tr:not(.k-filter-row):not(:first)"),i=ht(i),u=t._retrieveFirstColumn(i,r),t._isLocked()&&(r=t.lockedHeader.find("thead>tr:not(.k-filter-row):not(:first)"),i=s(t.columns),u=u.add(t._retrieveFirstColumn(i,r))),u.each(function(){var t=n(this).find("th");t.removeClass("k-first"),t.eq(0).addClass("k-first")}))},_prepareColumns:function(n,t,i,r){for(var f,o=r||n[n.length-1],e=n[o.index+1],s=0,u=0;u<t.length;u++)f={column:t[u],colSpan:0},o.cells.push(f),t[u].columns&&t[u].columns.length&&(e||(e={rowSpan:0,cells:[],index:n.length},n.push(e)),f.colSpan=t[u].columns.length,this._prepareColumns(n,t[u].columns,f,e),s+=f.colSpan-1,o.rowSpan=n.length-o.index);i&&(i.colSpan+=s)},_wheelScroll:function(n){var t,u,r;n.ctrlKey||(t=this.content,this.options.scrollable.virtual&&(t=this.virtualScrollable.verticalScrollbar),u=t.scrollTop(),r=i.wheelDeltaY(n),r&&(t[0].scrollHeight>t[0].clientHeight&&(t[0].scrollTop<t[0].scrollHeight-t[0].clientHeight&&r<0||t[0].scrollTop>0&&r>0)&&n.preventDefault(),t.scrollTop(u+-r)))},_isLocked:function(){return null!=this.lockedHeader},_updateHeaderCols:function(){var n=this.thead.parent().add(this.table);this._isLocked()?wt(n,tt(cu(this.columns)),this._hasDetails(),0):wt(n,tt(b(this.columns)),this._hasDetails(),0)},_updateCols:function(n){n=n||this.thead.parent().add(this.table),this._appendCols(n,this._isLocked())},_updateLockedCols:function(n){this._isLocked()&&(n=n||this.lockedHeader.find("table").add(this.lockedTable),wt(n,tt(yr(this.columns)),this._hasDetails(),this._groups()))},_appendCols:function(n,t){t?wt(n,tt(cu(this.columns)),this._hasDetails(),0):wt(n,tt(b(this.columns)),this._hasDetails(),this._groups())},_autoColumns:function(n){if(n&&n.toJSON){var r,u,t=this;n=n.toJSON(),u=!(t.table.find("tbody tr").length>0&&(!t.dataSource||!t.dataSource.transport));for(r in n)t.columns.push({field:r,encoded:u,headerAttributes:{id:i.guid()}});t._thead(),t._templates()}},_rowsHtml:function(n,t){for(var o=this,r="",e=t.rowTemplate,f=t.altRowTemplate,i=0,u=n.length;i<u;i++)r+=i%2?f(n[i]):e(n[i]),o._data.push(n[i]);return r},_groupRowHtml:function(n,t,r,e,o,s){var p,nt,k,b,y=this,c="",tt=n.field,h=l(u(y.columns),function(n){return n.field==tt})[0]||{},v=h.groupHeaderTemplate,it=(h.title||tt)+": "+le(n.value,h.format,h.values,h.encoded),rt=y._groupAggregatesDefaultObject||{},a=n.items,w=f({},rt,n.aggregates),g=f({},{field:n.field,value:n.value,items:a,aggregates:w},n.aggregates[n.field]),d=o.groupFooterTemplate;if(v&&(it=typeof v===pt?v(g):i.template(v)(g)),c+=e(t,r,it),n.hasSubgroups)for(p=0,nt=a.length;p<nt;p++)c+=y._groupRowHtml(a[p],s?t:t-1,r+1,e,o,s);else c+=y._rowsHtml(a,o);if(d){k={};for(b in w)k[b]=f({},w[b],{group:{field:n.field,value:n.value,items:a}});c+=d(k)}return c},collapseGroup:function(t){var o,l,c,e,s,r,u,h,i,f;for(t=n(t),l=this.options.groupable,c=l.showFooter,e=c?0:1,r=n(),this._isLocked()&&(t.closest("div").hasClass("k-grid-content-locked")?r=this.tbody.children("tr:eq("+t.index()+")").nextAll("tr"):(r=t.nextAll("tr"),t=this.lockedTable.find(">tbody>tr:eq("+t.index()+")"))),o=t.find(".k-group-cell").length,t.find(".k-i-collapse").addClass("k-i-expand").removeClass("k-i-collapse"),t.find("td[aria-expanded='true']:first").attr("aria-expanded",!1).find("a").attr(oi,or),t=t.nextAll("tr"),f=[],u=0,h=t.length;u<h&&(i=t.eq(u),s=i.find(".k-group-cell").length,i.hasClass("k-grouping-row")?e++:i.hasClass("k-group-footer")&&e--,!(s<=o||i.hasClass("k-group-footer")&&e<0));u++)r.length&&f.push(r[u]),f.push(i[0]);n(f).hide()},expandGroup:function(t){t=n(t);var e,i,o,r,s,c=this,l=c.options.groupable.showFooter,u=n(),h=[],f=1;for(this._isLocked()&&(t.closest("div").hasClass("k-grid-content-locked")?u=this.tbody.children("tr:eq("+t.index()+")").nextAll("tr"):(u=t.nextAll("tr"),t=this.lockedTable.find(">tbody>tr:eq("+t.index()+")"))),e=t.find(".k-group-cell").length,t.find(".k-i-expand").addClass("k-i-collapse").removeClass("k-i-expand"),t.find("td[aria-expanded='false']:first").attr("aria-expanded",!0).find("a").attr(oi,er),t=t.nextAll("tr"),r=0,s=t.length;r<s&&(i=t.eq(r),o=i.find(".k-group-cell").length,!(o<=e));r++)o!=e+1||i.hasClass("k-detail-row")||(i.show(),u.eq(r).show(),i.hasClass("k-grouping-row")&&i.find(".k-icon").hasClass("k-i-collapse")&&c.expandGroup(i),i.hasClass("k-master-row")&&i.find(".k-icon").hasClass("k-i-collapse")&&(i.next().show(),u.eq(r+1).show())),i.hasClass("k-grouping-row")&&(l&&h.push(i.is(":visible")),f++),i.hasClass("k-group-footer")&&(l&&i.toggle(h.pop()),1==f?(i.show(),u.eq(r).show()):f--)},_updateHeader:function(t){var r=this,i=r._isLocked()?r.lockedHeader.find("thead"):r.thead,f=i.find("tr.k-filter-row").find("th.k-group-cell").length,u=i.find("tr:first").find("th.k-group-cell").length,e=i.children("tr:not(:first)").filter(function(){return!n(this).children(":visible").length});t>u?(n(Array(t-u+1).join('<th class="k-group-cell k-header" scope="col">'+r.options.messages.expandCollapseColumnHeader+"</th>")).prependTo(i.children("tr:not(.k-filter-row)")),r.element.is(":visible")&&e.find("th.k-group-cell").hide()):t<u&&i.find("tr").each(function(){n(this).find("th.k-group-cell").filter(":eq("+t+"),:gt("+t+")").remove()}),t>f&&n(Array(t-f+1).join('<th class="k-group-cell k-header" scope="col">&nbsp;</th>')).prependTo(i.find(".k-filter-row"))},_firstDataItem:function(n,t){return n&&t&&(n=n.hasSubgroups?this._firstDataItem(n.items[0],t):n.items[0]),n},_updateTablesWidth:function(){var i,t=this;t._isLocked()&&(i=n(">.k-grid-footer>.k-grid-footer-wrap>table",t.wrapper).add(t.thead.parent()).add(t.table),t._footerWidth=hf(i.eq(0)),i.width(t._footerWidth),i=n(">.k-grid-footer>.k-grid-footer-locked>table",t.wrapper).add(t.lockedHeader.find(">table")).add(t.lockedTable),i.width(hf(i.eq(0))))},hideColumn:function(i){var ut,p,e,k,w,nt,d,it,f,tt,r=this,a=0,v=r.footer||r.wrapper.find(".k-grid-footer"),s=r.columns,y=r.lockedHeader?g(r.lockedHeader.find(">table>thead")).filter(tr).length:0;if(i="number"==typeof i?s[i]:c(i)?l(et(s),function(n){return n===i})[0]:l(et(s),function(n){return n.field===i})[0],i&&ot(i)){if(i.columns&&i.columns.length){for(nt=di(i,s),fi(i,!1),ct(rt(n(">table>thead",r.lockedHeader),r.thead,">tr:eq("+nt.row+")>th"),nt.cell,!1),e=0;e<i.columns.length;e++)this.hideColumn(i.columns[e]);return r.trigger(ur,{column:i}),t}if(f=h(i,b(u(s))),fi(i,!1),r._setParentsVisibility(i,!1),r._templates(),r._updateCols(),r._updateLockedCols(),tt=r.thead,d=f,r.lockedHeader&&y>f?tt=r.lockedHeader.find(">table>thead"):d-=y,ut=g(tt).filter(tr).eq(d),ut[0].style.display="none",ct(rt(n(">table>thead",r.lockedHeader),r.thead,">tr.k-filter-row>th"),f,!1),v[0]&&(r._updateCols(v.find(">.k-grid-footer-wrap>table")),r._updateLockedCols(v.find(">.k-grid-footer-locked>table")),ct(v.find(".k-footer-template>td"),f,!1)),r.lockedTable&&y>f?ru(r.lockedTable.find(">tbody>tr"),f):ru(r.tbody.children(),f-y),r.lockedTable)r._updateTablesWidth(),r._applyLockedContainersWidth(),r._syncLockedContentHeight(),r._syncLockedHeaderHeight(),r._syncLockedFooterHeight();else{for(k=r.thead.prev().find("col"),e=0,it=k.length;e<it;e+=1){if(w=k[e].style.width,!w||w.indexOf("%")!=-1){a=0;break}a+=parseInt(w,10)}p=n(">.k-grid-header table:first,>.k-grid-footer table:first",r.wrapper).add(r.table),r._footerWidth=null,a&&(p.each(function(){this.style.width=a+"px"}),r._footerWidth=a),o.msie&&8==o.version&&(p.css("display","inline-table"),setTimeout(function(){p.css("display","table")},1))}r._updateFirstColumnClass(),r.trigger(ur,{column:i})}},_setParentsVisibility:function(t,r){var e,u,s,f,c,h=this.columns,o=[],l=r?function(n){return b(n.columns).length&&n.hidden}:function(n){return!b(n.columns).length&&!n.hidden};if(gi(t,h,o)&&o.length)for(e=o.length-1;e>=0;e--)u=o[e],s=gt(u,h),f=rt(n(">table>thead",this.lockedHeader),this.thead,">tr:eq("+s.row+")>th:not(.k-group-cell):not(.k-hierarchy-cell)").eq(s.cell),l(u)&&(fi(u,r),f[0].style.display=r?"":"none"),f.filter("["+i.attr("colspan")+"]").length&&(c=parseInt(f.attr(i.attr("colspan")),10),f[0].colSpan=c-dt(u.columns)||1)},showColumn:function(i){var e,tt,nt,p,o,d,w,b,k,f,y,r=this,s=r.columns,a=r.footer||r.wrapper.find(".k-grid-footer"),v=r.lockedHeader?g(r.lockedHeader.find(">table>thead")).length:0;if(i="number"==typeof i?s[i]:c(i)?l(et(s),function(n){return n===i})[0]:l(et(s),function(n){return n.field===i})[0],i&&!ot(i)){if(i.columns&&i.columns.length){for(w=gt(i,s),fi(i,!0),ct(rt(n(">table>thead",r.lockedHeader),r.thead,">tr:eq("+w.row+")>th"),w.cell,!0),e=0;e<i.columns.length;e++)this.showColumn(i.columns[e]);return r.trigger(rr,{column:i}),t}if(f=h(i,u(s)),fi(i,!0),r._setParentsVisibility(i,!0),r._templates(),r._updateCols(),r._updateLockedCols(),y=r.thead,d=f,r.lockedHeader&&v>f?y=r.lockedHeader.find(">table>thead"):d-=v,nt=g(y).eq(d),nt[0].style.display="",ct(rt(n(">table>thead",r.lockedHeader),r.thead,">tr.k-filter-row>th"),f,!0),a[0]&&(r._updateCols(a.find(">.k-grid-footer-wrap>table")),r._updateLockedCols(a.find(">.k-grid-footer-locked>table")),ct(a.find(".k-footer-template>td"),f,!0)),r.lockedTable&&v>f?lf(r.lockedTable.find(">tbody>tr"),f):lf(r.tbody.children(),f-v),r.lockedTable)r._updateTablesWidth(),r._applyLockedContainersWidth(),r._syncLockedContentHeight(),r._syncLockedHeaderHeight();else if(p=n(">.k-grid-header table:first,>.k-grid-footer table:first",r.wrapper).add(r.table),i.width){for(o=0,k=r.thead.prev().find("col"),e=0,tt=k.length;e<tt;e+=1){if(b=k[e].style.width,b.indexOf("%")>-1){o=0;break}o+=parseInt(b,10)}r._footerWidth=null,o&&(p.each(function(){this.style.width=o+"px"}),r._footerWidth=o)}else p.width("");r._updateFirstColumnClass(),r.trigger(rr,{column:i})}},_progress:function(n){var t=this.element;this._editContainer&&"popup"===this._editMode()?t=this._editContainer:this.lockedContent?t=this.wrapper:this.element.is("table")?t=this.element.parent():this.content&&this.content.length&&(t=this.content),i.ui.progress(t,n)},_resize:function(n,t){this._syncLockedContentHeight(),this._syncLockedHeaderHeight(),this.content&&(this._setContentWidth(),this._setContentHeight()),this.virtualScrollable&&(t||this._rowHeight)&&(t&&(this._rowHeight=null),this.virtualScrollable.repaintScrollbar())},_isActiveInTable:function(){var t=at();return!!t&&(this.table[0]===t||n.contains(this.table[0],t)||this._isLocked()&&(this.lockedTable[0]===t||n.contains(this.lockedTable[0],t)))},refresh:function(t){var o,r=this,e=r.dataSource.view(),l=r.options.navigatable,c=n(r.current()),s=!1,u=(r.dataSource.group()||[]).length,f=u+tt(b(r.columns)).length;t&&"itemchange"===t.action&&r.editable||(t&&"remove"===t.action&&r.editable&&r.editable.options.model&&h(r.editable.options.model,t.items)>-1&&r.editable.options.model.unbind(d,r._modelChangeHandler),t=t||{},r.trigger("dataBinding",{action:t.action||"rebind",index:t.index,items:t.items})||(r._angularItems("cleanup"),l&&(r._isActiveInTable()||r._editContainer&&r._editContainer.data("kendoWindow"))&&(s=c.is("th"),o=Math.max(r.cellIndex(c),0)),r._destroyEditable(),r._progress(!1),r._hideResizeHandle(),r._data=[],r.columns.length||(r._autoColumns(r._firstDataItem(e[0],u)),f=u+r.columns.length),r._group=u>0||r._group,r._group&&(r._templates(),r._updateCols(),r._updateLockedCols(),r._updateHeader(u),r._group=u>0),r._renderContent(e,f,u),r._renderLockedContent(e,f,u),r._footer(),r._renderNoRecordsContent(),r._setContentHeight(),r._setContentWidth(r.content&&r.content.scrollLeft()),r.lockedTable&&(r.options.scrollable.virtual?r.content.find(">.k-virtual-scrollable-wrap").trigger("scroll"):r.touchScroller?r.touchScroller.movable.trigger("change"):(r.wrapper.one("scroll",function(n){n.stopPropagation()}),r.content.trigger("scroll"))),r._restoreCurrent(o,s),r.touchScroller&&r.touchScroller.contentResized(),r.selectable&&r.selectable.resetTouchEvents(),r._muteAngularRebind(function(){r._angularItems("compile")}),r.options.selectable&&!i.ui.Selectable.parseOptions(r.options.selectable).cell&&r.options.persistSelection&&r._restoreSelection(),r.trigger(nr)))},_restoreCurrent:function(i,r){var f,u,e;i===t||i<0||(this._removeCurrent(),r?this._setCurrent(this.thead.find("th:not(.k-group-cell)").eq(i)):(f=0,this._rowVirtualIndex?f=this.virtualScrollable.position(this._rowVirtualIndex):i=0,u=n(),this.lockedTable&&(u=this.lockedTable.find(">tbody>tr").eq(f)),u=u.add(this.tbody.children().eq(f)),e=u.find(">td:not(.k-group-cell):not(.k-hierarchy-cell)").eq(i),this._setCurrent(e)),this._current&&y(this._current.closest("table")[0],!0))},_restoreSelection:function(){var n=this,t=n.tbody.children(":not(.k-grouping-row,.k-detail-row)");t=l(t,function(t){var i=n.dataItem(t)[n.dataSource.options.schema.model.id];if(n._selectedIds[i])return t}),n.select(t)},_angularItems:function(n){i.ui.DataBoundWidget.fn._angularItems.call(this,n),"cleanup"===n&&this._cleanupDetailItems(),this._angularGroupItems(n),this._angularGroupFooterItems(n)},_cleanupDetailItems:function(){var n=this;n._hasDetails()&&(n.angular("cleanup",function(){return{elements:n.tbody.children(".k-detail-row")}}),n.tbody.find(".k-detail-cell").empty())},_angularGroupItems:function(t){var i=this,r=i.tbody;i.lockedContent&&(r=i.lockedTable.find("tbody")),i._group&&i.angular(t,function(){return{elements:r.children(".k-grouping-row"),data:n.map(tu(i.dataSource.view()),function(n){return{dataItem:n}})}})},_angularGroupFooterItems:function(t){var i=this,r=i.tbody;i.lockedContent&&(r=i.element),i._group&&i.groupFooterTemplate&&i.angular(t,function(){return{elements:r.find(".k-group-footer"),data:n.map(fu(i.dataSource.view()),function(n){return{dataItem:n}})}})},_renderContent:function(n,t,i){var f,s,r=this,e="",u=null!=r.lockedContent,o={rowTemplate:r.rowTemplate,altRowTemplate:r.altRowTemplate,groupFooterTemplate:r.groupFooterTemplate};if(t=u?t-tt(yr(r.columns)).length:t,i>0)for(t=u?t-i:t,r.detailTemplate&&t++,r.groupFooterTemplate&&(r._groupAggregatesDefaultObject=r.dataSource.aggregates()),f=0,s=n.length;f<s;f++)e+=r._groupRowHtml(n[f],t,0,u?be:of,o,u);else e+=r._rowsHtml(n,o);r.tbody=du(r.tbody,r.table,e,this.options.$angular)},_renderLockedContent:function(n,t,i){var r,s,e,f="",o={rowTemplate:this.lockedRowTemplate,altRowTemplate:this.lockedAltRowTemplate,groupFooterTemplate:this.lockedGroupFooterTemplate};if(this.lockedContent){if(e=this.lockedTable,i>0)for(t-=b(u(ht(this.columns))).length,r=0,s=n.length;r<s;r++)f+=this._groupRowHtml(n[r],t,0,of,o);else f=this._rowsHtml(n,o);du(e.children("tbody"),e,f,this.options.$angular),this._syncLockedContentHeight()}},_adjustRowsHeight:function(n,t){for(var e,o,f,r=n[0].rows,c=r.length,u=t[0].rows,h=n.add(t),l=h.length,s=[],i=0;i<c&&u[i];i++)r[i].style.height&&(r[i].style.height=u[i].style.height="");for(i=0;i<c&&u[i];i++)e=r[i].offsetHeight,o=u[i].offsetHeight,f=0,e>o?f=e:e<o&&(f=o),s.push(f);for(i=0;i<l;i++)h[i].style.display="none";for(i=0;i<c;i++)s[i]&&(r[i].style.height=u[i].style.height=s[i]+1+"px");for(i=0;i<l;i++)h[i].style.display=""}});i.ExcelMixin&&i.ExcelMixin.extend(kt.prototype),i.PDFMixin&&(i.PDFMixin.extend(kt.prototype),kt.prototype._drawPDF_autoPageBreak=function(r){function y(){s&&l!==t?(u.one("change",v),u.page(l)):(f.refresh(),v())}function v(){c.appendTo(document.body);var t=n.extend({},f.options.pdf,{_destructive:!0,progress:function(n){r.notify({page:n.page,pageNumber:n.pageNum,progress:.5+n.pageNum/n.totalPages/2,totalPages:n.totalPages})}});i.drawing.drawDOM(e,t).always(function(){c.remove()}).then(function(n){o.resolve(n)}).fail(function(n){o.reject(n)})}function h(){var n=u.page(),t=s?u.totalPages():1;a.append(p.find("tr")),n<t?u.page(n+1):(u.unbind("change",h),y())}var a,l,f=this,o=new n.Deferred,u=f.dataSource,s=f.options.pdf.allPages,p=f.wrapper.find('table[role="grid"] > tbody'),c=n("<div>").css({position:"absolute",left:-1e4,top:-1e4}),e=f.wrapper.clone().css({height:"auto",width:"auto"}).appendTo(c);return e.find(".k-grid-content").css({height:"auto",width:"auto",overflow:"visible"}),e.find('table[role="grid"]').css({height:"auto",width:"100%",overflow:"visible"}),e.find(".k-grid-pager, .k-grid-toolbar, .k-grouping-header").remove(),e.find(".k-grid-header").css({paddingRight:0}),this._initPDFProgress(r),a=e.find('table[role="grid"] > tbody').empty(),l=u.page(),s?(u.bind("change",h),u.page(1)):h(),o.promise()},kt.prototype._drawPDF=function(r){function l(){s&&c!==t?(u.unbind("change",h),u.one("change",function(){e.resolve(o)}),u.page(c)):e.resolve(o)}function h(){f._drawPDFShadow({width:f.wrapper.width()},{avoidLinks:f.options.pdf.avoidLinks}).done(function(n){var t=u.page(),i=s?u.totalPages():1,f={page:n,pageNumber:t,progress:t/i,totalPages:i};r.notify(f),o.append(f.page),t<i?u.page(t+1):l()}).fail(function(n){e.reject(n)})}var e,u,s,o,c,f=this;return f.options.pdf.paperSize&&"auto"!=f.options.pdf.paperSize?f._drawPDF_autoPageBreak(r):(e=new n.Deferred,u=f.dataSource,s=f.options.pdf.allPages,this._initPDFProgress(r),o=new i.drawing.Group,c=u.page(),s?(u.bind("change",h),u.page(1)):h(),e.promise())},kt.prototype._initPDFProgress=function(t){var u,r=n("<div class='k-loading-pdf-mask'><div class='k-loading-color'/></div>");r.prepend(this.wrapper.clone().css({position:"absolute",top:0,left:0})),this.wrapper.append(r),u=n("<div class='k-loading-pdf-progress'>").appendTo(r).kendoProgressBar({type:"chunk",chunkCount:10,min:0,max:1,value:0}).data("kendoProgressBar"),t.progress(function(n){u.value(n.progress)}).always(function(){i.destroy(r),r.remove()})}),ut.plugin(kt),ut.plugin(au)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.listview.min",["kendo.data.min","kendo.editable.min","kendo.selectable.min"],n)}(function(){return function(n,t){var i=window.kendo,f="change",y="cancel",c="dataBound",g="dataBinding",h=i.ui.Widget,r=i.keys,k=">*:not(.k-loading-mask)",b="progress",w="error",s="k-state-focused",d="k-state-selected",o="k-edit-item",nt="edit",a="remove",l="save",rt="click",u=".kendoListView",e=n.proxy,v=i._activeElement,p=i.ui.progress,it=i.data.DataSource,tt=i.ui.DataBoundWidget.extend({init:function(t,r){var u=this;r=n.isArray(r)?{dataSource:r}:r,h.fn.init.call(u,t,r),r=u.options,u.wrapper=t=u.element,t[0].id&&(u._itemId=t[0].id+"_lv_active"),u._element(),u._dataSource(),u._templates(),u._navigatable(),u._selectable(),u._pageable(),u._crudHandlers(),u.options.autoBind&&u.dataSource.fetch(),i.notify(u)},events:[f,y,g,c,nt,a,l],options:{name:"ListView",autoBind:!0,selectable:!1,navigatable:!1,template:"",altTemplate:"",editTemplate:""},setOptions:function(n){h.fn.setOptions.call(this,n),this._templates(),this.selectable&&(this.selectable.destroy(),this.selectable=null),this._selectable()},_templates:function(){var n=this.options;this.template=i.template(n.template||""),this.altTemplate=i.template(n.altTemplate||n.template),this.editTemplate=i.template(n.editTemplate||"")},_item:function(n){return this.element.children()[n]()},items:function(){return this.element.children()},dataItem:function(t){var r=i.attr("uid"),u=n(t).closest("["+r+"]").attr(r);return this.dataSource.getByUid(u)},setDataSource:function(n){this.options.dataSource=n,this._dataSource(),this.options.autoBind&&n.fetch()},_unbindDataSource:function(){var n=this;n.dataSource.unbind(f,n._refreshHandler).unbind(b,n._progressHandler).unbind(w,n._errorHandler)},_dataSource:function(){var n=this;n.dataSource&&n._refreshHandler?n._unbindDataSource():(n._refreshHandler=e(n.refresh,n),n._progressHandler=e(n._progress,n),n._errorHandler=e(n._error,n)),n.dataSource=it.create(n.options.dataSource).bind(f,n._refreshHandler).bind(b,n._progressHandler).bind(w,n._errorHandler)},_progress:function(){p(this.element,!0)},_error:function(){p(this.element,!1)},_element:function(){this.element.addClass("k-widget k-listview").attr("role","listbox")},refresh:function(n){var e,h,f,u,s,r=this,o=r.dataSource.view(),a="",l=r.template,p=r.altTemplate,y=v();if(n=n||{},"itemchange"===n.action)return r._hasBindingTarget()||r.editable||(e=n.items[0],f=r.items().filter("["+i.attr("uid")+"="+e.uid+"]"),f.length>0&&(u=f.index(),r.angular("cleanup",function(){return{elements:[f]}}),f.replaceWith(l(e)),f=r.items().eq(u),f.attr(i.attr("uid"),e.uid),r.angular("compile",function(){return{elements:[f],data:[{dataItem:e}]}}),r.trigger("itemChange",{item:f,data:e}))),t;if(!r.trigger(g,{action:n.action||"rebind",items:n.items,index:n.index})){for(r._angularItems("cleanup"),r._destroyEditable(),u=0,s=o.length;u<s;u++)a+=u%2?p(o[u]):l(o[u]);for(r.element.html(a),h=r.items(),u=0,s=o.length;u<s;u++)h.eq(u).attr(i.attr("uid"),o[u].uid).attr("role","option").attr("aria-selected","false");r.element[0]===y&&r.options.navigatable&&r.current(h.eq(0)),r._angularItems("compile"),r.trigger(c,{action:n.action||"rebind",items:n.items,index:n.index})}},_pageable:function(){var u,f,t=this,r=t.options.pageable;n.isPlainObject(r)&&(f=r.pagerId,u=n.extend({},r,{dataSource:t.dataSource,pagerId:null}),t.pager=new i.ui.Pager(n("#"+f),u))},_selectable:function(){var o,e,n=this,s=n.options.selectable,h=n.options.navigatable;s&&(o=i.ui.Selectable.parseOptions(s).multiple,n.selectable=new i.ui.Selectable(n.element,{aria:!0,multiple:o,filter:k,change:function(){n.trigger(f)}}),h&&n.element.on("keydown"+u,function(i){if(i.keyCode===r.SPACEBAR){if(e=n.current(),i.target==i.currentTarget&&i.preventDefault(),o)if(i.ctrlKey){if(e&&e.hasClass(d))return e.removeClass(d),t}else n.selectable.clear();else n.selectable.clear();n.selectable.value(e)}}))},current:function(n){var u=this,f=u.element,i=u._current,r=u._itemId;return n===t?i:(i&&i[0]&&(i[0].id===r&&i.removeAttr("id"),i.removeClass(s),f.removeAttr("aria-activedescendant")),n&&n[0]&&(r=n[0].id||r,u._scrollTo(n[0]),f.attr("aria-activedescendant",r),n.addClass(s).attr("id",r)),u._current=n,t)},_scrollTo:function(t){var i,u,f=this,e=!1,r="scroll";"auto"==f.wrapper.css("overflow")||f.wrapper.css("overflow")==r?i=f.wrapper[0]:(i=window,e=!0),u=function(u,f){var o=e?n(t).offset()[u.toLowerCase()]:t["offset"+u],c=t["client"+f],h=n(i)[r+u](),s=n(i)[f.toLowerCase()]();o+c>h+s?n(i)[r+u](o+c-s):o<h&&n(i)[r+u](o)},u("Top","Height"),u("Left","Width")},_navigatable:function(){var t=this,c=t.options.navigatable,f=t.element,h=function(i){t.current(n(i.currentTarget)),n(i.target).is(":button,a,:input,a>.k-icon,textarea")||f.focus()};c&&(t._tabindex(),f.on("focus"+u,function(){var n=t._current;n&&n.is(":visible")||(n=t._item("first")),t.current(n)}).on("focusout"+u,function(){t._current&&t._current.removeClass(s)}).on("keydown"+u,function(u){var l,p,e=u.keyCode,s=t.current(),w=n(u.target),b=!w.is(":button,textarea,a,a>.t-icon,input"),a=w.is(":text,:password"),h=i.preventDefault,c=f.find("."+o),y=v();if(!(!b&&!a&&r.ESC!=e||a&&r.ESC!=e&&r.ENTER!=e))if(r.UP===e||r.LEFT===e)s&&(s=s.prev()),t.current(s&&s[0]?s:t._item("last")),h(u);else if(r.DOWN===e||r.RIGHT===e)s&&(s=s.next()),t.current(s&&s[0]?s:t._item("first")),h(u);else if(r.PAGEUP===e)t.current(null),t.dataSource.page(t.dataSource.page()-1),h(u);else if(r.PAGEDOWN===e)t.current(null),t.dataSource.page(t.dataSource.page()+1),h(u);else if(r.HOME===e)t.current(t._item("first")),h(u);else if(r.END===e)t.current(t._item("last")),h(u);else if(r.ENTER===e)0!==c.length&&(b||a)?(l=t.items().index(c),y&&y.blur(),t.save(),p=function(){t.element.trigger("focus"),t.current(t.items().eq(l))},t.one("dataBound",p)):""!==t.options.editTemplate&&t.edit(s);else if(r.ESC===e){if(c=f.find("."+o),0===c.length)return;l=t.items().index(c),t.cancel(),t.element.trigger("focus"),t.current(t.items().eq(l))}}),f.on("mousedown"+u+" touchstart"+u,k,e(h,t)))},clearSelection:function(){var n=this;n.selectable.clear(),n.trigger(f)},select:function(i){var u=this,r=u.selectable;return i=n(i),i.length?(r.options.multiple||(r.clear(),i=i.first()),r.value(i),t):r.value()},_destroyEditable:function(){var n=this;n.editable&&(n.editable.destroy(),delete n.editable)},_modelFromElement:function(n){var t=n.attr(i.attr("uid"));return this.dataSource.getByUid(t)},_closeEditable:function(){var r,u,e,n=this,t=n.editable,f=n.template;return t&&(t.element.index()%2&&(f=n.altTemplate),n.angular("cleanup",function(){return{elements:[t.element]}}),r=n._modelFromElement(t.element),n._destroyEditable(),e=t.element.index(),t.element.replaceWith(f(r)),u=n.items().eq(e),u.attr(i.attr("uid"),r.uid),n._hasBindingTarget()&&i.bind(u,r),n.angular("compile",function(){return{elements:[u],data:[{dataItem:r}]}})),!0},edit:function(n){var u,f,t=this,r=t._modelFromElement(n),e=r.uid;t.cancel(),n=t.items().filter("["+i.attr("uid")+"="+e+"]"),f=n.index(),n.replaceWith(t.editTemplate(r)),u=t.items().eq(f).addClass(o).attr(i.attr("uid"),r.uid),t.editable=u.kendoEditable({model:r,clearContainer:!1,errorTemplate:!1,target:t}).data("kendoEditable"),t.trigger(nt,{model:r,item:u})},save:function(){var r,i,n=this,t=n.editable;t&&(i=t.element,r=n._modelFromElement(i),t.end()&&!n.trigger(l,{model:r,item:i})&&(n._closeEditable(),n.dataSource.sync()))},remove:function(n){var t=this,i=t.dataSource,r=t._modelFromElement(n);t.editable&&(i.cancelChanges(t._modelFromElement(t.editable.element)),t._closeEditable()),t.trigger(a,{model:r,item:n})||(n.hide(),i.remove(r),i.sync())},add:function(){var r,n=this,t=n.dataSource,i=t.indexOf((t.view()||[])[0]);i<0&&(i=0),n.cancel(),r=t.insert(i,{}),n.edit(n.element.find("[data-uid='"+r.uid+"']"))},cancel:function(){var i,t,n=this,r=n.dataSource;n.editable&&(i=n.editable.element,t=n._modelFromElement(i),n.trigger(y,{model:t,container:i})||(r.cancelChanges(t),n._closeEditable()))},_crudHandlers:function(){var t=this,r=rt+u;t.element.on(r,".k-edit-button",function(r){var u=n(this).closest("["+i.attr("uid")+"]");t.edit(u),r.preventDefault()}),t.element.on(r,".k-delete-button",function(r){var u=n(this).closest("["+i.attr("uid")+"]");t.remove(u),r.preventDefault()}),t.element.on(r,".k-update-button",function(n){t.save(),n.preventDefault()}),t.element.on(r,".k-cancel-button",function(n){t.cancel(),n.preventDefault()})},destroy:function(){var n=this;h.fn.destroy.call(n),n._unbindDataSource(),n._destroyEditable(),n.element.off(u),n.pager&&n.pager.destroy(),i.destroy(n.element)}});i.ui.plugin(tt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.listbox.min",["kendo.draganddrop.min","kendo.data.min","kendo.selectable.min"],n)}(function(){return function(n,t){function et(t){return n.map(t,function(t){return n(t).index()})}function li(n){return t===n}function ar(n){return n.clone().removeClass(g).addClass(i.format("{0} {1} {2}",b,or,yr)).width(n.width())}function oi(){return n("<li>").addClass(cr)}var r,k,ei,lt,ai,yi,at,vt,ct,vi,pi,p,i=window.kendo,tt=i.attr,nr=i.data,u=i.keys,tr=i.template,wi=i.ui.Widget,vr=nr.DataSource,hi=i.ui.Selectable,ci=i.ui.DataBoundWidget,pt=i.Class,s=n.extend,o=n.noop,f=n.proxy,w="-",si=".",lr=" ",fi="#",d="kendoListBox",a=si+d,l="k-state-disabled",b="k-state-selected",e=".k-item:not(.k-state-disabled)",wr=".k-list:not(.k-state-disabled) >"+e,c="k-listbox-toolbar",pr="li > a.k-button:not(.k-state-disabled)",y="k-state-focused",yr="k-drag-clue",cr="k-drop-hint",sr="k-reset k-list",ki=".k-reset.k-list",or="k-reset",kt="click"+a,hr="keydown"+a,ur="blur"+a,fr=i._outerWidth,er=i._outerHeight,v="change",dt="dataBound",ut="add",h="remove",ot="reorder",ft="moveUp",st="moveDown",rt="transferTo",ht="transferFrom",wt="transferAllTo",yt="transferAllFrom",g="k-ghost",nt="uid",bt="tabindex",di="command",ir=-1,rr=1,ii="dragstart",ti="drag",ui="drop",ri="dragend",gi="ul.k-reset.k-list>li.k-item",it="right",ni="bottom",bi=[c+w+"left",c+w+it,c+w+"top",c+w+ni],gt=ci.extend({init:function(n,t){var i=this;wi.fn.init.call(i,n,t),i._wrapper(),i._list(),n=i.element.attr("multiple","multiple").hide(),n[0]&&!i.options.dataSource&&(i.options.dataTextField=i.options.dataTextField||"text",i.options.dataValueField=i.options.dataValueField||"value"),i._templates(),i._selectable(),i._dataSource(),i._createToolbar(),i._createDraggable(),i._createNavigatable()},destroy:function(){var n=this;ci.fn.destroy.call(n),isNaN(n._listTabIndex)||(n._getList().off(),n._listTabIndex=null),n._unbindDataSource(),n._destroySelectable(),n._destroyToolbar(),n.wrapper.off(a),n._target&&(n._target=null),n._draggable&&(n._draggable.destroy(),n.placeholder=null),i.destroy(n.element)},events:[v,dt,ut,h,ot,ii,ti,ui,ri],options:{name:"ListBox",autoBind:!0,template:"",dataTextField:"",dataValueField:"",selectable:"single",draggable:null,dropSources:[],connectWith:"",navigatable:!0,toolbar:{position:it,tools:[]},messages:{tools:{remove:"Delete",moveUp:"Move Up",moveDown:"Move Down",transferTo:"Transfer To",transferFrom:"Transfer From",transferAllTo:"Transfer All To",transferAllFrom:"Transfer All From"}}},add:function(n){var i,t=this,r=n&&n.length?n:[n],u=r.length;for(t._unbindDataSource(),i=0;i<u;i++)t._addItem(r[i]);t._bindDataSource(),t._syncElement()},_addItem:function(t){var i=this,r=i.templates.itemTemplate({item:t,r:i.templates.itemContent});n(r).attr(tt(nt),t.uid).appendTo(i._getList()),"string"==typeof t?i.dataSource._data.push(t):i.dataSource.add(t)},_addItemAt:function(t,i){var r=this,u=r.templates.itemTemplate({item:t,r:r.templates.itemContent});r._unbindDataSource(),"string"==typeof t?(r._insertElementAt(u,i),r.dataSource._data.push(t)):(r._insertElementAt(n(u).attr(tt(nt),t.uid),i),r.dataSource.add(t)),r._bindDataSource(),r._syncElement()},_insertElementAt:function(t,i){var u=this,r=u._getList();i>0?n(t).insertAfter(r.children().eq(i-1)):n(r).prepend(t)},_createNavigatable:function(){var n=this,t=n.options;t.navigatable&&n._getList().on(kt,e,f(n._click,n)).on(hr,f(n._keyDown,n)).on(ur,f(n._blur,n))},_getTabIndex:function(){var t,n=this;return isNaN(n._listTabIndex)?(t=n.element.attr(bt),n._listTabIndex=isNaN(t)?0:t,n.element.removeAttr(bt),n._listTabIndex):n._listTabIndex},_blur:function(){this._target&&(this._target.removeClass(y),this._getList().removeAttr("aria-activedescendant")),this._target=null},_click:function(t){var r=this,u=n(t.currentTarget),f=r._target;f&&f.removeClass(y),r._target=u,u.addClass(y),r._getList().attr("aria-activedescendant",u.attr("id")),r._getList()[0]!==i._activeElement()&&r.focus()},_getNavigatableItem:function(n){var i,t=this;return i=t._target?t._target:t.items().filter(e).first(),n===u.UP&&t._target&&(i=t._target.prevAll(e).first()),n===u.DOWN&&t._target&&(i=t._target.nextAll(e).first()),i.length?i:null},_scrollIntoView:function(n){var r,i,t,f,u;n&&(n[0]&&(n=n[0]),r=this._getList().parent()[0],i=n.offsetTop,t=r.scrollTop,f=r.clientHeight,u=i+n.offsetHeight,t>i?t=i:u>t+f&&(t=u-f),r.scrollTop=t)},_keyDown:function(n){var e,i=this,r=n.keyCode,f=i._getNavigatableItem(r);if(i._target&&i._target.removeClass(y),(!n.shiftKey||n.ctrlKey||r!==u.DOWN&&r!==u.UP)&&(i._shiftSelecting=!1),r==u.DELETE)i._executeCommand(h),i._target&&(i._target.removeClass(y),i._getList().removeAttr("aria-activedescendant"),i._target=null),e=!0;else if(r===u.DOWN||r===u.UP){if(!f)return n.preventDefault(),t;if(n.shiftKey&&!n.ctrlKey)i._shiftSelecting||(i.clearSelection(),i._shiftSelecting=!0),i._target&&f.hasClass("k-state-selected")?(i._target.removeClass(b),i.trigger(v)):i.select("single"==i.options.selectable?f:f.add(i._target));else{if(n.shiftKey&&n.ctrlKey)return i._executeCommand(r===u.DOWN?st:ft),i._scrollIntoView(i._target),n.preventDefault(),t;n.shiftKey||n.ctrlKey||("multiple"===i.options.selectable&&i.clearSelection(),i.select(f))}i._target=f,i._target?(i._target.addClass(y),i._scrollIntoView(i._target),i._getList().attr("aria-activedescendant",i._target.attr("id"))):i._getList().removeAttr("aria-activedescendant"),e=!0}else r==u.SPACEBAR?(n.ctrlKey&&i._target?i._target.hasClass(b)?(i._target.removeClass(b),i.trigger(v)):i.select(i._target):(i.clearSelection(),i.select(i._target)),e=!0):n.ctrlKey&&r==u.RIGHT?(i._executeCommand(n.shiftKey?wt:rt),i._target=i.select().length?i.select():null,e=!0):n.ctrlKey&&r==u.LEFT&&(i._executeCommand(n.shiftKey?yt:ht),e=!0);e&&n.preventDefault()},focus:function(){this._getList().focus()},_createDraggable:function(){var r,t=this,u=t.options.draggable;if(u){if(r=u.hint,!t.options.selectable)throw Error("Dragging requires selection to be enabled");r||(r=ar),t._draggable=new i.ui.Draggable(t.wrapper,{filter:u.filter?u.filter:gi,hint:i.isFunction(r)?r:n(r),dragstart:f(t._dragstart,t),dragcancel:f(t._clear,t),drag:f(t._drag,t),dragend:f(t._dragend,t)})}},_dragstart:function(r){var u=this,f=u.draggedElement=r.currentTarget,e=u.options.draggable.placeholder,s=u.dataItem(f),o={dataItems:s,items:n(f),draggableEvent:r};return u.options.draggable.enabled===!1?(r.preventDefault(),t):(e||(e=oi),u.placeholder=n(i.isFunction(e)?e.call(u,f):e),f.is(si+l)?r.preventDefault():u.trigger(ii,o)?r.preventDefault():(u.clearSelection(),u.select(f),f.addClass(g)),t)},_clear:function(){this.draggedElement.removeClass(g),this.placeholder.remove()},_findElementUnderCursor:function(t){var u=i.elementUnderCursor(t),r=t.sender;return(n.contains(r.hint[0],u)||r.hint[0]===u)&&(r.hint.hide(),u=i.elementUnderCursor(t),r.hint.show()),u},_findTarget:function(t){var e,u,r=this,i=r._findElementUnderCursor(t),o=n(i),f=r._getList();return n.contains(f[0],i)?(e=r.items(),i=o.is("li")?i:o.closest("li")[0],u=e.filter(i)[0]||e.has(i)[0],u?(u=n(u),u.hasClass(l)?null:{element:u,listBox:r}):null):f[0]==i||f.parent()[0]==i?{element:n(f),appendToBottom:!0,listBox:r}:r._searchConnectedListBox(o)},_getElementCenter:function(n){var t=n.length?i.getOffset(n):null;return t&&(t.top+=er(n)/2,t.left+=fr(n)/2),t},_searchConnectedListBox:function(t){var i,u,r,f,e=t;return f=t.hasClass("k-list-scroller k-selectable")?t:t.closest(".k-list-scroller.k-selectable"),f.length?(i=f.parent().find("[data-role='listbox']").getKendoListBox(),i&&n.inArray(this.element[0].id,i.options.dropSources)!==-1?(u=i.items(),t=t.is("li")?t[0]:t.closest("li")[0],r=u.filter(t)[0]||u.has(t)[0],r?(r=n(r),r.hasClass(l)?null:{element:r,listBox:i}):!u.length||e.hasClass("k-list-scroller k-selectable")||e.hasClass("k-reset k-list")?{element:i._getList(),listBox:i,appendToBottom:!0}:null):null):null},_drag:function(i){var s,o,e,r=this,f=r.draggedElement,u=r._findTarget(i),h={left:i.x.location,top:i.y.location},l=r.dataItem(f),c={dataItems:[l],items:n(f),draggableEvent:i};if(r.trigger(ti,c))return i.preventDefault(),t;if(u){if(s=this._getElementCenter(u.element),o={left:Math.round(h.left-s.left),top:Math.round(h.top-s.top)},u.appendToBottom)return r._movePlaceholder(u,null,f),t;o.top<0?e="prev":o.top>0&&(e="next"),e&&u.element[0]!=r.placeholder[0]&&r._movePlaceholder(u,e,f)}else r.placeholder.parent().length&&r.placeholder.remove()},_movePlaceholder:function(t,r,u){var f=this,o=f.placeholder,e=t.listBox.options.draggable;o.parent().length&&(f.placeholder.remove(),f.placeholder=n(e&&e.placeholder?i.isFunction(e.placeholder)?e.placeholder.call(f,u):e.placeholder:oi.call(f,u))),r?"prev"===r?t.element.before(f.placeholder):"next"===r&&t.element.after(f.placeholder):t.element.append(f.placeholder)},_dragend:function(i){var r=this,f=r.draggedElement,c=r.items(),o=c.not(r.draggedElement).index(r.placeholder),l=c.not(r.placeholder).index(r.draggedElement),a=r.dataItem(f),u={dataItems:[a],items:n(f)},e=r.placeholder.closest(".k-widget.k-listbox").find("[data-role='listbox']").getKendoListBox();return r.trigger(ui,s({},u,{draggableEvent:i}))?(i.preventDefault(),this._clear(),t):(o>=0?o===l||r.trigger(ot,s({},u,{offset:o-l}))||(f.removeClass(g),r.reorder(f,o)):e&&(r.trigger(h,u)||r.remove(n(f)),e.trigger(ut,u)||e._addItemAt(a,e.items().index(r.placeholder))),r._clear(),r._draggable.dropped=!0,r.trigger(ri,s({},u,{draggableEvent:i})),t)},reorder:function(t,i){var r=this,e=r.dataSource,o=r.dataItem(t),s=e.at(i),f=r.items()[i],u=n(t);o&&f&&s&&(r._removeElement(u),r._insertElementAt(u,i),r._updateToolbar())},remove:function(t){var r,i=this,u=i._getItems(t),f=u.length;for(i._unbindDataSource(),r=0;r<f;r++)i._removeItem(n(u[r]));i._bindDataSource(),i._syncElement(),i._updateToolbar(),i._updateAllToolbars()},_removeItem:function(n){var t,i,u=this,f=u.dataSource,r=u.dataItem(n);if(r&&f){if("string"==typeof r){for(t=f._data,i=0;i<t.length;i++)if(r===t[i]){t[i]=t[t.length-1],t.pop();break}}else f.remove(r);u._removeElement(n)}},_removeElement:function(t){i.destroy(t),n(t).off().remove()},dataItem:function(t){var i=tt(nt),r=n(t).attr(i)||n(t).closest("["+i+"]").attr(i);return r?this.dataSource.getByUid(r):n(t).html()},_dataItems:function(t){for(var u=[],r=n(t),f=r.length,i=0;i<f;i++)u.push(this.dataItem(r.eq(i)));return u},items:function(){var n=this._getList();return n.children()},select:function(n){var i,r=this,t=r.selectable;return li(n)?t.value():(i=r.items().filter(n).filter(wr),t.options.multiple||(t.clear(),i=i.first()),t.value(i))},clearSelection:function(){var t=this,n=t.selectable;n&&n.clear()},enable:function(t,i){for(var u=this,o=!!li(i)||!!i,f=u._getItems(t),e=f.length,r=0;r<e;r++)u._enableItem(n(f[r]),o);u._updateAllToolbars()},_enableItem:function(t,i){var u=this,r=u.dataItem(t);r&&(i?n(t).removeClass(l):n(t).addClass(l).removeClass(b))},setDataSource:function(n){var t=this;t.options.dataSource=n,t._dataSource()},_dataSource:function(){var i=this,r=i.options,t=r.dataSource||{};t=n.isArray(t)?{data:t}:t,t.select=i.element,t.fields=[{field:r.dataTextField},{field:r.dataValueField}],i._unbindDataSource(),i.dataSource=vr.create(t),i._bindDataSource(),i.options.autoBind&&i.dataSource.fetch()},_bindDataSource:function(){var n=this,t=n.dataSource;n._dataChangeHandler=f(n.refresh,n),t&&t.bind(v,n._dataChangeHandler)},_unbindDataSource:function(){var t=this,n=t.dataSource;n&&n.unbind(v,t._dataChangeHandler)},_wrapper:function(){var r=this,i=r.element,t=i.parent("div.k-listbox");t[0]||(t=i.wrap('<div class="k-widget k-listbox" deselectable="on" />').parent(),t[0].style.cssText=i[0].style.cssText,t[0].title=i[0].title,n('<div class="k-list-scroller" />').insertBefore(i)),r.wrapper=t.addClass(i[0].className).css("display",""),r._innerWrapper=n(t[0].firstChild)},_list:function(){var t=this;n("<ul class='"+sr+"' role='listbox'></ul>").appendTo(t._innerWrapper),t.options.navigatable&&t._getList().attr(bt,t._getTabIndex())},_templates:function(){var t,r=this,n=this.options;t=n.template&&"string"==typeof n.template?i.template(n.template):n.template?n.template:i.template("${"+i.expr(n.dataTextField,"data")+"}",{useWithBlock:!1}),r.templates={itemTemplate:i.template("# var item = data.item, r = data.r; # <li class='k-item' role='option' aria-selected='false'>#=r(item)#</li>",{useWithBlock:!1}),itemContent:t,toolbar:"<div class='"+c+"'></div>"}},refresh:function(){for(var n=this,r=n.dataSource.view(),u=n.templates.itemTemplate,i="",t=0;t<r.length;t++)i+=u({item:r[t],r:n.templates.itemContent});n._getList().html(i),n._setItemIds(),n._createToolbar(),n._syncElement(),n._updateToolbar(),n._updateAllToolbars(),n.trigger(dt)},_syncElement:function(){for(var i="",t=this.dataSource.view(),n=0;n<t.length;n++)i+=this._option(t[n][this.options.dataValueField]||t[n],t[n][this.options.dataTextField]||t[n],!0);this.element.html(i)},_option:function(n,r){var u="<option";return n!==t&&(n+="",n.indexOf('"')!==-1&&(n=n.replace(/"/g,"&quot;")),u+=' value="'+n+'"'),u+=" selected>",r!==t&&(u+=i.htmlEncode(r)),u+="</option>"},_setItemIds:function(){for(var i=this,u=i.items(),t=i.dataSource.view(),r=t.length,n=0;n<r;n++)u.eq(n).attr(tt(nt),t[n].uid).attr("id",t[n].uid)},_selectable:function(){var n=this,i=n.options.selectable,t=hi.parseOptions(i);t.multiple&&n.element.attr("aria-multiselectable","true"),n.selectable=new hi(n._innerWrapper,{aria:!0,multiple:t.multiple,filter:e,change:f(n._onSelect,n)})},_onSelect:function(){var n=this;n._updateToolbar(),n._updateAllToolbars(),n.trigger(v)},_destroySelectable:function(){var n=this;n.selectable&&(n.selectable.destroy(),n.selectable=null)},_getList:function(){return this.wrapper.find(ki)},_getItems:function(n){return this.items().filter(n)},_createToolbar:function(){var f,t=this,i=t.options.toolbar,u=i.position||it,o=u===ni?"insertAfter":"insertBefore",r=i.tools||[],e=t.options.messages;t._destroyToolbar(),t.wrapper.removeClass(bi.join(lr)),r.length&&r.length>0&&(f=n(t.templates.toolbar)[o](t._innerWrapper),t.toolbar=new p(f,s({},i,{listBox:t,messages:e})),t.wrapper.addClass(c+w+u))},_destroyToolbar:function(){var n=this;n.toolbar&&(n.toolbar.destroy(),n.toolbar=null)},_executeCommand:function(n){var t=this,i=r.current.create(n,{listBox:t});i&&(i.execute(),t._updateToolbar(),t._updateAllToolbars())},_updateToolbar:function(){var n=this.toolbar;n&&n._updateToolStates()},_updateAllToolbars:function(){for(var i,r=n("select[data-role='listbox']"),u=r.length,t=0;t<u;t++)i=n(r[t]).data(d),i&&i._updateToolbar()}});i.ui.plugin(gt),r=pt.extend({init:function(){this._commands=[]},register:function(n,t){this._commands.push({commandName:n,commandType:t})},create:function(n,t){for(var u,r,f=this._commands,o=f.length,e=n?n.toLowerCase():"",i=0;i<o;i++)if(r=f[i],r.commandName.toLowerCase()===e){u=r;break}if(u)return new u.commandType(t)}}),r.current=new r,k=pt.extend({init:function(n){var t=this;t.options=s({},t.options,n),t.listBox=t.options.listBox},options:{listBox:null},getItems:function(){return n(this.listBox.select())},execute:o,canExecute:o}),ei=k.extend({execute:function(){var i=this,t=i.listBox,n=i.getItems();t.trigger(h,{dataItems:t._dataItems(n),items:n})||t.remove(n)},canExecute:function(){return this.listBox.select().length>0}}),r.current.register(h,ei),lt=k.extend({execute:function(){var n=this;n.canExecute()&&n.moveItems()},canExecute:o,moveItems:function(){var o,i=this,r=i.listBox,s=i.options,h=i.getItems(),e=s.offset,u=et(h),t=n.makeArray(h.sort(i.itemComparer)),f=s.moveAction;if(!r.trigger(ot,{dataItems:r._dataItems(t),items:n(t),offset:e}))for(;t.length>0&&u.length>0;)o=t[f](),r.reorder(o,u[f]()+e)},options:{offset:0,moveAction:"pop"},itemComparer:function(t,i){var u=n(t).index(),r=n(i).index();return u===r?0:u>r?1:-1}}),ai=lt.extend({options:{offset:ir,moveAction:"shift"},canExecute:function(){var t=this.getItems(),n=et(t);return n.length>0&&n[0]>0}}),r.current.register(ft,ai),yi=lt.extend({options:{offset:rr,moveAction:"pop"},canExecute:function(){var i=this,r=i.getItems(),t=et(r);return t.length>0&&n(t).last()[0]<i.listBox.items().length-1}}),r.current.register(st,yi),at=k.extend({options:{filter:e},execute:function(){var t=this,i=t.getSourceListBox(),n=t.getItems().filter(t.options.filter),u=i?i._dataItems(n):[],r=t.getDestinationListBox(),f=t.getUpdatedSelection(n);r&&n.length>0&&(r.trigger(ut,{dataItems:u,items:n})||r.add(u),i.trigger(h,{dataItems:u,items:n})||(i.remove(n),t.updateSelection(f)))},getUpdatedSelection:function(t){var f=this,i=f.options.filter,u=f.getSourceListBox(),e=u?u.items().filter(i).last():null,o=n(t).filter(e).length>0,r=o?n(t).prevAll(i)[0]:n(t).nextAll(i)[0];return 1===n(t).length&&r?r:null},updateSelection:function(t){var i=this.getSourceListBox();i&&t&&(n(i.select(n(t))),i._scrollIntoView(t))},getSourceListBox:o,getDestinationListBox:o}),vt=at.extend({canExecute:function(){var n=this.getSourceListBox();return!!n&&n.select().length>0},getSourceListBox:function(){return this.listBox},getDestinationListBox:function(){var t=this.getSourceListBox();return t&&t.options.connectWith?n(fi+t.options.connectWith).data(d):null},getItems:function(){var t=this.getSourceListBox();return t?n(t.select()):n()}}),r.current.register(rt,vt),ct=at.extend({canExecute:function(){var n=this.getSourceListBox();return!!n&&n.select().length>0},getSourceListBox:function(){var t=this.getDestinationListBox();return t&&t.options.connectWith?n(fi+t.options.connectWith).data(d):null},getDestinationListBox:function(){return this.listBox},getItems:function(){var t=this.getSourceListBox();return t?n(t.select()):n()}}),r.current.register(ht,ct),vi=vt.extend({canExecute:function(){var n=this.getSourceListBox();return!!n&&n.items().filter(e).length>0},getItems:function(){var t=this.getSourceListBox();return t?t.items():n()},getUpdatedSelection:o,updateSelection:o}),r.current.register(wt,vi),pi=ct.extend({canExecute:function(){var n=this.getSourceListBox();return!!n&&n.items().filter(e).length>0},getItems:function(){var t=this.getSourceListBox();return t?t.items():n()},getUpdatedSelection:o,updateSelection:o}),r.current.register(yt,pi),p=pt.extend({init:function(t,i){var r=this;r.element=n(t).addClass(c),r.options=s({},r.options,i),r.listBox=r.options.listBox,r._initTemplates(),r._createTools(),r._updateToolStates(),r._attachEventHandlers()},destroy:function(){var n=this;n._detachEventHandlers(),i.destroy(n.element),n.element.remove(),n.element=null},options:{position:it,tools:[]},_initTemplates:function(){this.templates={tool:tr("<li><a href='\\\\#' class='k-button k-button-icon k-tool' data-command='#= command #' title='#= text #' aria-label='#= text #' role='button'><span class='k-icon #= iconClass #'></span></a></li>")}},_createTools:function(){for(var u,t=this,r=t.options.tools,e=r.length,o=t.options.messages.tools,f=t._createToolList(),i=0;i<e;i++)u=s({},p.defaultTools[r[i]],{text:o[r[i]]}),u&&f.append(n(t.templates.tool(u)));t.element.append(f)},_createToolList:function(){return n("<ul class='k-reset' />")},_attachEventHandlers:function(){var n=this;n.element.on(kt,pr,f(n._onToolClick,n))},_detachEventHandlers:function(){this.element.off(a).find("*").off(a)},_onToolClick:function(t){t.preventDefault(),this._executeToolCommand(n(t.currentTarget).data(di))},_executeToolCommand:function(n){var i=this,t=i.listBox;t&&t._executeCommand(n)},_updateToolStates:function(){for(var i=this,t=i.options.tools,r=t.length,n=0;n<r;n++)i._updateToolState(t[n])},_updateToolState:function(t){var f=this,i=r.current.create(t,{listBox:f.listBox}),u=f.element.find("[data-command='"+t+"']")[0];u&&i&&i.canExecute&&(i.canExecute()?n(u).removeClass(l):n(u).addClass(l))}}),p.defaultTools={remove:{command:h,iconClass:"k-i-x"},moveUp:{command:ft,iconClass:"k-i-arrow-60-up"},moveDown:{command:st,iconClass:"k-i-arrow-60-down"},transferTo:{command:rt,iconClass:"k-i-arrow-60-right"},transferFrom:{command:ht,iconClass:"k-i-arrow-60-left"},transferAllTo:{command:wt,iconClass:"k-i-arrow-double-60-right"},transferAllFrom:{command:yt,iconClass:"k-i-arrow-double-60-left"}},s(gt,{ToolBar:p})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.upload.min",["kendo.core.min"],n)}(function(){return function(n,t){function kt(t){return n.map(bt(t),function(n){return n.name}).join(", ")}function bt(n){var t=n[0];return t.files?wt(t.files):[{name:ei(t.value),extension:yt(t.value),size:null}]}function wt(t){return n.map(t,function(n){return ii(n)})}function ii(n){var t=n.name||n.fileName;return{name:i.htmlEncode(t),extension:yt(t),size:"number"==typeof n.size?n.size:n.fileSize,rawFile:n}}function yt(n){var t=n.match(ti);return t?t[0]:""}function ei(n){var t=n.lastIndexOf("\\");return t!=-1?n.substr(t+1):n}function g(t,r){var u=i.guid();return n.map(t,function(n){return n.uid=r?i.guid():u,n})}function vt(n,t){for(var f=oi(t.allowedExtensions),u=t.maxFileSize,r=t.minFileSize,i=0;i<n.length;i++)ui(n[i],f),fi(n[i],r,u)}function oi(t){return n.map(t,function(n){var t="."===n.substring(0,1)?n:"."+n;return t.toLowerCase()})}function ui(t,i){i.length>0&&i.indexOf(t.extension.toLowerCase())<0&&(t.validationErrors=t.validationErrors||[],n.inArray(rt,t.validationErrors)===-1&&t.validationErrors.push(rt))}function fi(t,i,r){0!==i&&t.size<i&&(t.validationErrors=t.validationErrors||[],n.inArray(st,t.validationErrors)===-1&&t.validationErrors.push(st)),0!==r&&t.size>r&&(t.validationErrors=t.validationErrors||[],n.inArray(ht,t.validationErrors)===-1&&t.validationErrors.push(ht))}function at(n){var i,t=0;if("number"!=typeof n[0].size)return"";for(i=0;i<n.length;i++)n[i].size&&(t+=n[i].size);return t/=1024,t<1024?t.toFixed(2)+" KB":(t/1024).toFixed(2)+" MB"}function ct(t){return!t.multiple&&n(".k-file",t.wrapper).length>1}function lt(i,r,u,f){var e,s;return r._supportsRemove()?(e=i.data("fileNames"),s=n.map(e,function(n){return n.name}),f===!1?(r._removeFileEntry(i),t):(r._submitRemove(s,u,function(n,t,u){var f=r.trigger(p,{operation:"remove",files:e,response:n,XMLHttpRequest:u});f||r._removeFileEntry(i)},function(n){ct(r)&&r._removeFileEntry(i),r.trigger(o,{operation:"remove",files:e,XMLHttpRequest:n}),w("Server response: "+n.responseText)}),t)):(!ct(r)&&f||r._removeFileEntry(i),t)}function pt(t,i,r){var f=!1,u="";try{u=n.parseJSON(dt(t)),f=!0}catch(e){r()}f&&i(u)}function dt(n){return t!==n&&""!==n||(n="{}"),n}function a(n){n.stopPropagation(),n.preventDefault()}function l(n,t,i,r){var u,f;n.on("dragenter"+t,function(n){i(n),f=new Date,u||(u=setInterval(function(){var n=new Date-f;n>100&&(r(),clearInterval(u),u=null)},100))}).on("dragover"+t,function(){f=new Date})}function gt(n){return n.is(".k-file-progress, .k-file-success, .k-file-error")}function r(t){return n(t.target).closest(".k-file")}var b,v,i=window.kendo,c=i.ui.Widget,k=i.antiForgeryTokens,w=i.logToConsole,ti=/\.([^\.]+)$/,f=".kendoUpload",nt="select",y="upload",p="success",o="error",et="complete",s="cancel",it="clear",tt="pause",ft="resume",ot="progress",u="remove",e="validationErrors",ht="invalidMaxFileSize",st="invalidMinFileSize",rt="invalidFileExtension",ri=1e3,ni=2e3,h={loading:"k-i-loading",warning:"k-i-warning",success:"k-i-check"},d=c.extend({init:function(t,r){var e,o,s,u=this;c.fn.init.call(u,t,r),u.name=t.name,u.multiple=u.options.multiple,u.directory=u.options.directory,u.localization=u.options.localization,e=u.element,u.wrapper=e.closest(".k-upload"),0===u.wrapper.length&&(u.wrapper=u._wrapInput(e)),u._activeInput(e),u.toggle(u.options.enabled),o=u._ns=f+"-"+i.guid(),e.closest("form").on("submit"+o,n.proxy(u._onParentFormSubmit,u)).on("reset"+o,n.proxy(u._onParentFormReset,u)),u.options.async.saveUrl?(u._module=u._supportsFormData()?new v(u):new b(u),u._async=!0,s=u.options.files,s.length>0&&u._renderInitialFiles(s)):u._module=new ut(u),u._supportsDrop()&&(""!==u.options.dropZone?u._setupCustomDropZone():u._setupDropZone()),u.wrapper.on("click",".k-upload-action",n.proxy(u._onFileAction,u)).on("click",".k-clear-selected",n.proxy(u._onClearSelected,u)).on("click",".k-upload-selected",n.proxy(u._onUploadSelected,u)),u.element.val()&&u._onInputChange({target:u.element})},events:[nt,y,p,o,et,s,it,ot,u,tt,ft],options:{name:"Upload",enabled:!0,multiple:!0,directory:!1,showFileList:!0,template:"",files:[],async:{autoRetryAfter:0,bufferChunkSize:1e7,maxAutoRetries:1,removeVerb:"POST",autoUpload:!0,withCredentials:!0,accept:"*/*; q=0.5, application/json",useArrayBuffer:!1},localization:{select:"Select files...",cancel:"Cancel",retry:"Retry",remove:"Remove",pause:"Pause",resume:"Resume",clearSelectedFiles:"Clear",uploadSelectedFiles:"Upload",dropFilesHere:"Drop files here to upload",invalidFiles:"Invalid file(s). Please check file upload requirements.",statusUploading:"uploading",statusUploaded:"uploaded",statusWarning:"warning",statusFailed:"failed",headerStatusUploading:"Uploading...",headerStatusPaused:"Paused",headerStatusUploaded:"Done",invalidMaxFileSize:"File size too large.",invalidMinFileSize:"File size too small.",invalidFileExtension:"File type not allowed."},validation:{allowedExtensions:[],maxFileSize:0,minFileSize:0},dropZone:""},setOptions:function(n){var t=this,i=t.element;c.fn.setOptions.call(t,n),t.multiple=t.options.multiple,t.directory=t.options.directory,i.attr("multiple",!!t._supportsMultiple()&&t.multiple),t.directory&&(i.attr("webkitdirectory",t.directory),i.attr("directory",t.directory)),t.toggle(t.options.enabled)},enable:function(n){n=t===n||n,this.toggle(n)},disable:function(){this.toggle(!1)},toggle:function(n){n=t===n?n:!n,this.wrapper.toggleClass("k-state-disabled",n),this.element.prop("disabled",n)},focus:function(){this.element.focus()},destroy:function(){var t=this,i=n(t.options.dropZone);n(document).add(n(".k-dropzone",t.wrapper)).add(t.wrapper.closest("form")).off(t._ns),i.length>0&&i.off(t._ns),n(t.element).off(f),c.fn.destroy.call(t)},pause:function(t){this._module.onPause({target:n(t,this.wrapper)});var i=t.find(".k-i-pause-sm");i.removeClass("k-i-pause-sm").addClass("k-i-play-sm").attr("title",this.localization.resume),n(i).parent().attr("aria-label",this.localization.resume)},resume:function(t){this._module.onResume({target:n(t,this.wrapper)});var i=t.find(".k-i-play-sm");i.removeClass("k-i-play-sm").addClass("k-i-pause-sm").attr("title",this.localization.pause),n(i).parent().attr("aria-label",this.localization.pause)},upload:function(){var n=this;n._module.onSaveSelected()},getFiles:function(){for(var r,i,e=this,f=[],u=e.wrapper.find(".k-file"),t=0;t<u.length;t++)if(r=n(u[t]).data("fileNames"))for(i=0;i<r.length;i++)f.push(r[i]);return f},clearAllFiles:function(){var n=this,t=n.wrapper.find(".k-file");t.each(function(t,i){n._removeFileByDomElement(i,!1)})},removeAllFiles:function(){var n=this,t=n.wrapper.find(".k-file");t.each(function(t,i){n._removeFileByDomElement(i,!0)})},removeFileByUid:function(n){this._removeFileByUid(n,!0)},clearFileByUid:function(n){this._removeFileByUid(n,!1)},_removeFileByUid:function(t,r){var u,f=this;"string"==typeof t&&(u=n(".k-file["+i.attr("uid")+'="'+t+'"]',f.wrapper),u.length>0&&f._removeFileByDomElement(u,r))},clearFile:function(n){this._removeFile(n,!1)},removeFile:function(n){this._removeFile(n,!0)},_removeFile:function(t,i){var u,r=this,f=r.wrapper.find(".k-file");"function"==typeof t&&f.each(function(f,e){u=n(e).data("fileNames"),t(u)&&r._removeFileByDomElement(e,i)})},_removeFileByDomElement:function(t,i){var f,r=this,u={target:n(t,r.wrapper)};r.options.async.saveUrl?(n(t).hasClass("k-file-progress")?r._module.onCancel(u):r._module.onRemove(u,{},i),f=n(".k-file",r.wrapper),0===f.length?r._hideHeaderUploadstatus():r._updateHeaderUploadStatus()):r._module.onRemove(u,{},i)},_addInput:function(t){if(t[0].nodeType){var i=this,r=t.clone().val("");r.insertAfter(i.element).data("kendoUpload",i),n(i.element).hide().attr("tabindex","-1").removeAttr("id").off(f),i._activeInput(r),i.element.focus()}},_activeInput:function(t){var i=this,r=i.wrapper;i.element=t,i.directory&&(t.attr("webkitdirectory",i.directory),t.attr("directory",i.directory)),t.attr("multiple",!!i._supportsMultiple()&&i.multiple).attr("autocomplete","off").on("click"+f,function(n){r.hasClass("k-state-disabled")&&n.preventDefault()}).on("focus"+f,function(){n(this).parent().addClass("k-state-focused")}).on("blur"+f,function(){n(this).parent().removeClass("k-state-focused")}).on("change"+f,n.proxy(i._onInputChange,i)).on("keydown"+f,n.proxy(i._onInputKeyDown,i))},_onInputKeyDown:function(n){var r=this,t=r.wrapper.find(".k-upload-action:visible:first");n.keyCode===i.keys.TAB&&t.length>0&&(n.preventDefault(),t.focus())},_onInputChange:function(t){var f,i=this,r=n(t.target),u=g(i._inputFiles(r),i._isAsyncNonBatch());vt(u,i.options.validation),f=i.trigger(nt,{files:u}),f?(i._addInput(r),r.remove()):i._module.onSelect({target:r},u)},_readDirectory:function(t){var i=new n.Deferred,r=t.createReader();return r.readEntries(function(n){i.resolve(n)},i.reject),i.promise()},_readFile:function(n){var t=this,i=n.fullPath;n.file(function(n){n.relativePath=i.slice(1),t.droppedFolderFiles.push(n),t.droppedFolderCounter--,0===t.droppedFolderCounter&&setTimeout(function(){0===t.droppedFolderCounter&&t.droppedFolderFiles.length&&(t._proceedDroppedItems(t.droppedFolderFiles),t.droppedFolderFiles=[])},0)},function(){w("File error.")})},_traverseFileTree:function(n,t){var i=this;t||i.droppedFolderCounter--,this._readDirectory(n).then(function(n){i.droppedFolderCounter+=n.length;for(var t=0;t<n.length;t++)n[t].isFile?i._readFile(n[t]):n[t].isDirectory&&i._traverseFileTree(n[t])})},_onDrop:function(n){var e,r,u,i=n.originalEvent.dataTransfer,t=this,f=i.files;if(a(n),t.options.directoryDrop&&i.items)for(e=i.items.length,t.droppedFolderCounter=0,t.droppedFolderFiles=[],r=0;r<e;r++)i.items[r].webkitGetAsEntry?(u=i.items[r].webkitGetAsEntry(),u.isDirectory?t._traverseFileTree(u,!0):u.isFile&&t.droppedFolderFiles.push(i.files[r])):t._proceedDroppedItems(f);else t._proceedDroppedItems(f)},_proceedDroppedItems:function(t){var u,i=this,r=g(wt(t),i._isAsyncNonBatch());t.length>0&&!i.wrapper.hasClass("k-state-disabled")&&(!i.multiple&&r.length>1&&r.splice(1,r.length-1),vt(r,i.options.validation),u=i.trigger(nt,{files:r}),u||i._module.onSelect({target:n(".k-dropzone",i.wrapper)},r))},_filesContainValidationErrors:function(t){var i=!1;return n(t).each(function(n,t){if(t[e]&&t[e].length>0)return i=!0,!1}),i},_isAsyncNonBatch:function(){return this._async&&!this.options.async.batch||!1},_renderInitialFiles:function(n){var f,i,r=this,t=0;for(n=g(n,!0),t=0;t<n.length;t++)f=n[t],i=r._enqueueFile(f.name,{fileNames:[f]}),i.addClass("k-file-success").data("files",[n[t]]),r._supportsRemove()&&r._fileAction(i,u)},_prepareTemplateData:function(n,t){for(var u=t.fileNames,i={},f=0,r=0,r=0;r<u.length;r++)f+=u[r].size;return i.name=n,i.size=f,i.files=t.fileNames,i},_prepareDefaultSingleFileEntryTemplate:function(t){var f=this,i=t.fileNames[0],o=at(t.fileNames),r=i[e],u="";return u+=r&&r.length>0?"<li class='k-file k-file-invalid'><span class='k-progress'></span><span class='k-file-invalid-extension-wrapper'><span class='k-file-invalid-icon'>!</span><span class='k-file-state'></span></span><span class='k-file-name-size-wrapper'><span class='k-file-name k-file-name-invalid' title='"+i.name+"'>"+i.name+"</span><span class='k-file-validation-message'>"+f.localization[r[0]]+"</span></span>":"<li class='k-file'><span class='k-progress'></span><span class='k-file-extension-wrapper'><span class='k-file-extension'>"+i.extension.substring(1)+"</span><span class='k-file-state'></span></span><span class='k-file-name-size-wrapper'><span class='k-file-name' title='"+i.name+"'>"+i.name+"</span><span class='k-file-size'>"+o+"</span></span>",u+="<strong class='k-upload-status'></strong>",n(u)},_prepareDefaultMultipleFileEntriesTemplate:function(t){var f,r,o=this,u=t.fileNames,s=o._filesContainValidationErrors(u),h=at(u),i="";for(i+=s?"<li class='k-file k-file-invalid'><span class='k-progress'></span><span class='k-multiple-files-invalid-extension-wrapper'><span class='k-file-invalid-icon'>!</span>":"<li class='k-file'><span class='k-progress'></span><span class='k-multiple-files-extension-wrapper'>",i+="<span class='k-file-state'></span></span>",u.sort(function(n,t){return n[e]?-1:t[e]?1:0}),i+="<span class='k-file-name-size-wrapper'>",f=0;f<u.length;f++)r=u[f],i+=r[e]&&r[e].length>0?"<span class='k-file-name k-file-name-invalid' title='"+r.name+"'>"+r.name+"</span>":"<span class='k-file-name' title='"+r.name+"'>"+r.name+"</span>";return i+=s?"<span class='k-file-validation-message'>"+o.localization.invalidFiles+"</span>":"<span class='k-file-information'>Total: "+u.length+" files, "+h+"</span>",i+="</span><strong class='k-upload-status'></strong>",n(i)},_enqueueFile:function(t,r){var h,e,l,c,f=this,a=r.fileNames[0].uid,o=n(".k-upload-files",f.wrapper),v=f.options,s=v.template;return 0===o.length&&(o=n("<ul class='k-upload-files k-reset'></ul>").appendTo(f.wrapper),f.options.showFileList||o.hide(),f.wrapper.removeClass("k-upload-empty")),h=n(".k-file",o),s?(l=f._prepareTemplateData(t,r),s=i.template(s),e=n("<li class='k-file'>"+s(l)+"</li>"),e.find(".k-upload-action").addClass("k-button"),f.angular("compile",function(){return{elements:e,data:[l]}})):e=1===r.fileNames.length?f._prepareDefaultSingleFileEntryTemplate(r):f._prepareDefaultMultipleFileEntriesTemplate(r),e.attr(i.attr("uid"),a).appendTo(o).data(r),f._async||n(".k-progress",e).width("100%"),!f.multiple&&h.length>0&&(c={files:h.data("fileNames"),headers:{}},f.trigger(u,c)||f._module.onRemove({target:n(h,f.wrapper)},c)),e},_removeFileEntry:function(t){var r,f,e,u=this,i=t.closest(".k-upload-files");t.remove(),r=n(".k-file",i),f=n(".k-file-success, .k-file-error",i),e=n(".k-file-invalid",i),f.length!==r.length&&e.length!==r.length||this._hideUploadButton(),0===r.length?(i.remove(),u.wrapper.addClass("k-upload-empty"),u._hideHeaderUploadstatus()):u._updateHeaderUploadStatus()},_fileAction:function(n,t,i){var r={remove:"k-i-x",cancel:"k-i-cancel",retry:"k-i-retry",pause:"k-i-pause-sm"},u={remove:"k-i-close",cancel:"k-i-close",retry:"k-i-reload-sm",pause:"k-i-pause-sm"};r.hasOwnProperty(t)&&(i||this._clearFileAction(n),this.options.template?n.find(".k-upload-action").addClass("k-button").append("<span class='k-icon "+u[t]+" "+r[t]+"' title='"+this.localization[t]+"'aria-label='"+this.localization[t]+"'></span>").show():(i||n.find(".k-upload-status .k-upload-action").remove(),n.find(".k-upload-status").append(this._renderAction(r[t],this.localization[t],u[t]))))},_fileState:function(t,i){var r=this.localization,f={uploading:{text:r.statusUploading},uploaded:{text:r.statusUploaded},failed:{text:r.statusFailed}},u=f[i];u&&n("span.k-file-state",t).text(u.text)},_renderAction:function(t,i,r){return""!==t?n("<button type='button' class='k-button k-upload-action' aria-label='"+i+"'><span class='k-icon "+r+" "+t+"' title='"+i+"'></span></button>").on("focus",function(){n(this).addClass("k-state-focused")}).on("blur",function(){n(this).removeClass("k-state-focused")}):n("<button type='button' class='k-button'>"+i+"</button>")},_clearFileAction:function(t){n(".k-upload-action",t).empty().hide()},_onFileAction:function(t){var h,e,r,o,c,f,i=this;return i.wrapper.hasClass("k-state-disabled")||(h=n(t.target).closest(".k-upload-action"),e=h.find(".k-icon"),r=h.closest(".k-file"),o=r.data("fileNames"),c=i._filesContainValidationErrors(o),f={files:o,headers:{}},e.hasClass("k-i-x")?i.trigger(u,f)||i._module.onRemove({target:n(r,i.wrapper)},f,!c):e.hasClass("k-i-cancel")?(i.trigger(s,f),i._module.onCancel({target:n(r,i.wrapper)}),i._checkAllComplete(),i._updateHeaderUploadStatus()):e.hasClass("k-i-pause-sm")?(i.trigger(tt,f),i.pause(r),i._updateHeaderUploadStatus()):e.hasClass("k-i-play-sm")?(i.trigger(ft,f),i.resume(r)):e.hasClass("k-i-retry")&&(n(".k-i-warning",r).remove(),n(".k-progress",r).finish().show(),i._module.onRetry({target:n(r,i.wrapper)}))),!1},_onUploadSelected:function(){var t=this,n=t.wrapper;return n.hasClass("k-state-disabled")||this._module.onSaveSelected(),!1},_onClearSelected:function(){var n=this,i=n.wrapper,t={};return i.hasClass("k-state-disabled")||n.trigger(it,t)||n.clearAllFiles(),!1},_onFileProgress:function(t,i){var f,u;i>100&&(i=100),this.options.template?n(".k-progress",t.target).width(i+"%"):(f=n(".k-upload-pct",t.target),u=n(".k-i-warning",t.target),u.length?u.removeClass("k-i-warning").removeClass("k-icon").addClass("k-upload-pct"):0===f.length&&n(".k-upload-status",t.target).prepend("<span class='k-upload-pct'></span>"),100!==i?n(".k-upload-pct",t.target).text(i+"%"):n(".k-upload-pct",t.target).remove(),n(".k-progress",t.target).width(i+"%")),this.trigger(ot,{files:r(t).data("fileNames"),percentComplete:i})},_onUploadSuccess:function(n,t,i){var f=this,e=r(n),o=f.trigger(p,{files:e.data("fileNames"),response:t,operation:"upload",XMLHttpRequest:i});o?f._setUploadErrorState(e):(f._fileState(e,"uploaded"),e.removeClass("k-file-progress").addClass("k-file-success"),f._updateHeaderUploadStatus(),f._supportsRemove()?f._fileAction(e,u):f._clearFileAction(e)),f._hideUploadProgress(e),f._checkAllComplete()},_onUploadError:function(n,t){var i=this,f=i._module,u=r(n),e=u.data("uid");i._setUploadErrorState(u),i.trigger(o,{operation:"upload",files:u.data("fileNames"),XMLHttpRequest:t}),w("Server response: "+t.responseText),i.options.async.chunkSize?f._decreasePosition&&f._decreasePosition(e):i._hideUploadProgress(u),i._checkAllComplete(),this.options.async.autoRetryAfter&&this._autoRetryAfter(u)},_autoRetryAfter:function(n){var i=this,t=this._module.retries;t&&(t[n.data("uid")]||(t[n.data("uid")]=1),t[n.data("uid")]<=this.options.async.maxAutoRetries&&(t[n.data("uid")]++,setTimeout(function(){i._module.performUpload(n)},this.options.async.autoRetryAfter)))},_setUploadErrorState:function(t){var i,r=this;r._fileState(t,"failed"),t.removeClass("k-file-progress").addClass("k-file-error"),r._updateUploadProgress(t),i=n(".k-upload-pct",t),i.length>0?(i.parent().find(".k-i-warning").length||i.removeClass("k-upload-pct").addClass("k-icon k-i-warning"),i.empty()):n(".k-upload-status",t).prepend("<span class='k-icon k-i-warning'></span>"),this._updateHeaderUploadStatus(),this._fileAction(t,"retry"),this._fileAction(t,u,!0)},_updateUploadProgress:function(t){var u,r,f,i=this;i.options.async.chunkSize?(u=t.data("uid"),i._module.metaData&&(r=i._module.metaData[u],r&&(f=r.totalChunks?Math.round(r.chunkIndex/r.totalChunks*100):100,i._onFileProgress({target:n(t,i.wrapper)},f)))):n(".k-progress",t).width("100%")},_hideUploadProgress:function(t){n(".k-progress",t).delay(ri).fadeOut(ni,function(){n(this).css("width","0%")})},_showUploadButton:function(){var t=this,i=n(".k-upload-selected",t.wrapper),r=n(".k-clear-selected",t.wrapper);0===i.length&&(i=t._renderAction("",this.localization.uploadSelectedFiles).addClass("k-upload-selected"),r=t._renderAction("",this.localization.clearSelectedFiles).addClass("k-clear-selected")),this.wrapper.append(r,i)},_hideUploadButton:function(){n(".k-upload-selected, .k-clear-selected",this.wrapper).remove()},_showHeaderUploadStatus:function(t){var r=this,u=r.localization,f=n(".k-dropzone",r.wrapper),i=n(".k-upload-status-total",r.wrapper);0!==i.length&&i.remove(),i='<strong class="k-upload-status k-upload-status-total"><span class="k-icon"></span></strong>',t?(i=n(i).append(u.headerStatusUploading),i.find(".k-icon").addClass(h.loading)):(i=n(i).append(u.headerStatusUploaded),i.find(".k-icon").addClass(h.warning)),f.length>0?f.append(i):n(".k-upload-button",r.wrapper).after(i)},_updateHeaderUploadStatus:function(){var e,r,t=this,i=n(".k-upload-status-total",this.wrapper),f=n(".k-file",t.wrapper).not(".k-file-success, .k-file-error, .k-file-invalid"),o=n(".k-file-invalid",t.wrapper),s=n(".k-file-error",t.wrapper),u=n(".k-file",t.wrapper).find(".k-i-play-sm");!u.length||u.length!==f.length&&t.options.async.concurrent?(0===f.length||o.length>0||s.length>0)&&(e=n(".k-file.k-file-error, .k-file.k-file-invalid",t.wrapper),i=n(".k-upload-status-total",t.wrapper),r=n(".k-icon",i).removeClass().addClass("k-icon").addClass(0!==e.length?h.warning:h.success),i.html(r).append(t.localization.headerStatusUploaded)):(r=n(".k-icon",i).removeClass().addClass("k-icon").addClass("k-i-pause-sm"),i.html(r).append(t.localization.headerStatusPaused))},_hideHeaderUploadstatus:function(){n(".k-upload-status-total",this.wrapper).remove()},_onParentFormSubmit:function(){var i,u=this,r=u.element;t!==this._module.onAbort&&this._module.onAbort(),r.value||(i=n(r),i.attr("disabled","disabled"),window.setTimeout(function(){i.removeAttr("disabled")},0))},_onParentFormReset:function(){n(".k-upload-files",this.wrapper).remove()},_supportsFormData:function(){return"undefined"!=typeof FormData},_supportsMultiple:function(){var n=this._userAgent().indexOf("Windows")>-1;return!(i.support.browser.opera||i.support.browser.safari&&n)},_supportsDrop:function(){var n=this._userAgent().toLowerCase(),r=/chrome/.test(n),i=!r&&/safari/.test(n),t=i&&/windows/.test(n);return!t&&this._supportsFormData()&&this.options.async.saveUrl},_userAgent:function(){return navigator.userAgent},_setupDropZone:function(){var r,i,t=this;n(".k-upload-button",t.wrapper).wrap("<div class='k-dropzone'></div>"),r=t._ns,i=n(".k-dropzone",t.wrapper).append(n("<em>"+t.localization.dropFilesHere+"</em>")).on("dragenter"+r,a).on("dragover"+r,function(n){n.preventDefault()}).on("drop"+r,n.proxy(t._onDrop,t)),l(i,r,function(){i.closest(".k-upload").hasClass("k-state-disabled")||i.addClass("k-dropzone-hovered")},function(){i.removeClass("k-dropzone-hovered")}),t._bindDocumentDragEventWrappers(i)},_setupCustomDropZone:function(){var r,t=this,i=n(t.options.dropZone);n(".k-upload-button",t.wrapper).wrap("<div class='k-dropzone'></div>"),r=t._ns,i.on("dragenter"+r,a).on("dragover"+r,function(n){n.preventDefault()}).on("drop"+r,n.proxy(t._onDrop,t)),l(i,r,function(r){t.wrapper.hasClass("k-state-disabled")||(i.removeClass("k-dropzone-hovered"),n(r.target).addClass("k-dropzone-hovered"))},function(){i.removeClass("k-dropzone-hovered")}),t._bindDocumentDragEventWrappers(i)},_bindDocumentDragEventWrappers:function(t){var i=this,r=i._ns;l(n(document),r,function(){i.wrapper.hasClass("k-state-disabled")||(t.addClass("k-dropzone-active"),t.closest(".k-upload").removeClass("k-upload-empty"))},function(){t.removeClass("k-dropzone-active"),0===n("li.k-file",t.closest(".k-upload")).length&&t.closest(".k-upload").addClass("k-upload-empty")})},_supportsRemove:function(){return!!this.options.async.removeUrl},_submitRemove:function(t,i,r,u){var e=this,o=e.options.async.removeField||"fileNames",f=n.extend(i.data,k());f[o]=t,jQuery.ajax({type:this.options.async.removeVerb,dataType:"json",dataFilter:dt,url:this.options.async.removeUrl,traditional:!0,data:f,headers:i.headers,success:r,error:u,xhrFields:{withCredentials:this.options.async.withCredentials}})},_wrapInput:function(n){var i=this,t=i.options;return n.wrap("<div class='k-widget k-upload k-header'><div class='k-button k-upload-button' aria-label='"+this.localization.select+"'></div></div>"),t.async.saveUrl||n.closest(".k-upload").addClass("k-upload-sync"),n.closest(".k-upload").addClass("k-upload-empty"),n.closest(".k-button").append("<span>"+this.localization.select+"</span>"),n.closest(".k-upload")},_checkAllComplete:function(){0===n(".k-file.k-file-progress",this.wrapper).length&&this.trigger(et)},_inputFiles:function(n){return bt(n)}}),ut=function(n){this.name="syncUploadModule",this.element=n.wrapper,this.upload=n,this.element.closest("form").attr("enctype","multipart/form-data").attr("encoding","multipart/form-data")};ut.prototype={onSelect:function(t,i){var e,o,r=this.upload,f=n(t.target),s=r._filesContainValidationErrors(i);r._addInput(f),e={fileNames:i},s?f.remove():e.relatedInput=f,o=r._enqueueFile(kt(f),e),s&&r._hideUploadProgress(o),r._fileAction(o,u)},onRemove:function(n){var i=r(n),t=i.data("relatedInput");t&&t.remove(),this.upload._removeFileEntry(i)}},b=function(n){this.name="iframeUploadModule",this.element=n.wrapper,this.upload=n,this.iframes=[]},d._frameId=0,b.prototype={onSelect:function(t,i){var r=this.upload,o=n(t.target),e=r._filesContainValidationErrors(i),f=this.prepareUpload(o,i,e);r.options.async.autoUpload?e?(r._fileAction(f,u),r._showHeaderUploadStatus(!1)):this.performUpload(f):(r._fileAction(f,u),e?r._updateHeaderUploadStatus():r._showUploadButton()),e&&r._hideUploadProgress(f)},prepareUpload:function(t,i,r){var e,o,u,h,f=this.upload,s=n(f.element),c=f.options.async.saveField||t.attr("name");return f._addInput(t),t.attr("name",c),r?(t.remove(),o={fileNames:i}):(u=this.createFrame(f.name+"_"+d._frameId++),this.registerFrame(u),h=this.createForm(f.options.async.saveUrl,u.attr("name")).append(s),o={frame:u,relatedInput:s,fileNames:i}),e=f._enqueueFile(kt(t),o),u&&u.data({form:h,file:e}),e},performUpload:function(t){var e,o,f,u={files:t.data("fileNames")},r=t.data("frame"),i=this.upload;if(i.trigger(y,u))i._removeFileEntry(r.data("file")),this.cleanupFrame(r),this.unregisterFrame(r);else{i._hideUploadButton(),i._showHeaderUploadStatus(!0),r.appendTo(document.body),e=r.data("form").attr("action",i.options.async.saveUrl).appendTo(document.body),u.data=n.extend({},u.data,k());for(o in u.data)f=e.find("input[name='"+o+"']"),0===f.length&&(f=n("<input>",{type:"hidden",name:o}).prependTo(e)),f.val(u.data[o]);i._fileAction(t,s),i._fileState(t,"uploading"),n(t).removeClass("k-file-error").addClass("k-file-progress"),r.one("load",n.proxy(this.onIframeLoad,this)),e[0].submit()}},onSaveSelected:function(){var t=this,i=t.upload;n(".k-file",this.element).each(function(){var r=n(this),f=gt(r),u=i._filesContainValidationErrors(r.data("fileNames"));f||u||t.performUpload(r)})},onIframeLoad:function(t){var i,r=n(t.target);try{i=r.contents().text()}catch(u){i="Error trying to get server response: "+u}this.processResponse(r,i)},processResponse:function(t,i){var f=t.data("file"),r=this,u={responseText:i};pt(i,function(i){n.extend(u,{statusText:"OK",status:"200"}),r.upload._onFileProgress({target:n(f,r.upload.wrapper)},100),r.upload._onUploadSuccess({target:n(f,r.upload.wrapper)},i,u),r.cleanupFrame(t),r.unregisterFrame(t)},function(){n.extend(u,{statusText:"error",status:"500"}),r.upload._onUploadError({target:n(f,r.upload.wrapper)},u)})},onCancel:function(t){var i=n(t.target).data("frame");this.stopFrameSubmit(i),this.cleanupFrame(i),this.unregisterFrame(i),this.upload._removeFileEntry(i.data("file"))},onRetry:function(n){var t=r(n);this.performUpload(t)},onRemove:function(n,t,i){var e=this,o=e.upload,u=r(n),f=u.data("frame");f?(e.unregisterFrame(f),o._removeFileEntry(u),e.cleanupFrame(f)):u.hasClass("k-file-success")?lt(u,o,t,i):o._removeFileEntry(u)},onAbort:function(){var i=this.element,t=this;n.each(this.iframes,function(){n("input",this.data("form")).appendTo(i),t.stopFrameSubmit(this[0]),this.data("form").remove(),this.remove()}),this.iframes=[]},createFrame:function(t){return n("<iframe name='"+t+"' id='"+t+"' style='display:none;' />")},createForm:function(t,i){return n("<form enctype='multipart/form-data' method='POST' action='"+t+"' target='"+i+"'/>")},stopFrameSubmit:function(n){t!==n.stop?n.stop():n.document&&n.document.execCommand("Stop")},registerFrame:function(n){this.iframes.push(n)},unregisterFrame:function(t){this.iframes=n.grep(this.iframes,function(n){return n.attr("name")!=t.attr("name")})},cleanupFrame:function(n){var t=n.data("form");n.data("file").data("frame",null),setTimeout(function(){t.remove(),n.remove()},1)}},v=function(n){this.name="formDataUploadModule",this.element=n.wrapper,this.upload=n,this.position={},this.metaData={},this.cancelled={},this.resume={},this.paused={},this.retries={}},v.prototype={onSelect:function(t,i){var f,o,r=this.upload,e=this,h=n(t.target),s=this.prepareUpload(h,i);n.each(s,function(t){f=r._filesContainValidationErrors(n(this.data("fileNames"))),r.options.async.autoUpload?f?(r._fileAction(this,u),r._showHeaderUploadStatus(!1)):r.options.async.chunkSize?(e.prepareChunk(this),o=this.prev(),(r.options.async.concurrent||0===t&&!o.length||0===t&&o.hasClass("k-file-success"))&&e.performUpload(this)):e.performUpload(this):(r._fileAction(this,u),f?r._updateHeaderUploadStatus():(r._showUploadButton(),this.addClass("k-toupload"))),f&&r._hideUploadProgress(this)})},prepareUpload:function(t,i){var r=this.enqueueFiles(i);return t.is("input")&&(n.each(r,function(){n(this).data("relatedInput",t)}),t.data("relatedFileEntries",r),this.upload._addInput(t)),r},enqueueFiles:function(t){var e,f,i,u,r=this.upload,s=t.length,o=[];if(r.options.async.batch===!0)e=n.map(t,function(n){return n.name}).join(", "),(r.directory||r.options.directoryDrop)&&n(t).each(function(){(this.rawFile.webkitRelativePath||this.rawFile.relativePath)&&(this.name=this.rawFile.webkitRelativePath||this.rawFile.relativePath)}),u=r._enqueueFile(e,{fileNames:t}),u.data("files",t),o.push(u);else for(f=0;f<s;f++)i=t[f],e=i.name,(r.directory||r.options.directoryDrop)&&(i.rawFile.webkitRelativePath||i.rawFile.relativePath)&&(i.name=i.rawFile.webkitRelativePath||i.rawFile.relativePath),u=r._enqueueFile(e,{fileNames:[i]}),u.data("files",[i]),o.push(u);return o},performUpload:function(t){var o,f,i=this.upload,u=this.createFormData(),e=this.createXHR(),r={files:t.data("fileNames"),XMLHttpRequest:e};if(i.trigger(y,r))this.removeFileEntry(t);else{if(0===t.find(".k-i-cancel").length&&(i.options.async.chunkSize&&i._fileAction(t,tt),i._fileAction(t,s,i.options.async.chunkSize)),i.wrapper.find(".k-toupload").length||i._hideUploadButton(),i._showHeaderUploadStatus(!0),r.formData)u=r.formData;else{r.data=n.extend({},r.data,k());for(f in r.data)u.append(f,r.data[f]);o=t.data("files"),o&&this.populateFormData(u,o)}i._fileState(t,"uploading"),n(t).removeClass("k-file-error").addClass("k-file-progress"),i.options.async.useArrayBuffer&&window.FileReader?this._readFile(i.options.async.saveUrl,u,t,e):this.postFormData(i.options.async.saveUrl,u,t,e)}},_readFile:function(i,r,u,f){var e=this,o=e.upload,s=u.data("files")[0],h=new FileReader;h.onload=function(h){try{e.fileArrayBuffer=e.fileArrayBuffer?e._appendBuffer(e.fileArrayBuffer,h.target.result):h.target.result}catch(c){return o._onUploadError({target:n(u,o.wrapper)},f),t}e.position[s.uid]>s.size?(e.postFormData(o.options.async.saveUrl,e.fileArrayBuffer,u,f),e.fileArrayBuffer=null):e._readFile(i,r,u,f)},h.onerror=function(){o._onUploadError({target:n(u,o.wrapper)},f)},h.readAsArrayBuffer(e._getCurrentChunk(s.rawFile,s.uid))},_appendBuffer:function(n,t){var i=new Uint8Array(n.byteLength+t.byteLength);return i.set(new Uint8Array(n),0),i.set(new Uint8Array(t),n.byteLength),i.buffer},onSaveSelected:function(){var t=this,i=t.upload;n(".k-toupload",this.element).filter(function(){var t=n(this),u=gt(t),r=i._filesContainValidationErrors(t.data("fileNames"));return!u&&!r}).each(function(r){var u=n(this),f=u.prev();u.removeClass("k-toupload"),i.options.async.chunkSize?(t.prepareChunk(u),(i.options.async.concurrent||0===r&&!f.length||0===r&&f.hasClass("k-file-success")||f.hasClass("k-file-error"))&&t.performUpload(u)):t.performUpload(u)})},onCancel:function(n){var t=r(n);this.upload.options.async.chunkSize&&(this.cancelled[t.data("uid")]=!0),this.stopUploadRequest(t),this.removeFileEntry(t)},onPause:function(n){var u=r(n),t=u.data("uid"),i=this.upload.options.async;i.chunkSize&&(this.retries[t]=i.maxAutoRetries+1,this.paused[t]=!0,this.resume[t]=!1)},onResume:function(n){var i=r(n),t=i.data("uid");this.upload.options.async.chunkSize&&(delete this.paused[t],this.resume[t]=!0,this.retries[i.data("uid")]=1,this._increaseChunkIndex(t),this.performUpload(i))},onRetry:function(n){var t=r(n),i=this.upload.options.async;i.chunkSize&&(this.retries[t.data("uid")]=i.maxAutoRetries+1,delete this.paused[t.data("uid")]),this.performUpload(t)},onRemove:function(n,t,i){var e=this,o=e.upload,u=r(n),f=this.upload.options.async;f.chunkSize&&(this.retries[u.data("uid")]=f.maxAutoRetries+1),u.hasClass("k-file-success")?lt(u,o,t,i):e.removeFileEntry(u)},createXHR:function(){return new XMLHttpRequest},postFormData:function(n,t,i,r){var f,u=this;i.data("request",r),r.addEventListener("load",function(n){u.onRequestSuccess.call(u,n,i)},!1),r.addEventListener(o,function(n){u.onRequestError.call(u,n,i)},!1),r.upload.addEventListener("progress",function(n){u.onRequestProgress.call(u,n,i)},!1),r.open("POST",n,!0),r.withCredentials=this.upload.options.async.withCredentials,f=this.upload.options.async.accept,f&&r.setRequestHeader("Accept",f),r.send(t)},createFormData:function(){return new FormData},populateFormData:function(n,t){var f,r,u,e,o=t.length,i=this.upload;if(i.options.async.chunkSize)u=t[0].uid,f=this._getCurrentChunk(t[0].rawFile,u),n.append(i.options.async.saveField||i.name,f),e=JSON.stringify(this.metaData[u]),n.append("metadata",e);else for(r=0;r<o;r++)n.append(i.options.async.saveField||i.name,t[r].rawFile);return n},onRequestSuccess:function(t,i){function f(){r.upload._onUploadError({target:n(i,r.upload.wrapper)},u)}function e(t){var o=r.upload.options.async.batch,e=r.upload.options.async.chunkSize,s=r.upload.options.async.concurrent,f=t.fileUid;r.paused[f]||r.cancelled[f]||(delete r.retries[f],!e||o||t.uploaded?!e||o||s||!i.next().length||i.next().hasClass("k-toupload")?(r.upload._onFileProgress({target:n(i,r.upload.wrapper)},100),r.upload._onUploadSuccess({target:n(i,r.upload.wrapper)},t,u),r.cleanupFileEntry(i)):(r.upload._onFileProgress({target:n(i,r.upload.wrapper)},100),r._resetChunkIndex(f),r.upload._onUploadSuccess({target:n(i,r.upload.wrapper)},t,u),r.performUpload(i.next())):(r._increaseChunkIndex(f),r.performUpload(i)))}var u=t.target,r=this;u.status>=200&&u.status<=299?pt(u.responseText,e,f):f()},onRequestError:function(t,i){var r=t.target;this.upload._onUploadError({target:n(i,this.upload.wrapper)},r)},cleanupFileEntry:function(t){var r=t.data("relatedInput"),i=!0;r&&(n.each(r.data("relatedFileEntries")||[],function(){this.parent().length>0&&this[0]!=t[0]&&(i=i&&this.hasClass("k-file-success"))}),i&&r.remove())},removeFileEntry:function(n){var i=this.upload.options.async.chunkSize,t=this.upload.options.async.concurrent;this.cleanupFileEntry(n),i&&!t&&n.next().length&&this.performUpload(n.next()),this.upload._removeFileEntry(n)},onRequestProgress:function(t,i){var r,u=Math.round(100*t.loaded/t.total),f=i.data("uid");this.upload.options.async.chunkSize&&(r=this.metaData[f],u=r.totalChunks?Math.round(r.chunkIndex/r.totalChunks*100):100),this.upload._onFileProgress({target:n(i,this.upload.wrapper)},u)},stopUploadRequest:function(n){n.data("request").abort()},prepareChunk:function(n){var t=n.data("files")[0].rawFile,i=n.data("files")[0].uid,r=this.upload.options.async.chunkSize;this.position[i]=0,this.metaData[i]={chunkIndex:0,contentType:t.type,fileName:t.name,totalFileSize:t.size,totalChunks:Math.ceil(t.size/r),uploadUid:i}},_decreaseChunkIndex:function(n){this.metaData[n].chunkIndex--},_increaseChunkIndex:function(n){this.metaData[n].chunkIndex++},_resetChunkIndex:function(n){this.metaData[n].chunkIndex=0},_decreasePosition:function(n){this.position[n]-=this.upload.options.async.chunkSize},_getCurrentChunk:function(n,t){var r,f=this.position[t],i=this.upload.options.async,u=i.chunkSize||i.bufferChunkSize;return this.position[t]||(this.position[t]=0),this.position[t]+=u,(r=this._getChunker(n))?n[r](f,this.position[t]):n},_getChunker:function(n){return n.slice?"slice":n.mozSlice?"mozSlice":n.webkitSlice?"webkitSlice":null}},i.ui.plugin(d)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.filebrowser.min",["kendo.listview.min","kendo.dropdownlist.min","kendo.upload.min"],n)}(function(){return function(n,t){function ct(n,t,i){var r,u;n.on("dragenter"+e,function(){t(),u=new Date,r||(r=setInterval(function(){var n=new Date-u;n>100&&(i(),clearInterval(r),r=null)},100))}).on("dragover"+e,function(){u=new Date})}function g(n,i){return n!==t&&n.match(/\/$/)||(n=(n||"")+"/"),n+i}function d(n){if(!n)return"";var t=" bytes";return n>=1073741824?(t=" GB",n/=1073741824):n>=1048576?(t=" MB",n/=1048576):n>=1024&&(t=" KB",n/=1024),Math.round(100*n)/100+t}function st(n,t){var i=n[t];return y(i)?i.from||i.field||t:i}var ht,k,nt,tt,i=window.kendo,o=i.ui.Widget,y=n.isPlainObject,r=n.proxy,b=n.extend,v=i.support.placeholder,rt=i.support.browser,it=i.isFunction,p=/(^\/|\/$)/g,s="change",ut="apply",l="error",a="click",e=".kendoFileBrowser",h=".kendoBreadcrumbs",c=".kendoSearchBox",f="name",w="size",u="type",ft={field:u,dir:"asc"},ot=i.template('<li class="k-tile-empty"><strong>${text}</strong></li>'),et='<div class="k-widget k-filebrowser-toolbar k-header k-floatwrap"><div class="k-toolbar-wrap"># if (showUpload) { # <div class="k-widget k-upload"><div class="k-button k-button-icontext k-upload-button"><span class="k-icon k-i-plus"></span>#=messages.uploadFile#<input type="file" name="file" /></div></div># } ## if (showCreate) { #<button type="button" class="k-button k-button-icon"><span class="k-icon k-i-folder-add" /></button># } ## if (showDelete) { #<button type="button" class="k-button k-button-icon k-state-disabled"><span class="k-icon k-i-close" /></button>&nbsp;# } #</div><div class="k-tiles-arrange"><label>#=messages.orderBy#: <select /></label></div></div>';b(!0,i.data,{schemas:{filebrowser:{data:function(n){return n.items||n||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),b(!0,i.data,{transports:{filebrowser:i.data.RemoteTransport.extend({init:function(t){i.data.RemoteTransport.fn.init.call(this,n.extend(!0,{},this.options,t))},_call:function(t,r){r.data=n.extend({},r.data,{path:this.options.path()}),it(this.options[t])?this.options[t].call(this,r):i.data.RemoteTransport.fn[t].call(this,r)},read:function(n){this._call("read",n)},create:function(n){this._call("create",n)},destroy:function(n){this._call("destroy",n)},update:function(){},options:{read:{type:"POST"},update:{type:"POST"},create:{type:"POST"},destroy:{type:"POST"}}})}}),ht=rt.msie&&rt.version<8?function(n){return n.offsetTop}:function(t){return t.offsetTop-n(t).height()},k=o.extend({init:function(n,t){var i=this;t=t||{},o.fn.init.call(i,n,t),i.element.addClass("k-filebrowser"),i.element.on(a+e,".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-close)",r(i._deleteClick,i)).on(a+e,".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-folder-add)",r(i._addClick,i)).on("keydown"+e,"li.k-state-selected input",r(i._directoryKeyDown,i)).on("blur"+e,"li.k-state-selected input",r(i._directoryBlur,i)),i._dataSource(),i.refresh(),i.path(i.options.path)},options:{name:"FileBrowser",messages:{uploadFile:"Upload",orderBy:"Arrange by",orderByName:"Name",orderBySize:"Size",directoryNotFound:"A directory with this name was not found.",emptyFolder:"Empty Folder",deleteFile:'Are you sure you want to delete "{0}"?',invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',dropFilesHere:"drop file here to upload",search:"Search"},transport:{},path:"/",fileTypes:"*.*"},events:[l,s,ut],destroy:function(){var n=this;o.fn.destroy.call(n),n.dataSource.unbind(l,n._errorHandler),n.element.add(n.list).add(n.toolbar).off(e),i.destroy(n.element)},value:function(){var n,r=this,e=r._selectedItem(),t=r.options.transport.fileUrl;if(e&&"f"===e.get(u))return n=g(r.path(),e.get(f)).replace(p,""),t&&(n=it(t)?t(n):i.format(t,encodeURIComponent(n))),n},_selectedItem:function(){var t=this.listView,n=t.select();if(n.length)return this.dataSource.getByUid(n.attr(i.attr("uid")))},_toolbar:function(){var t=this,e=i.template(et),u=t.options.messages,f=[{text:u.orderByName,value:"name"},{text:u.orderBySize,value:"size"}];t.toolbar=n(e({messages:u,showUpload:t.options.transport.uploadUrl,showCreate:t.options.transport.create,showDelete:t.options.transport.destroy})).appendTo(t.element).find(".k-upload input").kendoUpload({multiple:!1,localization:{dropFilesHere:u.dropFilesHere},async:{saveUrl:t.options.transport.uploadUrl,autoUpload:!0},upload:r(t._fileUpload,t),error:function(n){t._error({xhr:n.XMLHttpRequest,status:"error"})}}).end(),t.upload=t.toolbar.find(".k-upload input").data("kendoUpload"),t.arrangeBy=t.toolbar.find(".k-tiles-arrange select").kendoDropDownList({dataSource:f,dataTextField:"text",dataValueField:"value",change:function(){t.orderBy(this.value())}}).data("kendoDropDownList"),t._attachDropzoneEvents()},_attachDropzoneEvents:function(){var t=this;t.options.transport.uploadUrl&&(ct(n(document.documentElement),n.proxy(t._dropEnter,t),n.proxy(t._dropLeave,t)),t._scrollHandler=r(t._positionDropzone,t))},_dropEnter:function(){this._positionDropzone(),n(document).on("scroll"+e,this._scrollHandler)},_dropLeave:function(){this._removeDropzone(),n(document).off("scroll"+e,this._scrollHandler)},_positionDropzone:function(){var t=this,n=t.element,i=n.offset();t.toolbar.find(".k-dropzone").addClass("k-filebrowser-dropzone").offset(i).css({width:n[0].clientWidth,height:n[0].clientHeight,lineHeight:n[0].clientHeight+"px"})},_removeDropzone:function(){this.toolbar.find(".k-dropzone").removeClass("k-filebrowser-dropzone").css({width:"",height:"",lineHeight:"",top:"",left:""})},_deleteClick:function(){var n=this,t=n.listView.select(),r=i.format(n.options.messages.deleteFile,t.find("strong").text());t.length&&n._showMessage(r,"confirm")&&n.listView.remove(t)},_addClick:function(){this.createDirectory()},_getFieldName:function(n){return st(this.dataSource.reader.model.fields,n)},_fileUpload:function(n){var u,t=this,s=t.options,h=s.fileTypes,c=RegExp(("("+h.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),r=n.files[0].name,o=f,e=w;c.test(r)?(n.data={path:t.path()},u=t._createFile(r),u?t.upload.one("success",function(n){var r=t._insertFileToList(u);r.set(o,n.response[t._getFieldName(o)]),r.set(e,n.response[t._getFieldName(e)]),t._tiles=t.listView.items().filter("["+i.attr("type")+"=f]")}):n.preventDefault()):(n.preventDefault(),t._showMessage(i.format(s.messages.invalidFileType,r,h)))},_findFile:function(n){var t,e,r,i=this.dataSource.data(),s=u,o=f;for(n=n.toLowerCase(),t=0,r=i.length;t<r;t++)if("f"===i[t].get(s)&&i[t].get(o).toLowerCase()===n){e=i[t];break}return e},_createFile:function(n){var e=this,t={},o=u,r=e._findFile(n);return r?e._showMessage(i.format(e.options.messages.overwriteFile,n),"confirm")?(r._override=!0,r):null:(t[o]="f",t[f]=n,t[w]=0,t)},_insertFileToList:function(n){var e,r,i,t,f;if(n._override)return n;for(r=this.dataSource,i=r.view(),t=0,f=i.length;t<f;t++)if("f"===i[t].get(u)){e=t;break}return r.insert(++e,n)},createDirectory:function(){for(var n=this,c=0,s=u,e=f,h=n.dataSource.data(),o=n._nameDirectory(),t=new n.dataSource.reader.model,r=0,l=h.length;r<l;r++)"d"===h[r].get(s)&&(c=r);t.set(s,"d"),t.set(e,o),n.listView.one("dataBound",function(){var r=n.listView.items().filter("["+i.attr("uid")+"="+t.uid+"]"),u=r.find("input");r.length&&this.edit(r),this.element.scrollTop(r.attr("offsetTop")-this.element[0].offsetHeight),setTimeout(function(){u.select()})}).one("save",function(i){var r=i.model.get(e);r?i.model.set(e,n._nameExists(r,t.uid)?n._nameDirectory():r):i.model.set(e,o)}),n.dataSource.insert(++c,t)},_directoryKeyDown:function(n){13==n.keyCode&&n.currentTarget.blur()},_directoryBlur:function(){this.listView.save()},_nameExists:function(n,t){for(var r=this.dataSource.data(),s=u,o=f,i=0,e=r.length;i<e;i++)if("d"===r[i].get(s)&&r[i].get(o).toLowerCase()===n.toLowerCase()&&r[i].uid!==t)return!0;return!1},_nameDirectory:function(){for(var o,i="New folder",r=this.dataSource.data(),e=[],c=u,s=f,t=0,h=r.length;t<h;t++)"d"===r[t].get(c)&&r[t].get(s).toLowerCase().indexOf(i.toLowerCase())>-1&&e.push(r[t].get(s));if(n.inArray(i,e)>-1){t=2;do o=i+" ("+t+")",t++;while(n.inArray(o,e)>-1);i=o}return i},orderBy:function(n){this.dataSource.sort([{field:u,dir:"asc"},{field:n,dir:"asc"}])},search:function(n){this.dataSource.filter({field:f,operator:"contains",value:n})},_content:function(){var t=this;t.list=n('<ul class="k-reset k-floats k-tiles" />').appendTo(t.element).on("dblclick"+e,"li",r(t._dblClick,t)),t.listView=new i.ui.ListView(t.list,{dataSource:t.dataSource,template:t._itemTmpl(),editTemplate:t._editTmpl(),selectable:!0,autoBind:!1,dataBinding:function(n){t.toolbar.find(".k-i-close").parent().addClass("k-state-disabled"),"remove"!==n.action&&"sync"!==n.action||n.preventDefault()},dataBound:function(){t.dataSource.view().length?t._tiles=this.items().filter("["+i.attr("type")+"=f]"):this.wrapper.append(ot({text:t.options.messages.emptyFolder}))},change:r(t._listViewChange,t)})},_dblClick:function(t){var e,r=this,u=n(t.currentTarget);u.hasClass("k-edit-item")&&r._directoryBlur(),u.filter("["+i.attr("type")+"=d]").length?(e=r.dataSource.getByUid(u.attr(i.attr("uid"))),e&&(r.path(g(r.path(),e.get(f))),r.breadcrumbs.value(r.path()))):u.filter("["+i.attr("type")+"=f]").length&&r.trigger(ut)},_listViewChange:function(){var n=this._selectedItem();n&&(this.toolbar.find(".k-i-close").parent().removeClass("k-state-disabled"),this.trigger(s,{selected:n}))},_dataSource:function(){var o,n=this,e=n.options,t=e.transport,h=b({},ft),s={field:f,dir:"asc"},u={type:t.type||"filebrowser",sort:[h,s]};y(t)&&(t.path=r(n.path,n),u.transport=t),y(e.schema)?u.schema=e.schema:t.type&&y(i.data.schemas[t.type])&&(o=i.data.schemas[t.type]),n.dataSource&&n._errorHandler?n.dataSource.unbind(l,n._errorHandler):n._errorHandler=r(n._error,n),n.dataSource=i.data.DataSource.create(u).bind(l,n._errorHandler)},_navigation:function(){var t=this,i=n('<div class="k-floatwrap"><input/><input/></div>').appendTo(this.element);t.breadcrumbs=i.find("input:first").kendoBreadcrumbs({value:t.options.path,change:function(){t.path(this.value())}}).data("kendoBreadcrumbs"),t.searchBox=i.parent().find("input:last").kendoSearchBox({label:t.options.messages.search,change:function(){t.search(this.value())}}).data("kendoSearchBox")},_error:function(n){var i,r,t=this;t.trigger(l,n)||(i=n.xhr.status,"error"==n.status?"404"==i?t._showMessage(t.options.messages.directoryNotFound):"0"!=i&&t._showMessage("Error! The requested URL returned "+i+" - "+n.xhr.statusText):"timeout"==i&&t._showMessage("Error! Server timeout."),r=t.dataSource,r.hasChanges()&&r.cancelChanges())},_showMessage:function(n,t){return window[t||"alert"](n)},refresh:function(){var n=this;n._navigation(),n._toolbar(),n._content()},_editTmpl:function(){var n='<li class="k-tile k-state-selected" '+i.attr("uid")+'="#=uid#" ';return n+=i.attr("type")+'="${'+u+'}">',n+="#if("+u+' == "d") { #',n+='<div class="k-thumb"><span class="k-icon k-i-folder"></span></div>',n+="#}else{#",n+='<div class="k-thumb"><span class="k-icon k-i-loading"></span></div>',n+="#}#",n+="#if("+u+' == "d") { #',n+='<input class="k-input" '+i.attr("bind")+'="value:'+f+'"/>',n+="#}#",n+="</li>",r(i.template(n),{sizeFormatter:d})},_itemTmpl:function(){var n='<li class="k-tile" '+i.attr("uid")+'="#=uid#" ';return n+=i.attr("type")+'="${'+u+'}">',n+="#if("+u+' == "d") { #',n+='<div class="k-thumb"><span class="k-icon k-i-folder"></span></div>',n+="#}else{#",n+='<div class="k-thumb"><span class="k-icon k-i-file"></span></div>',n+="#}#",n+="<strong>${"+f+"}</strong>",n+="#if("+u+' == "f") { # <span class="k-filesize">${this.sizeFormatter('+w+")}</span> #}#",n+="</li>",r(i.template(n),{sizeFormatter:d})},path:function(n){var r=this,i=r._path||"";return n!==t?(r._path=n.replace(p,"")+"/",r.dataSource.read({path:r._path}),t):(i&&(i=i.replace(p,"")),"/"===i||""===i?"":i+"/")}}),nt=o.extend({init:function(n,t){var i=this;t=t||{},o.fn.init.call(i,n,t),v&&i.element.attr("placeholder",i.options.label),i._wrapper(),i.element.on("keydown"+c,r(i._keydown,i)).on("change"+c,r(i._updateValue,i)),i.wrapper.on(a+c,"a",r(i._click,i)),v||i.element.on("focus"+c,r(i._focus,i)).on("blur"+c,r(i._blur,i))},options:{name:"SearchBox",label:"Search",value:""},events:[s],destroy:function(){var n=this;n.wrapper.add(n.element).add(n.label).off(c),o.fn.destroy.call(n)},_keydown:function(n){13===n.keyCode&&this._updateValue()},_click:function(n){n.preventDefault(),this._updateValue()},_updateValue:function(){var n=this,t=n.element.val();t!==n.value()&&(n.value(t),n.trigger(s))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){v||this.label.toggle(!this.element.val())},_focus:function(){this.label.hide()},_wrapper:function(){var i=this.element,t=i.parents(".k-search-wrap");i[0].style.width="",i.addClass("k-input"),t.length||(t=i.wrap(n('<div class="k-widget k-search-wrap k-textbox"/>')).parent(),v||n('<label style="display:block">'+this.options.label+"</label>").insertBefore(i),n('<a href="#" class="k-icon k-i-zoom k-search"/>').appendTo(t)),this.wrapper=t,this.label=t.find(">label")},value:function(n){var i=this;return n!==t?(i.options.value=n,i.element.val(n),i._toggleLabel(),t):i.options.value}}),tt=o.extend({init:function(n,t){var i=this;t=t||{},o.fn.init.call(i,n,t),i._wrapper(),i.wrapper.on("focus"+h,"input",r(i._focus,i)).on("blur"+h,"input",r(i._blur,i)).on("keydown"+h,"input",r(i._keydown,i)).on(a+h,"a.k-i-arrow-60-up:first",r(i._rootClick,i)).on(a+h,"a:not(.k-i-arrow-60-up)",r(i._click,i)),i.value(i.options.value)},options:{name:"Breadcrumbs",gap:50},events:[s],destroy:function(){var n=this;o.fn.destroy.call(n),n.wrapper.add(n.wrapper.find("input")).add(n.wrapper.find("a")).off(h)},_update:function(n){n="/"===(n||"").charAt(0)?n:"/"+(n||""),n!==this.value()&&(this.value(n),this.trigger(s))},_click:function(t){t.preventDefault(),this._update(this._path(n(t.target).prevAll("a:not(.k-i-arrow-60-up)").addBack()))},_rootClick:function(n){n.preventDefault(),this._update("")},_focus:function(){var n=this,t=n.element;n.overlay.hide(),n.element.val(n.value()),setTimeout(function(){t.select()})},_blur:function(){if(!this.overlay.is(":visible")){var n=this,t=n.element,i=t.val().replace(/\/{2,}/g,"/");n.overlay.show(),t.val(""),n._update(i)}},_keydown:function(n){var t=this;13===n.keyCode&&(t._blur(),setTimeout(function(){t.overlay.find("a:first").focus()}))},_wrapper:function(){var i,r=this.element,t=r.parents(".k-breadcrumbs");r[0].style.width="",r.addClass("k-input"),t.length||(t=r.wrap(n('<div class="k-widget k-breadcrumbs k-textbox"/>')).parent()),i=t.find(".k-breadcrumbs-wrap"),i.length||(i=n('<div class="k-breadcrumbs-wrap"/>').appendTo(t)),this.wrapper=t,this.overlay=i},refresh:function(){var f,e,u,o,r="",i=this.value();for(i!==t&&i.match(/^\//)||(i="/"+(i||"")),f=i.split("/"),u=0,o=f.length;u<o;u++)e=f[u],e&&(r||(r+='<a href="#" class="k-icon k-i-arrow-60-up" title="Go to parent folder"></a>'),r+='<a class="k-link" href="#">'+f[u]+"</a>",r+='<span class="k-icon k-i-arrow-60-right" title="Go to child folder"></span>');this.overlay.empty().append(n(r)),this._adjustSectionWidth()},_adjustSectionWidth:function(){var t,i=this,f=i.wrapper,r=f.width()-i.options.gap,u=i.overlay.find("a");u.each(function(i){t=n(this),t.parent().width()>r&&(i==u.length-1?t.width(r):t.prev().addBack().hide())})},value:function(n){return n!==t?(this._value=n.replace(/\/{2,}/g,"/"),this.refresh(),t):this._value},_path:function(t){return"/"+n.map(t,function(t){return n(t).text()}).join("/")}}),i.ui.plugin(k),i.ui.plugin(tt),i.ui.plugin(nt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.imagebrowser.min",["kendo.filebrowser.min"],n)}(function(){return function(n,t){function k(n,i){return n!==t&&n.match(/\/$/)||(n=(n||"")+"/"),n+i}function g(n){if(!n)return"";var t=" bytes";return n>=1073741824?(t=" GB",n/=1073741824):n>=1048576?(t=" MB",n/=1048576):n>=1024&&(t=" KB",n/=1024),Math.round(100*n)/100+t}var l,y,i=window.kendo,v=i.ui.FileBrowser,h=n.isPlainObject,r=n.proxy,o=n.extend,p=i.support.browser,s=i.isFunction,d=/(^\/|\/$)/g,c="error",e=".kendoImageBrowser",f="name",a="size",u="type",b={field:u,dir:"asc"},w=i.template('<li class="k-tile-empty"><strong>${text}</strong></li>');o(!0,i.data,{schemas:{imagebrowser:{data:function(n){return n.items||n||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),o(!0,i.data,{transports:{imagebrowser:i.data.RemoteTransport.extend({init:function(t){i.data.RemoteTransport.fn.init.call(this,n.extend(!0,{},this.options,t))},_call:function(t,r){r.data=n.extend({},r.data,{path:this.options.path()}),s(this.options[t])?this.options[t].call(this,r):i.data.RemoteTransport.fn[t].call(this,r)},read:function(n){this._call("read",n)},create:function(n){this._call("create",n)},destroy:function(n){this._call("destroy",n)},update:function(){},options:{read:{type:"POST"},update:{type:"POST"},create:{type:"POST"},destroy:{type:"POST"}}})}}),l=p.msie&&p.version<8?function(n){return n.offsetTop}:function(t){return t.offsetTop-n(t).height()},y=v.extend({init:function(n,t){var i=this;t=t||{},v.fn.init.call(i,n,t),i.element.addClass("k-imagebrowser")},options:{name:"ImageBrowser",fileTypes:"*.png,*.gif,*.jpg,*.jpeg"},value:function(){var n,r=this,e=r._selectedItem(),t=r.options.transport.imageUrl;if(e&&"f"===e.get(u))return n=k(r.path(),e.get(f)).replace(d,""),t&&(n=s(t)?t(n):i.format(t,encodeURIComponent(n))),n},_fileUpload:function(n){var r,t=this,s=t.options,h=s.fileTypes,c=RegExp(("("+h.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),u=n.files[0].name,o=f,e=a;c.test(u)?(n.data={path:t.path()},r=t._createFile(u),r?(r._uploading=!0,t.upload.one("success",function(n){delete r._uploading;var u=t._insertFileToList(r);u.set(o,n.response[t._getFieldName(o)]),u.set(e,n.response[t._getFieldName(e)]),t._tiles=t.listView.items().filter("["+i.attr("type")+"=f]"),t._scroll()})):n.preventDefault()):(n.preventDefault(),t._showMessage(i.format(s.messages.invalidFileType,u,h)))},_content:function(){var t=this;t.list=n('<ul class="k-reset k-floats k-tiles" />').appendTo(t.element).on("scroll"+e,r(t._scroll,t)).on("dblclick"+e,"li",r(t._dblClick,t)),t.listView=new i.ui.ListView(t.list,{dataSource:t.dataSource,template:t._itemTmpl(),editTemplate:t._editTmpl(),selectable:!0,autoBind:!1,dataBinding:function(n){t.toolbar.find(".k-i-close").parent().addClass("k-state-disabled"),"remove"!==n.action&&"sync"!==n.action||n.preventDefault()},dataBound:function(){t.dataSource.view().length?(t._tiles=this.items().filter("["+i.attr("type")+"=f]"),t._scroll()):this.wrapper.append(w({text:t.options.messages.emptyFolder}))},change:r(t._listViewChange,t)})},_dataSource:function(){var s,n=this,e=n.options,t=e.transport,a=o({},b),l={field:f,dir:"asc"},u={type:t.type||"imagebrowser",sort:[a,l]};h(t)&&(t.path=r(n.path,n),u.transport=t),h(e.schema)?u.schema=e.schema:t.type&&h(i.data.schemas[t.type])&&(s=i.data.schemas[t.type]),n.dataSource&&n._errorHandler?n.dataSource.unbind(c,n._errorHandler):n._errorHandler=r(n._error,n),n.dataSource=i.data.DataSource.create(u).bind(c,n._errorHandler)},_loadImage:function(t){var o=this,a=n(t),u=o.dataSource.getByUid(a.attr(i.attr("uid"))),c=u.get(f),r=o.options.transport.thumbnailUrl,h=n("<img />",{alt:c}),l="?";u._uploading||(h.hide().on("load"+e,function(){n(this).prev().remove().end().addClass("k-image").fadeIn()}),a.find(".k-i-loading").after(h),s(r)?r=r(o.path(),encodeURIComponent(c)):(r.indexOf("?")>=0&&(l="&"),r=r+l+"path="+encodeURIComponent(o.path()+c),u._override&&(r+="&_="+ +new Date,delete u._override)),h.attr("src",r),t.loaded=!0)},_scroll:function(){var n=this;n.options.transport&&n.options.transport.thumbnailUrl&&(clearTimeout(n._timeout),n._timeout=setTimeout(function(){var u=i._outerHeight(n.list),r=n.list.scrollTop(),t=r+u;n._tiles.each(function(){var i=l(this),u=i+this.offsetHeight;if((i>=r&&i<t||u>=r&&u<t)&&n._loadImage(this),i>t)return!1}),n._tiles=n._tiles.filter(function(){return!this.loaded})},250))},_itemTmpl:function(){var t=this,n='<li class="k-tile" '+i.attr("uid")+'="#=uid#" ';return n+=i.attr("type")+'="${'+u+'}">',n+="#if("+u+' == "d") { #',n+='<div class="k-thumb"><span class="k-icon k-i-folder"></span></div>',n+="#}else{#",n+=t.options.transport&&t.options.transport.thumbnailUrl?'<div class="k-thumb"><span class="k-icon k-i-loading"></span></div>':'<div class="k-thumb"><span class="k-icon k-i-file"></span></div>',n+="#}#",n+="<strong>${"+f+"}</strong>",n+="#if("+u+' == "f") { # <span class="k-filesize">${this.sizeFormatter('+a+")}</span> #}#",n+="</li>",r(i.template(n),{sizeFormatter:g})}}),i.ui.plugin(y)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.tabstrip.min",["kendo.data.min"],n)}(function(){return function(n,t){function ot(t){t.children(yt).addClass(bt),t.children("a").addClass(e).children(yt).addClass(bt),t.filter(":not([disabled]):not([class*=k-state-disabled])").addClass(l),t.filter("li[disabled]").addClass(a).removeAttr("disabled"),t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass(r+" "+o),t.attr("role","tab"),t.filter("."+r).attr("aria-selected",!0),t.each(function(){var t=n(this);t.children("."+e).length||t.contents().filter(function(){return!(this.nodeName.match(ui)||3==this.nodeType&&!vt(this.nodeValue))}).wrapAll("<span UNSELECTABLE='on' class='"+e+"'/>")})}function y(n){var t=n.children(".k-item");t.filter(".k-first:not(:first-child)").removeClass(kt),t.filter(".k-last:not(:last-child)").removeClass(at),t.filter(":first-child").addClass(kt),t.filter(":last-child").addClass(at)}function lt(n,t){return"<span class='k-button k-button-icon k-bare k-tabstrip-"+n+"' unselectable='on'><span class='k-icon "+t+"'></span></span>"}var i=window.kendo,fi=i.ui,s=i.keys,wt=n.map,rt=n.each,vt=n.trim,u=n.extend,ni=i.isFunction,c=i.template,b=i._outerWidth,tt=i._outerHeight,p=fi.Widget,ui=/^(a|div)$/i,f=".kendoTabStrip",yt="img",pt="href",k="prev",ct="show",e="k-link",at="k-last",dt="click",ii="error",ti=":empty",bt="k-image",kt="k-first",g="select",et="activate",d="k-content",v="contentUrl",ht="mouseenter",ri="mouseleave",st="contentLoad",a="k-state-disabled",l="k-state-default",r="k-state-active",ut="k-state-focused",it="k-state-hover",o="k-tab-on-top",nt=".k-item:not(."+a+")",gt=".k-tabstrip-items > "+nt+":not(."+r+")",h={content:c("<div class='k-content'#= contentAttributes(data) # role='tabpanel'>#= content(item) #</div>"),itemWrapper:c("<#= tag(item) # class='k-link'#= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) #</#= tag(item) #>"),item:c("<li class='#= wrapperCssClass(group, item) #' role='tab' #=item.active ? \"aria-selected='true'\" : ''#>#= itemWrapper(data) #</li>"),image:c("<img class='k-image' alt='' src='#= imageUrl #' />"),sprite:c("<span class='k-sprite #= spriteCssClass #'></span>"),empty:c("")},ft={wrapperCssClass:function(n,t){var i="k-item",r=t.index;return i+=t.enabled===!1?" k-state-disabled":" k-state-default",0===r&&(i+=" k-first"),r==n.length-1&&(i+=" k-last"),i},textAttributes:function(n){return n.url?" href='"+n.url+"'":""},text:function(n){return n.encoded===!1?n.text:i.htmlEncode(n.text)},tag:function(n){return n.url?"a":"span"},contentAttributes:function(n){return n.active!==!0?" style='display:none' aria-hidden='true' aria-expanded='false'":""},content:function(n){return n.content?n.content:n.contentUrl?"":"&nbsp;"},contentUrl:function(n){return n.contentUrl?i.attr("content-url")+'="'+n.contentUrl+'"':""}},w=p.extend({init:function(t,u){var c,s,h,o=this;p.fn.init.call(o,t,u),o._animations(o.options),u=o.options,o._contentUrls=u.contentUrls||[],o._wrapper(),o._isRtl=i.support.isRtl(o.wrapper),o._tabindex(),o._updateClasses(),o._dataSource(),u.dataSource&&o.dataSource.fetch(),o._tabPosition(),o._scrollable(),o._contentUrls.length?o.wrapper.find(".k-tabstrip-items > .k-item").each(function(t,i){var r=o._contentUrls[t];"string"==typeof r&&n(i).find(">."+e).data(v,r)}):o._contentUrls.length=o.tabGroup.find("li.k-item").length,o.wrapper.on(ht+f+" "+ri+f,gt,o._toggleHover).on("focus"+f,n.proxy(o._active,o)).on("blur"+f,function(){o._current(null)}),o._keyDownProxy=n.proxy(o._keydown,o),u.navigatable&&o.wrapper.on("keydown"+f,o._keyDownProxy),o.options.value&&(c=o.options.value),o.wrapper.children(".k-tabstrip-items").on(dt+f,".k-state-disabled .k-link",!1).on(dt+f," > "+nt,function(t){var u,r=o.wrapper[0];if(r!==document.activeElement)if(u=i.support.browser.msie)try{r.setActive()}catch(f){r.focus()}else r.focus();o._click(n(t.currentTarget))&&t.preventDefault()}),s=o.tabGroup.children("li."+r),h=o.contentHolder(s.index()),s[0]&&h.length>0&&0===h[0].childNodes.length&&o.activateTab(s.eq(0)),o.element.attr("role","tablist"),o.element[0].id&&(o._ariaId=o.element[0].id+"_ts_active"),o.value(c),i.notify(o)},_active:function(){var n=this.tabGroup.children().filter("."+r);n=n[0]?n:this._endItem("first"),n[0]&&this._current(n)},_endItem:function(n){return this.tabGroup.children(nt)[n]()},_item:function(n,t){var i;return i=t===k?"last":"first",n?(n=n[t](),n[0]||(n=this._endItem(i)),n.hasClass(a)&&(n=this._item(n,t)),n):this._endItem(i)},_current:function(n){var u=this,f=u._focused,i=u._ariaId;return n===t?f:(f&&(f[0].id===i&&f.removeAttr("id"),f.removeClass(ut)),n&&(n.hasClass(r)||n.addClass(ut),u.element.removeAttr("aria-activedescendant"),i=n[0].id||i,i&&(n.attr("id",i),u.element.attr("aria-activedescendant",i))),u._focused=n,t)},_keydown:function(n){var u,i=this,r=n.keyCode,e=i._current(),f=i._isRtl;if(n.target==n.currentTarget){if(r==s.DOWN||r==s.RIGHT)u=f?k:"next";else if(r==s.UP||r==s.LEFT)u=f?"next":k;else if(r==s.ENTER||r==s.SPACEBAR)i._click(e),n.preventDefault();else{if(r==s.HOME)return i._click(i._endItem("first")),n.preventDefault(),t;if(r==s.END)return i._click(i._endItem("last")),n.preventDefault(),t}u&&(i._click(i._item(e,u)),n.preventDefault())}},_dataSource:function(){var t=this;t.dataSource&&t._refreshHandler?t.dataSource.unbind("change",t._refreshHandler):t._refreshHandler=n.proxy(t.refresh,t),t.dataSource=i.data.DataSource.create(t.options.dataSource).bind("change",t._refreshHandler)},setDataSource:function(n){var t=this;t.options.dataSource=n,t._dataSource(),t.dataSource.fetch()},_animations:function(n){n&&"animation"in n&&!n.animation&&(n.animation={open:{effects:{}},close:{effects:{}}})},refresh:function(n){var t,e,h,s,r=this,u=r.options,l=i.getter(u.dataTextField),v=i.getter(u.dataContentField),y=i.getter(u.dataContentUrlField),p=i.getter(u.dataImageUrlField),a=i.getter(u.dataUrlField),c=i.getter(u.dataSpriteCssClass),o=[],f=r.dataSource.view();for(n=n||{},h=n.action,h&&(f=n.items),t=0,s=f.length;t<s;t++)e={text:l(f[t])},u.dataContentField&&(e.content=v(f[t])),u.dataContentUrlField&&(e.contentUrl=y(f[t])),u.dataUrlField&&(e.url=a(f[t])),u.dataImageUrlField&&(e.imageUrl=p(f[t])),u.dataSpriteCssClass&&(e.spriteCssClass=c(f[t])),o[t]=e;if("add"==n.action)n.index<r.tabGroup.children().length?r.insertBefore(o,r.tabGroup.children().eq(n.index)):r.append(o);else if("remove"==n.action)for(t=0;t<f.length;t++)r.remove(n.index);else"itemchange"==n.action?(t=r.dataSource.view().indexOf(f[0]),n.field===u.dataTextField&&r.tabGroup.children().eq(t).find(".k-link").text(f[0].get(n.field)),n.field===u.dataUrlField&&(r._contentUrls[t]=f[0].get(n.field))):(r.trigger("dataBinding"),r.remove("li"),r._contentUrls=[],r.append(o),r.trigger("dataBound"))},value:function(i){var r=this;return i===t?r.select().text():(i!=r.value()&&r.tabGroup.children().each(function(){n.trim(n(this).text())==i&&r.select(this)}),t)},items:function(){return this.tabGroup[0].children},setOptions:function(n){var t=this,i=t.options.animation;t._animations(n),n.contentUrls&&(t._contentUrls=n.contentUrls),n.animation=u(!0,i,n.animation),n.navigatable?t.wrapper.on("keydown"+f,t._keyDownProxy):t.wrapper.off("keydown"+f,t._keyDownProxy),p.fn.setOptions.call(t,n)},events:[g,et,ct,ii,st,"change","dataBinding","dataBound"],options:{name:"TabStrip",dataTextField:"",dataContentField:"",dataImageUrlField:"",dataUrlField:"",dataSpriteCssClass:"",dataContentUrlField:"",tabPosition:"top",animation:{open:{effects:"expand:vertical fadeIn",duration:200},close:{duration:200}},collapsible:!1,navigatable:!0,contentUrls:!1,scrollable:{distance:200}},destroy:function(){var n=this,t=n.scrollWrap;p.fn.destroy.call(n),n._refreshHandler&&n.dataSource.unbind("change",n._refreshHandler),n.wrapper.off(f),n.wrapper.children(".k-tabstrip-items").off(f),n._scrollableModeActive&&(n._scrollPrevButton.off().remove(),n._scrollNextButton.off().remove()),i.destroy(n.wrapper),t.children(".k-tabstrip").unwrap()},select:function(t){var i=this;return 0===arguments.length?i.tabGroup.children("li."+r):(isNaN(t)||(t=i.tabGroup.children().get(t)),t=i.tabGroup.find(t),n(t).each(function(t,u){u=n(u),u.hasClass(r)||i.trigger(g,{item:u[0],contentElement:i.contentHolder(u.index())[0]})||i.activateTab(u)}),i)},enable:function(n,t){return this._toggleDisabled(n,t!==!1),this},disable:function(n){return this._toggleDisabled(n,!1),this},reload:function(t){var i,r;return t=this.tabGroup.find(t),i=this,r=i._contentUrls,t.each(function(){var t=n(this),u=t.find("."+e).data(v)||r[t.index()],f=i.contentHolder(t.index());u&&i.ajaxRequest(t,f,null,u)}),i},append:function(n){var t=this,i=t._create(n);return rt(i.tabs,function(n){var r=i.contents[n];t.tabGroup.append(this),"bottom"==t.options.tabPosition?t.tabGroup.before(r):t._scrollableModeActive?t._scrollPrevButton.before(r):t.wrapper.append(r),t.angular("compile",function(){return{elements:[r]}})}),y(t.tabGroup),t._updateContentElements(),t.resize(!0),t},_appendUrlItem:function(n){this._contentUrls.push(n)},_moveUrlItem:function(n,t){this._contentUrls.splice(t,0,this._contentUrls.splice(n,1)[0])},_removeUrlItem:function(n){this._contentUrls.splice(n,1)},insertBefore:function(t,i){i=n(t).is(n(i))?this.tabGroup.find(i).next():this.tabGroup.find(i);var r=this,u=r._create(t),f=r.element.find("#"+i.attr("aria-controls"));return rt(u.tabs,function(t){var e=u.contents[t],o=u.newTabsCreated?r._contentUrls.length-(u.tabs.length-t):n(e).index()-1;i.before(this),f.before(e),r._moveUrlItem(o,n(this).index()),r.angular("compile",function(){return{elements:[e]}})}),y(r.tabGroup),r._updateContentElements(u.newTabsCreated),r.resize(!0),r},insertAfter:function(t,i){i=n(t).is(n(i))?this.tabGroup.find(i).prev():this.tabGroup.find(i);var r=this,u=r._create(t),f=r.element.find("#"+i.attr("aria-controls"));return rt(u.tabs,function(t){var e=u.contents[t],o=u.newTabsCreated?r._contentUrls.length-(u.tabs.length-t):n(e).index()-1;i.after(this),f.after(e),r._moveUrlItem(o,n(this).index()),r.angular("compile",function(){return{elements:[e]}})}),y(r.tabGroup),r._updateContentElements(u.newTabsCreated),r.resize(!0),r},remove:function(t){var u,r=this,f=typeof t;return"string"===f?t=r.tabGroup.find(t):"number"===f&&(t=r.tabGroup.children().eq(t)),u=t.map(function(){var u=n(this).index(),t=r.contentElement(u);return i.destroy(t),r._removeUrlItem(u),t}),t.remove(),u.empty(),u.remove(),r._updateContentElements(),r.resize(!0),r},_create:function(t){var f,r,o,e=this,s=!1;return t=t instanceof i.data.ObservableArray?t.toJSON():t,n.isPlainObject(t)||n.isArray(t)?(t=n.isArray(t)?t:[t],s=!0,f=wt(t,function(i,r){return e._appendUrlItem(t[r].contentUrl||null),n(w.renderItem({group:e.tabGroup,item:u(i,{index:r})}))}),r=wt(t,function(t,i){if("string"==typeof t.content||t.contentUrl)return n(w.renderContent({item:u(t,{index:i})}))})):(f="string"==typeof t&&"<"!=t[0]?e.element.find(t):n(t),r=n(),f.each(function(){if(/k-tabstrip-items/.test(this.parentNode.className)){var t=e.element.find("#"+this.getAttribute("aria-controls"));o=t}else o=n("<div class='"+d+"'/>");r=r.add(o)}),ot(f)),{tabs:f,contents:r,newTabsCreated:s}},_toggleDisabled:function(t,i){t=this.tabGroup.find(t),t.each(function(){n(this).toggleClass(l,i).toggleClass(a,!i)})},_updateClasses:function(){var u,f,e,i=this;i.wrapper.addClass("k-widget k-header k-tabstrip"),i.tabGroup=i.wrapper.children("ul").addClass("k-tabstrip-items k-reset"),i.tabGroup[0]||(i.tabGroup=n("<ul class='k-tabstrip-items k-reset'/>").appendTo(i.wrapper)),u=i.tabGroup.find("li").addClass("k-item"),u.length&&(f=u.filter("."+r).index(),e=f>=0?f:t,i.tabGroup.contents().filter(function(){return 3==this.nodeType&&!vt(this.nodeValue)}).remove()),f>=0&&u.eq(f).addClass(o),i.contentElements=i.wrapper.children("div"),i.contentElements.addClass(d).eq(e).addClass(r).css({display:"block"}),u.length&&(ot(u),y(i.tabGroup),i._updateContentElements(!0))},_elementId:function(n,t){var f,r=n.attr("id"),u=this.element.attr("id");return!r||r.indexOf(u+"-")>-1?(f=(u||i.guid())+"-",f+(t+1)):r},_updateContentElements:function(t){var u=this,s=u._contentUrls,f=u.tabGroup.children(".k-item"),e=u.wrapper.children("div"),o=u._elementId.bind(u);e.length&&f.length>e.length?e.each(function(i){var u=o(n(this),i),r=f.filter("[aria-controls="+(this.id||0)+"]")[0];!r&&t&&(r=f[i]),r&&r.setAttribute("aria-controls",u),this.setAttribute("id",u)}):f.each(function(t){var i=e.eq(t),f=o(i,t);this.setAttribute("aria-controls",f),!i.length&&s[t]?n("<div class='"+d+"'/>").appendTo(u.wrapper).attr("id",f):(i.attr("id",f),n(this).children(".k-loading")[0]||s[t]||n("<span class='k-loading k-complete'/>").prependTo(this)),i.attr("role","tabpanel"),i.filter(":not(."+r+")").attr("aria-hidden",!0).attr("aria-expanded",!1),i.filter("."+r).attr("aria-expanded",!0)}),u.contentElements=u.contentAnimators=u.wrapper.children("div"),u.tabsHeight=tt(u.tabGroup)+parseInt(u.wrapper.css("border-top-width"),10)+parseInt(u.wrapper.css("border-bottom-width"),10),i.kineticScrollNeeded&&i.mobile.ui.Scroller&&(i.touchScroller(u.contentElements),u.contentElements=u.contentElements.children(".km-scroll-container"))},_wrapper:function(){var n=this;n.wrapper=n.element.is("ul")?n.element.wrapAll("<div />").parent():n.element,n.scrollWrap=n.wrapper.parent(".k-tabstrip-wrapper"),n.scrollWrap[0]||(n.scrollWrap=n.wrapper.wrapAll("<div class='k-tabstrip-wrapper' />").parent())},_tabPosition:function(){var n=this,t=n.options.tabPosition;n.wrapper.addClass("k-floatwrap k-tabstrip-"+t),"bottom"==t&&n.tabGroup.appendTo(n.wrapper),n.resize(!0)},_setContentElementsDimensions:function(){var u,n,e,r,f,o,t=this,i=t.options.tabPosition;"left"!=i&&"right"!=i||(u=t.wrapper.children(".k-content"),n=u.filter(":visible"),e="margin-"+i,r=t.tabGroup,f=b(r),o=Math.ceil(r.height())-parseInt(n.css("padding-top"),10)-parseInt(n.css("padding-bottom"),10)-parseInt(n.css("border-top-width"),10)-parseInt(n.css("border-bottom-width"),10),setTimeout(function(){u.css(e,f).css("min-height",o)}))},_resize:function(){this._setContentElementsDimensions(),this._scrollable()},_sizeScrollWrap:function(n){var t,i;n.is(":visible")&&(t=this.options.tabPosition,i=Math.floor(tt(n,!0))+("left"===t||"right"===t?2:this.tabsHeight),this.scrollWrap.css("height",i).css("height"))},_toggleHover:function(t){n(t.currentTarget).toggleClass(it,t.type==ht)},_click:function(n){var u,s,t=this,h=n.find("."+e),i=h.attr(pt),o=t.options.collapsible,f=n.index(),c=t.contentHolder(f);if(n.closest(".k-widget")[0]==t.wrapper[0]){if(n.is("."+a+(o?"":",."+r)))return!0;if(s=h.data(v)||t._contentUrls[f]||i&&("#"==i.charAt(i.length-1)||i.indexOf("#"+t.element[0].id+"-")!=-1),u=!i||s,t.tabGroup.children("[data-animating]").length)return u;if(t.trigger(g,{item:n[0],contentElement:c[0]}))return!0;if(u!==!1)return o&&n.is("."+r)?(t.deactivateTab(n),!0):(t.activateTab(n)&&(u=!0),u)}},_scrollable:function(){var o,e,t,r,u,h,n=this,s=n.options;n._scrollableAllowed()&&(n.wrapper.addClass("k-tabstrip-scrollable"),o=n.wrapper[0].offsetWidth,e=n.tabGroup[0].scrollWidth,e>o&&!n._scrollableModeActive?(n._nowScrollingTabs=!1,n._isRtl=i.support.isRtl(n.element),u=i.support.mobileOS?"touchstart":"mousedown",h=i.support.mobileOS?"touchend":"mouseup",n.wrapper.append(lt("prev","k-i-arrow-60-left")+lt("next","k-i-arrow-60-right")),t=n._scrollPrevButton=n.wrapper.children(".k-tabstrip-prev"),r=n._scrollNextButton=n.wrapper.children(".k-tabstrip-next"),n.tabGroup.css({marginLeft:b(t)+9,marginRight:b(r)+12}),t.on(u+f,function(){n._nowScrollingTabs=!0,n._scrollTabsByDelta(s.scrollable.distance*(n._isRtl?1:-1))}),r.on(u+f,function(){n._nowScrollingTabs=!0,n._scrollTabsByDelta(s.scrollable.distance*(n._isRtl?-1:1))}),t.add(r).on(h+f,function(){n._nowScrollingTabs=!1}),n._scrollableModeActive=!0,n._toggleScrollButtons()):n._scrollableModeActive&&e<=o?(n._scrollableModeActive=!1,n.wrapper.removeClass("k-tabstrip-scrollable"),n._scrollPrevButton.off().remove(),n._scrollNextButton.off().remove(),n.tabGroup.css({marginLeft:"",marginRight:""})):n._scrollableModeActive?n._toggleScrollButtons():n.wrapper.removeClass("k-tabstrip-scrollable"))},_scrollableAllowed:function(){var n=this.options;return n.scrollable&&!isNaN(n.scrollable.distance)&&("top"==n.tabPosition||"bottom"==n.tabPosition)},_scrollTabsToItem:function(n){var u,s=this,r=s.tabGroup,i=r.scrollLeft(),o=b(n),t=s._isRtl?n.position().left:n.position().left-r.children().first().position().left,f=r[0].offsetWidth,e=Math.ceil(parseFloat(r.css("padding-left")));s._isRtl?t<0?u=i+t-(f-i)-e:t+o>f&&(u=i+t-o+2*e):i+f<t+o?u=t+o-f+2*e:i>t&&(u=t-e),r.finish().animate({scrollLeft:u},"fast","linear",function(){s._toggleScrollButtons()})},_scrollTabsByDelta:function(n){var t=this,i=t.tabGroup,r=i.scrollLeft();i.finish().animate({scrollLeft:r+n},"fast","linear",function(){t._nowScrollingTabs?t._scrollTabsByDelta(n):t._toggleScrollButtons()})},_toggleScrollButtons:function(){var t=this,n=t.tabGroup,i=n.scrollLeft();t._scrollPrevButton.toggle(t._isRtl?i<n[0].scrollWidth-n[0].offsetWidth-1:0!==i),t._scrollNextButton.toggle(t._isRtl?0!==i:i<n[0].scrollWidth-n[0].offsetWidth-1)},deactivateTab:function(n){var e=this,o=e.options.animation,f=o.open,t=u({},o.close),s=t&&"effects"in t;n=e.tabGroup.find(n),t=u(s?t:u({reverse:!0},f),{hide:!0}),i.size(f.effects)?(n.kendoAddClass(l,{duration:f.duration}),n.kendoRemoveClass(r,{duration:f.duration})):(n.addClass(l),n.removeClass(r)),n.removeAttr("aria-selected"),e.contentAnimators.filter("."+r).kendoStop(!0,!0).kendoAnimate(t).removeClass(r).attr("aria-hidden",!0)},activateTab:function(n){var t,p,c,f,nt,g,a,k,d,h,s,y,rt,b,w;if(!this.tabGroup.children("[data-animating]").length)return n=this.tabGroup.find(n),t=this,p=t.options.animation,c=p.open,f=u({},p.close),nt=f&&"effects"in f,g=n.parent().children(),a=g.filter("."+r),k=g.index(n),f=u(nt?f:u({reverse:!0},c),{hide:!0}),i.size(c.effects)?(a.kendoRemoveClass(r,{duration:f.duration}),n.kendoRemoveClass(it,{duration:f.duration})):(a.removeClass(r),n.removeClass(it)),d=t.contentAnimators,t.inRequest&&(t.xhr.abort(),t.inRequest=!1),0===d.length?(t.tabGroup.find("."+o).removeClass(o),n.addClass(o).css("z-index"),n.addClass(r),t._current(n),t.trigger("change"),t._scrollableModeActive&&t._scrollTabsToItem(n),!1):(h=d.filter("."+r),s=t.contentHolder(k),y=s.closest(".k-content"),t.tabsHeight=tt(t.tabGroup)+parseInt(t.wrapper.css("border-top-width"),10)+parseInt(t.wrapper.css("border-bottom-width"),10),t._sizeScrollWrap(h),0===s.length?(h.removeClass(r).attr("aria-hidden",!0).kendoStop(!0,!0).kendoAnimate(f),!1):(n.attr("data-animating",!0),rt=(n.children("."+e).data(v)||t._contentUrls[k]||!1)&&s.is(ti),b=function(){t.tabGroup.find("."+o).removeClass(o),n.addClass(o).css("z-index"),i.size(c.effects)?(a.kendoAddClass(l,{duration:c.duration}),n.kendoAddClass(r,{duration:c.duration})):(a.addClass(l),n.addClass(r)),a.removeAttr("aria-selected"),n.attr("aria-selected",!0),t._current(n),t._sizeScrollWrap(y),y.addClass(r).removeAttr("aria-hidden").kendoStop(!0,!0).attr("aria-expanded",!0).kendoAnimate(u({init:function(){t.trigger(ct,{item:n[0],contentElement:s[0]}),i.resize(s)}},c,{complete:function(){n.removeAttr("data-animating"),t.trigger(et,{item:n[0],contentElement:s[0]}),i.resize(s),t.scrollWrap.css("height","").css("height")}}))},w=function(){rt?(n.removeAttr("data-animating"),t.ajaxRequest(n,s,function(){n.attr("data-animating",!0),b(),t.trigger("change")})):(b(),t.trigger("change")),t._scrollableModeActive&&t._scrollTabsToItem(n)},h.removeClass(r),h.attr("aria-hidden",!0),h.attr("aria-expanded",!1),h.length?h.kendoStop(!0,!0).kendoAnimate(u({complete:w},f)):w(),!0))},contentElement:function(r){var f,o,u,e;if(isNaN(+r))return t;if(f=this.contentElements&&this.contentElements[0]&&!i.kineticScrollNeeded?this.contentElements:this.contentAnimators,o=n(this.tabGroup.children()[r]).attr("aria-controls"),f)for(u=0,e=f.length;u<e;u++)if(f.eq(u).closest(".k-content")[0].id==o)return f[u];return t},contentHolder:function(t){var u=n(this.contentElement(t)),r=u.children(".km-scroll-container");return i.support.touch&&r[0]?r:u},ajaxRequest:function(t,r,u,f){var s,w,a,p,y,c,o,b,l,h;t=this.tabGroup.find(t),s=this,w=n.ajaxSettings.xhr,a=t.find("."+e),p={},y=t.width()/2,c=!1,o=t.find(".k-loading").removeClass("k-complete"),o[0]||(o=n("<span class='k-loading'/>").prependTo(t)),b=2*y-o.width(),l=function(){o.animate({marginLeft:(parseInt(o.css("marginLeft"),10)||0)<y?b:0},500,l)},i.support.browser.msie&&i.support.browser.version<10&&setTimeout(l,40),f=f||a.data(v)||s._contentUrls[t.index()]||a.attr(pt),s.inRequest=!0,h={type:"GET",cache:!1,url:f,dataType:"html",data:p,xhr:function(){var i=this,t=w(),r=i.progressUpload?"progressUpload":!!i.progress&&"progress";return t&&n.each([t,t.upload],function(){this.addEventListener&&this.addEventListener("progress",function(n){r&&i[r](n)},!1)}),i.noProgress=!(window.XMLHttpRequest&&"upload"in new XMLHttpRequest),t},progress:function(n){if(n.lengthComputable){var t=parseInt(n.loaded/n.total*100,10)+"%";o.stop(!0).addClass("k-progress").css({width:t,marginLeft:0})}},error:function(n,t){s.trigger("error",{xhr:n,status:t})&&this.complete()},stopProgress:function(){clearInterval(c),o.stop(!0).addClass("k-progress")[0].style.cssText=""},complete:function(n){s.inRequest=!1,this.noProgress?setTimeout(this.stopProgress,500):this.stopProgress(),"abort"==n.statusText&&o.remove()},success:function(n){var l,h,e;o.addClass("k-complete");try{l=this,h=10,l.noProgress&&(o.width(h+"%"),c=setInterval(function(){l.progress({lengthComputable:!0,loaded:Math.min(h,100),total:100}),h+=10},40)),s.angular("cleanup",function(){return{elements:r.get()}}),i.destroy(r),r.html(n)}catch(a){e=window.console,e&&e.error&&e.error(a.name+": "+a.message+" in "+f),this.error(this.xhr,"error")}u&&u.call(s,r),s.angular("compile",function(){return{elements:r.get()}}),s.trigger(st,{item:t[0],contentElement:r[0]})}},"object"==typeof f&&(h=n.extend(!0,{},h,f),ni(h.url)&&(h.url=h.url())),s.xhr=n.ajax(h)}});u(w,{renderItem:function(n){n=u({tabStrip:{},group:{}},n);var i=h.empty,t=n.item;return h.item(u(n,{image:t.imageUrl?h.image:i,sprite:t.spriteCssClass?h.sprite:i,itemWrapper:h.itemWrapper},ft))},renderContent:function(n){return h.content(u(n,ft))}}),i.ui.plugin(w)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("util/undoredostack.min",["kendo.core.min"],n)}(function(){!function(n){var t=n.Observable.extend({init:function(t){n.Observable.fn.init.call(this,t),this.clear()},events:["undo","redo"],push:function(n){this.stack=this.stack.slice(0,this.currentCommandIndex+1),this.currentCommandIndex=this.stack.push(n)-1},undo:function(){if(this.canUndo()){var n=this.stack[this.currentCommandIndex--];n.undo(),this.trigger("undo",{command:n})}},redo:function(){if(this.canRedo()){var n=this.stack[++this.currentCommandIndex];n.redo(),this.trigger("redo",{command:n})}},clear:function(){this.stack=[],this.currentCommandIndex=-1},canUndo:function(){return this.currentCommandIndex>=0},canRedo:function(){return this.currentCommandIndex!=this.stack.length-1}});n.deepExtend(n,{util:{UndoRedoStack:t}})}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/main.min",["util/undoredostack.min","kendo.combobox.min","kendo.dropdownlist.min","kendo.window.min","kendo.colorpicker.min"],n)}(function(){!function(n,t){var s,k,w,v,y,i=window.kendo,d=i.Class,a=i.ui.Widget,c=i.support.mobileOS,e=i.support.browser,h=n.extend,f=n.proxy,nt=i.deepExtend,r=i.keys,g="select",b="select.k-select-overlay",p=d.extend({init:function(n){this.options=n},getHtml:function(){var n=this.options;return i.template(n.template,{useWithBlock:!1})(n)}}),l={editorWrapperTemplate:'<table cellspacing="4" cellpadding="0" class="k-widget k-editor k-header" role="presentation"><tbody><tr role="presentation"><td class="k-editor-toolbar-wrap" role="presentation"><ul class="k-editor-toolbar" role="toolbar" /></td></tr><tr><td class="k-editable-area" /></tr></tbody></table>',buttonTemplate:'# var iconCssClass= "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));#<a tabindex="0" role="button" class="k-tool"#= data.popup ? " data-popup" : "" # unselectable="on" title="#= data.title #"><span unselectable="on" class="k-tool-icon #= iconCssClass #"></span><span class="k-tool-text">#= data.title #</span></a>',colorPickerTemplate:'<div class="k-colorpicker k-icon k-i-#= data.cssClass.replace("k-", "") #" />',comboBoxTemplate:'<select title="#= data.title #" class="#= data.cssClass #" />',dropDownListTemplate:'<span class="k-editor-dropdown"><select title="#= data.title #" class="#= data.cssClass #" /></span>',separatorTemplate:'<span class="k-separator" />',overflowAnchorTemplate:'<a tabindex="0" role="button" class="k-tool k-overflow-anchor" data-popup unselectable="on" title="#= data.title #" aria-haspopup="true" aria-expanded="false"><span unselectable="on" class="k-icon k-i-more-vertical"></span><span class="k-tool-text">#= data.title #</span></a>',formatByName:function(t,i){for(var r=0;r<i.length;r++)if(n.inArray(t,i[r].tags)>=0)return i[r]},getToolCssClass:function(n){var i={superscript:"sup-script",subscript:"sub-script",justifyLeft:"align-left",justifyCenter:"align-center",justifyRight:"align-right",justifyFull:"align-justify",insertUnorderedList:"list-unordered",insertOrderedList:"list-ordered","import":"login",indent:"indent-increase",outdent:"indent-decrease",createLink:"link-horizontal",unlink:"unlink-horizontal",insertImage:"image",insertFile:"file-add",viewHtml:"html",foreColor:"foreground-color",backColor:"paint",createTable:"table-insert",addColumnLeft:"table-column-insert-left",addColumnRight:"table-column-insert-right",addRowAbove:"table-row-insert-above",addRowBelow:"table-row-insert-below",deleteRow:"table-row-delete",deleteColumn:"table-column-delete",tableWizard:"table-properties",tableWizardInsert:"table-wizard",cleanFormatting:"clear-css"},t=i[n];return t?t:n},registerTool:function(n,t){var i=t.options;i&&i.template&&(i.template.options.cssClass="k-"+l.getToolCssClass(n)),t.name||(t.options.name=n,t.name=n.toLowerCase()),u.defaultTools[n]=t},registerFormat:function(n,t){u.fn.options.formats[n]=t}},tt={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",superscript:"Superscript",subscript:"Subscript",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertFile:"Insert file",insertHtml:"Insert HTML",viewHtml:"View HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",formatting:"Format",foreColor:"Color",backColor:"Background color",style:"Styles",emptyFolder:"Empty Folder",editAreaTitle:"Editable area. Press F10 for toolbar.",uploadFile:"Upload",overflowAnchor:"More tools",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found.",imageWebAddress:"Web address",imageAltText:"Alternate text",imageWidth:"Width (px)",imageHeight:"Height (px)",fileWebAddress:"Web address",fileTitle:"Title",fileText:"Text",linkWebAddress:"Web address",linkText:"Text",linkToolTip:"ToolTip",linkOpenInNewWindow:"Open link in new window",dialogUpdate:"Update",dialogInsert:"Insert",dialogOk:"Ok",dialogCancel:"Cancel",cleanFormatting:"Clean formatting",createTable:"Create a table",createTableHint:"Create a {0} x {1} table",addColumnLeft:"Add column on the left",addColumnRight:"Add column on the right",addRowAbove:"Add row above",addRowBelow:"Add row below",deleteRow:"Delete row",deleteColumn:"Delete column",tableWizard:"Table Wizard",tableTab:"Table",cellTab:"Cell",accessibilityTab:"Accessibility",caption:"Caption",summary:"Summary",width:"Width",height:"Height",units:"Units",cellSpacing:"Cell Spacing",cellPadding:"Cell Padding",cellMargin:"Cell Margin",alignment:"Alignment",background:"Background",cssClass:"CSS Class",id:"ID",border:"Border",borderStyle:"Border Style",collapseBorders:"Collapse borders",wrapText:"Wrap text",associateCellsWithHeaders:"Associate cells with headers",alignLeft:"Align Left",alignCenter:"Align Center",alignRight:"Align Right",alignLeftTop:"Align Left Top",alignCenterTop:"Align Center Top",alignRightTop:"Align Right Top",alignLeftMiddle:"Align Left Middle",alignCenterMiddle:"Align Center Middle",alignRightMiddle:"Align Right Middle",alignLeftBottom:"Align Left Bottom",alignCenterBottom:"Align Center Bottom",alignRightBottom:"Align Right Bottom",alignRemove:"Remove Alignment",columns:"Columns",rows:"Rows",selectAllCells:"Select All Cells",exportAs:"Export As","import":"Import"},it=!c||c.ios&&c.flatVersion>=500||!c.ios&&t!==document.documentElement.contentEditable,o={basic:["bold","italic","underline"],alignment:["justifyLeft","justifyCenter","justifyRight"],lists:["insertUnorderedList","insertOrderedList"],indenting:["indent","outdent"],links:["createLink","unlink"],tables:["tableWizard","createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"]},u=a.extend({init:function(r,u){var c,l,v,y,s,e=this,o=i.ui.editor,p=o.Dom;it&&(a.fn.init.call(e,r,u),e.options=nt({},e.options,u),e.options.tools=e.options.tools.slice(),r=e.element,s=r[0],y=p.name(s),this._registerHandler(r.closest("form"),"submit",f(e.update,e,t)),v=h({},e.options),v.editor=e,"textarea"==y?(e._wrapTextarea(),l=e.wrapper.find(".k-editor-toolbar"),s.id&&l.attr("aria-controls",s.id)):(e.element.attr("contenteditable",!0).addClass("k-widget k-editor k-editor-inline"),v.popup=!0,l=n('<ul class="k-editor-toolbar" role="toolbar" />').insertBefore(r)),e.toolbar=new o.Toolbar(l[0],v),e.toolbar.bindTo(e),"textarea"==y&&setTimeout(function(){var i=e.wrapper[0].style.height,n=parseInt(i,10),t=e.wrapper.height();i.indexOf("px")>0&&!isNaN(n)&&t>n&&e.wrapper.height(n-(t-n))}),e._resizable(),e._initializeContentElement(e),e.keyboard=new o.Keyboard([new o.BackspaceHandler(e),new o.TypingHandler(e),new o.SystemHandler(e),new o.SelectAllHandler(e)]),e.clipboard=new o.Clipboard(this),e.undoRedoStack=new i.util.UndoRedoStack,u&&u.value?c=u.value:e.textarea?(c=s.value,e.options.encoded&&n.trim(s.defaultValue).length&&(c=s.defaultValue),c=c.replace(/[\r\n\v\f\t ]+/gi," ")):c=s.innerHTML,e.value(c||i.ui.editor.emptyElementContent),this._registerHandler(document,{mousedown:function(){e._endTyping()},mouseup:function(n){e._mouseup(n)}}),e._initializeImmutables(),e.toolbar.resize(),i.notify(e))},setOptions:function(n){var t=this;a.fn.setOptions.call(t,n),n.tools&&t.toolbar.bindTo(t)},_endTyping:function(){var n=this.keyboard;try{n.isTypingInProgress()&&(n.endTyping(!0),this.saveSelection())}catch(t){}},_selectionChange:function(){this._selectionStarted=!1,this.saveSelection(),this.trigger("select",{})},_resizable:function(){var u,r=this.options.resizable,f=n.isPlainObject(r)?r.content===t||r.content===!0:r;f&&this.textarea&&(n("<div class='k-resize-handle'><span class='k-icon k-i-arrow-45-down-right' /></div>").insertAfter(this.textarea),this.wrapper.kendoResizable(h({},this.options.resizable,{start:function(t){var i=this.editor=n(t.currentTarget).closest(".k-editor");this.initialSize=i.height(),i.find("td:last").append("<div class='k-overlay' />")},resize:function(n){var u=n.y.initialDelta,t=this.initialSize+u,r=this.options.min||0,i=this.options.max||1/0;t=Math.min(i,Math.max(r,t)),this.editor.height(t)},resizeend:function(){this.editor.find(".k-overlay").remove(),this.editor=null}})),i.support.mobileOS.ios&&(u=this.wrapper.getKendoResizable(),u.draggable.options.ignore=b))},_initializeTableResizing:function(){var n=this;i.ui.editor.TableResizing.create(n),n._showTableResizeHandlesProxy=f(n._showTableResizeHandles,n),n.bind(g,n._showTableResizeHandlesProxy)},_destroyTableResizing:function(){var n=this,t=n.tableResizing;t&&(t.destroy(),n.tableResizing=null),n._showTableResizeHandlesProxy&&n.unbind(g,n._showTableResizeHandlesProxy)},_showTableResizeHandles:function(){var t=this,n=t.tableResizing;n&&n.showResizeHandles()},_initializeColumnResizing:function(){i.ui.editor.ColumnResizing.create(this)},_destroyColumnResizing:function(){var n=this;n.columnResizing&&(n.columnResizing.destroy(),n.columnResizing=null)},_initializeRowResizing:function(){i.ui.editor.RowResizing.create(this)},_destroyRowResizing:function(){var n=this;n.rowResizing&&(n.rowResizing.destroy(),n.rowResizing=null)},_wrapTextarea:function(){var i=this,t=i.element,e=t[0].style.width,o=t[0].style.height,f=l.editorWrapperTemplate,r=n(f).insertBefore(t).width(e).height(o),u=r.find(".k-editable-area");t.attr("autocomplete","off").appendTo(u).addClass("k-content k-raw-content").css("display","none"),i.textarea=t,i.wrapper=r},_createContentElement:function(t){var r,h,u,o=this,f=o.textarea,a=o.options.domain,v=a||document.domain,s="",l='javascript:""';return(a||v!=location.hostname)&&(s='<script>document.domain="'+v+'"<\/script>',l="javascript:document.write('"+s+"')"),f.hide(),r=n("<iframe />",{title:o.options.messages.editAreaTitle,frameBorder:"0"})[0],n(r).css("display","").addClass("k-content").attr("tabindex",f[0].tabIndex).insertBefore(f),r.src=l,h=r.contentWindow||r,u=h.document||r.contentDocument,n(r).one("load",function(){o.toolbar.decorateFrom(u.body)}),u.open(),u.write("<!DOCTYPE html><html><head><meta charset='utf-8' /><style>html,body{padding:0;margin:0;height:100%;min-height:100%;}body{box-sizing:border-box;font-size:12px;font-family:Verdana,Geneva,sans-serif;margin-top:-1px;padding:5px .4em 0;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;"+(i.support.isRtl(f)?"direction:rtl;":"")+(e.msie||e.edge?"height:auto;":"")+(c.ios?"word-break:break-all;":"")+"}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em}h3{font-size:1.16em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.7em}p{margin:0 0 1em;}.k-marker{display:none;}.k-paste-container,.Apple-style-span{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}ul,ol{padding-left:2.5em}span{-ms-high-contrast-adjust:none;}a{color:#00a}code{font-size:1.23em}telerik\\3Ascript{display: none;}.k-table{width:100%;border-spacing:0;margin: 0 0 1em;}.k-table td{min-width:1px;padding:.2em .3em;}.k-table,.k-table td{outline:0;border: 1px dotted #ccc;}.k-table p{margin:0;padding:0;}.k-column-resize-handle-wrapper {position: absolute; height: 10px; width:10px; cursor: col-resize; z-index: 2;}.k-column-resize-handle {width: 100%; height: 100%;}.k-column-resize-handle > .k-column-resize-marker {width:2px; height:100%; margin:0 auto; background-color:#00b0ff; display:none; opacity:0.8;}.k-row-resize-handle-wrapper {position: absolute; cursor: row-resize; z-index:2; width: 10px; height: 10px;}.k-row-resize-handle {display: table; width: 100%; height: 100%;}.k-row-resize-marker-wrapper{display: table-cell; height:100%; width:100%; margin:0; padding:0; vertical-align: middle;}.k-row-resize-marker{margin: 0; padding:0; width:100%; height:2px; background-color: #00b0ff; opacity:0.8; display:none;}.k-table-resize-handle-wrapper {position: absolute; background-color: #fff; border: 1px solid #000; z-index: 100; width: 5px; height: 5px;}.k-table-resize-handle {width: 100%; height: 100%;}.k-table-resize-handle.k-resize-east{cursor:e-resize;}.k-table-resize-handle.k-resize-north{cursor:n-resize;}.k-table-resize-handle.k-resize-northeast{cursor:ne-resize;}.k-table-resize-handle.k-resize-northwest{cursor:nw-resize;}.k-table-resize-handle.k-resize-south{cursor:s-resize;}.k-table-resize-handle.k-resize-southeast{cursor:se-resize;}.k-table-resize-handle.k-resize-southwest{cursor:sw-resize;}.k-table-resize-handle.k-resize-west{cursor:w-resize;}.k-table.k-table-resizing{opacity:0.6;}k\\:script{display:none;}</style>"+s+"<script>(function(d,c){d[c]('header'),d[c]('article'),d[c]('nav'),d[c]('section'),d[c]('footer');})(document, 'createElement');<\/script>"+n.map(t,function(n){return"<link rel='stylesheet' href='"+n+"'>"}).join("")+"</head><body autocorrect='off' contenteditable='true'></body></html>"),u.close(),h},_blur:function(){var n=this.textarea,i=n?n.val():this._oldValue,t=this.options.encoded?this.encodedValue():this.value();this.update(),n&&n.trigger("blur"),t!=i&&this.trigger("change")},_spellCorrect:function(n){var r,u=!1;this._registerHandler(n.body,{contextmenu:function(){n.one("select",function(){r=null}),n._spellCorrectTimeout=setTimeout(function(){r=new i.ui.editor.RestorePoint(n.getRange(),n.body),u=!1},10)},input:function(){if(r)return i.support.browser.mozilla&&!u?(u=!0,t):(i.ui.editor._finishUpdate(n,r),t)}})},_registerHandler:function(t,r,u){var o,f,e,h=this,s=".kendoEditor";if(t=n(t),this._handlers||(this._handlers=[]),t.length)if(n.isPlainObject(r))for(e in r)r.hasOwnProperty(e)&&this._registerHandler(t,e,r[e]);else for(o=i.applyEventMap(r).split(" "),f=0;f<o.length;f++)h._handlers.push({element:t,type:o[f]+s,handler:u}),t.on(o[f]+s,u)},_deregisterHandlers:function(){for(var n,i=this._handlers,t=0;t<i.length;t++)n=i[t],n.element.off(n.type,n.handler);this._handlers=[]},_initializeContentElement:function(){var e,s,o,u=this;u.textarea?(u.window=u._createContentElement(u.options.stylesheets),e=u.document=u.window.contentDocument||u.window.document,u.body=e.body,s=u.window,o=e,this._registerHandler(e,"mouseup",f(this._mouseup,this))):(u.window=window,e=u.document=document,u.body=u.element[0],s=u.body,o=u.body,u.toolbar.decorateFrom(u.body)),this._registerHandler(s,"blur",f(this._blur,this)),u._registerHandler(o,"down",f(u._mousedown,u));try{e.execCommand("enableInlineTableEditing",null,!1)}catch(h){}i.support.touch&&this._registerHandler(e,{keydown:function(){i._activeElement()!=e.body&&u.window.focus()}}),this._spellCorrect(u),this._registerHandler(u.body,{keydown:function(n){var e,o,s,l,v,c,y,h,i,a;return(n.keyCode!==r.BACKSPACE&&n.keyCode!==r.DELETE||"true"===u.body.getAttribute("contenteditable"))&&(n.keyCode===r.F10?(setTimeout(f(u.toolbar.focus,u.toolbar),100),n.preventDefault(),t):(n.keyCode!=r.LEFT&&n.keyCode!=r.RIGHT||(e=u.getRange(),o=n.keyCode==r.LEFT,s=e[o?"startContainer":"endContainer"],l=e[o?"startOffset":"endOffset"],v=o?-1:1,c=l+v,y=o?c:l,3==s.nodeType&&"﻿"==s.nodeValue[y]&&(e.setStart(s,c),e.collapse(!0),u.selectRange(e))),h=u.toolbar.tools,i=u.keyboard.toolFromShortcut(h,n),a=i?h[i].options:{},i&&!a.keyPressCommand?(n.preventDefault(),/^(undo|redo)$/.test(i)||u.keyboard.endTyping(!0),u.trigger("keydown",n),u.exec(i),u._runPostContentKeyCommands(n),!1):(u.keyboard.clearTimeout(),u.keyboard.keydown(n),t)))},keypress:function(n){setTimeout(function(){u._runPostContentKeyCommands(n),u._showTableResizeHandles()},0)},keyup:function(t){var i=[r.BACKSPACE,r.TAB,r.PAGEUP,r.PAGEDOWN,r.END,r.HOME,r.LEFT,r.UP,r.RIGHT,r.DOWN,r.INSERT,r.DELETE];(n.inArray(t.keyCode,i)>-1||65==t.keyCode&&t.ctrlKey&&!t.altKey&&!t.shiftKey)&&u._selectionChange(),u.keyboard.keyup(t)},click:function(n){var t,r=i.ui.editor.Dom;"img"===r.name(n.target)&&(t=u.createRange(),t.selectNode(n.target),u.selectRange(t))},"cut copy paste":function(n){u.clipboard["on"+n.type](n)},focusin:function(){u.body.hasAttribute("contenteditable")&&(n(this).addClass("k-state-active"),u.toolbar.show())},focusout:function(){setTimeout(function(){var f,r=i._activeElement(),e=u.body,t=u.toolbar;t.options.popup&&(f=t.window.element.get(0),f&&!n.contains(f,r)&&f!=r&&(t.preventPopupHide=!1)),r==e||n.contains(e,r)||n(r).is(".k-editortoolbar-dragHandle")||t.focused()||(n(e).removeClass("k-state-active"),t.hide())},10)}}),u._initializeColumnResizing(),u._initializeRowResizing(),u._initializeTableResizing()},_initializeImmutables:function(){var n=this,t=i.ui.editor;n.options.immutables&&(n.immutables=new t.Immutables(n))},_mousedown:function(t){var i,r=this;r._selectionStarted=!0,e.gecko||(i=n(t.target),(2==t.which||1==t.which&&t.ctrlKey)&&i.is("a[href]")&&window.open(i.attr("href"),"_new"))},_mouseup:function(t){var r=this;i.support.mobileOS.ios&&t&&n(t.target).is(b)||r._selectionStarted&&setTimeout(function(){r._selectionChange()},1)},_runPostContentKeyCommands:function(n){for(var r,i,f,e=this.getRange(),u=this.keyboard.toolsFromShortcut(this.toolbar.tools,n),t=0;t<u.length;t++)r=u[t],i=r.options,i.keyPressCommand&&(f=new i.command({range:e}),f.changesContent()&&(this.keyboard.endTyping(!0),this.exec(r.name)))},refresh:function(){var t,n=this;n.textarea&&(n._destroyResizings(),t=n.value(),n.textarea.val(t),n.wrapper.find("iframe").remove(),n._initializeContentElement(n),n.value(t))},events:["select","change","execute","error","paste","keydown","keyup"],options:{name:"Editor",messages:tt,formats:{},encoded:!0,domain:null,resizable:!1,deserialization:{custom:null},serialization:{entities:!0,semantic:!0,scripts:!1},pasteCleanup:{all:!1,css:!1,custom:null,keepNewLines:!1,msAllFormatting:!1,msConvertLists:!0,msTags:!0,none:!1,span:!1},stylesheets:[],dialogOptions:{modal:!0,resizable:!1,draggable:!0,animation:!1},imageBrowser:null,fileBrowser:null,fontName:[{text:"Arial",value:"Arial,Helvetica,sans-serif"},{text:"Courier New",value:"'Courier New',Courier,monospace"},{text:"Georgia",value:"Georgia,serif"},{text:"Impact",value:"Impact,Charcoal,sans-serif"},{text:"Lucida Console",value:"'Lucida Console',Monaco,monospace"},{text:"Tahoma",value:"Tahoma,Geneva,sans-serif"},{text:"Times New Roman",value:"'Times New Roman',Times,serif"},{text:"Trebuchet MS",value:"'Trebuchet MS',Helvetica,sans-serif"},{text:"Verdana",value:"Verdana,Geneva,sans-serif"}],fontSize:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],formatBlock:[{text:"Paragraph",value:"p"},{text:"Quotation",value:"blockquote"},{text:"Heading 1",value:"h1"},{text:"Heading 2",value:"h2"},{text:"Heading 3",value:"h3"},{text:"Heading 4",value:"h4"},{text:"Heading 5",value:"h5"},{text:"Heading 6",value:"h6"}],tools:[].concat.call(["formatting"],o.basic,o.alignment,o.lists,o.indenting,o.links,["insertImage"],o.tables)},destroy:function(){var n=this;a.fn.destroy.call(this),this._endTyping(!0),this._deregisterHandlers(),clearTimeout(this._spellCorrectTimeout),this._focusOutside(),this.toolbar.destroy(),n._destroyUploadWidget(),n._destroyResizings(),i.destroy(this.wrapper)},_destroyResizings:function(){var n=this;n._destroyTableResizing(),i.ui.editor.TableResizing.dispose(n),n._destroyRowResizing(),i.ui.editor.RowResizing.dispose(n),n._destroyColumnResizing(),i.ui.editor.ColumnResizing.dispose(n)},_focusOutside:function(){if(i.support.browser.msie&&this.textarea){var t=n("<input style='position:fixed;left:1px;top:1px;width:1px;height:1px;font-size:0;border:0;opacity:0' />").appendTo(document.body).focus();t.blur().remove()}},_destroyUploadWidget:function(){var n=this;n._uploadWidget&&(n._uploadWidget.destroy(),n._uploadWidget=null)},state:function(n){var f,t,e=u.defaultTools[n],r=e&&(e.options.finder||e.finder),o=i.ui.editor.RangeUtils;return!!r&&(f=this.getRange(),t=o.textNodes(f),!t.length&&f.collapsed&&(t=[f.startContainer]),r.getFormat?r.getFormat(t):r.isFormatted(t))},value:function(n){var f=this.body,e=i.ui.editor,r=this.options,u=e.Serializer.domToXhtml(f,r.serialization);return n===t?u:(n!=u&&(e.Serializer.htmlToDom(n,f,r.deserialization),this.selectionRestorePoint=null,this.update(),this.toolbar.refreshTools()),t)},saveSelection:function(t){t=t||this.getRange();var u=t.commonAncestorContainer,r=this.body;(u==r||n.contains(r,u))&&(this.selectionRestorePoint=new i.ui.editor.RestorePoint(t,r))},_focusBody:function(){var t,n=this.body,f=this.wrapper&&this.wrapper.find("iframe")[0],u=this.document.documentElement,r=i._activeElement();f?r!=n&&r!=f&&(t=u.scrollTop,n.focus(),u.scrollTop=t):(t=n.scrollTop,n.focus(),n.scrollTop=t)},restoreSelection:function(){this._focusBody(),this.selectionRestorePoint&&this.selectRange(this.selectionRestorePoint.toRange())},focus:function(){this.restoreSelection()},update:function(n){n=n||this.options.encoded?this.encodedValue():this.value(),this.textarea?this.textarea.val(n):this._oldValue=n},encodedValue:function(){return i.ui.editor.Dom.encode(this.value())},createRange:function(n){return i.ui.editor.RangeUtils.createRange(n||this.document)},getSelection:function(){return i.ui.editor.SelectionUtils.selectionFromDocument(this.document)},selectRange:function(n){this._focusBody();var t=this.getSelection();t.removeAllRanges(),t.addRange(n),this.saveSelection(n)},getRange:function(){var t=this.getSelection(),n=t&&t.rangeCount>0?t.getRangeAt(0):this.createRange(),i=this.document;return n.startContainer!=i||n.endContainer!=i||n.startOffset||n.endOffset||(n.setStart(this.body,0),n.collapse(!0)),n},_containsRange:function(n){var r=i.ui.editor.Dom,t=this.body;return n&&r.isAncestorOrSelf(t,n.startContainer)&&r.isAncestorOrSelf(t,n.endContainer)},selectedHtml:function(){return i.ui.editor.Serializer.domToXhtml(this.getRange().cloneContents())},paste:function(t,r){this.focus();var u=new i.ui.editor.InsertHtmlCommand(n.extend({range:this.getRange(),html:t},r));u.editor=this,u.exec()},exec:function(n,i){var c,o,l,s,r=this,e=null;if(!n)throw Error("kendoEditor.exec(): `name` parameter cannot be empty");if("true"!==r.body.getAttribute("contenteditable")&&"print"!==n&&"pdf"!==n)return!1;if(n=n.toLowerCase(),r.keyboard.isTypingInProgress()||(r._focusBody(),r.selectRange(r._range||r.getRange())),o=r.toolbar.toolById(n),!o)for(s in u.defaultTools)if(s.toLowerCase()==n){o=u.defaultTools[s];break}if(o){if(c=r.getRange(),o.command&&(e=o.command(h({range:c,body:r.body,immutables:!!r.immutables},i))),l=r.trigger("execute",{name:n,command:e}))return;if(/^(undo|redo)$/i.test(n))r.undoRedoStack[n]();else if(e&&(r.execCommand(e),e.async))return e.change=f(r._selectionChange,r),t;r._selectionChange()}},execCommand:function(n){n.managesUndoRedo||this.undoRedoStack.push(n),n.editor=this,n.exec()}});u.defaultTools={undo:{options:{key:"Z",ctrl:!0}},redo:{options:{key:"Y",ctrl:!0}}},i.ui.plugin(u),s=d.extend({init:function(n){this.options=n},initialize:function(n,t){n.attr({unselectable:"on",title:t.title}),n.children(".k-tool-text").html(t.title)},command:function(n){return new this.options.command(n)},update:n.noop}),s.exec=function(n,t,i){n.exec(t,{value:i})},k=s.extend({init:function(n){s.fn.init.call(this,n)},command:function(n){var t=this;return new i.ui.editor.FormatCommand(h(n,{formatter:t.options.formatter}))},update:function(n,t){var i=this.options.finder.isFormatted(t);n.toggleClass("k-state-selected",i),n.attr("aria-pressed",i)}}),l.registerTool("separator",new s({template:new p({template:l.separatorTemplate})})),w=e.msie&&e.version<9?"﻿":"",v="﻿",y=v,e.msie&&10==e.version&&(y="&nbsp;"),h(i.ui,{editor:{ToolTemplate:p,EditorUtils:l,Tool:s,FormatTool:k,_bomFill:w,emptyElementContent:v,emptyTableCellContent:y}}),i.PDFMixin&&(i.PDFMixin.extend(u.prototype),u.prototype._drawPDF=function(){return i.drawing.drawDOM(this.body,this.options.pdf)},u.prototype.saveAsPDF=function(){var t,r=new n.Deferred,u=r.promise(),f={promise:u};if(!this.trigger("pdfExport",f))return t=this.options.pdf,this._drawPDF(r).then(function(n){return i.drawing.exportPDF(n,t)}).done(function(n){i.saveAs({dataURI:n,fileName:t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy}),r.resolve()}).fail(function(n){r.reject(n)}),u})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/dom.min",["editor/main.min"],n)}(function(){!function(n){function r(n){for(var i={},t=0,r=n.length;t<r;t++)i[n[t]]=!0;return i}var it,h,rt,c,tt,l,g,nt,ot,st,t,i=window.kendo,s=n.map,et=n.extend,o=i.support.browser,e="style",ut="float",ft="cssFloat",a="styleFloat",v="class",p="k-marker",f=r("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed".split(",")),w="div,p,h1,h2,h3,h4,h5,h6,address,applet,blockquote,button,center,dd,dir,dl,dt,fieldset,form,frameset,hr,iframe,isindex,map,menu,noframes,noscript,object,pre,script,table,tbody,td,tfoot,th,thead,tr,header,article,nav,footer,section,aside,main,figure,figcaption".split(","),u=w.concat(["ul","ol","li"]),b=r(u),d="span,em,a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,strike,strong,sub,sup,textarea,tt,u,var,data,time,mark,ruby".split(","),k=r(d),ht=r("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(",")),y=function(n){1==n.nodeType&&n.normalize()};o.msie&&o.version>=8&&(y=function(n){if(1==n.nodeType&&n.firstChild)for(var r=n.firstChild,i=r;;){if(i=i.nextSibling,!i)break;3==i.nodeType&&3==r.nodeType&&(i.nodeValue=r.nodeValue+i.nodeValue,t.remove(r)),r=i}}),it=/^\s+$/,h=/^[\n\r\t]+$/,rt=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,c=/\ufeff/g,tt=/^(\s+|\ufeff)$/,g="color,padding-left,padding-right,padding-top,padding-bottom,background-color,background-attachment,background-image,background-position,background-repeat,border-top-style,border-top-width,border-top-color,border-bottom-style,border-bottom-width,border-bottom-color,border-left-style,border-left-width,border-left-color,border-right-style,border-right-width,border-right-color,font-family,font-size,font-style,font-variant,font-weight,line-height".split(","),nt=/[<>\&]/g,ot=/[\u00A0-\u2666<>\&]/g,st={34:"quot",38:"amp",39:"apos",60:"lt",62:"gt",160:"nbsp",161:"iexcl",162:"cent",163:"pound",164:"curren",165:"yen",166:"brvbar",167:"sect",168:"uml",169:"copy",170:"ordf",171:"laquo",172:"not",173:"shy",174:"reg",175:"macr",176:"deg",177:"plusmn",178:"sup2",179:"sup3",180:"acute",181:"micro",182:"para",183:"middot",184:"cedil",185:"sup1",186:"ordm",187:"raquo",188:"frac14",189:"frac12",190:"frac34",191:"iquest",192:"Agrave",193:"Aacute",194:"Acirc",195:"Atilde",196:"Auml",197:"Aring",198:"AElig",199:"Ccedil",200:"Egrave",201:"Eacute",202:"Ecirc",203:"Euml",204:"Igrave",205:"Iacute",206:"Icirc",207:"Iuml",208:"ETH",209:"Ntilde",210:"Ograve",211:"Oacute",212:"Ocirc",213:"Otilde",214:"Ouml",215:"times",216:"Oslash",217:"Ugrave",218:"Uacute",219:"Ucirc",220:"Uuml",221:"Yacute",222:"THORN",223:"szlig",224:"agrave",225:"aacute",226:"acirc",227:"atilde",228:"auml",229:"aring",230:"aelig",231:"ccedil",232:"egrave",233:"eacute",234:"ecirc",235:"euml",236:"igrave",237:"iacute",238:"icirc",239:"iuml",240:"eth",241:"ntilde",242:"ograve",243:"oacute",244:"ocirc",245:"otilde",246:"ouml",247:"divide",248:"oslash",249:"ugrave",250:"uacute",251:"ucirc",252:"uuml",253:"yacute",254:"thorn",255:"yuml",402:"fnof",913:"Alpha",914:"Beta",915:"Gamma",916:"Delta",917:"Epsilon",918:"Zeta",919:"Eta",920:"Theta",921:"Iota",922:"Kappa",923:"Lambda",924:"Mu",925:"Nu",926:"Xi",927:"Omicron",928:"Pi",929:"Rho",931:"Sigma",932:"Tau",933:"Upsilon",934:"Phi",935:"Chi",936:"Psi",937:"Omega",945:"alpha",946:"beta",947:"gamma",948:"delta",949:"epsilon",950:"zeta",951:"eta",952:"theta",953:"iota",954:"kappa",955:"lambda",956:"mu",957:"nu",958:"xi",959:"omicron",960:"pi",961:"rho",962:"sigmaf",963:"sigma",964:"tau",965:"upsilon",966:"phi",967:"chi",968:"psi",969:"omega",977:"thetasym",978:"upsih",982:"piv",8226:"bull",8230:"hellip",8242:"prime",8243:"Prime",8254:"oline",8260:"frasl",8472:"weierp",8465:"image",8476:"real",8482:"trade",8501:"alefsym",8592:"larr",8593:"uarr",8594:"rarr",8595:"darr",8596:"harr",8629:"crarr",8656:"lArr",8657:"uArr",8658:"rArr",8659:"dArr",8660:"hArr",8704:"forall",8706:"part",8707:"exist",8709:"empty",8711:"nabla",8712:"isin",8713:"notin",8715:"ni",8719:"prod",8721:"sum",8722:"minus",8727:"lowast",8730:"radic",8733:"prop",8734:"infin",8736:"ang",8743:"and",8744:"or",8745:"cap",8746:"cup",8747:"int",8756:"there4",8764:"sim",8773:"cong",8776:"asymp",8800:"ne",8801:"equiv",8804:"le",8805:"ge",8834:"sub",8835:"sup",8836:"nsub",8838:"sube",8839:"supe",8853:"oplus",8855:"otimes",8869:"perp",8901:"sdot",8968:"lceil",8969:"rceil",8970:"lfloor",8971:"rfloor",9001:"lang",9002:"rang",9674:"loz",9824:"spades",9827:"clubs",9829:"hearts",9830:"diams",338:"OElig",339:"oelig",352:"Scaron",353:"scaron",376:"Yuml",710:"circ",732:"tilde",8194:"ensp",8195:"emsp",8201:"thinsp",8204:"zwnj",8205:"zwj",8206:"lrm",8207:"rlm",8211:"ndash",8212:"mdash",8216:"lsquo",8217:"rsquo",8218:"sbquo",8220:"ldquo",8221:"rdquo",8222:"bdquo",8224:"dagger",8225:"Dagger",8240:"permil",8249:"lsaquo",8250:"rsaquo",8364:"euro"},t={block:b,inline:k,findNodeIndex:function(n,t){var i=0;if(!n)return-1;for(;;){if(n=n.previousSibling,!n)break;t&&3==n.nodeType||i++}return i},isDataNode:function(n){return n&&null!==n.nodeValue&&null!==n.data},isAncestorOf:function(i,r){try{return!t.isDataNode(i)&&(n.contains(i,t.isDataNode(r)?r.parentNode:r)||r.parentNode==i)}catch(u){return!1}},isAncestorOrSelf:function(n,i){return t.isAncestorOf(n,i)||n==i},findClosestAncestor:function(n,i){if(t.isAncestorOf(n,i))for(;i&&i.parentNode!=n;)i=i.parentNode;return i},getNodeLength:function(n){return t.isDataNode(n)?n.length:n.childNodes.length},splitDataNode:function(n,i){for(var f,u=n.cloneNode(!1),e="",r=n.nextSibling;r&&3==r.nodeType&&r.nodeValue;)e+=r.nodeValue,f=r,r=r.nextSibling,t.remove(f);n.deleteData(i,n.length),u.deleteData(0,i),u.nodeValue+=e,t.insertAfter(u,n)},attrEquals:function(n,r){var f,u;for(f in r)if(u=n[f],f==ut&&(u=n[i.support.cssFloat?ft:a]),"object"==typeof u){if(!t.attrEquals(u,r[f]))return!1}else if(u!=r[f])return!1;return!0},blockParentOrBody:function(n){return t.parentOfType(n,u)||n.ownerDocument.body},blockParents:function(i){for(var r,f=[],u=0,e=i.length;u<e;u++)r=t.parentOfType(i[u],t.blockElements),r&&n.inArray(r,f)<0&&f.push(r);return f},windowFromDocument:function(n){return n.defaultView||n.parentWindow},normalize:y,blockElements:u,nonListBlockElements:w,inlineElements:d,empty:f,fillAttrs:ht,nodeTypes:{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12},toHex:function(n){var t=rt.exec(n);return t?"#"+s(t.slice(1),function(n){return n=parseInt(n,10).toString(16),n.length>1?n:"0"+n}).join(""):n},encode:function(n,t){var i=!t||t.entities?ot:nt;return n.replace(i,function(n){var i=n.charCodeAt(0),t=st[i];return t?"&"+t+";":n})},isBom:function(n){return n&&3===n.nodeType&&/^[\ufeff]+$/.test(n.nodeValue)},stripBom:function(n){return(n||"").replace(c,"")},stripBomNode:function(n){t.isBom(n)&&n.parentNode.removeChild(n)},insignificant:function(n){var i=n.attributes;return"k-marker"==n.className||t.is(n,"br")&&("k-br"==n.className||i._moz_dirty||i._moz_editor_bogus_node)},tableCell:function(n){return t.is(n,"td")||t.is(n,"th")},significantNodes:function(i){return n.grep(i,function(n){var i=t.name(n);return"br"!=i&&!t.insignificant(n)&&!t.emptyTextNode(n)&&!(1==n.nodeType&&!f[i]&&t.emptyNode(n))})},emptyTextNode:function(n){return n&&3==n.nodeType&&tt.test(n.nodeValue)},emptyNode:function(n){return 1==n.nodeType&&!t.significantNodes(n.childNodes).length},name:function(n){return n.nodeName.toLowerCase()},significantChildNodes:function(i){return n.grep(i.childNodes,function(n){return 3!=n.nodeType||!t.isWhitespace(n)})},lastTextNode:function(n){var i,r=null;if(3==n.nodeType)return n;for(i=n.lastChild;i;i=i.previousSibling)if(r=t.lastTextNode(i))return r;return r},is:function(n,i){return n&&t.name(n)==i},isMarker:function(n){return n.className==p},isWhitespace:function(n){return it.test(n.nodeValue)},allWhitespaceContent:function(n){for(var i=n.firstChild;i&&t.isWhitespace(i);)i=i.nextSibling;return!i},isEmptyspace:function(n){return h.test(n.nodeValue)},htmlIndentSpace:function(i){var s,f,r,u,o,e;return!(!t.isDataNode(i)||!t.isWhitespace(i))&&(!!h.test(i.nodeValue)||(s=function(n,i){for(;n[i];)if(n=n[i],t.significantNodes([n]).length>0)return n},f=i.parentNode,r=s(i,"previousSibling"),u=s(i,"nextSibling"),c.test(i.nodeValue)?!(!r&&!u):!!n(f).is("tr,tbody,thead,tfoot,table,ol,ul")||!!((t.isBlock(f)||t.is(f,"body"))&&(o=r&&t.isBlock(r),e=u&&t.isBlock(u),!u&&o||!r&&e||o&&e))))},isBlock:function(n){return b[t.name(n)]},isEmpty:function(n){return f[t.name(n)]},isInline:function(n){return k[t.name(n)]},list:function(n){var i=n?t.name(n):"";return"ul"==i||"ol"==i||"dl"==i},scrollContainer:function(n){var u=t.windowFromDocument(n),r=(u.contentWindow||u).document||u.ownerDocument||u;return r=i.support.browser.webkit||"BackCompat"==r.compatMode?r.body:r.documentElement},scrollTo:function(i){var f,r,u=n(t.isDataNode(i)?i.parentNode:i),s=t.windowFromDocument(i.ownerDocument),e=s.innerHeight,o=t.scrollContainer(i.ownerDocument);f=u.offset().top,r=u[0].offsetHeight,r||(r=parseInt(u.css("line-height"),10)||Math.ceil(1.2*parseInt(u.css("font-size"),10))||15),r+f>o.scrollTop+e&&(o.scrollTop=r+f-e)},persistScrollTop:function(n){l=t.scrollContainer(n).scrollTop},offset:function(n,i){for(var u={top:n.offsetTop,left:n.offsetLeft},r=n.offsetParent;r&&(!i||t.isAncestorOf(i,r));)u.top+=r.offsetTop,u.left+=r.offsetLeft,r=r.offsetParent;return u},restoreScrollTop:function(n){"number"==typeof l&&(t.scrollContainer(n).scrollTop=l)},insertAt:function(n,t,i){n.insertBefore(t,n.childNodes[i]||null)},insertBefore:function(n,t){return t.parentNode?t.parentNode.insertBefore(n,t):t},insertAfter:function(n,t){return t.parentNode.insertBefore(n,t.nextSibling)},remove:function(n){n.parentNode&&n.parentNode.removeChild(n)},removeChildren:function(n){for(;n.firstChild;)n.removeChild(n.firstChild)},removeTextSiblings:function(n){for(var t=n.parentNode;n.nextSibling&&3==n.nextSibling.nodeType;)t.removeChild(n.nextSibling);for(;n.previousSibling&&3==n.previousSibling.nodeType;)t.removeChild(n.previousSibling)},trim:function(n){for(var i,r=n.childNodes.length-1;r>=0;r--)i=n.childNodes[r],t.isDataNode(i)?t.stripBom(i.nodeValue).length||t.remove(i):i.className!=p&&(t.trim(i),(0===i.childNodes.length||t.allWhitespaceContent(i)&&t.isBlock(i)&&!t.isEmpty(i))&&t.remove(i));return n},closest:function(n,i){for(;n&&t.name(n)!=i;)n=n.parentNode;return n},closestBy:function(n,t,i){for(;n&&!t(n);){if(i&&i(n))return null;n=n.parentNode}return n},sibling:function(n,t){do n=n[t];while(n&&1!=n.nodeType);return n},next:function(n){return t.sibling(n,"nextSibling")},prev:function(n){return t.sibling(n,"previousSibling")},parentOfType:function(n,i){do n=n.parentNode;while(n&&!t.ofType(n,i));return n},ofType:function(i,r){return n.inArray(t.name(i),r)>=0},changeTag:function(n,i,r){var s,l,o,h,f,u=t.create(n.ownerDocument,i),c=n.attributes;if(!r)for(s=0,l=c.length;s<l;s++)f=c[s],f.specified&&(o=f.nodeName,h=f.nodeValue,o==v?u.className=h:o==e?u.style.cssText=n.style.cssText:u.setAttribute(o,h));for(;n.firstChild;)u.appendChild(n.firstChild);return t.insertBefore(u,n),t.remove(n),u},editableParent:function(n){for(;n&&(3==n.nodeType||"true"!==n.contentEditable);)n=n.parentNode;return n},wrap:function(n,i){return t.insertBefore(i,n),i.appendChild(n),i},unwrap:function(n){for(var t=n.parentNode;n.firstChild;)t.insertBefore(n.firstChild,n);t.removeChild(n)},wrapper:function(i){var r=t.closestBy(i,function(n){return n.parentNode&&t.significantNodes(n.parentNode.childNodes).length>1});if(!n(r).is("body,.k-editor"))return r},create:function(n,i,r){return t.attr(n.createElement(i),r)},attr:function(n,i){i=et({},i),i&&e in i&&(t.style(n,i.style),delete i.style);for(var r in i)null===i[r]?(n.removeAttribute(r),delete i[r]):"className"==r&&(n[r]=i[r]);return et(n,i)},style:function(t,i){n(t).css(i||{})},unstyle:function(n,t){for(var r in t)r==ut&&(r=i.support.cssFloat?ft:a),n.style[r]="";""===n.style.cssText&&n.removeAttribute(e)},inlineStyle:function(i,r,u){var e,f=n(t.create(i.ownerDocument,r,u));return i.appendChild(f[0]),e=s(g,function(n){return o.msie&&"line-height"==n&&"1px"==f.css(n)?"line-height:1.5":n+":"+f.css(n)}).join(";"),f.remove(),e},getEffectiveBackground:function(n){var i=n.css("background-color")||"";return i.indexOf("rgba(0, 0, 0, 0")<0&&"transparent"!==i?i:"html"===n[0].tagName.toLowerCase()?"Window":t.getEffectiveBackground(n.parent())},innerText:function(n){var t=n.innerHTML;return t=t.replace(/<!--(.|\s)*?-->/gi,""),t=t.replace(/<\/?[^>]+?\/?>/gm,"")},removeClass:function(t,i){for(var r=" "+t.className+" ",f=i.split(" "),u=0,e=f.length;u<e;u++)r=r.replace(" "+f[u]+" "," ");r=n.trim(r),r.length?t.className=r:t.removeAttribute(v)},commonAncestor:function(){var n,f,t,s,u,i=arguments.length,r=[],o=1/0,e=null;if(!i)return null;if(1==i)return arguments[0];for(n=0;n<i;n++){for(f=[],t=arguments[n];t;)f.push(t),t=t.parentNode;r.push(f.reverse()),o=Math.min(o,f.length)}if(1==i)return r[0][0];for(n=0;n<o;n++){for(s=r[0][n],u=1;u<i;u++)if(s!=r[u][n])return e;e=s}return e},closestSplittableParent:function(i){var r,f,u;return r=1==i.length?t.parentOfType(i[0],["ul","ol"]):t.commonAncestor.apply(null,i),r||(r=t.parentOfType(i[0],["p","td"])||i[0].ownerDocument.body),t.isInline(r)&&(r=t.blockParentOrBody(r)),f=s(i,t.editableParent),u=t.commonAncestor(f)[0],n.contains(r,u)&&(r=u),r},closestEditable:function(i,r){var u,f=t.editableParent(i);return u=t.ofType(i,r)?i:t.parentOfType(i,r),u&&f&&n.contains(u,f)?u=f:!u&&f&&(u=f),u},closestEditableOfType:function(n,i){var r=t.closestEditable(n,i);if(r&&t.ofType(r,i))return r},filter:function(n,i,r){var u=function(i){return t.name(i)==n};return t.filterBy(i,u,r)},filterBy:function(n,t,i){for(var u,r=0,e=n.length,f=[];r<e;r++)u=t(n[r]),(u&&!i||!u&&i)&&f.push(n[r]);return f},ensureTrailingBreaks:function(i){var u=n(i).find("p,td,th"),f=u.length,r=0;if(f)for(;r<f;r++)t.ensureTrailingBreak(u[r]);else t.ensureTrailingBreak(i)},removeTrailingBreak:function(t){n(t).find("br[type=_moz],.k-br").remove()},ensureTrailingBreak:function(n){var r,i,u;t.removeTrailingBreak(n),r=n.lastChild,i=r&&t.name(r),(!i||"br"!=i&&"img"!=i||"br"==i&&"k-br"!=r.className)&&(u=n.ownerDocument.createElement("br"),u.className="k-br",n.appendChild(u))}},i.ui.editor.Dom=t}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/serializer.min",["editor/dom.min"],n)}(function(){!function(n,t){var l,p,v,r,u=window.kendo,e=u.ui.editor,i=e.Dom,g=n.extend,s="xx-small,x-small,small,medium,large,x-large,xx-large".split(","),y=/"/g,k=/<br[^>]*>/i,h=/^\d+(\.\d*)?(px)?$/i,b=/<p>(?:&nbsp;)?<\/p>/i,c=/(\*?[-#\/\*\\\w]+(?:\[[0-9a-z_-]+\])?)\s*:\s*((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/g,d=/^sizzle-\d+/i,a=/^k-script-/i,w=/\s*onerror\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/i,f='<br class="k-br">',o=document.createElement("div");o.innerHTML=" <hr>",l=3===o.firstChild.nodeType,o=null,p=n.isFunction,v="td",r={toEditableHtml:function(n){return(n||"").replace(/<!\[CDATA\[(.*)?\]\]>/g,"<!--[CDATA[$1]]-->").replace(/<(\/?)script([^>]*)>/gi,"<$1k:script$2>").replace(/<img([^>]*)>/gi,function(n){return n.replace(w,"")}).replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/gi,"$1").replace(/^<(table|blockquote)/i,f+"<$1").replace(/^[\s]*(&nbsp;|\u00a0)/i,"$1").replace(/<\/(table|blockquote)>$/i,"</$1>"+f)},_toEditableImmutables:function(t){for(var s=e.Immutables.immutable,o=i.emptyTextNode,r=t.firstChild,u=t.lastChild;o(r);)r=r.nextSibling;for(;o(u);)u=u.previousSibling;r&&s(r)&&n(f).prependTo(t),u&&s(u)&&n(f).appendTo(t)},_fillEmptyElements:function(t){n(t).find("p,td").each(function(){var t,r=n(this);if(/^\s*$/g.test(r.text())&&!r.find("img,input").length){for(t=this;t.firstChild&&3!=t.firstChild.nodeType;)t=t.firstChild;1!=t.nodeType||i.empty[i.name(t)]||(t.innerHTML=i.is(t,"td")?u.ui.editor.emptyTableCellContent:u.ui.editor.emptyElementContent)}})},_removeSystemElements:function(t){n(".k-paste-container",t).remove()},_resetOrderedLists:function(n){for(var t,i,u=n.getElementsByTagName("ol"),r=0;r<u.length;r++)t=u[r],i=t.getAttribute("start"),t.setAttribute("start",1),i?t.setAttribute("start",i):t.removeAttribute(i)},_preventScriptExecution:function(t){n(t).find("*").each(function(){for(var i,n,r=this.attributes,t=0,u=r.length;t<u;t++)i=r[t],n=i.nodeName,i.specified&&/^on/i.test(n)&&(this.setAttribute("k-script-"+n,i.value),this.removeAttribute(n))})},htmlToDom:function(t,f,e){var l=u.support.browser,a=l.msie,v=a&&l.version<9,s="originalsrc",o="originalhref",h=e||{},c=h.immutables;return t=r.toEditableHtml(t),v&&(t="<br/>"+t,t=t.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,o+'="$1"'),t=t.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,s+'="$1"')),p(h.custom)&&(t=h.custom(t)||t),f.innerHTML=t,c&&c.deserialize(f),v?(i.remove(f.firstChild),n(f).find("k\\:script,script,link,img,a").each(function(){var n=this;n[o]&&(n.setAttribute("href",n[o]),n.removeAttribute(o)),n[s]&&(n.setAttribute("src",n[s]),n.removeAttribute(s))})):a&&(i.normalize(f),r._resetOrderedLists(f)),r._preventScriptExecution(f),r._fillEmptyElements(f),r._removeSystemElements(f),r._toEditableImmutables(f),n("table",f).addClass("k-table"),f},domToXhtml:function(r,f){function tt(t){return n.grep(t,function(n){return"style"!=n.name})}function ot(t){var f,u,r,e=n.trim,s=e(t),o=[];for(c.lastIndex=0;;){if(f=c.exec(s),!f)break;u=e(f[1].toLowerCase()),r=e(f[2]),"font-size-adjust"!=u&&"font-stretch"!=u&&(u.indexOf("color")>=0?r=i.toHex(r):u.indexOf("font")>=0?r=r.replace(y,"'"):/\burl\(/g.test(r)&&(r=r.replace(y,"")),o.push({property:u,value:r}))}return o}function ft(n){for(var i=ot(n),t=0;t<i.length;t++)o.push(i[t].property),o.push(":"),o.push(i[t].value),o.push(";")}function nt(n){for(var u,r,e,t,h=[],s=n.attributes,o=0,c=s.length;o<c;o++)u=s[o],r=u.nodeName,e=u.value,t=u.specified,"value"==r&&"value"in n&&n.value?t=!0:"type"==r&&"text"==e?t=!0:"class"!=r||e?d.test(r)?t=!1:"complete"==r?t=!1:"altHtml"==r?t=!1:"start"==r&&i.is(n,"ul")?t=!1:"start"==r&&i.is(n,"ol")&&"1"==e?t=!1:r.indexOf("_moz")>=0?t=!1:a.test(r)?t=!!f.scripts:"data-role"==r&&"resizable"==e&&(i.is(n,"tr")||i.is(n,"td"))&&(t=!1):t=!1,t&&h.push(u);return h}function p(r,f){var l,w,p,e,s,v,c,y;if(f=f||nt(r),i.is(r,"img")&&(v=r.style.width,c=r.style.height,y=n(r),v&&h.test(v)&&(y.attr("width",parseInt(v,10)),i.unstyle(r,{width:t})),c&&h.test(c)&&(y.attr("height",parseInt(c,10)),i.unstyle(r,{height:t}))),f.length)for(f.sort(function(n,t){return n.nodeName>t.nodeName?1:n.nodeName<t.nodeName?-1:0}),l=0,w=f.length;l<w;l++)p=f[l],e=p.nodeName,s=p.value,"class"==e&&"k-table"==s||(e=e.replace(a,""),o.push(" "),o.push(e),o.push('="'),"style"==e?ft(s||r.style.cssText):o.push("src"==e||"href"==e?u.htmlEncode(r.getAttribute(e,2)):i.fillAttrs[e]?e:s),o.push('"'))}function g(n,t,i){for(var r=n.firstChild;r;r=r.nextSibling)et(r,t,i)}function ut(n){return n.nodeValue.replace(/\ufeff/g,"")}function ht(n){if("﻿"===n.nodeValue){do{if(n=n.parentNode,i.is(n,v)&&1===n.childNodes.length)return!0;if(1!==n.childNodes.length)return!1}while(!i.isBlock(n));return!0}return!1}function et(r,u,s){var h,a,k,c,v,y,b=r.nodeType;if(rt&&e.Immutables.immutable(r))o.push(rt.serialize(r));else if(1==b){if(h=i.name(r),y=n(r),y.hasClass("k-table-resize-handle-wrapper")||y.hasClass("k-column-resize-handle-wrapper")||y.hasClass("k-row-resize-handle-wrapper"))return;if(!h||i.insignificant(r))return;if(!f.scripts&&("script"==h||"k:script"==h))return;if(a=w[h],a&&(t===a.semantic||f.semantic^a.semantic))return a.start(r),g(r,!1,a.skipEncoding),a.end(r),t;o.push("<"),o.push(h),p(r),i.empty[h]?o.push(" />"):(o.push(">"),g(r,u||i.is(r,"pre")),o.push("</"),o.push(h),o.push(">"))}else if(3==b){if(ht(r))return o.push("&nbsp;"),t;c=ut(r),!u&&l&&(k=r.parentNode,v=r.previousSibling,v||(v=(i.isInline(k)?k:r).previousSibling),v&&""!==v.innerHTML&&!i.isBlock(v)||(c=c.replace(/^[\r\n\v\f\t ]+/,"")),c=c.replace(/ +/," ")),o.push(s?c:i.encode(c,f))}else 4==b?(o.push("<![CDATA["),o.push(r.data),o.push("]\]>")):8==b&&(r.data.indexOf("[CDATA[")<0?(o.push("<!--"),o.push(r.data),o.push("-->")):(o.push("<!"),o.push(r.data),o.push(">")))}function st(n){var t=n.childNodes.length,r=t&&3==n.firstChild.nodeType;return r&&(1==t||2==t&&i.insignificant(n.lastChild))}function it(){n.isFunction(f.custom)&&(o=f.custom(o)||o)}var o=[],rt=f&&f.immutables,w={iframe:{start:function(n){o.push("<iframe"),p(n),o.push(">")},end:function(){o.push("</iframe>")}},"k:script":{start:function(n){o.push("<script"),p(n),o.push(">")},end:function(){o.push("<\/script>")},skipEncoding:!0},span:{semantic:!0,start:function(t){var u,e,r=t.style,h=nt(t),f=tt(h);f.length&&(o.push("<span"),p(t,f),o.push(">")),"underline"==r.textDecoration&&o.push("<u>"),u=[],r.color&&u.push('color="'+i.toHex(r.color)+'"'),r.fontFamily&&u.push('face="'+r.fontFamily+'"'),r.fontSize&&(e=n.inArray(r.fontSize,s),u.push('size="'+e+'"')),u.length&&o.push("<font "+u.join(" ")+">")},end:function(n){var t=n.style;(t.color||t.fontFamily||t.fontSize)&&o.push("</font>"),"underline"==t.textDecoration&&o.push("</u>"),tt(nt(n)).length&&o.push("</span>")}},strong:{semantic:!0,start:function(){o.push("<b>")},end:function(){o.push("</b>")}},em:{semantic:!0,start:function(){o.push("<i>")},end:function(){o.push("</i>")}},b:{semantic:!1,start:function(){o.push("<strong>")},end:function(){o.push("</strong>")}},i:{semantic:!1,start:function(){o.push("<em>")},end:function(){o.push("</em>")}},u:{semantic:!1,start:function(){o.push('<span style="text-decoration:underline;">')},end:function(){o.push("</span>")}},font:{semantic:!1,start:function(n){var u,r,t;o.push('<span style="'),u=n.getAttribute("color"),r=s[n.getAttribute("size")],t=n.getAttribute("face"),u&&(o.push("color:"),o.push(i.toHex(u)),o.push(";")),t&&(o.push("font-family:"),o.push(t),o.push(";")),r&&(o.push("font-size:"),o.push(r),o.push(";")),o.push('">')},end:function(){o.push("</span>")}}};return w.script=w["k:script"],f=f||{},t===f.semantic&&(f.semantic=!0),st(r)?(o=i.encode(ut(r.firstChild).replace(/[\r\n\v\f\t ]+/," "),f),it(),o):(g(r),o=o.join(""),it(),""===o.replace(k,"").replace(b,"")?"":o)}},g(e,{Serializer:r})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/range.min",["editor/serializer.min"],n)}(function(){!function(n){function et(n,i,r,f){var e,h,o,s;if(n==i)return f-r;for(e=i;e&&e.parentNode!=n;)e=e.parentNode;if(e)return u(e)-r;for(e=n;e&&e.parentNode!=i;)e=e.parentNode;if(e)return f-u(e)-1;for(h=t.commonAncestor(n,i),o=n;o&&o.parentNode!=h;)o=o.parentNode;for(o||(o=h),s=i;s&&s.parentNode!=h;)s=s.parentNode;return s||(s=h),o==s?0:u(s)-u(o)}function tt(n,t){function i(n){try{return et(n.startContainer,n.endContainer,n.startOffset,n.endOffset)<0}catch(t){return!0}}i(n)&&(t?(n.commonAncestorContainer=n.endContainer=n.startContainer,n.endOffset=n.startOffset):(n.commonAncestorContainer=n.startContainer=n.endContainer,n.startOffset=n.endOffset),n.collapsed=!0)}function ut(n){n.collapsed=n.startContainer==n.endContainer&&n.startOffset==n.endOffset;for(var i=n.startContainer;i&&i!=n.endContainer&&!t.isAncestorOf(i,n.endContainer);)i=i.parentNode;n.commonAncestorContainer=i}function ot(n){var r=n.duplicate(),i=n.duplicate();return r.collapse(!0),i.collapse(!1),t.commonAncestor(n.parentElement(),r.parentElement(),i.parentElement())}function it(n,i,u){var s,e=i[u?"startContainer":"endContainer"],c=i[u?"startOffset":"endOffset"],l=0,a=r(e),v=a?e:e.childNodes[c]||null,o=a?e.parentNode:e,h=i.ownerDocument,f=h.body.createTextRange();3!=e.nodeType&&4!=e.nodeType||(l=c),o||(o=h.body),"img"==o.nodeName.toLowerCase()?(f.moveToElementText(o),f.collapse(!1),n.setEndPoint(u?"StartToStart":"EndToStart",f)):(s=o.insertBefore(t.create(h,"a"),v),f.moveToElementText(s),t.remove(s),f[u?"moveStart":"moveEnd"]("character",l),f.collapse(!1),n.setEndPoint(u?"StartToStart":"EndToStart",f))}function rt(n,i,f,e){var w,s,a,l,y,c,v,o=t.create(i.ownerDocument,"a"),h=n.duplicate(),b=e?"StartToStart":"StartToEnd",p=!1;o.innerHTML="﻿",h.collapse(e),s=h.parentElement(),t.isAncestorOrSelf(f,s)||(s=f);do p?s.insertBefore(o,o.previousSibling):(s.appendChild(o),p=!0),h.moveToElementText(o);while((w=h.compareEndPoints(b,n))>0&&o.previousSibling);a=o.nextSibling,w==-1&&r(a)?(h.setEndPoint(e?"EndToStart":"EndToEnd",n),t.remove(o),c=[a,h.text.length]):(l=!e&&o.previousSibling,y=e&&o.nextSibling,r(y)?c=[y,0]:r(l)?c=[l,l.length]:(v=u(o),c=s.nextSibling&&v==s.childNodes.length-1?[s.nextSibling,0]:[s,v]),t.remove(o)),i[e?"setStart":"setEnd"].apply(i,c)}var f,b,p,k,g,nt,d,c,i,a=window.kendo,o=a.Class,ft=n.extend,e=a.ui.editor,w=a.support.browser,t=e.Dom,u=t.findNodeIndex,r=t.isDataNode,l=t.findClosestAncestor,y=t.getNodeLength,h=t.normalize,v={selectionFromWindow:function(n){return"getSelection"in n?n.getSelection():new b(n.document)},selectionFromRange:function(n){var t=i.documentFromRange(n);return v.selectionFromDocument(t)},selectionFromDocument:function(n){return v.selectionFromWindow(t.windowFromDocument(n))}},s=o.extend({init:function(t){n.extend(this,{ownerDocument:t,startContainer:t,endContainer:t,commonAncestorContainer:t,startOffset:0,endOffset:0,collapsed:!0})},setStart:function(n,t){this.startContainer=n,this.startOffset=t,ut(this),tt(this,!0)},setEnd:function(n,t){this.endContainer=n,this.endOffset=t,ut(this),tt(this,!1)},setStartBefore:function(n){this.setStart(n.parentNode,u(n))},setStartAfter:function(n){this.setStart(n.parentNode,u(n)+1)},setEndBefore:function(n){this.setEnd(n.parentNode,u(n))},setEndAfter:function(n){this.setEnd(n.parentNode,u(n)+1)},selectNode:function(n){this.setStartBefore(n),this.setEndAfter(n)},selectNodeContents:function(n){this.setStart(n,0),this.setEnd(n,n[1===n.nodeType?"childNodes":"nodeValue"].length)},collapse:function(n){var t=this;n?t.setEnd(t.startContainer,t.startOffset):t.setStart(t.endContainer,t.endOffset)},deleteContents:function(){var n=this,i=n.cloneRange();n.startContainer!=n.commonAncestorContainer&&n.setStartAfter(l(n.commonAncestorContainer,n.startContainer)),n.collapse(!0),function t(n){for(;n.next();)n.hasPartialSubtree()?t(n.getSubtreeIterator()):n.remove()}(new f(i))},cloneContents:function(){var t=i.documentFromRange(this);return function n(i){for(var r,u=t.createDocumentFragment();r=i.next();)r=r.cloneNode(!i.hasPartialSubtree()),i.hasPartialSubtree()&&r.appendChild(n(i.getSubtreeIterator())),u.appendChild(r);return u}(new f(this))},extractContents:function(){var t,n=this,u=n.cloneRange();return n.startContainer!=n.commonAncestorContainer&&n.setStartAfter(l(n.commonAncestorContainer,n.startContainer)),n.collapse(!0),t=i.documentFromRange(n),function r(i){for(var u,f=t.createDocumentFragment();u=i.next();)i.hasPartialSubtree()?(u=u.cloneNode(!1),u.appendChild(r(i.getSubtreeIterator()))):i.remove(n.originalRange),f.appendChild(u);return f}(new f(u))},insertNode:function(n){var i=this;r(i.startContainer)?(i.startOffset!=i.startContainer.nodeValue.length&&t.splitDataNode(i.startContainer,i.startOffset),t.insertAfter(n,i.startContainer)):t.insertAt(i.startContainer,n,i.startOffset),i.setStart(i.startContainer,i.startOffset)},cloneRange:function(){return n.extend(new s(this.ownerDocument),{startContainer:this.startContainer,endContainer:this.endContainer,commonAncestorContainer:this.commonAncestorContainer,startOffset:this.startOffset,endOffset:this.endOffset,collapsed:this.collapsed,originalRange:this})},toString:function(){var t=this.startContainer.nodeName,n=this.endContainer.nodeName;return("#text"==t?this.startContainer.nodeValue:t)+"("+this.startOffset+") : "+("#text"==n?this.endContainer.nodeValue:n)+"("+this.endOffset+")"}});s.fromNode=function(n){return new s(n.ownerDocument)},f=o.extend({init:function(t){if(n.extend(this,{range:t,_current:null,_next:null,_end:null}),!t.collapsed){var i=t.commonAncestorContainer;this._next=t.startContainer!=i||r(t.startContainer)?l(i,t.startContainer):t.startContainer.childNodes[t.startOffset],this._end=t.endContainer!=i||r(t.endContainer)?l(i,t.endContainer).nextSibling:t.endContainer.childNodes[t.endOffset]}},hasNext:function(){return!!this._next},next:function(){var n=this,t=n._current=n._next;return n._next=n._current&&n._current.nextSibling!=n._end?n._current.nextSibling:null,r(n._current)&&(n.range.endContainer==n._current&&(t=t.cloneNode(!0),t.deleteData(n.range.endOffset,t.length-n.range.endOffset)),n.range.startContainer==n._current&&(t=t.cloneNode(!0),t.deleteData(0,n.range.startOffset))),t},traverse:function(n){function r(){return t._current=t._next,t._next=t._current&&t._current.nextSibling!=t._end?t._current.nextSibling:null,t._current}for(var i,t=this;i=r();)t.hasPartialSubtree()?t.getSubtreeIterator().traverse(n):n(i);return i},remove:function(n){var e,c,o,f,l,i=this,h=i.range.startContainer==i._current,s=i.range.endContainer==i._current;r(i._current)&&(h||s)?(e=h?i.range.startOffset:0,c=s?i.range.endOffset:i._current.length,o=c-e,n&&(h||s)&&(i._current==n.startContainer&&e<=n.startOffset&&(n.startOffset-=o),i._current==n.endContainer&&c<=n.endOffset&&(n.endOffset-=o)),i._current.deleteData(e,o)):(f=i._current.parentNode,!n||i.range.startContainer!=f&&i.range.endContainer!=f||(l=u(i._current),f==n.startContainer&&l<=n.startOffset&&(n.startOffset-=1),f==n.endContainer&&l<n.endOffset&&(n.endOffset-=1)),t.remove(i._current))},hasPartialSubtree:function(){return!r(this._current)&&(t.isAncestorOrSelf(this._current,this.range.startContainer)||t.isAncestorOrSelf(this._current,this.range.endContainer))},getSubtreeIterator:function(){return new f(this.getSubRange())},getSubRange:function(){var n=this,i=n.range.cloneRange();return i.selectNodeContents(n._current),t.isAncestorOrSelf(n._current,n.range.startContainer)&&i.setStart(n.range.startContainer,n.range.startOffset),t.isAncestorOrSelf(n._current,n.range.endContainer)&&i.setEnd(n.range.endContainer,n.range.endOffset),i}}),b=o.extend({init:function(n){this.ownerDocument=n,this.rangeCount=1},addRange:function(n){var t=this.ownerDocument.body.createTextRange();it(t,n,!1),it(t,n,!0),t.select()},removeAllRanges:function(){var n=this.ownerDocument.selection;"None"!=n.type&&n.empty()},getRangeAt:function(){var f,a,c,t,i,e,h,o,n=new s(this.ownerDocument),l=this.ownerDocument.selection;try{if(f=l.createRange(),a=f.item?f.item(0):f.parentElement(),a.ownerDocument!=this.ownerDocument)return n}catch(v){return n}if("Control"==l.type)n.selectNode(f.item(0));else if(c=ot(f),rt(f,n,c,!0),rt(f,n,c,!1),9==n.startContainer.nodeType&&n.setStart(n.endContainer,n.startOffset),9==n.endContainer.nodeType&&n.setEnd(n.startContainer,n.endOffset),0===f.compareEndPoints("StartToEnd",f)&&n.collapse(!1),t=n.startContainer,i=n.endContainer,e=this.ownerDocument.body,!(n.collapsed||0!==n.startOffset||n.endOffset!=y(n.endContainer)||t==i&&r(t)&&t.parentNode==e)){for(h=!1,o=!1;0===u(t)&&t==t.parentNode.firstChild&&t!=e;)t=t.parentNode,h=!0;for(;u(i)==y(i.parentNode)-1&&i==i.parentNode.lastChild&&i!=e;)i=i.parentNode,o=!0;t==e&&i==e&&h&&o&&(n.setStart(t,0),n.setEnd(i,y(e)))}return n}}),p=o.extend({init:function(n){this.enumerate=function(){function r(n){if(t.is(n,"img")||3==n.nodeType&&(!t.isEmptyspace(n)||"﻿"==n.nodeValue))i.push(n);else for(n=n.firstChild;n;)r(n),n=n.nextSibling}var i=[];return new f(n).traverse(r),i}}}),k=f.extend({hasPartialSubtree:function(){var n=e.Immutables&&e.Immutables.immutable;return n&&!n(this._current)&&f.fn.hasPartialSubtree.call(this)},getSubtreeIterator:function(){return new k(this.getSubRange())}}),g=o.extend({init:function(n){this.enumerate=function(){function u(n){if(i&&!i(n))if(t.is(n,"img")||3==n.nodeType&&(!t.isEmptyspace(n)||"﻿"==n.nodeValue))r.push(n);else for(n=n.firstChild;n;)u(n),n=n.nextSibling}var r=[],i=e.Immutables&&e.Immutables.immutable;return new k(n).traverse(u),r}}}),nt=o.extend({init:function(n,r,u){var f=this;f.range=n,f.rootNode=i.documentFromRange(n),f.body=r||f.getEditable(n),"body"!=t.name(f.body)&&(f.rootNode=f.body),f.startContainer=f.nodeToPath(n.startContainer),f.endContainer=f.nodeToPath(n.endContainer),f.startOffset=f.offset(n.startContainer,n.startOffset),f.endOffset=f.offset(n.endContainer,n.endOffset),f.immutables=u&&u.immutables,f.immutables&&(f.serializedImmutables=e.Immutables.removeImmutables(f.body)),f.html=f.body.innerHTML,f.immutables&&!f.serializedImmutables.empty&&e.Immutables.restoreImmutables(f.body,f.serializedImmutables)},index:function(n){for(var t,r=0,i=n.nodeType;n=n.previousSibling;)t=n.nodeType,3==t&&i==t||r++,i=t;return r},getEditable:function(n){for(var t=n.commonAncestorContainer;t&&(3==t.nodeType||t.attributes&&(!t.attributes.contentEditable||"false"==t.attributes.contentEditable.nodeValue.toLowerCase()));)t=t.parentNode;return t},restoreHtml:function(){var n=this;t.removeChildren(n.body),n.body.innerHTML=n.html,n.immutables&&!n.serializedImmutables.empty&&e.Immutables.restoreImmutables(n.body,n.serializedImmutables)},offset:function(n,t){if(3==n.nodeType)for(;(n=n.previousSibling)&&3==n.nodeType;)t+=n.nodeValue.length;return t},nodeToPath:function(n){for(var t=[];n!=this.rootNode;)t.push(this.index(n)),n=n.parentNode;return t},toRangePoint:function(n,t,i,r){for(var u=this.rootNode,e=i.length,f=r;e--;)u=u.childNodes[i[e]];for(;u&&3==u.nodeType&&u.nodeValue.length<f;)f-=u.nodeValue.length,u=u.nextSibling;u&&f>=0&&n[t?"setStart":"setEnd"](u,f)},toRange:function(){var n=this,t=n.range.cloneRange();return n.toRangePoint(t,!0,n.startContainer,n.startOffset),n.toRangePoint(t,!1,n.endContainer,n.endOffset),t}}),d=o.extend({init:function(){this.caret=null},addCaret:function(n){var u=this,r=u.caret=t.create(i.documentFromRange(n),"span",{className:"k-marker"});return n.insertNode(r),t.stripBomNode(r.previousSibling),t.stripBomNode(r.nextSibling),n.selectNode(r),r},removeCaret:function(n){var e,l,f,o,s=this,i=s.caret.previousSibling,c=0;i&&(c=r(i)?i.nodeValue.length:u(i)),e=s.caret.parentNode,l=i?u(i):0,t.remove(s.caret),h(e),f=e.childNodes[l],r(f)?n.setStart(f,c):f?(o=t.lastTextNode(f),o?n.setStart(o,o.nodeValue.length):n[i?"setStartAfter":"setStartBefore"](f)):(w.msie||e.innerHTML||(e.innerHTML='<br _moz_dirty="" />'),n.selectNodeContents(e)),n.collapse(!0)},add:function(n,r){var f,e,u=this,s=n.collapsed&&!i.isExpandable(n),o=i.documentFromRange(n);return r&&n.collapsed&&(u.addCaret(n),n=i.expand(n)),f=n.cloneRange(),f.collapse(!1),u.end=t.create(o,"span",{className:"k-marker"}),f.insertNode(u.end),f=n.cloneRange(),f.collapse(!0),u.start=u.end.cloneNode(!0),f.insertNode(u.start),u._removeDeadMarkers(u.start,u.end),s&&(e=o.createTextNode("﻿"),t.insertAfter(e.cloneNode(),u.start),t.insertBefore(e,u.end)),h(n.commonAncestorContainer),n.setStartBefore(u.start),n.setEndAfter(u.end),n},_removeDeadMarkers:function(n,i){n.previousSibling&&"﻿"==n.previousSibling.nodeValue&&t.remove(n.previousSibling),i.nextSibling&&"﻿"==i.nextSibling.nodeValue&&t.remove(i.nextSibling)},_normalizedIndex:function(n){for(var i=u(n),t=n;t.previousSibling;)3==t.nodeType&&3==t.previousSibling.nodeType&&i--,t=t.previousSibling;return i},remove:function(n){var v,p,b,o,a,e,s,l,c,w,y,f=this,i=f.start,u=f.end;for(h(n.commonAncestorContainer);!i.nextSibling&&i.parentNode;)i=i.parentNode;for(;!u.previousSibling&&u.parentNode;)u=u.parentNode;if(v=i.previousSibling&&3==i.previousSibling.nodeType&&i.nextSibling&&3==i.nextSibling.nodeType,p=u.previousSibling&&3==u.previousSibling.nodeType&&u.nextSibling&&3==u.nextSibling.nodeType,b=v&&p,i=i.nextSibling,u=u.previousSibling,o=!1,a=!1,i==f.end&&(a=!!f.start.previousSibling,i=u=f.start.previousSibling||f.end.nextSibling,o=!0),t.remove(f.start),t.remove(f.end),!i||!u)return n.selectNodeContents(n.commonAncestorContainer),void n.collapse(!0);if(e=o?r(i)?i.nodeValue.length:i.childNodes.length:0,s=r(u)?u.nodeValue.length:u.childNodes.length,3==i.nodeType)for(;i.previousSibling&&3==i.previousSibling.nodeType;)i=i.previousSibling,e+=i.nodeValue.length;if(3==u.nodeType)for(;u.previousSibling&&3==u.previousSibling.nodeType;)u=u.previousSibling,s+=u.nodeValue.length;l=i.parentNode,c=u.parentNode,w=this._normalizedIndex(i),y=this._normalizedIndex(u),h(l),3==i.nodeType&&(i=l.childNodes[w]),h(c),3==u.nodeType&&(u=c.childNodes[y]),o?(3==i.nodeType?n.setStart(i,e):n[a?"setStartAfter":"setStartBefore"](i),n.collapse(!0)):(3==i.nodeType?n.setStart(i,e):n.setStartBefore(i),3==u.nodeType?n.setEnd(u,s):n.setEndAfter(u)),f.caret&&f.removeCaret(n)}}),c=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/,i={nodes:function(n){var r=i.textNodes(n);return r.length||(n.selectNodeContents(n.commonAncestorContainer),r=i.textNodes(n),r.length||(r=t.significantChildNodes(n.commonAncestorContainer))),r},textNodes:function(n){return new p(n).enumerate()},editableTextNodes:function(n){var i=[],t=e.Immutables&&e.Immutables.immutableParent;return t&&!t(n.commonAncestorContainer)&&(i=new g(n).enumerate()),i},documentFromRange:function(n){var t=n.startContainer;return 9==t.nodeType?t:t.ownerDocument},createRange:function(n){return w.msie&&w.version<9?new s(n):n.createRange()},selectRange:function(n){var r,t=i.image(n);t&&(n.setStartAfter(t),n.setEndAfter(t)),r=v.selectionFromRange(n),r.removeAllRanges(),r.addRange(n)},stringify:function(n){return a.format("{0}:{1} - {2}:{3}",t.name(n.startContainer),n.startOffset,t.name(n.endContainer),n.endOffset)},split:function(n,i,r){function u(u){var f,e=n.cloneRange();e.collapse(u),e[u?"setStartBefore":"setEndAfter"](i),f=e.extractContents(),r&&(f=t.trim(f)),t[u?"insertBefore":"insertAfter"](f,i)}u(!0),u(!1)},mapAll:function(t,i){var r=[];return new f(t).traverse(function(t){var u=i(t);u&&n.inArray(u,r)<0&&r.push(u)}),r},getAll:function(n,r){var u=r;return"string"==typeof r&&(r=function(n){return t.is(n,u)}),i.mapAll(n,function(n){if(r(n))return n})},getMarkers:function(n){return i.getAll(n,function(n){return"k-marker"==n.className})},image:function(n){var t=i.getAll(n,"img");if(1==t.length)return t[0]},isStartOf:function(n,i){var r,u,f;if(0!==n.startOffset)return!1;for(r=n.cloneRange();0===r.startOffset&&r.startContainer!=i;){for(u=t.findNodeIndex(r.startContainer),f=r.startContainer.parentNode;u>0&&f[u-1]&&t.insignificant(f[u-1]);)u--;r.setStart(f,u)}return 0===r.startOffset&&r.startContainer==i},isEndOf:function(n,i){function o(n){t.insignificant(n)||e.push(n)}var u,e,r=n.cloneRange();return r.collapse(!1),u=r.startContainer,t.isDataNode(u)&&r.startOffset==t.getNodeLength(u)&&(r.setStart(u.parentNode,t.findNodeIndex(u)+1),r.collapse(!0)),r.setEnd(i,t.getNodeLength(i)),e=[],new f(r).traverse(o),!e.length},wrapSelectedElements:function(n){function u(n,i){var r,u=t.getNodeLength(i);if(n==u)return!0;for(r=n;r<u;r++)if(!t.insignificant(i.childNodes[r]))return!1;return!0}for(var r=t.editableParent(n.startContainer),i=t.editableParent(n.endContainer);0===n.startOffset&&n.startContainer!=r;)n.setStart(n.startContainer.parentNode,t.findNodeIndex(n.startContainer));for(;u(n.endOffset,n.endContainer)&&n.endContainer!=i;)n.setEnd(n.endContainer.parentNode,t.findNodeIndex(n.endContainer)+1);return n},expand:function(n){var f,e,u,i,t=n.cloneRange(),s=t.startContainer.childNodes[0===t.startOffset?0:t.startOffset-1],o=t.endContainer.childNodes[t.endOffset];return r(s)&&r(o)?(f=s.nodeValue,e=o.nodeValue,f&&e?(u=f.split("").reverse().join("").search(c),i=e.search(c),u&&i?(i=i==-1?e.length:i,u=u==-1?0:f.length-u,t.setStart(s,u),t.setEnd(o,i),t):t):t):t},isExpandable:function(n){var e,o,s,f,t,r,u=n.startContainer,h=i.documentFromRange(n);return u!=h&&u!=h.body&&(e=n.cloneRange(),!!(o=u.nodeValue)&&(s=o.substring(0,e.startOffset),f=o.substring(e.startOffset),t=0,r=0,s&&(t=s.split("").reverse().join("").search(c)),f&&(r=f.search(c)),t&&r))}},ft(e,{SelectionUtils:v,W3CRange:s,RangeIterator:f,W3CSelection:b,RangeEnumerator:p,RestorePoint:nt,Marker:d,RangeUtils:i})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/system.min",["editor/range.min"],n)}(function(){!function(n){function l(n,t){var r=n.selectionRestorePoint=new e(n.getRange(),n.body),i=new k(t,r);return i.editor=n,n.undoRedoStack.push(i),r}function fi(n,t){return t.startContainer===n&&t.endContainer===n&&0===t.startOffset&&t.endOffset==n.childNodes.length}function ni(n,t,i){for(var r=n?n[t]:null;r&&!i(r);)r=r[t];return r}var f=window.kendo,u=f.Class,i=f.ui.editor,a=i.EditorUtils,p=i.RangeUtils,b=a.registerTool,t=i.Dom,y=i.Tool,d=i.ToolTemplate,e=i.RestorePoint,c=i.Marker,o=f.support.browser,yt='<br class="k-br">',v=n.extend,pt=t.nodeTypes,kt="previousSibling",s=u.extend({init:function(n){this.options=n,this.restorePoint=new e(n.range,n.body,{immutables:n.immutables}),this.marker=new c,this.formatter=n.formatter},getRange:function(){return this.restorePoint.toRange()},lockRange:function(n){return this.marker.add(this.getRange(),n)},releaseRange:function(n){this.marker.remove(n),this.editor.selectRange(n)},undo:function(){var n=this.restorePoint;n.restoreHtml(),this.editor.selectRange(n.toRange())},redo:function(){this.exec()},createDialog:function(t,i){var r=this.editor;return n(t).appendTo(document.body).kendoWindow(v({},r.options.dialogOptions,i)).closest(".k-window").toggleClass("k-rtl",f.support.isRtl(r.wrapper)).end()},exec:function(){var n=this.lockRange(!0);this.formatter.editor=this.editor,this.formatter.toggle(n),this.releaseRange(n)},immutables:function(){return this.editor&&this.editor.options.immutables},expandImmutablesIn:function(n){this.immutables()&&(f.ui.editor.Immutables.expandImmutablesIn(n),this.restorePoint=new e(n,this.editor.body))}}),k=u.extend({init:function(n,t){this.body=n.body,this.startRestorePoint=n,this.endRestorePoint=t},redo:function(){t.removeChildren(this.body),this.body.innerHTML=this.endRestorePoint.html,this.editor.selectRange(this.endRestorePoint.toRange())},undo:function(){t.removeChildren(this.body),this.body.innerHTML=this.startRestorePoint.html,this.editor.selectRange(this.startRestorePoint.toRange())}}),at=s.extend({init:function(n){s.fn.init.call(this,n),this.managesUndoRedo=!0},exec:function(){var i,n=this.editor,t=this.options,u=t.range,r=n.body,o=new e(u,r),f=t.html||t.value||"";n.selectRange(u),n.clipboard.paste(f,t),t.postProcess&&t.postProcess(n,n.getRange()),i=new k(o,new e(n.getRange(),r)),i.editor=n,n.undoRedoStack.push(i),n.focus()}}),vt=y.extend({initialize:function(n,t){var r=t.editor,u=this.options,f=u.items?u.items:r.options.insertHtml;this._selectBox=new i.SelectBox(n,{dataSource:f,dataTextField:"text",dataValueField:"value",change:function(){y.exec(r,"insertHtml",this.value())},title:r.options.messages.insertHtml,highlightFirst:!1})},command:function(n){return new at(n)},update:function(n){var t=n.data("kendoSelectBox")||n.find("select").data("kendoSelectBox");t.close(),t.value(t.options.title)}}),h="td,th,caption",wt="table,tbody,thead,tfoot,tr",oi=wt+","+h,lt=function(t){return!t.collapsed&&n(t.commonAncestorContainer).is(wt)},ht=u.extend({remove:function(i){var e,a,u,f,l,r,o,v=this,s=new c;s.add(i,!1),e=p.getAll(i,function(t){return n(t).is(oi)}),a=p.documentFromRange(i),u=s.start,f=s.end,l=h.split(","),r=t.parentOfType(u,l),o=t.parentOfType(f,l),v._removeContent(u,r,!0),v._removeContent(f,o,!1),n(e).each(function(t,i){i=n(i),(i.is(h)?i:i.find(h)).each(function(n,t){t.innerHTML="&#65279;"})}),r&&!u.previousSibling&&t.insertBefore(a.createTextNode("﻿"),u),o&&!f.nextSibling&&t.insertAfter(a.createTextNode("﻿"),f),r?i.setStartBefore(u):e[0]&&(r=n(e[0]),r=r.is(h)?r:r.find(h).first(),r.length&&i.setStart(r.get(0),0)),i.collapse(!0),t.remove(u),t.remove(f)},_removeContent:function(i,r,u){if(r){var o,e=u?"nextSibling":"previousSibling",f=function(t){for(;t&&!t[e];)t=t.parentNode;return t&&n.contains(r,t)?t[e]:null};for(i=f(i);i;)o=f(i),t.remove(i),i=o}}}),bt=u.extend({init:function(n){this.editor=n},keydown:function(t){var r,s,y,a,f=this,u=f.editor,h=u.keyboard,p=h.isTypingKey(t),c=v(n.Event(),t);return f.editor.trigger("keydown",c),c.isDefaultPrevented()?(t.preventDefault(),!0):!(c.isDefaultPrevented()||!p||h.isTypingInProgress())&&(r=u.getRange(),s=u.body,f.startRestorePoint=new e(r,s),lt(r)&&(y=new ht(u),y.remove(r),u.selectRange(r)),o.webkit&&!r.collapsed&&fi(s,r)&&(s.innerHTML=""),u.immutables&&i.Immutables.immutablesContext(r)&&(a=new i.BackspaceHandler(u),a.deleteSelection(r)),h.startTyping(function(){f.endRestorePoint=l(u,f.startRestorePoint)}),!0)},keyup:function(n){var t=this.editor.keyboard;return this.editor.trigger("keyup",n),!!t.isTypingInProgress()&&(t.endTyping(),!0)}}),ei=u.extend({init:function(n){this.editor=n},_addCaret:function(n){var i=t.create(this.editor.document,"a");return t.insertAt(n,i,0),t.stripBomNode(i.previousSibling),t.stripBomNode(i.nextSibling),i},_restoreCaret:function(n){var i=this.editor.createRange();i.setStartAfter(n),i.collapse(!0),this.editor.selectRange(i),t.remove(n)},_handleDelete:function(n){var r,f,e=n.endContainer,u=t.closestEditableOfType(e,t.blockElements);return!(!u||!i.RangeUtils.isEndOf(n,u))&&(r=t.next(u),!(!r||"p"!=t.name(r))&&(f=this._addCaret(r),this._merge(u,r),this._restoreCaret(f),!0))},_cleanBomBefore:function(n){for(var i=n.startOffset,r=n.startContainer,u=r.nodeValue,t=0;i-t>=0&&"﻿"==u[i-t-1];)t++;t>0&&(r.deleteData(i-t,t),n.setStart(r,Math.max(0,i-t)),n.collapse(!0),this.editor.selectRange(n))},_handleBackspace:function(n){var c,v,o,a,r,f,l,y,p,h=n.startContainer,u=t.closestEditableOfType(h,["li"]),s=t.closestEditableOfType(h,"p,h1,h2,h3,h4,h5,h6".split(",")),e=this.editor;return t.isDataNode(h)&&this._cleanBomBefore(n),c=ni(s,kt,function(n){return!t.htmlIndentSpace(n)}),n.collapsed&&n.startOffset!==n.endOffset&&n.startOffset<0&&(n.startOffset=0,n.endOffset=0,e.selectRange(n)),s&&c&&i.RangeUtils.isStartOf(n,s)?(v=this._addCaret(s),this._merge(c,s),this._restoreCaret(v),!0):u&&i.RangeUtils.isStartOf(n,u)?(o=u.firstChild,o||(u.innerHTML=i.emptyElementContent,o=u.firstChild),a=new i.ListFormatter(t.name(u.parentNode),"p"),n.selectNodeContents(u),a.toggle(n),t.insignificant(o)?n.setStartBefore(o):n.setStart(o,0),e.selectRange(n),!0):(r=n,f=h.previousSibling,0===r.startOffset&&f&&"a"===f.nodeName.toLowerCase()&&(r=e.createRange(),r.setStart(f,f.childNodes.length),r.setEnd(f,f.childNodes.length)),l=t.closestEditableOfType(r.startContainer,["a"]),y=l&&i.RangeUtils.isEndOf(r,l),y&&(p=new i.UnlinkCommand({range:r,body:e.body,immutables:!!e.immutables}),e.execCommand(p),e._selectionChange()),!1)},_handleSelection:function(r){var l,u,f,h,e=r.commonAncestorContainer,s=t.closest(e,"table"),a=i.emptyElementContent,o=this.editor;return lt(r)?(l=new ht(o),l.remove(r),o.selectRange(r),!0):(u=new c,u.add(r,!1),o.immutables&&this._handleImmutables(u),this._surroundFullySelectedAnchor(u,r),r.setStartAfter(u.start),r.setEndBefore(u.end),f=r.startContainer,h=r.endContainer,r.deleteContents(),s&&""===n(s).text()&&(r.selectNode(s),r.deleteContents()),e=r.commonAncestorContainer,"p"===t.name(e)&&""===e.innerHTML&&(e.innerHTML=a,r.setStart(e,0)),this._join(f,h),t.insertAfter(o.document.createTextNode("﻿"),u.start),u.remove(r),f=r.startContainer,"tr"==t.name(f)&&(f=f.childNodes[Math.max(0,r.startOffset-1)],r.setStart(f,t.getNodeLength(f))),r.collapse(!0),o.selectRange(r),!0)},_handleImmutables:function(n){var f=i.Immutables.immutableParent,u=f(n.start),r=f(n.start);u&&t.insertBefore(n.start,u),r&&t.insertAfter(n.end,r),u&&t.remove(u),r&&r.parentNode&&t.remove(r)},_surroundFullySelectedAnchor:function(i,r){var e=i.start,u=n(e).closest("a").get(0),o=i.end,f=n(o).closest("a").get(0);u&&p.isStartOf(r,u)&&t.insertBefore(e,u),f&&p.isEndOf(r,f)&&t.insertAfter(o,f)},_root:function(n){for(;n&&n.parentNode&&"body"!=t.name(n.parentNode);)n=n.parentNode;return n},_join:function(n,i){n=this._root(n),i=this._root(i),n!=i&&t.is(i,"p")&&this._merge(n,i)},_merge:function(n,i){for(t.removeTrailingBreak(n);n&&i.firstChild;)1==n.nodeType?(n=t.list(n)?n.children[n.children.length-1]:n,n&&n.appendChild(i.firstChild)):n.nodeType===pt.TEXT_NODE?this._mergeWithTextNode(n,i.firstChild):n.parentNode.appendChild(i.firstChild);t.remove(i)},_mergeWithTextNode:function(n,i){n&&n.nodeType===pt.TEXT_NODE&&(n.nextSibling&&this._isCaret(n.nextSibling)?t.insertAfter(i,n.nextSibling):t.insertAfter(i,n))},_isCaret:function(t){return n(t).is("a")},keydown:function(n){var i,h,t=this.editor,r=t.getRange(),c=n.keyCode,s=f.keys,u=c===s.BACKSPACE,o=c==s.DELETE;t.immutables&&t.immutables.keydown(n,r)||(!u&&!o||r.collapsed?u?i="_handleBackspace":o&&(i="_handleDelete"):i="_handleSelection",i&&(h=new e(r,t.body),this[i](r)&&(n.preventDefault(),l(t,h))))},deleteSelection:function(n){this._handleSelection(n)},keyup:n.noop}),ri=u.extend({init:function(n){this.editor=n,this.systemCommandIsInProgress=!1},createUndoCommand:function(){this.startRestorePoint=this.endRestorePoint=l(this.editor,this.startRestorePoint)},changed:function(){return!!this.startRestorePoint&&this.startRestorePoint.html!=this.editor.body.innerHTML},keydown:function(n){var t=this,r=t.editor,i=r.keyboard;return i.isModifierKey(n)?(i.isTypingInProgress()&&i.endTyping(!0),t.startRestorePoint=new e(r.getRange(),r.body),!0):!!i.isSystem(n)&&(t.systemCommandIsInProgress=!0,t.changed()&&(t.systemCommandIsInProgress=!1,t.createUndoCommand()),!0)},keyup:function(){var n=this;return!(!n.systemCommandIsInProgress||!n.changed())&&(n.systemCommandIsInProgress=!1,n.createUndoCommand(),!0)}}),ii=u.extend({init:function(n){this.editor=n},keydown:function(n){!o.webkit||n.isDefaultPrevented()||!n.ctrlKey||65!=n.keyCode||n.altKey||n.shiftKey||(this.editor.options.immutables&&this._toSelectableImmutables(),this._selectEditorBody())},_selectEditorBody:function(){var n=this.editor,t=n.getRange();t.selectNodeContents(n.body),n.selectRange(t)},_toSelectableImmutables:function(){for(var s=this.editor,f=s.body,o=i.Immutables.immutable,e=t.emptyTextNode,r=f.firstChild,u=f.lastChild;e(r);)r=r.nextSibling;for(;e(u);)u=u.previousSibling;r&&o(r)&&n(yt).prependTo(f),u&&o(u)&&n(yt).appendTo(f)},keyup:n.noop}),ti=u.extend({init:function(n){this.handlers=n,this.typingInProgress=!1},isCharacter:function(n){return n>=48&&n<=90||n>=96&&n<=111||n>=186&&n<=192||n>=219&&n<=222||229==n},toolFromShortcut:function(t,i){var u,r,e=String.fromCharCode(i.keyCode),f=this._getShortcutModifier(i,navigator.platform);for(u in t)if(r=n.extend({ctrl:!1,alt:!1,shift:!1},t[u].options),(r.key==e||r.key==i.keyCode)&&r.ctrl==f&&r.alt==i.altKey&&r.shift==i.shiftKey)return u},_getShortcutModifier:function(n,t){var i=t.toUpperCase().indexOf("MAC")>=0;return i?n.metaKey:n.ctrlKey},toolsFromShortcut:function(t,i){var u,r,o,s=String.fromCharCode(i.keyCode),f=[],e=function(n){return n==s||n==i.keyCode||n==i.charCode};for(u in t)r=n.extend({ctrl:!1,alt:!1,shift:!1},t[u].options),o=n.isArray(r.key)?n.grep(r.key,e).length>0:e(r.key),o&&r.ctrl==i.ctrlKey&&r.alt==i.altKey&&r.shift==i.shiftKey&&f.push(t[u]);return f},isTypingKey:function(n){var t=n.keyCode;return this.isCharacter(t)&&!n.ctrlKey&&!n.altKey||32==t||13==t||8==t||46==t&&!n.shiftKey&&!n.ctrlKey&&!n.altKey},isModifierKey:function(n){var t=n.keyCode;return 17==t&&!n.shiftKey&&!n.altKey||16==t&&!n.ctrlKey&&!n.altKey||18==t&&!n.ctrlKey&&!n.shiftKey},isSystem:function(n){return 46==n.keyCode&&n.ctrlKey&&!n.altKey&&!n.shiftKey},startTyping:function(n){this.onEndTyping=n,this.typingInProgress=!0},stopTyping:function(){this.typingInProgress&&this.onEndTyping&&this.onEndTyping(),this.typingInProgress=!1},endTyping:function(t){var i=this;i.clearTimeout(),t?i.stopTyping():i.timeout=window.setTimeout(n.proxy(i.stopTyping,i),1e3)},isTypingInProgress:function(){return this.typingInProgress},clearTimeout:function(){window.clearTimeout(this.timeout)},notify:function(n,t){for(var r=this.handlers,i=0;i<r.length&&!r[i][t](n);i++);},keydown:function(n){this.notify(n,"keydown")},keyup:function(n){this.notify(n,"keyup")}}),ui=u.extend({init:function(n){this.editor=n;var t=n.options.pasteCleanup;this.cleaners=[new rt(t),new tt(t),new g(t),new nt(t),new st(t),new et(t),new w(t),new it(t)]},htmlToFragment:function(n){var f=this.editor,u=f.document,i=t.create(u,"div"),r=u.createDocumentFragment();for(i.innerHTML=n;i.firstChild;)r.appendChild(i.firstChild);return r},isBlock:function(n){return/<(div|p|ul|ol|table|h[1-6])/i.test(n)},_startModification:function(){var i,r,n=this.editor;if(!this._inProgress)return this._inProgress=!0,i=n.getRange(),r=new e(i,n.body),t.persistScrollTop(n.document),{range:i,restorePoint:r}},_endModification:function(n){l(this.editor,n.restorePoint),this.editor._selectionChange(),this._inProgress=!1},_contentModification:function(n,t){var i=this,u=i.editor,r=i._startModification();r&&(n.call(i,u,r.range),setTimeout(function(){t.call(i,u,r.range),i._endModification(r)}))},_removeBomNodes:function(n){for(var u=i.RangeUtils.textNodes(n),r=0;r<u.length;r++)u[r].nodeValue=t.stripBom(u[r].nodeValue)},_onBeforeCopy:function(n){var t=new c;t.add(n),this._removeBomNodes(n),t.remove(n),this.editor.selectRange(n)},oncopy:function(){this._onBeforeCopy(this.editor.getRange())},oncut:function(){this._onBeforeCopy(this.editor.getRange()),this._contentModification(n.noop,n.noop)},_fileToDataURL:function(t){var i=n.Deferred(),r=new FileReader;return t instanceof window.File||!t.getAsFile||(t=t.getAsFile()),r.onload=n.proxy(i.resolve,i),r.readAsDataURL(t),i.promise()},_triggerPaste:function(n,t){var i={html:n||""};i.html=i.html.replace(/\ufeff/g,""),this.editor.trigger("paste",i),this.paste(i.html,t||{})},_handleImagePaste:function(t){var u,i,r,e,f;if("FileReader"in window&&!(o.msie&&o.version>10)&&(u=t.clipboardData||t.originalEvent.clipboardData||window.clipboardData||{},i=u.items||u.files,i&&(r=n.grep(i,function(n){return/^image\//i.test(n.type)}),e=n.grep(i,function(n){return/^text\/html/i.test(n.type)}),!e.length&&r.length&&(f=this._startModification()))))return n.when.apply(n,n.map(r,this._fileToDataURL)).done(n.proxy(function(){var i=Array.prototype.slice.call(arguments),t=n.map(i,function(n){return'<img src="'+n.target.result+'" />'}).join("");this._triggerPaste(t),this._endModification(f)},this)),!0},onpaste:function(i){return this._handleImagePaste(i)?void i.preventDefault():(this.expandImmutablesIn(),void this._contentModification(function(r,u){var l,h,c,e=t.create(r.document,"div",{className:"k-paste-container",innerHTML:"﻿"}),s=f.support.browser,o=r.body;this._decoreateClipboardNode(e,o),o.appendChild(e),s.webkit&&this._moveToCaretPosition(e,u),s.msie&&s.version<11?(i.preventDefault(),l=r.createRange(),l.selectNodeContents(e),r.selectRange(l),h=r.document.body.createTextRange(),h.moveToElementText(e),n(o).unbind("paste"),h.execCommand("Paste"),n(o).bind("paste",n.proxy(this.onpaste,this))):(c=r.createRange(),c.selectNodeContents(e),r.selectRange(c)),u.deleteContents()},function(i,r){var u,f="";i.selectRange(r),u=n(i.body).children(".k-paste-container"),u.each(function(){var n=this.lastChild;n&&t.is(n,"br")&&t.remove(n),f+=this.innerHTML}),u.remove(),this._triggerPaste(f,{clean:!0})}))},_decoreateClipboardNode:function(t,i){var r,e,f,u;(o.msie||o.webkit)&&(t=n(t),t.css({borderWidth:"0px",width:"0px",height:"0px",overflow:"hidden",margin:"0",padding:"0"}),o.msie&&(r=n(i.ownerDocument.documentElement),t.css({fontVariant:"normal",fontWeight:"normal",lineSpacing:"normal",lineHeight:"normal",textDecoration:"none"}),e=r.css("color"),e&&t.css("color",e),f=r.css("fontFamily"),f&&t.css("fontFamily",f),u=r.css("fontSize"),u&&t.css("fontSize",u)))},_moveToCaretPosition:function(i,r){var o=this,s=o.editor.body,e=t.offset(i,s),u=o._caretOffset(r,s),h=u.left-e.left,c=u.top-e.top,f="translate("+h+"px,"+c+"px)";n(i).css({"-webkit-transform":f,transform:f})},_caretOffset:function(n,i){var s,o,c,f,e,l,h=this.editor,u=t.create(h.document,"span",{innerHTML:"﻿"}),r=n.startContainer;return n.collapsed?(o=t.isDataNode(r),o&&(t.isBom(r)||0===n.startOffset)?t.insertBefore(u,r):o&&n.startOffset===r.length?t.insertAfter(u,r):(n.insertNode(u),s=!0)):(r=r===i?r.childNodes[n.startOffset]:r,t.insertBefore(u,r)),c=t.offset(u,i),f=u.previousSibling,e=u.nextSibling,t.remove(u),s&&t.isDataNode(f)&&t.isDataNode(e)&&!t.isBom(f)&&!t.isBom(e)&&(l=f.length,e.data=f.data+e.data,n.setStart(e,l),t.remove(f),n.collapse(!0),h.selectRange(n)),c},expandImmutablesIn:function(n){var i,u,r,t=this.editor;t&&t.options.immutables&&(i=t.body,n=n||t.getRange(),f.ui.editor.Immutables.expandImmutablesIn(n),n.startContainer===i&&0===n.startOffset&&(u=i.ownerDocument,r=u.createTextNode("﻿"),i.insertBefore(r,i.childNodes[0]),n.setStartBefore(r)),t.selectRange(n))},splittableParent:function(n,i){var r,u;if(n)return t.closestEditableOfType(i,["p","ul","ol"])||i.parentNode;if(r=i.parentNode,u=i.ownerDocument.body,t.isInline(r))for(;r.parentNode!=u&&!t.isBlock(r.parentNode);)r=r.parentNode;return r},paste:function(r,u){var o,y,a,f,k,e,h,w,d,s,b,p,l=this.editor;if(this.expandImmutablesIn(),u=v({clean:!1,split:!0},u),!u.skipCleaners)for(o=0,y=this.cleaners.length;o<y;o++)this.cleaners[o].applicable(r)&&(r=this.cleaners[o].clean(r));if(u.clean&&(r=r.replace(/(<br>(\s|&nbsp;)*)+(<\/?(div|p|li|col|t))/gi,"$3"),r=r.replace(/<(a|span)[^>]*><\/\1>/gi,"")),r=r.replace(/^<li/i,"<ul><li").replace(/li>$/g,"li></ul>"),a=this.isBlock(r),l.focus(),f=l.getRange(),f.deleteContents(),f.startContainer==l.document&&f.selectNodeContents(l.body),k=new c,e=k.addCaret(f),h=this.splittableParent(a,e),w=!1,d=h!=l.body&&!t.is(h,"td"),u.split&&d&&(a||t.isInline(h))&&(f.selectNode(e),i.RangeUtils.split(f,h,!0),w=!0),s=this.htmlToFragment(r),s.firstChild&&"k-paste-container"===s.firstChild.className){for(b=[],o=0,y=s.childNodes.length;o<y;o++)b.push(s.childNodes[o].innerHTML);s=this.htmlToFragment(b.join("<br />"))}if(n(s.childNodes).filter("table").addClass("k-table").end().find("table").addClass("k-table"),f.insertNode(s),h=this.splittableParent(a,e),w){for(;e.parentNode!=h;)t.unwrap(e.parentNode);t.unwrap(e.parentNode)}t.normalize(f.commonAncestorContainer),e.style.display="inline",t.restoreScrollTop(l.document),t.scrollTo(e),k.removeCaret(f),p=f.commonAncestorContainer.parentNode,f.collapsed&&"tbody"==t.name(p)&&(f.setStartAfter(n(p).closest("table")[0]),f.collapse(!0)),l.selectRange(f)}}),r=u.extend({init:function(n){this.options=n||{},this.replacements=[]},clean:function(n,t){for(var f=this,r=t||f.replacements,i=0,u=r.length;i<u;i+=2)n=n.replace(r[i],r[i+1]);return n}}),rt=r.extend({init:function(n){r.fn.init.call(this,n),this.replacements=[/<(\/?)script([^>]*)>/i,"<$1telerik:script$2>"]},applicable:function(n){return!this.options.none&&/<script[^>]*>/i.test(n)}}),tt=r.extend({init:function(n){r.fn.init.call(this,n);var t=" ";this.replacements=[/<span\s+class="Apple-tab-span"[^>]*>\s*<\/span>/gi,t,/\t/gi,t,/&nbsp;&nbsp; &nbsp;/gi,t]},applicable:function(n){return/&nbsp;&nbsp; &nbsp;|class="?Apple-tab-span/i.test(n)}}),g=r.extend({init:function(n){r.fn.init.call(this,n),this.junkReplacements=[/<\?xml[^>]*>/gi,"",/<!--(.|\n)*?-->/g,"",/&quot;/g,"'",/<o:p>&nbsp;<\/o:p>/gi,"&nbsp;",/<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi,"",/<\/o>/g,""],this.replacements=this.junkReplacements.concat([/(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g,"$1",/<br><br>/g,"<BR><BR>",/<br>(?!\n)/g," ",/<table([^>]*)>(\s|&nbsp;)+<t/gi,"<table$1><t",/<tr[^>]*>(\s|&nbsp;)*<\/tr>/gi,"",/<tbody[^>]*>(\s|&nbsp;)*<\/tbody>/gi,"",/<table[^>]*>(\s|&nbsp;)*<\/table>/gi,"",/<BR><BR>/g,"<br>",/^\s*(&nbsp;)+/gi,"",/(&nbsp;|<br[^>]*>)+\s*$/gi,"",/mso-[^;"]*;?/gi,"",/<(\/?)b(\s[^>]*)?>/gi,"<$1strong$2>",/<(\/?)font(\s[^>]*)?>/gi,this.convertFontMatch,/<(\/?)i(\s[^>]*)?>/gi,"<$1em$2>",/style=(["|'])\s*\1/g,"",/(<br[^>]*>)?\n/g,function(n,t){return t?n:" "}])},convertFontMatch:function(n,t,i){var f=/face=['"]([^'"]+)['"]/i,u=f.exec(i),r=i&&u&&u[1];return t?"</span>":r?'<span style="font-family:'+r+'">':"<span>"},applicable:function(n){return/class="?Mso/i.test(n)||/style="[^"]*mso-/i.test(n)||/urn:schemas-microsoft-com:office/.test(n)},stripEmptyAnchors:function(n){return n.replace(/<a([^>]*)>\s*<\/a>/gi,function(n,t){return!t||t.indexOf("href")<0?"":n})},listType:function(n,i){var f,r=n.innerHTML,s=t.innerText(n),u=r.match(/^(?:<span [^>]*texhtml[^>]*>)?<span [^>]*(?:Symbol|Wingdings)[^>]*>([^<]+)/i),o=u&&u[1],h=/^[a-z\d]/i.test(o),e=function(n){return n.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")};return u&&(f=!0),r=r.replace(/<\/?\w+[^>]*>/g,"").replace(/&nbsp;/g," "),!f&&/^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(r)||f&&/^.\u00a0+/.test(r)||o&&!h&&i?{tag:"ul",style:this._guessUnorderedListStyle(e(s))}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)?{tag:"ol",style:this._guessOrderedListStyle(e(s))}:void 0},_convertToLi:function(n){var i;return 1==n.childNodes.length?i=n.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /,""):(t.remove(n.firstChild),3==n.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(n.firstChild.nodeValue)&&t.remove(n.firstChild),/^(&nbsp;|\s)+$/i.test(n.firstChild.innerHTML)&&t.remove(n.firstChild),i=n.innerHTML),t.remove(n),t.create(document,"li",{innerHTML:i})},_guessUnorderedListStyle:function(n){return/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(n)?null:/^o/.test(n)?"circle":"square"},_guessOrderedListStyle:function(n){var t=null;return/^\d/.test(n)||(t=(/^[a-z]/.test(n)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(n)?"roman":"alpha")),t},extractListLevels:function(n){var t=/style=['"]?[^'"]*?mso-list:\s?[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi;return n=n.replace(t,function(n,t,i){return f.format('data-list="{0}" data-level="{1}" {2}',t,i,n)})},lists:function(i){for(var y,w,v,u,l,r,f,p,b,h,a,k=n(i).find(t.blockElements.join(",")),c=-1,o={},e=i,s=0;s<k.length;s++)u=k[s],p=n(u).data(),b=p.list,y=t.name(u),"td"!=y&&(h=this.listType(u,p),l=h&&h.tag,l&&"p"==y?(r=parseFloat(u.style.marginLeft||0),void 0===w&&(w=r),a=l+b,o[r]||(o[r]={}),f=o[r][a],(r>c||!f)&&(f=t.create(document,l,{style:{listStyleType:h.style}}),e==i||r<=c?(v&&w!==r?v.appendChild(f):t.insertBefore(f,u),o[r]={}):(v=e,e.appendChild(f)),o[r][a]=f),e=this._convertToLi(u),f.appendChild(e),c=r):u.innerHTML?(c=-1,e=i):t.remove(u))},removeAttributes:function(n){for(var r=n.attributes,i=r.length;i--;)"colspan"!=t.name(r[i])&&n.removeAttributeNode(r[i])},createColGroup:function(t){var r=t.cells,u=n(t).closest("table"),i=u.children("colgroup");r.length<2||(i.length&&(r=i.children(),i[0].parentNode.removeChild(i[0])),i=n(n.map(r,function(n){var t=n.width;return t&&0!==parseInt(t,10)?f.format('<col style="width:{0}px;"/>',t):"<col />"}).join("")),i.is("colgroup")||(i=n("<colgroup/>").append(i)),i.prependTo(u))},convertHeaders:function(i){var r,u=i.cells,f=n.map(u,function(i){var r=n(i).children("p").children("strong")[0];if(r&&"strong"==t.name(r))return r});if(f.length==u.length){for(r=0;r<f.length;r++)t.unwrap(f[r]);for(n(i).closest("table").find("colgroup").after("<thead></thead>").end().find("thead").append(i),r=0;r<u.length;r++)t.changeTag(u[r],"th")}},removeParagraphs:function(i){for(var r,e,o,f,u=0;u<i.length;u++)for(this.removeAttributes(i[u]),o=n(i[u]),f=o.children("p"),r=0,e=f.length;r<e;r++)r<e-1&&t.insertAfter(t.create(document,"br"),f[r]),t.unwrap(f[r])},removeDefaultColors:function(n){for(var i=0;i<n.length;i++)/^\s*color:\s*[^;]*;?$/i.test(n[i].style.cssText)&&t.unwrap(n[i])},tables:function(t){for(var f,s,o,u,r=n(t).find("table"),e=this,i=0;i<r.length;i++){for(f=r[i].rows,o=s=f[0],u=1;u<f.length;u++)f[u].cells.length>o.cells.length&&(o=f[u]);e.createColGroup(o),e.convertHeaders(s),e.removeAttributes(r[i]),e.removeParagraphs(r.eq(i).find("td,th")),e.removeDefaultColors(r.eq(i).find("span"))}},headers:function(i){for(var u=n(i).find("p.MsoTitle"),r=0;r<u.length;r++)t.changeTag(u[r],"h1")},removeFormatting:function(t){n(t).find("*").each(function(){n(this).css({fontSize:"",fontFamily:""}),this.getAttribute("style")||this.style.cssText||this.removeAttribute("style")})},clean:function(n){var u,i=this,f=this.options;return f.none?(n=r.fn.clean.call(i,n,this.junkReplacements),n=i.stripEmptyAnchors(n)):(n=this.extractListLevels(n),n=r.fn.clean.call(i,n),n=i.stripEmptyAnchors(n),u=t.create(document,"div",{innerHTML:n}),i.headers(u),f.msConvertLists&&i.lists(u),i.tables(u),f.msAllFormatting&&i.removeFormatting(u),n=u.innerHTML.replace(/(<[^>]*)\s+class="?[^"\s>]*"?/gi,"$1")),n}}),nt=r.extend({init:function(n){r.fn.init.call(this,n),this.replacements=[/\s+class="Apple-style-span[^"]*"/gi,"",/<(div|p|h[1-6])\s+style="[^"]*"/gi,"<$1",/^<div>(.*)<\/div>$/,"$1"]},applicable:function(n){return/class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(n)}}),ot=r.extend({clean:function(n){var i=t.create(document,"div",{innerHTML:n});return i=this.cleanDom(i),i.innerHTML},cleanDom:function(n){return n}}),st=ot.extend({cleanDom:function(i){var r=this.collectTags();return n(i).find(r).each(function(){t.unwrap(this)}),i},collectTags:function(){if(this.options.span)return"span"},applicable:function(){return this.options.span}}),et=ot.extend({cleanDom:function(t){var i=this.collectAttr(),r=n(t).find("["+i.join("],[")+"]");return r.removeAttr(i.join(" ")),t},collectAttr:function(){return this.options.css?["class","style"]:[]},applicable:function(){return this.options.css}}),dt=function(){this.text="",this.add=function(n){this.text+=n}},ft=u.extend({init:function(n){this.separators=n||{text:" ",line:"<br/>"},this.lines=[],this.inlineBlockText=[],this.resetLine()},appendText:function(n){3===n.nodeType&&(n=n.nodeValue),this.textContainer.add(n)},appendInlineBlockText:function(n){this.inlineBlockText.push(n)},flashInlineBlockText:function(){this.inlineBlockText.length&&(this.appendText(this.inlineBlockText.join(" ")),this.inlineBlockText=[])},endLine:function(){this.flashInlineBlockText(),this.resetLine()},html:function(){var t,u,s,f,n,r,h,c,e=this.separators,i="",o=this.lines;for(this.flashInlineBlockText(),t=0,u=o.length,s=u-1;t<u;t++){for(f=o[t],n=0,r=f.length,h=r-1;n<r;n++)c=f[n].text,i+=c,n!==h&&(i+=e.text);t!==s&&(i+=e.line)}return i},resetLine:function(){this.textContainer=new dt,this.line=[],this.line.push(this.textContainer),this.lines.push(this.line)}}),gt=u.extend({init:function(n){this.callback=n},enumerate:function(n){var i,t;n&&(i=this.callback(n),t=n.firstChild,!i&&t&&this.enumerate(t),this.enumerate(n.nextSibling))}}),w=r.extend({init:function(t){r.fn.init.call(this,t),this.hasText=!1,this.enumerator=new gt(n.proxy(this.buildText,this))},clean:function(n){var i=t.create(document,"div",{innerHTML:n});return this.cleanDom(i)},cleanDom:function(n){return this.separators=this.getDefaultSeparators(),this.htmlLines=new ft(this.separators),this.enumerator.enumerate(n.firstChild),this.hasText=!1,this.htmlLines.html()},buildText:function(n){if(t.isDataNode(n)){if(t.isEmptyspace(n))return;this.htmlLines.appendText(n.nodeValue.replace("\n",this.separators.line)),this.hasText=!0}else if(t.isBlock(n)&&this.hasText){var i=this.actions[t.name(n)]||this.actions.block;return i(this,n)}},applicable:function(){var n=this.options;return n.all||n.keepNewLines},getDefaultSeparators:function(){return this.options.all?{text:" ",line:" "}:{text:" ",line:"<br/>"}},actions:{ul:n.noop,ol:n.noop,table:n.noop,thead:n.noop,tbody:n.noop,td:function(n,t){var r=new w({all:!0}),i=r.cleanDom(t);return n.htmlLines.appendInlineBlockText(i),!0},block:function(n){n.htmlLines.endLine()}}}),it=r.extend({clean:function(n){return this.options.custom(n)},applicable:function(){return"function"==typeof this.options.custom}}),ut=s.extend({init:function(n){s.fn.init.call(this,n),this.managesUndoRedo=!0},exec:function(){var n=this.editor;f.support.browser.msie?n.document.execCommand("print",!1,null):n.window.print&&n.window.print()}}),ct=s.extend({init:function(n){this.async=!0,s.fn.init.call(this,n)},exec:function(){var t=this,i=t.lockRange(!0),n=t.editor;n._destroyResizings(),n.saveAsPDF().then(function(){t.releaseRange(i),n._initializeColumnResizing(),n._initializeRowResizing(),n._initializeTableResizing()})}});v(i,{_finishUpdate:l,Command:s,GenericCommand:k,InsertHtmlCommand:at,InsertHtmlTool:vt,TypingHandler:bt,SystemHandler:ri,BackspaceHandler:ei,SelectAllHandler:ii,Keyboard:ti,Clipboard:ui,Cleaner:r,ScriptCleaner:rt,TabCleaner:tt,MSWordFormatCleaner:g,WebkitFormatCleaner:nt,HtmlTagsCleaner:st,HtmlAttrCleaner:et,HtmlContentCleaner:w,HtmlTextLines:ft,CustomCleaner:it,PrintCommand:ut,ExportPdfCommand:ct}),b("insertHtml",new vt({template:new d({template:a.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})})),b("print",new y({command:ut,template:new d({template:a.buttonTemplate,title:"Print"})})),b("pdf",new y({command:ct,template:new d({template:a.buttonTemplate,title:"Export PDF"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/inlineformat.min",["editor/system.min"],n)}(function(){!function(n){var e=window.kendo,it=e.Class,r=e.ui.editor,l=e.ui.Editor.fn.options.formats,i=r.EditorUtils,c=r.Tool,f=r.ToolTemplate,tt=r.FormatTool,t=r.Dom,w=r.RangeUtils,s=n.extend,u=r.EditorUtils.registerTool,h=r.EditorUtils.registerFormat,ut=function(n){n.preventDefault()},d="mousedown.kendoEditor",rt="keydown.kendoEditor",v="k-marker",a=it.extend({init:function(n){this.format=n},numberOfSiblings:function(n){for(var r=0,f=0,u=0,i=n.parentNode,t=i.firstChild;t;t=t.nextSibling)t!=n&&(t.className==v?u++:3==t.nodeType?r++:f++);return u>1&&i.firstChild.className==v&&i.lastChild.className==v?0:f+r},findSuitable:function(n,i){var r,u;if(!i&&this.numberOfSiblings(n)>0)return null;for(r=n.parentNode,u=this.format[0].tags;!t.ofType(r,u);){if(this.numberOfSiblings(r)>0)return null;r=r.parentNode}return r},findFormat:function(n){for(var i,e,u,f=this.format,o=t.attrEquals,r=0,s=f.length;r<s;r++){if(i=n,e=f[r].tags,u=f[r].attr,i&&t.ofType(i,e)&&o(i,u))return i;for(;i;)if(i=t.parentOfType(i,e),i&&o(i,u))return i}return null},isFormatted:function(n){for(var t=0,i=n.length;t<i;t++)if(this.findFormat(n[t]))return!0;return!1}}),p=it.extend({init:function(n,t){this.finder=new a(n),this.attributes=s({},n[0].attr,t),this.tag=n[0].tags[0]},wrap:function(n){return t.wrap(n,t.create(n.ownerDocument,this.tag,this.attributes))},activate:function(n,t){this.finder.isFormatted(t)?(this.split(n),this.remove(t)):this.apply(t)},toggle:function(n){var i=this.immutables()?w.editableTextNodes:w.textNodes,t=i(n);t.length>0&&this.activate(n,t)},immutables:function(){return this.editor&&this.editor.options.immutables},apply:function(n){for(var i,r,s=[],f=this.attributes,e=f?f.style||{}:{},u=0,o=n.length;u<o;u++){if(i=n[u],r=this.finder.findSuitable(i))t.is(r,"font")&&(e.color&&r.removeAttribute("color"),e.fontName&&r.removeAttribute("face"),e.fontSize&&r.removeAttribute("size")),t.attr(r,f);else{for(;!t.isBlock(i.parentNode)&&1==i.parentNode.childNodes.length&&"true"!==i.parentNode.contentEditable;)i=i.parentNode;r=this.wrap(i)}s.push(r)}this.consolidate(s)},remove:function(n){for(var i,r=0,u=n.length;r<u;r++)i=this.finder.findFormat(n[r]),i&&(this.attributes&&this.attributes.style?(t.unstyle(i,this.attributes.style),i.style.cssText||i.attributes["class"]||t.unwrap(i)):t.unwrap(i))},split:function(n){var t,i,u=w.textNodes(n),r=u.length;if(r>0)for(t=0;t<r;t++)i=this.finder.findFormat(u[t]),i&&w.split(n,i,!0)},consolidate:function(n){for(var i,r;n.length>1;)if(i=n.pop(),r=n[n.length-1],i.previousSibling&&i.previousSibling.className==v&&r.appendChild(i.previousSibling),i.tagName==r.tagName&&i.previousSibling==r&&i.style.cssText==r.style.cssText){for(;i.firstChild;)r.appendChild(i.firstChild);t.remove(i)}}}),y=a.extend({init:function(n,t){this.format=n,this.greedyProperty=t,a.fn.init.call(this,n)},getInlineCssValue:function(i){var f,y,r,v,w,a,l,u,p,e,s,c,o=i.attributes,h=n.trim;if(o)for(f=0,y=o.length;f<y;f++)if(r=o[f],v=r.nodeName,w=r.nodeValue,r.specified&&"style"==v)for(a=h(w||i.style.cssText).split(";"),u=0,p=a.length;u<p;u++)if(l=a[u],l.length){if(e=l.split(":"),s=h(e[0].toLowerCase()),c=h(e[1]),s!=this.greedyProperty)continue;return s.indexOf("color")>=0?t.toHex(c):c}},getFormatInner:function(i){for(var e,o=n(t.isDataNode(i)?i.parentNode:i),u=o.parentsUntil("[contentEditable]").addBack().toArray().reverse(),r=0,f=u.length;r<f;r++)if(e="className"==this.greedyProperty?u[r].className:this.getInlineCssValue(u[r]))return e;return"inherit"},getFormat:function(n){for(var i=this.getFormatInner(n[0]),t=1,r=n.length;t<r;t++)if(i!=this.getFormatInner(n[t]))return"";return i},isFormatted:function(n){return""!==this.getFormat(n)}}),k=p.extend({init:function(n,t,i){p.fn.init.call(this,n,t),this.values=t,this.finder=new y(n,i),i&&(this.greedyProperty=e.toCamelCase(i))},activate:function(n,t){var r=this.greedyProperty,i="apply";this.split(n),r&&"inherit"==this.values.style[r]&&(i="remove"),this[i](t)}}),o=tt.extend({init:function(n){tt.fn.init.call(this,s(n,{finder:new a(n.format),formatter:function(){return new p(n.format)}}))}}),nt=c.extend({update:function(n,t){var i=n.data(this.type);i.close(),i.value(this.finder.getFormat(t))}}),g=nt.extend({init:function(n){c.fn.init.call(this,n),this.type=e.support.browser.msie||e.support.touch?"kendoDropDownList":"kendoComboBox",this.format=[{tags:["span","font"]}],this.finder=new y(this.format,n.cssAttr)},command:function(n){var i=this.options,u=this.format,t={};return new r.FormatCommand(s(n,{formatter:function(){return t[i.domAttr]=n.value,new k(u,{style:t},i.cssAttr)}}))},initialize:function(n,t){var h,f,o,i=t.editor,r=this.options,u=r.name,s=[];r.defaultValue&&(s=[{text:i.options.messages[r.defaultValue[0].text],value:r.defaultValue[0].value}]),h=s.concat(r.items?r.items:i.options[u]||[]),n.attr({title:t.title}),n[this.type]({dataTextField:"text",dataValueField:"value",dataSource:h,change:function(){i._range=f,c.exec(i,u,this.value())},close:function(){setTimeout(function(){"_range"in i&&delete i._range},0)},highlightFirst:!1}),n.closest(".k-widget").removeClass("k-"+u).find("*").addBack().attr("unselectable","on"),o=n.data(this.type),o.value("inherit"),o.wrapper.on(d,".k-select,.k-input",function(){var n=i.getRange();f=i._containsRange(n)?n:f}).on(rt,function(n){n.keyCode===e.keys.ENTER&&n.preventDefault()})}}),b=c.extend({init:function(n){c.fn.init.call(this,n),this.format=[{tags:["span","font"]}],this.finder=new y(this.format,n.cssAttr)},options:{palette:"websafe"},update:function(){this._widget.close()},command:function(n){var i=this.options,u=this.format,t={};return new r.FormatCommand(s(n,{formatter:function(){return t[i.domAttr]=n.value,new k(u,{style:t},i.cssAttr)}}))},initialize:function(n,t){var u=t.editor,o=this.name,r=s({},b.fn.options,this.options),f=r.palette;n=this._widget=new e.ui.ColorPicker(n,{toolIcon:"k-icon k-i-"+i.getToolCssClass(r.name),palette:f,change:function(){var t=n.value();t&&c.exec(u,o,t),u.focus()},open:function(n){var t=n.sender;t.value(null),t._popup.element.on(d,ut)},close:function(n){n.sender._popup.element.off(d)},activate:function(t){t.preventDefault(),n.trigger("change")}}),n.wrapper.attr({title:t.title,unselectable:"on"}).find("*").attr("unselectable","on")}});s(r,{InlineFormatFinder:a,InlineFormatter:p,DelayedExecutionTool:nt,GreedyInlineFormatFinder:y,GreedyInlineFormatter:k,InlineFormatTool:o,FontTool:g,ColorTool:b}),h("bold",[{tags:["strong","b"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),u("bold",new o({key:"B",ctrl:!0,format:l.bold,template:new f({template:i.buttonTemplate,title:"Bold"})})),h("italic",[{tags:["em","i"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),u("italic",new o({key:"I",ctrl:!0,format:l.italic,template:new f({template:i.buttonTemplate,title:"Italic"})})),h("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}},{tags:["u"]}]),u("underline",new o({key:"U",ctrl:!0,format:l.underline,template:new f({template:i.buttonTemplate,title:"Underline"})})),h("strikethrough",[{tags:["del","strike"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),u("strikethrough",new o({format:l.strikethrough,template:new f({template:i.buttonTemplate,title:"Strikethrough"})})),h("superscript",[{tags:["sup"]}]),u("superscript",new o({format:l.superscript,template:new f({template:i.buttonTemplate,title:"Superscript"})})),h("subscript",[{tags:["sub"]}]),u("subscript",new o({format:l.subscript,template:new f({template:i.buttonTemplate,title:"Subscript"})})),u("foreColor",new b({cssAttr:"color",domAttr:"color",name:"foreColor",template:new f({template:i.colorPickerTemplate,title:"Color"})})),u("backColor",new b({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new f({template:i.colorPickerTemplate,title:"Background Color"})})),u("fontName",new g({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new f({template:i.comboBoxTemplate,title:"Font Name"})})),u("fontSize",new g({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new f({template:i.comboBoxTemplate,title:"Font Size"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/formatblock.min",["editor/inlineformat.min"],n)}(function(){!function(n){var f,y=window.kendo,v=y.Class,a=n.extend,i=y.ui.editor,c=y.ui.Editor.fn.options.formats,t=i.Dom,b=i.Command,e=i.ToolTemplate,w=i.FormatTool,r=i.EditorUtils,l=r.registerTool,h=r.registerFormat,p=i.RangeUtils,s=v.extend({init:function(n){this.format=n},contains:function(n,i){for(var u,r=0,f=i.length;r<f;r++)if(u=i[r],!u||!t.isAncestorOrSelf(n,u))return!1;return!0},findSuitable:function(i){for(var f,e,s=this.format,u=[],r=0,o=i.length;r<o;r++){for(e=s.length-1;e>=0&&!(f=t.ofType(i[r],s[e].tags)?i[r]:t.closestEditableOfType(i[r],s[e].tags));e--);if(!f||"true"===f.contentEditable)return[];n.inArray(f,u)<0&&u.push(f)}for(this._resolveListsItems(u),r=0,o=u.length;r<o;r++)if(this.contains(u[r],u))return[u[r]];return u},_resolveListsItems:function(n){for(var u,i,r=0;r<n.length;r++)u=n[r],i=t.is(u,"li")?u:t.wrapper(u),i=i&&t.list(i)?i.children[0]:i,t.is(i,"li")&&(u=n[r]=i)},findFormat:function(n){for(var r,f,s,e,o=this.format,a=t.editableParent(n),l=this.options&&this.options.immutables,c=i.Immutables,u=0,h=o.length;u<h;u++){if(r=n,f=o[u].tags,s=o[u].attr,l&&f&&"immutable"==f[0]&&(e=c.immutableParent(r),e&&t.attrEquals(e,s)))return r;for(;r&&t.isAncestorOf(a,r);){if(t.ofType(r,f)&&t.attrEquals(r,s))return r;r=r.parentNode}}return null},getFormat:function(n){var i,u,e=this,f=function(n){return e.findFormat(t.isDataNode(n)?n.parentNode:n)},r=f(n[0]);if(!r)return"";for(i=1,u=n.length;i<u;i++)if(r!=f(n[i]))return"";return r.nodeName.toLowerCase()},isFormatted:function(n){for(var t=0,i=n.length;t<i;t++)if(!this.findFormat(n[t]))return!1;return!0}}),o=v.extend({init:function(n,t){this.format=n,this.values=t,this.finder=new s(n)},wrap:function(n,i,r){var o,h,u,s,f,e=1==r.length?t.blockParentOrBody(r[0]):t.commonAncestor.apply(null,r);for(t.isInline(e)&&(e=t.blockParentOrBody(e)),o=t.significantChildNodes(e),h=t.findNodeIndex(o[0]),u=t.create(e.ownerDocument,n,i),s=0;s<o.length;s++)f=o[s],t.isBlock(f)?(t.attr(f,i),u.childNodes.length&&(t.insertBefore(u,f),u=u.cloneNode(!1)),h=t.findNodeIndex(f)+1):u.appendChild(f);u.firstChild&&t.insertAt(e,u,h)},apply:function(i){function h(n){return a({},n&&n.attr,y)}var e,s,l,v,o,u,f,c,y=this.values;if(this._handleImmutables(i,!0),s=t.filter("img",i),l=r.formatByName("img",this.format),v=h(l),n.each(s,function(){t.attr(this,v)}),s.length!=i.length)if(o=t.filter("img",i,!0),u=this.finder.findSuitable(o),u.length)for(f=0,c=u.length;f<c;f++)e=r.formatByName(t.name(u[f]),this.format),t.attr(u[f],h(e));else e=this.format[0],this.wrap(e.tags[0],h(e),o)},_handleImmutables:function(n,u){var o,s,h,f,e;if(this.immutables()&&(o=r.formatByName("immutable",this.format)))for(s=i.Immutables,h=n.length-1,f=h;f>=0;f--)e=s.immutableParent(n[f]),e&&(e!==n[f+1]&&(u?t.attr(e,o.attr):t.unstyle(e,o.attr.style)),n.splice(f,1))},immutables:function(){return this.editor&&this.editor.options.immutables},remove:function(n){var f,o,i,u,e;for(this._handleImmutables(n,!1),f=0,o=n.length;f<o;f++)i=this.finder.findFormat(n[f]),i&&(e=t.name(i),"div"!=e||i.getAttribute("class")?(u=r.formatByName(e,this.format),u.attr.style&&t.unstyle(i,u.attr.style),u.attr.className&&t.removeClass(i,u.attr.className)):t.unwrap(i))},toggle:function(n){var r=this,i=t.filterBy(p.nodes(n),t.htmlIndentSpace,!0);r.finder.isFormatted(i)?r.remove(i):r.apply(i)}}),k=v.extend({init:function(n,t){var i=this;i.format=n,i.values=t,i.finder=new s(n)},apply:function(n){var u,a,y,w,c,v,s,r,p,h,f=this.format,e=t.blockParents(n),l=f[0].tags[0];if(e.length)for(u=0,a=e.length;u<a;u++)r=e[u],p=this.immutables()&&i.Immutables.immutableParent(r),p||(s=t.name(r),"li"==s?(y=r.parentNode,w=new i.ListFormatter(y.nodeName.toLowerCase(),l),c=this.editor.createRange(),c.selectNode(e[u]),w.toggle(c)):l&&("td"==s||r.attributes.contentEditable)?new o(f,this.values).apply(r.childNodes):(v=t.changeTag(r,l),t.attr(v,f[0].attr)));else h=new o(f,this.values),h.editor=this.editor,h.apply(n)},toggle:function(n){var i=p.textNodes(n);i.length||(n.selectNodeContents(n.commonAncestorContainer),i=p.textNodes(n),i.length||(i=t.significantChildNodes(n.commonAncestorContainer))),this.apply(i)},immutables:function(){return this.editor&&this.editor.options.immutables}}),d=b.extend({init:function(n){n.formatter=n.formatter();var t=n.formatter.finder;t&&r.formatByName("immutable",t.format)&&t._initOptions({immutables:n.immutables}),b.fn.init.call(this,n)}}),u=w.extend({init:function(n){w.fn.init.call(this,a(n,{finder:new s(n.format),formatter:function(){return new o(n.format)}}))}});a(i,{BlockFormatFinder:s,BlockFormatter:o,GreedyBlockFormatter:k,FormatCommand:d,BlockFormatTool:u}),f=["ul","ol","li"],h("justifyLeft",[{tags:t.nonListBlockElements,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{float:"left",display:"",marginLeft:"",marginRight:""}}},{tags:["immutable"],attr:{style:{float:"left",display:"",marginLeft:"",marginRight:""}}},{tags:f,attr:{style:{textAlign:"left",listStylePosition:""}}}]),l("justifyLeft",new u({format:c.justifyLeft,template:new e({template:r.buttonTemplate,title:"Justify Left"})})),h("justifyCenter",[{tags:t.nonListBlockElements,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto",float:""}}},{tags:["immutable"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto",float:""}}},{tags:f,attr:{style:{textAlign:"center",listStylePosition:"inside"}}}]),l("justifyCenter",new u({format:c.justifyCenter,template:new e({template:r.buttonTemplate,title:"Justify Center"})})),h("justifyRight",[{tags:t.nonListBlockElements,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{float:"right",display:"",marginLeft:"",marginRight:""}}},{tags:["immutable"],attr:{style:{float:"right",display:"",marginLeft:"",marginRight:""}}},{tags:f,attr:{style:{textAlign:"right",listStylePosition:"inside"}}}]),l("justifyRight",new u({format:c.justifyRight,template:new e({template:r.buttonTemplate,title:"Justify Right"})})),h("justifyFull",[{tags:t.nonListBlockElements,attr:{style:{textAlign:"justify"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto",float:""}}},{tags:["immutable"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto",float:""}}},{tags:f,attr:{style:{textAlign:"justify",listStylePosition:""}}}]),l("justifyFull",new u({format:c.justifyFull,template:new e({template:r.buttonTemplate,title:"Justify Full"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/linebreak.min",["editor/formatblock.min"],n)}(function(){!function(n){var h=window.kendo,a=n.extend,i=h.ui.editor,t=i.Dom,f=i.Command,c=i.Tool,l=i.BlockFormatter,u=t.normalize,r=i.RangeUtils,s=i.EditorUtils.registerTool,e=f.extend({init:function(n){this.options=n,f.fn.init.call(this,n)},_insertMarker:function(n,i){var f,r=t.create(n,"a");return r.className="k-marker",i.insertNode(r),r.parentNode||(f=i.commonAncestorContainer,f.innerHTML="",f.appendChild(r)),u(r.parentNode),r},_moveFocus:function(n,i){if(t.isEmpty(i))n.setStartBefore(i);else{n.selectNodeContents(i);var u=r.textNodes(n)[0];if(!u){for(;i.childNodes.length&&!t.is(i.firstChild,"br");)i=i.firstChild;u=i}t.isEmpty(u)?n.setStartBefore(u):(t.emptyNode(u)&&(u.innerHTML="﻿"),n.setStartBefore(u.firstChild||u))}},shouldTrim:function(n){var u="p,h1,h2,h3,h4,h5,h6".split(","),r=t.parentOfType(n.startContainer,u),i=t.parentOfType(n.endContainer,u);return r&&!i||!r&&i},_blankAfter:function(n){for(;n&&(t.isMarker(n)||""===t.stripBom(n.nodeValue));)n=n.nextSibling;return!n},exec:function(){var v,c,e,h,o,f,a,b,nt,k,g,p,y,s=this.getRange(),w=r.documentFromRange(s),d=i.emptyElementContent;this.expandImmutablesIn(s),nt=this.shouldTrim(s),s.deleteContents(),o=this._insertMarker(w,s),t.stripBomNode(o.previousSibling),t.stripBomNode(o.nextSibling),f=t.closestEditableOfType(o,["li"]),a=t.closestEditableOfType(o,"h1,h2,h3,h4,h5,h6".split(",")),f?t.emptyNode(f)&&(h=t.create(w,"p"),t.next(f)&&(b=s.cloneRange(),b.selectNode(f),r.split(b,f.parentNode)),k=n("br",f),1==k.length&&k.remove(),g=f.parentNode,p=f.parentNode.children.length,y=p>1&&1==f.childNodes.length&&f.children[0],t.insertAfter(h,g),t.remove(1==p?f.parentNode:f),y&&y!==o?(h.appendChild(y),h.appendChild(o)):h.innerHTML=d,e=h):a&&this._blankAfter(o)&&(h=t.create(w,"p"),t.insertAfter(h,a),h.innerHTML=d,t.remove(o),e=h),e||(f||a||new l([{tags:["p"]}]).apply([o]),s.selectNode(o),v=t.parentOfType(o,[f?"li":a?t.name(a):"p"]),r.split(s,v,nt),c=v.previousSibling,t.is(c,"li")&&c.firstChild&&!t.is(c.firstChild,"br")&&(c=c.firstChild),e=v.nextSibling,this.clean(c),this.clean(e,{links:!0}),t.is(e,"li")&&e.firstChild&&!t.is(e.firstChild,"br")&&(e=e.firstChild),t.remove(v),u(c)),u(e),this._moveFocus(s,e),s.collapse(!0),t.scrollTo(e),r.selectRange(s)},clean:function(r,u){var f,e=r;if(r.firstChild&&t.is(r.firstChild,"br")&&t.remove(r.firstChild),t.isDataNode(r)&&!r.nodeValue&&(r=r.parentNode),r){for(f=!1;r.firstChild&&1==r.firstChild.nodeType;)f=f||t.significantNodes(r.childNodes).length>1,r=r.firstChild;if(t.isEmpty(r)||!/^\s*$/.test(r.innerHTML)||f||(n(e).find(".k-br").remove(),r.innerHTML=i.emptyElementContent),u&&u.links)for(;r!=e;){if(t.is(r,"a")&&t.emptyNode(r)){t.unwrap(r);break}r=r.parentNode}}}}),o=f.extend({init:function(n){this.options=n,f.fn.init.call(this,n)},exec:function(){var n,e,f,o,i=this.getRange();this.expandImmutablesIn(i),n=t.create(r.documentFromRange(i),"br"),f=h.support.browser,o=f.msie&&f.version<11,i.deleteContents(),i.insertNode(n),u(n.parentNode),o||n.nextSibling&&!t.isWhitespace(n.nextSibling)||(e=n.cloneNode(!0),e.className="k-br",t.insertAfter(e,n)),i.setStartAfter(n),i.collapse(!0),t.scrollTo(n.nextSibling||n),r.selectRange(i)}});a(i,{ParagraphCommand:e,NewLineCommand:o}),s("insertLineBreak",new c({key:13,shift:!0,command:o})),s("insertParagraph",new c({key:13,command:e}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/lists.min",["editor/linebreak.min"],n)}(function(){!function(n){var s=window.kendo,b=s.Class,o=n.extend,i=s.ui.editor,t=i.Dom,e=i.RangeUtils,y=i.EditorUtils,a=i.Command,v=i.ToolTemplate,w=i.FormatTool,p=i.BlockFormatFinder,u=e.textNodes,h=i.EditorUtils.registerTool,r=p.extend({init:function(n){this.tag=n;var t=this.tags=["ul"==n?"ol":"ul",n];p.fn.init.call(this,[{tags:t}])},isFormatted:function(n){for(var u,r=[],i=0;i<n.length;i++)u=this.findFormat(n[i]),u&&t.name(u)==this.tag&&r.push(u);if(r.length<1||r.length!=n.length)return!1;for(i=0;i<r.length&&r[i].parentNode==u.parentNode;i++)if(r[i]!=u)return!1;return!0},findSuitable:function(n){var i=this.findFormat(n[0]);return i&&t.name(i)==this.tag?i:null}}),l=b.extend({init:function(n,t){var i=this;i.finder=new r(n),i.tag=n,i.unwrapTag=t},isList:function(n){return t.list(n)},immutables:function(){return this.editor&&!!this.editor.options.immutables},wrap:function(r,u){for(var f,e=t.create(r.ownerDocument,"li"),s=this.immutables()?i.Immutables.immutable:n.noop,o=0;o<u.length;o++)if(f=u[o],t.is(f,"li"))r.appendChild(f);else if(this.isList(f))for(;f.firstChild;)r.appendChild(f.firstChild);else if(t.is(f,"td")){for(;f.firstChild;)e.appendChild(f.firstChild);r.appendChild(e),f.appendChild(r),r=r.cloneNode(!1),e=e.cloneNode(!1)}else e.appendChild(f),t.isBlock(f)&&(r.appendChild(e),s(f)||t.unwrap(f),e=e.cloneNode(!1));e.firstChild&&r.appendChild(e)},containsAny:function(n,i){for(var r=0;r<i.length;r++)if(t.isAncestorOrSelf(n,i[r]))return!0;return!1},suitable:function(n,i){if("k-marker"==n.className){var r=n.nextSibling;if(r&&t.isBlock(r)||(r=n.previousSibling,r&&t.isBlock(r)))return!1}return this.containsAny(n,i)||t.isInline(n)||3==n.nodeType},_parentLists:function(i){var r=t.closestEditable(i);return n(i).parentsUntil(r,"ul,ol")},split:function(n){var h,s,o,f,c,r,i=u(n);if(i.length)for(h=t.parentOfType(i[0],["li"]),s=t.parentOfType(i[i.length-1],["li"]),n.setStartBefore(h),n.setEndAfter(s),f=0,c=i.length;f<c;f++)r=this.finder.findFormat(i[f]),r&&(o=this._parentLists(r),o.length?e.split(n,o.last()[0],!0):e.split(n,r,!0))},merge:function(n,i){for(var r,u=i.previousSibling;u&&("k-marker"==u.className||3==u.nodeType&&t.isWhitespace(u));)u=u.previousSibling;if(u&&t.name(u)==n){for(;i.firstChild;)u.appendChild(i.firstChild);t.remove(i),i=u}for(r=i.nextSibling;r&&("k-marker"==r.className||3==r.nodeType&&t.isWhitespace(r));)r=r.nextSibling;if(r&&t.name(r)==n){for(;i.lastChild;)r.insertBefore(i.lastChild,r.firstChild);t.remove(i)}},breakable:function(n){return n!=n.ownerDocument.body&&!/table|tbody|tr|td/.test(t.name(n))&&!n.attributes.contentEditable},applyOnSection:function(i,u){function v(){s.push(this)}var e,l,o,a,c=this.tag,h=t.closestSplittableParent(u),s=[],f=this.finder.findSuitable(u);for(f||(f=new r("ul"==c?"ol":"ul").findSuitable(u)),/table|tbody/.test(t.name(h))?e=n.map(u,function(n){return t.parentOfType(n,["td"])}):(e=t.significantChildNodes(h),n.grep(e,t.isBlock).length&&(e=n.grep(e,n.proxy(function(n){return this.containsAny(n,u)},this))),e.length||(e=u)),l=0;l<e.length;l++)o=e[l],a=(!f||!t.isAncestorOrSelf(f,o))&&this.suitable(o,u),a&&(f&&this.isList(o)?(n.each(o.children,v),t.remove(o)):s.push(o));for(s.length==e.length&&this.breakable(h)&&(s=[h]),f||(f=t.create(h.ownerDocument,c),t.insertBefore(f,s[0])),this.wrap(f,s);t.isBom(f.nextSibling);)t.remove(f.nextSibling);t.is(f,c)||t.changeTag(f,c),this.merge(c,f)},apply:function(r){function c(){f&&o.push({section:f,nodes:s})}for(var f,s,h,e,u=0,o=[],a=r.length,l=this.immutables()?i.Immutables.immutableParent:n.noop,u=0;u<a;u++)e=l(r[u])||r[u],h=t.closestEditable(e,["td","body"]),f&&h==f?s.push(e):(c(),s=[e],f=h);for(c(),u=0;u<o.length;u++)this.applyOnSection(o[u].section,o[u].nodes)},unwrap:function(n){for(var e,i,f,u=n.ownerDocument.createDocumentFragment(),o=this.unwrapTag,r=n.firstChild;r;r=r.nextSibling){for(i=t.create(n.ownerDocument,o||"p");r.firstChild;)f=r.firstChild,t.isBlock(f)?(i.firstChild&&(u.appendChild(i),i=t.create(n.ownerDocument,o||"p")),u.appendChild(f)):i.appendChild(f);i.firstChild&&u.appendChild(i)}e=this._parentLists(n),e[0]?(t.insertAfter(u,e.last()[0]),e.last().remove()):t.insertAfter(u,n),t.remove(n)},remove:function(n){for(var i,t=0,r=n.length;t<r;t++)i=this.finder.findFormat(n[t]),i&&this.unwrap(i)},toggle:function(n){var f,r=this,i=u(n),e=n.commonAncestorContainer;i.length||(n.selectNodeContents(e),i=u(n),i.length||(f=e.ownerDocument.createTextNode(""),n.startContainer.appendChild(f),i=[f],n.selectNode(f.parentNode))),i=t.filterBy(i,t.htmlIndentSpace,!0),r.finder.isFormatted(i)?(r.split(n),r.remove(i)):r.apply(i)}}),c=a.extend({init:function(n){n.formatter=new l(n.tag),a.fn.init.call(this,n)}}),f=w.extend({init:function(n){this.options=n,w.fn.init.call(this,o(n,{finder:new r(n.tag)}))},command:function(n){return new c(o(n,{tag:this.options.tag}))}});o(i,{ListFormatFinder:r,ListFormatter:l,ListCommand:c,ListTool:f}),h("insertUnorderedList",new f({tag:"ul",template:new v({template:y.buttonTemplate,title:"Insert unordered list"})})),h("insertOrderedList",new f({tag:"ol",template:new v({template:y.buttonTemplate,title:"Insert ordered list"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/link.min",["editor/lists.min"],n)}(function(){!function(n,t){function et(n,t){for(var i=n.length;i--&&!t.test(n[i]););return i}function vt(n,t){var i=t.exec(n);return i?i.index:-1}var u=window.kendo,h=u.Class,ct=n.extend,c=n.proxy,r=u.ui.editor,i=r.Dom,o=r.RangeUtils,tt=r.EditorUtils,f=r.Command,e=r.Tool,d=r.ToolTemplate,ot=r.InlineFormatter,at=r.InlineFormatFinder,s=o.textNodes,ft=o.editableTextNodes,a=r.EditorUtils.registerTool,ut=u.keys,v="http://",ht=/^\w*:\/\//,lt=/[\w\/\$\-_\*\?]/i,st=h.extend({findSuitable:function(n){return i.parentOfType(n,["a"])}}),l=h.extend({init:function(){this.finder=new st},apply:function(n,t){var r,h,l,u,e,c,f,a=this.immutables?ft(n):s(n);if(t.innerHTML){for(h=o.documentFromRange(n),r=o.getMarkers(n),n.deleteContents(),u=i.create(h,"a",t),n.insertNode(u),e=u.parentNode,"a"==i.name(e)&&i.insertAfter(u,e),i.emptyNode(e)&&i.remove(e),c=u,f=0;f<r.length;f++)i.insertAfter(r[f],c),c=r[f];r.length&&(i.insertBefore(h.createTextNode("﻿"),r[1]),i.insertAfter(h.createTextNode("﻿"),r[1]),n.setStartBefore(r[0]),n.setEndAfter(r[r.length-1]))}else l=new ot([{tags:["a"]}],t),l.finder=this.finder,l.apply(a)}}),g=f.extend({init:function(n){var t=this;n.formatter={toggle:function(n){var i=t.immutables()?ft(n):s(n);new ot([{tags:["a"]}]).remove(i)}},this.options=n,f.fn.init.call(this,n)}}),b=f.extend({init:function(n){var t;this.options=n,f.fn.init.call(this,n),this.formatter=new l,n.url?this.exec=function(){this.formatter.immutables=t&&t.immutables(),this.formatter.apply(n.range,{href:n.url,innerHTML:n.text||n.url,target:n.target})}:(this.attributes=null,this.async=!0)},_dialogTemplate:function(){return u.template("<div class=\"k-editor-dialog k-popup-edit-form\"><div class=\"k-edit-form-container\"><div class='k-edit-label'><label for='k-editor-link-url'>#: messages.linkWebAddress #</label></div><div class='k-edit-field'><input type='text' class='k-input k-textbox' id='k-editor-link-url'></div><div class='k-edit-label k-editor-link-text-row'><label for='k-editor-link-text'>#: messages.linkText #</label></div><div class='k-edit-field k-editor-link-text-row'><input type='text' class='k-input k-textbox' id='k-editor-link-text'></div><div class='k-edit-label'><label for='k-editor-link-title'>#: messages.linkToolTip #</label></div><div class='k-edit-field'><input type='text' class='k-input k-textbox' id='k-editor-link-title'></div><div class='k-edit-label'></div><div class='k-edit-field'><input type='checkbox' class='k-checkbox' id='k-editor-link-target'><label for='k-editor-link-target' class='k-checkbox-label'>#: messages.linkOpenInNewWindow #</label></div><div class='k-edit-buttons k-state-default'><button class=\"k-dialog-insert k-button k-primary\">#: messages.dialogInsert #</button><button class=\"k-dialog-close k-button\">#: messages.dialogCancel #</button></div></div></div>")({messages:this.editor.options.messages})},exec:function(){var r,t,f,u,e=this.editor.options.messages;this._initialText="",this._range=this.lockRange(!0),this.formatter.immutables=this.immutables(),r=s(this._range),t=r.length?this.formatter.finder.findSuitable(r[0]):null,f=r.length&&"img"==i.name(r[0]),u=this.createDialog(this._dialogTemplate(),{title:e.createLink,close:c(this._close,this),visible:!1}),t&&(this._range.selectNodeContents(t),r=s(this._range)),this._initialText=this.linkText(r),u.find(".k-dialog-insert").click(c(this._apply,this)).end().find(".k-dialog-close").click(c(this._close,this)).end().find(".k-edit-field input").keydown(c(this._keydown,this)).end().find("#k-editor-link-url").val(this.linkUrl(t)).end().find("#k-editor-link-text").val(this._initialText).end().find("#k-editor-link-title").val(t?t.title:"").end().find("#k-editor-link-target").attr("checked",!!t&&"_blank"==t.target).end().find(".k-editor-link-text-row").toggle(!f),this._dialog=u.data("kendoWindow").center().open(),n("#k-editor-link-url",u).focus().select()},_keydown:function(n){var t=u.keys;n.keyCode==t.ENTER?this._apply(n):n.keyCode==t.ESC&&this._close(n)},_apply:function(t){var e,u,s,f=this._dialog.element,r=n("#k-editor-link-url",f).val(),o=n("#k-editor-link-text",f);r&&r!=v&&(r.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(r)&&(r="mailto:"+r),this.attributes={href:r},e=n("#k-editor-link-title",f).val(),e&&(this.attributes.title=e),o.is(":visible")&&(u=o.val(),u||this._initialText?u&&u!==this._initialText&&(this.attributes.innerHTML=i.stripBom(u)):this.attributes.innerHTML=r),s=n("#k-editor-link-target",f).is(":checked"),this.attributes.target=s?"_blank":null,this.formatter.apply(this._range,this.attributes)),this._close(t),this.change&&this.change()},_close:function(n){n.preventDefault(),this._dialog.destroy(),i.windowFromDocument(o.documentFromRange(this._range)).focus(),this.releaseRange(this._range)},linkUrl:function(n){return n?n.getAttribute("href",2):v},linkText:function(n){for(var r="",t=0;t<n.length;t++)r+=n[t].nodeValue;return i.stripBom(r||"")},redo:function(){var n=this.lockRange(!0);this.formatter.apply(n,this.attributes),this.releaseRange(n)}}),k=f.extend({init:function(n){f.fn.init.call(this,n),this.formatter=new l},exec:function(){var i,r,n,t=this.detectLink();t&&(i=this.getRange(),r=new u.ui.editor.Marker,n=i.cloneRange(),n.setStart(t.start.node,t.start.offset),n.setEnd(t.end.node,t.end.offset),i=this.lockRange(),r.add(n),this.formatter.apply(n,{href:this._ensureWebProtocol(t.text)}),r.remove(n),this.releaseRange(i))},detectLink:function(){var n=this.getRange(),r=new p({node:n.startContainer,offset:n.startOffset,cancelAtNode:function(n){return n&&"a"===i.name(n)}}),t=new rt(r);return t.detectLink()},changesContent:function(){return!!this.detectLink()},_ensureWebProtocol:function(n){var t=this._hasProtocolPrefix(n);return t?n:this._prefixWithWebProtocol(n)},_hasProtocolPrefix:function(n){return ht.test(n)},_prefixWithWebProtocol:function(n){return v+n}}),it=e.extend({init:function(t){this.options=t,this.finder=new at([{tags:["a"]}]),e.fn.init.call(this,n.extend(t,{command:g}))},initialize:function(n,t){e.fn.initialize.call(this,n,t),n.addClass("k-state-disabled")},update:function(n,t){n.toggleClass("k-state-disabled",!this.finder.isFormatted(t)).removeClass("k-state-hover")}}),rt=h.extend({init:function(n){this.traverser=n,this.start=w(),this.end=w(),this.text=""},detectLink:function(){var e,t,o,f,r=this.traverser.node,u=this.traverser.offset;if(i.isDataNode(r)){if(e=r.data.substring(0,u),/\s{2}$/.test(i.stripBom(e)))return}else 0===u&&(t=i.closestEditableOfType(r,i.blockElements),t&&t.previousSibling&&this.traverser.init({node:t.previousSibling}));return this.traverser.traverse(n.proxy(this._detectEnd,this)),this.end.blank()||(this.traverser=this.traverser.clone(this.end),this.traverser.traverse(n.proxy(this._detectStart,this)),this._isLinkDetected()||(o=this.traverser.extendOptions(this.start),f=new y(o),f.traverse(n.proxy(this._skipStartPuntuation,this)),this._isLinkDetected()||(this.start=w()))),this.start.blank()?null:{start:this.start,end:this.end,text:this.text}},_isLinkDetected:function(){return ht.test(this.text)||/^w{3}\./i.test(this.text)},_detectEnd:function(n,t){var i=et(n,lt);if(i>-1)return this.end.node=t,this.end.offset=i+1,!1},_detectStart:function(n,t){var r=et(n,/\s/),i=r+1;if(this.text=n.substring(i)+this.text,this.start.node=t,this.start.offset=i,r>-1)return!1},_skipStartPuntuation:function(n,t,i){var u=vt(n,/\w/),r=u;if(u===-1&&(r=n.length),this.text=this.text.substring(r),this.start.node=t,this.start.offset=r+(0|i),u>-1)return!1}}),w=function(){return{node:null,offset:null,blank:function(){return null===this.node&&null===this.offset}}},nt=h.extend({init:function(r){this.node=r.node,this.offset=r.offset===t?i.isDataNode(this.node)&&this.node.length||0:r.offset,this.cancelAtNode=r.cancelAtNode||this.cancelAtNode||n.noop},traverse:function(n){n&&(this.cancel=!1,this._traverse(n,this.node,this.offset))},_traverse:function(n,r,u){var o,s,f,e;if(r&&!this.cancel){if(3!==r.nodeType)return s=this.edgeNode(r),this.cancel=this.cancel||this.cancelAtNode(s),this._traverse(n,s);if(o=r.data,u!==t&&(o=this.subText(o,u)),this.cancel=n(o,r,u)===!1,f=this.next(r),!f)for(e=r.parentNode;!f&&i.isInline(e);)f=this.next(e),e=e.parentNode;this.cancel=this.cancel||this.cancelAtNode(f),this._traverse(n,f)}},extendOptions:function(t){return n.extend({node:this.node,offset:this.offset,cancelAtNode:this.cancelAtNode},t||{})},edgeNode:function(){},next:function(){},subText:function(){}}),p=nt.extend({subText:function(n,t){return n.substring(0,t)},next:function(n){return n.previousSibling},edgeNode:function(n){return n.lastChild},clone:function(n){var t=this.extendOptions(n);return new p(t)}}),y=nt.extend({subText:function(n,t){return n.substring(t)},next:function(n){return n.nextSibling},edgeNode:function(n){return n.firstChild},clone:function(n){var t=this.extendOptions(n);return new y(t)}});ct(u.ui.editor,{LinkFormatFinder:st,LinkFormatter:l,UnlinkCommand:g,LinkCommand:b,AutoLinkCommand:k,UnlinkTool:it,DomTextLinkDetection:rt,LeftDomTextTraverser:p,RightDomTextTraverser:y}),a("createLink",new e({key:"K",ctrl:!0,command:b,template:new d({template:tt.buttonTemplate,title:"Create Link"})})),a("unlink",new it({key:"K",ctrl:!0,shift:!0,template:new d({template:tt.buttonTemplate,title:"Remove Link"})})),a("autoLink",new e({key:[ut.ENTER,ut.SPACEBAR],keyPressCommand:!0,command:k}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/file.min",["kendo.filebrowser.min","editor/link.min"],n)}(function(){!function(n,t){var r=window.kendo,y=n.extend,i=r.ui.editor,a=i.EditorUtils,e=i.Dom,b=a.registerTool,v=i.ToolTemplate,u=i.RangeUtils,c=i.Command,p=i.LinkFormatter,w=u.textNodes,s=r.keys,f="#k-editor-file-url",h="#k-editor-file-text",o="#k-editor-file-title",l=c.extend({init:function(n){var t=this;c.fn.init.call(t,n),t.formatter=new p,t.async=!0,t.attributes={}},insertFile:function(n,t){var i=this.attributes,r=u.documentFromRange(t);if(i.href&&"http://"!=i.href){if(!n)return n=e.create(r,"a",{href:i.href}),n.innerHTML=i.innerHTML,n.title=i.title,t.deleteContents(),t.insertNode(n),n.nextSibling||e.insertAfter(r.createTextNode("﻿"),n),t.setStartAfter(n),t.setEndAfter(n),u.selectRange(t),!0;e.attr(n,i)}return!1},_dialogTemplate:function(n){return r.template('<div class="k-editor-dialog k-popup-edit-form"><div class="k-edit-form-container"># if (showBrowser) { #<div class="k-filebrowser"></div># } #<div class=\'k-edit-label\'><label for="k-editor-file-url">#: messages.fileWebAddress #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-url"></div><div class=\'k-edit-label\'><label for="k-editor-file-text">#: messages.fileText #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-text"></div><div class=\'k-edit-label\'><label for="k-editor-file-title">#: messages.fileTitle #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-title"></div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #</button><button class="k-dialog-close k-button">#: messages.dialogCancel #</button></div></div></div>')({messages:this.editor.options.messages,showBrowser:n})},redo:function(){var t=this,n=t.lockRange();this.formatter.apply(n,this.attributes),t.releaseRange(n)},exec:function(){function k(t){var r=c.element,e=r.find(f).val().replace(/ /g,"%20"),u=r.find(h).val(),s=r.find(o).val();n.attributes={href:e,innerHTML:""!==u?u:e,title:s},g=n.insertFile(i,l),p(t),n.change&&n.change()}function p(t){t.preventDefault(),c.destroy(),e.windowFromDocument(u.documentFromRange(l)).focus(),g||n.releaseRange(l)}function it(n){n.keyCode==s.ENTER?k(n):n.keyCode==s.ESC&&p(n)}var c,n=this,l=n.lockRange(),d=w(l),g=!1,i=d.length?this.formatter.finder.findSuitable(d[0]):null,nt=n.editor.options,tt=nt.messages,v=nt.fileBrowser,a=!!(r.ui.FileBrowser&&v&&v.transport&&v.transport.read!==t),b={title:tt.insertFile,visible:!1,resizable:a};this.expandImmutablesIn(l),b.close=p,a&&(b.width=750),c=this.createDialog(n._dialogTemplate(a),b).toggleClass("k-filebrowser-dialog",a).find(".k-dialog-insert").click(k).end().find(".k-dialog-close").click(p).end().find(".k-edit-field input").keydown(it).end().find(f).val(i?i.getAttribute("href",2):"http://").end().find(h).val(i?i.innerText:"").end().find(o).val(i?i.title:"").end().data("kendoWindow"),a&&(n._fileBrowser=new r.ui.FileBrowser(c.element.find(".k-filebrowser"),y({},v)),n._fileBrowser.bind("change",function(n){"f"===n.selected.get("type")&&c.element.find(f).val(this.value())}),n._fileBrowser.bind("apply",k)),c.center().open(),c.element.find(f).focus().select()}});r.ui.editor.FileCommand=l,b("insertFile",new i.Tool({command:l,template:new v({template:a.buttonTemplate,title:"Insert File"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/image.min",["kendo.imagebrowser.min","editor/link.min"],n)}(function(){!function(n,t){var r=window.kendo,p=n.extend,i=r.ui.editor,l=i.EditorUtils,f=i.Dom,w=l.registerTool,y=i.ToolTemplate,u=i.RangeUtils,v=i.Command,o=r.keys,e="#k-editor-image-url",c="#k-editor-image-title",h="#k-editor-image-width",s="#k-editor-image-height",a=v.extend({init:function(n){var t=this;v.fn.init.call(t,n),t.async=!0,t.attributes={}},insertImage:function(n,t){var r,i=this.attributes,e=u.documentFromRange(t);if(i.src&&"http://"!=i.src){if(r=function(){setTimeout(function(){i.width||n.removeAttribute("width"),i.height||n.removeAttribute("height"),n.removeAttribute("complete")})},!n)return n=f.create(e,"img",i),n.onload=n.onerror=r,t.deleteContents(),t.insertNode(n),n.nextSibling||f.insertAfter(e.createTextNode("﻿"),n),r(),t.setStartAfter(n),t.setEndAfter(n),u.selectRange(t),!0;n.onload=n.onerror=r,f.attr(n,i),r()}return!1},_dialogTemplate:function(n){return r.template('<div class="k-editor-dialog k-popup-edit-form"><div class="k-edit-form-container"># if (showBrowser) { #<div class="k-filebrowser k-imagebrowser"></div># } #<div class=\'k-edit-label\'><label for="k-editor-image-url">#: messages.imageWebAddress #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-url"></div><div class=\'k-edit-label\'><label for="k-editor-image-title">#: messages.imageAltText #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-title"></div><div class=\'k-edit-label\'><label for="k-editor-image-width">#: messages.imageWidth #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-width"></div><div class=\'k-edit-label\'><label for="k-editor-image-height">#: messages.imageHeight #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-height"></div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #</button><button class="k-dialog-close k-button">#: messages.dialogCancel #</button></div></div></div>')({messages:this.editor.options.messages,showBrowser:n})},redo:function(){var t=this,n=t.lockRange();t.insertImage(u.image(n),n)||t.releaseRange(n)},exec:function(){function k(t){var r=l.element,f=parseInt(r.find(h).val(),10),u=parseInt(r.find(s).val(),10);n.attributes={src:r.find(e).val().replace(/ /g,"%20"),alt:r.find(c).val()},n.attributes.width=null,n.attributes.height=null,!isNaN(f)&&f>0&&(n.attributes.width=f),!isNaN(u)&&u>0&&(n.attributes.height=u),g=n.insertImage(i,v),w(t),n.change&&n.change()}function w(t){t.preventDefault(),l.destroy(),f.windowFromDocument(u.documentFromRange(v)).focus(),g||n.releaseRange(v)}function nt(n){n.keyCode==o.ENTER?k(n):n.keyCode==o.ESC&&w(n)}var l,n=this,v=n.lockRange(),g=!1,i=u.image(v),tt=i&&i.getAttribute("width")||"",it=i&&i.getAttribute("height")||"",d=n.editor.options,rt=d.messages,y=d.imageBrowser,a=!!(r.ui.ImageBrowser&&y&&y.transport&&y.transport.read!==t),b={title:rt.insertImage,visible:!1,resizable:a};this.expandImmutablesIn(v),b.close=w,a&&(b.width=750),l=this.createDialog(n._dialogTemplate(a),b).toggleClass("k-filebrowser-dialog",a).find(".k-dialog-insert").click(k).end().find(".k-dialog-close").click(w).end().find(".k-edit-field input").keydown(nt).end().find(e).val(i?i.getAttribute("src",2):"http://").end().find(c).val(i?i.alt:"").end().find(h).val(tt).end().find(s).val(it).end().data("kendoWindow"),a&&(this._imageBrowser=new r.ui.ImageBrowser(l.element.find(".k-imagebrowser"),p({},y)),this._imageBrowser.bind("change",function(n){"f"===n.selected.get("type")&&l.element.find(e).val(this.value())}),this._imageBrowser.bind("apply",k)),l.center().open(),l.element.find(e).focus().select()}});r.ui.editor.ImageCommand=a,w("insertImage",new i.Tool({command:a,template:new y({template:l.buttonTemplate,title:"Insert Image"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/components.min",["editor/image.min"],n)}(function(){!function(n,t){var i=window.kendo,r=i.ui.DropDownList,f=i.ui.editor.Dom,u=r.extend({init:function(t,u){var f=this;r.fn.init.call(f,t,u),i.support.mobileOS.ios&&(this._initSelectOverlay(),this.bind("dataBound",n.proxy(this._initSelectOverlay,this))),f.text(f.options.title),f.bind("open",function(){if(f.options.autoSize){var n,t=f.list;t.css({whiteSpace:"nowrap",width:"auto"}),n=t.width(),n?n+=20:n=f._listWidth,t.css("width",n+i.support.scrollbar()),f._listWidth=n}})},options:{name:"SelectBox",index:-1},_initSelectOverlay:function(){for(var u,e,o,f=this,c=f.value(),h=this.dataSource.view(),t="",s=i.htmlEncode,r=0;r<h.length;r++)u=h[r],t+="<option value='"+s(u.value)+"'",u.value==c&&(t+=" selected"),t+=">"+s(u.text)+"</option>";e=n("<select class='k-select-overlay'>"+t+"</select>"),o=n(this.element).closest(".k-widget"),o.next(".k-select-overlay").remove(),e.insertAfter(o),e.on("change",function(){f.value(this.value),f.trigger("change")})},value:function(n){var i=this,u=r.fn.value.call(i,n);return n===t?u:(r.fn.value.call(i)||i.text(i.options.title),t)},decorate:function(t){var i,s,o,r,h=this,e=h.dataSource,u=e.data();for(t&&h.list.css("background-color",f.getEffectiveBackground(n(t))),i=0;i<u.length;i++)s=u[i].tag||"span",o=u[i].className,r=f.inlineStyle(t,s,{className:o}),r=r.replace(/"/g,"'"),u[i].style=r+";display:inline-block";e.trigger("change")}});i.ui.plugin(u),i.ui.editor.SelectBox=u}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/indent.min",["editor/components.min"],n)}(function(){!function(n,t){function u(r,u){var o="rtl"==n(r).css("direction"),e=o?"Right":"Left",f="td"!=i.name(r)?"margin"+e:"padding"+e;return u===t?r.style[f]||0:(u>0?r.style[f]=u+"px":(r.style[f]="",r.style.cssText||r.removeAttribute("style")),t)}var p=window.kendo,g=p.Class,b=n.extend,r=p.ui.editor,i=r.Dom,s=r.EditorUtils,y=s.registerTool,e=r.Command,f=r.Tool,w=r.ToolTemplate,v=r.RangeUtils,k=i.blockElements,c=r.BlockFormatFinder,d=r.BlockFormatter,o=g.extend({init:function(){this.finder=new c([{tags:i.blockElements}])},apply:function(t){var e,o,s,y,r,a,h,l,f,p,c,v;if(t=i.filterBy(t,i.htmlIndentSpace,!0),e=this.finder.findSuitable(t),o=[],e=this.mapImmutables(e),e.length){for(s=0,y=e.length;s<y;s++)i.is(e[s],"li")?n(e[s]).index()?n.inArray(e[s].parentNode,o)<0&&o.push(e[s]):o.push(e[s].parentNode):o.push(e[s]);for(;o.length;)if(r=o.shift(),i.is(r,"li"))if(a=r.parentNode,h=n(r).prev("li"),l=h.find("ul,ol").last(),f=n(r).children("ul,ol")[0],f&&h[0])l[0]?(l.append(r),l.append(n(f).children()),i.remove(f)):(h.append(f),f.insertBefore(r,f.firstChild));else for(f=h.children("ul,ol")[0],f||(f=i.create(r.ownerDocument,i.name(a)),h.append(f));r&&r.parentNode==a;)f.appendChild(r),r=o.shift();else for(p=parseInt(u(r),10)+30,u(r,p),c=0;c<o.length;c++)n.contains(r,o[c])&&o.splice(c,1)}else v=new d([{tags:["p"]}],{style:{marginLeft:30}}),v.apply(t)},mapImmutables:function(t){if(this.immutables){var i=[];return n.map(t,function(t){var u=r.Immutables.immutableParent(t);if(u){if(n.inArray(u,i)!==-1)return null;i.push(u)}return u||t})}return t},remove:function(t){t=i.filterBy(t,i.htmlIndentSpace,!0);for(var f,r,o,c,e,a,s=this.finder.findSuitable(t),s=this.mapImmutables(s),h=0,l=s.length;h<l;h++){if(e=n(s[h]),e.is("li")){if(r=e.parent(),o=r.parent(),o.is("li,ul,ol")&&!u(r[0])){if(f&&n.contains(f,o[0]))continue;c=e.nextAll("li"),c.length&&n(r[0].cloneNode(!1)).appendTo(e).append(c),o.is("li")?e.insertAfter(o):e.appendTo(o),r.children("li").length||r.remove();continue}if(f==r[0])continue;f=r[0]}else f=s[h];a=parseInt(u(f),10)-30,u(f,a)}}}),a=e.extend({init:function(t){var i=this;t.formatter={toggle:n.proxy(function(n){var t=new o;t.immutables=this.editor&&this.editor.options.immutables,t.apply(v.nodes(n))},i)},e.fn.init.call(this,t)}}),l=e.extend({init:function(t){var i=this;t.formatter={toggle:n.proxy(function(n){var t=new o;t.immutables=this.editor&&this.editor.options.immutables,t.remove(v.nodes(n))},i)},e.fn.init.call(this,t)}}),h=f.extend({init:function(n){f.fn.init.call(this,n),this.finder=new c([{tags:k}])},initialize:function(t,i){f.fn.initialize.call(this,t,i),n.extend(this.options,{immutables:i.editor&&i.editor.options.immutables}),t.addClass("k-state-disabled")},update:function(f,e){for(var h,l,o,c,a=this.finder.findSuitable(e),s=0,v=a.length;s<v;s++)if(o=a[s],this.options.immutables&&(c=r.Immutables.immutableParent(o),c&&(o=c)),h=u(o),h||(l=n(o).parents("ul,ol").length,h=i.is(o,"li")&&(l>1||u(o.parentNode))||i.ofType(o,["ul","ol"])&&l>0),h)return f.removeClass("k-state-disabled"),t;f.addClass("k-state-disabled").removeClass("k-state-hover")}});b(r,{IndentFormatter:o,IndentCommand:a,OutdentCommand:l,OutdentTool:h}),y("indent",new f({command:a,template:new w({template:s.buttonTemplate,title:"Indent"})})),y("outdent",new h({command:l,template:new w({template:s.buttonTemplate,title:"Outdent"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/viewhtml.min",["editor/indent.min"],n)}(function(){!function(n,t){var u=window.kendo,o=n.extend,i=u.ui.editor,s=i.EditorUtils,f=i.Command,h=i.Tool,e=i.ToolTemplate,r=f.extend({init:function(n){var t=this;t.options=n,f.fn.init.call(t,n),t.attributes=null,t.async=!0},exec:function(){function a(n){f.deserialization.immutables=i.immutables,i.value(e.find(o).val()),f.deserialization.immutables=t,s(n),h.change&&h.change(),i.trigger("change")}function s(n){n.preventDefault(),e.data("kendoWindow").destroy(),i.immutables&&(i.immutables.serializedImmutables={}),i.focus()}var l,h=this,i=h.editor,f=i.options,c=i.options.messages,e=n(u.template(r.template)(c)).appendTo(document.body),o=".k-editor-textarea";f.serialization.immutables=i.immutables,l=r.indent(i.value()),f.serialization.immutables=t,this.createDialog(e,{title:c.viewHtml,close:s,visible:!1}).find(o).val(l).end().find(".k-dialog-update").click(a).end().find(".k-dialog-close").click(s).end().data("kendoWindow").center().open(),e.find(o).focus()}});o(r,{template:"<div class='k-editor-dialog k-popup-edit-form k-viewhtml-dialog'><div class='k-edit-form-container'></div><textarea class='k-editor-textarea k-input'></textarea><div class='k-edit-buttons k-state-default'><button class='k-dialog-update k-button k-primary'>#: dialogUpdate #</button><button class='k-dialog-close k-button'>#: dialogCancel #</button></div></div></div>",indent:function(n){return n.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")}}),u.ui.editor.ViewHtmlCommand=r,i.EditorUtils.registerTool("viewHtml",new h({command:r,template:new e({template:s.buttonTemplate,title:"View HTML"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/formatting.min",["editor/viewhtml.min"],n)}(function(){!function(n){function a(n){var e,u,f=i.closestEditableOfType(n,["li"]);f&&(e=new t.ListFormatter(i.name(f.parentNode)),u=r.ui.editor.W3CRange.fromNode(n),u.selectNode(f),e.toggle(u))}var r=window.kendo,t=r.ui.editor,f=t.Tool,c=t.ToolTemplate,l=t.DelayedExecutionTool,v=t.Command,i=t.Dom,u=t.EditorUtils,o=t.RangeUtils,h=u.registerTool,s=l.extend({init:function(n){var t=this;f.fn.init.call(t,r.deepExtend({},t.options,n)),t.type="kendoSelectBox",t.finder={getFormat:function(){return""}}},options:{items:[{text:"Paragraph",value:"p"},{text:"Quotation",value:"blockquote"},{text:"Heading 1",value:"h1"},{text:"Heading 2",value:"h2"},{text:"Heading 3",value:"h3"},{text:"Heading 4",value:"h4"},{text:"Heading 5",value:"h5"},{text:"Heading 6",value:"h6"}],width:110},toFormattingItem:function(n){var i,t=n.value;return t?n.tag||n.className?n:(i=t.indexOf("."),0===i?n.className=t.substring(1):i==-1?n.tag=t:(n.tag=t.substring(0,i),n.className=t.substring(i+1)),n):n},command:function(r){var f=this,u=r.value;return u=this.toFormattingItem(u),new t.FormatCommand({range:r.range,formatter:function(){var r,o=(u.tag||u.context||"span").split(","),e=[{tags:o,attr:{className:u.className||""}}];return r=n.inArray(o[0],i.inlineElements)>=0?new t.GreedyInlineFormatter(e):new t.GreedyBlockFormatter(e),r.editor=f.editor,r}})},initialize:function(n,t){var u=t.editor,e=this.options,i=e.name,o=this;o.editor=u,n.width(e.width),n.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:e.items||u.options[i],title:u.options.messages[i],autoSize:!0,change:function(){var n=this.dataItem();n&&f.exec(u,i,n.toJSON())},dataBound:function(){for(var t=this.dataSource.data(),n=0;n<t.length;n++)t[n]=o.toFormattingItem(t[n])},highlightFirst:!1,template:r.template('<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#</span>')}),n.addClass("k-decorated").closest(".k-widget").removeClass("k-"+i).find("*").addBack().attr("unselectable","on")},getFormattingValue:function(t,i){for(var r,o,s,e,h,u,f=0;f<t.length;f++)if(r=t[f],o=r.tag||r.context||"",s=r.className?"."+r.className:"",e=o+s,h=n(i[0]).closest(e)[0]){if(1==i.length)return r.value;for(u=1;u<i.length&&n(i[u]).closest(e)[0];u++)if(u==i.length-1)return r.value}return""},update:function(t,r){var f,s,e,h,u,o=n(t).data(this.type);if(o&&(f=o.dataSource,s=f.data(),u=i.commonAncestor.apply(null,r),u==i.closestEditable(u)||this._ancestor!=u)){for(this._ancestor=u,e=0;e<s.length;e++)h=s[e].context,s[e].visible=!h||!!n(u).closest(h).length;f.filter([{field:"visible",operator:"eq",value:!0}]),l.fn.update.call(this,t,r),o.value(this.getFormattingValue(f.view(),r)),o.wrapper.toggleClass("k-state-disabled",!f.view().length)}},destroy:function(){this._ancestor=null}}),e=v.extend({exec:function(){var r,n,i,t=this.lockRange(!0);for(this.tagsToClean=this.options.remove||"strong,em,span,sup,sub,del,b,i,u,font".split(","),o.wrapSelectedElements(t),r=o.mapAll(t,function(n){return n}),n=r.length-1;n>=0;n--)i=r[n],this.immutableParent(i)||this.clean(i);this.releaseRange(t)},clean:function(r){var f,o,u,s,e;if(r&&!i.isMarker(r)){if(f=i.name(r),"ul"==f||"ol"==f)for(o=new t.ListFormatter(f),u=r.previousSibling,s=r.nextSibling,o.unwrap(r);u&&u!=s;u=u.nextSibling)this.clean(u);else if("blockquote"==f)i.changeTag(r,"p");else if(1!=r.nodeType||i.insignificant(r))a(r);else{for(e=r.childNodes.length-1;e>=0;e--)this.clean(r.childNodes[e]);r.removeAttribute("style"),r.removeAttribute("class")}n.inArray(f,this.tagsToClean)>-1&&i.unwrap(r)}},immutableParent:function(n){return this.immutables()&&t.Immutables.immutableParent(n)}});n.extend(t,{FormattingTool:s,CleanFormatCommand:e}),h("formatting",new s({template:new c({template:u.dropDownListTemplate,title:"Format"})})),h("cleanFormatting",new f({command:e,template:new c({template:u.buttonTemplate,title:"Clean formatting"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/toolbar.min",["editor/formatting.min"],n)}(function(){!function(n,t){var y,i=window.kendo,v=i.ui,c=v.editor,h=v.Widget,s=n.extend,o=n.proxy,r=i.keys,u=".kendoEditor",p=i.ui.editor.EditorUtils,b=i.ui.editor.ToolTemplate,d=i.ui.editor.Tool,l=i._outerWidth,k=i._outerHeight,f="overflowAnchor",e=".k-tool-group:visible a.k-tool:not(.k-state-disabled),.k-tool.k-overflow-anchor,.k-tool-group:visible .k-widget.k-colorpicker,.k-tool-group:visible .k-selectbox,.k-tool-group:visible .k-dropdown,.k-tool-group:visible .k-combobox .k-input",a={"k-i-sup-script":"superscript","k-i-sub-script":"subscript","k-i-align-left":"justifyLeft","k-i-align-center":"justifyCenter","k-i-align-right":"justifyRight","k-i-align-justify":"justifyFull","k-i-list-unordered":"insertUnorderedList","k-i-list-ordered":"insertOrderedList","k-i-login":"import","k-i-indent-increase":"indent","k-i-indent-decrease":"outdent","k-i-link-horizontal":"createLink","k-i-unlink-horizontal":"unlink","k-i-image":"insertImage","k-i-file-add":"insertFile","k-i-html":"viewHtml","k-i-foreground-color":"foreColor","k-i-paint":"backColor","k-i-table-insert":"createTable","k-i-table-column-insert-left":"addColumnLeft","k-i-table-column-insert-right":"addColumnRight","k-i-table-row-insert-above":"addRowAbove","k-i-table-row-insert-below":"addRowBelow","k-i-table-row-delete":"deleteRow","k-i-table-column-delete":"deleteColumn","k-i-table-properties":"tableWizard","k-i-table-wizard":"tableWizardInsert","k-i-clear-css":"cleanFormatting"},w=d.extend({initialize:function(t,i){t.attr({unselectable:"on"});var r=i.editor.toolbar;t.attr("aria-controls",i.editor.element.attr("id")).on("click",n.proxy(function(){this.overflowPopup.toggle()},r))},options:{name:f},command:n.noop,update:n.noop,destroy:n.noop});p.registerTool(f,new w({key:"",ctrl:!0,template:new b({template:p.overflowAnchorTemplate})})),y=h.extend({init:function(n,t){var r=this;t=s({},t,{name:"EditorToolbar"}),h.fn.init.call(r,n,t),t.popup&&r._initPopup(),t.resizable&&t.resizable.toolbar&&(r._resizeHandler=i.onResize(function(){r.resize()}),r.element.addClass("k-toolbar-resizable"))},events:["execute"],groups:{basic:["bold","italic","underline","strikethrough"],scripts:["subscript","superscript"],alignment:["justifyLeft","justifyCenter","justifyRight","justifyFull"],links:["insertImage","insertFile","createLink","unlink"],lists:["insertUnorderedList","insertOrderedList","indent","outdent"],tables:["createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"],advanced:["viewHtml","cleanFormatting","print","pdf","exportAs","import"],fonts:["fontName","fontSize"],colors:["foreColor","backColor"]},overflowFlaseTools:["formatting","fontName","fontSize","foreColor","backColor","insertHtml"],_initPopup:function(){var t=this;this.window=n(this.element).wrap("<div class='editorToolbarWindow k-header' />").parent().prepend("<button class='k-button k-bare k-editortoolbar-dragHandle'><span class='k-icon k-i-handler-drag' /></button>").kendoWindow({title:!1,resizable:!1,draggable:{dragHandle:".k-editortoolbar-dragHandle"},animation:{open:{effects:"fade:in"},close:{effects:"fade:out"}},minHeight:42,visible:!1,autoFocus:!1,actions:[],dragend:function(){this._moved=!0}}).on("mousedown",function(i){n(i.target).is(".k-icon")||(t.preventPopupHide=!0)}).on("focusout",function(){t.options.editor.element.focusout()}).data("kendoWindow")},_toggleOverflowStyles:function(n,t){n.find("li").toggleClass("k-item k-state-default",t).find(".k-tool:not(.k-state-disabled),.k-overflow-button").toggleClass("k-overflow-button k-button",t)},_initOverflowPopup:function(t){var i=this,r="<ul class='k-editor-overflow-popup k-overflow-container k-list-container'></ul>";i.overflowPopup=n(r).appendTo("body").kendoPopup({anchor:t,origin:"bottom right",position:"top right",copyAnchorStyles:!1,open:function(n){this.element.is(":empty")&&n.preventDefault(),i._toggleOverflowStyles(this.element,!0),t.attr("aria-expanded",!0)},close:function(){t.attr("aria-expanded",!1)},activate:o(i.focusOverflowPopup,i)}).data("kendoPopup")},items:function(){var t,n,i=this.options.resizable&&this.options.resizable.toolbar;return n=this.element.children().find("> *, select"),i&&(t=this.overflowPopup,n=n.add(t.element.children().find("> *"))),n},focused:function(){return this.element.find(".k-state-focused").length>0||this.preventPopupHide||this.overflowPopup&&this.overflowPopup.visible()},toolById:function(n){var t,i=this.tools;for(t in i)if(t.toLowerCase()==n)return i[t]},toolGroupFor:function(t){var i,r=this.groups;if(this.isCustomTool(t))return"custom";for(i in r)if(n.inArray(t,r[i])>=0)return i},bindTo:function(t){var i=this,u=i.window;i._editor&&i._editor.unbind("select",o(i.resize,i)),i._editor=t,i.options.resizable&&i.options.resizable.toolbar&&t.options.tools.push(f),i.tools=i.expandTools(t.options.tools),i.render(),i.element.find(".k-combobox .k-input").keydown(function(t){var u=n(this).closest(".k-combobox").data("kendoComboBox"),i=t.keyCode;i==r.RIGHT||i==r.LEFT?u.close():i==r.DOWN&&(u.dropDown.isOpened()||(t.stopImmediatePropagation(),u.open()))}),i._attachEvents(),i.items().each(function(){var e,u=i._toolName(this),r="moreVertical"!==u?i.tools[u]:i.tools.overflowAnchor,o=r&&r.options,s=t.options.messages,h=o&&o.tooltip||s[u],f=n(this);r&&r.initialize&&("fontSize"!=u&&"fontName"!=u||(e=s[u+"Inherit"],f.find("input").val(e).end().find("span.k-input").text(e).end()),r.initialize(f,{title:i._appendShortcutSequence(h,r),editor:i._editor}),f.closest(".k-widget",i.element).addClass("k-editor-widget"),f.closest(".k-colorpicker",i.element).next(".k-colorpicker").addClass("k-editor-widget"))}),t.bind("select",o(i.resize,i)),i.update(),u&&u.wrapper.css({top:"",left:"",width:""})},show:function(){var n,u,f,t=this,r=t.window,o=t.options.editor,e=i.support.browser;r&&(n=r.wrapper,u=o.element,n.is(":visible")&&t.window.options.visible||(n[0].style.width||n.width(l(u)-parseInt(n.css("border-left-width"),10)-parseInt(n.css("border-right-width"),10)),r._moved||(f=u.offset(),n.css({top:Math.max(0,parseInt(f.top,10)-k(n)-parseInt(t.window.element.css("padding-bottom"),10)),left:Math.max(0,parseInt(f.left,10))})),(e.msie||e.edge)&&t._overlaps(u)?setTimeout(function(){r.open()},0):r.open()))},_overlaps:function(n){var t=this.window.wrapper,f=t.offset(),e=f.left,o=f.top,i=n.offset(),r=i.left,u=i.top;return!(r+n.width()<e||r>e+t.width()||u+n.height()<o||u>o+t.height())},hide:function(){this.window&&this.window.close()},focus:function(){var t="tabIndex",i=this.element,n=this._editor.element.attr(t);i.attr(t,n||0).focus().find(e).first().focus(),n||0===n||i.removeAttr(t)},focusOverflowPopup:function(){var i="tabIndex",t=this.overflowPopup.element,n=this._editor.element.attr(i);t.closest(".k-animation-container").addClass("k-overflow-wrapper"),t.attr(i,n||0).find(e).first().focus(),n||0===n||t.removeAttr(i)},_appendShortcutSequence:function(n,t){if(!t.key)return n;var i=n+" (";return t.ctrl&&(i+="Ctrl + "),t.shift&&(i+="Shift + "),t.alt&&(i+="Alt + "),i+=t.key+")"},_nativeTools:["insertLineBreak","insertParagraph","redo","undo","autoLink"],tools:{},isCustomTool:function(n){return!(n in i.ui.Editor.defaultTools)},expandTools:function(t){for(var f,r,o,l=this._nativeTools,h=i.deepExtend({},i.ui.Editor.defaultTools),e={},u=0;u<t.length;u++)f=t[u],o=f.name,n.isPlainObject(f)?o&&h[o]?(e[o]=s({},h[o]),s(e[o].options,f)):(r=s({cssClass:"k-i-gear",type:"button",title:""},f),r.name||(r.name="custom"),r.cssClass="k-"+r.name,r.template||"button"!=r.type||(r.template=c.EditorUtils.buttonTemplate,r.title=r.title||r.tooltip),e[o]={options:r}):h[f]&&(e[f]=h[f]);for(u=0;u<l.length;u++)e[l[u]]||(e[l[u]]=h[l[u]]);return e},render:function(){function tt(t){var r;return t.getHtml?r=t.getHtml():(n.isFunction(t)||(t=i.template(t)),r=t(u)),n.trim(r)}function a(){e.children().length&&(nt&&(e.data("position",w),w++),e.appendTo(k))}function v(t){t!==f?(e=n("<li class='k-tool-group' role='presentation' />"),e.data("overflow",n.inArray(t,c)===-1)):e=n("<li class='k-overflow-tools' />")}var u,h,p,r,d,y,e,l,t=this,g=t.tools,it=t._editor.element,k=t.element.empty(),s=t._editor.options.tools,b=i.support.browser,w=0,nt=t.options.resizable&&t.options.resizable.toolbar,c=this.overflowFlaseTools;for(k.empty(),s.length&&(r=s[0].name||s[0]),v(r,c),l=0;l<s.length;l++)r=s[l].name||s[l],u=g[r]&&g[r].options,!u&&n.isPlainObject(r)&&(u=r),h=u&&u.template,"break"==r&&(a(),n("<li class='k-row-break' />").appendTo(t.element),v(r,c)),h&&(y=t.toolGroupFor(r),d==y&&r!=f||(a(),v(r,c),d=y),r==f&&(h.options.title=t.options.messages.overflowAnchor),h=tt(h),p=n(h).appendTo(e),"custom"==y&&(a(),v(r,c)),u.exec&&p.hasClass("k-tool")&&p.click(o(u.exec,it[0])));a(),n(t.element).children(":has(> .k-tool)").addClass("k-button-group"),t.options.popup&&b.msie&&b.version<9&&t.window.wrapper.find("*").attr("unselectable","on"),t.updateGroups(),nt&&t._initOverflowPopup(t.element.find(".k-overflow-anchor")),t.angular("compile",function(){return{elements:t.element}})},updateGroups:function(){n(this.element).children().each(function(){n(this).children().filter(function(){return!n(this).hasClass("k-state-disabled")}).removeClass("k-group-end").first().addClass("k-group-start").end().last().addClass("k-group-end").end()})},decorateFrom:function(t){this.items().filter(".k-decorated").each(function(){var i=n(this).data("kendoSelectBox");i&&i.decorate(t)})},destroy:function(){h.fn.destroy.call(this);var t,n=this.tools;for(t in n)n[t].destroy&&n[t].destroy();this.window&&this.window.destroy(),this._resizeHandler&&i.unbindResize(this._resizeHandler),this.overflowPopup&&this.overflowPopup.destroy()},_attachEvents:function(){var t=this,i=t.overflowPopup?t.overflowPopup.element:n([]);t.attachToolsEvents(t.element.add(i))},attachToolsEvents:function(t){var i=this,o="[role=button].k-tool",f=o+":not(.k-state-disabled)",c=o+".k-state-disabled",l=".k-dropdown",s=".k-colorpicker",h=[o,l,s].join(",");t.off(u).on("mouseenter"+u,f,function(){n(this).addClass("k-state-hover")}).on("mouseleave"+u,f,function(){n(this).removeClass("k-state-hover")}).on("mousedown"+u,h,function(n){n.preventDefault()}).on("keydown"+u,e,function(t){function s(n,t,i){var u=t.find(e),r=u.index(o)+n;return i&&(r=Math.max(0,Math.min(u.length-1,r))),u[r]}var f,h,o=this,c=i.options.resizable&&i.options.resizable.toolbar,u=t.keyCode;u==r.RIGHT||u==r.LEFT?n(o).hasClass(".k-dropdown")||(f=s(u==r.RIGHT?1:-1,i.element,!0)):!c||u!=r.UP&&u!=r.DOWN?u==r.ESC?(i.overflowPopup&&i.overflowPopup.visible()&&i.overflowPopup.close(),f=i._editor):u!=r.TAB||t.ctrlKey||t.altKey||(h=c&&n(o.parentElement).hasClass("k-overflow-tool-group")?i.overflowPopup.element:i.element,t.shiftKey?f=s(-1,h):(f=s(1,h),f||(f=i._editor))):f=s(u==r.DOWN?1:-1,i.overflowPopup.element,!0),f&&(t.preventDefault(),f.focus()),u===r.ENTER&&n(o).is("a")&&!n(o).attr("href")&&i._executeToolCommand(o,t)}).on("click"+u,f,function(n){i._executeToolCommand(this,n)}).on("click"+u,c,function(n){n.preventDefault()})},_executeToolCommand:function(t,i){var u=this,r=n(t);i.preventDefault(),i.stopPropagation(),r.removeClass("k-state-hover"),r.is("[data-popup]")||u._editor.exec(u._toolName(t))},_toolName:function(t){var u,f,r;if(t)return u=t.className,/k-tool\b/i.test(u)&&(u=t.firstChild.className),f=n.grep(u.split(" "),function(n){return!/^k-(widget|tool|tool-icon|icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(n)}),f[0]?(r=f[0],a[r]&&(r=a[r]),r.indexOf("k-i-")>=0?i.toCamelCase(r.substring(r.indexOf("k-i-")+4)):r.substring(r.lastIndexOf("-")+1)):"custom"},refreshTools:function(){var t=this,f=i.ui.editor,e=t._editor,u=e.getRange(),r=f.RangeUtils.textNodes(u),s=e.options.immutables,o=t._immutablesContext(u);r=f.Dom.filterBy(r,f.Dom.htmlIndentSpace,!0),r.length||(r=[u.startContainer]),t.items().each(function(){var u,i=t.tools[t._toolName(this)];i&&(u=n(this),i.update&&i.update(u,r),s&&t._updateImmutablesState(i,u,o))}),this.update()},_immutablesContext:function(n){if(this._editor.options.immutables){var t=i.ui.editor;return n.collapsed?t.Immutables.immutablesContext(n):0===t.RangeUtils.editableTextNodes(n).length}},_updateImmutablesState:function(i,r,u){var l,s,h,a,f,v=i.name,e=r,o=i.options.trackImmutables;if(o===t&&(o=n.inArray(v,c.Immutables.toolsToBeUpdated)>-1),o){if(l=u?"none":"",!r.is(".k-tool")){s=r.data();for(h in s)if(h.match(/^kendo[A-Z][a-zA-Z]*/)){a=s[h],e=a.wrapper;break}}e.css("display",l),f=e.closest("li"),0===f.children(":visible").length&&f.css("display",l)}},update:function(){this.updateGroups()},_resize:function(n){var i=n.width,r=this.options.resizable&&this.options.resizable.toolbar,t=this.overflowPopup;this.refreshTools(),r&&(t.visible()&&t.close(!0),this._refreshWidths(),this._shrink(i),this._stretch(i),this._toggleOverflowStyles(this.element,!1),this._toggleOverflowStyles(this.overflowPopup.element,!0),this.element.children("li.k-overflow-tools").css("visibility",t.element.is(":empty")?"hidden":"visible"))},_refreshWidths:function(){this.element.children("li").each(function(t,i){var r=n(i);r.data("outerWidth",l(r,!0))})},_shrink:function(n){var r,i,t;if(n<this._groupsWidth())for(i=this._visibleGroups().filter(":not(.k-overflow-tools)"),t=i.length-1;t>=0&&(r=i.eq(t),!(n>this._groupsWidth()));t--)this._hideGroup(r)},_stretch:function(n){var r,i,t;if(n>this._groupsWidth())for(i=this._hiddenGroups(),t=0;t<i.length&&(r=i.eq(t),!(n<this._groupsWidth())&&this._showGroup(r,n));t++);},_hiddenGroups:function(){var i=this.overflowPopup,t=this.element.children("li.k-tool-group").filter(":hidden");return t=t.add(i.element.children("li")),t.sort(function(t,i){return n(t).data("position")>n(i).data("position")?1:-1}),t},_visibleGroups:function(){return this.element.children("li.k-tool-group, li.k-overflow-tools").filter(":visible")},_groupsWidth:function(){var t=0;return this._visibleGroups().each(function(){t+=n(this).data("outerWidth")}),Math.ceil(t)},_hideGroup:function(n){if(n.data("overflow")){var t=this.overflowPopup;n.detach().prependTo(t.element).addClass("k-overflow-tool-group")}else n.hide()},_showGroup:function(t,i){var r,u;return!!(t.length&&i>this._groupsWidth()+t.data("outerWidth"))&&(t.hasClass("k-overflow-tool-group")?(r=t.data("position"),0===r?t.detach().prependTo(this.element):(u=this.element.children().filter(function(t,i){return n(i).data("position")===r-1}),t.detach().insertAfter(u)),t.removeClass("k-overflow-tool-group")):t.show(),!0)}}),n.extend(c,{Toolbar:y})}(window.jQuery||window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/tables.min",["editor/toolbar.min"],n)}(function(){!function(n){var u=window.kendo,it=n.extend,c=n.proxy,r=u.ui.editor,i=r.Dom,o=r.EditorUtils,rt=r.RangeUtils,a=r.Command,g="kendoEditor",d="k-state-active",y="k-state-selected",l=r.Tool,e=r.ToolTemplate,v=r.InsertHtmlCommand,ft=r.BlockFormatFinder,f=r.EditorUtils.registerTool,ut=u.getTouches,et=u.template,st="<td style='width:#=width#%;'>#=content#</td>",ot=new ft([{tags:["table"]}]),b=v.extend({init:function(t){var i=n.extend({postProcess:this.postProcess,skipCleaners:!0},t||{});v.fn.init.call(this,i)},_tableHtml:function(n,t){var u,i;return n=n||1,t=t||1,u=et(st)({width:100/t,content:r.emptyTableCellContent}),i=100/n,"<table class='k-table' data-last>"+Array(n+1).join("<tr style='height:"+i+"%;'>"+Array(t+1).join(u)+"</tr>")+"</table>"},postProcess:function(t,i){var r=n("table[data-last]",t.document).removeAttr("data-last");i.setStart(r.find("td")[0],0),i.collapse(!0),t.selectRange(i)},exec:function(){var n=this.options;n.html=this._tableHtml(n.rows,n.columns),v.fn.exec.call(this)}}),h=l.extend({initialize:function(t,i){var a,u,h,s;l.fn.initialize.call(this,t,i),a=n(this.options.popupTemplate).appendTo("body").kendoPopup({anchor:t,copyAnchorStyles:!1,open:c(this._open,this),activate:c(this._activate,this),close:c(this._close,this)}).data("kendoPopup"),t.click(c(this._toggle,this)).keydown(c(this._keydown,this)),u=this._editor=i.editor,this._popup=a,h=new r.TableWizardTool({template:new e({template:o.buttonTemplate,title:u.options.messages.tableWizard}),command:r.TableWizardCommand,insertNewTable:!0}),f("tableWizardInsert",h),s=n("<div class='k-editor-toolbar'>"+h.options.template.getHtml()+"</div>"),s.appendTo(a.element),u.toolbar&&u.toolbar.attachToolsEvents(s)},popup:function(){return this._popup},_activate:n.noop,_open:function(){this._popup.options.anchor.addClass(d)},_close:function(){this._popup.options.anchor.removeClass(d)},_keydown:function(n){var i=u.keys,t=n.keyCode;t==i.DOWN&&n.altKey?this._popup.open():t==i.ESC&&this._popup.close()},_toggle:function(t){var i=n(t.target).closest(".k-tool");i.hasClass("k-state-disabled")||this.popup().toggle()},update:function(n){var t=this.popup();t.wrapper&&"block"==t.wrapper.css("display")&&t.close(),n.removeClass("k-state-hover")},destroy:function(){this._popup.destroy()}}),nt=h.extend({init:function(t){this.cols=8,this.rows=6,h.fn.init.call(this,n.extend(t,{command:b,popupTemplate:"<div class='k-ct-popup'>"+Array(this.cols*this.rows+1).join("<span class='k-ct-cell k-state-disabled' />")+"<div class='k-status'></div></div>"}))},_activate:function(){function h(t){var r=n(window);return{row:Math.floor((t.clientY+r.scrollTop()-i.top)/c)+1,col:Math.floor((t.clientX+r.scrollLeft()-i.left)/s)+1}}var s,c,t=this,e=t._popup.element,o=e.find(".k-ct-cell"),v=o.eq(0),f=o.eq(o.length-1),i=u.getOffset(v),r=u.getOffset(f),a=t.cols,l=t.rows;e.find("*").addBack().attr("unselectable","on"),r.left+=f[0].offsetWidth,r.top+=f[0].offsetHeight,s=(r.left-i.left)/a,c=(r.top-i.top)/l,e.autoApplyNS(g).on("mousemove",function(n){t._setTableSize(h(n))}).on("mouseleave",function(){t._setTableSize()}).on("down",function(n){n.preventDefault();var i=ut(n)[0];t._exec(h(i.location))})},_valid:function(n){return n&&n.row>0&&n.col>0&&n.row<=this.rows&&n.col<=this.cols},_exec:function(n){this._valid(n)&&(this._editor.exec("createTable",{rows:n.row,columns:n.col}),this._popup.close())},_setTableSize:function(t){var e=this._popup.element,o=e.find(".k-status"),f=e.find(".k-ct-cell"),i=this.cols,r=this._editor.options.messages;this._valid(t)?(o.text(u.format(r.createTableHint,t.row,t.col)),f.each(function(r){n(this).toggleClass(y,r%i<t.col&&r/i<t.row)})):(o.text(r.createTable),f.removeClass(y))},_keydown:function(n){var r,i,c,s,f,e,t,o;h.fn._keydown.call(this,n),this._popup.visible()&&(r=u.keys,i=n.keyCode,c=this._popup.element.find(".k-ct-cell"),s=Math.max(c.filter(".k-state-selected").last().index(),0),f=Math.floor(s/this.cols),e=s%this.cols,t=!1,i!=r.DOWN||n.altKey?i==r.UP?(t=!0,f--):i==r.RIGHT?(t=!0,e++):i==r.LEFT&&(t=!0,e--):(t=!0,f++),o={row:Math.max(1,Math.min(this.rows,f+1)),col:Math.max(1,Math.min(this.cols,e+1))},i==r.ENTER?this._exec(o):this._setTableSize(o),t&&(n.preventDefault(),n.stopImmediatePropagation()))},_open:function(){var n=this._editor.options.messages;h.fn._open.call(this),this.popup().element.find(".k-status").text(n.createTable).end().find(".k-ct-cell").removeClass(y)},_close:function(){h.fn._close.call(this),this.popup().element.off("."+g)}}),k=a.extend({exec:function(){for(var o,n,f,u,e=this.lockRange(!0),t=e.endContainer;"td"!=i.name(t);)t=t.parentNode;if(!this.immutables()||!r.Immutables.immutableParent(t)){for(n=t.parentNode,o=n.children.length,f=n.cloneNode(!0),u=0;u<n.cells.length;u++)f.cells[u].innerHTML=r.emptyTableCellContent;"before"==this.options.position?i.insertBefore(f,n):i.insertAfter(f,n),this.releaseRange(e)}}}),p=a.extend({exec:function(){var o,t,u,n,s=this.lockRange(!0),f=i.closest(s.endContainer,"td"),c=i.closest(f,"table"),e=c.rows,h=this.options.position;if(!this.immutables()||!r.Immutables.immutableParent(f)){for(o=i.findNodeIndex(f,!0),t=0;t<e.length;t++)u=e[t].cells[o],n=u.cloneNode(),n.innerHTML=r.emptyTableCellContent,"before"==h?i.insertBefore(n,u):i.insertAfter(n,u);this.releaseRange(s)}}}),w=a.extend({exec:function(){var f,t,e,s=this.lockRange(),o=rt.mapAll(s,function(t){return n(t).closest("tr")[0]}),u=o[0];if(!this.immutables()||!r.Immutables.immutableParent(u)){if(f=i.closest(u,"table"),f.rows.length<=o.length)t=i.next(f),t&&!i.insignificant(t)||(t=i.prev(f)),i.remove(f);else for(e=0;e<o.length;e++)u=o[e],i.removeTextSiblings(u),t=i.next(u)||i.prev(u),t=t.cells[0],i.remove(u);t&&(s.setStart(t,0),s.collapse(!0),this.editor.selectRange(s))}}}),tt=a.extend({exec:function(){var n,f,e=this.lockRange(),t=i.closest(e.endContainer,"td"),u=i.closest(t,"table"),o=u.rows,h=i.findNodeIndex(t,!0),s=o[0].cells.length;if(!this.immutables()||!r.Immutables.immutableParent(t)){if(1==s)n=i.next(u),n&&!i.insignificant(n)||(n=i.prev(u)),i.remove(u);else for(i.removeTextSiblings(t),n=i.next(t)||i.prev(t),f=0;f<o.length;f++)i.remove(o[f].cells[h]);n&&(e.setStart(n,0),e.collapse(!0),this.editor.selectRange(e))}}}),s=l.extend({command:function(n){return n=it(n,this.options),"delete"==n.action?"row"==n.type?new w(n):new tt(n):"row"==n.type?new k(n):new p(n)},initialize:function(n,t){l.fn.initialize.call(this,n,t),n.addClass("k-state-disabled")},update:function(n,t){var i=!ot.isFormatted(t);n.toggleClass("k-state-disabled",i)}});it(u.ui.editor,{PopupTool:h,TableCommand:b,InsertTableTool:nt,TableModificationTool:s,InsertRowCommand:k,InsertColumnCommand:p,DeleteRowCommand:w,DeleteColumnCommand:tt}),f("createTable",new nt({template:new e({template:o.buttonTemplate,popup:!0,title:"Create table"})})),f("addColumnLeft",new s({type:"column",position:"before",template:new e({template:o.buttonTemplate,title:"Add column on the left"})})),f("addColumnRight",new s({type:"column",template:new e({template:o.buttonTemplate,title:"Add column on the right"})})),f("addRowAbove",new s({type:"row",position:"before",template:new e({template:o.buttonTemplate,title:"Add row above"})})),f("addRowBelow",new s({type:"row",template:new e({template:o.buttonTemplate,title:"Add row below"})})),f("deleteRow",new s({type:"row",action:"delete",template:new e({template:o.buttonTemplate,title:"Delete row"})})),f("deleteColumn",new s({type:"column",action:"delete",template:new e({template:o.buttonTemplate,title:"Delete column"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/export.min",["editor/main.min"],n)}(function(){!function(n){var r=window.kendo,c=n.extend,l=n.proxy,i=r.ui.editor,o=i.EditorUtils,f=i.Command,u=i.Tool,a=o.registerTool,v=i.ToolTemplate,s=[{text:"Docx",value:"docx"},{text:"Rtf",value:"rtf"},{text:"Pdf",value:"pdf"},{text:"Html",value:"html"},{text:"Plain Text",value:"txt"}],h=f.extend({init:function(n){var t=this;t.options=n,f.fn.init.call(t,n),t.attributes=null,t.exportType=n.exportType},exec:function(){var n=this,t=this.lockRange(!0);n.postToProxy(),n.releaseRange(t)},postToProxy:function(){this.generateForm().appendTo("body").submit().remove()},generateForm:function(){var t=this,r=t.editor.options.exportAs,i=n("<form>").attr({action:r&&r.proxyURL||"",method:"POST"});return i.append([t.valueInput(),t.exportTypeInput(),t.fileNameInput()]),i},valueInput:function(){var t=this.editor;return n("<input>").attr({value:t.encodedValue(),name:"value",type:"hidden"})},exportTypeInput:function(){var t=this;return n("<input>").attr({value:t.exportType,name:"exportType",type:"hidden"})},fileNameInput:function(){var i=this.editor,t=i.options.exportAs,r=t&&t.fileName||i.element.attr("id")||"editor";return n("<input>").attr({value:r,name:"fileName",type:"hidden"})}}),e=u.extend({init:function(n){var t=this;u.fn.init.call(t,r.deepExtend({},t.options,n)),t.type="kendoSelectBox"},options:{items:s,width:115},command:function(n){var t=n.value;return new i.ExportAsCommand({range:n.range,exportType:t.exportType})},initialize:function(n,t){var i=this,e=t.editor,f=i.options,u=f.name,s=l(i.changeHandler,i),o=f.items||e.options[u];o.unshift({text:e.options.messages[u],value:""}),i.editor=e,n.width(f.width),n.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:o,autoSize:!0,change:s,open:function(n){var t=n.sender;t.items()[0].style.display="none",t.unbind("open")},highlightFirst:!1,template:r.template('<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#</span>')}),n.addClass("k-decorated").closest(".k-widget").removeClass("k-"+u).find("*").addBack().attr("unselectable","on")},changeHandler:function(n){var i=n.sender,t=i.dataItem(),r=t&&t.value;this._exec(r),i.value("")},_exec:function(n){n&&u.exec(this.editor,this.options.name,{exportType:n})},destroy:function(){this._ancestor=null}});c(i,{ExportAsTool:e,ExportAsCommand:h}),a("exportAs",new e({template:new v({template:o.dropDownListTemplate,title:"Export As"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/import.min",["editor/main.min"],n)}(function(){!function(n){var u=window.kendo,h=n.extend,r=n.proxy,i=u.ui.editor,o=i.EditorUtils,c=i.Command,l=i.Tool,a=o.registerTool,s=i.ToolTemplate,f='<div contenteditable="false" class="k-loading-mask" style="width: 100%; height: 100%; position: absolute; top: 0px; left: 0px;"><div class="k-loading-image"></div><div class="k-loading-color"></div></div>',e=c.extend({exec:function(){(this.editor._uploadWidget||this._initializeUploadWidget()).element.click()},_initializeUploadWidget:function(){var t=this,f=t.editor,i=f.options["import"],u=n('<input id="editorImport" name="files" type="file" />').kendoUpload({success:r(t._onUploadSuccess,t),progress:r(t._onUploadProgress,t),select:r(t._onUploadSelect,t),error:r(t._onUploadError,t),complete:r(t._onUploadComplete,t),showFileList:!1,multiple:!1,async:{saveUrl:i.proxyUrl,autoUpload:!0,saveField:"file"},validation:{allowedExtensions:i.allowedExtensions,maxFileSize:i.maxFileSize}}).getKendoUpload();return f._uploadWidget=u,u},_onUploadComplete:function(n){this._trigger("complete",n),n.sender.clearAllFiles(),this._removeLoadingOverlay()},_onUploadSuccess:function(n){this.editor.value(n.response.html.replace(/<\/?body>/gi,"")),this._trigger("success",n)},_onUploadProgress:function(n){this._trigger("progress",n)},_onUploadSelect:function(n){this._trigger("select",n),n.files[0].validationErrors||this._initLoadingOverlay()},_onUploadError:function(n){this._trigger("error",n)},_trigger:function(n,t){var r=this.editor,i=r.options["import"];"function"==typeof i[n]&&i[n].call(r,t)},_initLoadingOverlay:function(){var t=this.editor.body;i.Dom.is(t,"body")?this._iframeWrapper=this._container=this.editor.wrapper.find("iframe").parent().css({position:"relative"}).append(f):this._container=n(t).append(f),u.ui.progress(this._container,!0)},_removeLoadingOverlay:function(){u.ui.progress(this._container,!1),n(this._iframeWrapper).css({position:""}),delete this._container,delete this._iframeWrapper}});h(i,{ImportCommand:e}),a("import",new l({command:e,template:new s({template:o.buttonTemplate,title:"Import"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/resizing/resizing-utils.min",["editor/main.min"],n)}(function(){!function(n){function b(n){var u=n.value,r=n.min,t=n.max;return g(d(i(u),i(t)),i(r))}function k(t){return t&&!r(t).is("body")&&t.scrollHeight>t.clientHeight?n.support.scrollbar():0}function p(n,t){return e(n)?i(n):i(n)/t*100}function e(n){return typeof n===o&&y.test(n)}function w(n){return typeof n===o&&v.test(n)}function nt(n){return i(n)+a}function tt(n){return i(n)+c}var u=window,f=u.Math,d=f.min,g=f.max,i=u.parseFloat,r=n.jQuery,s=r.extend,l=n.ui.editor,a="%",c="px",y=/(\d+)(\.?)(\d*)%/,v=/(\d+)(\.?)(\d*)px/,o="string",h={constrain:b,getScrollBarWidth:k,calculatePercentageRatio:p,inPercentages:e,inPixels:w,toPercentages:nt,toPixels:tt};s(l,{ResizingUtils:h})}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/resizing/table-element-resizing.min",["editor/main.min","kendo.resizable.min","editor/resizing/resizing-utils.min"],n)}(function(){!function(n){var i=n.jQuery,c=i.extend,r=i.noop,e=i.proxy,b=n.ui.editor,a=n.Class,s="keydown",y="mousedown",w="mouseenter",v="mouseleave",d="mousemove",l="mouseup",k=",",o=".",p=":last-child",u="table",h=a.extend({init:function(n,t){var r=this;r.options=c({},r.options,t),r.options.tags=i.isArray(r.options.tags)?r.options.tags:[r.options.tags],i(n).is(u)&&(r.element=n,r._attachEventHandlers())},destroy:function(){var n=this,t=n.options.eventNamespace;n.element&&(i(n.element).off(t),n.element=null),i(n.options.rootElement).off(s+t),n._destroyResizeHandle()},options:{tags:[],min:0,rootElement:null,eventNamespace:"",rtl:!1,handle:{dataAttribute:"",height:0,width:0,classNames:{},template:""}},_attachEventHandlers:function(){var n=this,t=n.options;i(n.element).on(d+t.eventNamespace,t.tags.join(k),e(n.detectElementBorderHovering,n))},resizingInProgress:function(){var t=this,n=t._resizable;return!!n&&!!n.resizing},resize:r,detectElementBorderHovering:function(n){var t=this,o=t.options,e=o.handle,r=i(n.currentTarget),u=t.resizeHandle,f=e.dataAttribute;t.resizingInProgress()||(!r.is(p)&&t.elementBorderHovered(r,n)?u?u.data(f)&&u.data(f)!==r[0]&&t.showResizeHandle(r,n):t.showResizeHandle(r,n):u&&t._destroyResizeHandle())},elementBorderHovered:r,showResizeHandle:function(n,t){var i=this;0===t.buttons&&(i._initResizeHandle(),i.setResizeHandlePosition(n),i.setResizeHandleDimensions(),i.setResizeHandleDataAttributes(n[0]),i._attachResizeHandleEventHandlers(),i._initResizable(n),i._hideResizeMarker(),i.resizeHandle.show())},_initResizeHandle:function(){var n=this,t=n.options;n._destroyResizeHandle(),n.resizeHandle=i(t.handle.template).appendTo(t.rootElement)},setResizeHandlePosition:r,setResizeHandleDimensions:r,setResizeHandleDataAttributes:function(n){var t=this;t.resizeHandle.data(t.options.handle.dataAttribute,n)},_attachResizeHandleEventHandlers:function(){var n=this,r=n.options,u=r.eventNamespace,t=r.handle.classNames.marker,i=n.resizeHandle;n.resizeHandle.on(y+u,function(){i.find(o+t).show()}).on(l+u,function(){i.find(o+t).hide()})},_hideResizeMarker:function(){var n=this;n.resizeHandle.find(o+n.options.handle.classNames.marker).hide()},_destroyResizeHandle:function(){var n=this;n.resizeHandle&&(n._destroyResizable(),n.resizeHandle.off(n.options.eventNamespace).remove(),n.resizeHandle=null)},_initResizable:function(t){var i=this;i.resizeHandle&&(i._destroyResizable(),i._resizable=new n.ui.Resizable(t,{draggableElement:i.resizeHandle[0],start:e(i.onResizeStart,i),resize:e(i.onResize,i),resizeend:e(i.onResizeEnd,i)}))},_destroyResizable:function(){var n=this;n._resizable&&(n._resizable.destroy(),n._resizable=null)},onResizeStart:function(){this._disableKeyboard()},onResize:function(n){this.setResizeHandleDragPosition(n)},setResizeHandleDragPosition:r,onResizeEnd:function(n){var t=this;t.resize(n),t._destroyResizeHandle(),t._enableKeyboard()},_enableKeyboard:function(){var n=this.options;i(n.rootElement).off(s+n.eventNamespace)},_disableKeyboard:function(){var n=this.options;i(n.rootElement).on(s+n.eventNamespace,function(n){n.preventDefault()})},_forceResizing:function(n){var t=this._resizable;t&&t.userEvents&&t.userEvents._end(n)}}),f=a.extend({create:function(n,t){var r=this,e=t.name,f=t.eventNamespace;i(n.body).on(w+f,u,function(i){var f=i.currentTarget,u=n[e];i.stopPropagation(),u?u.element===f||u.resizingInProgress()||(r._destroyResizing(n,t),r._initResizing(n,f,t)):r._initResizing(n,f,t)}).on(v+f,u,function(f){var s,o=n[e];f.stopPropagation(),!o||o.resizingInProgress()||o.resizeHandle||(s=i(o.element).parents(u)[0],s&&(r._destroyResizing(n,t),r._initResizing(n,s,t)))}).on(v+f,function(){var i=n[e];i&&!i.resizingInProgress()&&r._destroyResizing(n,t)}).on(l+f,function(f){var s,o=n[e];o&&o.resizingInProgress()&&(s=i(f.target).parents(u)[0],s&&(o._forceResizing(f),r._destroyResizing(n,t),r._initResizing(n,s,t)))})},dispose:function(n,t){i(n.body).off(t.eventNamespace)},_initResizing:function(t,i,r){var f=r.name,u=r.type;t[f]=new u(i,{rtl:n.support.isRtl(t.element),rootElement:t.body})},_destroyResizing:function(n,t){var i=t.name;n[i]&&(n[i].destroy(),n[i]=null)}});f.current=new f,h.create=function(n,t){f.current.create(n,t)},h.dispose=function(n,t){f.current.dispose(n,t)},c(b,{TableElementResizing:h})}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/resizing/column-resizing.min",["editor/main.min","editor/resizing/resizing-utils.min","editor/resizing/table-element-resizing.min"],n)}(function(){!function(n){var it=window,et=it.Math,ft=et.abs,i=n.jQuery,ut=i.extend,v=n.ui.editor,a=v.TableElementResizing,u=v.ResizingUtils,y=u.constrain,d=u.calculatePercentageRatio,g=u.getScrollBarWidth,w=u.inPercentages,nt=u.toPercentages,h=u.toPixels,r=n._outerWidth,s=".kendoEditorColumnResizing",tt="k-column-resize-handle",p="k-column-resize-marker",l="body",e="tbody",k="td",rt="th",c="tr",b=",",f="width",o=a.extend({options:{tags:[k,rt],min:20,rootElement:null,eventNamespace:s,rtl:!1,handle:{dataAttribute:"column",width:10,height:0,classNames:{handle:tt,marker:p},template:'<div class="k-column-resize-handle-wrapper" unselectable="on" contenteditable="false"><div class="'+tt+'"><div class="'+p+'"></div></div></div>'}},elementBorderHovered:function(n,t){var s=this,o=s.options,e=o.handle.width,u=n.offset().left+(o.rtl?0:r(n)),f=t.clientX+i(n[0].ownerDocument).scrollLeft();return f>u-e&&f<u+e},setResizeHandlePosition:function(n){var f=this,a=i(f.element).children(e),u=f.options,o=u.rtl,v=u.handle.width,t=i(u.rootElement),y=t.is(l)?0:t.scrollTop(),s=t.is(l)?0:t.scrollLeft(),c=o?0:r(n),h=o?g(t[0]):0;f.resizeHandle.css({top:a.position().top+y,left:n.position().left+c+(s-h)-v/2,position:"absolute"})},setResizeHandleDimensions:function(){var n=this,t=i(n.element).children(e);n.resizeHandle.css({width:n.options.handle.width,height:t.height()})},setResizeHandleDragPosition:function(n){var h=this,s=i(i(n.currentTarget).data(h.options.handle.dataAttribute)),t=h.options,b=t.handle?t.handle.width:0,a=t.min,u=t.rtl,k=r(s),v=s.position().left,p=r(s.next()),c=i(h.resizeHandle),o=i(t.rootElement),e=o.is(l)?0:o.scrollLeft(),f=u?g(o[0]):0,w=y({value:c.position().left+(e-f)+n.x.delta,min:v+(e-f)-(u?p:0)+a,max:v+k+(e-f)+(u?0:p)-b-a});c.css({left:w})},resize:function(n){var e,o,u,t=this,f=i(i(n.currentTarget).data(t.options.handle.dataAttribute)),h=t.options,l=h.rtl?-1:1,s=h.min,c=l*n.x.initialDelta;t._setTableComputedWidth(),t._setColumnsComputedWidth(),u=r(f),o=r(f.next()),e=y({value:u+c,min:s,max:u+o-s}),t._resizeColumn(f[0],e),t._resizeTopAndBottomColumns(f[0],e),t._resizeAdjacentColumns(f.index(),o,u,u-e)},_setTableComputedWidth:function(){var n=this.element;""===n.style[f]&&(n.style[f]=h(r(i(n))))},_setColumnsComputedWidth:function(){for(var a=this,o=i(a.element).children(e),s=r(o),t=o.children(c).children(k),l=t.length,u=t.map(function(){return r(i(this))}),n=0;n<l;n++)t[n].style[f]=w(t[n].style[f])?nt(d(u[n],s)):h(u[n])},_resizeTopAndBottomColumns:function(n,t){for(var u=this,s=i(n).index(),f=i(u.element).children(e).children(c).children(u.options.tags.join(b)).filter(function(){var t=this;return i(t).index()===s&&t!==n}),o=f.length,r=0;r<o;r++)u._resizeColumn(f[r],t)},_resizeColumn:function(n,t){n.style[f]=w(n.style[f])?nt(d(t,r(i(this.element).children(e)))):h(t)},_resizeAdjacentColumns:function(n,t,r,u){for(var o=this,s=i(o.element).children(e).children(c).children(o.options.tags.join(b)).filter(function(){return i(this).index()===n+1}),h=s.length,f=0;f<h;f++)o._resizeAdjacentColumn(s[f],t,r,u)},_resizeAdjacentColumn:function(n,t,i,r){var f=this,u=f.options.min,e=y({value:t+r,min:u,max:ft(i+t-u)});f._resizeColumn(n,e)}});o.create=function(n){a.create(n,{name:"columnResizing",type:o,eventNamespace:s})},o.dispose=function(n){a.dispose(n,{eventNamespace:s})},ut(v,{ColumnResizing:o})}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/resizing/row-resizing.min",["editor/main.min","editor/resizing/resizing-utils.min","editor/resizing/table-element-resizing.min"],n)}(function(){!function(n){var nt=window.Math,tt=nt.abs,i=n.jQuery,it=i.extend,a=n.ui.editor,v=a.TableElementResizing,f=a.ResizingUtils,rt=f.getScrollBarWidth,d=f.constrain,b=f.calculatePercentageRatio,p=f.inPercentages,k=f.toPercentages,h=f.toPixels,u=n._outerHeight,s=".kendoEditorRowResizing",y="k-row-resize-handle",g="k-row-resize-marker-wrapper",w="k-row-resize-marker",l="body",c="tr",e="tbody",r="height",o=v.extend({options:{tags:[c],min:20,rootElement:null,eventNamespace:s,rtl:!1,handle:{dataAttribute:"row",width:0,height:10,classNames:{handle:y,marker:w},template:'<div class="k-row-resize-handle-wrapper" unselectable="on" contenteditable="false"><div class="'+y+'"><div class="'+g+'"><div class="'+w+'"></div></div></div></div>'}},elementBorderHovered:function(n,t){var s=this,e=s.options.handle[r],f=n.offset().top+u(n),o=t.clientY+i(n[0].ownerDocument).scrollTop();return o>f-e&&o<f+e},setResizeHandlePosition:function(n){var o=this,f=o.options,c=f.handle[r],e=n.position(),t=i(f.rootElement),a=t.is(l)?0:t.scrollTop(),s=t.is(l)?0:t.scrollLeft(),h=f.rtl?rt(t[0]):0;o.resizeHandle.css({top:e.top+u(n)+a-c/2,left:e.left+(s-h),position:"absolute"})},setResizeHandleDimensions:function(){var n=this;n.resizeHandle.css({width:i(n.element).children(e).width(),height:n.options.handle[r]})},setResizeHandleDragPosition:function(n){var o=this,t=o.options,c=t.min,a=i(o.element).children(e),y=a.position().top,s=i(o.resizeHandle),p=i(n.currentTarget).data(t.handle.dataAttribute),h=i(t.rootElement),f=h.is(l)?0:h.scrollTop(),v=d({value:s.position().top+f+n.y.delta,min:i(p).position().top+f+c,max:y+u(a)+f-t.handle[r]-c});s.css({top:v})},resize:function(n){var t=this,o=t.options,f=i(n.currentTarget).data(o.handle.dataAttribute),l=u(i(f)),c=i(t.element),v=u(c),y=c.children(e),w=y.height(),a=f.style[r],s=d({value:l+n.y.initialDelta,min:o.min,max:tt(w-o.min)});t._setRowsHeightInPixels(),f.style[r]=h(s),t._setTableHeight(v+(s-l)),p(a)&&t._setRowsHeightInPercentages()},_setRowsHeightInPixels:function(){for(var s=this,t=i(s.element).children(e).children(c),o=t.length,f=t.map(function(){return u(i(this))}),n=0;n<o;n++)t[n].style[r]=h(f[n])},_setRowsHeightInPercentages:function(){for(var h=this,f=i(h.element).children(e),l=f.height(),t=f.children(c),s=t.length,o=t.map(function(){return u(i(this))}),n=0;n<s;n++)t[n].style[r]=k(b(o[n],l))},_setTableHeight:function(n){var t=this.element;t.style[r]=p(t.style[r])?k(b(n,i(t).parent().height())):h(n)}});o.create=function(n){v.create(n,{name:"rowResizing",type:o,eventNamespace:s})},o.dispose=function(n){v.dispose(n,{eventNamespace:s})},it(a,{RowResizing:o})}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/resizing/table-resize-handle.min",["editor/main.min","kendo.draganddrop.min","editor/resizing/resizing-utils.min"],n)}(function(){!function(n){var f,ni,pt,gt,yt,bt,wt,dt,kt,r,e,k,at,lt,w,ii,vt,h,fi,ei,oi,ui,i=n.jQuery,l=i.extend,li=i.noop,c=i.proxy,ti=n.ui.editor,y=n.Class,si=n.ui.Draggable,ri=n.Observable,ai=ti.ResizingUtils.getScrollBarWidth,o=n._outerWidth,s=n._outerHeight,p=".kendoEditorTableResizeHandle",st="k-table-resize-handle",ht="dragStart",ct="drag",ot="dragEnd",ut="halfInside",v="mouseover",a="mouseout",yi="body",vi="table",et="east",ft="north",d="northeast",nt="northwest",g="south",b="southeast",rt="southwest",it="west",hi=".",ci=ri.extend({init:function(n){var t=this;ri.fn.init.call(t),t.options=l({},t.options,n),t.element=i(t.options.template).appendTo(t.options.appendTo)[0],t._attachEventHandlers(),t._addStyles(),t._initDraggable(),t._initPositioningStrategy(),t._initDraggingStrategy(),i(t.element).data(vi,t.options.resizableElement)},destroy:function(){var n=this;i(n.element).off(p).remove(),n.element=null,n._destroyDraggable(),n.unbind()},options:{appendTo:null,direction:b,resizableElement:null,rtl:!1,template:"<div class='k-table-resize-handle-wrapper' unselectable='on' contenteditable='false'><div class='"+st+"'></div></div>"},events:[ht,ct,ot,v,a],show:function(){this._setPosition()},_setPosition:function(){var t=this,n=t._positioningStrategy.getPosition();i(t.element).css({top:n.top,left:n.left,position:"absolute"})},_attachEventHandlers:function(){var n=this;i(n.element).on(v+p,c(n._onMouseOver,n)).on(a+p,c(n._onMouseOut,n))},_onMouseOver:function(){this.trigger(v)},_onMouseOut:function(){this.trigger(a)},_addStyles:function(){var n=this;i(n.element).children(hi+st).addClass("k-resize-"+n.options.direction)},_initPositioningStrategy:function(){var t=this,n=t.options;t._positioningStrategy=f.create({name:n.direction,handle:t.element,resizableElement:n.resizableElement,rootElement:n.rootElement,rtl:n.rtl})},_initDraggable:function(){var n=this,t=n.element;!n._draggable&&t&&(n._draggable=new si(t,{dragstart:c(n._onDragStart,n),drag:c(n._onDrag,n),dragend:c(n._onDragEnd,n)}))},_onDragStart:function(){this.trigger(ht)},_onDrag:function(n){var t=this;t.trigger(ct,t._draggingStrategy.adjustDragDelta({deltaX:n.x.delta,deltaY:n.y.delta,initialDeltaX:n.x.initialDelta,initialDeltaY:n.y.initialDelta}))},_onDragEnd:function(){this.trigger(ot)},_destroyDraggable:function(){var n=this;n._draggable&&(n._draggable.destroy(),n._draggable=null)},_initDraggingStrategy:function(){var n=this;n._draggingStrategy=e.create({name:n.options.direction})}}),tt=y.extend({init:function(){this._items=[]},register:function(n,t){this._items.push({name:n,type:t})},create:function(n){for(var i,r,u=this._items,e=u.length,f=n.name?n.name.toLowerCase():"",t=0;t<e;t++)if(r=u[t],r.name.toLowerCase()===f){i=r;break}if(i)return new i.type(n)}}),u=tt.extend({});u.current=new u,f=y.extend({init:function(n){var t=this;t.options=l({},t.options,n)},options:{handle:null,offset:ut,resizableElement:null,rootElement:null,rtl:!1},getPosition:function(){var n=this,r=n.calculatePosition(),i=n.applyHandleOffset(r);return n.applyScrollOffset(i)},calculatePosition:li,applyHandleOffset:function(n){var r=this.options,t=i(r.handle);return r.offset===ut?{top:n.top-s(t)/2,left:n.left-o(t)/2}:n},applyScrollOffset:function(n){var r=this.options,t=i(r.rootElement),u=r.rtl?ai(t[0]):0;return t.is(yi)?n:{top:n.top+(t.scrollTop()||0),left:n.left+(t.scrollLeft()||0)-u}}}),f.create=function(n){return u.current.create(n)},ni=f.extend({calculatePosition:function(){var n=i(this.options.resizableElement),t=n.position();return{top:t.top+s(n)/2,left:t.left+o(n)}}}),u.current.register(et,ni),pt=f.extend({calculatePosition:function(){var t=i(this.options.resizableElement),n=t.position();return{top:n.top,left:n.left+o(t)/2}}}),u.current.register(ft,pt),gt=f.extend({calculatePosition:function(){var t=i(this.options.resizableElement),n=t.position();return{top:n.top,left:n.left+o(t)}}}),u.current.register(d,gt),yt=f.extend({calculatePosition:function(){var t=i(this.options.resizableElement),n=t.position();return{top:n.top,left:n.left}}}),u.current.register(nt,yt),bt=f.extend({calculatePosition:function(){var n=i(this.options.resizableElement),t=n.position();return{top:t.top+s(n),left:t.left+o(n)/2}}}),u.current.register(g,bt),wt=f.extend({calculatePosition:function(){var n=i(this.options.resizableElement),t=n.position();return{top:t.top+s(n),left:t.left+o(n)}}}),u.current.register(b,wt),dt=f.extend({calculatePosition:function(){var t=i(this.options.resizableElement),n=t.position();return{top:n.top+s(t),left:n.left}}}),u.current.register(rt,dt),kt=f.extend({calculatePosition:function(){var t=i(this.options.resizableElement),n=t.position();return{top:n.top+s(t)/2,left:n.left}}}),u.current.register(it,kt),r=tt.extend({}),r.current=new r,e=y.extend({init:function(n){var t=this;t.options=l({},t.options,n)},options:{deltaX:{adjustment:null,modifier:null},deltaY:{adjustment:null,modifier:null}},adjustDragDelta:function(n){var t=this.options,r=t.deltaX.adjustment*t.deltaX.modifier,i=t.deltaY.adjustment*t.deltaY.modifier;return{deltaX:n.deltaX*r,deltaY:n.deltaY*i,initialDeltaX:n.initialDeltaX*r,initialDeltaY:n.initialDeltaY*i}}}),e.create=function(n){return r.current.create(n)},k=e.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:0,modifier:0}}}),at=k.extend({options:{deltaX:{modifier:1}}}),r.current.register(et,at),lt=k.extend({options:{deltaX:{modifier:-1}}}),r.current.register(it,lt),w=e.extend({options:{deltaX:{adjustment:0,modifier:0},deltaY:{adjustment:1,modifier:1}}}),ii=w.extend({options:{deltaY:{modifier:-1}}}),r.current.register(ft,ii),vt=w.extend({options:{deltaY:{modifier:1}}}),r.current.register(g,vt),h=e.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:1,modifier:1}}}),fi=h.extend({options:{deltaX:{modifier:1},deltaY:{modifier:-1}}}),r.current.register(d,fi),ei=h.extend({options:{deltaX:{modifier:-1},deltaY:{modifier:-1}}}),r.current.register(nt,ei),oi=h.extend({options:{deltaX:{modifier:1},deltaY:{modifier:1}}}),r.current.register(b,oi),ui=h.extend({options:{deltaX:{modifier:-1},deltaY:{modifier:1}}}),r.current.register(rt,ui),l(ti,{TableResizeHandle:ci})}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/resizing/table-resizing.min",["editor/main.min","editor/resizing/table-resize-handle.min","editor/resizing/resizing-utils.min"],n)}(function(){!function(n,t){function it(n){return t===n}var ei=window,et=ei.Math,p=et.min,w=et.max,i=n.jQuery,k=i.contains,y=i.extend,e=i.proxy,ot=n.support.browser,tt=n.ui.editor,lt=n.Class,kt=tt.TableResizeHandle,u=tt.ResizingUtils,g=u.calculatePercentageRatio,st=u.constrain,c=u.inPercentages,si=u.inPixels,nt=u.toPercentages,h=u.toPixels,ht=n._outerWidth,v=n._outerHeight,r=".kendoEditorTableResizing",rt="k-table-resize-handle-wrapper",ti="k-table",ct="k-table-resizing",hi="dragStart",ri="drag",ui="dragEnd",b="keydown",at="mousedown",ii="mouseover",fi="mouseout",ut="td",l="tr",d="tbody",ft="table",f="width",o="height",oi="east",ni="north",pt="northeast",vt="northwest",yt="south",wt="southeast",dt="southwest",gt="west",bt=".",a=lt.extend({init:function(n,t){var r=this;r.options=y({},r.options,t),r.handles=[],i(n).is(ft)&&(r.element=n)},destroy:function(){var n=this;i(n.element).off(r),n.element=null,i(n.options.rootElement).off(b+r),n._destroyResizeHandles()},options:{appendHandlesTo:null,rtl:!1,rootElement:null,minWidth:10,minHeight:10,handles:[{direction:vt},{direction:ni},{direction:pt},{direction:oi},{direction:wt},{direction:yt},{direction:dt},{direction:gt}]},resize:function(n){var i=this,t=y({},{deltaX:0,deltaY:0,initialDeltaX:0,initialDeltaY:0},n);i._resizeWidth(t.deltaX,t.initialDeltaX),i._resizeHeight(t.deltaY,t.initialDeltaY),i.showResizeHandles()},_resizeWidth:function(n,t){var a,l,s,u,r=this,o=i(r.element),b=o[0].style[f],v=ht(o),e=o.parent().width(),y=r._getMaxDimensionValue(f);0!==n&&(it(r._initialElementWidth)&&(r._initialElementWidth=v),u=st({value:r._initialElementWidth+t,min:r.options.minWidth,max:y}),c(b)?(v+n>e?(l=w(u,e),s=p(u,e)):(l=p(u,e),s=w(u,e)),a=nt(g(l,s))):a=h(u),r._setColumnsWidth(),o[0].style[f]=a)},_resizeHeight:function(n,t){var s,l,a,u,r=this,e=i(r.element),tt=e[0].style[o],b=v(e),d=e.parent(),f=d.height(),rt=r._getMaxDimensionValue(o),k=r.options.minHeight,y=r._hasRowsInPixels();0!==n&&(it(r._initialElementHeight)&&(r._initialElementHeight=b),u=st({value:r._initialElementHeight+t,min:k,max:rt}),y&&n<0&&r._setRowsHeightInPercentages(),c(tt)?(b+n>f?(l=w(u,f),a=p(u,f)):(l=p(u,f),a=w(u,f)),s=nt(g(l,a))):s=h(u),e[0].style[o]=s,y&&n<0&&r._setRowsHeightInPixels())},_getMaxDimensionValue:function(n){var r=this,l=i(r.element),u=n.toLowerCase(),h=r.options.rtl?-1:1,t=i(r.element).parent(),o=t[0],e=t[u](),s=h*(n===f?t.scrollLeft():t.scrollTop());return o===l.closest(ut)[0]?""!==o.style[u]||c(r.element.style[u])?e+s:1/0:e+s},_setColumnsWidth:function(){function a(n){var t=n.style.width;return""!==t?!!c(t):!!i(n).hasClass(ti)}var n,s=this,r=i(s.element),u=r.parent()[0],e=r.closest(ut),t=e.closest(l).children(),o=t.length;if(a(r[0])&&u===e[0]&&""===u.style[f])for(n=0;n<o;n++)t[n].style[f]=h(i(t[n]).width())},_hasRowsInPixels:function(){for(var r=this,t=i(r.element).children(d).children(l),n=0;n<t.length;n++)if(""===t[n].style.height||si(t[n].style.height))return!0;return!1},_setRowsHeightInPercentages:function(){for(var e=this,r=i(e.element).children(d),s=r.height(),t=r.children(l),f=t.length,u=t.map(function(){return v(i(this))}),n=0;n<f;n++)t[n].style[o]=nt(g(u[n],s))},_setRowsHeightInPixels:function(){for(var f=this,t=i(f.element).children(d).children(l),u=t.length,r=t.map(function(){return v(i(this))}),n=0;n<u;n++)t[n].style[o]=h(r[n])},showResizeHandles:function(){var n=this;n._initResizeHandles(),n._showResizeHandles()},_initResizeHandles:function(){var t,n=this,u=n.handles,i=n.options,r=n.options.handles,f=r.length;if(!(u&&u.length>0)){for(t=0;t<f;t++)n.handles.push(new kt(y({appendTo:i.appendHandlesTo,resizableElement:n.element,rootElement:i.rootElement,rtl:i.rtl},r[t])));n._bindToResizeHandlesEvents()}},_destroyResizeHandles:function(){for(var t=this,i=t.handles?t.handles.length:0,n=0;n<i;n++)t.handles[n].destroy()},_showResizeHandles:function(){for(var t=this,r=t.handles||[],i=r.length,n=0;n<i;n++)t.handles[n].show()},_bindToResizeHandlesEvents:function(){for(var t,n=this,r=n.handles||[],u=r.length,i=0;i<u;i++)t=r[i],t.bind(hi,e(n._onResizeHandleDragStart,n)),t.bind(ri,e(n._onResizeHandleDrag,n)),t.bind(ui,e(n._onResizeHandleDragEnd,n)),t.bind(ii,e(n._onResizeHandleMouseOver,n)),t.bind(fi,e(n._onResizeHandleMouseOut,n))},_onResizeHandleDragStart:function(){var n=this,t=i(n.element);t.addClass(ct),n._initialElementHeight=v(t),n._initialElementWidth=ht(t),n._disableKeyboard()},_onResizeHandleDrag:function(n){this.resize(n)},_onResizeHandleDragEnd:function(){var n=this;i(n.element).removeClass(ct),n._enableKeyboard()},_enableKeyboard:function(){i(this.options.rootElement).off(b+r)},_disableKeyboard:function(){i(this.options.rootElement).on(b+r,function(n){n.preventDefault()})}}),s=lt.extend({create:function(n){var t=this;i(n.body).on(at+r,ft,function(i){var f=i.target,u=i.currentTarget,e=n.tableResizing,r=e?e.element:null;if(e){if(r&&u!==r){if(k(u,r)&&r!==f&&k(r,f))return;r!==f&&(n._destroyTableResizing(),t._initResizing(n,u))}}else t._initResizing(n,u);n._showTableResizeHandles()}).on(at+r,function(t){var u=n.tableResizing,f=u?u.element:null,r=t.target,e=i(r).hasClass(rt)||i(r).parents(bt+rt).length>0;!u||f===r||k(f,r)||e||n._destroyTableResizing()})},dispose:function(n){i(n.body).off(r)},_initResizing:function(t,i){ot.msie||ot.mozilla||(t.tableResizing=new a(i,{appendHandlesTo:t.body,rtl:n.support.isRtl(t.element),rootElement:t.body}))}});s.current=new s,a.create=function(n){s.current.create(n)},a.dispose=function(n){s.current.dispose(n)},y(tt,{TableResizing:a})}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/immutables.min",["editor/tables.min"],n)}(function(){!function(n,t){var f=window.kendo,it=f.Class,o=f.ui.editor,i=o.Dom,b=f.template,c=o.RangeUtils,y=["ul","ol","tbody","thead","table"],tt=["bold","italic","underline","strikethrough","superscript","subscript","forecolor","backcolor","fontname","fontsize","createlink","unlink","autolink","addcolumnleft","addcolumnright","addrowabove","addrowbelow","deleterow","deletecolumn","mergecells","formatting","cleanformatting"],e="k-immutable",a="["+e+"]",d="[contenteditable='false']",g=function(t){return n(t).is("body,.k-editor")},l=function(n){return n.getAttribute&&"false"==n.getAttribute("contenteditable")},r=function(n){return i.closestBy(n,l,g)},nt=function(n){var i=r(n.startContainer),t=r(n.endContainer);(i||t)&&(i&&n.setStartBefore(i),t&&n.setEndAfter(t))},h=function(n){if(r(n.commonAncestorContainer))return!0;if(r(n.startContainer)||r(n.endContainer)){var t=c.editableTextNodes(n);if(0===t.length)return!0}return!1},v=function(n){for(var r="",i="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",t=n||10;t>0;--t)r+=i.charAt(Math.round(Math.random()*(i.length-1)));return r},w=function(t){var f,u,o,r={empty:!0};return n(t).find(d).each(function(t,s){f=i.name(s),u=v(),o="<"+f+" "+e+"='"+u+"'></"+f+">",r[u]={node:s,style:n(s).attr("style")},r.empty=!1,n(s).replaceWith(o)}),r},p=function(t,i){var u,r;n(t).find(a).each(function(t,f){u=f.getAttribute(e),r=i[u],n(f).replaceWith(r.node),r.style!=n(r.node).attr("style")&&n(r.node).removeAttr("style").attr("style",r.style)})},k=function(n){var t=f.keys;return n===t.BACKSPACE||n==t.DELETE},s=function(n){var i=n?n.options:t;i&&i.finder&&i.finder._initOptions({immutables:!0})},u=it.extend({init:function(t){this.editor=t,this.serializedImmutables={},this.options=n.extend({},t&&t.options&&t.options.immutables);var i=t.toolbar.tools;s(i.justifyLeft),s(i.justifyCenter),s(i.justifyRight),s(i.justifyFull)},serialize:function(n){var i,t=this._toHtml(n);return t.indexOf(e)===-1?(i=this.randomId(),t=t.replace(/>/," "+e+'="'+i+'">')):i=t.match(/k-immutable\s*=\s*['"](.*)['"]/)[1],this.serializedImmutables[i]=n,t},_toHtml:function(n){var r,t=this.options.serialization,u=typeof t;switch(u){case"string":return b(t)(n);case"function":return t(n);default:return r=i.name(n),"<"+r+"></"+r+">"}},deserialize:function(t){var r=this,i=this.options.deserialization;n(a,t).each(function(){var u=this.getAttribute(e),t=r.serializedImmutables[u];f.isFunction(i)&&i(this,t),n(this).replaceWith(t)}),r.serializedImmutables={}},randomId:function(n){return v(n)},keydown:function(n,t){var i=k(n.keyCode),r=i&&this._cancelDeleting(n,t)||!i&&this._cancelTyping(n,t);if(r)return n.preventDefault(),!0},_cancelTyping:function(n,t){var r=this.editor,i=r.keyboard;return t.collapsed&&!i.typingInProgress&&i.isTypingKey(n)&&h(t)},_cancelDeleting:function(n,t){var u,r,o,e,l=f.keys,c=n.keyCode===l.BACKSPACE,s=n.keyCode==l.DELETE;if(!c&&!s)return!1;if(u=!1,t.collapsed){if(h(t))return!0;if(r=this.nextImmutable(t,s),r&&c&&(o=i.closest(t.commonAncestorContainer,"li"),o&&(e=i.closest(r,"li"),e&&e!==o)))return u;if(r&&!i.tableCell(r)){if(i.parentOfType(r,y)===i.parentOfType(t.commonAncestorContainer,y)){for(;r&&1==r.parentNode.childNodes.length;)r=r.parentNode;if(i.tableCell(r))return u;this._removeImmutable(r,t)}u=!0}}return u},nextImmutable:function(n,t){var u,f=n.commonAncestorContainer;if(i.isBom(f)||t&&c.isEndOf(n,f)||!t&&c.isStartOf(n,f)){if(u=this._nextNode(f,t),u&&i.isBlock(u)&&!r(u))for(;u&&u.children&&u.children[t?0:u.children.length-1];)u=u.children[t?0:u.children.length-1];return r(u)}},_removeImmutable:function(n,t){var r=this.editor,u=new o.RestorePoint(t,r.body);i.remove(n),o._finishUpdate(r,u)},_nextNode:function(n,t){for(var r,f=t?"nextSibling":"previousSibling",u=n;u&&!r;)r=u[f],r&&i.isDataNode(r)&&/^\s|[\ufeff]$/.test(r.nodeValue)&&(u=r,r=u[f]),r||(u=u.parentNode);return r}});u.immutable=l,u.immutableParent=r,u.expandImmutablesIn=nt,u.immutablesContext=h,u.toolsToBeUpdated=tt,u.removeImmutables=w,u.restoreImmutables=p,o.Immutables=u}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/table-wizard/table-wizard-command.min",["editor/tables.min"],n)}(function(){!function(n,t){var u=window.kendo,r=u.ui.editor,h=r.EditorUtils,s=r.RangeUtils,i=r.Dom,v=h.registerTool,y=r.ToolTemplate,e=r.Command,o=new r.BlockFormatFinder([{tags:["table"]}]),p=new r.BlockFormatFinder([{tags:["td","th"]}]),a=/([a-z]+|%)$/i,f=e.extend({exec:function(){var i=this,f=i.editor,o=i.range=i.lockRange(),e=i._sourceTable=i.options.insertNewTable?t:i._selectedTable(o),c=i._selectedTableCells=e?i._selectedCells(o):t,h={visible:!1,messages:f.options.messages,closeCallback:n.proxy(i.onDialogClose,i),table:i.parseTable(e,c),dialogOptions:f.options.dialogOptions,isRtl:u.support.isRtl(f.wrapper)},s=new r.TableWizardDialog(h);s.open()},onDialogClose:function(n){var t=this;t.releaseRange(t.range),n&&(t.options.insertNewTable?t.insertTable(t.createNewTable(n)):t.updateTable(n,t._sourceTable,t._selectedTableCells))},releaseRange:function(n){var t=this,r=t.editor.document;i.windowFromDocument(r).focus(),e.fn.releaseRange.call(t,n)},insertTable:function(n){var t=this.range;t.insertNode(n),t.collapse(!0),this.editor.selectRange(t)},updateTable:function(t,r,u){for(var s,a,k,b,w,y,p,h,o=this,f=n(r.rows).toArray(),e=t.tableProperties,v=e.rows,c=e.columns,l=function(n){return n[n.length-1]};u.length>1;)u.pop();if(s=u.length?l(u).parentNode:l(f),o._deleteTableRows(f,f.length-v),f.length<v)for(b=n(s).index(),w=s.cells.length,y=v-f.length,k=s.parentNode;y;)a=k.insertRow(b+1),o._insertCells(w-a.cells.length,a),y--;f[0].cells.length>c&&n(f).each(function(n,t){for(;t.cells.length>c;)t.deleteCell(-1)}),f[0].cells.length<c&&(p=n(l(u)||l(s.cells)).index(),n(f).each(function(n,t){o._insertCells(c-t.cells.length,t,p+1)})),o._updateTableProperties(r,e),h=t.cellProperties,u[0]&&i.attr(u[0],{id:h.id||null}),(h.selectAllCells?n(f).children():n(u)).each(function(n,t){o._updateCellProperties(t,h)}),o._updateCaption(r,e),e.cellsWithHeaders=e.cellsWithHeaders||!1,o.cellsWithHeadersAssociated(r)!=e.cellsWithHeaders&&o.associateCellsWithHeader(r,e.cellsWithHeaders)},_isHeadingRow:function(n){return i.is(n.parentNode,"thead")||i.is(n.cells[0],"th")},associateCellsWithHeader:function(t,i){var o,r,u,h=+new Date,f=[],l=t.rows[0].cells.length,a=function(){for(var n=0;n<l;n++)f[n]="table"+ ++h},c=function(t,r){n(r)[i?"attr":"removeAttr"]("id",f[t])},s=function(t,r){n(r)[i?"attr":"removeAttr"]("headers",f[t])},e=this._isHeadingRow;n(t.rows).each(function(i,f){if(e(f))for(o=i,r=t.rows[++o],u=r&&!e(r),u&&(a(),n(f.cells).each(c));u;)n(r.cells).each(s),r=t.rows[++o],u=r&&!e(r)})},cellsWithHeadersAssociated:function(t){var u,f=n(t.rows).children(),i=this._isHeadingRow,r=[];return f.each(function(n,t){t.id&&i(t.parentNode)&&r.push(t.id)}),u=f.filter(function(t,u){var f=u.getAttribute("headers");return f&&!i(u.parentNode)&&n.inArray(f,r)>-1}),!!u.length},_insertCells:function(n,t,i){i=isNaN(i)?-1:i;for(var u,r=0;r<n;r++)u=t.insertCell(i),u.innerHTML="&nbsp;"},_deleteTableRows:function(n,t){for(var u,r,f=0;f<t;f++)u=n.pop(),r=u.parentNode,r.removeChild(u),r.rows.length||i.remove(r)},createNewTable:function(n){var c,e,h,f,s,u=this,l=u.editor.document,t=n.tableProperties,o=n.cellProperties,a=o.selectAllCells,r=i.create(l,"table");for(u._updateTableProperties(r,t),u._updateCaption(r,t),c=r.createTBody(),e=0;e<t.rows;e++)for(h=c.insertRow(),f=0;f<t.columns;f++)s=h.insertCell(),s.innerHTML="&nbsp;",0===e&&0===f&&o.id&&(s.id=o.id),u._updateCellProperties(s,a||0===e&&0===f?o:{});return t.cellsWithHeaders&&u.associateCellsWithHeader(r,t.cellsWithHeaders),r},_updateTableProperties:function(t,r){var u=this._getStylesData(r);i.attr(t,{cellSpacing:r.cellSpacing||null,cellPadding:r.cellPadding||null,className:r.className||null,id:r.id||null,summary:r.summary||null,style:u||null}),n(t).addClass("k-table")},_updateCellProperties:function(n,t){var r=this._getStylesData(t);r.padding=t.cellPadding||null,r.margin=t.cellMargin||null,i.attr(n,{style:r||null,className:t.className||null})},_updateCaption:function(n,t){var u,r;n.caption&&!t.captionContent?n.deleteCaption():t.captionContent&&(u=n.createCaption(),u.innerHTML=t.captionContent,r=this._getAlignmentData(t.captionAlignment),i.attr(u,{style:{textAlign:r.textAlign,verticalAlign:r.verticalAlign}}))},_getStylesData:function(n){var t=this._getAlignmentData(n.alignment),i="wrapText"in n?n.wrapText?"":"nowrap":null;return{width:n.width?n.width+n.widthUnit:null,height:n.height?n.height+n.heightUnit:null,textAlign:t.textAlign,verticalAlign:t.verticalAlign,backgroundColor:n.bgColor||null,borderWidth:n.borderWidth,borderStyle:n.borderStyle,borderColor:n.borderColor,borderCollapse:n.collapseBorders?"collapse":null,whiteSpace:i}},_getAlignmentData:function(n){var i,t="",r=t;return n&&(n.indexOf(" ")!=-1?(i=n.split(" "),t=i[0],r=i[1]):t=n),{textAlign:t,verticalAlign:r}},parseTable:function(i,r){var o,u,s,e,l,f,a,h,v,c;return i?(o=this,u=i.style,s=i.rows,e=i.caption,l=n(e?e.cloneNode(!0):t),l.find(".k-marker").remove(),f=i.className,f=f.replace(/^k-table\s|\sk-table$/,""),f=f.replace(/\sk-table\s/," "),f=f.replace(/^k-table$/,""),a=o._getAlignment(i,!0),h=e?o._getAlignment(e):t,v=o.cellsWithHeadersAssociated(i),c={tableProperties:{width:u.width||i.width?parseFloat(u.width||i.width):null,height:u.height||i.height?parseFloat(u.height||i.height):null,columns:s[0]?s[0].children.length:0,rows:s.length,widthUnit:o._getUnit(u.width),heightUnit:o._getUnit(u.height),cellSpacing:i.cellSpacing,cellPadding:i.cellPadding,alignment:a.textAlign,bgColor:u.backgroundColor||i.bgColor,className:f,id:i.id,borderWidth:u.borderWidth||i.border,borderColor:u.borderColor,borderStyle:u.borderStyle||"",collapseBorders:!!u.borderCollapse,summary:i.summary,captionContent:e?l.html():"",captionAlignment:e&&h.textAlign?h.textAlign+" "+h.verticalAlign:"",cellsWithHeaders:v},selectedCells:[]},c.rows=o.parseTableRows(s,r,c),c):{tableProperties:{},selectedCells:[]}},parseTableRows:function(t,i,r){for(var l,s,h,o,e,f,a=this,c=[],u=0;u<t.length;u++)for(l=t[u],s={cells:[]},h=l.cells,c.push(s),f=0;f<h.length;f++)o=h[f],e=a.parseCell(o),n.inArray(o,i)!=-1&&r.selectedCells.push(e),s.cells.push(e);return c},parseCell:function(n){var u,r=this,t=n.style,i=r._getAlignment(n);return i=i.textAlign?i.textAlign+" "+i.verticalAlign:"",u={width:t.width||n.width?parseFloat(t.width||n.width):null,height:t.height||n.height?parseFloat(t.height||n.height):null,widthUnit:r._getUnit(t.width),heightUnit:r._getUnit(t.height),cellMargin:t.margin,cellPadding:t.padding,alignment:i,bgColor:t.backgroundColor||n.bgColor,className:n.className,id:n.id,borderWidth:t.borderWidth||n.border,borderColor:t.borderColor,borderStyle:t.borderStyle,wrapText:"nowrap"!=t.whiteSpace}},_getAlignment:function(n,t){var r,u=n.style,i=u.textAlign||n.align||"";return t?{textAlign:i}:(r=u.verticalAlign||n.vAlign||"",i&&r?{textAlign:i,verticalAlign:r}:!i&&r?{textAlign:"left",verticalAlign:r}:i&&!r?{textAlign:i,verticalAlign:"top"}:{textAlign:"",verticalAlign:""})},_getUnit:function(n){var t=(n||"").match(a);return t?t[0]:"px"},_selectedTable:function(n){var t=i.filterBy(s.nodes(n),i.htmlIndentSpace,!0);return o.findSuitable(t)[0]},_selectedCells:function(n){var t=i.filterBy(s.nodes(n),i.htmlIndentSpace,!0);return p.findSuitable(t)}}),c=r.Tool.extend({command:function(n){return n.insertNewTable=this.options.insertNewTable,new f(n)}}),l=c.extend({update:function(n,t){var i=!o.isFormatted(t);n.toggleClass("k-state-disabled",i)}});u.ui.editor.TableWizardTool=c,u.ui.editor.TableWizardCommand=f,v("tableWizard",new l({command:f,insertNewTable:!1,template:new y({template:h.buttonTemplate,title:"Table Wizard"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("editor/table-wizard/table-wizard-dialog.min",["editor/table-wizard/table-wizard-command.min"],n)}(function(){!function(n){var r=window.kendo,o={format:"0",min:0},i=["px","em"],s=["solid","dotted","dashed","double","groove","ridge","inset","outset","initial","inherit","none","hidden"],e={dataSource:[{className:"k-icon k-i-table-align-middle-left",value:"left"},{className:"k-icon k-i-table-align-middle-center",value:"center"},{className:"k-icon k-i-table-align-middle-right",value:"right"},{className:"k-icon k-i-align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:"<span class='#: className #' title='#: tooltip #'></span>",valueTemplate:"<span class='k-align-group #: className #' title='#: tooltip #'></span>"},u={dataSource:[{className:"k-icon k-i-table-align-top-left",value:"left top"},{className:"k-icon k-i-table-align-top-center",value:"center top"},{className:"k-icon k-i-table-align-top-right",value:"right top"},{className:"k-icon k-i-table-align-middle-left",value:"left middle"},{className:"k-icon k-i-table-align-middle-center",value:"center middle"},{className:"k-icon k-i-table-align-middle-right",value:"right middle"},{className:"k-icon k-i-table-align-bottom-left",value:"left bottom"},{className:"k-icon k-i-table-align-bottom-center",value:"center bottom"},{className:"k-icon k-i-table-align-bottom-right",value:"right bottom"},{className:"k-icon k-i-align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:"<span class='#: className #' title='#: tooltip #'></span>",valueTemplate:"<span class='k-align-group #: className #' title='#: tooltip #'></span>"},f={dataSource:[{className:"k-icon k-i-table-align-top-left",value:"left top"},{className:"k-icon k-i-table-align-top-center",value:"center top"},{className:"k-icon k-i-table-align-top-right",value:"right top"},{className:"k-icon k-i-table-align-bottom-left",value:"left bottom"},{className:"k-icon k-i-table-align-bottom-center",value:"center bottom"},{className:"k-icon k-i-table-align-bottom-right",value:"right bottom"},{className:"k-icon k-i-align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:"<span class='#: className #' title='#: tooltip #'></span>",valueTemplate:"<span class='k-align-group #: className #' title='#: tooltip #'></span>"},c='<div class="k-editor-dialog k-editor-table-wizard-dialog k-action-window k-popup-edit-form"><div class="k-edit-form-container"><div id="k-table-wizard-tabs" class="k-root-tabs"><ul><li class="k-state-active">#= messages.tableTab #</li><li>#= messages.cellTab #</li><li>#= messages.accessibilityTab #</li></ul><div id="k-table-properties"><div class="k-edit-label"><label for="k-editor-table-width">#= messages.width #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-width" /><input id="k-editor-table-width-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-height">#= messages.height #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-height" /><input id="k-editor-table-height-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-columns">#= messages.columns #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-columns" /></div><div class="k-edit-label"><label for="k-editor-table-rows">#= messages.rows #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-rows" /></div><div class="k-edit-label"><label for="k-editor-table-cell-spacing">#= messages.cellSpacing #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-spacing" /></div><div class="k-edit-label"><label for="k-editor-table-cell-padding">#= messages.cellPadding #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-padding" /></div><div class="k-edit-label"><label for="k-editor-table-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-table-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-table-bg">#= messages.background #</label></div><div class="k-edit-field"><input id="k-editor-table-bg" /></div><div class="k-edit-label"><label for="k-editor-css-class">#= messages.cssClass #</label></div><div class="k-edit-field"><input id="k-editor-css-class" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-id">#= messages.id #</label></div><div class="k-edit-field"><input id="k-editor-id" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-border-width">#= messages.border #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-border-width" /><input id="k-editor-border-color" /></div><div class="k-edit-label"><label for="k-editor-border-style">#= messages.borderStyle #</label></div><div class="k-edit-field"><input id="k-editor-border-style" /></div><div class="k-edit-label">&nbsp;</div><div class="k-edit-field"><input id="k-editor-collapse-borders" type="checkbox" class="k-checkbox" /><label for="k-editor-collapse-borders" class="k-checkbox-label">#= messages.collapseBorders #</label></div></div><div id="k-cell-properties"><div class="k-edit-field"><input id="k-editor-selectAllCells" type="checkbox" class="k-checkbox" /><label for="k-editor-selectAllCells" class="k-checkbox-label">#= messages.selectAllCells #</label></div><div class="k-edit-label"><label for="k-editor-cell-width">#= messages.width #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-width" /><input id="k-editor-cell-width-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-cell-height">#= messages.height #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-height" /><input id="k-editor-cell-height-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-cell-margin">#= messages.cellMargin #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-margin" /></div><div class="k-edit-label"><label for="k-editor-table-cells-padding">#= messages.cellPadding #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cells-padding" /></div><div class="k-edit-label"><label for="k-editor-cell-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-cell-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-cell-bg">#= messages.background #</label></div><div class="k-edit-field"><input id="k-editor-cell-bg" /></div><div class="k-edit-label"><label for="k-editor-cell-css-class">#= messages.cssClass #</label></div><div class="k-edit-field"><input id="k-editor-cell-css-class" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-cell-id">#= messages.id #</label></div><div class="k-edit-field"><input id="k-editor-cell-id" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-cell-border-width">#= messages.border #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-border-width" /><input id="k-editor-cell-border-color" /></div><div class="k-edit-label"><label for="k-editor-cell-border-style">#= messages.borderStyle #</label></div><div class="k-edit-field"><input id="k-editor-cell-border-style" /></div><div class="k-edit-label">&nbsp;</div><div class="k-edit-field"><input id="k-editor-wrap-text" type="checkbox" class="k-checkbox" /><label for="k-editor-wrap-text" class="k-checkbox-label">#= messages.wrapText #</label></div></div><div id="k-accessibility-properties"><div class="k-edit-label"><label for="k-editor-table-caption">#= messages.caption #</label></div><div class="k-edit-field"><input id="k-editor-table-caption" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-accessibility-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-accessibility-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-accessibility-summary">#= messages.summary #</label></div><div class="k-edit-field"><textarea id="k-editor-accessibility-summary" class="k-input k-textbox"></textarea></div><div class="k-edit-label">&nbsp;</div><div class="k-edit-field"><input id="k-editor-cells-headers" type="checkbox" class="k-checkbox" /><label for="k-editor-cells-headers" class="k-checkbox-label">#= messages.associateCellsWithHeaders #</label></div></div></div><div class="k-edit-buttons k-state-default"><button class="k-button k-primary k-dialog-ok">#= messages.dialogOk #</button><button class="k-button k-dialog-close">#= messages.dialogCancel #</button></div></div></div>',h=r.Class.extend({init:function(n){this.options=n},open:function(){function h(n){n.preventDefault(),t.destroy(),u.destroy()}function c(n){t.collectDialogValues(f),h(n),t.change&&t.change(),i.closeCallback(f)}function s(n){h(n),i.closeCallback()}var u,r,t=this,i=t.options,e=i.dialogOptions,f=i.table,o=i.messages;e.close=s,e.title=o.tableWizard,e.visible=i.visible,u=n(t._dialogTemplate(o)).appendTo(document.body).kendoWindow(e).closest(".k-window").toggleClass("k-rtl",i.isRtl).end().find(".k-dialog-ok").click(c).end().find(".k-dialog-close").click(s).end().data("kendoWindow"),r=u.element,t._initTabStripComponent(r),t._initTableViewComponents(r,f),t._initCellViewComponents(r,f),t._initAccessibilityViewComponents(r,f),u.center(),u.open()},_initTabStripComponent:function(n){var t=this.components={};t.tabStrip=n.find("#k-table-wizard-tabs").kendoTabStrip({animation:!1}).data("kendoTabStrip")},collectDialogValues:function(){var n=this,t=n.options.table;n._collectTableViewValues(t),n._collectCellViewValues(t),n._collectAccessibilityViewValues(t)},_collectTableViewValues:function(n){var i=this.components.tableView,t=n.tableProperties;t.width=i.width.value(),t.widthUnit=i.widthUnit.value(),t.height=i.height.value(),t.columns=i.columns.value(),t.rows=i.rows.value(),t.heightUnit=i.heightUnit.value(),t.cellSpacing=i.cellSpacing.value(),t.cellPadding=i.cellPadding.value(),t.alignment=i.alignment.value(),t.bgColor=i.bgColor.value(),t.className=i.className.value,t.id=i.id.value,t.borderWidth=i.borderWidth.value(),t.borderColor=i.borderColor.value(),t.borderStyle=i.borderStyle.value(),t.collapseBorders=i.collapseBorders.checked},_collectCellViewValues:function(n){var i=n.cellProperties={},t=this.components.cellView;i.selectAllCells=t.selectAllCells.checked,i.width=t.width.value(),i.widthUnit=t.widthUnit.value(),i.height=t.height.value(),i.heightUnit=t.heightUnit.value(),i.cellMargin=t.cellMargin.value(),i.cellPadding=t.cellPadding.value(),i.alignment=t.alignment.value(),i.bgColor=t.bgColor.value(),i.className=t.className.value,i.id=t.id.value,i.borderWidth=t.borderWidth.value(),i.borderColor=t.borderColor.value(),i.borderStyle=t.borderStyle.value(),i.wrapText=t.wrapText.checked},_collectAccessibilityViewValues:function(n){var i=n.tableProperties,t=this.components.accessibilityView;i.captionContent=t.captionContent.value,i.captionAlignment=t.captionAlignment.value(),i.summary=t.summary.value,i.cellsWithHeaders=t.cellsWithHeaders.checked},_addUnit:function(t,i){i&&n.inArray(i,t)==-1&&t.push(i)},_initTableViewComponents:function(n,t){var f=this.components,u=f.tableView={},r=t.tableProperties=t.tableProperties||{};r.borderStyle=r.borderStyle||"",this._addUnit(i,r.widthUnit),this._addUnit(i,r.heightUnit),this._initNumericTextbox(n.find("#k-editor-table-width"),"width",r,u),this._initNumericTextbox(n.find("#k-editor-table-height"),"height",r,u),this._initNumericTextbox(n.find("#k-editor-table-columns"),"columns",r,u,{min:1,value:4}),this._initNumericTextbox(n.find("#k-editor-table-rows"),"rows",r,u,{min:1,value:4}),this._initDropDownList(n.find("#k-editor-table-width-type"),"widthUnit",r,u,i),this._initDropDownList(n.find("#k-editor-table-height-type"),"heightUnit",r,u,i),this._initNumericTextbox(n.find("#k-editor-table-cell-spacing"),"cellSpacing",r,u),this._initNumericTextbox(n.find("#k-editor-table-cell-padding"),"cellPadding",r,u),this._initTableAlignmentDropDown(n.find("#k-editor-table-alignment"),r),this._initColorPicker(n.find("#k-editor-table-bg"),"bgColor",r,u),this._initInput(n.find("#k-editor-css-class"),"className",r,u),this._initInput(n.find("#k-editor-id"),"id",r,u),this._initNumericTextbox(n.find("#k-editor-border-width"),"borderWidth",r,u),this._initColorPicker(n.find("#k-editor-border-color"),"borderColor",r,u),this._initDropDownList(n.find("#k-editor-border-style"),"borderStyle",r,u,s),this._initCheckbox(n.find("#k-editor-collapse-borders"),"collapseBorders",r,u)},_initCellViewComponents:function(n,t){var r,f=this.components,u=f.cellView={};t.selectedCells=t.selectedCells=t.selectedCells||[],r=t.selectedCells[0]||{borderStyle:"",wrapText:!0},this._addUnit(i,r.widthUnit),this._addUnit(i,r.heightUnit),this._initCheckbox(n.find("#k-editor-selectAllCells"),"selectAllCells",t.tableProperties,u),this._initNumericTextbox(n.find("#k-editor-cell-width"),"width",r,u),this._initNumericTextbox(n.find("#k-editor-cell-height"),"height",r,u),this._initDropDownList(n.find("#k-editor-cell-width-type"),"widthUnit",r,u,i),this._initDropDownList(n.find("#k-editor-cell-height-type"),"heightUnit",r,u,i),this._initNumericTextbox(n.find("#k-editor-table-cell-margin"),"cellMargin",r,u),this._initNumericTextbox(n.find("#k-editor-table-cells-padding"),"cellPadding",r,u),this._initCellAlignmentDropDown(n.find("#k-editor-cell-alignment"),r),this._initColorPicker(n.find("#k-editor-cell-bg"),"bgColor",r,u),this._initInput(n.find("#k-editor-cell-css-class"),"className",r,u),this._initInput(n.find("#k-editor-cell-id"),"id",r,u),this._initNumericTextbox(n.find("#k-editor-cell-border-width"),"borderWidth",r,u),this._initColorPicker(n.find("#k-editor-cell-border-color"),"borderColor",r,u),this._initDropDownList(n.find("#k-editor-cell-border-style"),"borderStyle",r,u,s),this._initCheckbox(n.find("#k-editor-wrap-text"),"wrapText",r,u)},_initAccessibilityViewComponents:function(n,t){var u=this.components,r=u.accessibilityView={},i=t.tableProperties;this._initInput(n.find("#k-editor-table-caption"),"captionContent",i,r),this._initAccessibilityAlignmentDropDown(n.find("#k-editor-accessibility-alignment"),i),this._initInput(n.find("#k-editor-accessibility-summary"),"summary",i,r),this._initCheckbox(n.find("#k-editor-cells-headers"),"cellsWithHeaders",i,r)},_initNumericTextbox:function(t,i,r,u,f){var e=u[i]=t.kendoNumericTextBox(f?n.extend({},o,f):o).data("kendoNumericTextBox");i in r&&e.value(parseInt(r[i],10))},_initDropDownList:function(n,t,i,r,u){var f=r[t]=n.kendoDropDownList({dataSource:u}).data("kendoDropDownList");this._setComponentValue(f,i,t)},_initTableAlignmentDropDown:function(n,t){var r=this.options.messages,u=this.components.tableView,i=e.dataSource;i[0].tooltip=r.alignLeft,i[1].tooltip=r.alignCenter,i[2].tooltip=r.alignRight,i[3].tooltip=r.alignRemove,this._initAlignmentDropDown(n,e,"alignment",t,u)},_initCellAlignmentDropDown:function(n,t){var r=this.options.messages,f=this.components.cellView,i=u.dataSource;i[0].tooltip=r.alignLeftTop,i[1].tooltip=r.alignCenterTop,i[2].tooltip=r.alignRightTop,i[3].tooltip=r.alignLeftMiddle,i[4].tooltip=r.alignCenterMiddle,i[5].tooltip=r.alignRightMiddle,i[6].tooltip=r.alignLeftBottom,i[7].tooltip=r.alignCenterBottom,i[8].tooltip=r.alignRightBottom,i[9].tooltip=r.alignRemove,this._initAlignmentDropDown(n,u,"alignment",t,f)},_initAccessibilityAlignmentDropDown:function(n,t){var r=this.options.messages,u=this.components.accessibilityView,i=f.dataSource;i[0].tooltip=r.alignLeftTop,i[1].tooltip=r.alignCenterTop,i[2].tooltip=r.alignRightTop,i[3].tooltip=r.alignLeftBottom,i[4].tooltip=r.alignCenterBottom,i[5].tooltip=r.alignRightBottom,i[6].tooltip=r.alignRemove,this._initAlignmentDropDown(n,f,"captionAlignment",t,u)},_initAlignmentDropDown:function(n,t,i,r,u){var f=u[i]=n.kendoDropDownList(t).data("kendoDropDownList");f.list.addClass("k-align").css("width","110px"),this._setComponentValue(f,r,i)},_setComponentValue:function(n,t,i){i in t&&n.value(t[i])},_initColorPicker:function(n,t,i,r){var u=r[t]=n.kendoColorPicker({buttons:!1,clearButton:!0}).data("kendoColorPicker");i[t]&&u.value(i[t])},_initInput:function(n,t,i,r){var u=r[t]=n.get(0);t in i&&(u.value=i[t])},_initCheckbox:function(n,t,i,r){var u=r[t]=n.get(0);t in i&&(u.checked=i[t])},destroy:function(){this._destroyComponents(this.components.tableView),this._destroyComponents(this.components.cellView),this._destroyComponents(this.components.accessibilityView),this._destroyComponents(this.components),delete this.components},_destroyComponents:function(n){for(var t in n)n[t].destroy&&n[t].destroy(),delete n[t]},_dialogTemplate:function(n){return r.template(c)({messages:n})}});r.ui.editor.TableWizardDialog=h}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.editor.min",["kendo.combobox.min","kendo.dropdownlist.min","kendo.resizable.min","kendo.window.min","kendo.colorpicker.min","kendo.imagebrowser.min","kendo.tabstrip.min","kendo.numerictextbox.min","util/undoredostack.min","editor/main.min","editor/dom.min","editor/serializer.min","editor/range.min","editor/system.min","editor/inlineformat.min","editor/formatblock.min","editor/linebreak.min","editor/lists.min","editor/link.min","editor/file.min","editor/image.min","editor/components.min","editor/indent.min","editor/viewhtml.min","editor/formatting.min","editor/toolbar.min","editor/tables.min","editor/export.min","editor/import.min","editor/resizing/column-resizing.min","editor/resizing/row-resizing.min","editor/resizing/table-resizing.min","editor/resizing/table-resize-handle.min","editor/immutables.min","editor/table-wizard/table-wizard-command.min","editor/table-wizard/table-wizard-dialog.min"],n)}(function(){return window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.maskedtextbox.min",["kendo.core.min"],n)}(function(){return function(n,t){function r(n){return n+o}function ut(n,t){for(var i=0;i<t.length&&n[i]===t[i];)i++;return i}var g=window,d=g.Math.min,i=g.kendo,h=i.caret,b=i.keys,k=i.ui,s=k.Widget,o=".kendoMaskedTextBox",u=n.proxy,e=window.setTimeout,tt="k-state-disabled",it="k-state-invalid",nt="disabled",a="readonly",f="change",v="mouseup",c="drop",l="keydown",p="paste",y="input",w=r(i.support.propertyChangeEvent?"propertychange":y),rt=s.extend({init:function(t,r){var f,c,u=this;s.fn.init.call(u,t,r),u._rules=n.extend({},u.rules,u.options.rules),t=u.element,f=t[0],u._wrapper(),u._tokenize(),u._form(),u.element.addClass("k-textbox").attr("autocomplete","off").on("focus"+o,function(){var n=f.value;n?u._togglePrompt(!0):f.value=u._old=u._emptyMask,u._oldValue=n,u._timeoutId=e(function(){h(t,0,n?u._maskLength:0)})}).on("focusout"+o,function(){var n=t.val();clearTimeout(u._timeoutId),f.value=u._old="",n!==u._emptyMask&&(f.value=u._old=n),u._change(),u._togglePrompt()}),c=t.is("[disabled]")||n(u.element).parents("fieldset").is(":disabled"),c?u.enable(!1):u.readonly(t.is("[readonly]")),u.value(u.options.value||t.val()),u._validationIcon=n("<span class='k-icon k-i-warning'></span>").insertAfter(t),i.notify(u)},options:{name:"MaskedTextBox",clearPromptChar:!1,unmaskOnPost:!1,promptChar:"_",culture:"",rules:{},value:"",mask:""},events:[f],rules:{0:/\d/,9:/\d|\s/,"#":/\d|\s|\+|\-/,L:/[a-zA-Z]/,"?":/[a-zA-Z]|\s/,"&":/\S/,C:/./,A:/[a-zA-Z0-9]/,a:/[a-zA-Z0-9]|\s/},setOptions:function(t){var i=this;s.fn.setOptions.call(i,t),i._rules=n.extend({},i.rules,i.options.rules),i._tokenize(),this._unbindInput(),this._bindInput(),i.value(i.element.val())},destroy:function(){var n=this;n.element.off(o),n._formElement&&(n._formElement.off("reset",n._resetHandler),n._formElement.off("submit",n._submitHandler)),s.fn.destroy.call(n)},raw:function(){var n=this._unmask(this.element.val(),0);return n.replace(RegExp(this.options.promptChar,"g"),"")},value:function(n){var r=this.element,u=this._emptyMask;return n===t?this.element.val():(null===n&&(n=""),u?(n=this._unmask(n+""),r.val(n?u:""),this._mask(0,this._maskLength,n),this._unmaskedValue=null,n=r.val(),this._oldValue=n,i._activeElement()!==r&&(n===u?r.val(""):this._togglePrompt()),t):(this._oldValue=n,r.val(n),t))},_togglePrompt:function(n){var i=this.element[0],t=i.value;this.options.clearPromptChar&&(t=n?this._oldValue:t.replace(RegExp(this.options.promptChar,"g")," "),i.value=this._old=t)},readonly:function(n){this._editable({readonly:n===t||n,disable:!1})},enable:function(n){this._editable({readonly:!1,disable:!(n=n===t||n)})},_bindInput:function(){var t,e,n=this;n._maskLength&&(n.options.$angular&&n.element.off(y),n.element.on(r(l),u(n._keydown,n)).on(r(c),u(n._drop,n)).on(r(f),u(n._trackChange,n)).on(w,u(n._inputHandler,n)),i.support.browser.msie&&(t=i.support.browser.version,t>8&&t<11&&(e=[r(v),r(c),r(l),r(p)].join(" "),n.element.on(e,u(n._legacyIEInputHandler,n)))))},_unbindInput:function(){var n=[w,r(l),r(v),r(c),r(p)].join(" ");this.element.off(n)},_editable:function(n){var t=this,u=t.element,f=t.wrapper,i=n.disable,r=n.readonly;t._unbindInput(),r||i?(u.attr(nt,i).attr(a,r),f.toggleClass(tt,i)):(u.removeAttr(nt).removeAttr(a),f.removeClass(tt),t._bindInput())},_change:function(){var n=this,t=n.value();t!==n._oldValue?(n._oldValue=t,n.trigger(f),n.element.trigger(f)):""===t&&n.__changing&&n.element.trigger(f)},inputChange:function(n){var r,y,u,s,v,t=this,c=t._old,e=t.element[0],f=e.value,p=h(e),o=p[1],l=f.length-c.length,a=i.support.mobileOS;t.__dropping&&l<0||(l===-1&&a.android&&"chrome"===a.browser&&(n=!0),r=d(o,ut(f,c)),y=f.substring(r,o),e.value=f.substring(0,r)+t._emptyMask.substring(r),u=t._mask(r,o,y),s=t._trimStartPromptChars(f.substring(o),d(l,u-r)),v=t._unmask(s,c.length-s.length),t._mask(u,u,v),n&&(u=t._findCaretPosBackwards(r)),h(e,u),t.__dropping=!1)},_trimStartPromptChars:function(n,t){for(var i=this.options.promptChar;t-->0&&0===n.indexOf(i);)n=n.substring(1);return n},_findCaretPosBackwards:function(n){var t=this._find(n,!0);return t<n&&(t+=1),t},_inputHandler:function(){i._activeElement()===this.element[0]&&this.inputChange(this.__backward)},_legacyIEInputHandler:function(n){var t=this,r=t.element[0],u=r.value,i=n.type;t.__pasting="paste"===i,e(function(){"mouseup"===i&&t.__pasting||r.value!==u&&t.inputChange(t.__backward)})},_trackChange:function(){var n=this;n.__changing=!0,e(function(){n.__changing=!1})},_form:function(){var t=this,r=t.element,u=r.attr("form"),i=u?n("#"+u):r.closest("form");i[0]&&(t._resetHandler=function(){e(function(){t.value(r[0].value)})},t._submitHandler=function(){t.element[0].value=t._old=t.raw()},t.options.unmaskOnPost&&i.on("submit",t._submitHandler),t._formElement=i.on("reset",t._resetHandler))},_keydown:function(n){var t=n.keyCode;this.__backward=t===b.BACKSPACE,t===b.ENTER&&this._change()},_drop:function(){this.__dropping=!0},_find:function(n,t){var r=this.element.val()||this._emptyMask,i=1;for(t===!0&&(i=-1);n>-1||n<=this._maskLength;){if(r.charAt(n)!==this.tokens[n])return n;n+=i}return-1},_mask:function(n,r,u,f){var a,c,v,e,s=this.element[0],o=s.value||this._emptyMask,y=this.options.promptChar,l=0;for(n=this._find(n,f),n>r&&(r=n),c=this._unmask(o.substring(r),r),u=this._unmask(u,n),a=u.length,u&&(c=c.replace(RegExp("^_{0,"+a+"}"),"")),u+=c,o=o.split(""),v=u.charAt(l);n<this._maskLength;)o[n]=v||y,v=u.charAt(++l),e===t&&l>a&&(e=n),n=this._find(n+1);return s.value=this._old=o.join(""),i._activeElement()===s&&(e===t&&(e=this._maskLength),h(s,e)),e},_unmask:function(t,i){var u,r,o,f,s,h,c,e;if(!t)return"";if(this._unmaskedValue===t)return this._unmaskedValue;for(t=(t+"").split(""),o=0,f=i||0,s=this.options.promptChar,h=t.length,c=this.tokens.length,e="";f<c&&(u=t[o],r=this.tokens[f],u===r||u===s?(e+=u===s?s:"",o+=1,f+=1):"string"!=typeof r?(r&&r.test&&r.test(u)||n.isFunction(r)&&r(u)?(e+=u,f+=1):1===h&&this._blinkInvalidState(),o+=1):f+=1,!(o>=h)););return this._unmaskedValue=e,e},_wrapper:function(){var i=this,r=i.element,n=r[0],t=r.wrap("<span class='k-widget k-maskedtextbox'></span>").parent();t[0].style.cssText=n.style.cssText,n.style.width="100%",i.wrapper=t.addClass(n.className)},_blinkInvalidState:function(){var n=this;n.wrapper.addClass(it),clearTimeout(n._invalidStateTimeout),n._invalidStateTimeout=e(u(n._removeInvalidState,n),100)},_removeInvalidState:function(){var n=this;n.wrapper.removeClass(it),n._invalidStateTimeout=null},_tokenize:function(){for(var n,h,r,s,o=[],u=0,v=this.options.mask||"",e=v.split(""),y=e.length,t=0,f="",a=this.options.promptChar,c=i.getCulture(this.options.culture).numberFormat,l=this._rules;t<y;t++)if(n=e[t],h=l[n])o[u]=h,f+=a,u+=1;else for("."===n||","===n?n=c[n]:"$"===n?n=c.currency.symbol:"\\"===n&&(t+=1,n=e[t]),n=n.split(""),r=0,s=n.length;r<s;r++)o[u]=n[r],f+=n[r],u+=1;this.tokens=o,this._emptyMask=f,this._maskLength=f.length}});k.plugin(rt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.toolbar.min",["kendo.core.min","kendo.userevents.min","kendo.popup.min"],n)}(function(){return function(n,t){function wi(){var r,t=this.options.anchor,n=g(t);i.wrap(this.element).addClass("k-split-wrapper"),r="border-box"!==this.element.css("box-sizing")?n-(g(this.element)-this.element.width()):n,this.element.css({fontFamily:t.css("font-family"),"min-width":r})}function hi(n){n.target.is(".k-toggle-button")||n.target.toggleClass(v,"press"==n.type)}function ci(t){return t=n(t),t.hasClass("km-actionsheet")?t.closest(".km-popup-wrapper"):t.addClass("km-widget km-actionsheet").wrap('<div class="km-actionsheet-wrapper km-actionsheet-tablet km-widget km-popup"></div>').parent().wrap('<div class="km-popup-wrapper k-popup"></div>').parent()}function at(n){n.preventDefault()}function a(t,i){var u="next"===i?n.fn.next:n.fn.prev,f="next"===i?n.fn.first:n.fn.last,r=u.call(t);return r.is(":kendoFocusable")||!r.length?r:r.find(":kendoFocusable").length?f.call(r.find(":kendoFocusable")):a(r,i)}var d,u,w,p,b,it,et,rt,ft,ot,ei,ri,ut,st,oi,si,i=window.kendo,yi=i.Class,ht=i.ui.Widget,lt=n.proxy,y=i.isFunction,r=i.keys,g=i._outerWidth,nr="k-toolbar",o="k-button",tt="k-overflow-button",ui="k-toggle-button",l="k-button-group",s="k-split-button",li="k-separator",fi="k-popup",gi="k-toolbar-resizable",v="k-state-active",ai="k-state-disabled",c="k-state-hidden",di="k-group-start",vi="k-group-end",pi="k-primary",nt="k-icon",pt="k-i-",tr="k-button-icon",ir="k-button-icontext",ki="k-list-container k-split-container",wt="k-split-button-arrow",k="k-overflow-anchor",bt="k-overflow-container",ni="k-toolbar-first-visible",ti="k-toolbar-last-visible",h="click",yt="toggle",kt="open",dt="close",gt="overflowOpen",ii="overflowClose",vt="never",ct="auto",bi="always",e="k-overflow-hidden",f=i.attr("uid");i.toolbar={},d={overflowAnchor:'<div tabindex="0" class="k-overflow-anchor"></div>',overflowContainer:'<ul class="k-overflow-container k-list-container"></ul>'},i.toolbar.registerComponent=function(n,t,i){d[n]={toolbar:t,overflow:i}},u=i.Class.extend({addOverflowAttr:function(){this.element.attr(i.attr("overflow"),this.options.overflow||ct)},addUidAttr:function(){this.element.attr(f,this.options.uid)},addIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id)},addOverflowIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id+"_overflow")},attributes:function(){this.options.attributes&&this.element.attr(this.options.attributes)},show:function(){this.element.removeClass(c).show(),this.options.hidden=!1},hide:function(){this.element.addClass(c).hide(),this.options.hidden=!0},remove:function(){this.element.remove()},enable:function(n){n===t&&(n=!0),this.element.toggleClass(ai,!n),this.options.enable=n},twin:function(){var n=this.element.attr(f);return this.overflow?this.toolbar.element.find("["+f+"='"+n+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+f+"='"+n+"']").data(this.options.type):t}}),i.toolbar.Item=u,w=u.extend({init:function(r,u){var f=n(r.useButtonTag?'<button tabindex="0"></button>':'<a href tabindex="0"></a>');this.element=f,this.options=r,this.toolbar=u,this.attributes(),r.primary&&f.addClass(pi),r.togglable&&(f.addClass(ui),this.toggle(r.selected)),r.url===t||r.useButtonTag||(f.attr("href",r.url),r.mobile&&f.attr(i.attr("role"),"button")),r.group&&(f.attr(i.attr("group"),r.group),this.group=this.toolbar.addToGroup(this,r.group)),!r.togglable&&r.click&&y(r.click)&&(this.clickHandler=r.click),r.togglable&&r.toggle&&y(r.toggle)&&(this.toggleHandler=r.toggle)},toggle:function(n,t){n=!!n,this.group&&n?this.group.select(this):this.group||this.select(n),t&&this.twin()&&this.twin().toggle(n)},getParentGroup:function(){if(this.options.isChild)return this.element.closest("."+l).data("buttonGroup")},_addGraphics:function(){var e,t,r,i=this.element,o=this.options.icon,u=this.options.spriteCssClass,f=this.options.imageUrl;(u||f||o)&&(e=!0,i.contents().filter(function(){return!n(this).hasClass("k-sprite")&&!n(this).hasClass(nt)&&!n(this).hasClass("k-image")}).each(function(t,i){(1==i.nodeType||3==i.nodeType&&n.trim(i.nodeValue).length>0)&&(e=!1)}),i.addClass(e?tr:ir)),o?(t=i.children("span."+nt).first(),t[0]||(t=n('<span class="'+nt+'"></span>').prependTo(i)),t.addClass(pt+o)):u?(t=i.children("span.k-sprite").first(),t[0]||(t=n('<span class="k-sprite '+nt+'"></span>').prependTo(i)),t.addClass(u)):f&&(r=i.children("img.k-image").first(),r[0]||(r=n('<img alt="icon" class="k-image" />').prependTo(i)),r.attr("src",f))}}),i.toolbar.Button=w,p=w.extend({init:function(n,t){w.fn.init.call(this,n,t);var i=this.element;i.addClass(o),this.addIdAttr(),n.align&&i.addClass("k-align-"+n.align),"overflow"!=n.showText&&n.text&&i.html(n.mobile?'<span class="km-text">'+n.text+"</span>":n.text),n.hasIcon="overflow"!=n.showIcon&&(n.icon||n.spriteCssClass||n.imageUrl),n.hasIcon&&this._addGraphics(),this.addUidAttr(),this.addOverflowAttr(),this.enable(n.enable),n.hidden&&this.hide(),this.element.data({type:"button",button:this})},select:function(n){n===t&&(n=!1),this.element.toggleClass(v,n),this.options.selected=n}}),i.toolbar.ToolBarButton=p,b=w.extend({init:function(n,t){this.overflow=!0,w.fn.init.call(this,n,t);var i=this.element;"toolbar"!=n.showText&&n.text&&i.html(n.mobile?'<span class="km-text">'+n.text+"</span>":'<span class="k-text">'+n.text+"</span>"),n.hasIcon="toolbar"!=n.showIcon&&(n.icon||n.spriteCssClass||n.imageUrl),n.hasIcon&&this._addGraphics(),n.isChild||this._wrap(),this.addOverflowIdAttr(),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.enable(n.enable),i.addClass(tt+" "+o),n.hidden&&this.hide(),n.togglable&&this.toggle(n.selected),this.element.data({type:"button",button:this})},_wrap:function(){this.element=this.element.wrap("<li></li>").parent()},overflowHidden:function(){this.element.addClass(e)},select:function(n){n===t&&(n=!1),this.options.isChild?this.element.toggleClass(v,n):this.element.find(".k-button").toggleClass(v,n),this.options.selected=n}}),i.toolbar.OverflowButton=b,i.toolbar.registerComponent("button",p,b),it=u.extend({createButtons:function(t){for(var f,e=this.options,u=e.buttons||[],r=0;r<u.length;r++)u[r].uid||(u[r].uid=i.guid()),f=new t(n.extend({mobile:e.mobile,isChild:!0,type:"button"},u[r]),this.toolbar),f.element.appendTo(this.element)},refresh:function(){this.element.children().filter(":not('."+c+"'):first").addClass(di),this.element.children().filter(":not('."+c+"'):last").addClass(vi)}}),i.toolbar.ButtonGroup=it,et=it.extend({init:function(t,i){var r=this.element=n("<div></div>");this.options=t,this.toolbar=i,this.addIdAttr(),t.align&&r.addClass("k-align-"+t.align),this.createButtons(p),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),r.addClass(l),this.element.data({type:"buttonGroup",buttonGroup:this})}}),i.toolbar.ToolBarButtonGroup=et,rt=it.extend({init:function(t,i){var r=this.element=n("<li></li>");this.options=t,this.toolbar=i,this.overflow=!0,this.addOverflowIdAttr(),this.createButtons(b),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),r.addClass((t.mobile?"":l)+" k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(e)}}),i.toolbar.OverflowButtonGroup=rt,i.toolbar.registerComponent("buttonGroup",et,rt),ft=u.extend({init:function(t,i){var r=this.element=n('<div class="'+s+'" tabindex="0"></div>');this.options=t,this.toolbar=i,this.mainButton=new p(n.extend({},t,{hidden:!1}),i),this.arrowButton=n('<a class="'+o+" "+wt+'"><span class="'+(t.mobile?"km-icon km-arrowdown":"k-icon k-i-arrow-60-down")+'"></span></a>'),this.popupElement=n('<ul class="'+ki+'"></ul>'),this.mainButton.element.removeAttr("href tabindex").appendTo(r),this.arrowButton.appendTo(r),this.popupElement.appendTo(r),t.align&&r.addClass("k-align-"+t.align),t.id||(t.id=t.uid),r.attr("id",t.id+"_wrapper"),this.addOverflowAttr(),this.addUidAttr(),this.createMenuButtons(),this.createPopup(),this._navigatable(),this.mainButton.main=!0,this.enable(t.enable),t.hidden&&this.hide(),r.data({type:"splitButton",splitButton:this,kendoPopup:this.popup})},_navigatable:function(){var t=this;t.popupElement.on("keydown","."+o,function(i){var u=n(i.target).parent();i.preventDefault(),i.keyCode===r.ESC||i.keyCode===r.TAB||i.altKey&&i.keyCode===r.UP?(t.toggle(),t.focus()):i.keyCode===r.DOWN?a(u,"next").focus():i.keyCode===r.UP?a(u,"prev").focus():i.keyCode!==r.SPACEBAR&&i.keyCode!==r.ENTER||t.toolbar.userEvents.trigger("tap",{target:n(i.target)})})},createMenuButtons:function(){for(var u,i=this.options,r=i.menuButtons,t=0;t<r.length;t++)u=new p(n.extend({mobile:i.mobile,type:"button",click:i.click},r[t]),this.toolbar),u.element.wrap("<li></li>").parent().appendTo(this.popupElement)},createPopup:function(){var t=this.options,i=this.element;this.popupElement.attr("id",t.id+"_optionlist").attr(f,t.rootUid),t.mobile&&(this.popupElement=ci(this.popupElement)),this.popup=this.popupElement.kendoPopup({appendTo:t.mobile?n(t.mobile).children(".km-pane"):null,anchor:i,isRtl:this.toolbar._isRtl,copyAnchorStyles:!1,animation:t.animation,open:wi,activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(){i.focus()}}).data("kendoPopup"),this.popup.element.on(h,"a.k-button",at)},remove:function(){this.popup.element.off(h,"a.k-button"),this.popup.destroy(),this.element.remove()},toggle:function(){this.popup.toggle()},enable:function(n){n===t&&(n=!0),this.mainButton.enable(n),this.options.enable=n},focus:function(){this.element.focus()},hide:function(){this.popup&&this.popup.close(),this.element.addClass(c).hide(),this.options.hidden=!0},show:function(){this.element.removeClass(c).hide(),this.options.hidden=!1}}),i.toolbar.ToolBarSplitButton=ft,ot=u.extend({init:function(t,i){var e,r,u=this.element=n('<li class="'+s+'"></li>'),f=t.menuButtons;for(this.options=t,this.toolbar=i,this.overflow=!0,this.mainButton=new b(n.extend({isChild:!0},t)),this.mainButton.element.appendTo(u),r=0;r<f.length;r++)e=new b(n.extend({mobile:t.mobile,isChild:!0},f[r]),this.toolbar),e.element.appendTo(u);this.addUidAttr(),this.addOverflowAttr(),this.mainButton.main=!0,u.data({type:"splitButton",splitButton:this})},overflowHidden:function(){this.element.addClass(e)}}),i.toolbar.OverflowSplitButton=ot,i.toolbar.registerComponent("splitButton",ft,ot),ei=u.extend({init:function(t,i){var r=this.element=n("<div>&nbsp;</div>");this.element=r,this.options=t,this.toolbar=i,this.attributes(),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),r.addClass(li),r.data({type:"separator",separator:this})}}),ri=u.extend({init:function(t,i){var r=this.element=n("<li>&nbsp;</li>");this.element=r,this.options=t,this.toolbar=i,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),r.addClass(li),r.data({type:"separator",separator:this})},overflowHidden:function(){this.element.addClass(e)}}),i.toolbar.registerComponent("separator",ei,ri),ut=u.extend({init:function(t,i,r){var u=y(t)?t(i):t;u=u instanceof jQuery?u.wrap("<div></div>").parent():n("<div></div>").html(u),this.element=u,this.options=i,this.options.type="template",this.toolbar=r,this.attributes(),this.addUidAttr(),this.addIdAttr(),this.addOverflowAttr(),u.data({type:"template",template:this})}}),i.toolbar.TemplateItem=ut,st=u.extend({init:function(t,i,r){var u=n(y(t)?t(i):t);u=u instanceof jQuery?u.wrap("<li></li>").parent():n("<li></li>").html(u),this.element=u,this.options=i,this.options.type="template",this.toolbar=r,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),this.addOverflowAttr(),u.data({type:"template",template:this})},overflowHidden:function(){this.element.addClass(e)}}),i.toolbar.OverflowTemplateItem=st,oi=yi.extend({init:function(n){this.name=n,this.buttons=[]},add:function(n){this.buttons[this.buttons.length]=n},remove:function(t){var i=n.inArray(t,this.buttons);this.buttons.splice(i,1)},select:function(n){for(var i,t=0;t<this.buttons.length;t++)i=this.buttons[t],i.select(!1);n.select(!0),n.twin()&&n.twin().select(!0)}}),si=ht.extend({init:function(t,r){var e,u=this;if(ht.fn.init.call(u,t,r),r=u.options,t=u.wrapper=u.element,t.addClass(nr+" k-widget"),this.uid=i.guid(),this._isRtl=i.support.isRtl(t),this._groups={},t.attr(f,this.uid),u.isMobile="boolean"==typeof r.mobile?r.mobile:u.element.closest(".km-root")[0],u.animation=u.isMobile?{open:{effects:"fade"}}:{},u.isMobile&&(t.addClass("km-widget"),nt="km-icon",pt="km-",o="km-button",l="km-buttongroup km-widget",v="km-state-active",ai="km-state-disabled"),r.resizable?(u._renderOverflow(),t.addClass(gi),u.overflowUserEvents=new i.UserEvents(u.element,{threshold:5,allowSelection:!0,filter:"."+k,tap:lt(u._toggleOverflow,u)}),u._resizeHandler=i.onResize(function(){u.resize()})):u.popup={element:n([])},r.items&&r.items.length)for(e=0;e<r.items.length;e++)u.add(r.items[e]);u.userEvents=new i.UserEvents(document,{threshold:5,allowSelection:!0,filter:"["+f+"="+this.uid+"] a."+o+", ["+f+"="+this.uid+"] ."+tt,tap:lt(u._buttonClick,u),press:hi,release:hi}),u.element.on(h,"a.k-button",at),u._navigatable(),r.resizable&&u.popup.element.on(h,NaN,at),r.resizable&&this._toggleOverflowAnchor(),i.notify(u)},events:[h,yt,kt,dt,gt,ii],options:{name:"ToolBar",items:[],resizable:!0,mobile:null},addToGroup:function(n,t){var i;return i=this._groups[t]?this._groups[t]:this._groups[t]=new oi,i.add(n),i},destroy:function(){var t=this;t.element.find("."+s).each(function(t,i){n(i).data("kendoPopup").destroy()}),t.element.off(h,"a.k-button"),t.userEvents.destroy(),t.options.resizable&&(i.unbindResize(t._resizeHandler),t.overflowUserEvents.destroy(),t.popup.element.off(h,"a.k-button"),t.popup.destroy()),ht.fn.destroy.call(t)},add:function(t){var u,f,o,e=d[t.type],h=t.template,r=this,c=r.isMobile?"":"k-item k-state-default",s=t.overflowTemplate;if(n.extend(t,{uid:i.guid(),animation:r.animation,mobile:r.isMobile,rootUid:r.uid}),t.menuButtons)for(o=0;o<t.menuButtons.length;o++)n.extend(t.menuButtons[o],{uid:i.guid()});h&&!s?t.overflow=vt:t.overflow||(t.overflow=ct),t.overflow!==vt&&r.options.resizable&&(s?f=new st(s,t,r):e&&(f=new e.overflow(t,r),f.element.addClass(c)),f&&(t.overflow===ct&&f.overflowHidden(),f.element.appendTo(r.popup.container),r.angular("compile",function(){return{elements:f.element.get()}}))),t.overflow!==bi&&(h?u=new ut(h,t,r):e&&(u=new e.toolbar(t,r)),u&&(r.options.resizable?(u.element.appendTo(r.element).css("visibility","hidden"),r._shrink(r.element.innerWidth()),u.element.css("visibility","visible")):u.element.appendTo(r.element),r.angular("compile",function(){return{elements:u.element.get()}})))},_getItem:function(t){var i,f,u,r,e=this.options.resizable;return i=this.element.find(t),i.length||(i=n(".k-split-container[data-uid="+this.uid+"]").find(t)),r=i.length?i.data("type"):"",f=i.data(r),f?(f.main&&(i=i.parent("."+s),r="splitButton",f=i.data(r)),e&&(u=f.twin())):e&&(i=this.popup.element.find(t),r=i.length?i.data("type"):"",u=i.data(r),u&&u.main&&(i=i.parent("."+s),r="splitButton",u=i.data(r))),{type:r,toolbar:f,overflow:u}},remove:function(n){var t=this._getItem(n);t.toolbar&&t.toolbar.remove(),t.overflow&&t.overflow.remove(),this.resize(!0)},hide:function(n){var t=this._getItem(n);t.toolbar&&("button"===t.toolbar.options.type&&t.toolbar.options.isChild?(t.toolbar.hide(),t.toolbar.getParentGroup().refresh()):t.toolbar.options.hidden||t.toolbar.hide()),t.overflow&&("button"===t.overflow.options.type&&t.overflow.options.isChild?(t.overflow.hide(),t.overflow.getParentGroup().refresh()):t.overflow.options.hidden||t.overflow.hide()),this.resize(!0)},show:function(n){var t=this._getItem(n);t.toolbar&&("button"===t.toolbar.options.type&&t.toolbar.options.isChild?(t.toolbar.show(),t.toolbar.getParentGroup().refresh()):t.toolbar.options.hidden&&t.toolbar.show()),t.overflow&&("button"===t.overflow.options.type&&t.overflow.options.isChild?(t.toolbar.show(),t.overflow.getParentGroup().refresh()):t.overflow.options.hidden&&t.overflow.show()),this.resize(!0)},enable:function(n,i){var r=this._getItem(n);t===i&&(i=!0),r.toolbar&&r.toolbar.enable(i),r.overflow&&r.overflow.enable(i)},getSelectedFromGroup:function(n){return this.element.find("."+ui+"[data-group='"+n+"']").filter("."+v)},toggle:function(i,r){var f=n(i),u=f.data("button");u.options.togglable&&(r===t&&(r=!0),u.toggle(r,!0))},_renderOverflow:function(){var t=this,e=d.overflowContainer,u=t._isRtl,h=u?"left":"right";t.overflowAnchor=n(d.overflowAnchor).addClass(o),t.element.append(t.overflowAnchor),t.isMobile?(t.overflowAnchor.append('<span class="km-icon km-more"></span>'),e=ci(e)):t.overflowAnchor.append('<span class="k-icon k-i-arrow-60-down"></span>'),t.popup=new i.ui.Popup(e,{origin:"bottom "+h,position:"top "+h,anchor:t.overflowAnchor,isRtl:u,animation:t.animation,appendTo:t.isMobile?n(t.isMobile).children(".km-pane"):null,copyAnchorStyles:!1,open:function(r){var f=i.wrap(t.popup.element).addClass("k-overflow-wrapper");t.isMobile?t.popup.container.css("max-height",parseFloat(n(".km-content:visible").innerHeight())-15+"px"):f.css("margin-left",(u?-1:1)*((g(f)-f.width())/2+1)),t.trigger(gt)&&r.preventDefault()},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(n){t.trigger(ii)&&n.preventDefault(),this.element.focus()}}),t.popup.element.on("keydown","."+o,function(i){var o,u=n(i.target),e=u.parent(),f=e.is("."+l)||e.is("."+s);i.preventDefault(),i.keyCode===r.ESC||i.keyCode===r.TAB||i.altKey&&i.keyCode===r.UP?(t._toggleOverflow(),t.overflowAnchor.focus()):i.keyCode===r.DOWN?(o=!f||f&&u.is(":last-child")?e:u,a(o,"next").focus()):i.keyCode===r.UP?(o=!f||f&&u.is(":first-child")?e:u,a(o,"prev").focus()):i.keyCode!==r.SPACEBAR&&i.keyCode!==r.ENTER||t.userEvents.trigger("tap",{target:n(i.target)})}),t.popup.container=t.isMobile?t.popup.element.find("."+bt):t.popup.element,t.popup.container.attr(f,this.uid)},_toggleOverflowAnchor:function(){var n=!1;n=this.options.mobile?this.popup.element.find("."+bt).children(":not(."+e+", ."+fi+")").length>0:this.popup.element.children(":not(."+e+", ."+fi+")").length>0,this.overflowAnchor.css(n?{visibility:"visible",width:""}:{visibility:"hidden",width:"1px"})},_buttonClick:function(i){var l,f,r,c,e,s,a,u=this,v=i.target.closest("."+wt).length;return i.preventDefault(),v?(u._toggle(i),t):(f=n(i.target).closest("."+o,u.element),f.hasClass(k)||(r=f.data("button"),!r&&u.popup&&(f=n(i.target).closest("."+tt,u.popup.container),r=f.parent("li").data("button")),r&&r.options.enable&&(r.options.togglable?(e=y(r.toggleHandler)?r.toggleHandler:null,r.toggle(!r.options.selected,!0),s={target:f,group:r.options.group,checked:r.options.selected,id:r.options.id},e&&e.call(u,s),u.trigger(yt,s)):(e=y(r.clickHandler)?r.clickHandler:null,s={sender:u,target:f,id:r.options.id},e&&e.call(u,s),u.trigger(h,s)),r.options.url&&(r.options.attributes&&r.options.attributes.target&&(a=r.options.attributes.target),window.open(r.options.url,a||"_self")),f.hasClass(tt)&&u.popup.close(),c=f.closest(".k-split-container"),c[0]&&(l=c.data("kendoPopup"),(l?l:c.parents(".km-popup-wrapper").data("kendoPopup")).close()))),t)},_navigatable:function(){var t=this;t.element.attr("tabindex",0).focus(function(){var t=n(this).find(":kendoFocusable:first");0!==t.length&&(t.is("."+k)&&(t=a(t,"next")),t[0].focus())}).on("keydown",lt(t._keydown,t))},_keydown:function(i){var f,h,a,y,c,v,p,u=n(i.target),o=i.keyCode,e=this.element.children(":not(.k-separator):visible");return o===r.TAB&&(f=u.parentsUntil(this.element).last(),h=!1,a=!1,f.length||(f=u),f.is("."+k)&&(i.shiftKey&&i.preventDefault(),e.last().is(":kendoFocusable")?e.last().focus():e.last().find(":kendoFocusable").last().focus()),i.shiftKey||e.index(f)!==e.length-1||(h=!f.is("."+l)||u.is(":last-child")),y=e.index(f)===e.not(".k-overflow-anchor").first().index(),i.shiftKey&&y&&(a=!f.is("."+l)||u.is(":first-child")),h&&this.overflowAnchor&&"hidden"!==this.overflowAnchor.css("visibility")&&(i.preventDefault(),this.overflowAnchor.focus()),a&&(i.preventDefault(),c=this._getPrevFocusable(this.wrapper),c&&c.focus())),i.altKey&&o===r.DOWN?(v=n(document.activeElement).data("splitButton"),p=n(document.activeElement).is("."+k),v?v.toggle():p&&this._toggleOverflow(),t):o!==r.SPACEBAR&&o!==r.ENTER||u.is("input, checkbox")?t:(i.preventDefault(),u.is("."+s)&&(u=u.children().first()),this.userEvents.trigger("tap",{target:u}),t)},_getPrevFocusable:function(i){if(i.is("html"))return i;var u,r,f=i.prevAll();return f.each(function(){return r=n(this),r.is(":kendoFocusable")?(u=r,!1):r.find(":kendoFocusable").length>0?(u=r.find(":kendoFocusable").last(),!1):t}),u?u:this._getPrevFocusable(i.parent())},_toggle:function(t){var r,i=n(t.target).closest("."+s).data("splitButton");t.preventDefault(),i.options.enable&&(r=i.popup.element.is(":visible")?this.trigger(dt,{target:i.element}):this.trigger(kt,{target:i.element}),r||i.toggle())},_toggleOverflow:function(){this.popup.toggle()},_resize:function(n){var t=n.width;this.options.resizable&&(this.popup.close(),this._shrink(t),this._stretch(t),this._markVisibles(),this._toggleOverflowAnchor())},_childrenWidth:function(){var t=0;return this.element.children(":visible:not('."+c+"')").each(function(){t+=g(n(this),!0)}),Math.ceil(t)},_shrink:function(n){var r,i,t;if(n<this._childrenWidth())for(i=this.element.children(":visible:not([data-overflow='never'], ."+k+")"),t=i.length-1;t>=0&&(r=i.eq(t),!(n>this._childrenWidth()));t--)this._hideItem(r)},_stretch:function(n){var r,i,t;if(n>this._childrenWidth())for(i=this.element.children(":hidden:not('."+c+"')"),t=0;t<i.length&&(r=i.eq(t),!(n<this._childrenWidth())&&this._showItem(r,n));t++);},_hideItem:function(n){n.hide(),this.popup&&this.popup.container.find(">li[data-uid='"+n.data("uid")+"']").removeClass(e)},_showItem:function(n,t){return!!(n.length&&t>this._childrenWidth()+g(n,!0))&&(n.show(),this.popup&&this.popup.container.find(">li[data-uid='"+n.data("uid")+"']").addClass(e),!0)},_markVisibles:function(){var i=this.popup.container.children(),r=this.element.children(":not(.k-overflow-anchor)"),n=i.filter(":not(.k-overflow-hidden)"),t=r.filter(":visible");i.add(r).removeClass(ni+" "+ti),n.first().add(t.first()).addClass(ni),n.last().add(t.last()).addClass(ti)}}),i.ui.plugin(si)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.mediaplayer.min",["kendo.slider.min","kendo.toolbar.min","kendo.dropdownlist.min","kendo.tooltip.min"],n)}(function(){return function(n,t){var f=window.kendo,ut="end",nt="pause",it="play",rt="ready",et="timeChange",v="volumeChange",o="k-i-full-screen",s="k-i-full-screen-exit",lt="k-i-volume-off",at="k-i-volume-down",ht="k-i-volume-up",vt="k-mediaplayer-quality",c="k-i-play",tt="k-i-pause",b="k-mediaplayer-titlebar",pt="k-title",wt="k-mediaplayer-toolbar-wrap",ft="k-mediaplayer-toolbar",p="k-mediaplayer-seekbar",st="k-mediaplayer-volume",h="k-mediaplayer-media",ct="k-mediaplayer-overlay",y="k-mediaplayer-yt",r=".",l=f.ui,e=".kendoMediaPlayer",d=new Date(1970,0,1),g=60*d.getTimezoneOffset(),a=f.ui.Widget,k=n.isArray,ot={shortTime:"mm:ss",longTime:"HH:mm:ss"},bt=f.template,i=n.proxy,w=f.keys,u={htmlPlayer:"<video class='"+h+"'> </video>",titleBar:bt("<div class='"+b+"' role='heading'><span class='"+pt+"'>Video Title</span></div>"),toolBar:"<div class='"+wt+"'><div class='"+ft+"'></div></div>",youtubePlayer:"<div class='"+y+"'> </div>",toolBarTime:"<span class='k-mediaplayer-currenttime'>00:00:00</span> / <span class='k-mediaplayer-duration'>00:00:00</span>",slider:"<input class='"+p+"' value='0' title='seekbar' />",volumeSlider:"<input class='"+st+"' title='volume'/>",qualityDropDown:"<input class='"+vt+"' title='video quality' />",toolTip:"#= kendo.toString(new Date(value), 'HH:mm:ss') #"},yt=a.extend({init:function(t,i){this.wrapper=n(t),a.fn.init.call(this,t,i),this.wrapper.addClass("k-mediaplayer k-widget"),i=this.options,this._currentIndex=0,this._createTitlebar(),this._createToolbar(),this._createDropDown(),this._createSlider(),this._createVolumeSlider(),this._timers={},this._aria(),this._navigatable(),i.media&&this.media(this.options.media),f.notify(this)},events:[ut,nt,it,rt,et,v],options:{name:"MediaPlayer",autoPlay:!1,autoRepeat:!1,volume:100,fullScreen:!1,mute:!1,navigatable:!1,forwardSeek:!0,media:null,messages:{pause:"Pause",play:"Play",mute:"Mute",unmute:"Unmute",quality:"Quality",fullscreen:"Full Screen"}},_msToTime:function(n){var t=new Date(d.getTime());return t.setSeconds(n),t},_timeToSec:function(n){var t=+new Date(n);return t/1e3},_createTitlebar:function(){this._titleBar=this.wrapper.find(r+b),0===this._titleBar.length&&(this.wrapper.append(u.titleBar),this._titleBar=this.wrapper.find(r+b))},_createSlider:function(){var n=this.wrapper.find(r+p);this._slider||(this._sliderDragChangeHandler=i(this._sliderDragChange,this),this._sliderDraggingHandler=i(this._sliderDragging,this),n=this.wrapper.find(r+p),this._slider=new l.Slider(n[0],{smallStep:1e3,tickPlacement:"none",showButtons:!1,change:this._sliderDragChangeHandler,slide:this._sliderDraggingHandler,tooltip:{template:u.toolTip},dragHandleTitle:""}))},_createVolumeSlider:function(){var n=this.wrapper.find(r+st);this._volumeSlider||(this._volumeDraggingHandler=i(this._volumeDragging,this),this._volumeChangeHandler=i(this._volumeChange,this),n.width(87),this._volumeSlider=new l.Slider(n[0],{smallStep:1,min:0,max:100,value:this.options.volume,slide:this._volumeDraggingHandler,change:this._volumeChangeHandler,tickPlacement:"none",showButtons:!1,tooltip:{enabled:!1},dragHandleTitle:""}))},_resetTime:function(){this._youTubeVideo?this._ytmedia.seekTo(0,!0):this._media.currentTime=0,this._mediaTimeUpdate(),n.grep(this._toolBar.options.items,function(n){return!!n.template}).template=u.toolBarTime},_currentUrl:function(){var n=this.media();return k(n.source)?n.source[this._currentIndex].url:n.source},_isYouTubeUrl:function(){return!!this._currentUrl().match("youtube.com/|youtu.be/")},_setPlayerUrl:function(){var n,t=this._youTubeVideo;this.stop(),this._youTubeVideo=this._isYouTubeUrl(),t!==this._youTubeVideo&&(this.wrapper.find(r+y).toggle(),this.wrapper.find(r+h).toggle()),n=this._media||this._ytmedia,this._initializePlayer(),n&&(this.mute(this.mute()),this.volume(this.volume())),this._youTubeVideo?this._ytmedia&&(this._videoOverlay&&this._videoOverlay.hide(),this.options.autoPlay?(this._ytmedia.loadVideoById(this._getMediaId()),this._playStateToggle(!0)):(this._ytmedia.cueVideoById(this._getMediaId()),this._playStateToggle(!0))):(this._videoOverlay.show(),this.wrapper.find(r+h+" > source").remove(),this.wrapper.find(r+h).attr("src",this._currentUrl()),this.options.autoPlay&&this.play())},_createToolbar:function(){var t=this.wrapper.find(r+ft);0===t.length&&(this._toolbarClickHandler=i(this._toolbarClick,this),this.wrapper.append(u.toolBar),t=this.wrapper.find(r+ft),t.width(this.wrapper.find(r+h).width()),this._toolBar=new l.ToolBar(t,{click:this._toolbarClickHandler,resizable:!1,items:[{type:"button",attributes:{"class":"k-play-button"},icon:"play"},{template:u.toolBarTime,attributes:{"class":"k-mediaplayer-currenttime-wrap"}},{type:"separator",attributes:{"class":"k-toolbar-spacer"}},{type:"button",attributes:{"class":"k-volume-button"},icon:"volume-up"},{template:u.volumeSlider,attributes:{"class":"k-mediaplayer-volume-wrap"}},{template:u.qualityDropDown,attributes:{"class":"k-mediaplayer-quality-wrap"}},{type:"button",attributes:{"class":"k-fullscreen-button"},icon:"full-screen"}]}),t.before(u.slider),this._volumeButton=t.find(".k-volume-button"),this._fullscreenButton=t.find(".k-fullscreen-button"),this._volumeButton.attr("title",this.options.mute?this.options.messages.unmute:this.options.messages.mute),this._volumeButton.attr("aria-label",this.options.mute?this.options.messages.unmute:this.options.messages.mute),this._fullscreenButton.attr("title",this.options.messages.fullscreen),this._fullscreenButton.attr("aria-label",this.options.messages.fullscreen),t.width("auto"),this._currentTimeElement=t.find(".k-mediaplayer-currenttime"),this._durationElement=t.find(".k-mediaplayer-duration"),this._playButton=t.find(".k-play-button"),this._playButtonSpan=this._playButton.find(".k-i-play"),this.options.autoPlay&&this._playStateToggle(!0),n([this._volumeButton[0],t.find(".k-mediaplayer-volume-wrap")[0],t.find(".k-mediaplayer-quality-wrap")[0],this._fullscreenButton[0]]).wrapAll("<div class='k-align-right' />"),t.find(".k-button").addClass("k-bare"))},_createDropDown:function(){var u=this.wrapper.find(r+vt),n=this.media();t===u.data("kendoDropDownList")&&(this._dropDownSelectHandler=i(this._dropDownSelect,this),this._dropDown=new l.DropDownList(u,{dataTextField:"quality",dataValueField:"url",popup:{position:"bottom",origin:"top",appendTo:this.wrapper},animation:{open:{effects:"slideIn:up",duration:1}},select:this._dropDownSelectHandler}),n&&k(n.source)&&(this._dropDown.setDataSource(n.source),this._dropDown.select(0)),this._dropDown.wrapper.addClass("k-button k-bare"),this._dropDown.wrapper.attr("title",this.options.messages.quality).hide(),this._dropDown.wrapper.find("span.k-i-arrow-60-down").removeClass("k-i-arrow-60-down").addClass("k-icon k-i-hd"),this._dropDown.list.addClass("k-quality-list"))},_dropDownSelect:function(n){this._currentIndex!==n.item.index()&&(this._currentIndex=n.item.index(),this._setPlayerUrl())},_toolbarClick:function(t){var r,i=n(t.target).children().first(),u=i.hasClass(c);this.media()&&((i.hasClass(c)||i.hasClass(tt))&&(u?this.play():this.pause()),(i.hasClass(o)||i.hasClass(s))&&(this._isInFullScreen?(i.removeClass(s).addClass(o),this.fullScreen(!1)):(i.removeClass(o).addClass(s),this.fullScreen(!0))),(i.hasClass(lt)||i.hasClass(at)||i.hasClass(ht))&&(r=this.mute(),this.mute(!r)))},_sliderDragging:function(){this.media()&&(this._isDragging=!0)},_sliderDragChange:function(n){var t=this,r=n.sender,i=1e3*g;this.media()&&(t._sliderChangeFired=!0,t._isDragging=!1,!this.options.forwardSeek&&r.value()>this._seekBarLastPosition?setTimeout(function(){r.value(t._seekBarLastPosition)},1):this._youTubeVideo?t._ytmedia.seekTo(t._timeToSec(n.value-i)):t._media.currentTime=t._timeToSec(n.value-i),t.trigger(et),t._preventPlay=!0)},_changeVolumeButtonImage:function(n){var t=this._volumeButton,r=t.find("span"),i=r.attr("class");i=i.substring(0,i.lastIndexOf(" ")),0===n?(r.attr("class",i+" "+lt),t.attr("title",this.options.messages.unmute),t.attr("aria-label",this.options.messages.unmute)):n>0&&n<51?(r.attr("class",i+" "+at),t.attr("title",this.options.messages.mute),t.attr("aria-label",this.options.messages.mute)):(r.attr("class",i+" "+ht),t.attr("title",this.options.messages.mute),t.attr("aria-label",this.options.messages.mute))},_volumeDragging:function(n){this.media()&&(this.volume(n.value),this._changeVolumeButtonImage(n.value),this.trigger(v))},_volumeChange:function(n){this.media()&&(this.volume(n.value),this._changeVolumeButtonImage(n.value),this.trigger(v))},_mediaTimeUpdate:function(){var n=this._youTubeVideo?this._ytmedia.getCurrentTime():this._media.currentTime,t=this._msToTime(n);return this._currentTimeElement.text(f.toString(t,this._timeFormat)),this._isDragging||(this._seekBarLastPosition=1e3*(n+g),this._slider.value(this._seekBarLastPosition)),this.isPlaying()},_playStateToggle:function(n){t===n&&(n=this._playButtonSpan.is(r+c)),n?(this._playButtonSpan.removeClass(c).addClass(tt),this._playButton.attr("title",this.options.messages.pause),this._playButton.attr("aria-label",this.options.messages.pause)):(this._playButtonSpan.removeClass(tt).addClass(c),this._playButton.attr("title",this.options.messages.play),this._playButton.attr("aria-label",this.options.messages.play))},_mediaEnded:function(){this._playStateToggle(!1),this._currentTimeElement.text(f.toString(this._msToTime(0),this._timeFormat)),this._slider.value(1e3*(0+g)),this.trigger(ut)},_mediaPlay:function(){this.trigger(it)},_mediaReady:function(){this.trigger(rt)},_mediaDurationChange:function(){var n=this._msToTime(this._youTubeVideo?this._ytmedia.getDuration():this._media.duration);this._timeFormat=0===n.getHours()?ot.shortTime:ot.longTime,this._durationElement.text(f.toString(n,this._timeFormat)),this._slider.setOptions({min:d.getTime(),max:n.getTime()}),this._isFirstRun||(this._resetTime(),this._isFirstRun=!0)},_createYoutubePlayer:function(){this._mediaTimeUpdateHandler=i(this._mediaTimeUpdate,this),this._mediaDurationChangeHandler=i(this._mediaDurationChange,this),this.wrapper.prepend(u.youtubePlayer),this._ytPlayer=this.wrapper.find(r+y)[0],n(this._ytPlayer).css({width:this.wrapper.width(),height:this.wrapper.height()}),window.YT&&window.YT.Player?this._configurePlayer():(window.onYouTubeIframeAPIReadyRegister||(window.onYouTubeIframeAPIReadyRegister=[],n.getScript("https://www.youtube.com/iframe_api"),window.onYouTubeIframeAPIReady=function(){if(window.onYouTubeIframeAPIReadyRegister)for(var n=0;n<window.onYouTubeIframeAPIReadyRegister.length;n++)window.onYouTubeIframeAPIReadyRegister[n]._youtubeApiReady();window.onYouTubeIframeAPIReadyRegister.length=0,window.onYouTubeIframeAPIReadyRegister=t}),window.onYouTubeIframeAPIReadyRegister[window.onYouTubeIframeAPIReadyRegister.length]=this)},_poll:function(n,t,i,r){var u=this;return null!==u._timers[n]&&clearTimeout(u._timers[n]),u._timers[n]=setTimeout(function(r){return function f(){t.call(r)&&(u._timers[n]=setTimeout(f,i))}}(r),i)},_youtubeApiReady:function(){this._configurePlayer()},_configurePlayer:function(){var t,n={autoplay:+this.options.autoPlay,wmode:"transparent",controls:0,rel:0,showinfo:0};this._onYouTubePlayerReady=i(this._onYouTubePlayerReady,this),window.onYouTubePlayerReady=this._onYouTubePlayerReady,this._onPlayerStateChangeHandler=i(this._onPlayerStateChange,this),window.onPlayerStateChange=this._onPlayerStateChange,t=new window.YT.Player(this.wrapper.find(r+y)[0],{height:this.wrapper.height(),width:this.wrapper.width(),videoId:this._getMediaId(),playerVars:n,events:{onReady:this._onYouTubePlayerReady,onStateChange:this._onPlayerStateChangeHandler}})},_onYouTubePlayerReady:function(n){this._ytmedia=n.target,this._ytmedia.getIframe().style.width="100%",this._ytmedia.getIframe().style.height="100%",this._youTubeVideo=!0,this._mediaDurationChangeHandler(),this.options.autoPlay?(this._playStateToggle(!0),this._ytmedia.loadVideoById(this._getMediaId())):this._ytmedia.cueVideoById(this._getMediaId()),this.options.mute&&this.mute(!0),this.trigger(rt)},_updateTitle:function(){this.titlebar().text(this.media().title||this.media().source)},_onPlayerStateChange:function(n){0===n.data?(this._slider.value(0),this._paused=!1,this._playStateToggle(!0),this.trigger(ut),this.options.autoRepeat&&this.play()):1===n.data?(this._mediaDurationChange(),this._ytmedia.setVolume(this.volume()),this._sliderChangeFired?this._sliderChangeFired=!1:this._uiDisplay(!1),this.trigger(it),this._playStateToggle(!0),this._poll("progress",this._mediaTimeUpdate,500,this),this._paused=!1):2===n.data&&(this._paused||(this._uiDisplay(!0),this._playStateToggle(!1),this.trigger(nt),this._paused=!0))},_getMediaId:function(){var t=this._currentUrl(),i=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,n=t.match(i);return n&&11===n[7].length&&(t=n[7]),t},_mouseClick:function(){this.isPaused()?this.play():this.pause()},_initializePlayer:function(){this._mouseMoveHandler||(this._mouseMoveHandler=i(this._mouseMove,this),this._mouseInHandler=i(this._mouseIn,this),this._mouseOutHandler=i(this._mouseOut,this),n(this.wrapper).on("mouseenter"+e,this._mouseInHandler).on("mouseleave"+e,this._mouseOutHandler).on("mousemove"+e,this._mouseMoveHandler)),!this._ytmedia&&this._youTubeVideo?this._createYoutubePlayer():this._media||this._youTubeVideo||this._createHtmlPlayer()},_createHtmlPlayer:function(){this._videoOverlay||(this._mouseClickHanlder=i(this._mouseClick,this),this.wrapper.append("<div class='"+ct+"'></div>"),this._videoOverlay=this.wrapper.find(".k-mediaplayer-overlay").on("click"+e,this._mouseClickHanlder)),this._mediaTimeUpdateHandler=i(this._mediaTimeUpdate,this),this._mediaDurationChangeHandler=i(this._mediaDurationChange,this),this._mediaEndedHandler=i(this._mediaEnded,this),this._mediaCanPlayHandler=i(this._mediaReady,this),this._mediaPlayHandler=i(this._mediaPlay,this),this._videoOverlay.after(u.htmlPlayer),this._media=this.wrapper.find(r+h)[0],n(this._media).css({width:"100%",height:"100%"}),this.options.mute&&this.mute(!0),this._media.ontimeupdate=this._mediaTimeUpdateHandler,this._media.ondurationchange=this._mediaDurationChangeHandler,this._media.oncanplay=this._mediaCanPlayHandler,this._media.onplay=this._mediaPlayHandler,this._media.onended=this._mediaEndedHandler},_mouseIn:function(){this._uiDisplay(!0)},_mouseOut:function(){this._poll("mouseIdle",this._mouseIdle,3e3,this)},_mouseIdle:function(){return this._uiDisplay(!1),!1},_mouseMove:function(){this._titleBar.is(":animated")||this._toolBar.element.is(":animated")||this._slider.wrapper.is(":animated")||this._uiDisplay(!0),this._poll("mouseIdle",this._mouseIdle,3e3,this)},_uiDisplay:function(n){var i="slow",t=this._titleBar.add(this._toolBar.element.parent());n?t.fadeIn(i):t.fadeOut(i)},setOptions:function(n){a.fn.setOptions.call(this,n)},destroy:function(){a.fn.destroy.call(this),this.isPaused()||this.pause(),this.element.off(e),this.element.find(r+ct).off(e),this._timers=null,this._mouseMoveHandler=null,this._mouseOutHandler=null,this._mouseInHandler=null,this._mouseClickHanlder=null,this._keyDownHandler=null,this._fullscreenHandler=null,this._toolbarClickHandler=null,this._sliderDragChangeHandler=null,this._sliderDraggingHandler=null,this._volumeDraggingHandler=null,this._volumeChangeHandler=null,this._youtubeApiReadyHandler=null,this._onYouTubePlayerReady=null,this._onPlayerStateChangeHandler=null,this._dropDownSelectHandler=null,this._youTubeVideo?this._ytmedia.destroy():(this._media.ontimeupdate=this._mediaTimeUpdateHandler=null,this._media.ondurationchange=this._mediaDurationChangeHandler=null,this._media.oncanplay=this._mediaCanPlayHandler=null,this._media.onplay=this._mediaPlayHandler=null,this._media.onended=this._mediaEndedHandler=null,this._media.src="",this._media.remove()),this._mouseMoveTimer=null,clearTimeout(this._mouseMoveTimer),f.destroy(this.element)},seek:function(n){if(t===n)return 1e3*this._youTubeVideo?this._ytmedia.getCurrentTime():this._media?this._media.currentTime:0;var i=n/1e3;return this._youTubeVideo?i+3>=this._ytmedia.getDuration()|0?this._ytmedia.seekTo(this._ytmedia.getDuration()-3|0,!0):this._ytmedia.seekTo(i,!0):this._media.currentTime=i,this},play:function(){return this._youTubeVideo?this._ytmedia.playVideo():(this._uiDisplay(!1),this._media.play()),this._paused=!1,this._playStateToggle(!0),this},stop:function(){return this._youTubeVideo&&this._ytmedia?this._ytmedia.stopVideo():this._media&&!this._youTubeVideo&&(this._uiDisplay(!0),this._media.pause(),this._media.currentTime=0),this._paused=!0,this._playStateToggle(!1),this},pause:function(){return this._youTubeVideo?this._ytmedia.pauseVideo():(this._uiDisplay(!0),this._media.pause()),this._paused=!0,this._playStateToggle(!1),this.trigger(nt),this},toolbar:function(){return this._toolBar},dropdown:function(){return this._dropDown},titlebar:function(){return this._titleBar},fullScreen:function(n){if(t===n)return this._isInFullScreen||!1;var i=this.element.get(0);n?(this.element.addClass("k-mediaplayer-fullscreen"),i.requestFullscreen?i.requestFullscreen():i.webkitRequestFullscreen?i.webkitRequestFullscreen():i.mozRequestFullScreen?i.mozRequestFullScreen():i.msRequestFullscreen&&i.msRequestFullscreen(),this._isInFullScreen=!0):(document.cancelFullscreen?document.cancelFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msCancelFullscreen?document.msCancelFullscreen():document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),this.element.removeClass("k-mediaplayer-fullscreen"),this._isInFullScreen=!1),this._slider.resize()},volume:function(n){return t===n?t!==this._volume?this._volume:this._volume=this.options.volume:(this._volume=n,this.mute(n<=0),this._youTubeVideo?this._ytmedia.setVolume(this._volume):this._media.volume=this._volume/100,this._volumeSlider.value(n),t)},mute:function(n){var i=this._youTubeVideo?this._ytmedia&&this._ytmedia.isMuted():this._media&&this._media.muted;return t===n||n===i?i:(this._youTubeVideo?n?this._ytmedia.mute():this._ytmedia.unMute():this._media.muted=n,this._volumeSlider.value(n?0:this._media&&100*this._media.volume||this._ytmedia&&this._ytmedia.getVolume()),this.trigger(v),this._changeVolumeButtonImage(this._volumeSlider.value()),t)},isEnded:function(){return this._youTubeVideo?0===this._ytmedia.getPlayerState():this._media.ended},media:function(n){var i=this.dropdown();return t===n?t!==this._mediaData?this._mediaData:this._mediaData=this.options.media:(k(n.source)?(i.setDataSource(n.source),i.wrapper.show()):i.wrapper.hide(),this._mediaData=n,this._updateTitle(),this._setPlayerUrl(),t)},isPaused:function(){return this._paused},isPlaying:function(){return!this.isEnded()&&!this._paused},_aria:function(){this.wrapper.attr("role","region")},_navigatable:function(){this._fullscreenHandler=i(this._fullscreen,this),n(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange"+e,this._fullscreenHandler),this.options.navigatable&&(this.wrapper.attr("tabIndex",0),this._keyDownHandler=i(this._keyDown,this),this.wrapper.on("keydown"+e,this._keyDownHandler))},_fullscreen:function(){var n=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;this._uiDisplay(!0),this._slider.resize(),n||(this.wrapper.find('span[class*="k-i-fullscreen"]').removeClass(s).addClass(o),this.fullScreen(!1))},_keyDown:function(n){var t,i;n.preventDefault(),t=this.wrapper.find('span[class*="k-i-fullscreen"]'),n.keyCode===w.SPACEBAR?this.isPlaying()?this.pause():this.play():n.keyCode!==w.ENTER||this._isInFullScreen?77===n.keyCode?(i=this.mute(),this.mute(!i)):n.keyCode===w.ESC&&this._isInFullScreen&&(t.removeClass(s).addClass(o),this.fullScreen(!1)):(t.removeClass(o).addClass(s),this.fullScreen(!0))},_error:function(){},_progress:function(){}});l.plugin(yt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.pivotgrid.min",["kendo.dom.min","kendo.data.min"],n)}(function(){return function(n,t){function yt(n){var i="string"==typeof n?[{name:n}]:n,r="[object Array]"===l.call(i)?i:i!==t?[i]:[];return vi(r,function(n){return"string"==typeof n?{name:n}:{name:n.name,type:n.type}})}function h(n){var i="string"==typeof n?[{name:[n],expand:!1}]:n,r="[object Array]"===l.call(i)?i:i!==t?[i]:[];return vi(r,function(n){return"string"==typeof n?{name:[n],expand:!1}:{name:"[object Array]"===l.call(n.name)?n.name.slice():[n.name],expand:n.expand}})}function cr(n){return n.indexOf(" ")!==-1&&(n='["'+n+'"]'),n}function gt(n,t,r,u){var o,e,s,f;if(r||(r=t),u||(u=0),f=r.members[u],f&&!f.measure){if(s=f.children,e=s.length,r===t?n[i.stringify([f.name])]=!!e:e&&(n[i.stringify(w(r,u))]=!0),e)for(o=0;o<e;o++)gt(n,t,s[o],u);gt(n,t,r,u+1)}}function ou(t){var u,r,i={};t.length&&gt(i,t[0]),u=[];for(r in i)u.push({name:n.parseJSON(r),expand:i[r]});return u}function bu(n,t){var r,i,e,u,o=t.tuples||[],f=o[0];if(f&&n.length<f.members.length)for(r=f.members,i=0;i<r.length;i++)if(!r[i].measure){for(e=!1,u=0;u<n.length;u++)if(0===c(n[u]).indexOf(r[i].hierarchy)){e=!0;break}e||n.push({name:[r[i].name],expand:!1})}}function wu(n){for(var r=[],i=n.members,t=0;t<i.length;t++)i[t].measure||r.push({name:[i[t].name],expand:i[t].children.length>0});return r}function br(n,t,i){var u,r;return n=n||{},bu(t,n),i.length>1&&t.push({name:b,measure:!0,children:h(i)}),u={members:t},n.tuples&&(r=k(n.tuples,u),r.tuple&&(t=wu(r.tuple))),t}function iu(n){var t=i.getter(n.field,!0);return function(i,r){return n.aggregate(t(i.dataItem),r,i)}}function u(n){return"number"==typeof n&&!isNaN(n)}function ht(n){return n&&n.getTime}function ct(n){return n[n.length]={value:"",fmtValue:"",ordinal:n.length},n}function ai(n,t,i){if(n.tuples.length<o(t.tuples,i))return t}function pu(n,t,i,r,u){for(var f,s,c=n.length,l=o(t,r),h=r.length||1,e=0;e<i;e++)for(f=0;f<c;f++)s=bi(n[f],t)*h,s+=f%h,u[e*c+f].ordinal=e*l+s}function yu(n,t,i,r,u){for(var e,o,h=n.length,s=r.length||1,f=0;f<h;f++)for(o=bi(n[f],t),o*=s,o+=f%s,e=0;e<i;e++)u[f*i+e].ordinal=o*i+e}function bi(n,t){return k(t,n).index}function o(n,t){var r,i,u;if(!n.length)return 0;for(r=n.slice(),i=r.shift(),u=1;i;)i.members?[].push.apply(r,i.members):i.children&&(i.measure||(u+=i.children.length),[].push.apply(r,i.children)),i=r.shift();return t.length&&(u*=t.length),u}function lt(n){return n||(n={tuples:[]}),n.tuples||(n.tuples=[]),n}function yi(n,t,i){var u,f,e,r;if(!n)return 0;for(u=Math.max(i.length,1),f=n.members.slice(0,t),e=u,r=f.shift(),u>1&&(u+=1);r;)r.name===b?e+=u:r.children?[].push.apply(f,r.children):(e++,[].push.apply(f,r.members)),r=f.shift();return e}function pi(n,t,i){var f,e,u,o,r,s;if(!t[0])return{parsedRoot:null,tuples:n,memberIndex:0,index:0};if(f=k(n,t[0]),!f.tuple)return{parsedRoot:null,tuples:t,memberIndex:0,index:0};if(e=f.tuple.members,u=t[0].members,o=-1,e.length!==u.length)return{parsedRoot:null,tuples:t,memberIndex:0,index:0};for(r=0,s=e.length;r<s;r++)!e[r].measure&&u[r].children[0]&&(o==-1&&u[r].children.length&&(o=r),e[r].children=u[r].children);return i=Math.max(i.length,1),{parsedRoot:f.tuple,index:f.index*i,memberIndex:o,tuples:n}}function du(n,t){var i,u,r=!0;for(n=n.members,t=t.members,i=0,u=n.length;i<u;i++)n[i].measure||t[i].measure||(r=r&&c(n[i])===c(t[i]));return r}function k(n,t){for(var i,f,e,h,o,r=0,u=0,s=n.length;u<s;u++){if(i=n[u],du(i,t))return{tuple:i,index:r};for(r++,e=0,h=i.members.length;e<h;e++)if(o=i.members[e],!o.measure&&(f=k(o.children,t),r+=f.index,f.tuple))return{tuple:f.tuple,index:r}}return{index:r}}function ku(n,t){for(var u,r="",i=0,f=n.length;i<f;i++)u=n[i],r+=u.name,t[r]||(t[r]=u)}function vu(n,t){for(var i,r,s=n.members,u="",f="",e=0,o=s.length;e<o;e++){if(i=s[e],r){if(t[u+i.name]){u+=i.name,r=t[u];continue}return t[u+i.parentName]?t[u+i.parentName]:t[f+i.parentName]?t[f+i.parentName]:t[f]}if(u+=i.name,r=t[i.parentName],!r&&(r=t[u],!r))return null;r&&(f+=r.name)}return r}function su(n,t){var f,r,i,u;if(0===t.length)return-1;for(f=t[0],r=n.members,i=0,u=r.length;i<u;i++)if(r[i].name==f.name)return i}function eu(i,r){if(!(r<0)){var u={name:b,measure:!0,children:[n.extend({members:[],dataIndex:i.dataIndex},i.members[r])]};i.members.splice(r,1,u),i.dataIndex=t}}function rr(n,t){var o,e,u,r,i,f;if(n.length<1)return[];for(o=[],e={},u=su(n[0],t),r=0;r<n.length;r++)i=n[r],i.dataIndex=r,eu(i,u),f=vu(i,e),f?f.children.push(u<0||!f.measure?i:i.members[u].children[0]):o.push(i),ku(i.members,e);return o}function lu(n,t){var f,s,o,u,i,r,h,c,e;if(!n||!n.length)return t;for(f=[],s=hr(n),o=s.length,u=Math.max(t.length/o,1),i=0;i<o;i++)for(h=u*i,c=u*s[i],r=0;r<u;r++)e=parseInt(c+r,10),f[parseInt(h+r,10)]=t[e]||{value:"",fmtValue:"",ordinal:e};return f}function gu(n,t){var o,s,u,h,i,r,e,f;if(!n||!n.length)return t;for(o=[],s=hr(n),u=s.length,h=Math.max(t.length/u,1),r=0;r<h;r++)for(e=u*r,i=0;i<u;i++)f=s[i]+e,o[e+i]=t[f]||{value:"",fmtValue:"",ordinal:f};return o}function hr(n){var f,i,u,s,o,r,e;for(n=n.slice(),f=[],i=n.shift();i;){for(i.dataIndex!==t&&f.push(i.dataIndex),o=0,u=0,s=i.members.length;u<s;u++)e=i.members[u],r=e.children,e.measure?[].splice.apply(n,[0,0].concat(r)):[].splice.apply(n,[o,0].concat(r)),o+=r.length;i=n.shift()}return f}function tr(n){var t=n.split(".");return t.length>2?t[0]+"."+t[1]:n}function nr(n,t){var u=n.length-1,i=n[u],r=cu(t,i);return r&&r.dir?i="ORDER("+i+".Children,"+r.field+".CurrentMember.MEMBER_CAPTION,"+r.dir+")":i+=".Children",n[u]=i,n}function cu(n,t){for(var i=0,r=n.length;i<r;i++)if(0===t.indexOf(n[i].field))return n[i];return null}function fr(n){var i,t="CROSSJOIN({";return n.length>2?(i=n.pop(),t+=fr(n)):(t+=n.shift(),i=n.pop()),t+="},{",t+=i,t+="})"}function ur(n,t){var i=n.slice(0);return t.length>1&&i.push("{"+ft(t).join(",")+"}"),fr(i)}function ft(n){for(var i,r=0,f=n.length,u=[];r<f;r++)i=n[r],u.push(i.name!==t?i.name:i);return u}function c(n){return n=n.name||n,"[object Array]"===l.call(n)&&(n=n[n.length-1]),n}function or(n){for(var r=n.length,i=[],t=0;t<r;t++)i.push(n[t].name[0]);return i}function er(n,t){var r,f,i,u=0,o=n.length,e=t.length;for(t=t.slice(0);u<o;u++)for(r=n[u],i=0;i<e;i++)if(f=tr(t[i]),r.indexOf(f)!==-1){t[i]=r;break}return{names:t,expandedIdx:i,uniquePath:t.slice(0,i+1).join("")}}function gi(n){for(var t,u,h,i,c,o,f=[],s=[],r=[],e=0,a=n.length;e<a;e++)if(t=n[e],i=t.name,o=!1,"[object Array]"!==l.call(i)&&(t.name=i=[i]),i.length>1)s.push(t);else{for(c=tr(i[0]),u=0,h=r.length;u<h;u++)if(0===r[u].name[0].indexOf(c)){o=!0;break}o||r.push(t),t.expand&&f.push(t)}return f=f.concat(s),{root:r,expanded:f}}function lr(n,t,i){var u,l,e,s,c,r,o,f,h="";if(n=n||[],u=gi(n),l=u.root,e=or(l),s=[],u=u.expanded,c=u.length,r=0,f=[],e.length>1||t.length>1){for(s.push(ur(e,t));r<c;r++)o=nr(u[r].name,i),f=er(o,e).names,s.push(ur(f,t));h+=s.join(",")}else{for(;r<c;r++)o=nr(u[r].name,i),f.push(o[0]);h+=e.concat(f).join(",")}return h}function au(n){var t="",u=n.value,f=n.field,r=n.operator;return"in"==r?(t+="{",t+=u,t+="}"):(t+="neq"==r||"doesnotcontain"==r?"-":"",t+="Filter(",t+=f+".MEMBERS",t+=i.format(yr[r],f,u),t+=")"),t}function hu(n,t){for(var i,u="",e=n.filters,f=e.length,r=f-1;r>=0;r--)i="SELECT (",i+=au(e[r]),i+=") ON 0",r==f-1?(i+=" FROM ["+t+"]",u=i):u=i+" FROM ( "+u+" )";return u}function ir(n,t,i){var f,r,u="";if(t){u+="<"+n+">";for(r in t)f=t[r],i&&(r=r.replace(/([A-Z]+(?=$|[A-Z][a-z])|[A-Z]?[a-z]+)/g,"$1_").toUpperCase().replace(/_$/,"")),u+="<"+r+">"+f+"</"+r+">";u+="</"+n+">"}else u+="<"+n+"/>";return u}function g(n){if(null==n)return[];var t=l.call(n);return"[object Array]"!==t?[n]:n}function vr(n){for(var f,r,t,o={tuples:[]},e=g(i.getter("Tuples.Tuple",!0)(n)),a=i.getter("Caption['#text']"),v=i.getter("UName['#text']"),y=i.getter("LName['#text']"),l=i.getter("LNum['#text']"),s=i.getter("CHILDREN_CARDINALITY['#text']",!0),h=i.getter("['@Hierarchy']"),c=i.getter("PARENT_UNIQUE_NAME['#text']",!0),u=0;u<e.length;u++){for(f=[],r=g(e[u].Member),t=0;t<r.length;t++)f.push({children:[],caption:a(r[t]),name:v(r[t]),levelName:y(r[t]),levelNum:l(r[t]),hasChildren:parseInt(s(r[t]),10)>0,parentName:c(r[t]),hierarchy:h(r[t])});o.tuples.push({members:f})}return o}var yr,pr,wr,wt,s,pt,vt,sr,st,d,r,y,ni,w,ti,ui,ei,oi,kt,i=window.kendo,bt=i.ui,nt=i.Class,a=bt.Widget,rt=i.data.DataSource,wi=i._outerWidth,ki=i._outerHeight,l={}.toString,e=function(n){return n},vi=n.map,f=n.extend,ii=i.isFunction,v="change",hi="error",b="Measures",ci="progress",dt="stateReset",ut="auto",ot="<div/>",tt=".kendoPivotGrid",p="__row_total__",fi="dataBinding",ar="dataBound",li="expandMember",si="collapseMember",et="k-i-collapse",at="k-i-expand",ri="<span>#: data.member.caption || data.member.name #</span>",fu='<span class="k-icon k-i-#=data.dataItem.value > 0 ? "circle" : data.dataItem.value < 0 ? "stop" : "arrow-60-up k-i-hold"#" title="#:data.dataItem.value#"></span>',kr='<span class="k-icon k-i-#=data.dataItem.value > 0 ? "arrow-60-up" : data.dataItem.value < 0 ? "arrow-60-down" : "minus"#" title="#:data.dataItem.value#"></span>',nu='#= data.dataItem ? kendo.htmlEncode(data.dataItem.fmtValue || data.dataItem.value) || "&nbsp;" : "&nbsp;" #',tu='<table class="k-pivot-layout"><tr><td><div class="k-pivot-rowheaders"></div></td><td><div class="k-pivot-table k-state-default"></div></td></tr></table>',dr="rows",gr="columns",uu={sum:function(n,t){var i=t.accumulator;return u(i)?u(n)&&(i+=n):i=n,i},count:function(n,t){return(t.accumulator||0)+1},average:{aggregate:function(n,i){var r=i.accumulator;return i.count===t&&(i.count=0),u(r)?u(n)&&(r+=n):r=n,u(n)&&i.count++,r},result:function(n){var t=n.accumulator;return u(t)&&(t/=n.count),t}},max:function(n,t){var i=t.accumulator;return u(i)||ht(i)||(i=n),i<n&&(u(n)||ht(n))&&(i=n),i},min:function(n,t){var i=t.accumulator;return u(i)||ht(i)||(i=n),i>n&&(u(n)||ht(n))&&(i=n),i}},di=nt.extend({init:function(n){this.options=f({},this.options,n),this.dimensions=this._normalizeDescriptors("field",this.options.dimensions),this.measures=this._normalizeDescriptors("name",this.options.measures)},_normalizeDescriptors:function(n,t){var u,i,r,f;if(t=t||{},u={},"[object Array]"===l.call(t)){for(r=0,f=t.length;r<f;r++)i=t[r],"string"==typeof i?u[i]={}:i[n]&&(u[i[n]]=i);t=u}return t},_rootTuples:function(n,i){var u,r,s,e,l=i.length||1,a=this.dimensions||[],f=0,c=n.length,o=[],h=[];if(c||i.length){for(f=0;f<l;f++){for(u={members:[]},e=0;e<c;e++)r=n[e],s=r.split("&"),u.members[u.members.length]={children:[],caption:(a[r]||{}).caption||"All",name:r,levelName:r,levelNum:"0",hasChildren:!0,parentName:s.length>1?s[0]:t,hierarchy:r};l>1&&(u.members[u.members.length]={children:[],caption:i[f].caption,name:i[f].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!1,parentName:t,hierarchy:"MEASURES"}),o[o.length]=u}h.push(p)}return{keys:h,tuples:o}},_expandedTuples:function(n,i,r){var s,u,b,f,c,v,e,y,p,h,o,k=r.length||1,d=this.dimensions||[],a=[],l=[];for(b in n){for(f=n[b],e=this._findExpandedMember(i,f.uniquePath),c=a[e.index]||[],v=l[e.index]||[],y=e.member.names,s=0;s<k;s++){for(u={members:[]},o=0;o<y.length;o++)o===e.member.expandedIdx?(u.members[u.members.length]={children:[],caption:f.value,name:f.name,hasChildren:!1,levelNum:1,levelName:f.parentName+f.name,parentName:f.parentName,hierarchy:f.parentName+f.name},0===s&&v.push(w(u,o).join(""))):(h=y[o],p=h.split("&"),u.members[u.members.length]={children:[],caption:(d[h]||{}).caption||"All",name:h,levelName:h,levelNum:"0",hasChildren:!0,parentName:p.length>1?p[0]:t,hierarchy:h});k>1&&(u.members[u.members.length]={children:[],caption:r[s].caption,name:r[s].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!0,parentName:t,hierarchy:"MEASURES"}),c[c.length]=u}a[e.index]=c,l[e.index]=v}return{keys:l,tuples:a}},_findExpandedMember:function(n,t){for(var i=0;i<n.length;i++)if(n[i].uniquePath===t)return{member:n[i],index:i}},_asTuples:function(n,t,i){var u,r;return i=i||[],u=this._rootTuples(t.root,i),r=this._expandedTuples(n,t.expanded,i),{keys:[].concat.apply(u.keys,r.keys),tuples:[].concat.apply(u.tuples,r.tuples)}},_measuresInfo:function(n,t){for(var r,i,u=0,h=n&&n.length,e=[],o={},f={},s=this.measures||{};u<h;u++)i=n[u].descriptor.name,r=s[i]||{},e.push(i),r.result&&(o[i]=r.result),r.format&&(f[i]=r.format);return{names:e,formats:f,resultFuncs:o,rowAxis:t}},_toDataArray:function(n,t,i,r){var w,s,h,o,u,f,a,v,c,e,b=[],y=1,l=[],d=i.length||1,k=r.length||1;for(t.rowAxis?(l=t.names,y=l.length):e=t.names,h=0;h<d;h++)for(a=n[i[h]||p],f=0;f<y;f++)for(t.rowAxis&&(e=[l[f]]),o=0;o<k;o++)for(c=r[o]||p,v=a.items[c],w=c===p?a.aggregates:v?v.aggregates:{},u=0;u<e.length;u++)s=e[u],this._addData(b,w[s],t.formats[s],t.resultFuncs[s]);return b},_addData:function(n,t,r,u){var f,e="";t&&(t=u?u(t):t.accumulator,e=r?i.format(r,t):t),f=n.length,n[f]={ordinal:f,value:t||"",fmtValue:e}},_matchDescriptors:function(n,i,r){for(var f,o,s,u,h=i.names,e=i.expandedIdx;e>0;)if(f=h[--e].split("&"),f.length>1&&(o=f[0],s=f[1],u=r[o](n),u=u!==t&&null!==u?""+u:u,u!=s))return!1;return!0},_calculateAggregate:function(n,t,i){for(var u,f,e={},r=0;r<n.length;r++)f=n[r].descriptor.name,u=i.aggregates[f]||{},u.accumulator=n[r].aggregator(t,u),e[f]=u;return e},_processColumns:function(n,i,r,u,f,e,o,s){for(var h,a,w,b,l,c,p,y,k=f.dataItem,v=0;v<i.length;v++)a=i[v],this._matchDescriptors(k,a,r)&&(y=a.names.slice(0,a.expandedIdx).join(""),c=a.names[a.expandedIdx],h=r[c](k),h=h!==t&&null!==h?""+h:h,p=c,c=c+"&"+h,l=y+c,w=u[l]||{index:o.columnIndex,parentName:p,name:c,uniquePath:y+p,value:h},b=e.items[l]||{aggregates:{}},e.items[l]={index:w.index,aggregates:this._calculateAggregate(n,f,b)},s&&(u[l]||o.columnIndex++,u[l]=w))},_measureAggregators:function(n){var e,t,r,s,i,f,u=n.measures||[],h=this.measures||{},o=[];if(u.length){for(r=0,s=u.length;r<s;r++)if(e=u[r],t=h[e.name],i=null,t){if(f=t.aggregate,"string"==typeof f){if(i=uu[f.toLowerCase()],!i)throw Error("There is no such aggregate function");t.aggregate=i.aggregate||i,t.result=i.result}o.push({descriptor:e,caption:t.caption,result:t.result,aggregator:iu(t)})}}else o.push({descriptor:{name:"default"},caption:"default",aggregator:function(){return 1}});return o},_buildGetters:function(n){for(var u,r,f={},t=0;t<n.length;t++)r=n[t],u=r.split("&"),u.length>1?f[u[0]]=i.getter(u[0],!0):f[r]=i.getter(cr(r),!0);return f},_parseDescriptors:function(n){for(var u=gi(n),f=or(u.root),i=u.expanded,r=[],t=0;t<i.length;t++)r.push(er(i[t].name,f));return{root:f,expanded:r}},_filter:function(n,t){var f,r,u;if(!t)return n;for(r=0,u=t.filters;r<u.length;r++)f=u[r],"in"===f.operator&&(u[r]=this._normalizeFilter(f));return new i.data.Query(n).filter(t).data},_normalizeFilter:function(n){var i,t=n.value.split(","),r=[];if(!t.length)return t;for(i=0;i<t.length;i++)r.push({field:n.field,operator:"eq",value:t[i]});return{logic:"or",filters:r}},process:function(n,i){var tt,l,r,u,e,o,w,s,ft,f,it,at,ht,nt,ut,rt,y,vt,d,v,c,b,g,ct,lt,k,ot,st,et,a;if(n=n||[],i=i||{},n=this._filter(n,i.filter),tt=i.measures||[],l="rows"===i.measuresAxis,r=i.columns||[],u=i.rows||[],!r.length&&u.length&&(!tt.length||tt.length&&l)&&(r=u,u=[],l=!1),r.length||u.length||(l=!1),!r.length&&tt.length&&(r=h(i.measures)),r=this._parseDescriptors(r),u=this._parseDescriptors(u),e={},o={},w={},ft={columnIndex:0},f=this._measureAggregators(i),it=this._buildGetters(r.root),at=this._buildGetters(u.root),ht=!1,nt=r.expanded,ut=u.expanded,vt=0!==ut.length,et=n.length,a=0,r.root.length||u.root.length)for(ht=!0,a=0;a<et;a++)for(rt=n[a],y={dataItem:rt,index:a},b=e[p]||{items:{},aggregates:{}},this._processColumns(f,nt,it,o,y,b,ft,!vt),b.aggregates=this._calculateAggregate(f,y,b),e[p]=b,d=0;d<ut.length;d++)v=ut[d],this._matchDescriptors(rt,v,at)?(ct=v.names.slice(0,v.expandedIdx).join(""),c=v.names[v.expandedIdx],lt=c,s=at[c](rt),s=s!==t?""+s:s,c=c+"&"+s,g=ct+c,w[g]={uniquePath:ct+lt,parentName:lt,name:c,value:s},k=e[g]||{items:{},aggregates:{}},this._processColumns(f,nt,it,o,y,k,ft,!0),k.aggregates=this._calculateAggregate(f,y,k),e[g]=k):this._processColumns(f,nt,it,o,y,{items:{},aggregates:{}},ft,!0);return ht&&et?(!(f.length>1)||i.columns&&i.columns.length||(r={root:[],expanded:[]}),ot=this._asTuples(o,r,l?[]:f),st=this._asTuples(w,u,l?f:[]),o=ot.tuples,w=st.tuples,e=this._toDataArray(e,this._measuresInfo(f,l),st.keys,ot.keys)):e=o=w=[],{axes:{columns:{tuples:o},rows:{tuples:w}},data:e}}}),ru=nt.extend({init:function(n,t){this.transport=t,this.options=t.options||{},this.transport.discover||ii(n.discover)&&(this.discover=n.discover)},read:function(n){return this.transport.read(n)},update:function(n){return this.transport.update(n)},create:function(n){return this.transport.create(n)},destroy:function(n){return this.transport.destroy(n)},discover:function(n){return this.transport.discover?this.transport.discover(n):(n.success({}),t)},catalog:function(i){var r,u=this.options||{};return i===t?(u.connection||{}).catalog:(r=u.connection||{},r.catalog=i,this.options.connection=r,n.extend(this.transport.options,{connection:r}),t)},cube:function(n){var i,r=this.options||{};return n===t?(r.connection||{}).cube:(i=r.connection||{},i.cube=n,this.options.connection=i,f(!0,this.transport.options,{connection:i}),t)}}),it=rt.extend({init:function(t){var i,u=((t||{}).schema||{}).cube,o="columns",r={axes:e,cubes:e,catalogs:e,measures:e,dimensions:e,hierarchies:e,levels:e,members:e};u&&(r=n.extend(r,this._cubeSchema(u)),this.cubeBuilder=new di(u)),rt.fn.init.call(this,f(!0,{},{schema:r},t)),this.transport=new ru(this.options.transport||{},this.transport),this._columns=h(this.options.columns),this._rows=h(this.options.rows),i=this.options.measures||[],"[object Object]"===l.call(i)&&(o=i.axis||"columns",i=i.values||[]),this._measures=yt(i),this._measuresAxis=o,this._skipNormalize=0,this._axes={}},_cubeSchema:function(t){return{dimensions:function(){var n,i=[],r=t.dimensions;for(n in r)i.push({name:n,caption:r[n].caption||n,uniqueName:n,defaultHierarchy:n,type:1});return t.measures&&i.push({name:b,caption:b,uniqueName:b,type:2}),i},hierarchies:function(){return[]},measures:function(){var n,i=[],r=t.measures;for(n in r)i.push({name:n,caption:n,uniqueName:n,aggregator:n});return i},members:n.proxy(function(n,r){var h,f,u=r.levelUniqueName||r.memberUniqueName,s=this.options.schema.data,a=ii(s)?s:i.getter(s,!0),l=this.options.data&&a(this.options.data)||this._rawData||[],e=[],o=0,c={};if(u&&(u=u.split(".")[0]),!r.treeOp)return e.push({caption:t.dimensions[u].caption||u,childrenCardinality:"1",dimensionUniqueName:u,hierarchyUniqueName:u,levelUniqueName:u,name:u,uniqueName:u}),e;for(h=i.getter(cr(u),!0);o<l.length;o++)f=h(l[o]),!f&&0!==f||c[f]||(c[f]=!0,e.push({caption:f,childrenCardinality:"0",dimensionUniqueName:u,hierarchyUniqueName:u,levelUniqueName:u,name:f,uniqueName:f}));return e},this)}},options:{serverSorting:!0,serverPaging:!0,serverFiltering:!0,serverGrouping:!0,serverAggregates:!0},catalog:function(n){return n===t?this.transport.catalog():(this.transport.catalog(n),this._mergeState({}),this._axes={},this.data([]),t)},cube:function(n){return n===t?this.transport.cube():(this.transport.cube(n),this._axes={},this._mergeState({}),this.data([]),t)},axes:function(){return this._axes},columns:function(n){return n===t?this._columns:(this._skipNormalize+=1,this._clearAxesData=!0,this._columns=h(n),this.query({columns:n,rows:this.rowsAxisDescriptors(),measures:this.measures(),sort:this.sort(),filter:this.filter()}),t)},rows:function(n){return n===t?this._rows:(this._skipNormalize+=1,this._clearAxesData=!0,this._rows=h(n),this.query({columns:this.columnsAxisDescriptors(),rows:n,measures:this.measures(),sort:this.sort(),filter:this.filter()}),t)},measures:function(n){return n===t?this._measures:(this._skipNormalize+=1,this._clearAxesData=!0,this.query({columns:this.columnsAxisDescriptors(),rows:this.rowsAxisDescriptors(),measures:yt(n),sort:this.sort(),filter:this.filter()}),t)},measuresAxis:function(){return this._measuresAxis||"columns"},_expandPath:function(n,t){var r,e,u,f="columns"===t?"columns":"rows",o="columns"===t?"rows":"columns",i=h(n),s=c(i[i.length-1]);for(this._lastExpanded=f,i=br(this.axes()[f],i,this.measures()),r=0;r<i.length;r++)if(e=c(i[r]),e===s){if(i[r].expand)return;i[r].expand=!0}else i[r].expand=!1;u={},u[f]=i,u[o]=this._descriptorsForAxis(o),this._query(u)},_descriptorsForAxis:function(n){var t=this.axes(),i=this[n]()||[];return t&&t[n]&&t[n].tuples&&t[n].tuples[0]&&(i=ou(t[n].tuples||[])),i},columnsAxisDescriptors:function(){return this._descriptorsForAxis("columns")},rowsAxisDescriptors:function(){return this._descriptorsForAxis("rows")},_process:function(n,t){this._view=n,t=t||{},t.items=t.items||this._view,this.trigger(v,t)},_query:function(n){var t=this;return n||(this._skipNormalize+=1,this._clearAxesData=!0),t.query(f({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate(),columns:this.columnsAxisDescriptors(),rows:this.rowsAxisDescriptors(),measures:this.measures()},n))},query:function(t){var i=this._mergeState(t);return this._data.length&&this.cubeBuilder?(this._params(i),this._updateLocalData(this._pristineData),n.Deferred().resolve().promise()):this.read(i)},_mergeState:function(n){return n=rt.fn._mergeState.call(this,n),n!==t&&(this._measures=yt(n.measures),n.columns?n.columns=h(n.columns):n.columns||(this._columns=[]),n.rows?n.rows=h(n.rows):n.rows||(this._rows=[])),n},filter:function(n){return n===t?this._filter:(this._skipNormalize+=1,this._clearAxesData=!0,this._query({filter:n,page:1}),t)},expandColumn:function(n){this._expandPath(n,"columns")},expandRow:function(n){this._expandPath(n,"rows")},success:function(n){var t;this.cubeBuilder&&(t=(this.reader.data(n)||[]).slice(0)),rt.fn.success.call(this,n),t&&(this._pristineData=t)},_processResult:function(n,t){var l,v,a,e,i,r,c,f,u,s,h;return this.cubeBuilder&&(l=this.cubeBuilder.process(n,this._requestData),n=l.data,t=l.axes),f=this.columns(),u=this.rows(),s=t.columns&&t.columns.tuples,f.length||!u.length||!s||!this._rowMeasures().length&&this.measures().length||(t={columns:{},rows:t.columns}),f.length||u.length||"rows"!==this.measuresAxis()||!s||(t={columns:{},rows:t.columns}),this._axes={columns:lt(this._axes.columns),rows:lt(this._axes.rows)},t={columns:lt(t.columns),rows:lt(t.rows)},v=this._normalizeTuples(t.columns.tuples,this._axes.columns.tuples,f,this._columnMeasures()),a=this._normalizeTuples(t.rows.tuples,this._axes.rows.tuples,u,this._rowMeasures()),this._skipNormalize-=1,this.cubeBuilder||(n=this._normalizeData({columnsLength:t.columns.tuples.length,rowsLength:t.rows.tuples.length,columnIndexes:v,rowIndexes:a,data:n})),"rows"==this._lastExpanded?(e=t.columns.tuples,r=this._columnMeasures(),i=ai(t.columns,this._axes.columns,r),i&&(c="columns",t.columns=i,pu(e,i.tuples,t.rows.tuples.length,r,n),this.cubeBuilder||(n=this._normalizeData({columnsLength:o(t.columns.tuples,r),rowsLength:t.rows.tuples.length,data:n})))):"columns"==this._lastExpanded&&(e=t.rows.tuples,r=this._rowMeasures(),i=ai(t.rows,this._axes.rows,r),i&&(c="rows",t.rows=i,yu(e,i.tuples,t.columns.tuples.length,r,n),this.cubeBuilder||(n=this._normalizeData({columnsLength:o(t.rows.tuples,r),rowsLength:t.columns.tuples.length,data:n})))),this._lastExpanded=null,h=this._mergeAxes(t,n,c),this._axes=h.axes,h.data},_readData:function(n){var i=this.reader.axes(n),t=this.reader.data(n);return this.cubeBuilder&&(this._rawData=t),this._processResult(t,i)},_createTuple:function(n,t,i){var c,u,f,e,l,a,h,r,y=n.members,v=y.length,s={members:[]},o=0;for(t&&(v-=1);o<v;o++)r=y[o],u=+r.levelNum,f=r.name,e=r.parentName,h=r.caption||f,l=r.hasChildren,a=r.hierarchy,c=r.levelName,i&&(h="All",0===u?e=r.name:u-=1,l=!0,f=a=c=e),s.members.push({name:f,children:[],caption:h,levelName:c,levelNum:""+u,hasChildren:l,hierarchy:a,parentName:i?"":e});return t&&s.members.push({name:t.name,children:[]}),s},_hasRoot:function(n,t,i){var e,o,f,u,h,r,s;if(t.length)return k(t,n).tuple;for(e=n.members,u=!0,r=0,s=e.length;r<s;r++)if(o=e[r],h=+o.levelNum||0,f=i[r],!(0===h||f&&o.name===c(f))){u=!1;break}return u},_mergeAxes:function(n,t,i){var c,u,s,h,y,e=this._columnMeasures(),f=this._rowMeasures(),r=this.axes(),p=o(r.rows.tuples,f),a=n.rows.tuples.length,v=o(r.columns.tuples,e),l=n.columns.tuples.length;return"columns"==i?(l=v,u=n.columns.tuples):(u=rr(n.columns.tuples,e),t=gu(u,t)),s=pi(r.columns.tuples,u,e),"rows"==i?(a=o(n.rows.tuples,f),u=n.rows.tuples):(u=rr(n.rows.tuples,f),t=lu(u,t)),h=pi(r.rows.tuples,u,f),r.columns.tuples=s.tuples,r.rows.tuples=h.tuples,v!==o(r.columns.tuples,e)?(c=s.index+yi(s.parsedRoot,s.memberIndex,e),y=v+l,t=this._mergeColumnData(t,c,a,l,y)):p!==o(r.rows.tuples,f)&&(c=h.index+yi(h.parsedRoot,h.memberIndex,f),t=this._mergeRowData(t,c,a,l)),0===r.columns.tuples.length&&0===r.rows.tuples.length&&(t=[]),{axes:r,data:t}},_mergeColumnData:function(n,t,i,r,u){var f,c,e,o=this.data().toJSON(),h=0,s=Math.max(this._columnMeasures().length,1);for(i=Math.max(i,1),o.length>0&&(h=s,u-=s),f=0;f<i;f++)c=t+f*u,e=n.splice(0,r),e.splice(0,h),[].splice.apply(o,[c,0].concat(e));return o},_mergeRowData:function(n,t,i,r){var u,o,s,f=this.data().toJSON(),e=Math.max(this._rowMeasures().length,1);for(r=Math.max(r,1),f.length>0&&(i-=e,n.splice(0,r*e)),u=0;u<i;u++)s=n.splice(0,r),o=t*r+u*r,[].splice.apply(f,[o,0].concat(s));return f},_columnMeasures:function(){var t=this.measures(),n=[];return"columns"===this.measuresAxis()&&(0===this.columns().length?n=t:t.length>1&&(n=t)),n},_rowMeasures:function(){var t=this.measures(),n=[];return"rows"===this.measuresAxis()&&(0===this.rows().length?n=t:t.length>1&&(n=t)),n},_updateLocalData:function(n,t){this.cubeBuilder&&(t&&(this._requestData=t),n=this._processResult(n)),this._data=this._observe(n),this._ranges=[],this._addRange(this._data),this._total=this._data.length,this._pristineTotal=this._total,this._process(this._data)},data:function(n){var i=this;return n===t?i._data:(this._pristineData=n.slice(0),this._updateLocalData(n,{columns:this.columns(),rows:this.rows(),measures:this.measures()}),t)},_normalizeTuples:function(n,t,i,r){var f,h,c,o=r.length||1,u=0,l=[],s={},e=0;if(n.length){if(this._skipNormalize<=0&&!this._hasRoot(n[0],t,i)){for(this._skipNormalize=0;u<o;u++)l.push(this._createTuple(n[0],r[u],!0)),s[u]=u;n.splice.apply(n,[0,n.length].concat(l).concat(n)),u=o}if(r.length)for(c=f=n[u],h=f.members.length-1;f;){if(e>=o&&(e=0),f.members[h].name!==r[e].name&&(n.splice(u,0,this._createTuple(f,r[e])),s[u]=u),u+=1,e+=1,f=n[u],o>e&&(!f||ti(c,h-1)!==ti(f,h-1))){for(;e<o;e++)n.splice(u,0,this._createTuple(c,r[e])),s[u]=u,u+=1;f=n[u]}c=f}return s}},_addMissingDataItems:function(n,i){for(;i.rowIndexes[parseInt(n.length/i.columnsLength,10)]!==t;)for(var r=0;r<i.columnsLength;r++)n=ct(n);for(;i.columnIndexes[n.length%i.columnsLength]!==t;)n=ct(n);return n},_normalizeOrdinals:function(n,t,i){var r=i.lastOrdinal;if(!t)return ct(n);if(t.ordinal-r>1)for(r+=1;r<t.ordinal&&n.length<i.length;)n=this._addMissingDataItems(ct(n),i),r+=1;return t.ordinal=n.length,n[n.length]=t,n},_normalizeData:function(n){var i,f,r,u=n.data,e=0,t=[];if(n.lastOrdinal=0,n.columnIndexes=n.columnIndexes||{},n.rowIndexes=n.rowIndexes||{},n.columnsLength=n.columnsLength||1,n.rowsLength=n.rowsLength||1,n.length=n.columnsLength*n.rowsLength,r=n.length,u.length===r)return u;for(;t.length<r;)i=u[e++],i&&(f=i.ordinal),t=this._normalizeOrdinals(this._addMissingDataItems(t,n),i,n),n.lastOrdinal=f;return t},discover:function(t,i){var r=this,u=r.transport;return n.Deferred(function(n){u.discover(f({success:function(t){t=r.reader.parse(t),r._handleCustomErrors(t)||(i&&(t=i(t)),n.resolve(t))},error:function(t,i,u){n.reject(t),r.error(t,i,u)}},t))}).promise().done(function(){r.trigger("schemaChange")})},schemaMeasures:function(){var n=this;return n.discover({data:{command:"schemaMeasures",restrictions:{catalogName:n.transport.catalog(),cubeName:n.transport.cube()}}},function(t){return n.reader.measures(t)})},schemaKPIs:function(){var n=this;return n.discover({data:{command:"schemaKPIs",restrictions:{catalogName:n.transport.catalog(),cubeName:n.transport.cube()}}},function(t){return n.reader.kpis(t)})},schemaDimensions:function(){var n=this;return n.discover({data:{command:"schemaDimensions",restrictions:{catalogName:n.transport.catalog(),cubeName:n.transport.cube()}}},function(t){return n.reader.dimensions(t)})},schemaHierarchies:function(n){var t=this;return t.discover({data:{command:"schemaHierarchies",restrictions:{catalogName:t.transport.catalog(),cubeName:t.transport.cube(),dimensionUniqueName:n}}},function(n){return t.reader.hierarchies(n)})},schemaLevels:function(n){var t=this;return t.discover({data:{command:"schemaLevels",restrictions:{catalogName:t.transport.catalog(),cubeName:t.transport.cube(),hierarchyUniqueName:n}}},function(n){return t.reader.levels(n)})},schemaCubes:function(){var n=this;return n.discover({data:{command:"schemaCubes",restrictions:{catalogName:n.transport.catalog()}}},function(t){return n.reader.cubes(t)})},schemaCatalogs:function(){var n=this;return n.discover({data:{command:"schemaCatalogs"}},function(t){return n.reader.catalogs(t)})},schemaMembers:function(n){var t=this,i=function(n){return function(i){return t.reader.members(i,n)}}(n);return t.discover({data:{command:"schemaMembers",restrictions:f({catalogName:t.transport.catalog(),cubeName:t.transport.cube()},n)}},i)},_params:function(n){this._clearAxesData&&(this._axes={},this._data=this._observe([]),this._clearAxesData=!1,this.trigger(dt));var t=rt.fn._params.call(this,n);return t=f({measures:this.measures(),measuresAxis:this.measuresAxis(),columns:this.columns(),rows:this.rows()},t),this.cubeBuilder&&(this._requestData=t),t}});it.create=function(n){n=n&&n.push?{data:n}:n;var t=n||{},r=t.data;if(t.data=r,!(t instanceof it)&&t instanceof i.data.DataSource)throw Error("Incorrect DataSource type. Only PivotDataSource instances are supported");return t instanceof it?t:new it(t)},yr={contains:', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}") > 0',doesnotcontain:', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}")',startswith:', Left({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',endswith:', Right({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',eq:', {0}.CurrentMember.MEMBER_CAPTION = "{1}"',neq:', {0}.CurrentMember.MEMBER_CAPTION = "{1}"'},pr={schemaCubes:"MDSCHEMA_CUBES",schemaCatalogs:"DBSCHEMA_CATALOGS",schemaMeasures:"MDSCHEMA_MEASURES",schemaDimensions:"MDSCHEMA_DIMENSIONS",schemaHierarchies:"MDSCHEMA_HIERARCHIES",schemaLevels:"MDSCHEMA_LEVELS",schemaMembers:"MDSCHEMA_MEMBERS",schemaKPIs:"MDSCHEMA_KPIS"},wr={read:function(n){var f,r,i,u,e,t='<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Execute xmlns="urn:schemas-microsoft-com:xml-analysis"><Command><Statement>';return t+="SELECT NON EMPTY {",f=n.columns||[],r=n.rows||[],i=n.measures||[],u="rows"===n.measuresAxis,e=n.sort||[],!f.length&&r.length&&(!i.length||i.length&&u)&&(f=r,r=[],u=!1),f.length||r.length||(u=!1),f.length?t+=lr(f,u?[]:i,e):i.length&&!u&&(t+=ft(i).join(",")),t+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS",(r.length||u&&i.length>1)&&(t+=", NON EMPTY {",t+=r.length?lr(r,u?i:[],e):ft(i).join(","),t+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON ROWS"),n.filter?(t+=" FROM ",t+="(",t+=hu(n.filter,n.connection.cube),t+=")"):t+=" FROM ["+n.connection.cube+"]",1==i.length&&f.length&&(t+=" WHERE ("+ft(i).join(",")+")"),t+="</Statement></Command><Properties><PropertyList><Catalog>"+n.connection.catalog+"</Catalog><Format>Multidimensional</Format></PropertyList></Properties></Execute></Body></Envelope>",t.replace(/\&/g,"&amp;")},discover:function(t){t=t||{};var i='<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Discover xmlns="urn:schemas-microsoft-com:xml-analysis">';return i+="<RequestType>"+(pr[t.command]||t.command)+"</RequestType>",i+="<Restrictions>"+ir("RestrictionList",t.restrictions,!0)+"</Restrictions>",t.connection&&t.connection.catalog&&(t.properties=n.extend({},{Catalog:t.connection.catalog},t.properties)),i+="<Properties>"+ir("PropertyList",t.properties)+"</Properties>",i+="</Discover></Body></Envelope>"}},wt=i.data.RemoteTransport.extend({init:function(n){var t=n;n=this.options=f(!0,{},this.options,n),i.data.RemoteTransport.call(this,n),ii(t.discover)?this.discover=t.discover:"string"==typeof t.discover?this.options.discover={url:t.discover}:t.discover||(this.options.discover=this.options.read)},setup:function(t,r){return t.data=t.data||{},n.extend(!0,t.data,{connection:this.options.connection}),i.data.RemoteTransport.fn.setup.call(this,t,r)},options:{read:{dataType:"text",contentType:"text/xml",type:"POST"},discover:{dataType:"text",contentType:"text/xml",type:"POST"},parameterMap:function(n,t){return wr[t](n,t)}},discover:function(t){return n.ajax(this.setup(t,"discover"))}}),s={cubes:{name:i.getter("CUBE_NAME['#text']",!0),caption:i.getter("CUBE_CAPTION['#text']",!0),description:i.getter("DESCRIPTION['#text']",!0),type:i.getter("CUBE_TYPE['#text']",!0)},catalogs:{name:i.getter("CATALOG_NAME['#text']",!0),description:i.getter("DESCRIPTION['#text']",!0)},measures:{name:i.getter("MEASURE_NAME['#text']",!0),caption:i.getter("MEASURE_CAPTION['#text']",!0),uniqueName:i.getter("MEASURE_UNIQUE_NAME['#text']",!0),description:i.getter("DESCRIPTION['#text']",!0),aggregator:i.getter("MEASURE_AGGREGATOR['#text']",!0),groupName:i.getter("MEASUREGROUP_NAME['#text']",!0),displayFolder:i.getter("MEASURE_DISPLAY_FOLDER['#text']",!0),defaultFormat:i.getter("DEFAULT_FORMAT_STRING['#text']",!0)},kpis:{name:i.getter("KPI_NAME['#text']",!0),caption:i.getter("KPI_CAPTION['#text']",!0),value:i.getter("KPI_VALUE['#text']",!0),goal:i.getter("KPI_GOAL['#text']",!0),status:i.getter("KPI_STATUS['#text']",!0),trend:i.getter("KPI_TREND['#text']",!0),statusGraphic:i.getter("KPI_STATUS_GRAPHIC['#text']",!0),trendGraphic:i.getter("KPI_TREND_GRAPHIC['#text']",!0),description:i.getter("KPI_DESCRIPTION['#text']",!0),groupName:i.getter("MEASUREGROUP_NAME['#text']",!0)},dimensions:{name:i.getter("DIMENSION_NAME['#text']",!0),caption:i.getter("DIMENSION_CAPTION['#text']",!0),description:i.getter("DESCRIPTION['#text']",!0),uniqueName:i.getter("DIMENSION_UNIQUE_NAME['#text']",!0),defaultHierarchy:i.getter("DEFAULT_HIERARCHY['#text']",!0),type:i.getter("DIMENSION_TYPE['#text']",!0)},hierarchies:{name:i.getter("HIERARCHY_NAME['#text']",!0),caption:i.getter("HIERARCHY_CAPTION['#text']",!0),description:i.getter("DESCRIPTION['#text']",!0),uniqueName:i.getter("HIERARCHY_UNIQUE_NAME['#text']",!0),dimensionUniqueName:i.getter("DIMENSION_UNIQUE_NAME['#text']",!0),displayFolder:i.getter("HIERARCHY_DISPLAY_FOLDER['#text']",!0),origin:i.getter("HIERARCHY_ORIGIN['#text']",!0),defaultMember:i.getter("DEFAULT_MEMBER['#text']",!0)},levels:{name:i.getter("LEVEL_NAME['#text']",!0),caption:i.getter("LEVEL_CAPTION['#text']",!0),description:i.getter("DESCRIPTION['#text']",!0),uniqueName:i.getter("LEVEL_UNIQUE_NAME['#text']",!0),dimensionUniqueName:i.getter("DIMENSION_UNIQUE_NAME['#text']",!0),displayFolder:i.getter("LEVEL_DISPLAY_FOLDER['#text']",!0),orderingProperty:i.getter("LEVEL_ORDERING_PROPERTY['#text']",!0),origin:i.getter("LEVEL_ORIGIN['#text']",!0),hierarchyUniqueName:i.getter("HIERARCHY_UNIQUE_NAME['#text']",!0)},members:{name:i.getter("MEMBER_NAME['#text']",!0),caption:i.getter("MEMBER_CAPTION['#text']",!0),uniqueName:i.getter("MEMBER_UNIQUE_NAME['#text']",!0),dimensionUniqueName:i.getter("DIMENSION_UNIQUE_NAME['#text']",!0),hierarchyUniqueName:i.getter("HIERARCHY_UNIQUE_NAME['#text']",!0),levelUniqueName:i.getter("LEVEL_UNIQUE_NAME['#text']",!0),childrenCardinality:i.getter("CHILDREN_CARDINALITY['#text']",!0)}},pt=["axes","catalogs","cubes","dimensions","hierarchies","levels","measures"],vt=i.data.XmlDataReader.extend({init:function(n){i.data.XmlDataReader.call(this,n),this._extend(n)},_extend:function(n){for(var r,t,i=0,u=pt.length;i<u;i++)r=pt[i],t=n[r],t&&t!==e&&(this[r]=t)},parse:function(n){var t=i.data.XmlDataReader.fn.parse(n.replace(/<(\/?)(\w|-)+:/g,"<$1"));return i.getter("['Envelope']['Body']",!0)(t)},errors:function(n){var t=i.getter("['Fault']",!0)(n);return t?[{faultstring:i.getter("faultstring['#text']",!0)(t),faultcode:i.getter("faultcode['#text']",!0)(t)}]:null},axes:function(n){var f,u,t,r;for(n=i.getter('ExecuteResponse["return"].root',!0)(n),f=g(i.getter("Axes.Axis",!0)(n)),t={columns:{},rows:{}},r=0;r<f.length;r++)u=f[r],"sliceraxis"!==u["@name"].toLowerCase()&&(t.columns.tuples?t.rows=vr(u):t.columns=vr(u));return t},data:function(n){var r,u,f,o,e,t;for(n=i.getter('ExecuteResponse["return"].root',!0)(n),r=g(i.getter("CellData.Cell",!0)(n)),u=[],f=i.getter("['@CellOrdinal']"),o=i.getter("Value['#text']"),e=i.getter("FmtValue['#text']"),t=0;t<r.length;t++)u.push({value:o(r[t]),fmtValue:e(r[t]),ordinal:parseInt(f(r[t]),10)});return u},_mapSchema:function(n,t){var e,o,r,f,u;for(n=i.getter('DiscoverResponse["return"].root',!0)(n),e=g(i.getter("row",!0)(n)),o=[],r=0;r<e.length;r++){f={};for(u in t)f[u]=t[u](e[r]);o.push(f)}return o},measures:function(n){return this._mapSchema(n,s.measures)},kpis:function(n){return this._mapSchema(n,s.kpis)},hierarchies:function(n){return this._mapSchema(n,s.hierarchies)},levels:function(n){return this._mapSchema(n,s.levels)},dimensions:function(n){return this._mapSchema(n,s.dimensions)},cubes:function(n){return this._mapSchema(n,s.cubes)},catalogs:function(n){return this._mapSchema(n,s.catalogs)},members:function(n){return this._mapSchema(n,s.members)}}),f(!0,i.data,{PivotDataSource:it,XmlaTransport:wt,XmlaDataReader:vt,PivotCubeBuilder:di,transports:{xmla:wt},readers:{xmla:vt}}),sr=function(n,t){if(!n)return null;for(var i=0,r=n.length;i<r;i++)if(n[i].field===t)return n[i];return null},st=function(n,t){for(var r=[],i=0,u=n.length;i<u;i++)n[i].field!==t&&r.push(n[i]);return r},i.ui.PivotSettingTarget=a.extend({init:function(t,r){var u=this;a.fn.init.call(u,t,r),u.element.addClass("k-pivot-setting"),u.dataSource=i.data.PivotDataSource.create(r.dataSource),u._refreshHandler=n.proxy(u.refresh,u),u.dataSource.first(v,u._refreshHandler),r.template||(u.options.template="<div data-"+i.ns+'name="${data.name || data}">${data.name || data}'+(u.options.enabled?'<a class="k-button k-button-icon k-bare"><span class="k-icon k-i-close k-setting-delete"></span></a>':"")+"</div>"),u.template=i.template(u.options.template),u.emptyTemplate=i.template(u.options.emptyTemplate),u._sortable(),u.element.on("click"+tt,".k-button,.k-item",function(t){var r=n(t.target),f=r.closest("["+i.attr("name")+"]").attr(i.attr("name"));f&&(r.hasClass("k-i-close")?u.remove(f):u.options.sortable&&r[0]===t.currentTarget&&u.sort({field:f,dir:r.find(".k-i-sort-asc-sm")[0]?"desc":"asc"}))}),(r.filterable||r.sortable)&&(u.fieldMenu=new bt.PivotFieldMenu(u.element,{messages:u.options.messages.fieldMenu,filter:".k-setting-fieldmenu",filterable:r.filterable,sortable:r.sortable,dataSource:u.dataSource})),u.refresh()},options:{name:"PivotSettingTarget",template:null,filterable:!1,sortable:!1,emptyTemplate:"<div class='k-empty'>${data}</div>",setting:"columns",enabled:!0,messages:{empty:"Drop Fields Here"}},setDataSource:function(n){this.dataSource.unbind(v,this._refreshHandler),this.dataSource=this.options.dataSource=n,this.fieldMenu&&this.fieldMenu.setDataSource(n),n.first(v,this._refreshHandler),this.refresh()},_sortable:function(){var n=this;n.options.enabled&&(this.sortable=this.element.kendoSortable({connectWith:this.options.connectWith,hint:n.options.hint,cursor:"move",start:function(n){n.item.focus().blur()},change:function(t){var r=t.item.attr(i.attr("name"));"receive"==t.action?n.add(r):"remove"==t.action?n.remove(r):"sort"==t.action&&n.move(r,t.newIndex)}}).data("kendoSortable"))},_indexOf:function(n,t){for(var r=-1,i=0,u=t.length;i<u;i++)if(c(t[i])===n){r=i;break}return r},_isKPI:function(n){return"kpi"===n.type||n.measure},validate:function(n){var t,i,r=2==n.type||"aggregator"in n||this._isKPI(n);return r?"measures"===this.options.setting:"measures"===this.options.setting?r:(t=this.dataSource[this.options.setting](),i=n.defaultHierarchy||n.uniqueName,!(this._indexOf(i,t)>-1)&&(t=this.dataSource["columns"===this.options.setting?"rows":"columns"](),!(this._indexOf(i,t)>-1)))},add:function(t){var i,u,r=this.dataSource[this.options.setting]();for(t=n.isArray(t)?t.slice(0):[t],i=0,u=t.length;i<u;i++)this._indexOf(t[i],r)!==-1&&(t.splice(i,1),i-=1,u-=1);t.length&&(r=r.concat(t),this.dataSource[this.options.setting](r))},move:function(n,t){var i=this.dataSource[this.options.setting](),r=this._indexOf(n,i);r>-1&&(n=i.splice(r,1)[0],i.splice(t,0,n),this.dataSource[this.options.setting](i))},remove:function(n){var r=this.dataSource[this.options.setting](),u=this._indexOf(n,r),i=this.dataSource.sort(),t=this.dataSource.filter();u>-1&&(t&&(t.filters=st(t.filters,n),this.dataSource._filter.filters=t.filters,t.filters.length||(this.dataSource._filter=null)),i&&(i=st(i,n),this.dataSource._sort=i),r.splice(u,1),this.dataSource[this.options.setting](r))},sort:function(n){var r=this.options.sortable,u=r===!0||r.allowUnsort,f=u&&"asc"===n.dir,i=this.dataSource.sort()||[],t=st(i,n.field);f&&i.length!==t.length&&(n=null),n&&t.push(n),this.dataSource.sort(t)},refresh:function(){var n,r="",u=this.dataSource[this.options.setting](),e=u.length,i=0;if(e)for(;i<e;i++)n=u[i],n=n.name===t?{name:n}:n,r+=this.template(f({sortIcon:this._sortIcon(n.name)},n));else r=this.emptyTemplate(this.options.messages.empty);this.element.html(r)},destroy:function(){a.fn.destroy.call(this),this.dataSource.unbind(v,this._refreshHandler),this.element.off(tt),this.sortable&&this.sortable.destroy(),this.fieldMenu&&this.fieldMenu.destroy(),this.element=null,this._refreshHandler=null},_sortIcon:function(n){var r=this.dataSource.sort(),t=sr(r,c(n)),i="";return t&&(i="k-i-sort-"+t.dir),i}}),d=a.extend({init:function(r,u){var e,o,f=this;a.fn.init.call(f,r,u),f._dataSource(),f._bindConfigurator(),f._wrapper(),f._createLayout(),f._columnBuilder=e=new ui,f._rowBuilder=o=new ei,f._contentBuilder=new oi,f._templates(),f.columnsHeader.add(f.rowsHeader).on("click","span.k-icon",function(){var a,r,s,v,h=n(this),l=e,y="expandColumn",c=h.attr(i.attr("path")),u={axis:"columns",path:n.parseJSON(c)};h.parent().is("td")&&(l=o,y="expandRow",u.axis="rows"),r=h.hasClass(et),s=l.metadata[c],v=s.expanded===t,a=r?si:li,u.childrenLoaded=s.maxChildren>s.children,f.trigger(a,u)||(l.metadata[c].expanded=!r,h.toggleClass(et,!r).toggleClass(at,r),!r&&v?f.dataSource[y](u.path):f.refresh())}),f._scrollable(),f.options.autoBind&&f.dataSource.fetch(),i.notify(f)},events:[fi,ar,li,si],options:{name:"PivotGrid",autoBind:!0,reorderable:!0,filterable:!1,sortable:!1,height:null,columnWidth:100,configurator:"",columnHeaderTemplate:null,rowHeaderTemplate:null,dataCellTemplate:null,kpiStatusTemplate:null,kpiTrendTemplate:null,messages:{measureFields:"Drop Data Fields Here",columnFields:"Drop Column Fields Here",rowFields:"Drop Rows Fields Here"}},_templates:function(){var u=this.options.columnHeaderTemplate,f=this.options.rowHeaderTemplate,r=this.options.dataCellTemplate,n=this.options.kpiStatusTemplate,t=this.options.kpiTrendTemplate;this._columnBuilder.template=i.template(u||ri,{useWithBlock:!!u}),this._contentBuilder.dataTemplate=i.template(r||nu,{useWithBlock:!!r}),this._contentBuilder.kpiStatusTemplate=i.template(n||fu,{useWithBlock:!!n}),this._contentBuilder.kpiTrendTemplate=i.template(t||kr,{useWithBlock:!!t}),this._rowBuilder.template=i.template(f||ri,{useWithBlock:!!f})},_bindConfigurator:function(){var t=this.options.configurator;t&&n(t).kendoPivotConfigurator("setDataSource",this.dataSource)},cellInfoByElement:function(t){return t=n(t),this.cellInfo(t.index(),t.parent("tr").index())},cellInfo:function(n,t){var f,u=this._contentBuilder,i=u.columnIndexes[n||0],r=u.rowIndexes[t||0];return i&&r?(f=r.index*u.rowLength+i.index,{columnTuple:i.tuple,rowTuple:r.tuple,measure:i.measure||r.measure,dataItem:this.dataSource.view()[f]}):null},setDataSource:function(n){this.options.dataSource=n,this._dataSource(),this.measuresTarget&&this.measuresTarget.setDataSource(n),this.rowsTarget&&this.rowsTarget.setDataSource(n),this.columnsTarget&&this.columnsTarget.setDataSource(n),this._bindConfigurator(),this.options.autoBind&&n.fetch()},setOptions:function(n){a.fn.setOptions.call(this,n),this._templates()},destroy:function(){a.fn.destroy.call(this),clearTimeout(this._headerReflowTimeout)},_dataSource:function(){var t=this,r=t.options.dataSource;r=n.isArray(r)?{data:r}:r,t.dataSource&&this._refreshHandler?t.dataSource.unbind(v,t._refreshHandler).unbind(dt,t._stateResetHandler).unbind(ci,t._progressHandler).unbind(hi,t._errorHandler):(t._refreshHandler=n.proxy(t.refresh,t),t._progressHandler=n.proxy(t._requestStart,t),t._stateResetHandler=n.proxy(t._stateReset,t),t._errorHandler=n.proxy(t._error,t)),t.dataSource=i.data.PivotDataSource.create(r).bind(v,t._refreshHandler).bind(ci,t._progressHandler).bind(dt,t._stateResetHandler).bind(hi,t._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_stateReset:function(){this._columnBuilder.reset(),this._rowBuilder.reset()},_wrapper:function(){var n=this.options.height;this.wrapper=this.element.addClass("k-widget k-pivot"),n&&this.wrapper.css("height",n)},_measureFields:function(){this.measureFields=n(ot).addClass("k-pivot-toolbar k-header k-settings-measures"),this.measuresTarget=this._createSettingTarget(this.measureFields,{setting:"measures",messages:{empty:this.options.messages.measureFields}})},_createSettingTarget:function(t,r){var f='<span tabindex="0" class="k-button" data-'+i.ns+'name="${data.name}">${data.name}',e=r.sortable,u="";return e&&(u+="#if (data.sortIcon) {#",u+='<span class="k-icon ${data.sortIcon}-sm"></span>',u+="#}#"),(r.filterable||e)&&(u+='<span class="k-icon k-i-more-vertical k-setting-fieldmenu"></span>'),this.options.reorderable&&(u+='<span class="k-icon k-i-close k-setting-delete"></span>'),u&&(f+='<span class="k-field-actions">'+u+"</span>"),f+="</span>",new i.ui.PivotSettingTarget(t,n.extend({template:f,emptyTemplate:'<span class="k-empty">${data}</span>',enabled:this.options.reorderable,dataSource:this.dataSource},r))},_initSettingTargets:function(){this.columnsTarget=this._createSettingTarget(this.columnFields,{connectWith:this.rowFields,setting:"columns",filterable:this.options.filterable,sortable:this.options.sortable,messages:{empty:this.options.messages.columnFields,fieldMenu:this.options.messages.fieldMenu}}),this.rowsTarget=this._createSettingTarget(this.rowFields,{connectWith:this.columnFields,setting:"rows",filterable:this.options.filterable,sortable:this.options.sortable,messages:{empty:this.options.messages.rowFields,fieldMenu:this.options.messages.fieldMenu}})},_createLayout:function(){var t=this,f=n(tu),u=f.find(".k-pivot-rowheaders"),e=f.find(".k-pivot-table"),r=n(ot).addClass("k-grid k-widget");t._measureFields(),t.columnFields=n(ot).addClass("k-pivot-toolbar k-header k-settings-columns"),t.rowFields=n(ot).addClass("k-pivot-toolbar k-header k-settings-rows"),t.columnsHeader=n('<div class="k-grid-header-wrap" />').wrap('<div class="k-grid-header" />'),t.columnsHeader.parent().css("padding-right",i.support.scrollbar()),t.rowsHeader=n('<div class="k-grid k-widget k-alt"/>'),t.content=n('<div class="k-grid-content" />'),u.append(t.measureFields),u.append(t.rowFields),u.append(t.rowsHeader),r.append(t.columnsHeader.parent()),r.append(t.content),e.append(t.columnFields),e.append(r),t.wrapper.append(f),t.columnsHeaderTree=new i.dom.Tree(t.columnsHeader[0]),t.rowsHeaderTree=new i.dom.Tree(t.rowsHeader[0]),t.contentTree=new i.dom.Tree(t.content[0]),t._initSettingTargets()},_progress:function(n){i.ui.progress(this.wrapper,n)},_resize:function(){this.content[0].firstChild&&(this._setSectionsWidth(),this._setSectionsHeight(),this._setContentWidth(),this._setContentHeight(),this._columnHeaderReflow())},_columnHeaderReflow:function(){var n=this.columnsHeader.children("table");i.support.browser.mozilla&&(clearTimeout(this._headerReflowTimeout),n.css("table-layout","auto"),this._headerReflowTimeout=setTimeout(function(){n.css("table-layout","")}))},_setSectionsWidth:function(){var t=this.rowsHeader,i=t.parent(".k-pivot-rowheaders").width(ut),n=Math.max(wi(this.measureFields),wi(this.rowFields));n=Math.max(t.children("table").width(),n),i.width(n)},_setSectionsHeight:function(){var u=this.measureFields.height(ut).height(),f=this.columnFields.height(ut).height(),n=this.rowFields.height(ut).innerHeight(),r=this.columnsHeader.height(ut).innerHeight(),e=n-this.rowFields.height(),i=f>u?f:u,t=r>n?r:n;this.measureFields.height(i),this.columnFields.height(i),this.rowFields.height(t-e),this.columnsHeader.height(t)},_setContentWidth:function(){var t=this.content.find("table"),i=this.columnsHeader.children("table"),r=t.children("colgroup").children().length,u=r*this.options.columnWidth,n=Math.ceil(u/this.content.width()*100);n<100&&(n=100),t.add(i).css("width",n+"%"),this._resetColspan(i)},_setContentHeight:function(){var r=this,f=r.content,o=r.rowsHeader,n=r.wrapper.innerHeight(),u=i.support.scrollbar(),e=f[0].offsetHeight===f[0].clientHeight,s=r.options.height;if(r.wrapper.is(":visible")){if(!n||!s)return e&&(u=0),f.height("auto"),o.height(f.height()-u),t;n-=ki(r.columnFields),n-=ki(r.columnsHeader),n<=2*u&&(n=2*u+1,e||(n+=u)),f.height(n),e&&(u=0),o.height(n-u)}},_resetColspan:function(n){var i=this,r=n.children("tbody").children(":first").children(":first");i._colspan===t&&(i._colspan=r.attr("colspan")),r.attr("colspan",1),clearTimeout(i._layoutTimeout),i._layoutTimeout=setTimeout(function(){r.attr("colspan",i._colspan),i._colspan=t})},_axisMeasures:function(n){var r=[],i=this.dataSource,t=i.measures(),u=t.length>1||t[0]&&t[0].type;return i.measuresAxis()===n&&(0===i[n]().length||u)&&(r=t),r},items:function(){return[]},refresh:function(){var u,n=this,e=n.dataSource,s=e.axes(),h=(s.columns||{}).tuples||[],c=(s.rows||{}).tuples||[],r=n._columnBuilder,t=n._rowBuilder,f={},o={};n.trigger(fi,{action:"rebind"})||(r.measures=n._axisMeasures(gr),t.measures=n._axisMeasures(dr),n.columnsHeaderTree.render(r.build(h)),n.rowsHeaderTree.render(t.build(c)),f={indexes:r._indexes,measures:r.measures,metadata:r.metadata},o={indexes:t._indexes,measures:t.measures,metadata:t.metadata},n.contentTree.render(n._contentBuilder.build(e.view(),f,o)),n._resize(),n.touchScroller?n.touchScroller.contentResized():(u=i.touchScroller(n.content),u&&u.movable&&(n.touchScroller=u,u.movable.bind("change",function(t){n.columnsHeader.scrollLeft(-t.sender.x),n.rowsHeader.scrollTop(-t.sender.y)}))),n._progress(!1),n.trigger(ar))},_scrollable:function(){var t=this,r=t.columnsHeader,i=t.rowsHeader;t.content.scroll(function(){r.scrollLeft(this.scrollLeft),i.scrollTop(this.scrollTop)}),i.bind("DOMMouseScroll"+tt+" mousewheel"+tt,n.proxy(t._wheelScroll,t))},_wheelScroll:function(t){var r,u;t.ctrlKey||(r=i.wheelDeltaY(t),u=this.content.scrollTop(),r&&(t.preventDefault(),n(t.currentTarget).one("wheel"+tt,!1),this.rowsHeader.scrollTop(u+-r),this.content.scrollTop(u+-r)))}}),r=i.dom.element,y=i.dom.html,ni=function(n,t){return{maxChildren:0,children:0,maxMembers:0,members:0,measures:1,levelNum:n,parentMember:0!==t}},w=function(n,t){for(var r=[],i=0;i<=t;i++)r.push(n.members[i].name);return r},ti=function(n,t){for(var r="",i=0;i<=t;i++)r+=n.members[i].name;return r},ui=nt.extend({init:function(){this.measures=1,this.metadata={}},build:function(n){var i=this._tbody(n),t=this._colGroup();return[r("table",null,[t,i])]},reset:function(){this.metadata={}},_colGroup:function(){for(var i=this._rowLength(),t=[],n=0;n<i;n++)t.push(r("col",null));return r("colgroup",null,t)},_tbody:function(n){var t=n[0];return this.map={},this.rows=[],this.rootTuple=t,this._indexes=[],t?(this._buildRows(t,0),this._normalize()):this.rows.push(r("tr",null,[r("th",null,[y("&nbsp;")])])),r("tbody",null,this.rows)},_normalize:function(){for(var t,f,n,u,i,e=this.rows,o=e.length,r=0;r<o;r++)if(t=e[r],1!==t.rowSpan)for(u=t.children,n=0,f=u.length;n<f;n++)i=u[n],i.tupleAll&&(i.attr.rowSpan=t.rowSpan)},_rowIndex:function(n){for(var i=this.rows,r=i.length,t=0;t<r&&i[t]!==n;t++);return t},_rowLength:function(){var i=this.rows[0]?this.rows[0].children:[],r=i.length,n=0,t=0;if(r)for(;t<r;t++)n+=i[t].attr.colSpan||1;return n||(n=this.measures),n},_row:function(n,t,i){var f,o,h=this.rootTuple.members[t].name,s=n.members[t].levelNum,c=h+s,e=this.map,u=e[c];return u?(u.notFirst=!1,u.parentMember&&u.parentMember===i||(u.parentMember=i,u.collapsed=0,u.colSpan=0)):(u=r("tr",null,[]),u.parentMember=i,u.collapsed=0,u.colSpan=0,u.rowSpan=1,e[c]=u,f=e[h+(+s-1)],f&&(o=f.children,u.notFirst=!(!o[1]||o[1].attr.className.indexOf("k-alt")!==-1)||f.notFirst),this.rows.splice(this._rowIndex(f)+1,0,u)),u},_measures:function(n,t,i){var e,f,o,s=this.map,u=s.measureRow;for(u||(u=r("tr",null,[]),s.measureRow=u,this.rows.push(u)),f=0,o=n.length;f<o;f++)e=n[f],u.children.push(this._cell(i||"",[this._content(e,t)],e));return o},_content:function(n,t){return y(this.template({member:n,tuple:t}))},_cell:function(n,t,i){var u=r("th",{className:"k-header"+n},t);return u.value=i.caption||i.name,u},_buildRows:function(n,u,f){var s,h,a,v,y,d,tt,b,e,o,it=n.members,c=it[u],l=it[u+1],nt=[],g=0,p=0,k=0;if(c.measure)return this._measures(c.children,n),t;if(b=i.stringify(w(n,u)),s=this._row(n,u,f),a=c.children,v=a.length,e=this.metadata[b],e||(this.metadata[b]=e=ni(+c.levelNum,u),e.rootLevelNum=+this.rootTuple.members[u].levelNum),this._indexes.push({path:b,tuple:n}),c.hasChildren&&(e.expanded===!1&&(p=e.maxChildren,s.collapsed+=p,e.children=0,v=0),tt={className:"k-icon "+(v?et:at)},tt[i.attr("path")]=b,nt.push(r("span",tt))),nt.push(this._content(c,n)),y=this._cell(s.notFirst?" k-first":"",nt,c),s.children.push(y),s.colSpan+=1,v){for(d=this._cell(" k-alt",[this._content(c,n)],c),s.children.push(d);g<v;g++)h=this._buildRows(a[g],u,c);o=h.colSpan,p=h.collapsed,y.attr.colSpan=o,e.children=o,e.members=1,s.colSpan+=o,s.collapsed+=p,s.rowSpan=h.rowSpan+1,l&&(l.measure?o=this._measures(l.children,n," k-alt"):(h=this._buildRows(n,u+1),o=h.colSpan,s.collapsed+=h.collapsed,k=h.collapsed),d.attr.colSpan=o,o-=1,e.members+=o,s.colSpan+=o)}else l&&(l.measure?o=this._measures(l.children,n):(h=this._buildRows(n,u+1),o=h.colSpan,s.collapsed+=h.collapsed,k=h.collapsed),e.members=o,o>1&&(y.attr.colSpan=o,s.colSpan+=o-1));return e.maxMembers<e.members+k&&(e.maxMembers=e.members+k),a=e.children+p,e.maxChildren<a&&(e.maxChildren=a),(d||y).tupleAll=!0,s}}),ei=nt.extend({init:function(){this.metadata={}},build:function(n){var i=this._tbody(n),t=this._colGroup();return[r("table",null,[t,i])]},reset:function(){this.metadata={}},_rowLength:function(){for(var t=this.rows[0].children,r=0,i=0,n=t[i];n;)r+=n.attr.colSpan||1,n=t[++i];return r},_colGroup:function(){for(var i=this._rowLength(),t=[],n=0;n<i;n++)t.push(r("col",null));return r("colgroup",null,t)},_tbody:function(n){var t=n[0];return this.rootTuple=t,this.rows=[],this.map={},this._indexes=[],t?(this._buildRows(t,0),this._normalize()):this.rows.push(r("tr",null,[r("td",null,[y("&nbsp;")])])),r("tbody",null,this.rows)},_normalize:function(){for(var i,t,f,e,s=this.rows,c=s.length,u=0,r=this.rootTuple.members,o=r[0].name,l=r.length,n=0,h=this.map;u<c;u++)for(i=s[u],n=0;n<l;n++)f=this[r[n].name],t=i.colSpan["dim"+n],t&&t.colSpan<f&&(t.attr.colSpan=f-t.colSpan+1);i=h[o],e=h[o+"all"],i&&(i.children[0].attr.className="k-first"),e&&(e.children[0].attr.className+=" k-first")},_row:function(n){var t=r("tr",null,n);return t.rowSpan=1,t.colSpan={},this.rows.push(t),t},_content:function(n,t){return y(this.template({member:n,tuple:t}))},_cell:function(n,t,i){var u=r("td",{className:n},t);return u.value=i.caption||i.name,u},_buildRows:function(n,t){var v,c,a,y,l,f,p,nt,o,b=this.map,rt=n.members,e=rt[t],ut=rt[t+1],h=e.children,s=h.length,it=+e.levelNum,d=this.rootTuple.members[t].name,g=w(n,t-1).join(""),ft=+this.rootTuple.members[t].levelNum,ot=g+(ft===it?"":e.parentName||""),u=b[ot+"all"]||b[ot],k=it+1,tt=[];if(!u||u.hasChild?u=this._row():u.hasChild=!0,e.measure){for(p=u.allCell?"k-grid-footer":"",u.children.push(this._cell(p,[this._content(h[0],n)],h[0])),u.rowSpan=s,o=1;o<s;o++)this._row([this._cell(p,[this._content(h[o],n)],h[o])]);return u}if(b[g+e.name]=u,v=i.stringify(w(n,t)),f=this.metadata[v],f||(this.metadata[v]=f=ni(it,t),f.rootLevelNum=ft),this._indexes.push({path:v,tuple:n}),e.hasChildren&&(f.expanded===!1&&(s=0,f.children=0),nt={className:"k-icon "+(s?et:at)},nt[i.attr("path")]=v,tt.push(r("span",nt))),tt.push(this._content(e,n)),p=u.allCell&&!s?"k-grid-footer":"",c=this._cell(p,tt,e),c.colSpan=k,u.children.push(c),u.colSpan["dim"+t]=c,(!this[d]||this[d]<k)&&(this[d]=k),s){for(u.allCell=!1,u.hasChild=!1,o=0;o<s;o++)y=this._buildRows(h[o],t),u!==y&&(u.rowSpan+=y.rowSpan);u.rowSpan>1&&(c.attr.rowSpan=u.rowSpan),f.children=u.rowSpan,a=this._cell("k-grid-footer",[this._content(e,n)],e),a.colSpan=k,l=this._row([a]),l.colSpan["dim"+t]=a,l.allCell=!0,b[g+e.name+"all"]=l,ut&&(y=this._buildRows(n,t+1),a.attr.rowSpan=y.rowSpan),u.rowSpan+=l.rowSpan,f.members=l.rowSpan}else ut&&(u.hasChild=!1,this._buildRows(n,t+1),(a||c).attr.rowSpan=u.rowSpan,f.members=u.rowSpan);return f.maxChildren<f.children&&(f.maxChildren=f.children),f.maxMembers<f.members&&(f.maxMembers=f.members),u}}),oi=nt.extend({init:function(){this.columnAxis={},this.rowAxis={}},build:function(n,i,u){var e,s,o=i.indexes[0],f=i.metadata[o?o.path:t];return this.columnAxis=i,this.rowAxis=u,this.data=n,this.rowLength=f?f.maxChildren+f.maxMembers:i.measures.length||1,this.rowLength||(this.rowLength=1),e=this._tbody(),s=this._colGroup(),[r("table",null,[s,e])]},_colGroup:function(){var i=this.columnAxis.measures.length||1,t=[],n=0;for(this.rows[0]&&(i=this.rows[0].children.length);n<i;n++)t.push(r("col",null));return r("colgroup",null,t)},_tbody:function(){return this.rows=[],this.data[0]?(this.columnIndexes=this._indexes(this.columnAxis,this.rowLength),this.rowIndexes=this._indexes(this.rowAxis,Math.ceil(this.data.length/this.rowLength)),this._buildRows()):this.rows.push(r("tr",null,[r("td",null,[y("&nbsp;")])])),r("tbody",null,this.rows)},_indexes:function(n,i){var l,u,r,p,f,v,o=[],w=n.indexes,b=n.metadata,a=n.measures,h=a.length||1,s=0,e=0,c=0,y=w.length;if(!y){for(r=0;r<h;r++)o[r]={index:r,measure:a[r],tuple:null};return o}for(;c<y;c++){if(l=w[c],u=b[l.path],f=u.children+u.members,v=0,f&&(f-=h),u.expanded===!1&&u.children!==u.maxChildren&&(v=u.maxChildren),u.parentMember&&u.levelNum===u.rootLevelNum&&(f=-1),f>-1){for(r=0;r<h;r++)p=f+r,u.children||(p+=e),o[f+e+r]={children:f,index:s,measure:a[r],tuple:l.tuple},s+=1;for(;o[e]!==t;)e+=1}if(e===i)break;s+=v}return o},_buildRows:function(){for(var t,i=this.rowIndexes,r=i.length,n=0;n<r;n++)t=i[n],t&&this.rows.push(this._buildRow(t))},_buildRow:function(n){for(var f,s,c,i,u,o,e,v=n.index*this.rowLength,a=this.columnIndexes,p=a.length,l=[],h=0;h<p;h++)f=a[h],f!==t&&(u={},f.children&&(u.className="k-alt"),i="",o=this.data[v+f.index],e=f.measure||n.measure,s={columnTuple:f.tuple,rowTuple:n.tuple,measure:e,dataItem:o},""!==o.value&&e&&e.type&&("status"===e.type?i=this.kpiStatusTemplate(s):"trend"===e.type&&(i=this.kpiTrendTemplate(s))),i||(i=this.dataTemplate(s)),c=r("td",u,[y(i)]),c.value=o.value,l.push(c));return u={},n.children&&(u.className="k-grid-footer"),r("tr",u,l)}}),bt.plugin(d),i.PivotExcelExporter=i.Class.extend({init:function(n){this.options=n,this.widget=n.widget,this.dataSource=this.widget.dataSource},_columns:function(){var n,f=this.widget.columnsHeaderTree.children[0],e=this.widget.rowsHeaderTree.children[0],u=f.children[0].children.length,i=e.children[0].children.length,r=this.widget.options.columnWidth,t=[];if(i&&this.dataSource.data()[0])for(n=0;n<i;n++)t.push({autoWidth:!0});for(n=0;n<u;n++)t.push({autoWidth:!1,width:r});return t},_cells:function(n,t,i){for(var s,e,o,u,r,h=[],f=0,c=n.length;f<c;f++){for(e=[],o=n[f].children,s=o.length,u=0;u<s;u++)r=o[u],e.push({background:"#7a7a7a",color:"#fff",value:r.value,colSpan:r.attr.colSpan||1,rowSpan:r.attr.rowSpan||1});i&&i(e,f),h.push({cells:e,type:t})}return h},_rows:function(){var u,f,e=this.widget.columnsHeaderTree.children[0],r=this.widget.rowsHeaderTree.children[0],o=e.children[0].children.length,t=r.children[0].children.length,i=e.children[1].children,h=r.children[1].children,s=this.widget.contentTree.children[0].children[1].children,n=this._cells(i,"header");return t&&n[0].cells.splice(0,0,{background:"#7a7a7a",color:"#fff",value:"",colSpan:t,rowSpan:i.length}),u=function(n,t){for(var u,i,r=0,f=s[t].children;r<o;r++)u=f[r],i=+u.value,isNaN(i)&&(i=u.value),n.push({background:"#dfdfdf",color:"#333",value:i,colSpan:1,rowSpan:1})},f=this._cells(h,"data",u),n.concat(f)},_freezePane:function(){var i=this.widget.columnsHeaderTree.children[0],r=this.widget.rowsHeaderTree.children[0],n=r.children[0].children.length,t=i.children[1].children;return{colSplit:n,rowSplit:t.length}},workbook:function(){var t;return this.dataSource.view()[0]?(t=n.Deferred(),t.resolve()):t=this.dataSource.fetch(),t.then(n.proxy(function(){return{sheets:[{columns:this._columns(),rows:this._rows(),freezePane:this._freezePane(),filter:null}]}},this))}}),kt={extend:function(t){t.events.push("excelExport"),t.options.excel=n.extend(t.options.excel,this.options),t.saveAsExcel=this.saveAsExcel},options:{proxyURL:"",filterable:!1,fileName:"Export.xlsx"},saveAsExcel:function(){var t=this.options.excel||{},r=new i.PivotExcelExporter({widget:this});r.workbook().then(n.proxy(function(n){if(!this.trigger("excelExport",{workbook:n})){var r=new i.ooxml.Workbook(n);i.saveAs({dataURI:r.toDataURL(),fileName:n.fileName||t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy})}},this))}},i.PivotExcelMixin=kt,i.ooxml&&i.ooxml.Workbook&&kt.extend(d.prototype),i.PDFMixin&&(i.PDFMixin.extend(d.prototype),d.fn._drawPDF=function(){return this._drawPDFShadow({width:this.wrapper.width()},{avoidLinks:this.options.pdf.avoidLinks})})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.treeview.draganddrop.min",["kendo.data.min","kendo.draganddrop.min"],n)}(function(){return function(n,t){var i=window.kendo,e=i.ui,u=n.proxy,s=n.extend,f="visibility",r="k-state-hover",o="input,a,textarea,.k-multiselect-wrap,select,button,a.k-button>.k-icon,button.k-button>.k-icon,span.k-icon.k-i-arrow-60-right,span.k-icon.k-i-arrow-45-down-right";e.HierarchicalDragAndDrop=i.Class.extend({init:function(t,r){this.element=t,this.hovered=t,this.options=s({dragstart:n.noop,drag:n.noop,drop:n.noop,dragend:n.noop},r),this._draggable=new e.Draggable(t,{ignore:o,filter:r.filter,autoScroll:r.autoScroll,cursorOffset:{left:10,top:i.support.mobileOS?-40/i.support.zoomLevel():10},hint:u(this._hint,this),dragstart:u(this.dragstart,this),dragcancel:u(this.dragcancel,this),drag:u(this.drag,this),dragend:u(this.dragend,this),$angular:r.$angular})},_hint:function(n){return"<div class='k-header k-drag-clue'><span class='k-icon k-drag-status' />"+this.options.hintText(n)+"</div>"},_removeTouchHover:function(){i.support.touch&&this.hovered&&(this.hovered.find("."+r).removeClass(r),this.hovered=!1)},_hintStatus:function(i){var r=this._draggable.hint.find(".k-drag-status")[0];return i?(r.className="k-icon k-drag-status "+i,t):n.trim(r.className.replace(/(p|k)-(icon|drag-status)/g,""))},dragstart:function(t){this.source=t.currentTarget.closest(this.options.itemSelector),this.options.dragstart(this.source)&&t.preventDefault(),this.dropHint=this.options.reorderable?n("<div class='k-i-drag-and-drop' />").css(f,"hidden").appendTo(this.element):n()},drag:function(t){var h,v,d,c,k,o,y,e,l,b,u,a=this.options,p=this.source,s=this.dropTarget=n(i.eventTarget(t)),w=s.closest(a.allowedContainers);w.length?p[0]==s[0]||a.contains(p[0],s[0])?u="k-i-cancel":(u="k-i-insert-middle",l=a.itemFromTarget(s),h=l.item,h.length?(this._removeTouchHover(),v=i._outerHeight(h),c=l.content,a.reorderable?(k=v/(c.length>0?4:2),d=i.getOffset(h).top,o=t.y.location<d+k,y=d+v-k<t.y.location,e=c.length&&!o&&!y):(e=!0,o=!1,y=!1),this.hovered=!!e&&w,this.dropHint.css(f,e?"hidden":"visible"),this._lastHover&&this._lastHover[0]!=c[0]&&this._lastHover.removeClass(r),this._lastHover=c.toggleClass(r,e),e?u="k-i-plus":(b=h.position(),b.top+=o?0:v,this.dropHint.css(b)[o?"prependTo":"appendTo"](a.dropHintContainer(h)),o&&l.first&&(u="k-i-insert-up"),y&&l.last&&(u="k-i-insert-down"))):s[0]!=this.dropHint[0]&&(this._lastHover&&this._lastHover.removeClass(r),u=n.contains(this.element[0],w[0])?"k-i-cancel":"k-i-plus")):(u="k-i-cancel",this._removeTouchHover()),this.options.drag({originalEvent:t.originalEvent,source:p,target:s,pageY:t.y.location,pageX:t.x.location,status:u.substring(2),setStatus:function(n){u=n}}),0!==u.indexOf("k-i-insert")&&this.dropHint.css(f,"hidden"),this._hintStatus(u)},dragcancel:function(){this.dropHint.remove()},dragend:function(n){var i,o,h,s="over",c=this.source,u=this.dropHint,e=this.dropTarget;return"visible"==u.css(f)?(s=this.options.dropPositionFrom(u),i=u.closest(this.options.itemSelector)):e&&(i=e.closest(this.options.itemSelector),i.length||(i=e.closest(this.options.allowedContainers))),o={originalEvent:n.originalEvent,source:c[0],destination:i[0],valid:"k-i-cancel"!=this._hintStatus(),setValid:function(n){this.valid=n},dropTarget:e[0],position:s},h=this.options.drop(o),u.remove(),this._removeTouchHover(),this._lastHover&&this._lastHover.removeClass(r),!o.valid||h?(this._draggable.dropped=o.valid,t):(this._draggable.dropped=!0,this.options.dragend({originalEvent:n.originalEvent,source:c,destination:i,position:s}),t)},destroy:function(){this._lastHover=this.hovered=null,this._draggable.destroy()}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.treeview.min",["kendo.data.min","kendo.treeview.draganddrop.min"],n)}(function(){return function(n,t){function ct(n){return function(t){var i=t.children(".k-animation-container");return i.length||(i=t),i.children(n)}}function c(n){return i.template(n,{useWithBlock:!1})}function rt(n){return n.find("> div .k-checkbox-wrapper [type=checkbox]")}function at(n){return function(t,i){i=i.closest(f);var u,r=i.parent();return r.parent().is("li")&&(u=r.parent()),this._dataSourceMove(t,r,u,function(t,r){return this._insert(t.data(),r,i.index()+n)})}}function ui(t,i){for(var r;t&&"ul"!=t.nodeName.toLowerCase();)r=t,t=t.nextSibling,3==r.nodeType&&(r.nodeValue=n.trim(r.nodeValue)),gt.test(r.className)?i.insertBefore(r,i.firstChild):i.appendChild(r)}function k(t){var i=t.children("div"),u=t.children("ul"),f=i.children(".k-icon"),e=t.children(":checkbox"),r=i.children(".k-in");t.hasClass("k-treeview")||(i.length||(i=n("<div />").prependTo(t)),!f.length&&u.length?f=n("<span class='k-icon' />").prependTo(i):u.length&&u.children().length||(f.remove(),u.remove()),e.length&&n("<span class='k-checkbox-wrapper' />").appendTo(i).append(e),r.length||(r=t.children("a").eq(0).addClass("k-in k-link"),r.length||(r=n("<span class='k-in' />")),r.appendTo(i),i.length&&ui(i[0].nextSibling,r[0])))}var ut,o,w,d,gt,i=window.kendo,a=i.ui,fi=i.data,v=n.extend,bt=i.template,y=n.isArray,it=a.Widget,wt=fi.HierarchicalDataSource,u=n.proxy,h=i.keys,r=".kendoTreeView",tt="select",kt="check",dt="navigate",ri="expand",g="change",pt="error",e="checked",s="indeterminate",ei="collapse",ni="dragstart",ti="drag",yt="drop",ot="dragend",st="dataBound",et="click",l="undefined",ft="k-state-hover",b="k-treeview",ii=":visible",f=".k-item",nt="string",lt="aria-selected",ht="aria-disabled",p={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},vt=function(n){return"object"==typeof HTMLElement?n instanceof HTMLElement:n&&"object"==typeof n&&1===n.nodeType&&typeof n.nodeName===nt};o=ct(".k-group"),w=ct(".k-group,.k-content"),d=function(n){return n.children("div").children(".k-icon")},gt=/k-sprite/,ut=i.ui.DataBoundWidget.extend({init:function(n,t){var f,r=this,u=!1,e=t&&!!t.dataSource;y(t)&&(t={dataSource:t}),t&&typeof t.loadOnDemand==l&&y(t.dataSource)&&(t.loadOnDemand=!1),it.prototype.init.call(r,n,t),n=r.element,t=r.options,f=n.is("ul")&&n||n.hasClass(b)&&n.children("ul"),u=!e&&f.length,u&&(t.dataSource.list=f),r._animation(),r._accessors(),r._templates(),n.hasClass(b)?(r.wrapper=n,r.root=n.children("ul").eq(0)):(r._wrapper(),f&&(r.root=n,r._group(r.wrapper))),r._tabindex(),r.root.attr("role","tree"),r._dataSource(u),r._attachEvents(),r._dragging(),u?r._syncHtmlAndDataSource():t.autoBind&&(r._progress(!0),r.dataSource.fetch()),t.checkboxes&&t.checkboxes.checkChildren&&r.updateIndeterminate(),r.element[0].id&&(r._ariaId=i.format("{0}_tv_active",r.element[0].id)),i.notify(r)},_attachEvents:function(){var t=this,i=".k-in:not(.k-state-selected,.k-state-disabled)",f="mouseenter";t.wrapper.on(f+r,".k-in.k-state-selected",function(n){n.preventDefault()}).on(f+r,i,function(){n(this).addClass(ft)}).on("mouseleave"+r,i,function(){n(this).removeClass(ft)}).on(et+r,i,u(t._click,t)).on("dblclick"+r,".k-in:not(.k-state-disabled)",u(t._toggleButtonClick,t)).on(et+r,".k-i-expand,.k-i-collapse",u(t._toggleButtonClick,t)).on("keydown"+r,u(t._keydown,t)).on("focus"+r,u(t._focus,t)).on("blur"+r,u(t._blur,t)).on("mousedown"+r,".k-in,.k-checkbox-wrapper :checkbox,.k-i-expand,.k-i-collapse",u(t._mousedown,t)).on("change"+r,".k-checkbox-wrapper :checkbox",u(t._checkboxChange,t)).on("click"+r,".k-checkbox-wrapper :checkbox",u(t._checkboxClick,t)).on("click"+r,".k-checkbox-label",u(t._checkboxLabelClick,t)).on("click"+r,".k-request-retry",u(t._retryRequest,t)).on("click"+r,function(i){n(i.target).is(":kendoFocusable")||t.focus()})},_checkboxClick:function(t){var i=n(t.target);i.data(s)&&(i.data(s,!1).prop(s,!1).prop(e,!0),this._checkboxChange(t))},_checkboxLabelClick:function(n){n.target.previousSibling.click()},_syncHtmlAndDataSource:function(n,t){n=n||this.root,t=t||this.dataSource;for(var u,r,s,o,a=t.view(),l=i.attr("uid"),v=i.attr("expanded"),c=this.options.checkboxes,h=n.children("li"),f=0;f<h.length;f++)r=a[f],s=r.uid,u=h.eq(f),u.attr("role","treeitem").attr(l,s),r.expanded="true"===u.attr(v),c&&(o=rt(u),r.checked=o.prop(e),o.attr("id","_"+s),o.next(".k-checkbox-label").attr("for","_"+s)),this._syncHtmlAndDataSource(u.children("ul"),r.children)},_animation:function(){var i=this.options,n=i.animation,r=n.collapse&&"effects"in n.collapse,t=v({},n.expand,n.collapse);r||(t=v(t,{reverse:!0})),n===!1&&(n={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),n.collapse=v(t,{hide:!0}),i.animation=n},_dragging:function(){var t,r=this.options.dragAndDrop,i=this.dragging;r&&!i?(t=this,this.dragging=new a.HierarchicalDragAndDrop(this.element,{reorderable:!0,$angular:this.options.$angular,autoScroll:this.options.autoScroll,filter:"div:not(.k-state-disabled) .k-in",allowedContainers:".k-treeview",itemSelector:".k-treeview .k-item",hintText:u(this._hintText,this),contains:function(t,i){return n.contains(t,i)},dropHintContainer:function(n){return n},itemFromTarget:function(n){var t=n.closest(".k-top,.k-mid,.k-bot");return{item:t,content:n.closest(".k-in"),first:t.hasClass("k-top"),last:t.hasClass("k-bot")}},dropPositionFrom:function(n){return n.prevAll(".k-in").length>0?"after":"before"},dragstart:function(n){return t.trigger(ni,{sourceNode:n[0]})},drag:function(n){t.trigger(ti,{originalEvent:n.originalEvent,sourceNode:n.source[0],dropTarget:n.target[0],pageY:n.pageY,pageX:n.pageX,statusClass:n.status,setStatusClass:n.setStatus})},drop:function(n){return t.trigger(yt,{originalEvent:n.originalEvent,sourceNode:n.source,destinationNode:n.destination,valid:n.valid,setValid:function(t){this.valid=t,n.setValid(t)},dropTarget:n.dropTarget,dropPosition:n.position})},dragend:function(n){function f(i){t.updateIndeterminate(),t.trigger(ot,{originalEvent:n.originalEvent,sourceNode:i&&i[0],destinationNode:u[0],dropPosition:r})}var i=n.source,u=n.destination,r=n.position;"over"==r?t.append(i,u,f):("before"==r?i=t.insertBefore(i,u):"after"==r&&(i=t.insertAfter(i,u)),f(i))}})):!r&&i&&(i.destroy(),this.dragging=null)},_hintText:function(n){return this.templates.dragClue({item:this.dataItem(n),treeview:this.options})},_templates:function(){var t=this,n=t.options,r=u(t._fieldAccessor,t);n.template&&typeof n.template==nt?n.template=bt(n.template):n.template||(n.template=c("# var text = "+r("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")),t._checkboxes(),t.templates={wrapperCssClass:function(n,t){var i="k-item",r=t.index;return n.firstLevel&&0===r&&(i+=" k-first"),r==n.length-1&&(i+=" k-last"),i},cssClass:function(n,t){var u="",i=t.index,r=n.length-1;return n.firstLevel&&0===i&&(u+="k-top "),u+=0===i&&i!=r?"k-top":i==r?"k-bot":"k-mid"},textClass:function(n,t){var i="k-in";return t&&(i+=" k-link"),n.enabled===!1&&(i+=" k-state-disabled"),n.selected===!0&&(i+=" k-state-selected"),i},toggleButtonClass:function(n){var t="k-icon";return t+=n.expanded!==!0?" k-i-expand":" k-i-collapse"},groupAttributes:function(n){var t="";return n.firstLevel||(t="role='group'"),t+(n.expanded!==!0?" style='display:none'":"")},groupCssClass:function(n){var t="k-group";return n.firstLevel&&(t+=" k-treeview-lines"),t},dragClue:c("#= data.treeview.template(data) #"),group:c("<ul class='#= data.r.groupCssClass(data.group) #'#= data.r.groupAttributes(data.group) #>#= data.renderItems(data) #</ul>"),itemContent:c("# var imageUrl = "+r("imageUrl")+"(data.item); ## var spriteCssClass = "+r("spriteCssClass")+"(data.item); ## if (imageUrl) { #<img class='k-image' alt='' src='#= imageUrl #'># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #' /># } ##= data.treeview.template(data) #"),itemElement:c("# var item = data.item, r = data.r; ## var url = "+r("url")+"(item); #<div class='#= r.cssClass(data.group, item) #'># if (item.hasChildren) { #<span class='#= r.toggleButtonClass(item) #'/># } ## if (data.treeview.checkboxes) { #<span class='k-checkbox-wrapper' role='presentation'>#= data.treeview.checkboxes.template(data) #</span># } ## var tag = url ? 'a' : 'span'; ## var textAttr = url ? ' href=\\'' + url + '\\'' : ''; #<#=tag# class='#= r.textClass(item, !!url) #'#= textAttr #>#= r.itemContent(data) #</#=tag#></div>"),item:c("# var item = data.item, r = data.r; #<li role='treeitem' class='#= r.wrapperCssClass(data.group, item) #' "+i.attr("uid")+"='#= item.uid #' aria-selected='#= item.selected ? \"true\" : \"false \" #' #=item.enabled === false ? \"aria-disabled='true'\" : ''## if (item.expanded) { #data-expanded='true' aria-expanded='true'# } #>#= r.itemElement(data) #</li>"),loading:c("<div class='k-icon k-i-loading' /> #: data.messages.loading #"),retry:c("#: data.messages.requestFailed # <button class='k-button k-request-retry'>#: data.messages.retry #</button>")}},items:function(){return this.element.find(".k-item > div:first-child")},setDataSource:function(t){var i=this.options;i.dataSource=t,this._dataSource(),i.checkboxes&&i.checkboxes.checkChildren&&this.dataSource.one("change",n.proxy(this.updateIndeterminate,this,null)),this.options.autoBind&&this.dataSource.fetch()},_bindDataSource:function(){this._refreshHandler=u(this.refresh,this),this._errorHandler=u(this._error,this),this.dataSource.bind(g,this._refreshHandler),this.dataSource.bind(pt,this._errorHandler)},_unbindDataSource:function(){var n=this.dataSource;n&&(n.unbind(g,this._refreshHandler),n.unbind(pt,this._errorHandler))},_dataSource:function(n){function r(n){for(var t=0;t<n.length;t++)n[t]._initChildren(),n[t].children.fetch(),r(n[t].children.view())}var i=this,u=i.options,t=u.dataSource;t=y(t)?{data:t}:t,i._unbindDataSource(),t.fields||(t.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),i.dataSource=t=wt.create(t),n&&(t.fetch(),r(t.view())),i._bindDataSource()},events:[ni,ti,yt,ot,st,ri,ei,tt,g,dt,kt],options:{name:"TreeView",dataSource:{},animation:{expand:{effects:"expand:vertical",duration:200},collapse:{duration:100}},messages:{loading:"Loading...",requestFailed:"Request failed.",retry:"Retry"},dragAndDrop:!1,checkboxes:!1,autoBind:!0,autoScroll:!1,loadOnDemand:!0,template:"",dataTextField:null},_accessors:function(){var t,n,r,f=this,u=f.options,e=f.element;for(t in p)n=u[p[t]],r=e.attr(i.attr(t+"-field")),!n&&r&&(n=r),n||(n=t),y(n)||(n=[n]),u[p[t]]=n},_fieldAccessor:function(t){var u=this.options[p[t]],f=u.length,r="(function(item) {";return 0===f?r+="return item['"+t+"'];":(r+="var levels = ["+n.map(u,function(n){return"function(d){ return "+i.expr(n)+"}"}).join(",")+"];",r+="return levels[Math.min(item.level(), "+f+"-1)](item)"),r+="})"},setOptions:function(n){it.fn.setOptions.call(this,n),this._animation(),this._dragging(),this._templates()},_trigger:function(n,t){return this.trigger(n,{node:t.closest(f)[0]})},_setChecked:function(t,i){if(t&&n.isFunction(t.view))for(var r=0,u=t.view();r<u.length;r++)u[r][e]=i,u[r].children&&this._setChecked(u[r].children,i)},_setIndeterminate:function(n){var t,u,i,f=o(n),r=!0;if(f.length&&(t=rt(f.children()),u=t.length)){if(u>1){for(i=1;i<u;i++)if(t[i].checked!=t[i-1].checked||t[i].indeterminate||t[i-1].indeterminate){r=!1;break}}else r=!t[0].indeterminate;return rt(n).data(s,!r).prop(s,!r).prop(e,r&&t[0].checked)}},updateIndeterminate:function(n){var i,t,r;if(n=n||this.wrapper,i=o(n).children(),i.length){for(t=0;t<i.length;t++)this.updateIndeterminate(i.eq(t));r=this._setIndeterminate(n),r&&r.prop(e)&&(this.dataItem(n).checked=!0)}},_bubbleIndeterminate:function(n){if(n.length){var i,t=this.parent(n);t.length&&(this._setIndeterminate(t),i=t.children("div").find(".k-checkbox-wrapper :checkbox"),i.prop(s)===!1?this.dataItem(t).set(e,i.prop(e)):delete this.dataItem(t).checked,this._bubbleIndeterminate(t))}},_checkboxChange:function(t){var u=n(t.target),o=u.prop(e),i=u.closest(f),r=this.dataItem(i);r.checked!=o&&(r.set(e,o),this._trigger(kt,i))},_toggleButtonClick:function(t){var i=n(t.currentTarget).closest(f);i.is("[aria-disabled='true']")||this.toggle(n(t.target).closest(f))},_mousedown:function(t){var i=n(t.currentTarget).closest(f);i.is("[aria-disabled='true']")||(this._clickTarget=i,this.current(i))},_focusable:function(n){return n&&n.length&&n.is(":visible")&&!n.find(".k-in:first").hasClass("k-state-disabled")},_focus:function(){var t=this.select(),r=this._clickTarget;i.support.touch||(r&&r.length&&(t=r),this._focusable(t)||(t=this.current()),this._focusable(t)||(t=this._nextVisible(n())),this.current(t))},focus:function(){var t,u=this.wrapper,n=u[0],i=[],r=[],f=document.documentElement;do n=n.parentNode,n.scrollHeight>n.clientHeight&&(i.push(n),r.push(n.scrollTop));while(n!=f);for(u.focus(),t=0;t<i.length;t++)i[t].scrollTop=r[t]},_blur:function(){this.current().find(".k-in:first").removeClass("k-state-focused")},_enabled:function(n){return!n.children("div").children(".k-in").hasClass("k-state-disabled")},parent:function(t){var r,i,f=/\bk-treeview\b/,u=/\bk-item\b/;typeof t==nt&&(t=this.element.find(t)),vt(t)||(t=t[0]),i=u.test(t.className);do t=t.parentNode,u.test(t.className)&&(i?r=t:i=!0);while(!f.test(t.className)&&!r);return n(r)},_nextVisible:function(n){function r(n){for(;n.length&&!n.next().length;)n=i.parent(n);return n.next().length?n.next():n}var t,i=this,u=i._expanded(n);return n.length&&n.is(":visible")?u?(t=o(n).children().first(),t.length||(t=r(n))):t=r(n):t=i.root.children().eq(0),i._enabled(t)||(t=i._nextVisible(t)),t},_previousVisible:function(n){var r,t,i=this;if(!n.length||n.prev().length)for(t=n.length?n.prev():i.root.children().last();i._expanded(t)&&(r=o(t).children().last(),r.length);)t=r;else t=i.parent(n)||n;return i._enabled(t)||(t=i._previousVisible(t)),t},_keydown:function(r){var o,u=this,c=r.keyCode,f=u.current(),v=u._expanded(f),l=f.find(".k-checkbox-wrapper:first :checkbox"),a=i.support.isRtl(u.element);r.target==r.currentTarget&&(!a&&c==h.RIGHT||a&&c==h.LEFT?v?o=u._nextVisible(f):u.expand(f):!a&&c==h.LEFT||a&&c==h.RIGHT?v?u.collapse(f):(o=u.parent(f),u._enabled(o)||(o=t)):c==h.DOWN?o=u._nextVisible(f):c==h.UP?o=u._previousVisible(f):c==h.HOME?o=u._nextVisible(n()):c==h.END?o=u._previousVisible(n()):c==h.ENTER?f.find(".k-in:first").hasClass("k-state-selected")||u._trigger(tt,f)||u.select(f):c==h.SPACEBAR&&l.length&&(l.prop(e,!l.prop(e)).data(s,!1).prop(s,!1),u._checkboxChange({target:l}),o=f),o&&(r.preventDefault(),f[0]!=o[0]&&(u._trigger(dt,o),u.current(o))))},_click:function(t){var o,u=this,i=n(t.currentTarget),e=w(i.closest(f)),r=i.attr("href");o=r?"#"==r||r.indexOf("#"+this.element.id+"-")>=0:e.length&&!e.children().length,o&&t.preventDefault(),i.hasClass(".k-state-selected")||u._trigger(tt,i)||u.select(i)},_wrapper:function(){var t,r,i=this,n=i.element,u="k-widget k-treeview";n.is("ul")?(t=n.wrap("<div />").parent(),r=n):(t=n,r=t.children("ul").eq(0)),i.wrapper=t.addClass(u),i.root=r},_group:function(n){var i=this,u=n.hasClass(b),t={firstLevel:u,expanded:u||i._expanded(n)},r=n.children("ul");r.addClass(i.templates.groupCssClass(t)).css("display",t.expanded?"":"none"),i._nodes(r,t)},_nodes:function(t,i){var f,r=this,u=t.children("li");i=v({length:u.length},i),u.each(function(t,u){u=n(u),f={index:t,expanded:r._expanded(u)},k(u),r._updateNodeClasses(u,i,f),r._group(u)})},_checkboxes:function(){var t,i=this.options,n=i.checkboxes;n&&(t="<input aria-label='#=item.text#' type='checkbox' tabindex='-1' #= (item.enabled === false) ? 'disabled' : '' # #= item.checked ? 'checked' : '' #",n.name&&(t+=" name='"+n.name+"'"),t+=" id='_#= item.uid #' class='k-checkbox' /><span class='k-checkbox-label'></span>",n=v({template:t},i.checkboxes),typeof n.template==nt&&(n.template=bt(n.template)),i.checkboxes=n)},_updateNodeClasses:function(n,t,i){var f,e,r=n.children("div"),o=n.children("ul"),u=this.templates;n.hasClass("k-treeview")||(i=i||{},i.expanded=typeof i.expanded!=l?i.expanded:this._expanded(n),i.index=typeof i.index!=l?i.index:n.index(),i.enabled=typeof i.enabled!=l?i.enabled:!r.children(".k-in").hasClass("k-state-disabled"),t=t||{},t.firstLevel=typeof t.firstLevel!=l?t.firstLevel:n.parent().parent().hasClass(b),t.length=typeof t.length!=l?t.length:n.parent().children().length,n.removeClass("k-first k-last").addClass(u.wrapperCssClass(t,i)),r.removeClass("k-top k-mid k-bot").addClass(u.cssClass(t,i)),f=r.children(".k-in"),e=f[0]&&"a"==f[0].nodeName.toLowerCase(),f.removeClass("k-in k-link k-state-default k-state-disabled").addClass(u.textClass(i,e)),(o.length||"true"==n.attr("data-hasChildren"))&&(r.children(".k-icon").removeClass("k-i-expand k-i-collapse").addClass(u.toggleButtonClass(i)),o.addClass("k-group")))},_processNodes:function(t,i){var r=this;r.element.find(t).each(function(t,u){i.call(r,t,n(u).closest(f))})},dataItem:function(t){var u=n(t).closest(f).attr(i.attr("uid")),r=this.dataSource;return r&&r.getByUid(u)},_insertNode:function(t,i,r,u,f){for(var a,s,c,h=this,l=o(r),w=l.children().length+1,y={firstLevel:r.hasClass(b),expanded:!f,length:w},v="",p=function(n,t){n.appendTo(t)},e=0;e<t.length;e++)c=t[e],c.index=i+e,v+=h._renderItem({group:y,item:c});if(s=n(v),s.length){for(h.angular("compile",function(){return{elements:s.get(),data:t.map(function(n){return{dataItem:n}})}}),l.length||(l=n(h._renderGroup({group:y})).appendTo(r)),u(s,l),r.hasClass("k-item")&&(k(r),h._updateNodeClasses(r)),h._updateNodeClasses(s.prev().first()),h._updateNodeClasses(s.next().last()),e=0;e<t.length;e++)c=t[e],c.hasChildren&&(a=c.children.data(),a.length&&h._insertNode(a,c.index,s.eq(e),p,!h._expanded(s.eq(e))));return s}},_updateNodes:function(t,i){function p(n,t){n.find(".k-checkbox-wrapper :checkbox").prop(e,t).data(s,!1).prop(s,!1)}var h,f,o,r,l,y,c,u=this,b={treeview:u.options,item:r},v="expanded"!=i&&"checked"!=i;if("selected"==i)r=t[0],f=u.findByUid(r.uid).find(".k-in:first").removeClass("k-state-hover").toggleClass("k-state-selected",r[i]).end(),r[i]&&u.current(f),f.attr(lt,!!r[i]);else{for(c=n.map(t,function(n){return u.findByUid(n.uid).children("div")}),v&&u.angular("cleanup",function(){return{elements:c}}),h=0;h<t.length;h++)b.item=r=t[h],o=c[h],f=o.parent(),v&&o.children(".k-in").html(u.templates.itemContent(b)),i==e?(l=r[i],p(o,l),u.options.checkboxes.checkChildren&&(p(f.children(".k-group"),l),u._setChecked(r.children,l),u._bubbleIndeterminate(f))):"expanded"==i?u._toggle(f,r,r[i]):"enabled"==i&&(f.find(".k-checkbox-wrapper :checkbox").prop("disabled",!r[i]),y=!w(f).is(ii),f.removeAttr(ht),r[i]||(r.selected&&r.set("selected",!1),r.expanded&&r.set("expanded",!1),y=!0,f.attr(lt,!1).attr(ht,!0)),u._updateNodeClasses(f,{},{enabled:r[i],expanded:!y})),o.length&&this.trigger("itemChange",{item:o,data:r,ns:a});v&&u.angular("compile",function(){return{elements:c,data:n.map(t,function(n){return[{dataItem:n}]})}})}},_appendItems:function(n,t,i){var f=o(i),r=f.children(),u=!this._expanded(i);typeof n==l&&(n=r.length),this._insertNode(t,n,i,function(t,i){n>=r.length?t.appendTo(i):t.insertBefore(r.eq(n))},u),this._expanded(i)&&(this._updateNodeClasses(i),o(i).css("display","block"))},_refreshChildren:function(n,t,i){var u,r,e,f=this.options,h=f.loadOnDemand,s=f.checkboxes&&f.checkboxes.checkChildren;if(o(n).empty(),t.length)for(this._appendItems(i,t,n),r=o(n).children(),h&&s&&this._bubbleIndeterminate(r.last()),u=0;u<r.length;u++)e=r.eq(u),this.trigger("itemChange",{item:e.children("div"),data:this.dataItem(e),ns:a});else k(n)},_refreshRoot:function(t){var r,f,i,u=this._renderGroup({items:t,group:{firstLevel:!0,expanded:!0}});for(this.root.length?(this._angularItems("cleanup"),r=n(u),this.root.attr("class",r.attr("class")).html(r.html())):this.root=this.wrapper.html(u).children("ul"),this.root.attr("role","tree"),f=this.root.children(".k-item"),i=0;i<t.length;i++)this.trigger("itemChange",{item:f.eq(i),data:t[i],ns:a});this._angularItems("compile")},refresh:function(n){var r,s,e=n.node,u=n.action,i=n.items,f=this.wrapper,o=this.options,c=o.loadOnDemand,h=o.checkboxes&&o.checkboxes.checkChildren;if(n.field)return!i[0]||!i[0].level?void 0:this._updateNodes(i,n.field);if(e&&(f=this.findByUid(e.uid),this._progress(f,!1)),h&&"remove"!=u){for(s=!1,r=0;r<i.length;r++)if("checked"in i[r]){s=!0;break}if(!s&&e&&e.checked)for(r=0;r<i.length;r++)i[r].checked=!0}if("add"==u?this._appendItems(n.index,i,f):"remove"==u?this._remove(this.findByUid(i[0].uid),!1):"itemchange"==u?this._updateNodes(i):"itemloaded"==u?this._refreshChildren(f,i,n.index):this._refreshRoot(i),"remove"!=u)for(r=0;r<i.length;r++)c&&!i[r].expanded||i[r].load();this.trigger(st,{node:e?f:t})},_error:function(n){var t=n.node&&this.findByUid(n.node.uid),i=this.templates.retry({messages:this.options.messages});t?(this._progress(t,!1),this._expanded(t,!1),d(t).addClass("k-i-reload"),n.node.loaded(!1)):(this._progress(!1),this.element.html(i))},_retryRequest:function(n){n.preventDefault(),this.dataSource.fetch()},expand:function(n){this._processNodes(n,function(n,t){this.toggle(t,!0)})},collapse:function(n){this._processNodes(n,function(n,t){this.toggle(t,!1)})},enable:function(n,t){t=2!=arguments.length||!!t,this._processNodes(n,function(n,i){this.dataItem(i).set("enabled",t)})},current:function(i){var u=this,r=u._current,o=u.element,e=u._ariaId;return arguments.length>0&&i&&i.length?(r&&(r[0].id===e&&r.removeAttr("id"),r.find(".k-in:first").removeClass("k-state-focused")),r=u._current=n(i,o).closest(f),r.find(".k-in:first").addClass("k-state-focused"),e=r[0].id||e,e&&(u.wrapper.removeAttr("aria-activedescendant"),r.attr("id",e),u.wrapper.attr("aria-activedescendant",e)),t):(r||(r=u._nextVisible(n())),r)},select:function(i){var r=this,u=r.element;return arguments.length?(i=n(i,u).closest(f),u.find(".k-state-selected").each(function(){var t=r.dataItem(this);t?(t.set("selected",!1),delete t.selected):n(this).removeClass("k-state-selected")}),i.length&&(r.dataItem(i).set("selected",!0),r._clickTarget=i),r.trigger(g),t):u.find(".k-state-selected").closest(f)},_toggle:function(n,t,i){var f,e=this.options,r=w(n),u=i?"expand":"collapse";r.data("animating")||this._trigger(u,n)||(this._expanded(n,i),f=t&&t.loaded(),i&&!f?(e.loadOnDemand&&this._progress(n,!0),r.remove(),t.load()):(this._updateNodeClasses(n,{},{expanded:i}),i||r.css("height",r.height()).css("height"),r.kendoStop(!0,!0).kendoAnimate(v({reset:!0},e.animation[u],{complete:function(){i&&r.css("height","")}}))))},toggle:function(t,i){t=n(t),d(t).is(".k-i-expand, .k-i-collapse")&&(1==arguments.length&&(i=!this._expanded(t)),this._expanded(t,i))},destroy:function(){var n=this;it.fn.destroy.call(n),n.wrapper.off(r),n._unbindDataSource(),n.dragging&&n.dragging.destroy(),i.destroy(n.element),n.root=n.wrapper=n.element=null},_expanded:function(n,r){var e=i.attr("expanded"),u=this.dataItem(n),f=r;return 1==arguments.length?"true"===n.attr(e)||u&&u.expanded:(w(n).data("animating")||(u&&(u.set("expanded",f),f=u.expanded),f?(n.attr(e,"true"),n.attr("aria-expanded","true")):(n.removeAttr(e),n.attr("aria-expanded","false"))),t)},_progress:function(n,t){var i=this.element,r=this.templates.loading({messages:this.options.messages});1==arguments.length?(t=n,t?i.html(r):i.empty()):d(n).toggleClass("k-i-loading",t).removeClass("k-i-reload")},text:function(n,i){var r=this.dataItem(n),f=this.options[p.text],e=r.level(),o=f.length,u=f[Math.min(e,o-1)];return i?(r.set(u,i),t):r[u]},_objectOrSelf:function(t){return n(t).closest("[data-role=treeview]").data("kendoTreeView")||this},_dataSourceMove:function(t,i,r,u){var f,o=this._objectOrSelf(r||i),e=o.dataSource,s=n.Deferred().resolve().promise();return r&&r[0]!=o.element[0]&&(f=o.dataItem(r),f.loaded()||(o._progress(r,!0),s=f.load()),r!=this.root&&(e=f.children,e&&e instanceof wt||(f._initChildren(),f.loaded(!0),e=f.children))),t=this._toObservableData(t),u.call(o,e,t,s)},_toObservableData:function(t){var u,f,r=t;return(t instanceof window.jQuery||vt(t))&&(u=this._objectOrSelf(t).dataSource,f=n(t).attr(i.attr("uid")),r=u.getByUid(f),r&&(r=u.remove(r))),r},_insert:function(n,t,r){t instanceof i.data.ObservableArray?t=t.toJSON():y(t)||(t=[t]);var u=n.parent();return u&&u._initChildren&&(u.hasChildren=!0,u._initChildren()),n.splice.apply(n,[r,0].concat(t)),this.findByUid(n[r].uid)},insertAfter:at(1),insertBefore:at(0),append:function(t,i,r){var u=this.root;return i&&(u=o(i)),this._dataSourceMove(t,u,i,function(t,u,f){function s(){i&&o._expanded(i,!0);var n=t.data(),r=Math.max(n.length,0);return o._insert(n,u,r)}var e,o=this;return f.done(function(){e=s(),(r=r||n.noop)(e)}),e||null})},_remove:function(t,i){var u,f,e,r=this;return t=n(t,r.element),this.angular("cleanup",function(){return{elements:t.get()}}),u=t.parent().parent(),f=t.prev(),e=t.next(),t[i?"detach":"remove"](),u.hasClass("k-item")&&(k(u),r._updateNodeClasses(u)),r._updateNodeClasses(f),r._updateNodeClasses(e),t},remove:function(n){var t=this.dataItem(n);t&&this.dataSource.remove(t)},detach:function(n){return this._remove(n,!0)},findByText:function(t){return n(this.element).find(".k-in").filter(function(i,r){return n(r).text()==t}).closest(f)},findByUid:function(t){for(var f,u=this.element.find(".k-item"),e=i.attr("uid"),r=0;r<u.length;r++)if(u[r].getAttribute(e)==t){f=u[r];break}return n(f)},expandPath:function(t,i){function f(){u.shift(),u.length?e(u[0]).then(f):o.call(r)}function e(t){var u=n.Deferred(),i=r.dataSource.get(t);return i?i.loaded()?(i.set("expanded",!0),u.resolve()):(r._progress(r.findByUid(i.uid),!0),i.load().then(function(){i.set("expanded",!0),u.resolve()})):u.resolve(),u.promise()}var r=this,u=t.slice(0),o=i||n.noop;e(u[0]).then(f)},_parentIds:function(n){for(var t=n&&n.parentNode(),i=[];t&&t.parentNode;)i.unshift(t.id),t=t.parentNode();return i},expandTo:function(n){n instanceof i.data.Node||(n=this.dataSource.get(n));var t=this._parentIds(n);this.expandPath(t)},_renderItem:function(n){return n.group||(n.group={}),n.treeview=this.options,n.r=this.templates,this.templates.item(n)},_renderGroup:function(n){var t=this;return n.renderItems=function(n){var e="",i=0,r=n.items,f=r?r.length:0,u=n.group;for(u.length=f;i<f;i++)n.group=u,n.item=r[i],n.item.index=i,e+=t._renderItem(n);return e},n.r=t.templates,t.templates.group(n)}}),a.plugin(ut)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.pivot.fieldmenu.min",["kendo.pivotgrid.min","kendo.menu.min","kendo.window.min","kendo.treeview.min","kendo.dropdownlist.min"],n)}(function(){return function(n,t){function w(n,t){for(var r=[],i=0,u=n.length;i<u;i++)n[i].field!==t&&r.push(n[i]);return r}function o(n,t,i){var r,f,e,u;if(!n)return[];for(n=n.filters,r=0,f=[],e=n.length;r<e;r++)u=n[r].operator,(i||"in"===u)&&u!==i||n[r].field!==t||f.push(n[r]);return f}function p(t,i,r){var e,u=0,f=r.length;if(t=o(t,i,"in")[0])for(e=t.value.split(",");u<f;u++)r[u].checked=n.inArray(r[u].uniqueName,e)>=0;else for(;u<f;u++)r[u].checked=!0}function c(n,t){for(var r=n.length,i=0;i<r;i++)n[i].checked&&0!==n[i].level()&&t.push(n[i].uniqueName),n[i].hasChildren&&c(n[i].children.view(),t)}var i=window.kendo,u=i.ui,l="kendoContextMenu",r=n.proxy,f=".kendoPivotFieldMenu",s=u.Widget,e="k-filter-item",h="aria-label",b=s.extend({init:function(n,t){s.fn.init.call(this,n,t),this._dataSource(),this._layout(),i.notify(this)},events:[],options:{name:"PivotFieldMenu",filter:null,filterable:!0,sortable:!0,messages:{info:"Show items with value that:",sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filterFields:"Fields Filter",filter:"Filter",include:"Include Fields...",title:"Fields to include",clear:"Clear",ok:"OK",cancel:"Cancel",operators:{contains:"Contains",doesnotcontain:"Does not contain",startswith:"Starts with",endswith:"Ends with",eq:"Is equal to",neq:"Is not equal to"}}},_layout:function(){var t=this.options;this.wrapper=n(i.template(v)({ns:i.ns,filterable:t.filterable,sortable:t.sortable,messages:t.messages})),this.menu=this.wrapper[l]({filter:t.filter,target:this.element,orientation:"vertical",showOn:"click",closeOnClick:!1,open:r(this._menuOpen,this),select:r(this._select,this),copyAnchorStyles:!1}).data(l),this._createWindow(),t.filterable&&this._initFilterForm()},_initFilterForm:function(){var n=this.menu.element.find("."+e),t=r(this._filter,this);this._filterOperator=new i.ui.DropDownList(n.find("select")),this._filterValue=n.find(".k-textbox"),this._updateFilterAriaLabel(),n.on("submit"+f,t).on("click"+f,".k-button-filter",t).on("click"+f,".k-button-clear",r(this._reset,this))},_setFilterForm:function(n){var t=this._filterOperator,r="",i="";n&&(r=n.operator,i=n.value),t.value(r),t.value()||t.select(0),this._filterValue.val(i)},_clearFilters:function(n){var r,u,t=this.dataSource.filter()||{},i=0;for(t.filters=t.filters||[],r=o(t,n),u=r.length;i<u;i++)t.filters.splice(t.filters.indexOf(r[i]),1);return t},_convert:function(t){var r=this.dataSource.options.schema,i=((r.model||{}).fields||{})[this.currentMember];return i&&("number"===i.type?t=parseFloat(t):"boolean"===i.type&&(t=!!n.parseJSON(t))),t},_filter:function(n){var f,r,i=this,u=i._convert(i._filterValue.val());return n.preventDefault(),""===u?(i.menu.close(),t):(f={field:i.currentMember,operator:i._filterOperator.value(),value:u},r=i._clearFilters(i.currentMember),r.filters.push(f),i.dataSource.filter(r),i.menu.close(),t)},_updateFilterAriaLabel:function(){var i=this.menu.element.find("."+e),t=this._filterOperator.value(),n=this.options.messages.operators[t];i.find("select").attr(h,n)},_reset:function(n){var t=this,i=t._clearFilters(t.currentMember);n.preventDefault(),i.filters[0]||(i={}),t.dataSource.filter(i),t._setFilterForm(null),t.menu.close()},_sort:function(n){var i=this.currentMember,t=this.dataSource.sort()||[];t=w(t,i),t.push({field:i,dir:n}),this.dataSource.sort(t),this.menu.close()},setDataSource:function(n){this.options.dataSource=n,this._dataSource()},_dataSource:function(){this.dataSource=i.data.PivotDataSource.create(this.options.dataSource)},_createWindow:function(){var t=this.options.messages;this.includeWindow=n(i.template(y)({messages:t})).on("click"+f,".k-button-ok",r(this._applyIncludes,this)).on("click"+f,".k-button-cancel",r(this._closeWindow,this)),this.includeWindow=new u.Window(this.includeWindow,{title:t.title,visible:!1,resizable:!1,open:r(this._windowOpen,this)})},_applyIncludes:function(n){var i,r=[],f=this.treeView.dataSource.view(),e=f[0].checked,t=this.dataSource.filter(),u=o(t,this.currentMember,"in")[0];c(f,r),u&&(e?(t.filters.splice(t.filters.indexOf(u),1),t.filters.length||(t={})):u.value=r.join(","),i=t),r.length&&(i||e||(i={field:this.currentMember,operator:"in",value:r.join(",")},t&&(t.filters.push(i),i=t))),i&&this.dataSource.filter(i),this._closeWindow(n)},_closeWindow:function(n){n.preventDefault(),this.includeWindow.close()},_treeViewDataSource:function(){var n=this;return i.data.HierarchicalDataSource.create({schema:{model:{id:"uniqueName",hasChildren:function(n){return parseInt(n.childrenCardinality,10)>0}}},transport:{read:function(t){var i={},u=n.treeView.dataSource.get(t.data.uniqueName),r=t.data.uniqueName;r?(i.memberUniqueName=u.uniqueName.replace(/\&/g,"&amp;"),i.treeOp=1):i.levelUniqueName=n.currentMember+".[(ALL)]",n.dataSource.schemaMembers(i).done(function(i){p(n.dataSource.filter(),n.currentMember,i),t.success(i)}).fail(t.error)}}})},_createTreeView:function(n){var t=this;t.treeView=new u.TreeView(n,{autoBind:!1,dataSource:t._treeViewDataSource(),dataTextField:"caption",template:"#: data.item.caption || data.item.name #",checkboxes:{checkChildren:!0},dataBound:function(){u.progress(t.includeWindow.element,!1)}})},_menuOpen:function(t){if(t.event){var r=i.attr("name");this.currentMember=n(t.event.target).closest("["+r+"]").attr(r),this.options.filterable&&this._setFilterForm(o(this.dataSource.filter(),this.currentMember)[0])}},_select:function(t){var i=n(t.item);n(".k-pivot-filter-window").not(this.includeWindow.element).kendoWindow("close"),i.hasClass("k-include-item")?this.includeWindow.center().open():i.hasClass("k-sort-asc")?this._sort("asc"):i.hasClass("k-sort-desc")?this._sort("desc"):i.hasClass(e)&&this._updateFilterAriaLabel()},_windowOpen:function(){this.treeView||this._createTreeView(this.includeWindow.element.find(".k-treeview")),u.progress(this.includeWindow.element,!0),this.treeView.dataSource.read()},destroy:function(){s.fn.destroy.call(this),this.menu&&(this.menu.destroy(),this.menu=null),this.treeView&&(this.treeView.destroy(),this.treeView=null),this.includeWindow&&(this.includeWindow.destroy(),this.includeWindow=null),this.wrapper=null,this.element=null}}),a='<div class="k-filterable k-content" tabindex="-1" data-role="fieldmenu"><form class="k-filter-menu"><div><div class="k-filter-help-text">#=messages.info#</div><select>#for(var op in messages.operators){#<option value="#=op#">#=messages.operators[op]#</option>#}#</select><input class="k-textbox" type="text" '+h+'="#=messages.filter#" /><div><a class="k-button k-primary k-button-filter" href="\\#">#=messages.filter#</a><a class="k-button k-button-clear" href="\\#">#=messages.clear#</a></div></div></form></div>',v='<ul class="k-pivot-fieldmenu"># if (sortable) {#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc-sm"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc-sm"></span>${messages.sortDescending}</span></li># if (filterable) {#<li class="k-separator"></li># } ## } ## if (filterable) {#<li class="k-item k-include-item"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.include}</span></li><li class="k-separator"></li><li class="k-item '+e+'"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.filterFields}</span><ul><li>'+a+"</li></ul></li># } #</ul>",y='<div class="k-popup-edit-form k-pivot-filter-window"><div class="k-edit-form-container"><div class="k-treeview"></div><div class="k-edit-buttons k-state-default"><a class="k-button k-primary k-button-ok" href="\\#">${messages.ok}</a><a class="k-button k-button-cancel" href="\\#">${messages.cancel}</a></div></div>';u.plugin(b)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.filtercell.min",["kendo.autocomplete.min","kendo.datepicker.min","kendo.numerictextbox.min","kendo.combobox.min","kendo.dropdownlist.min"],n)}(function(){return function(n,t){function u(t){var i="string"==typeof t?t:t.operator;return n.inArray(i,b)>-1}function y(t,i){var u,f,r=[];if(n.isPlainObject(t))if(t.hasOwnProperty("filters"))r=t.filters;else if(t.field==i)return t;for(n.isArray(t)&&(r=t),u=0;u<r.length;u++)if(f=y(r[u],i))return f}function v(t,i){t.filters&&(t.filters=n.grep(t.filters,function(n){return v(n,i),n.filters?n.filters.length:n.field!=i}))}function k(n,t){var r=i.getter(t,!0);return function(t){for(var u,i,o=n(t),s=[],f=0,e={};f<o.length;)u=o[f++],i=r(u),e.hasOwnProperty(i)||(s.push(u),e[i]=!0);return s}}var i=window.kendo,p=i.ui,l=i.data.DataSource,a=p.Widget,r="change",c="boolean",h="enums",e="string",f="Is equal to",o="Is not equal to",s=n.proxy,b=["isnull","isnotnull","isempty","isnotempty"],w=a.extend({init:function(f,o){var k,l,g,nt,it,tt,v,p,d,b,rt,w,y;if(f=n(f).addClass("k-filtercell"),k=this.wrapper=n("<span/>").appendTo(f),l=this,it=o,p=l.operators=o.operators||{},d=l.input=n("<input/>").attr(i.attr("bind"),"value: value").appendTo(k),b=o?o.suggestDataSource:null,b&&(o=n.extend({},o,{suggestDataSource:{}})),a.fn.init.call(l,f[0],o),b&&(l.options.suggestDataSource=b),o=l.options,g=l.dataSource=o.dataSource,l.model=g.reader.model,v=o.type=e,rt=i.getter("reader.model.fields",!0)(g)||{},w=rt[o.field],w&&w.type&&(v=o.type=w.type),o.values&&(o.type=v=h),p=p[v]||o.operators[v],!it.operator)for(tt in p){o.operator=tt;break}l._parse=function(n){return null!=n?n+"":n},l.model&&l.model.fields&&(y=l.model.fields[o.field],y&&y.parse&&(l._parse=s(y.parse,y))),l.defaultOperator=o.operator,l.viewModel=nt=i.observable({operator:o.operator,value:null,operatorVisible:function(){var n=this.get("value");return null!==n&&n!==t&&"undefined"!=n||u(this.get("operator"))&&!l._clearInProgress}}),nt.bind(r,s(l.updateDsFilter,l)),v==e&&l.initSuggestDataSource(o),null!==o.inputWidth&&d.width(o.inputWidth),d.attr("aria-label",l._getColumnTitle()),l._setInputType(o,v),v!=c&&o.showOperators!==!1?l._createOperatorDropDown(p):(n('<div unselectable="on" />').css("display","none").text("eq").appendTo(k),k.addClass("k-operator-hidden")),l._createClearIcon(),i.bind(this.wrapper,nt),v==e&&(o.template||l.setAutoCompleteSource()),v==h&&l.setComboBoxSource(l.options.values),l._refreshUI(),l._refreshHandler=s(l._refreshUI,l),l.dataSource.bind(r,l._refreshHandler)},_setInputType:function(t,r){var o,v,a,l,s,u=this,f=u.input;"function"==typeof t.template?(t.template.call(u.viewModel,{element:u.input,dataSource:u.suggestDataSource}),u._angularItems("compile")):r==e?f.attr(i.attr("role"),"autocomplete").attr(i.attr("text-field"),t.dataTextField||t.field).attr(i.attr("filter"),t.suggestionOperator).attr(i.attr("delay"),t.delay).attr(i.attr("min-length"),t.minLength).attr(i.attr("value-primitive"),!0):"date"==r?f.attr(i.attr("role"),"datepicker"):r==c?(f.remove(),o=n("<input type='radio'/>"),v=u.wrapper,a=i.guid(),l=n("<label/>").text(t.messages.isTrue).append(o),o.attr(i.attr("bind"),"checked:value").attr("name",a).val("true"),s=l.clone().text(t.messages.isFalse),o.clone().val("false").appendTo(s),v.append([l,s])):"number"==r?f.attr(i.attr("role"),"numerictextbox").attr("title",u._getColumnTitle()):r==h&&f.attr(i.attr("role"),"combobox").attr(i.attr("text-field"),"text").attr(i.attr("suggest"),!0).attr(i.attr("filter"),"contains").attr(i.attr("value-field"),"value").attr(i.attr("value-primitive"),!0)},_getColumnTitle:function(){var n=this.options.column;return n?n.title||n.field:""},_createOperatorDropDown:function(t){var u,r,e=[],f=this.viewModel;for(u in t)e.push({text:t[u],value:u});r=n('<input class="k-dropdown-operator" '+i.attr("bind")+'="value: operator"/>').appendTo(this.wrapper),this.operatorDropDown=r.kendoDropDownList({dataSource:e,dataTextField:"text",dataValueField:"value",open:function(){this.popup.element.width(150)},valuePrimitive:!0}).data("kendoDropDownList"),f.bind("change",function(){var n=t[f.operator];r.attr("aria-label",n)}),this.operatorDropDown.wrapper.find(".k-i-arrow-60-down").removeClass("k-i-arrow-60-down").addClass("k-i-filter")},initSuggestDataSource:function(n){var i=n.suggestDataSource;i instanceof l||(!n.customDataSource&&i&&(i.group=t),i=this.suggestDataSource=l.create(i)),n.customDataSource||(i._pageSize=t,i.reader.data=k(i.reader.data,this.options.field)),this.suggestDataSource=i},setAutoCompleteSource:function(){var n=this.input.data("kendoAutoComplete");n&&n.setDataSource(this.suggestDataSource)},setComboBoxSource:function(n){var i=l.create({data:n}),t=this.input.data("kendoComboBox");t&&t.setDataSource(i)},_refreshUI:function(){var i=this,t=y(i.dataSource.filter(),this.options.field)||{},r=i.viewModel;i.manuallyUpdatingVM=!0,t=n.extend(!0,{},t),i.options.type==c&&r.value!==t.value&&i.wrapper.find(":radio").prop("checked",!1),t.operator&&r.set("operator",t.operator),r.set("value",t.value),i.manuallyUpdatingVM=!1},updateDsFilter:function(i){var e,s,o,h,f=this,c=f.viewModel;f.manuallyUpdatingVM||"operator"==i.field&&c.value===t&&!u(c)||(e=n.extend({},f.viewModel.toJSON(),{field:f.options.field}),s={logic:"and",filters:[]},o=!1,(e.value!==t&&null!==e.value||u(e)&&!this._clearInProgress)&&(s.filters.push(e),o=f.trigger(r,{filter:s,field:f.options.field})),(f._clearInProgress||null===e.value)&&(o=f.trigger(r,{filter:null,field:f.options.field})),o||(h=f._merge(s),f.dataSource.filter(h.filters.length?h:{})))},_merge:function(t){var o,f,s,e=this,h=t.logic||"and",r=t.filters,i=e.dataSource.filter()||{filters:[],logic:"and"};for(v(i,e.options.field),f=0,s=r.length;f<s;f++)o=r[f],o.value=e._parse(o.value);return r=n.grep(r,function(n){return""!==n.value&&null!==n.value||u(n)}),r.length&&(i.filters.length?(t.filters=r,"and"!==i.logic&&(i.filters=[{logic:i.logic,filters:i.filters}],i.logic="and"),i.filters.push(r.length>1?t:r[0])):(i.filters=r,i.logic=h)),i},_createClearIcon:function(){var t=this;n("<button type='button' class='k-button k-button-icon' title = "+t.options.messages.clear+"/>").attr("aria-label",t.options.messages.clear).attr(i.attr("bind"),"visible:operatorVisible").html("<span class='k-icon k-i-close'/>").click(s(t.clearFilter,t)).appendTo(t.wrapper)},clearFilter:function(){this._clearInProgress=!0,u(this.viewModel.operator)&&this.viewModel.set("operator",this.defaultOperator),this.viewModel.set("value",null),this._clearInProgress=!1},_angularItems:function(n){var i=this.wrapper.closest("th").get(),t=this.options.column;this.angular(n,function(){return{elements:i,data:[{column:t}]}})},destroy:function(){var n=this;n.filterModel=null,n.operatorDropDown=null,n._angularItems("cleanup"),n._refreshHandler&&(n.dataSource.bind(r,n._refreshHandler),n._refreshHandler=null),i.unbind(n.element),a.fn.destroy.call(n),i.destroy(n.element)},events:[r],options:{name:"FilterCell",delay:200,minLength:1,inputWidth:null,values:t,customDataSource:!1,field:"",dataTextField:"",type:"string",suggestDataSource:null,suggestionOperator:"startswith",operator:"eq",showOperators:!0,template:null,messages:{isTrue:"is true",isFalse:"is false",filter:"Filter",clear:"Clear",operator:"Operator"},operators:{string:{eq:f,neq:o,startswith:"Starts with",contains:"Contains",doesnotcontain:"Does not contain",endswith:"Ends with",isnull:"Is null",isnotnull:"Is not null",isempty:"Is empty",isnotempty:"Is not empty"},number:{eq:f,neq:o,gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than",isnull:"Is null",isnotnull:"Is not null"},date:{eq:f,neq:o,gte:"Is after or equal to",gt:"Is after",lte:"Is before or equal to",lt:"Is before",isnull:"Is null",isnotnull:"Is not null"},enums:{eq:f,neq:o,isnull:"Is null",isnotnull:"Is not null"}}}});p.plugin(w)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.panelbar.min",["kendo.data.min"],n)}(function(){return function(n,t){function h(t){t=n(t),t.filter(".k-first:not(:first-child)").removeClass(wt),t.filter(".k-last:not(:last-child)").removeClass(vt),t.filter(":first-child").addClass(wt),t.filter(":last-child").addClass(vt)}function vi(t){var u=t,i=t.children("ul"),r=u.children(".k-link").children(".k-icon");t.hasClass("k-panelbar")||(!r.length&&i.length?r=n("<span class='k-icon' />").appendTo(u):i.length&&i.children().length||(r.remove(),i.remove()))}var r=window.kendo,lt=r.ui,l=r.keys,i=n.extend,rt=n.proxy,ct=n.each,yt=n.isArray,e=r.template,dt=lt.Widget,ht=r.data.HierarchicalDataSource,yi=/^(ul|a|div)$/i,s=".kendoPanelBar",ei="img",at="href",vt="k-last",et="k-link",f="."+et,st="error",u=".k-item",li=".k-group",p=li+":visible",oi="k-image",wt="k-first",nt="change",bt="expand",si="select",g="k-content",ri="activate",ut="collapse",ui="dataBound",fi="mouseenter",wi="mouseleave",hi="contentLoad",gi="undefined",a="k-state-active",y="> .k-panel",k="> .k-content",di="string",ci="k-state-focused",o="k-state-disabled",d="k-state-selected",it="."+d,c="k-state-highlight",w=u+":not(.k-state-disabled)",ni="> "+w+" > "+f+", .k-panel > "+w+" > "+f,ki=u+".k-state-disabled > .k-link",gt="> li > "+it+", .k-panel > li > "+it,bi="k-state-default",kt="aria-disabled",b="aria-expanded",pt="aria-hidden",tt="aria-selected",v=":visible",pi=":empty",ti="single",ot={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},ft={aria:function(n){var t="";return(n.items||n.content||n.contentUrl||n.expanded)&&(t+=b+"='"+(n.expanded?"true":"false")+"' "),n.enabled===!1&&(t+=kt+"='true'"),t},wrapperCssClass:function(n,t){var i="k-item",r=t.index;return i+=t.enabled===!1?" "+o:t.expanded===!0?" "+a:" k-state-default",0===r&&(i+=" k-first"),r==n.length-1&&(i+=" k-last"),t.cssClass&&(i+=" "+t.cssClass),i},textClass:function(n,t){var i=et;return t.firstLevel&&(i+=" k-header"),i},textAttributes:function(n){return n?" href='"+n+"'":""},arrowClass:function(n){var t="k-icon";return t+=n.expanded?" k-panelbar-collapse k-i-arrow-n":" k-panelbar-expand k-i-arrow-s"},text:function(n){return n.encoded===!1?n.text:r.htmlEncode(n.text)},groupAttributes:function(n){return n.expanded!==!0?" style='display:none'":""},groupCssClass:function(){return"k-group k-panel"},contentAttributes:function(n){return n.item.expanded!==!0?" style='display:none'":""},content:function(n){return n.content?n.content:n.contentUrl?"":"&nbsp;"},contentUrl:function(n){return n.contentUrl?'href="'+n.contentUrl+'"':""}},ii=function(n){return n.children("span").children(".k-icon")},ai=r.ui.DataBoundWidget.extend({init:function(t,i){var f,e,u=this;yt(i)&&(i={dataSource:i}),e=i&&!!i.dataSource,dt.fn.init.call(u,t,i),t=u.wrapper=u.element.addClass("k-widget k-reset k-header k-panelbar"),i=u.options,t[0].id&&(u._itemId=t[0].id+"_pb_active"),u._tabindex(),u._accessors(),u._dataSource(),u._templates(),u._initData(e),u._updateClasses(),u._animations(i),t.on("click"+s,ni,function(t){u._click(n(t.currentTarget))&&t.preventDefault()}).on(fi+s+" "+wi+s,ni,u._toggleHover).on("click"+s,ki,!1).on("click"+s,".k-request-retry",rt(u._retryRequest,u)).on("keydown"+s,n.proxy(u._keydown,u)).on("focus"+s,function(){var n=u.select();u._current(n[0]?n:u._first())}).on("blur"+s,function(){u._current(null)}).attr("role","menu"),f=t.find("li."+a+" > ."+g),f[0]&&u.expand(f.parent(),!1),i.dataSource||u._angularCompile(),r.notify(u)},events:[bt,ut,si,ri,nt,st,ui,hi],options:{name:"PanelBar",dataSource:{},animation:{expand:{effects:"expand:vertical",duration:200},collapse:{duration:200}},messages:{loading:"Loading...",requestFailed:"Request failed.",retry:"Retry"},autoBind:!0,loadOnDemand:!0,expandMode:"multiple",dataTextField:null},_angularCompile:function(){var n=this;n.angular("compile",function(){return{elements:n.element.children("li"),data:[{dataItem:n.options.$angular}]}})},_angularCompileElements:function(t,i){var r=this;r.angular("compile",function(){return{elements:t,data:n.map(i,function(n){return[{dataItem:n}]})}})},_angularCleanup:function(){var n=this;n.angular("cleanup",function(){return{elements:n.element.children("li")}})},destroy:function(){dt.fn.destroy.call(this),this.element.off(s),this._angularCleanup(),r.destroy(this.element)},_initData:function(n){var t=this;n&&(t.element.empty(),t.options.autoBind&&(t._progress(!0),t.dataSource.fetch()))},_templates:function(){var i=this,n=i.options,t=rt(i._fieldAccessor,i);n.template&&typeof n.template==di?n.template=e(n.template):n.template||(n.template=e("# var text = "+t("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")),i.templates={content:e("<div role='region' class='k-content'#= contentAttributes(data) #>#= content(item) #</div>"),group:e("<ul role='group' aria-hidden='true' class='#= groupCssClass(group) #'#= groupAttributes(group) #>#= renderItems(data) #</ul>"),itemWrapper:e("# var url = "+t("url")+"(item); ## var imageUrl = "+t("imageUrl")+"(item); ## var spriteCssClass = "+t("spriteCssClass")+"(item); ## var contentUrl = contentUrl(item); ## var tag = url||contentUrl ? 'a' : 'span'; #<#= tag # class='#= textClass(item, group) #' #= contentUrl ##= textAttributes(url) #># if (imageUrl) { #<img class='k-image' alt='' src='#= imageUrl #' /># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #'></span># } ##= data.panelBar.options.template(data) ##= arrow(data) #</#= tag #>"),item:e("<li role='menuitem' #=aria(item)#class='#= wrapperCssClass(group, item) #'"+r.attr("uid")+"='#= item.uid #'>#= itemWrapper(data) ## if (item.items && item.items.length > 0) { ##= subGroup({ items: item.items, panelBar: panelBar, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #</li>"),loading:e("<div class='k-item'><span class='k-icon k-i-loading'></span> #: data.messages.loading #</div>"),retry:e("#: data.messages.requestFailed # <button class='k-button k-request-retry'>#: data.messages.retry #</button>"),arrow:e("<span class='#= arrowClass(item) #'></span>"),empty:e("")}},setOptions:function(n){var t=this.options.animation;this._animations(n),n.animation=i(!0,t,n.animation),"dataSource"in n&&this.setDataSource(n.dataSource),dt.fn.setOptions.call(this,n)},expand:function(i,r){var u=this,f={};return i=this.element.find(i),u._animating&&i.find("ul").is(":visible")?(u.one("complete",function(){setTimeout(function(){u.expand(i)})}),t):(u._animating=!0,r=r!==!1,i.each(function(t,e){var s,h;if(e=n(e),s=i.children(".k-group,.k-content"),s.length||(s=u._addGroupElement(i)),h=s.add(e.find(k)),!e.hasClass(o)&&h.length>0){if(u.options.expandMode==ti&&u._collapseAllExpanded(e))return u;i.find("."+c).removeClass(c),e.addClass(c),r||(f=u.options.animation,u.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),u._triggerEvent(bt,e)||u._toggleItem(e,!1,!1),r||(u.options.animation=f)}}),u)},collapse:function(t,i){var r=this,u={};return r._animating=!0,i=i!==!1,t=r.element.find(t),t.each(function(t,f){f=n(f);var e=f.find(y).add(f.find(k));!f.hasClass(o)&&e.is(v)&&(f.removeClass(c),i||(u=r.options.animation,r.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),r._triggerEvent(ut,f)||r._toggleItem(f,!0),i||(r.options.animation=u))}),r},updateArrow:function(t){var i=this;t=n(t),t.children(f).children(".k-panelbar-collapse, .k-panelbar-expand").remove(),t.filter(function(){var t=i.dataItem(this);return t?t.hasChildren||t.content||t.contentUrl:n(this).find(".k-panel").length>0||n(this).find(".k-content").length>0}).children(".k-link:not(:has([class*=k-i-arrow]))").each(function(){var t=n(this),i=t.parent();t.append("<span class='k-icon "+(i.hasClass(a)?" k-panelbar-collapse k-i-arrow-n":" k-panelbar-expand k-i-arrow-s")+"'/>")})},_accessors:function(){var t,n,i,f=this,u=f.options,e=f.element;for(t in ot)n=u[ot[t]],i=e.attr(r.attr(t+"-field")),!n&&i&&(n=i),n||(n=t),yt(n)||(n=[n]),u[ot[t]]=n},_progress:function(n,t){var i=this.element,r=this.templates.loading({messages:this.options.messages});1==arguments.length?(t=n,t?i.html(r):i.empty()):ii(n).toggleClass("k-i-loading",t).removeClass("k-i-refresh")},_refreshRoot:function(t){var r,u=this,e=u.element,f={firstLevel:!0,expanded:!0,length:e.children().length};this.element.empty(),r=n.map(t,function(t,r){return"string"==typeof t?n(t):(t.items=[],n(u.renderItem({group:f,item:i(t,{index:r})})))}),this.element.append(r),this._angularCompileElements(r,t)},_refreshChildren:function(n,t){var r,i,f,u;if(t.children(".k-group").empty(),u=n.children.data(),u.length)for(this.append(n.children,t),this.options.loadOnDemand&&this._toggleGroup(t.children(".k-group"),!1),i=t.children(".k-group").children("li"),r=0;r<i.length;r++)f=i.eq(r),this.trigger("itemChange",{item:f,data:this.dataItem(f),ns:lt});else vi(t),i=t.children(".k-group").children("li"),this._angularCompileElements(i,u)},findByUid:function(t){for(var f,u=this.element.find(".k-item"),e=r.attr("uid"),i=0;i<u.length;i++)if(u[i].getAttribute(e)==t){f=u[i];break}return n(f)},refresh:function(n){var u,o,h=this.options,e=n.node,r=n.action,i=n.items,f=this.wrapper,s=h.loadOnDemand;if(n.field)return!i[0]||!i[0].level?void 0:this._updateItems(i,n.field);if(e&&(f=this.findByUid(e.uid),this._progress(f,!1)),"add"==r?this._appendItems(n.index,i,f):"remove"==r?this.remove(this.findByUid(i[0].uid)):"itemchange"==r?this._updateItems(i):"itemloaded"==r?this._refreshChildren(e,f):this._refreshRoot(i),"remove"!=r)for(u=0;u<i.length;u++)s&&!i[u].expanded||(o=i[u],this._hasChildItems(o)&&o.load());this.trigger(ui,{node:e?f:t})},_error:function(n){var t=n.node&&this.findByUid(n.node.uid),i=this.templates.retry({messages:this.options.messages});t?(this._progress(t,!1),this._expanded(t,!1),ii(t).addClass("k-i-refresh"),n.node.loaded(!1)):(this._progress(!1),this.element.html(i))},_retryRequest:function(n){n.preventDefault(),this.dataSource.fetch()},items:function(){return this.element.find(".k-item > span:first-child")},setDataSource:function(n){var t=this.options;t.dataSource=n,this._dataSource(),this.options.autoBind&&(this._progress(!0),this.dataSource.fetch())},_bindDataSource:function(){this._refreshHandler=rt(this.refresh,this),this._errorHandler=rt(this._error,this),this.dataSource.bind(nt,this._refreshHandler),this.dataSource.bind(st,this._errorHandler)},_unbindDataSource:function(){var n=this.dataSource;n&&(n.unbind(nt,this._refreshHandler),n.unbind(st,this._errorHandler))},_fieldAccessor:function(t){var f=this.options[ot[t]]||[],u=f.length,i="(function(item) {";return 0===u?i+="return item['"+t+"'];":(i+="var levels = ["+n.map(f,function(n){return"function(d){ return "+r.expr(n)+"}"}).join(",")+"];",i+="if(item.level){return levels[Math.min(item.level(), "+u+"-1)](item);}else",i+="{return levels["+u+"-1](item)}"),i+="})"},_dataSource:function(){var t=this,i=t.options,n=i.dataSource;n&&(n=yt(n)?{data:n}:n,t._unbindDataSource(),n.fields||(n.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),t.dataSource=ht.create(n),t._bindDataSource())},_appendItems:function(t,r,u){var o,e,c,h,s,f=this;for(u.hasClass("k-panelbar")?(o=u.children("li"),e=u):(e=u.children(".k-group"),e.length||(e=f._addGroupElement(u)),o=e.children("li")),c={firstLevel:u.hasClass("k-panelbar"),expanded:!0,length:o.length},h=n.map(r,function(t,r){return n("string"==typeof t?t:f.renderItem({group:c,item:i(t,{index:r})}))}),typeof t==gi&&(t=o.length),s=0;s<h.length;s++)0===o.length||0===t?e.append(h[s]):h[s].insertAfter(o[t-1]);f._angularCompileElements(h,r),f.dataItem(u)&&(f.dataItem(u).hasChildren=!0,f.updateArrow(u))},_updateItems:function(t,r){var s,y,e,f,v,c,u=this,h={panelBar:u.options,item:f,group:{}},l="expanded"!=r;if("selected"==r)t[0][r]?(v=u.findByUid(t[0].uid),v.hasClass(o)||u.select(v,!0)):u.clearSelection();else{for(c=n.map(t,function(n){return u.findByUid(n.uid)}),l&&u.angular("cleanup",function(){return{elements:c}}),s=0;s<t.length;s++)h.item=f=t[s],h.panelBar=u,e=c[s],y=e.parent(),l&&(h.group={firstLevel:y.hasClass("k-panelbar"),expanded:e.parent().hasClass(a),length:e.children().length},e.children(".k-link").remove(),e.prepend(u.templates.itemWrapper(i(h,{arrow:f.hasChildren||f.content||f.contentUrl?u.templates.arrow:u.templates.empty},ft)))),"expanded"==r?u._toggleItem(e,!f[r],!f[r]||"true"):"enabled"==r&&(u.enable(e,f[r]),f[r]||f.selected&&f.set("selected",!1)),e.length&&this.trigger("itemChange",{item:e,data:f,ns:lt});l&&u.angular("compile",function(){return{elements:c,data:n.map(t,function(n){return[{dataItem:n}]})}})}},_toggleDisabled:function(n,t){n=this.element.find(n),n.toggleClass(bi,t).toggleClass(o,!t).attr(kt,!t)},dataItem:function(t){var f=n(t).closest(u).attr(r.attr("uid")),i=this.dataSource;return i&&i.getByUid(f)},select:function(i,r){var u=this;return i===t?u.element.find(gt).parent():(i=u.element.find(i),i.length?i.each(function(){var i=n(this),e=i.children(f);return i.hasClass(o)?u:(u._updateSelected(e,r),t)}):this._updateSelected(i),u)},clearSelection:function(){this.select(n())},enable:function(n,t){return this._toggleDisabled(n,t!==!1),this},disable:function(n){return this._toggleDisabled(n,!1),this},append:function(n,t){t=this.element.find(t);var i=this._insert(n,t,t.length?t.find(y):null);return ct(i.items,function(){i.group.append(this),h(this)}),this.updateArrow(t),h(i.group.find(".k-first, .k-last")),i.group.height("auto"),this},insertBefore:function(n,t){t=this.element.find(t);var i=this._insert(n,t,t.parent());return ct(i.items,function(){t.before(this),h(this)}),h(t),i.group.height("auto"),this},insertAfter:function(n,t){t=this.element.find(t);var i=this._insert(n,t,t.parent());return ct(i.items,function(){t.after(this),h(this)}),h(t),i.group.height("auto"),this},remove:function(n){n=this.element.find(n);var r=this,t=n.parentsUntil(r.element,u),i=n.parent("ul");return n.remove(),!i||i.hasClass("k-panelbar")||i.children(u).length||i.remove(),t.length&&(t=t.eq(0),r.updateArrow(t),h(t)),r},reload:function(t){var i=this;t=i.element.find(t),t.each(function(){var t=n(this);i._ajaxRequest(t,t.children("."+g),!t.is(v))})},_first:function(){return this.element.children(w).first()},_last:function(){var t=this.element.children(w).last(),n=t.children(p);return n[0]?n.children(w).last():t},_current:function(i){var e=this,r=e._focused,u=e._itemId;return i===t?r:(e.element.removeAttr("aria-activedescendant"),r&&r.length&&(r[0].id===u&&r.removeAttr("id"),r.children(f).removeClass(ci)),n(i).length&&(u=i[0].id||u,i.attr("id",u).children(f).addClass(ci),e.element.attr("aria-activedescendant",u)),e._focused=i,t)},_keydown:function(n){var t=this,i=n.keyCode,r=t._current();n.target==n.currentTarget&&(i==l.DOWN||i==l.RIGHT?(t._current(t._nextItem(r)),n.preventDefault()):i==l.UP||i==l.LEFT?(t._current(t._prevItem(r)),n.preventDefault()):i==l.ENTER||i==l.SPACEBAR?(t._click(r.children(f)),n.preventDefault()):i==l.HOME?(t._current(t._first()),n.preventDefault()):i==l.END&&(t._current(t._last()),n.preventDefault()))},_nextItem:function(n){if(!n)return this._first();var i=n.children(p),t=n.nextAll(":visible").first();return i[0]&&(t=i.children("."+wt)),t[0]||(t=n.parent(p).parent(u).next()),t[0]||(t=this._first()),t.hasClass(o)&&(t=this._nextItem(t)),t},_prevItem:function(n){if(!n)return this._last();var i,t=n.prevAll(":visible").first();if(t[0])for(i=t;i[0];)i=i.children(p).children("."+vt),i[0]&&(t=i);else t=n.parent(p).parent(u),t[0]||(t=this._last());return t.hasClass(o)&&(t=this._prevItem(t)),t},_insert:function(t,r,u){var e,s,h,f=this,c=n.isPlainObject(t),o=r&&r[0];return o||(u=f.element),s={firstLevel:u.hasClass("k-panelbar"),expanded:n(r).hasClass(a),length:u.children().length},o&&!u.length&&(u=n(f.renderGroup({group:s,options:f.options})).appendTo(r)),c||n.isArray(t)||t instanceof ht?(t instanceof ht&&(t=t.data()),e=n.map(c?[t]:t,function(t,r){return n("string"==typeof t?t:f.renderItem({group:s,item:i(t,{index:r})}))}),o&&(h=f.dataItem(r),h&&(h.hasChildren=!0),r.attr(b,!1))):(e="string"==typeof t&&"<"!=t.charAt(0)?f.element.find(t):n(t),f._updateItemsClasses(e)),t.length||(t=[t]),f._angularCompileElements(e,t),{items:e,group:u}},_toggleHover:function(t){var i=n(t.currentTarget);i.parents("li."+o).length||i.toggleClass("k-state-hover",t.type==fi)},_updateClasses:function(){var r,i,t=this;r=t.element.find("li > ul").not(function(){return n(this).parentsUntil(".k-panelbar","div").length}).addClass("k-group k-panel").attr("role","group"),r.parent().attr(b,!1).not("."+a).children("ul").attr(pt,!0).hide(),i=t.element.add(r).children(),t._updateItemsClasses(i),t.updateArrow(i),h(i)},_updateItemsClasses:function(n){for(var i=n.length,t=0;t<i;t++)this._updateItemClasses(n[t],t)},_updateItemClasses:function(t,i){var o,u,s=this._selected,e=this.options.contentUrls,c=e&&e[i],h=this.element[0];t=n(t).addClass("k-item").attr("role","menuitem"),r.support.browser.msie&&t.css("list-style-position","inside").css("list-style-position",""),t.children(ei).addClass(oi),u=t.children("a").addClass(et),u[0]&&(u.attr("href",c),u.children(ei).addClass(oi)),t.filter(":not([disabled]):not([class*=k-state])").addClass("k-state-default"),t.filter("li[disabled]").addClass("k-state-disabled").attr(kt,!0).removeAttr("disabled"),t.children("div").addClass(g).attr("role","region").attr(pt,!0).hide().parent().attr(b,!1),u=t.children(it),u[0]&&(s&&s.removeAttr(tt).children(it).removeClass(d),u.addClass(d),this._selected=t.attr(tt,!0)),t.children(f)[0]||(o="<span class='"+et+"'/>",e&&e[i]&&t[0].parentNode==h&&(o='<a class="k-link k-header" href="'+e[i]+'"/>'),t.contents().filter(function(){return!(this.nodeName.match(yi)||3==this.nodeType&&!n.trim(this.nodeValue))}).wrapAll(o)),t.parent(".k-panelbar")[0]&&t.children(f).addClass("k-header")},_click:function(n){var r,e,s,p,h,t,a,l,c,i=this,w=i.element;if(!n.parents("li."+o).length&&n.closest(".k-widget")[0]==w[0]){if(h=n.closest(f),t=h.closest(u),i._updateSelected(h),a=t.children(".k-group,.k-content"),l=this.dataItem(t),!a.length&&(i.options.loadOnDemand&&l&&l.hasChildren||this._hasChildItems(t)||t.content||t.contentUrl)&&(a=i._addGroupElement(t)),e=t.find(y).add(t.find(k)),s=h.attr(at),p=s&&("#"==s.charAt(s.length-1)||s.indexOf("#"+i.element[0].id+"-")!=-1),r=!(!p&&!e.length),e.data("animating"))return r;if(i._triggerEvent(si,t)&&(r=!0),r!==!1)return i.options.expandMode==ti&&i._collapseAllExpanded(t)?r:(e.length&&(c=e.is(v),i._triggerEvent(c?ut:bt,t)||(r=i._toggleItem(t,c))),r)}},_hasChildItems:function(n){return n.items&&n.items.length>0||n.hasChildren},_toggleItem:function(n,i,r){var e,o,s=this,h=n.find(y),l=n.find(f),a=l.attr(at),u=s.dataItem(n),c=u&&u.loaded();return u&&!r?(u.set("expanded",!i),e=u.hasChildren||!!u.content||!!u.contentUrl):(!u||r&&"true"!==r||c||u.content||u.contentUrl?h.length?(this._toggleGroup(h,i),e=!0):(o=n.children("."+g),o.length&&(e=!0,o.is(pi)&&a!==t?s._ajaxRequest(n,o,i):s._toggleGroup(o,i))):(s.options.loadOnDemand&&this._progress(n,!0),n.children(".k-group,.k-content").remove(),e=u.hasChildren,u.load()),e)},_toggleGroup:function(n,r){var o=this,e=o.options.animation,f=e.expand,h=e.collapse&&"effects"in e.collapse,s=i({},e.expand,e.collapse);return h||(s=i(s,{reverse:!0})),n.is(v)!=r?(o._animating=!1,t):(n.parent().attr(b,!r).attr(pt,r).toggleClass(a,!r).find("> .k-link > .k-panelbar-collapse,> .k-link > .k-panelbar-expand").toggleClass("k-i-arrow-n",!r).toggleClass("k-panelbar-collapse",!r).toggleClass("k-i-arrow-s",r).toggleClass("k-panelbar-expand",r),r?(f=i(s,{hide:!0}),f.complete=function(){o._animationCallback()}):f=i({complete:function(n){o._triggerEvent(ri,n.closest(u)),o._animationCallback()}},f),n.kendoStop(!0,!0).kendoAnimate(f),t)},_animationCallback:function(){var n=this;n.trigger("complete"),n._animating=!1},_addGroupElement:function(t){var i=n('<ul role="group" aria-hidden="true" class="k-group k-panel" style="display:none"></ul>');return t.append(i),i},_collapseAllExpanded:function(t){var f,r=this,i=!1,e=t.find(y).add(t.find(k));return e.is(v)&&(i=!0),e.is(v)||0===e.length||(f=t.siblings(),f.find(y).add(f.find(k)).filter(function(){return n(this).is(v)}).each(function(t,f){f=n(f),i=r._triggerEvent(ut,f.closest(u)),i||r._toggleGroup(f,!0)}),r.one("complete",function(){setTimeout(function(){f.each(function(n,t){var i=r.dataItem(t);i&&i.set("expanded",!1)})})})),i},_ajaxRequest:function(t,i,r){var u=this,e=t.find(".k-panelbar-collapse, .k-panelbar-expand"),s=t.find(f),c=setTimeout(function(){e.addClass("k-i-loading")},100),h={},o=s.attr(at);n.ajax({type:"GET",cache:!1,url:o,dataType:"html",data:h,error:function(n,t){e.removeClass("k-i-loading"),u.trigger(st,{xhr:n,status:t})&&this.complete()},complete:function(){clearTimeout(c),e.removeClass("k-i-loading")},success:function(n){function e(){return{elements:i.get()}}try{u.angular("cleanup",e),i.html(n),u.angular("compile",e)}catch(s){var f=window.console;f&&f.error&&f.error(s.name+": "+s.message+" in "+o),this.error(this.xhr,"error")}u._toggleGroup(i,r),u.trigger(hi,{item:t[0],contentElement:i[0]})}})},_triggerEvent:function(n,t){var i=this;return i.trigger(n,{item:t[0]})},_updateSelected:function(n,t){var i=this,f=i.element,r=n.parent(u),o=i._selected,e=i.dataItem(r);o&&o.removeAttr(tt),i._selected=r.attr(tt,!0),f.find(gt).removeClass(d),f.find("> ."+c+", .k-panel > ."+c).removeClass(c),n.addClass(d),n.parentsUntil(f,u).filter(":has(.k-header)").addClass(c),i._current(r[0]?r:null),e&&e.set("selected",!0),t||i.trigger(nt)},_animations:function(n){n&&"animation"in n&&!n.animation&&(n.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}})},renderItem:function(n){var u,r,t=this;return n=i({panelBar:t,group:{}},n),u=t.templates.empty,r=n.item,t.templates.item(i(n,{itemWrapper:t.templates.itemWrapper,renderContent:t.renderContent,arrow:t._hasChildItems(r)||r.content||r.contentUrl?t.templates.arrow:u,subGroup:!n.loadOnDemand||r.expanded?t.renderGroup:u},ft))},renderGroup:function(n){var r=this,t=r.templates||n.panelBar.templates;return t.group(i({renderItems:function(n){for(var f="",t=0,r=n.items,u=r?r.length:0,e=i({length:u},n.group);t<u;t++)f+=n.panelBar.renderItem(i(n,{group:e,item:i({index:t},r[t])}));return f}},n,ft))},renderContent:function(n){return n.panelBar.templates.content(i(n,ft))}});r.ui.plugin(ai)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.responsivepanel.min",["kendo.core.min"],n)}(function(){return function(n){var u=n.proxy,r=".kendoResponsivePanel",e="open",o="close",i="click"+r+" touchstart"+r,f=kendo.ui.Widget,s=f.extend({init:function(t,e){f.fn.init.call(this,t,e),this._guid="_"+kendo.guid(),this._toggleHandler=u(this._toggleButtonClick,this),this._closeHandler=u(this._close,this),n(document.documentElement).on(i,this.options.toggleButton,this._toggleHandler),this._registerBreakpoint(),this.element.addClass("k-rpanel k-rpanel-"+this.options.orientation+" "+this._guid),this._resizeHandler=u(this.resize,this,!0),n(window).on("resize"+r,this._resizeHandler)},_mediaQuery:"@media (max-width: #= breakpoint-1 #px) {.#= guid #.k-rpanel-animate.k-rpanel-left,.#= guid #.k-rpanel-animate.k-rpanel-right {-webkit-transition: -webkit-transform .2s ease-out;-ms-transition: -ms-transform .2s ease-out;transition: transform .2s ease-out;} .#= guid #.k-rpanel-top {overflow: hidden;}.#= guid #.k-rpanel-animate.k-rpanel-top {-webkit-transition: max-height .2s linear;-ms-transition: max-height .2s linear;transition: max-height .2s linear;}} @media (min-width: #= breakpoint #px) {#= toggleButton # { display: none; } .#= guid #.k-rpanel-left { float: left; } .#= guid #.k-rpanel-right { float: right; } .#= guid #.k-rpanel-left, .#= guid #.k-rpanel-right {position: relative;-webkit-transform: translateX(0);-ms-transform: translateX(0);transform: translateX(0);-webkit-transform: translateX(0) translateZ(0);-ms-transform: translateX(0) translateZ(0);transform: translateX(0) translateZ(0);} .k-ie9 .#= guid #.k-rpanel-left { left: 0; } .#= guid #.k-rpanel-top { max-height: none; }}",_registerBreakpoint:function(){var n=this.options;this._registerStyle(kendo.template(this._mediaQuery)({breakpoint:n.breakpoint,toggleButton:n.toggleButton,guid:this._guid}))},_registerStyle:function(t){var r=n("head,body")[0],i=document.createElement("style");r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))},options:{name:"ResponsivePanel",orientation:"left",toggleButton:".k-rpanel-toggle",breakpoint:640,autoClose:!0},events:[e,o],_resize:function(){this.element.removeClass("k-rpanel-animate k-rpanel-expanded"),n(document.documentElement).off(i,this._closeHandler)},_toggleButtonClick:function(n){n.preventDefault(),this.element.hasClass("k-rpanel-expanded")?this.close():this.open()},open:function(){this.trigger(e)||(this.element.addClass("k-rpanel-animate k-rpanel-expanded"),this.options.autoClose&&n(document.documentElement).on(i,this._closeHandler))},close:function(){this.trigger(o)||(this.element.addClass("k-rpanel-animate").removeClass("k-rpanel-expanded"),n(document.documentElement).off(i,this._closeHandler))},_close:function(t){var r=t.isDefaultPrevented(),i=n(t.target).closest(this.options.toggleButton+",.k-rpanel");i.length||r||this.close()},destroy:function(){f.fn.destroy.call(this),n(window).off("resize"+r,this._resizeHandler),n(document.documentElement).off(i,this._closeHandler)}});kendo.ui.plugin(s)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.timepicker.min",["kendo.popup.min"],n)}(function(){return function(n,t){function ti(n,t,i){var r,u=n.getTimezoneOffset();n.setTime(n.getTime()+t),i||(r=n.getTimezoneOffset()-u,n.setTime(n.getTime()+r*c))}function ii(){var n=new u,i=new u(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0),t=new u(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0);return-1*(i.getTimezoneOffset()-t.getTimezoneOffset())}function f(n){return 60*n.getHours()*c+n.getMinutes()*c+1e3*n.getSeconds()+n.getMilliseconds()}function wt(n,t,i){var r,e=f(t),u=f(i);return!n||e==u||(r=f(n),e>r&&(r+=s),u<e&&(u+=s),r>=e&&r<=u)}function at(n){var t=n.parseFormats;n.format=fi(n.format||r.getCulture(n.culture).calendars.standard.patterns.t),t=ct(t)?t:[t],t.splice(0,0,n.format),n.parseFormats=t}function st(n){n.preventDefault()}var l,ht,r=window.kendo,h=r.keys,o=r.parseDate,ri=r._activeElement,fi=r._extractFormat,k=r.support,dt=k.browser,p=r.ui,v=p.Widget,y="open",kt="close",it="change",i=".kendoTimePicker",ft="click"+i,g="k-state-default",bt="disabled",pt="readonly",d="li",vt="<span/>",ni="k-state-focused",tt="k-state-hover",ui="mouseenter"+i+" mouseleave"+i,gt="mousedown"+i,c=6e4,s=864e5,yt="k-state-selected",nt="k-state-disabled",et="aria-selected",ot="aria-expanded",rt="aria-hidden",ut="aria-disabled",lt="aria-activedescendant",w="id",ct=n.isArray,b=n.extend,a=n.proxy,u=Date,e=new u;e=new u(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),l=function(t){var u=this,f=t.id;u.options=t,u._dates=[],u.ul=n('<ul tabindex="-1" role="listbox" aria-hidden="true" unselectable="on" class="k-list k-reset"/>').css({overflow:k.kineticScrollNeeded?"":"auto"}).on(ft,d,a(u._click,u)).on("mouseenter"+i,d,function(){n(this).addClass(tt)}).on("mouseleave"+i,d,function(){n(this).removeClass(tt)}),u.list=n("<div class='k-list-container k-list-scroller' unselectable='on'/>").append(u.ul).on(gt,st),f&&(u._timeViewID=f+"_timeview",u._optionID=f+"_option_selected",u.ul.attr(w,u._timeViewID)),u._popup(),u._heightHandler=a(u._height,u),u.template=r.template('<li tabindex="-1" role="option" class="k-item" unselectable="on">#=data#</li>',{useWithBlock:!1})},l.prototype={current:function(i){var r=this,u=r.options.active;return i===t?r._current:(r._current&&r._current.removeClass(yt).removeAttr(et).removeAttr(w),i&&(i=n(i).addClass(yt).attr(w,r._optionID).attr(et,!0),r.scroll(i[0])),r._current=i,u&&u(i),t)},close:function(){this.popup.close()},destroy:function(){var n=this;n.ul.off(i),n.list.off(i),n.popup.destroy()},open:function(){var n=this;n.ul[0].firstChild||n.bind(),n.popup.open(),n._current&&n.scroll(n._current[0])},dataBind:function(n){for(var u,f=this,t=f.options,o=t.format,h=r.toString,c=f.template,s=n.length,i=0,e="";i<s;i++)u=n[i],wt(u,t.min,t.max)&&(e+=c(h(u,o,t.culture)));f._html(e)},refresh:function(){var v,p,h,l=this,i=l.options,g=i.format,w=ii(),b=w<0,k=i.min,d=i.max,a=f(k),t=f(d),e=i.interval*c,tt=r.toString,nt=l.template,n=new u(+k),it=n.getDate(),o=0,y="";for(h=b?(s+w*c)/e:s/e,a!=t&&(a>t&&(t+=s),h=(t-a)/e+1),p=parseInt(h,10);o<h;o++)o&&ti(n,e,b),t&&p==o&&(v=f(n),it<n.getDate()&&(v+=s),v>t&&(n=new u(+d))),l._dates.push(f(n)),y+=nt(tt(n,g,i.culture));l._html(y)},bind:function(){var t=this,n=t.options.dates;n&&n[0]?t.dataBind(n):t.refresh()},_html:function(n){var t=this;t.ul[0].innerHTML=n,t.popup.unbind(y,t._heightHandler),t.popup.one(y,t._heightHandler),t.current(null),t.select(t._value)},scroll:function(n){if(n){var r=this.list[0],i=n.offsetTop,e=n.offsetHeight,t=r.scrollTop,u=r.clientHeight,f=i+e;t>i?t=i:f>t+u&&(t=f-u),r.scrollTop=t}},select:function(t){var f,i=this,e=i.options,u=i._current;t instanceof Date&&(t=r.toString(t,e.format,e.culture)),"string"==typeof t&&(u&&u.text()===t?t=u:(t=n.grep(i.ul[0].childNodes,function(n){return(n.textContent||n.innerText)==t}),t=t[0]?t:null)),f=i._distinctSelection(t),i.current(f)},_distinctSelection:function(t){var r,u,i=this;return t&&t.length>1&&(r=f(i._value),u=n.inArray(r,i._dates),t=i.ul.children()[u]),t},setOptions:function(n){var t=this.options;n.min=o(n.min),n.max=o(n.max),this.options=b(t,n,{active:t.active,change:t.change,close:t.close,open:t.open}),this.bind()},toggle:function(){var n=this;n.popup.visible()?n.close():n.open()},value:function(n){var t=this;t._value=n,t.ul[0].firstChild&&t.select(n)},_click:function(t){var i=this,u=n(t.currentTarget),f=u.text(),r=i.options.dates;r&&r.length>0&&(f=r[u.index()]),t.isDefaultPrevented()||(i.select(u),i.options.change(f,!0),i.close())},_height:function(){var n=this,i=n.list,r=i.parent(".k-animation-container"),t=n.options.height;n.ul[0].children.length&&i.add(r).show().height(n.ul[0].scrollHeight>t?t:"auto").hide()},_parse:function(n){var i=this,r=i.options,t=i._value||e;return n instanceof u?n:(n=o(n,r.parseFormats,r.culture),n&&(n=new u(t.getFullYear(),t.getMonth(),t.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())),n)},_adjustListWidth:function(){var n,f,t=this.list,i=t[0].style.width,u=this.options.anchor,e=r._outerWidth;!t.data("width")&&i||(n=window.getComputedStyle?window.getComputedStyle(u[0],null):0,f=n?parseFloat(n.width):e(u),n&&(dt.mozilla||dt.msie)&&(f+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)),i=f-(e(t)-t.width()),t.css({fontFamily:u.css("font-family"),width:i}).data("width",i))},_popup:function(){var t=this,r=t.list,n=t.options,i=n.anchor;t.popup=new p.Popup(r,b(n.popup,{anchor:i,open:n.open,close:n.close,animation:n.animation,isRtl:k.isRtl(n.anchor)}))},move:function(n){var r=this,u=n.keyCode,e=r.ul[0],i=r._current,f=u===h.DOWN;if(u===h.UP||f){if(n.altKey)return r.toggle(f),t;i=f?i?i[0].nextSibling:e.firstChild:i?i[0].previousSibling:e.lastChild,i&&r.select(i),r.options.change(r._current.text()),n.preventDefault()}else u!==h.ENTER&&u!==h.TAB&&u!==h.ESC||(n.preventDefault(),i&&r.options.change(i.text(),!0),r.close())}},l.getMilliseconds=f,r.TimeView=l,ht=v.extend({init:function(t,i){var e,f,s,u=this;v.fn.init.call(u,t,i),t=u.element,i=u.options,i.min=o(t.attr("min"))||o(i.min),i.max=o(t.attr("max"))||o(i.max),at(i),u._initialOptions=b({},i),u._wrapper(),u.timeView=f=new l(b({},i,{id:t.attr(w),anchor:u.wrapper,format:i.format,change:function(n,i){i?u._change(n):t.val(n)},open:function(n){u.timeView._adjustListWidth(),u.trigger(y)?n.preventDefault():(t.attr(ot,!0),e.attr(rt,!1))},close:function(n){u.trigger(kt)?n.preventDefault():(t.attr(ot,!1),e.attr(rt,!0))},active:function(n){t.removeAttr(lt),n&&t.attr(lt,f._optionID)}})),e=f.ul,u._icon(),u._reset();try{t[0].setAttribute("type","text")}catch(h){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":f._timeViewID}),s=t.is("[disabled]")||n(u.element).parents("fieldset").is(":disabled"),s?u.enable(!1):u.readonly(t.is("[readonly]")),i.dateInput&&(u._dateInput=new p.DateInput(t,{culture:i.culture,format:i.format,min:i.min,max:i.max,value:i.value})),u._old=u._update(i.value||u.element.val()),u._oldText=t.val(),r.notify(u)},options:{name:"TimePicker",min:e,max:e,format:"",dates:[],parseFormats:[],value:null,interval:30,height:200,animation:{}},events:[y,kt,it],setOptions:function(n){var t=this,i=t._value;v.fn.setOptions.call(t,n),n=t.options,at(n),t.timeView.setOptions(n),i&&t.element.val(r.toString(i,n.format,n.culture))},dataBind:function(n){ct(n)&&this.timeView.dataBind(n)},_editable:function(n){var t=this,r=n.disable,e=n.readonly,o=t._arrow.off(i),u=t.element.off(i),f=t._inputWrapper.off(i);e||r?(f.addClass(r?nt:g).removeClass(r?g:nt),u.attr(bt,r).attr(pt,e).attr(ut,r)):(f.addClass(g).removeClass(nt).on(ui,t._toggleHover),u.removeAttr(bt).removeAttr(pt).attr(ut,!1).on("keydown"+i,a(t._keydown,t)).on("focusout"+i,a(t._blur,t)).on("focus"+i,function(){t._inputWrapper.addClass(ni)}),o.on(ft,a(t._click,t)).on(gt,st))},readonly:function(n){this._editable({readonly:n===t||n,disable:!1})},enable:function(n){this._editable({readonly:!1,disable:!(n=n===t||n)})},destroy:function(){var n=this;v.fn.destroy.call(n),n.timeView.destroy(),n.element.off(i),n._arrow.off(i),n._inputWrapper.off(i),n._form&&n._form.off("reset",n._resetHandler)},close:function(){this.timeView.close()},open:function(){this.timeView.open()},min:function(n){return this._option("min",n)},max:function(n){return this._option("max",n)},value:function(n){var i=this;return n===t?i._value:(i._old=i._update(n),null===i._old&&i.element.val(""),i._oldText=i.element.val(),t)},_blur:function(){var n=this,t=n.element.val();n.close(),t!==n._oldText&&n._change(t),n._inputWrapper.removeClass(ni)},_click:function(){var t=this,n=t.element;t.timeView.toggle(),k.touch||n[0]===ri()||n.focus()},_change:function(n){var t=this;n=t._update(n),+t._old!=+n&&(t._old=n,t._oldText=t.element.val(),t._typing||t.element.trigger(it),t.trigger(it)),t._typing=!1},_icon:function(){var t,i=this,r=i.element;t=r.next("span.k-select"),t[0]||(t=n('<span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-clock"></span></span>').insertAfter(r)),i._arrow=t.attr({role:"button","aria-controls":i.timeView._timeViewID})},_keydown:function(n){var t=this,u=n.keyCode,i=t.timeView,r=t.element.val();i.popup.visible()||n.altKey?(i.move(n),t._dateInput&&n.stopImmediatePropagation&&n.stopImmediatePropagation()):u===h.ENTER&&r!==t._oldText?t._change(r):t._typing=!0},_option:function(n,i){var r=this,f=r.options;return i===t?f[n]:(i=r.timeView._parse(i),i&&(i=new u(+i),f[n]=i,r.timeView.options[n]=i,r.timeView.bind()),t)},_toggleHover:function(t){n(t.currentTarget).toggleClass(tt,"mouseenter"===t.type)},_update:function(n){var i=this,u=i.options,f=i.timeView,t=f._parse(n);return wt(t,u.min,u.max)||(t=null),i._value=t,i._dateInput?i._dateInput.value(t||n):i.element.val(r.toString(t||n,u.format,u.culture)),f.value(t),t},_wrapper:function(){var t,r=this,i=r.element;t=i.parents(".k-timepicker"),t[0]||(t=i.wrap(vt).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(vt).parent()),t[0].style.cssText=i[0].style.cssText,r.wrapper=t.addClass("k-widget k-timepicker k-header").addClass(i[0].className),i.css({width:"100%",height:i[0].style.height}),r._inputWrapper=n(t[0].firstChild)},_reset:function(){var t=this,i=t.element,u=i.attr("form"),r=u?n("#"+u):i.closest("form");r[0]&&(t._resetHandler=function(){t.value(i[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=r.on("reset",t._resetHandler))}}),p.plugin(ht)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.datetimepicker.min",["kendo.datepicker.min","kendo.timepicker.min"],n)}(function(){return function(n,t){function yt(n){var t=new Date(2100,0,1);return t.setMinutes(-n),t}function st(n){n.preventDefault()}function vt(t){var r,u=i.getCulture(t.culture).calendars.standard.patterns,f=!t.parseFormats.length;t.format=ct(t.format||u.g),t.timeFormat=r=ct(t.timeFormat||u.t),i.DateView.normalize(t),f&&t.parseFormats.unshift("yyyy-MM-ddTHH:mm:ss"),n.inArray(r,t.parseFormats)===-1&&t.parseFormats.push(r)}var i=window.kendo,lt=i.TimeView,f=i.parseDate,at=i._activeElement,ct=i._extractFormat,w=i.calendar,d=w.isInRange,ti=w.restrictValue,e=w.isEqualDatePart,ht=lt.getMilliseconds,g=i.ui,h=g.Widget,nt="open",tt="close",l="change",r=".kendoDateTimePicker",pt="click"+r,bt="disabled",kt="readonly",b="k-state-default",wt="k-state-focused",ni="k-state-hover",p="k-state-disabled",gt="mouseenter"+r+" mouseleave"+r,rt="mousedown"+r,it="month",ut="<span/>",v="aria-activedescendant",a="aria-expanded",c="aria-hidden",y="aria-owns",ft="aria-disabled",u=Date,o=new u(1800,0,1),s=new u(2099,11,31),et={view:"date"},ot={view:"time"},k=n.extend,dt=h.extend({init:function(t,r){var e,u=this;h.fn.init.call(u,t,r),t=u.element,r=u.options,r.disableDates=i.calendar.disabled(r.disableDates),r.min=f(t.attr("min"))||f(r.min),r.max=f(t.attr("max"))||f(r.max),vt(r),u._initialOptions=k({},r),u._wrapper(),u._views(),u._icons(),u._reset(),u._template();try{t[0].setAttribute("type","text")}catch(o){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1}),u._midnight=u._calculateMidnight(r.min,r.max),e=t.is("[disabled]")||n(u.element).parents("fieldset").is(":disabled"),e?u.enable(!1):u.readonly(t.is("[readonly]")),r.dateInput&&(u._dateInput=new g.DateInput(t,{culture:r.culture,format:r.format,min:r.min,max:r.max,value:r.value})),u._old=u._update(r.value||u.element.val()),u._oldText=t.val(),i.notify(u)},options:{name:"DateTimePicker",value:null,format:"",timeFormat:"",culture:"",parseFormats:[],dates:[],min:new u(o),max:new u(s),interval:30,height:200,footer:"",start:it,depth:it,animation:{},month:{},ARIATemplate:'Current focused date is #=kendo.toString(data.current, "d")#',dateButtonText:"Open the date view",timeButtonText:"Open the time view"},events:[nt,tt,l],setOptions:function(n){var c,r,a,t=this,l=t._value;h.fn.setOptions.call(t,n),n=t.options,n.min=c=f(n.min),n.max=r=f(n.max),vt(n),t._midnight=t._calculateMidnight(n.min,n.max),a=n.value||t._value||t.dateView._current,c&&!e(c,a)&&(c=new u(o)),r&&!e(r,a)&&(r=new u(s)),t.dateView.setOptions(n),t.timeView.setOptions(k({},n,{format:n.timeFormat,min:c,max:r})),l&&(t.element.val(i.toString(l,n.format,n.culture)),t._updateARIA(l))},_editable:function(t){var u=this,f=u.element.off(r),h=u._dateIcon.off(r),c=u._timeIcon.off(r),s=u._inputWrapper.off(r),o=t.readonly,e=t.disable;o||e?(s.addClass(e?p:b).removeClass(e?b:p),f.attr(bt,e).attr(kt,o).attr(ft,e)):(s.addClass(b).removeClass(p).on(gt,u._toggleHover),f.removeAttr(bt).removeAttr(kt).attr(ft,!1).on("keydown"+r,n.proxy(u._keydown,u)).on("focus"+r,function(){u._inputWrapper.addClass(wt)}).on("focusout"+r,function(){u._inputWrapper.removeClass(wt),f.val()!==u._oldText&&u._change(f.val()),u.close("date"),u.close("time")}),h.on(rt,st).on(pt,function(){u.toggle("date"),i.support.touch||f[0]===at()||f.focus()}),c.on(rt,st).on(pt,function(){u.toggle("time"),i.support.touch||f[0]===at()||f.focus()}))},readonly:function(n){this._editable({readonly:n===t||n,disable:!1})},enable:function(n){this._editable({readonly:!1,disable:!(n=n===t||n)})},destroy:function(){var n=this;h.fn.destroy.call(n),n.dateView.destroy(),n.timeView.destroy(),n.element.off(r),n._dateIcon.off(r),n._timeIcon.off(r),n._inputWrapper.off(r),n._form&&n._form.off("reset",n._resetHandler)},close:function(n){"time"!==n&&(n="date"),this[n+"View"].close()},open:function(n){"time"!==n&&(n="date"),this[n+"View"].open()},min:function(n){return this._option("min",n)},max:function(n){return this._option("max",n)},toggle:function(n){var t="timeView";"time"!==n?n="date":t="dateView",this[n+"View"].toggle(),this[t].close()},value:function(n){var i=this;return n===t?i._value:(i._old=i._update(n),null===i._old&&i.element.val(""),i._oldText=i.element.val(),t)},_change:function(n){var i,u,r,t=this,f=t.element.val();n=t._update(n),i=+t._old!=+n,u=i&&!t._typing,r=f!==t.element.val(),(u||r)&&t.element.trigger(l),i&&(t._old=n,t._oldText=t.element.val(),t.trigger(l)),t._typing=!1},_option:function(n,i){var a,l,h=this,r=h.options,y=h.timeView,c=y.options,v=h._value||h._old;if(i===t)return r[n];if(i=f(i,r.parseFormats,r.culture)){if(r.min.getTime()===r.max.getTime()&&(c.dates=[]),r[n]=new u(i.getTime()),h.dateView[n](i),h._midnight=h._calculateMidnight(r.min,r.max),v&&(a=e(r.min,v),l=e(r.max,v)),a||l){if(c[n]=i,a&&!l&&(c.max=yt(r.interval)),l){if(h._midnight)return y.dataBind([s]),t;a||(c.min=o)}}else c.max=s,c.min=o;y.bind()}},_toggleHover:function(t){n(t.currentTarget).toggleClass(ni,"mouseenter"===t.type)},_update:function(t){var y,c,k,b,nt,u=this,h=u.options,a=h.min,w=h.max,v=h.dates,p=u.timeView,g=u._value,r=f(t,h.parseFormats,h.culture),tt=null===r&&null===g||r instanceof Date&&g instanceof Date;return h.disableDates&&h.disableDates(r)&&(r=null,u._old||u.element.val()||(t=null)),+r==+g&&tt?(nt=i.toString(r,h.format,h.culture),nt!==t&&(u.element.val(null===r?t:nt),t instanceof String&&u.element.trigger(l)),r):(null!==r&&e(r,a)?r=ti(r,a,w):d(r,a,w)||(r=null),u._value=r,p.value(r),u.dateView.value(r),r&&(k=u._old,c=p.options,v[0]&&(v=n.grep(v,function(n){return e(r,n)}),v[0]&&(p.dataBind(v),b=!0)),b||(e(r,a)&&(c.min=a,c.max=yt(h.interval),y=!0),e(r,w)&&(u._midnight?(p.dataBind([s]),b=!0):(c.max=w,y||(c.min=o),y=!0))),!b&&(!k&&y||k&&!e(k,r))&&(y||(c.max=s,c.min=o),p.bind())),u._dateInput?u._dateInput.value(r||t):u.element.val(i.toString(r||t,h.format,h.culture)),u._updateARIA(r),r)},_keydown:function(n){var t=this,r=t.dateView,e=t.timeView,o=t.element.val(),u=r.popup.visible(),f=t._dateInput&&n.stopImmediatePropagation;n.altKey&&n.keyCode===i.keys.DOWN?t.toggle(u?"time":"date"):u?(r.move(n),t._updateARIA(r._current)):e.popup.visible()?e.move(n):n.keyCode===i.keys.ENTER&&o!==t._oldText?t._change(o):(t._typing=!0,f=!1),f&&n.stopImmediatePropagation()},_views:function(){var l,e,p,w,b,h,n=this,r=n.element,t=n.options,g=r.attr("id");n.dateView=l=new i.DateView(k({},t,{id:g,anchor:n.wrapper,change:function(){var f,s,r=l.calendar.value(),h=+r,e=+t.min,o=+t.max;h!==e&&h!==o||(f=h===e?e:o,f=new u(n._value||f),f.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),d(f,e,o)&&(r=f)),n._value&&(s=i.date.setHours(new Date(r),n._value),d(s,e,o)&&(r=s)),n._change(r),n.close("date")},close:function(t){n.trigger(tt,et)?t.preventDefault():(r.attr(a,!1),p.attr(c,!0),e.popup.visible()||r.removeAttr(y))},open:function(i){n.trigger(nt,et)?i.preventDefault():(r.val()!==n._oldText&&(h=f(r.val(),t.parseFormats,t.culture),n.dateView[h?"current":"value"](h)),p.attr(c,!1),r.attr(a,!0).attr(y,l._dateViewID),n._updateARIA(h))}})),p=l.div,b=t.min.getTime(),n.timeView=e=new lt({id:g,value:t.value,anchor:n.wrapper,animation:t.animation,format:t.timeFormat,culture:t.culture,height:t.height,interval:t.interval,min:new u(o),max:new u(s),dates:b===t.max.getTime()?[new Date(b)]:[],parseFormats:t.parseFormats,change:function(f,o){f=e._parse(f),f<t.min?(f=new u(+t.min),e.options.min=f):f>t.max&&(f=new u(+t.max),e.options.max=f),o?(n._timeSelected=!0,n._change(f)):(r.val(i.toString(f,t.format,t.culture)),l.value(f),n._updateARIA(f))},close:function(t){n.trigger(tt,ot)?t.preventDefault():(w.attr(c,!0),r.attr(a,!1),l.popup.visible()||r.removeAttr(y))},open:function(i){e._adjustListWidth(),n.trigger(nt,ot)?i.preventDefault():(r.val()!==n._oldText&&(h=f(r.val(),t.parseFormats,t.culture),n.timeView.value(h)),w.attr(c,!1),r.attr(a,!0).attr(y,e._timeViewID),e.options.active(e.current()))},active:function(n){r.removeAttr(v),n&&r.attr(v,e._optionID)}}),w=e.ul},_icons:function(){var i=this,r=i.element,u=i.options,t=r.next("span.k-select");t[0]||(t=n('<span unselectable="on" class="k-select"><span class="k-link k-link-date" aria-label="'+u.dateButtonText+'"><span unselectable="on" class="k-icon k-i-calendar"></span></span><span class="k-link k-link-time" aria-label="'+u.timeButtonText+'"><span unselectable="on" class="k-icon k-i-clock"></span></span></span>').insertAfter(r)),t=t.children(),t=t.children(),i._dateIcon=t.eq(0).attr("aria-controls",i.dateView._dateViewID),i._timeIcon=t.eq(1).attr("aria-controls",i.timeView._timeViewID)},_wrapper:function(){var t,r=this,i=r.element;t=i.parents(".k-datetimepicker"),t[0]||(t=i.wrap(ut).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(ut).parent()),t[0].style.cssText=i[0].style.cssText,i.css({width:"100%",height:i[0].style.height}),r.wrapper=t.addClass("k-widget k-datetimepicker k-header").addClass(i[0].className),r._inputWrapper=n(t[0].firstChild)},_reset:function(){var t=this,i=t.element,u=i.attr("form"),r=u?n("#"+u):i.closest("form");r[0]&&(t._resetHandler=function(){t.value(i[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=r.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=i.template(this.options.ARIATemplate)},_calculateMidnight:function(n,t){return ht(n)+ht(t)===0},_updateARIA:function(n){var r,t=this,i=t.dateView.calendar;t.element.removeAttr(v),i&&(r=i._cell,r.attr("aria-label",t._ariaTemplate({current:n||i.current()})),t.element.attr(v,r.attr("id")))}});g.plugin(dt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.splitter.min",["kendo.resizable.min"],n)}(function(){return function(n,t){function et(n){return lt.test(n)}function tt(n){return ht.test(n)||/^\d+$/.test(n)}function s(n){return!et(n)&&!tt(n)}function b(n,t){var i=parseInt(n,10);return et(n)&&(i=Math.floor(i*t/100)),i}function v(n,i){return function(u,f){var o,e=this.element.find(u).data(r);return 1==arguments.length?e[n]:(e[n]=f,i&&(o=this.element.data("kendo"+this.options.name),o.resize(!0)),t)}}function d(n){var t=this,i=n.orientation;t.owner=n,t._element=n.element,t.orientation=i,ct(t,i===f?ft:ut),t._resizable=new e.ui.Resizable(n.element,{orientation:i,handle:".k-splitbar-draggable-"+i+"[data-marker="+n._marker+"]",hint:u(t._createHint,t),start:u(t._start,t),max:u(t._max,t),min:u(t._min,t),invalidClass:"k-restricted-size-"+i,resizeend:u(t._stop,t)})}var ut,ft,e=window.kendo,nt=e.ui,a=e.keys,ct=n.extend,u=n.proxy,y=nt.Widget,ht=/^\d+(\.\d+)?px$/i,lt=/^\d+(\.\d+)?%$/i,i=".kendoSplitter",l="expand",c="collapse",it="contentLoad",w="error",vt="resize",g="layoutChange",f="horizontal",o="vertical",at="mouseenter",k="click",r="pane",st="mouseleave",p="k-state-focused",rt="k-"+r,h="."+rt,ot=y.extend({init:function(n,t){var u,r=this;y.fn.init.call(r,n,t),r.wrapper=r.element,u=r.options.orientation.toLowerCase()!=o,r.orientation=u?f:o,r._dimension=u?"width":"height",r._keys={decrease:u?a.LEFT:a.UP,increase:u?a.RIGHT:a.DOWN},r._resizeStep=10,r._marker=e.guid().substring(0,8),r._initPanes(),r.resizing=new d(r),r.element.triggerHandler("init"+i)},events:[l,c,it,w,vt,g],_addOverlays:function(){this._panes().append("<div class='k-splitter-overlay k-overlay' />")},_removeOverlays:function(){this._panes().children(".k-splitter-overlay").remove()},_attachEvents:function(){var t=this,r=t.options.orientation;t.element.children(".k-splitbar-draggable-"+r).on("keydown"+i,u(t._keydown,t)).on("mousedown"+i,function(n){n.currentTarget.focus()}).on("focus"+i,function(t){n(t.currentTarget).addClass(p)}).on("blur"+i,function(i){n(i.currentTarget).removeClass(p),t.resizing&&t.resizing.end()}).on(at+i,function(){n(this).addClass("k-splitbar-"+t.orientation+"-hover")}).on(st+i,function(){n(this).removeClass("k-splitbar-"+t.orientation+"-hover")}).on("mousedown"+i,u(t._addOverlays,t)).end().children(".k-splitbar").on("dblclick"+i,u(t._togglePane,t)).children(".k-collapse-next, .k-collapse-prev").on(k+i,t._arrowClick(c)).end().children(".k-expand-next, .k-expand-prev").on(k+i,t._arrowClick(l)).end().end(),n(window).on("resize"+i+t._marker,u(t.resize,t,!1)),n(document).on("mouseup"+i+t._marker,u(t._removeOverlays,t))},_detachEvents:function(){var t=this;t.element.children(".k-splitbar-draggable-"+t.orientation).off(i).end().children(".k-splitbar").off("dblclick"+i).children(".k-collapse-next, .k-collapse-prev, .k-expand-next, .k-expand-prev").off(i),n(window).off(i+t._marker),n(document).off(i+t._marker)},options:{name:"Splitter",orientation:f,panes:[]},destroy:function(){y.fn.destroy.call(this),this._detachEvents(),this.resizing&&this.resizing.destroy(),e.destroy(this.element),this.wrapper=this.element=null},_keydown:function(t){var o,r=this,e=t.keyCode,i=r.resizing,f=n(t.currentTarget),s=r._keys,h=e===s.increase,u=e===s.decrease;h||u?(t.ctrlKey?(o=f[u?"next":"prev"](),i&&i.isResizing()&&i.end(),o[r._dimension]()?r._triggerAction(c,f[u?"prev":"next"]()):r._triggerAction(l,o)):i&&i.move((u?-1:1)*r._resizeStep,f),t.preventDefault()):e===a.ENTER&&i&&(i.end(),t.preventDefault())},_initPanes:function(){var t=this.options.panes||[],n=this;this.element.addClass("k-widget").addClass("k-splitter").children().each(function(i,r){"script"!=r.nodeName.toLowerCase()&&n._initPane(r,t[i])}),this.resize()},_initPane:function(t,i){t=n(t).attr("role","group").addClass(rt),t.data(r,i?i:{}).toggleClass("k-scrollable",!i||i.scrollable!==!1),this.ajaxRequest(t)},ajaxRequest:function(n,t,i){var f,u=this;n=u.element.find(n),f=n.data(r),t=t||f.contentUrl,t&&(n.append("<span class='k-icon k-i-loading k-pane-loading' />"),e.isLocalUrl(t)?jQuery.ajax({url:t,data:i||{},type:"GET",dataType:"html",success:function(t){u.angular("cleanup",function(){return{elements:n.get()}}),n.html(t),u.angular("compile",function(){return{elements:n.get()}}),u.trigger(it,{pane:n[0]})},error:function(t,i){u.trigger(w,{pane:n[0],status:i,xhr:t})}}):n.removeClass("k-scrollable").html("<iframe src='"+t+"' frameborder='0' class='k-content-frame'>This page requires frames in order to show content</iframe>"))},_triggerAction:function(n,t){this.trigger(n,{pane:t[0]})||this[n](t[0])},_togglePane:function(t){var r,u=this,i=n(t.target);i.closest(".k-splitter")[0]==u.element[0]&&(r=i.children(".k-icon:not(.k-resize-handle)"),1===r.length&&(r.is(".k-collapse-prev")?u._triggerAction(c,i.prev()):r.is(".k-collapse-next")?u._triggerAction(c,i.next()):r.is(".k-expand-prev")?u._triggerAction(l,i.prev()):r.is(".k-expand-next")&&u._triggerAction(l,i.next())))},_arrowClick:function(t){var i=this;return function(r){var f,u=n(r.target);u.closest(".k-splitter")[0]==i.element[0]&&(f=u.is(".k-"+t+"-prev")?u.parent().prev():u.parent().next(),i._triggerAction(t,f))}},_updateSplitBar:function(n,t,i){var s=function(n,t){return t?"<div class='k-icon "+n+"' />":""},r=this.orientation,l=t.resizable!==!1&&i.resizable!==!1,c=t.collapsible,e=t.collapsed,h=i.collapsible,u=i.collapsed;n.addClass("k-splitbar k-state-default k-splitbar-"+r).attr("role","separator").attr("aria-expanded",!(e||u)).removeClass("k-splitbar-"+r+"-hover").toggleClass("k-splitbar-draggable-"+r,l&&!e&&!u).toggleClass("k-splitbar-static-"+r,!l&&!c&&!h).html(s("k-collapse-prev k-i-arrow-60-up",c&&!e&&!u&&r==o)+s("k-collapse-prev k-i-arrow-60-left",c&&!e&&!u&&r==f)+s("k-expand-prev k-i-arrow-60-down",c&&e&&!u&&r==o)+s("k-expand-prev k-i-arrow-60-right",c&&e&&!u&&r==f)+s("k-resize-handle k-i-hbar",l&&r==o)+s("k-resize-handle k-i-vbar",l&&r==f)+s("k-collapse-next k-i-arrow-60-down",h&&!u&&!e&&r==o)+s("k-collapse-next k-i-arrow-60-right",h&&!u&&!e&&r==f)+s("k-expand-next k-i-arrow-60-up",h&&u&&!e&&r==o)+s("k-expand-next k-i-arrow-60-left",h&&u&&!e&&r==f)),l||c||h||n.removeAttr("tabindex")},_updateSplitBars:function(){var t=this;this.element.children(".k-splitbar").each(function(){var i=n(this),f=i.prevAll(h).first().data(r),u=i.nextAll(h).first().data(r);u&&t._updateSplitBar(i,f,u)})},_removeSplitBars:function(){this.element.children(".k-splitbar").remove()},_panes:function(){return this.element?this.element.children(h):n()},_resize:function(){var w,ut,v,c,tt,nt,d,ft,rt,it,i=this,o=i.element,a=o.children(h),l=i.orientation==f,k=o.children(".k-splitbar"),p=k.length,y=l?"width":"height",u=o[y]();i.wrapper.addClass("k-splitter-resizing"),0===p?(p=a.length-1,a.slice(0,p).after("<div tabindex='0' class='k-splitbar' data-marker='"+i._marker+"' />"),i._updateSplitBars(),k=o.children(".k-splitbar")):i._updateSplitBars(),k.each(function(){u-=this[l?"offsetWidth":"offsetHeight"]}),w=0,ut=0,v=n(),a.css({position:"absolute",top:0})[y](function(){var f,e=n(this),i=e.data(r)||{};if(e.removeClass("k-state-collapsed"),i.collapsed)f=i.collapsedSize?b(i.collapsedSize,u):0,e.css("overflow","hidden").addClass("k-state-collapsed");else{if(s(i.size))return v=v.add(this),t;f=b(i.size,u)}return ut++,w+=f,f}),u-=w,c=v.length,tt=Math.floor(u/c),v.slice(0,c-1).css(y,tt).end().eq(c-1).css(y,u-(c-1)*tt),nt=0,d=l?"height":"width",ft=l?"left":"top",rt=l?"offsetWidth":"offsetHeight",0===c&&(it=a.filter(function(){return!(n(this).data(r)||{}).collapsed}).last(),it[y](u+it[0][rt])),o.children().css(d,o[d]()).each(function(n,t){"script"!=t.tagName.toLowerCase()&&(t.style[ft]=Math.floor(nt)+"px",nt+=t[rt])}),i._detachEvents(),i._attachEvents(),i.wrapper.removeClass("k-splitter-resizing"),e.resize(a),i.trigger(g)},toggle:function(n,i){var u,f=this;n=f.element.find(n),u=n.data(r),(i||u.collapsible)&&(1==arguments.length&&(i=u.collapsed!==t&&u.collapsed),u.collapsed=!i,u.collapsed?n.css("overflow","hidden"):n.css("overflow",""),f.resize(!0))},collapse:function(n){this.toggle(n,!1)},expand:function(n){this.toggle(n,!0)},_addPane:function(n,t,i){var r=this;return i.length&&(r.options.panes.splice(t,0,n),r._initPane(i,n),r._removeSplitBars(),r.resize(!0)),i},append:function(t){t=t||{};var i=this,r=n("<div />").appendTo(i.element);return i._addPane(t,i.options.panes.length,r)},insertBefore:function(t,i){i=n(i),t=t||{};var r=this,f=r.wrapper.children(".k-pane").index(i),u=n("<div />").insertBefore(n(i));return r._addPane(t,f,u)},insertAfter:function(t,i){i=n(i),t=t||{};var r=this,f=r.wrapper.children(".k-pane").index(i),u=n("<div />").insertAfter(n(i));return r._addPane(t,f+1,u)},remove:function(t){t=n(t);var i=this;return t.length&&(e.destroy(t),t.each(function(t,r){i.options.panes.splice(i.wrapper.children(".k-pane").index(r),1),n(r).remove()}),i._removeSplitBars(),i.options.panes.length&&i.resize(!0)),i},size:v("size",!0),min:v("min"),max:v("max")});nt.plugin(ot),ut={sizingProperty:"height",sizingDomProperty:"offsetHeight",alternateSizingProperty:"width",positioningProperty:"top",mousePositioningProperty:"pageY"},ft={sizingProperty:"width",sizingDomProperty:"offsetWidth",alternateSizingProperty:"height",positioningProperty:"left",mousePositioningProperty:"pageX"},d.prototype={press:function(n){this._resizable.press(n)},move:function(n,t){this.pressed||(this.press(t),this.pressed=!0),this._resizable.target||this._resizable.press(t),this._resizable.move(n)},end:function(){this._resizable.end(),this.pressed=!1},destroy:function(){this._resizable.destroy(),this._resizable=this._element=this.owner=null},isResizing:function(){return this._resizable.resizing},_createHint:function(t){var i=this;return n("<div class='k-ghost-splitbar k-ghost-splitbar-"+i.orientation+" k-state-default' />").css(i.alternateSizingProperty,t[i.alternateSizingProperty]())},_start:function(t){var i=this,h=n(t.currentTarget),s=h.prev(),o=h.next(),c=s.data(r),l=o.data(r),u=parseInt(s[0].style[i.positioningProperty],10),f=parseInt(o[0].style[i.positioningProperty],10)+o[0][i.sizingDomProperty]-h[0][i.sizingDomProperty],p=parseInt(i._element.css(i.sizingProperty),10),e=function(n){var t=parseInt(n,10);return(tt(n)?t:p*t/100)||0},w=e(c.min),y=e(c.max)||f-u,a=e(l.min),v=e(l.max)||f-u;i.previousPane=s,i.nextPane=o,i._maxPosition=Math.min(f-a,u+y),i._minPosition=Math.max(u+w,f-v)},_max:function(){return this._maxPosition},_min:function(){return this._minPosition},_stop:function(t){var l,a,o,u,v,w,p,f,i=this,c=n(t.currentTarget),y=i.owner;return y._panes().children(".k-splitter-overlay").remove(),t.keyCode!==e.keys.ESC&&(l=t.position,a=c.prev(),o=c.next(),u=a.data(r),v=o.data(r),w=l-parseInt(a[0].style[i.positioningProperty],10),p=parseInt(o[0].style[i.positioningProperty],10)+o[0][i.sizingDomProperty]-l-c[0][i.sizingDomProperty],f=i._element.children(h).filter(function(){return s(n(this).data(r).size)}).length,(!s(u.size)||f>1)&&(s(u.size)&&f--,u.size=w+"px"),(!s(v.size)||f>1)&&(v.size=p+"px"),y.resize(!0)),!1}}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.dialog.min",["kendo.core.min","kendo.popup.min"],n)}(function(){return function(n,t){function b(n){return t!==n}function pt(n,t,i){return Math.max(Math.min(parseInt(n,10),i===1/0?i:parseInt(i,10)),parseInt(t,10))}function bt(n){return n.keyCode==s.ENTER||n.keyCode==s.SPACEBAR}var r,e,kt,ht,yt,vt,lt,at,i=window.kendo,p=i.ui.Widget,ei=i.ui.Popup.TabKeyTrap,u=n.proxy,f=i.template,s=i.keys,fi=n.isFunction,v="kendoWindow",si=".k-dialog",ct=".k-window",w=".k-dialog-close",oi="k-content k-window-content k-dialog-content",dt=".k-content",k="k-dialog-titleless",g=".k-dialog-title",wt=g+"bar",l=".k-dialog-buttongroup",c=".k-button",ri="k-alert",ui="k-confirm",ti="k-prompt",a=".k-textbox",ii=".k-overlay",y=":visible",o="zIndex",et="body",ft="initOpen",h="open",ut="close",rt="show",tt="hide",nt="width",it=100,gt={okText:"OK",cancel:"Cancel",promptInput:"Input"},st=Math.ceil,ot=":not(link,meta,script,style)",d=p.extend({init:function(n,t){var r=this;p.fn.init.call(r,n,t),r._init(r.element,r.options),i.notify(r)},_init:function(i,f){var o,e=this;e._centerCallback=u(e._center,e),e.appendTo=n(et),b(f.visible)&&null!==f.visible||(f.visible=i.is(y)),e.wrapperTemplate===t&&(e.wrapperTemplate=r.wrapper),e._createDialog(),o=e.wrapper=i.closest(si),f._defaultFocus===t&&(e._defaultFocus=i[0]),e._tabindex(i),e._dimensions(),this._tabKeyTrap=new ei(o),e.options.visible?(e.toFront(),e._triggerInitOpen(),e.trigger(h),f.modal&&(e._overlay(o.is(y)).css({opacity:.5}),e._focusDialog())):e.wrapper.hide(),f.closable&&(o.autoApplyNS(v),i.autoApplyNS(v),o.find(w).on("click",u(e._closeClick,e)).on("keydown",u(e._closeKeyHandler,e)),i.on("keydown",u(e._keydown,e)))},_dimensions:function(){for(var r,o=this,e=o.wrapper,n=o.options,u=n.width,i=n.height,f=["minWidth","minHeight","maxWidth","maxHeight"],t=0;t<f.length;t++)r=n[f[t]],r&&r!=1/0&&e.css(f[t],r);this._setElementMaxHeight(),u&&e.width((""+u).indexOf("%")>0?u:pt(u,n.minWidth,n.maxWidth)),i&&(e.height((""+i).indexOf("%")>0?i:pt(i,n.minHeight,n.maxHeight)),this._setElementHeight())},_setElementMaxHeight:function(){var u,t,n=this,r=n.element,i=n.options.maxHeight;i!=1/0&&(u=n._paddingBox(r),t=parseFloat(i,10)-n._uiHeight()-u.vertical,t>0&&r.css({maxHeight:st(t)+"px",overflow:"hidden"}))},_paddingBox:function(n){var r=parseFloat(n.css("padding-top"),10),u=parseFloat(n.css("padding-left"),10),t=parseFloat(n.css("padding-bottom"),10),i=parseFloat(n.css("padding-right"),10);return{vertical:r+t,horizontal:u+i}},_setElementHeight:function(){var n=this,u=n.element,i=n.options.height,r=n._paddingBox(u),t=parseFloat(i,10)-n._uiHeight()-r.vertical;t>0&&n.element.css({height:st(t)+"px",overflow:"hidden"})},_uiHeight:function(){var u=this,t=u.wrapper,i=t.children(l),f=i[0]&&i[0].offsetHeight||0,n=t.children(wt),r=n[0]&&n[0].offsetHeight||0;return f+r},_overlay:function(t){var i=this.appendTo.children(ii),u=this.wrapper;return i.length||(i=n(r.overlay)),i.insertBefore(u[0]).toggle(t).css(o,parseInt(u.css(o),10)-1),t?this._waiAriaOverlay():this._removeWaiAriaOverlay(),i},_waiAriaOverlay:function(){var t=this.wrapper;this._overlayedNodes=t.prevAll(ot).add(t.nextAll(ot)).each(function(){var t=n(this);t.data("ariaHidden",t.attr("aria-hidden")),t.attr("aria-hidden","true")})},_removeWaiAriaOverlay:function(){return this._overlayedNodes&&this._overlayedNodes.each(function(){var t=n(this),i=t.data("ariaHidden");i?t.attr("aria-hidden",i):t.removeAttr("aria-hidden")})},_closeClick:function(n){n.preventDefault(),this.close()},_closeKeyHandler:function(n){(bt(n)||n.keyCode==s.ESC)&&this.close()},_keydown:function(n){var t=this,r=t.options,i=n.keyCode;i==s.ESC&&!t._closing&&r.closable&&t.close()},_createDialog:function(){var e=this,f=e.element,t=e.options,h=i.support.isRtl(f),o=n(r.titlebar(t)),c=o.find(".k-window-actions"),s=(f.id||i.guid())+"_title",u=n(e.wrapperTemplate(t));u.toggleClass("k-rtl",h),f.addClass(oi),e.appendTo.append(u),t.closable!==!1&&(t.title!==!1?c.append(r.close(t)):u.append(r.close(t))),t.title!==!1?(u.append(o),o.attr("id",s),u.attr("aria-labelledby",s)):u.addClass(k),u.append(f),t.content&&(i.destroy(f.children()),f.html(t.content)),t.actions.length&&e._createActionbar(u)},_createActionbar:function(t){var u="stretched"===this.options.buttonLayout,f=u?"stretched":"normal",i=n(r.actionbar({buttonLayout:f}));this._addButtons(i),u&&this._normalizeButtonSize(i),t.append(i)},_addButtons:function(t){for(var e,c,h,i=this,a=i.options,y=u(i._actionClick,i),p=u(i._actionKeyHandler,i),s=i.options.actions,o=s.length,l=it/o,f=0;f<o;f++)e=s[f],c=i._mergeTextWithOptions(e),h=n(r.action(e)).autoApplyNS(v).html(c).appendTo(t).data("action",e.action).on("click",y).on("keydown",p),"stretched"===a.buttonLayout&&h.css(nt,l+"%")},_mergeTextWithOptions:function(n){var t=n.text;return t?f(t)(this.options):""},_normalizeButtonSize:function(n){var f=this,u=f.options,t=n.children(c+":last"),i=parseFloat(t[0].style[nt]),r=it-u.actions.length*i;r>0&&t.css(nt,i+r+"%")},_tabindex:function(n){var t,f=this,i=f.wrapper,u=i.find(w),r=i.find(l+" "+c);p.fn._tabindex.call(this,n),t=n.attr("tabindex"),u.attr("tabIndex",t),r.attr("tabIndex",t)},_actionClick:function(n){this._runActionBtn(n.currentTarget)},_actionKeyHandler:function(n){bt(n)?this._runActionBtn(n.currentTarget):n.keyCode==s.ESC&&this.close()},_runActionBtn:function(t){var r,u,i=this;i._closing||(r=n(t).data("action"),u=fi(r)&&r({sender:i})===!1,u||i.close())},open:function(){var t,o,f,n=this,e=n.wrapper,r=this._animationOptions(h),s=n.options;return this._triggerInitOpen(),n.trigger(h)||(n._closing&&e.kendoStop(!0,!0),n._closing=!1,n.toFront(),s.visible=!0,s.modal&&(o=!!n._modals().length,t=n._overlay(o),t.kendoStop(!0,!0),r.duration&&i.effects.Fade&&!o?(f=i.fx(t).fadeIn(),f.duration(r.duration||0),f.endValue(.5),f.play()):t.css("opacity",.5),t.show()),e.show().kendoStop().kendoAnimate({effects:r.effects,duration:r.duration,complete:u(n._openAnimationEnd,n)}),e.show()),n},_animationOptions:function(n){var t=this.options.animation,i={open:{effects:{}},close:{hide:!0,effects:{}}};return t&&t[n]||i[n]},_openAnimationEnd:function(){this.options.modal&&this._focusDialog(),this.trigger(rt)},_triggerInitOpen:function(){b(this._initOpenTriggered)||(this._initOpenTriggered=!0,this.trigger(ft))},toFront:function(){var r=this,i=r.wrapper,t=+i.css(o),u=t;return r.center(),n(ct).each(function(i,r){var f=n(r),u=f.css(o);isNaN(u)||(t=Math.max(+u,t))}),(!i[0].style.zIndex||u<t)&&i.css(o,t+2),r.element.find("> .k-overlay").remove(),i=null,r},close:function(){return this._close(!0),this._stopCenterOnResize(),this},_close:function(n){var t=this,r=t.wrapper,f=t.options,e=this._animationOptions("open"),i=this._animationOptions("close");if(r.is(y)&&!t.trigger(ut,{userTriggered:!n})){if(t._closing)return;t._closing=!0,f.visible=!1,this._removeOverlay(),r.kendoStop().kendoAnimate({effects:i.effects||e.effects,reverse:i.reverse===!0,duration:i.duration,complete:u(this._closeAnimationEnd,this)})}return t},center:function(){this._center(),this._centerOnResize()},_center:function(){var r=this,t=r.wrapper,i=n(window),e=0,o=0,u=o+Math.max(0,(i.width()-t.width())/2),f=e+Math.max(0,(i.height()-t.height()-parseInt(t.css("paddingTop"),10))/2);return t.css({left:u,top:f}),r},_centerOnResize:function(){this._trackResize||(i.onResize(this._centerCallback),this._trackResize=!0)},_stopCenterOnResize:function(){i.unbindResize(this._centerCallback),this._trackResize=!1},_removeOverlay:function(){var n=this._modals(),i=this.options,t=i.modal&&!n.length;t?this._overlay(!1).remove():n.length&&this._object(n.last())._overlay(!0)},_closeAnimationEnd:function(){var t,n=this;n._closing=!1,n.wrapper.hide().css("opacity",""),n.trigger(tt),n.options.modal&&(t=n._object(n._modals().last()),t&&t.toFront())},_modals:function(){var t=this,i=n(ct).filter(function(){var r=n(this),u=t._object(r),i=u&&u.options;return i&&i.modal&&t.options.appendTo==i.appendTo&&i.visible&&r.is(y)}).sort(function(t,i){return+n(t).css("zIndex")-+n(i).css("zIndex")});return t=null,i},_object:function(n){var u=n.children(dt),r=i.widgetInstance(u);return r?r:t},destroy:function(){var t=this;t._destroy(),p.fn.destroy.call(t),t.wrapper.remove(),t.wrapper=t.element=n()},_destroy:function(){var n=this,t="."+v;n.wrapper.off(t),n.element.off(t),n.wrapper.find(w+","+l+" > "+c).off(t),n._stopCenterOnResize()},title:function(t){var e=this,f=e.wrapper,h=e.options,u=f.children(wt),o=u.children(g),s=i.htmlEncode(t);return arguments.length?(t===!1?(u.remove(),f.addClass(k)):(u.length||(u=n(r.titlebar(h)).prependTo(f),o=u.children(g),f.removeClass(k)),o.html(s)),e.options.title=s,e):o.html()},content:function(n,t){var u=this,r=u.wrapper.children(dt);return b(n)?(this.angular("cleanup",function(){return{elements:r.children()}}),i.destroy(r.children()),r.html(n),this.angular("compile",function(){for(var n=[],i=r.length;--i>=0;)n.push({dataItem:t});return{elements:r.children(),data:n}}),u.options.content=n,u):r.html()},_focusDialog:function(){this._defaultFocus&&this._focus(this._defaultFocus),this._tabKeyTrap.trap()},_focus:function(n){n&&n.focus()},events:[ft,h,ut,rt,tt],options:{title:"",buttonLayout:"stretched",actions:[],modal:!0,width:null,height:null,minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,content:null,visible:null,appendTo:et,closable:!0}}),ni=d.extend({options:{name:"Dialog",messages:{close:"Close"}}});i.ui.plugin(ni),e=d.extend({_init:function(n,t){var i=this;i.wrapperTemplate=r.alertWrapper,t._defaultFocus=null,i._ensureContentId(n),d.fn._init.call(i,n,t),i.bind(tt,u(i.destroy,i)),i._ariaDescribedBy(),i._initFocus()},_ensureContentId:function(t){var r=n(t);r.attr("id")||r.attr("id",i.guid()+"_k-popup")},_ariaDescribedBy:function(){this.wrapper.attr("aria-describedby",this.element.attr("id"))},_initFocus:function(){var n=this.options;this._defaultFocus=this._chooseEntryFocus(),this._defaultFocus&&n.visible&&n.modal&&this._focusDialog()},_chooseEntryFocus:function(){return this.wrapper.find(l+" > "+c)[0]},options:{title:window.location.host,closable:!1,messages:gt}}),kt=e.extend({_init:function(n,t){var i=this;e.fn._init.call(i,n,t),i.wrapper.addClass(ri)},options:{name:"Alert",modal:!0,actions:[{text:"#: messages.okText #"}]}}),i.ui.plugin(kt),ht=function(t){return n(r.alert).kendoAlert({content:t}).data("kendoAlert").open()},yt=e.extend({_init:function(t,i){var r=this;e.fn._init.call(r,t,i),r.wrapper.addClass(ui),r.result=n.Deferred()},options:{name:"Confirm",modal:!0,actions:[{text:"#: messages.okText #",primary:!0,action:function(n){n.sender.result.resolve()}},{text:"#: messages.cancel #",action:function(n){n.sender.result.reject()}}]}}),i.ui.plugin(yt),vt=function(t){var i=n(r.confirm).kendoConfirm({content:t}).data("kendoConfirm").open();return i.result},lt=e.extend({_init:function(t,i){var r=this;e.fn._init.call(r,t,i),r.wrapper.addClass(ti),r._createPrompt(),r.result=n.Deferred()},_createPrompt:function(){var t=this.options.value,i=n(r.promptInputContainer(this.options)).insertAfter(this.element);t&&i.children(a).val(t),this._defaultFocus=this._chooseEntryFocus(),this._focusDialog()},_chooseEntryFocus:function(){return this.wrapper.find(a)[0]},options:{name:"Prompt",modal:!0,value:"",actions:[{text:"#: messages.okText #",primary:!0,action:function(n){var t=n.sender,i=t.wrapper.find(a).val();t.result.resolve(i)}},{text:"#: messages.cancel #",action:function(n){var i=n.sender,t=i.wrapper.find(a).val();n.sender.result.reject(t)}}]}}),i.ui.plugin(lt),at=function(t,i){var u=n(r.prompt).kendoPrompt({content:t,value:i}).data("kendoPrompt").open();return u.result},r={wrapper:f("<div class='k-widget k-window k-dialog' role='dialog' />"),action:f("<button type='button' class='k-button# if (data.primary) { # k-primary# } role='button' #'></button>"),titlebar:f("<div class='k-window-titlebar k-dialog-titlebar k-header'><span class='k-window-title k-dialog-title'>#: title #</span><div class='k-window-actions k-dialog-actions' /></div>"),close:f("<a role='button' href='\\#' class='k-button k-bare k-button-icon k-window-action k-dialog-action k-dialog-close' title='#: messages.close #' aria-label='#: messages.close #' tabindex='-1'><span class='k-icon k-i-close'></span></a>"),actionbar:f("<div class='k-button-group k-dialog-buttongroup k-dialog-button-layout-#: buttonLayout #' role='toolbar' />"),overlay:"<div class='k-overlay' />",alertWrapper:f("<div class='k-widget k-window k-dialog' role='alertdialog' />"),alert:"<div />",confirm:"<div />",prompt:"<div />",promptInputContainer:f("<div class='k-prompt-container'><input type='text' class='k-textbox' title='#: messages.promptInput #' aria-label='#: messages.promptInput #' /></div>")},i.alert=ht,i.confirm=vt,i.prompt=at}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.virtuallist.min",["kendo.data.min"],n)}(function(){return function(n,t){function c(n){return n[n.length-1]}function e(n){return n instanceof Array?n:[n]}function o(n){return"string"==typeof n||"number"==typeof n||"boolean"==typeof n}function et(n,t,i){return Math.ceil(n*t/i)}function g(n,t,i){var r=document.createElement(i||"div");return t&&(r.className=t),n.appendChild(r),r}function st(){var r,t=n('<div class="k-popup"><ul class="k-list"><li class="k-item"><li></ul></div>');return t.css({position:"absolute",left:"-200000px",visibility:"hidden"}),t.appendTo(document.body),r=parseFloat(i.getComputedStyles(t.find(".k-item")[0],["line-height"])["line-height"]),t.remove(),r}function ct(n,t,i){return{down:n*i,up:n*(t-1-i)}}function ht(n,t){var r=(n.listScreens-1-n.threshold)*t,i=n.threshold*t;return function(n,t,u){return t>u?t-n.top<r:0===n.top||t-n.top>i}}function it(n,t){return function(i){return t(n.scrollTop,i)}}function tt(n){return function(t,i){return n(t.items,t.index,i),t}}function rt(n,t){i.support.browser.msie&&i.support.browser.version<10?n.style.top=t+"px":(n.style.webkitTransform="translateY("+t+"px)",n.style.transform="translateY("+t+"px)")}function ut(t,r){return function(u,f){for(var e=0,o=u.length;e<o;e++)t(u[e],f[e],r),f[e].item&&this.trigger(w,{item:n(u[e]),data:f[e].item,ns:i.ui})}}function ft(n,t){var i;return t>0?(i=n.splice(0,t),n.push.apply(n,i)):(i=n.splice(t,-t),n.unshift.apply(n,i)),i}function ni(i,f,e){var o=e.template;i=n(i),f.item||(o=e.placeholderTemplate),this.angular("cleanup",function(){return{elements:[i]}}),i.attr("data-uid",f.item?f.item.uid:"").attr("data-offset-index",f.index).html(o(f.item||{})),i.toggleClass(r,f.current),i.toggleClass(u,f.selected),i.toggleClass("k-first",f.newGroup),i.toggleClass("k-loading-item",!f.item),0!==f.index&&f.newGroup&&n("<div class="+kt+"></div>").appendTo(i).html(e.groupTemplate(f.group)),f.top!==t&&rt(i[0],f.top),this.angular("compile",function(){return{elements:[i],data:[{dataItem:f.item,group:f.group,newGroup:f.newGroup}]}})}function yt(n,t){var u,f,i,r,h=t.length,o=n.length,e=[],s=[];if(o)for(i=0;i<o;i++){for(u=n[i],f=!1,r=0;r<h;r++)if(u===t[r]){f=!0,e.push({index:i,item:u});break}f||s.push(u)}return{changed:e,unchanged:s}}function nt(n){return n&&"resolved"!==n.state()}var i=window.kendo,d=i.ui,a=d.Widget,ot=d.DataBoundWidget,pt=n.proxy,vt="k-virtual-wrap",lt="k-virtual-list",at="k-virtual-content",wt="k-list",gt="k-group-header",l="k-virtual-item",dt="k-item",bt="k-height-container",kt="k-group",u="k-state-selected",r="k-state-focused",p="k-state-hover",f="change",h="click",v="listBound",w="itemChange",k="activate",b="deactivate",s=".VirtualList",y=ot.extend({init:function(t,r){var u=this;u.bound(!1),u._fetching=!1,a.fn.init.call(u,t,r),u.options.itemHeight||(u.options.itemHeight=st()),r=u.options,u.element.addClass(wt+" "+lt).attr("role","listbox"),u.content=u.element.wrap("<div unselectable='on' class='"+at+"'></div>").parent(),u.wrapper=u.content.wrap("<div class='"+vt+"'></div>").parent(),u.header=u.content.before("<div class='"+gt+"'></div>").prev(),u.element.on("mouseenter"+s,"li:not(.k-loading-item)",function(){n(this).addClass(p)}).on("mouseleave"+s,"li",function(){n(this).removeClass(p)}),u._values=e(u.options.value),u._selectedDataItems=[],u._selectedIndexes=[],u._rangesList={},u._promisesList=[],u._optionID=i.guid(),u._templates(),u.setDataSource(r.dataSource),u.content.on("scroll"+s,i.throttle(function(){u._renderItems(),u._triggerListBound()},r.delay)),u._selectable()},options:{name:"VirtualList",autoBind:!0,delay:100,height:null,listScreens:4,threshold:.5,itemHeight:null,oppositeBuffer:1,type:"flat",selectable:!1,value:[],dataValueField:null,template:"#:data#",placeholderTemplate:"loading...",groupTemplate:"#:data#",fixedGroupTemplate:"fixed header template",mapValueTo:"index",valueMapper:null},events:[f,h,v,w,k,b],setOptions:function(n){a.fn.setOptions.call(this,n),this._selectProxy&&this.options.selectable===!1?this.element.off(h,"."+l,this._selectProxy):!this._selectProxy&&this.options.selectable&&this._selectable(),this._templates(),this.refresh()},items:function(){return n(this._items)},destroy:function(){this.wrapper.off(s),this.dataSource.unbind(f,this._refreshHandler),a.fn.destroy.call(this)},setDataSource:function(t){var e,r=this,u=t||{};u=n.isArray(u)?{data:u}:u,u=i.data.DataSource.create(u),r.dataSource?(r.dataSource.unbind(f,r._refreshHandler),r._clean(),r.bound(!1),r._deferValueSet=!0,e=r.value(),r.value([]),r.mute(function(){r.value(e)})):r._refreshHandler=n.proxy(r.refresh,r),r.dataSource=u.bind(f,r._refreshHandler),r.setDSFilter(u.filter()),0!==u.view().length?r.refresh():r.options.autoBind&&u.fetch()},skip:function(){return this.dataSource.currentRangeStart()},_triggerListBound:function(){var n=this,t=n.skip();n.bound()&&!n._selectingValue&&n._skip!==t&&(n._skip=t,n.trigger(v))},_getValues:function(t){var i=this._valueGetter;return n.map(t,function(n){return i(n)})},refresh:function(n){var i,t=this,r=n&&n.action,f="itemchange"===r,u=this.isFiltered();t._mute||(t._deferValueSet=!1,t._fetching?(t._renderItems&&t._renderItems(!0),t._triggerListBound()):(u&&t.focus(0),t._createList(),r||!t._values.length||u||t.options.skipUpdateOnBind?(t.bound(!0),t._triggerListBound()):(t._selectingValue=!0,t.value(t._values,!0).done(function(){t.bound(!0),t._selectingValue=!1,t._triggerListBound()}))),(f||"remove"===r)&&(i=yt(t._selectedDataItems,n.items),i.changed.length&&(f?t.trigger("selectedItemChange",{items:i.changed}):t.value(t._getValues(i.unchanged)))),t._fetching=!1)},removeAt:function(n){return this._selectedIndexes.splice(n,1),this._values.splice(n,1),{position:n,dataItem:this._selectedDataItems.splice(n,1)[0]}},setValue:function(n){this._values=e(n)},value:function(i,r){var f,u=this;return i===t?u._values.slice():(null===i&&(i=[]),i=e(i),u._valueDeferred&&"resolved"!==u._valueDeferred.state()||(u._valueDeferred=n.Deferred()),f="multiple"===u.options.selectable&&u.select().length&&i.length,!f&&i.length||u.select(-1),u._values=i,(u.bound()&&!u._mute&&!u._deferValueSet||r)&&u._prefetchByValue(i),u._valueDeferred)},_prefetchByValue:function(n){for(var r,u,i=this,s=i._dataView,l=i._valueGetter,c=i.options.mapValueTo,h=!1,e=[],f=0;f<n.length;f++)for(u=0;u<s.length;u++)r=s[u].item,r&&(h=o(r)?n[f]===r:n[f]===l(r),h&&e.push(s[u].index));return e.length===n.length?(i._values=[],i.select(e),t):("function"==typeof i.options.valueMapper?i.options.valueMapper({value:"multiple"===this.options.selectable?n:n[0],success:function(n){"index"===c?i.mapValueToIndex(n):"dataItem"===c&&i.mapValueToDataItem(n)}}):i.select([-1]),t)},mapValueToIndex:function(n){if(n=n===t||n===-1||null===n?[]:e(n),n.length){var i=this._deselect([]).removed;i.length&&this._triggerChange(i,[])}else n=[-1];this.select(n)},mapValueToDataItem:function(i){var u,f,r;if(i=i===t||null===i?[]:e(i),i.length){for(u=n.map(this._selectedDataItems,function(n,t){return{index:t,dataItem:n}}),f=n.map(i,function(n,t){return{index:t,dataItem:n}}),this._selectedDataItems=i,this._selectedIndexes=[],r=0;r<this._selectedDataItems.length;r++)this._selectedIndexes.push(t);this._triggerChange(u,f),this._valueDeferred&&this._valueDeferred.resolve()}else this.select([-1])},deferredRange:function(t){var h=this.dataSource,i=this.itemCount,e=this._rangesList,o=n.Deferred(),u=[],f=Math.floor(t/i)*i,r=Math.ceil(t/i)*i,s=r===f?[r]:[f,r];return n.each(s,function(t,r){var f,s=r+i,o=e[r];o&&o.end===s?f=o.deferred:(f=n.Deferred(),e[r]={end:s,deferred:f},h._multiplePrefetch(r,i,function(){f.resolve()})),u.push(f)}),n.when.apply(n,u).then(function(){o.resolve()}),o},prefetch:function(t){var i=this,u=this.itemCount,r=!i._promisesList.length;return nt(i._activeDeferred)||(i._activeDeferred=n.Deferred(),i._promisesList=[]),n.each(t,function(n,t){i._promisesList.push(i.deferredRange(i._getSkip(t,u)))}),r&&n.when.apply(n,i._promisesList).done(function(){i._promisesList=[],i._activeDeferred.resolve()}),i._activeDeferred},_findDataItem:function(n,t){var r,i;if("group"===this.options.type)for(i=0;i<n.length;i++){if(r=n[i].items,!(r.length<=t))return r[t];t-=r.length}return n[t]},_getRange:function(n,t){return this.dataSource._findRange(n,Math.min(n+t,this.dataSource.total()))},dataItemByIndex:function(n){var i=this.itemCount,t=this._getSkip(n,i),r=this._getRange(t,i);return this._findDataItem(r,[n-t])},selectedDataItems:function(){return this._selectedDataItems.slice()},scrollWith:function(n){this.content.scrollTop(this.content.scrollTop()+n)},scrollTo:function(n){this.content.scrollTop(n)},scrollToIndex:function(n){this.scrollTo(n*this.options.itemHeight)},focus:function(i){var f,u,a,o,e,s,h=this.options.itemHeight,v=this._optionID,l=!0;if(i===t)return o=this.element.find("."+r),o.length?o:null;if("function"==typeof i)for(a=this.dataSource.flatView(),e=0;e<a.length;e++)if(i(a[e])){i=e;break}return i instanceof Array&&(i=c(i)),isNaN(i)?(f=n(i),u=parseInt(n(f).attr("data-offset-index"),10)):(u=i,f=this._getElementByIndex(u)),u===-1?(this.element.find("."+r).removeClass(r),this._focusedIndex=t,t):(f.length?(f.hasClass(r)&&(l=!1),this._focusedIndex!==t&&(o=this._getElementByIndex(this._focusedIndex),o.removeClass(r).removeAttr("id"),l&&this.trigger(b)),this._focusedIndex=u,f.addClass(r).attr("id",v),s=this._getElementLocation(u),"top"===s?this.scrollTo(u*h):"bottom"===s?this.scrollTo(u*h+h-this._screenHeight):"outScreen"===s&&this.scrollTo(u*h),l&&this.trigger(k)):(this._focusedIndex=u,this.items().removeClass(r),this.scrollToIndex(u)),t)},focusIndex:function(){return this._focusedIndex},focusFirst:function(){this.scrollTo(0),this.focus(0)},focusLast:function(){var n=this.dataSource.total();this.scrollTo(this.heightContainer.offsetHeight),this.focus(n)},focusPrev:function(){var t,n=this._focusedIndex;return!isNaN(n)&&n>0?(n-=1,this.focus(n),t=this.focus(),t&&t.hasClass("k-loading-item")&&(n+=1,this.focus(n)),n):(n=this.dataSource.total()-1,this.focus(n),n)},focusNext:function(){var t,n=this._focusedIndex,i=this.dataSource.total()-1;return!isNaN(n)&&n<i?(n+=1,this.focus(n),t=this.focus(),t&&t.hasClass("k-loading-item")&&(n-=1,this.focus(n)),n):(n=0,this.focus(n),n)},_triggerChange:function(n,t){n=n||[],t=t||[],(n.length||t.length)&&this.trigger(f,{removed:n,added:t})},select:function(i){var u,a,o,s,e,r=this,h="multiple"!==r.options.selectable,l=nt(r._activeDeferred),v=this.isFiltered(),f=[];return i===t?r._selectedIndexes.slice():(r._selectDeferred&&"resolved"!==r._selectDeferred.state()||(r._selectDeferred=n.Deferred()),u=r._getIndecies(i),a=h&&!v&&c(u)===c(this._selectedIndexes),f=r._deselectCurrentValues(u),f.length||!u.length||a?(r._triggerChange(f),r._valueDeferred&&r._valueDeferred.resolve(),r._selectDeferred.resolve().promise()):(1===u.length&&u[0]===-1&&(u=[]),s=r._deselect(u),f=s.removed,u=s.indices,h&&(l=!1,u.length&&(u=[c(u)])),e=function(){var n=r._select(u);r.focus(u),r._triggerChange(f,n),r._valueDeferred&&r._valueDeferred.resolve(),r._selectDeferred.resolve()},o=r.prefetch(u),l||(o?o.done(e):e()),r._selectDeferred.promise()))},bound:function(n){return n===t?this._listCreated:(this._listCreated=n,t)},mute:function(n){this._mute=!0,pt(n(),this),this._mute=!1},setDSFilter:function(t){this._lastDSFilter=n.extend({},t)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!i.data.Query.compareFilters(this.dataSource.filter(),this._lastDSFilter)},skipUpdate:n.noop,_getElementByIndex:function(t){return this.items().filter(function(i,r){return t===parseInt(n(r).attr("data-offset-index"),10)})},_getElementByDataItem:function(t){for(var u,e,r=this._dataView,f=this._valueGetter,i=0;i<r.length;i++)if(e=r[i].item&&o(r[i].item)?r[i].item===t:f(r[i].item)===f(t)){u=r[i];break}return u?this._getElementByIndex(u.index):n()},_clean:function(){this.result=t,this._lastScrollTop=t,this._skip=t,n(this.heightContainer).remove(),this.heightContainer=t,this.element.empty()},_height:function(){var r=!!this.dataSource.view().length,n=this.options.height,t=this.options.itemHeight,i=this.dataSource.total();return r?n/t>i&&(n=i*t):n=0,n},setScreenHeight:function(){var n=this._height();this.content.height(n),this._screenHeight=n},screenHeight:function(){return this._screenHeight},_getElementLocation:function(n){var o,i=this.content.scrollTop(),e=this._screenHeight,r=this.options.itemHeight,t=n*r,f=t+r,u=i+e;return o=t===i-r||f>i&&t<i?"top":t===u||t<u&&u<f?"bottom":t>=i&&t<=i+(e-r)?"inScreen":"outScreen"},_templates:function(){var t,r=this.options,n={template:r.template,placeholderTemplate:r.placeholderTemplate,groupTemplate:r.groupTemplate,fixedGroupTemplate:r.fixedGroupTemplate};for(t in n)"function"!=typeof n[t]&&(n[t]=i.template(n[t]||""));this.templates=n},_generateItems:function(n,t){for(var i,u=[],r=this.options.itemHeight+"px";t-->0;)i=document.createElement("li"),i.tabIndex=-1,i.className=l+" "+dt,i.setAttribute("role","option"),i.style.height=r,i.style.minHeight=r,n.appendChild(i),u.push(i);return u},_saveInitialRanges:function(){var t,i=this.dataSource._ranges,r=n.Deferred();for(r.resolve(),this._rangesList={},t=0;t<i.length;t++)this._rangesList[i[t].start]={end:i[t].end,deferred:r}},_createList:function(){var t=this,u=t.content.get(0),r=t.options,i=t.dataSource;t.bound()&&t._clean(),t._saveInitialRanges(),t._buildValueGetter(),t.setScreenHeight(),t.itemCount=et(t._screenHeight,r.listScreens,r.itemHeight),t.itemCount>i.total()&&(t.itemCount=i.total()),t._items=t._generateItems(t.element[0],t.itemCount),t._setHeight(r.itemHeight*i.total()),t.options.type=(i.group()||[]).length?"group":"flat","flat"===t.options.type?t.header.hide():t.header.show(),t.getter=t._getter(function(){t._renderItems(!0)}),t._onScroll=function(n,i){var r=t._listItems(t.getter);return t._fixedHeader(n,r(n,i))},t._renderItems=t._whenChanged(it(u,t._onScroll),tt(t._reorderList(t._items,n.proxy(ni,t)))),t._renderItems(),t._calculateGroupPadding(t._screenHeight)},_setHeight:function(n){var r,i,t=this.heightContainer;if(t?r=t.offsetHeight:t=this.heightContainer=g(this.content[0],bt),n!==r)for(t.innerHTML="";n>0;)i=Math.min(n,25e4),g(t).style.height=i+"px",n-=i},_getter:function(){var u=null,n=this.dataSource,r=n.skip(),f=this.options.type,t=this.itemCount,i={};return n.pageSize()<t&&this.mute(function(){n.pageSize(t)}),function(e,o){var a,y,v,l,w,c,h,p,s=this;if(n.inRange(o,t)){if(r!==o&&this.mute(function(){n.range(o,t),r=o}),"group"===f){if(!i[o])for(y=i[o]=[],v=n.view(),l=0,w=v.length;l<w;l++)for(c=v[l],h=0,p=c.items.length;h<p;h++)y.push({item:c.items[h],group:c.value});a=i[o][e-o]}else a=n.view()[e-o];return a}return u!==o&&(u=o,r=o,s._getterDeferred&&s._getterDeferred.reject(),s._getterDeferred=s.deferredRange(o),s._getterDeferred.then(function(){var i=s._indexConstraint(s.content[0].scrollTop);s._getterDeferred=null,o<=i&&i<=o+t&&(s._fetching=!0,n.range(o,t))})),null}},_fixedHeader:function(n,t){var i,u=this.currentVisibleGroup,e=this.options.itemHeight,f=Math.floor((n-t.top)/e),r=t.items[f];return r&&r.item&&(i=r.group,i!==u&&(this.header[0].innerHTML=i||"",this.currentVisibleGroup=i)),t},_itemMapper:function(n,t,i){var r,l=this.options.type,a=this.options.itemHeight,v=this._focusedIndex,u=!1,f=!1,s=!1,e=null,c=!1,h=this._valueGetter;if("group"===l&&(n&&(s=0===t||this._currentGroup&&this._currentGroup!==n.group,this._currentGroup=n.group),e=n?n.group:null,n=n?n.item:null),!this.isFiltered()&&i.length&&n)for(r=0;r<i.length;r++)if(c=o(n)?i[r]===n:i[r]===h(n)){i.splice(r,1),u=!0;break}return v===t&&(f=!0),{item:n?n:null,group:e,newGroup:s,selected:u,current:f,index:t,top:t*a}},_range:function(n){var i,t,u,f=this.itemCount,e=this._values.slice(),r=[];for(this._view={},this._currentGroup=null,t=n,u=n+f;t<u;t++)i=this._itemMapper(this.getter(t,n),t,e),r.push(i),this._view[i.index]=i;return this._dataView=r,r},_getDataItemsCollection:function(n,t){var i=this._range(this._listIndex(n,t));return{index:i.length?i[0].index:0,top:i.length?i[0].top:0,items:i}},_listItems:function(){var r=this._screenHeight,i=this.options,t=ht(i,r);return n.proxy(function(n,i){var r=this.result,u=this._lastScrollTop;return!i&&r&&t(r,n,u)||(r=this._getDataItemsCollection(n,u)),this._lastScrollTop=n,this.result=r,r},this)},_whenChanged:function(n,t){var i;return function(r){var u=n(r);u!==i&&(i=u,t(u,r))}},_reorderList:function(t,i){var u=this,f=t.length,r=-(1/0);return i=n.proxy(ut(i,this.templates),this),function(n,e,o){var h,c,s=e-r;o||Math.abs(s)>=f?(h=t,c=n):(h=ft(t,s),c=s>0?n.slice(-s):n.slice(0,-s)),i(h,c,u.bound()),r=e}},_bufferSizes:function(){var n=this.options;return ct(this._screenHeight,n.listScreens,n.oppositeBuffer)},_indexConstraint:function(n){var r=this.itemCount,i=this.options.itemHeight,t=this.dataSource.total();return Math.min(Math.max(t-r,0),Math.max(0,Math.floor(n/i)))},_listIndex:function(n,t){var r,i=this._bufferSizes();return r=n-(n>t?i.down:i.up),this._indexConstraint(r)},_selectable:function(){this.options.selectable&&(this._selectProxy=n.proxy(this,"_clickHandler"),this.element.on(h+s,"."+l,this._selectProxy))},getElementIndex:function(n){return n instanceof jQuery?parseInt(n.attr("data-offset-index"),10):t},_getIndecies:function(n){var r,i,u,t=[];if("function"==typeof n)for(r=this.dataSource.flatView(),i=0;i<r.length;i++)if(n(r[i])){t.push(i);break}return"number"==typeof n&&t.push(n),u=this.getElementIndex(n),isNaN(u)||t.push(u),n instanceof Array&&(t=n),t},_deselect:function(i){var v,c,y,b,r,f,h,w=[],e=this._selectedIndexes,s=this._selectedDataItems,a=0,d=this.options.selectable,p=0,k=this._valueGetter,l=null;if(i=i.slice(),d!==!0&&i.length){if("multiple"===d)for(f=0;f<i.length;f++){if(l=null,a=n.inArray(i[f],e),c=this.dataItemByIndex(i[f]),a===-1&&c)for(h=0;h<s.length;h++)b=o(c)?s[h]===c:k(s[h])===k(c),b&&(y=this._getElementByIndex(i[f]),l=this._deselectSingleItem(y,h,i[f],p));else v=e[a],v!==t&&(y=this._getElementByIndex(v),l=this._deselectSingleItem(y,a,v,p));l&&(i.splice(f,1),w.push(l),p++,f--)}}else{for(r=0;r<e.length;r++)e[r]!==t?this._getElementByIndex(e[r]).removeClass(u):s[r]&&this._getElementByDataItem(s[r]).removeClass(u),w.push({index:e[r],position:r,dataItem:s[r]});this._values=[],this._selectedDataItems=[],this._selectedIndexes=[]}return{indices:i,removed:w}},_deselectSingleItem:function(n,t,i,r){var f;if(n.hasClass("k-state-selected"))return n.removeClass(u),this._values.splice(t,1),this._selectedIndexes.splice(t,1),f=this._selectedDataItems.splice(t,1)[0],{index:i,position:t+r,dataItem:f}},_deselectCurrentValues:function(t){var s,e,r,i,o=this.element[0].children,h=this._values,u=[],f=0;if("multiple"!==this.options.selectable||!this.isFiltered())return[];if(t[0]===-1)return n(o).removeClass("k-state-selected"),u=n.map(this._selectedDataItems.slice(0),function(n,t){return{dataItem:n,position:t}}),this._selectedIndexes=[],this._selectedDataItems=[],this._values=[],u;for(;f<t.length;f++){for(r=-1,e=t[f],s=this._valueGetter(this.dataItemByIndex(e)),i=0;i<h.length;i++)if(s==h[i]){r=i;break}r>-1&&(u.push(this.removeAt(r)),n(o[e]).removeClass("k-state-selected"))}return u},_getSkip:function(n,t){var i=n<t?1:Math.floor(n/t)+1;return(i-1)*t},_select:function(t){var r,s,i=this,c="multiple"!==this.options.selectable,f=this.dataSource,e=this.itemCount,l=this._valueGetter,h=[];return c&&(i._selectedIndexes=[],i._selectedDataItems=[],i._values=[]),s=f.skip(),n.each(t,function(n,t){var c=i._getSkip(t,e);i.mute(function(){f.range(c,e),r=i._findDataItem(f.view(),[t-c]),i._selectedIndexes.push(t),i._selectedDataItems.push(r),i._values.push(o(r)?r:l(r)),h.push({index:t,dataItem:r}),i._getElementByIndex(t).addClass(u),f.range(s,e)})}),h},_clickHandler:function(t){var i=n(t.currentTarget);!t.isDefaultPrevented()&&i.attr("data-uid")&&this.trigger(h,{item:i})},_buildValueGetter:function(){this._valueGetter=i.getter(this.options.dataValueField)},_calculateGroupPadding:function(n){var u=this.items().first(),t=this.header,r=0;t[0]&&"none"!==t[0].style.display&&("auto"!==n&&(r=i.support.scrollbar()),r+=parseFloat(u.css("border-right-width"),10)+parseFloat(u.children(".k-group").css("right"),10),t.css("padding-right",r))}});i.ui.VirtualList=y,i.ui.plugin(y)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.scheduler.view.min",["kendo.core.min"],n)}(function(){return kendo.ui.scheduler={},function(n){function y(n,t){function r(n,u){var e,f;if(u=u[t])for(e=i[n]=i[n]||[],f=0;f<u.length;f++)e.push(u[f]),r(n+1,u[f])}var i=[];return r(0,n),i}function h(){return t.support.cssBorderSpacing?"":'cellspacing="0"'}function e(t,i){return t.length?"<table "+h()+' class="'+n.trim("k-scheduler-table "+(i||""))+'"><tr>'+t.join("</tr><tr>")+"</tr></table>":""}function ht(n,t){return n.length?"<div style='position:relative'>"+e(n,t)+"</div>":""}function ct(t,i,r){var f,u=[];if(r>0)for(f=0;f<t;f++)u.push("<th>&#8203;</th>");return i&&u.push('<th class="k-scheduler-times-all-day">'+i.text+"</th>"),r<1?n():n('<div class="k-scheduler-times">'+e(u)+"</div>")}function lt(t,i,r){for(var u,o,a,p,f,v,h,l,c,y=[],s=0;s<t.length;s++){for(o=t[s],a=[],p=i/o.length,u=0;u<o.length;u++)f=o[u],a.push('<th colspan="'+(f.colspan||p)+'" class="'+(f.className||"")+'">'+f.text+"</th>");y.push(a.join(""))}if(v=[],r){for(h=t[t.length-1],l=[],c=r.cellContent,u=0;u<h.length;u++)l.push('<td class="'+(h[u].className||"")+'">'+(c?c(u):"&nbsp;")+"</td>");v.push(l.join(""))}return n('<div class="k-scheduler-header k-state-default"><div class="k-scheduler-header-wrap">'+e(y)+ht(v,"k-scheduler-header-all-day")+"</div></div>")}function et(t,i){for(var r,u,s,o,c=Array(i).join().split(","),h=[],f=0;f<t.length;f++)for(u=t[f],s=i/u.length,r=0;r<u.length;r++)o=u[r].className||"",u[r].allDay&&(o="k-scheduler-times-all-day"),c[s*r]+='<th class="'+o+'" rowspan="'+s+'">'+u[r].text+"</th>";for(r=0;r<i;r++)h.push(c[r]);return i<1?n():n('<div class="k-scheduler-times">'+e(h)+"</div>")}function ot(){return n('<div class="k-scheduler-content"><table '+h()+' class="k-scheduler-table"/></div>')}function st(){return c=c?c:t.support.scrollbar()}function pt(n,t,i){for(var e,r,s,u,f=n.length-1;f>=0;f--)e=o(n[f]),r=e.start,u=e.end,s=r<=t&&u>=t,(s||r>=t&&u<=i||t<=r&&i>=r)&&(r<t&&(t=r),u>i&&(i=u));return wt(n,t,i)}function o(n){return{start:n.start,end:n.end}}function wt(n,t,i){for(var r,f=[],u=0;u<n.length;u++)r=o(n[u]),(r.start<t&&r.end>t||r.start>=t&&r.end<=i)&&f.push(n[u]);return f}function bt(n){return b(n)}function at(n){return b(n)}function b(n){for(var e,i,t,u,s,h,r=[],f=0;f<n.length;f++){for(e=n[f],i=o(e),t=null,u=0,s=r.length;u<s;u++)if(h=i.start>r[u].end,i.start<r[u].start||h){t=r[u],t.end<i.end&&(t.end=i.end);break}t||(t={start:i.start,end:i.end,events:[]},r.push(t)),t.events.push(e)}return r}function a(t,i,r,u){var f=[];return n.each(i,function(n,i){var o=i.className?"k-slot-cell "+i.className:"k-slot-cell",e={text:i.text,className:o};e[t]=u&&!i.minorTicks?a(t,i.columns,r,u):r,f.push(e)}),f}function f(i,r,u,e,o,s){var l,c,v,h=r[0],a=[];if(h){if(o&&u)n.each(o,function(n,t){t[i]=s&&!t.minorTicks?f(i,r,t.columns,e,t.columns,s):f(i,r,null,e)}),a=o;else for(l=h.dataSource.view(),c=0;c<l.length;c++)v={text:e({text:t.htmlEncode(t.getter(h.dataTextField)(l[c])),color:t.getter(h.dataColorField)(l[c]),field:h.field,title:h.title,name:h.name,value:t.getter(h.dataValueField)(l[c])}),className:"k-slot-cell"},v[i]=f(i,r.slice(1),u,e),a.push(v);return a}return u}function vt(i){return function(r){if(n.isArray(r)||r instanceof t.data.ObservableArray){for(var u=0;u<r.length;u++)if(r[u]==i)return!0;return!1}return r==i}}function yt(n){n.className=n.className.replace(p,"")+" k-state-selected"}var c,i,p,t=window.kendo,v=t.ui,l=v.Widget,u=t._outerHeight,r=t.keys,tt=".kendoSchedulerView",rt=Math,g='<div class="k-marquee k-scheduler-marquee"><div class="k-marquee-color"></div><div class="k-marquee-text"><div class="k-label-top"></div><div class="k-label-bottom"></div></div></div>',ut=t.Class.extend({init:function(n,t){this._index=n,this._timeSlotCollections=[],this._daySlotCollections=[],this._isRtl=t},addTimeSlotCollection:function(n,t){return this._addCollection(n,t,this._timeSlotCollections)},addDaySlotCollection:function(n,t){return this._addCollection(n,t,this._daySlotCollections)},_addCollection:function(n,t,i){var r=new d(n,t,this._index,i.length);return i.push(r),r},timeSlotCollectionCount:function(){return this._timeSlotCollections.length},daySlotCollectionCount:function(){return this._daySlotCollections.length},daySlotByPosition:function(n,t,i){return this._slotByPosition(n,t,this._daySlotCollections,i)},timeSlotByPosition:function(n,t,i){return this._slotByPosition(n,t,this._timeSlotCollections,i)},_slotByPosition:function(n,t,i,r){for(var s,e,u,a,l,f,h,c,o=0;o<i.length;o++)for(s=i[o],e=0;e<s.count();e++)if(u=s.at(e),a=u.offsetWidth,l=u.offsetHeight,h=u.offsetLeft+a,c=u.offsetTop+l,r||(f=s.at(e+1)),f&&(f.offsetLeft!=u.offsetLeft?h=this._isRtl?u.offsetLeft+(u.offsetLeft-f.offsetLeft):f.offsetLeft:c=f.offsetTop),n>=u.offsetLeft&&n<h&&t>=u.offsetTop&&t<c)return u},refresh:function(){for(var n=0;n<this._daySlotCollections.length;n++)this._daySlotCollections[n].refresh();for(n=0;n<this._timeSlotCollections.length;n++)this._timeSlotCollections[n].refresh()},timeSlotRanges:function(n,t){var i,u=this._timeSlotCollections,r=this._startSlot(n,u);return!r.inRange&&n>=r.slot.end&&(r=null),i=r,n<t&&(i=this._endSlot(t,u)),i&&!i.inRange&&t<=i.slot.start&&(i=null),null===r&&null===i?[]:(null===r&&(r={inRange:!0,slot:u[i.slot.collectionIndex].first()}),null===i&&(i={inRange:!0,slot:u[r.slot.collectionIndex].last()}),this._continuousRange(k,u,r,i))},daySlotRanges:function(n,i,r){var u,e=this._daySlotCollections,f=this._startSlot(n,e,r);if(!f.inRange&&n>=f.slot.end&&(f=null),u=f,n<i&&(u=this._endSlot(i,e,r)),u&&!u.inRange&&i<=u.slot.start&&(u=null),null===f&&null===u)return[];if(null===f)do n+=t.date.MS_PER_DAY,f=this._startSlot(n,e,r);while(!f.inRange&&n>=f.slot.end);if(null===u)do i-=t.date.MS_PER_DAY,u=this._endSlot(i,e,r);while(!u.inRange&&i<=u.slot.start);return this._continuousRange(nt,e,f,u)},_continuousRange:function(n,t,i,r){for(var c,h,l,e,f,a=i.slot,v=r.slot,s=a.collectionIndex,o=v.collectionIndex,y=[],u=s;u<=o;u++)c=t[u],h=c.first(),l=c.last(),e=!1,f=!1,u==s&&(f=!i.inRange),u==o&&(e=!r.inRange),h.start<a.start&&(h=a),l.start>v.start&&(l=v),s<o&&(u==s?e=!0:u==o?f=!0:e=f=!0),y.push(new n({start:h,end:l,collection:c,head:e,tail:f}));return y},slotRanges:function(n,i){var u=n._startTime||t.date.toUtcTime(n.start),r=n._endTime||t.date.toUtcTime(n.end);return void 0===i&&(i=n.isMultiDay()),i?this.daySlotRanges(u,r,n.isAllDay):this.timeSlotRanges(u,r)},ranges:function(n,i,r,u){return"number"!=typeof n&&(n=t.date.toUtcTime(n)),"number"!=typeof i&&(i=t.date.toUtcTime(i)),r?this.daySlotRanges(n,i,u):this.timeSlotRanges(n,i)},_startCollection:function(n,t){for(var r,i=0;i<t.length;i++)if(r=t[i],r.startInRange(n))return r;return null},_endCollection:function(n,t,i){for(var u,r=0;r<t.length;r++)if(u=t[r],u.endInRange(n,i))return u;return null},_getCollections:function(n){return n?this._daySlotCollections:this._timeSlotCollections},continuousSlot:function(n,t){var r=t?-1:1,u=this._getCollections(n.isDaySlot),i=u[n.collectionIndex+r];if(i)return i[t?"last":"first"]()},firstSlot:function(){var n=this._getCollections(this.daySlotCollectionCount());return n[0].first()},lastSlot:function(){var n=this._getCollections(this.daySlotCollectionCount());return n[n.length-1].last()},upSlot:function(n,t,i){var r=this,u=function(n,i,u){var f=0===u;if(!t&&!n&&f&&r.daySlotCollectionCount())return r._daySlotCollections[0].at(i)};return this.timeSlotCollectionCount()||(t=!0),this._verticalSlot(n,-1,u,i)},downSlot:function(n,t,i){var r=this,u=function(n,i,u){if(!t&&n&&r.timeSlotCollectionCount())return r._timeSlotCollections[u].at(0)};return this.timeSlotCollectionCount()||(t=!0),this._verticalSlot(n,1,u,i)},leftSlot:function(n,t){return this._horizontalSlot(n,-1,t)},rightSlot:function(n,t){return this._horizontalSlot(n,1,t)},_horizontalSlot:function(n,t,i){var u,e=n.index,r=n.isDaySlot,f=n.collectionIndex,o=this._getCollections(r);return r=!i&&r,r?e+=t:f+=t,u=o[f],u?u.at(e):void 0},_verticalSlot:function(n,t,i,r){var e,o=n.index,u=n.isDaySlot,f=n.collectionIndex,s=this._getCollections(u);return(n=i(u,f,o))?n:(u=!r&&u,u?f+=t:o+=t,e=s[f],e?e.at(o):void 0)},_collection:function(n,t){var i=t?this._daySlotCollections:this._timeSlotCollections;return i[n]},_startSlot:function(n,t,i){var u,r=this._startCollection(n,t),f=!0;return r||(r=t[0],f=!1),u=r.slotByStartDate(n,i),u||(u=r.first(),f=!1),{slot:u,inRange:f}},_endSlot:function(n,t,i){var u,r=this._endCollection(n,t,i),f=!0;return r||(r=t[t.length-1],f=!1),u=r.slotByEndDate(n,i),u||(u=r.last(),f=!1),{slot:u,inRange:f}},getSlotCollection:function(n,t){return this[t?"getDaySlotCollection":"getTimeSlotCollection"](n)},getTimeSlotCollection:function(n){return this._timeSlotCollections[n]},getDaySlotCollection:function(n){return this._daySlotCollections[n]}}),w=t.Class.extend({init:function(t){n.extend(this,t)},innerHeight:function(){for(var u=this.collection,i=this.start.index,r=this.end.index,t=0,n=i;n<=r;n++)t+=u.at(n).offsetHeight;return t},events:function(){return this.collection.events()},addEvent:function(n){this.events().push(n)},startSlot:function(){return this.start.offsetLeft>this.end.offsetLeft?this.end:this.start},endSlot:function(){return this.start.offsetLeft>this.end.offsetLeft?this.start:this.end}}),k=w.extend({innerHeight:function(){for(var u=this.collection,i=this.start.index,r=this.end.index,t=0,n=i;n<=r;n++)t+=u.at(n).offsetHeight;return t},outerRect:function(n,t,i){return this._rect("offset",n,t,i)},_rect:function(n,i,r,u){var v,y,o,c,s,a,h,l,e=this.start,f=this.end,p=t.support.isRtl(e.element);return"number"!=typeof i&&(i=t.date.toUtcTime(i)),"number"!=typeof r&&(r=t.date.toUtcTime(r)),u?(v=e.offsetTop,y=f.offsetTop+f[n+"Height"],p?(o=f.offsetLeft,c=e.offsetLeft+e[n+"Width"]):(o=e.offsetLeft,c=f.offsetLeft+f[n+"Width"])):(s=i-e.start,s<0&&(s=0),a=e.end-e.start,v=e.offsetTop+e[n+"Height"]*s/a,h=f.end-r,h<0&&(h=0),l=f.end-f.start,y=f.offsetTop+f[n+"Height"]-f[n+"Height"]*h/l,p?(o=Math.round(f.offsetLeft+f[n+"Width"]*h/l),c=Math.round(e.offsetLeft+e[n+"Width"]-e[n+"Width"]*s/a)):(o=Math.round(e.offsetLeft+e[n+"Width"]*s/a),c=Math.round(f.offsetLeft+f[n+"Width"]-f[n+"Width"]*h/l))),{top:v,bottom:y,left:0===o?o:o+1,right:c}},innerRect:function(n,t,i){return this._rect("client",n,t,i)}}),nt=w.extend({innerWidth:function(){for(var f=this.collection,r=this.start.index,t=this.end.index,i=0,u=r!==t?"offsetWidth":"clientWidth",n=r;n<=t;n++)i+=f.at(n)[u];return i}}),d=t.Class.extend({init:function(n,i,r,u){this._slots=[],this._events=[],this._start=t.date.toUtcTime(n),this._end=t.date.toUtcTime(i),this._groupIndex=r,this._collectionIndex=u},refresh:function(){for(var n=0;n<this._slots.length;n++)this._slots[n].refresh()},startInRange:function(n){return this._start<=n&&n<this._end},endInRange:function(n,t){var i=t?n<this._end:n<=this._end;return this._start<=n&&i},slotByStartDate:function(n){var i,u,r=n;for("number"!=typeof r&&(r=t.date.toUtcTime(n)),i=0;i<this._slots.length;i++)if(u=this._slots[i],u.startInRange(r))return u;return null},slotByEndDate:function(n,i){var r,f,u=n;if("number"!=typeof u&&(u=t.date.toUtcTime(n)),i)return this.slotByStartDate(n,!1);for(r=0;r<this._slots.length;r++)if(f=this._slots[r],f.endInRange(u))return f;return null},count:function(){return this._slots.length},events:function(){return this._events},addTimeSlot:function(n,t,i,r){var u=new ft(n,t,i,this._groupIndex,this._collectionIndex,this._slots.length,r);this._slots.push(u)},addDaySlot:function(n,t,i,r){var u=new it(n,t,i,this._groupIndex,this._collectionIndex,this._slots.length,r);this._slots.push(u)},first:function(){return this._slots[0]},last:function(){return this._slots[this._slots.length-1]},at:function(n){return this._slots[n]}}),s=t.Class.extend({init:function(n,t,i,r,u,f){this.element=n,this.clientWidth=n.clientWidth,this.clientHeight=n.clientHeight,this.offsetWidth=n.offsetWidth,this.offsetHeight=n.offsetHeight,this.offsetTop=n.offsetTop,this.offsetLeft=n.offsetLeft,this.start=t,this.end=i,this.element=n,this.groupIndex=r,this.collectionIndex=u,this.index=f,this.isDaySlot=!1},refresh:function(){var n=this.element;this.clientWidth=n.clientWidth,this.clientHeight=n.clientHeight,this.offsetWidth=n.offsetWidth,this.offsetHeight=n.offsetHeight,this.offsetTop=n.offsetTop,this.offsetLeft=n.offsetLeft},startDate:function(){return t.timezone.toLocalDate(this.start)},endDate:function(){return t.timezone.toLocalDate(this.end)},startInRange:function(n){return this.start<=n&&n<this.end},endInRange:function(n){return this.start<n&&n<=this.end},startOffset:function(){return this.start},endOffset:function(){return this.end}}),ft=s.extend({init:function(n,t,i,r,u,f,e){s.fn.init.apply(this,arguments),this.isHorizontal=!!e},offsetX:function(n,t){return n?this.offsetLeft+t:this.offsetLeft+t},startInRange:function(n){return this.start<=n&&n<this.end},endInRange:function(n){return this.start<n&&n<=this.end},startOffset:function(i,r,u){var s,e,f,o,h;if(u)return this.start;if(s=n(this.element).offset(),e=this.end-this.start,this.isHorizontal){if(h=t.support.isRtl(this.element),f=i-s.left,o=Math.floor(e*(f/this.offsetWidth)),h)return this.start+e-o}else f=r-s.top,o=Math.floor(e*(f/this.offsetHeight));return this.start+o},endOffset:function(i,r,u){var s,e,f,o,h;if(u)return this.end;if(s=n(this.element).offset(),e=this.end-this.start,this.isHorizontal){if(h=t.support.isRtl(this.element),f=i-s.left,o=Math.floor(e*(f/this.offsetWidth)),h)return this.start+e-o}else f=r-s.top,o=Math.floor(e*(f/this.offsetHeight));return this.start+o}}),it=s.extend({init:function(n,t,i,r,u,f,e){s.fn.init.apply(this,arguments),this.eventCount=e,this.isDaySlot=!0,this.element.children.length?(this.firstChildHeight=this.element.children[0].offsetHeight+3,this.firstChildTop=this.element.children[0].offsetTop):(this.firstChildHeight=3,this.firstChildTop=0)},startDate:function(){var n=new Date(this.start);return t.timezone.apply(n,"Etc/UTC")},endDate:function(){var n=new Date(this.end);return t.timezone.apply(n,"Etc/UTC")},startInRange:function(n){return this.start<=n&&n<this.end},endInRange:function(n){return this.start<n&&n<=this.end}});t.ui.SchedulerView=l.extend({init:function(i,r){l.fn.init.call(this,i,r),this._normalizeOptions(),this._scrollbar=st(),this._isRtl=t.support.isRtl(i),this._resizeHint=n(),this._moveHint=n(),this._cellId=t.guid(),this._resourcesForGroups(),this._selectedSlots=[]},_normalizeOptions:function(){var n=this.options;n.startTime&&n.startTime.setMilliseconds(0),n.endTime&&n.endTime.setMilliseconds(0),n.workDayStart&&n.workDayStart.setMilliseconds(0),n.workDayEnd&&n.workDayEnd.setMilliseconds(0)},_isMobile:function(){var n=this.options;return n.mobile===!0&&t.support.mobileOS||"phone"===n.mobile||"tablet"===n.mobile},_isMobilePhoneView:function(){var n=this.options;return n.mobile===!0&&t.support.mobileOS&&!t.support.mobileOS.tablet||"phone"===n.mobile},_addResourceView:function(){var n=new ut(this.groups.length,this._isRtl);return this.groups.push(n),n},dateForTitle:function(){return t.format(this.options.selectedDateFormat,this.startDate(),this.endDate())},shortDateForTitle:function(){return t.format(this.options.selectedShortDateFormat,this.startDate(),this.endDate())},_changeGroup:function(n,t){var r=t?"prevGroupSlot":"nextGroupSlot",i=this[r](n.start,n.groupIndex,n.isAllDay);return i&&(n.groupIndex+=t?-1:1),this._isGroupedByDate()&&!i&&(n.groupIndex=t?this.groups.length-1:0),i},_changeDate:function(n,t,i){var u,r,e,f=this.groups[n.groupIndex];if(i){if(u=f._getCollections(!1),r=f.daySlotCollectionCount()?t.index-1:t.collectionIndex-1,r>=0)return u[r]._slots[u[r]._slots.length-1]}else if(u=f._getCollections(f.daySlotCollectionCount()),r=f.daySlotCollectionCount()?0:t.collectionIndex+1,e=f.daySlotCollectionCount()?t.collectionIndex+1:0,u[r]&&u[r]._slots[e])return u[r]._slots[e]},_changeGroupContinuously:function(){return null},_changeViewPeriod:function(){return!1},_horizontalSlots:function(n,t,i,r){var s,h,f,o=r?"leftSlot":"rightSlot",u={startSlot:t[0].start,endSlot:t[t.length-1].end},e=this.groups[n.groupIndex],c=this._isVerticallyGrouped();return i||(s=this._normalizeHorizontalSelection(n,t,r),s&&(u.startSlot=u.endSlot=s)),this._isGroupedByDate()&&!i?(h=this._changeGroup(n,r),h?u.startSlot=u.endSlot=h:u=this._getNextHorizontalRange(e,o,u)):(u.startSlot=e[o](u.startSlot),u.endSlot=e[o](u.endSlot),i||c||u.startSlot&&u.endSlot||(u.startSlot=u.endSlot=this._changeGroup(n,r))),u.startSlot&&u.endSlot||this._isGroupedByDate()||(f=this._continuousSlot(n,t,r),f=this._changeGroupContinuously(n,f,i,r),f&&(u.startSlot=u.endSlot=f)),u},_getNextHorizontalRange:function(n,t,i){return this._isVerticallyGrouped()||(i.startSlot=n[t](i.startSlot),i.endSlot=n[t](i.endSlot)),i},_verticalSlots:function(n,t,i,r){var f,e,o=this.groups[n.groupIndex],u={startSlot:t[0].start,endSlot:t[t.length-1].end};return i||(f=this._normalizeVerticalSelection(n,t,r),f&&(u.startSlot=u.endSlot=f)),e=r?"upSlot":"downSlot",u=this._getNextVerticalRange(o,e,u,i),i||!this._isVerticallyGrouped()||u.startSlot&&u.endSlot||(u.startSlot=u.endSlot=this._isGroupedByDate()?this._changeDate(n,f,r):this._changeGroup(n,r)),u},_getNextVerticalRange:function(n,t,i,r){return i.startSlot=n[t](i.startSlot,r),i.endSlot=n[t](i.endSlot,r),i},_normalizeHorizontalSelection:function(){return null},_normalizeVerticalSelection:function(n,t,i){var r;return r=i?t[0].start:t[t.length-1].end},_continuousSlot:function(){return null},constrainSelection:function(n){var t,i=this.groups[0];this.inRange(n)?i.daySlotCollectionCount()?i.timeSlotCollectionCount()||(n.isAllDay=!0):n.isAllDay=!1:(t=i.firstSlot(),n.isAllDay=t.isDaySlot,n.start=t.startDate(),n.end=t.endDate()),this.groups[n.groupIndex]||(n.groupIndex=0)},move:function(n,t,i){var s,o,h,u,e,c,f=!1,a=this.groups[n.groupIndex],l=this._isGroupedByDate()&&this._isVerticallyGrouped();if(a.timeSlotCollectionCount()||(n.isAllDay=!0),s=a.ranges(n.start,n.end,n.isAllDay,!1),t===r.DOWN||t===r.UP){if(f=!0,u=t===r.UP,this._updateDirection(n,s,i,u,!0),e=this._verticalSlots(n,s,i,u),!e.startSlot&&!i&&this._changeViewPeriod(n,u,!l))return f}else if((t===r.LEFT||t===r.RIGHT)&&(f=!0,u=t===r.LEFT,this._updateDirection(n,s,i,u,!1),e=this._horizontalSlots(n,s,i,u),!e.startSlot&&!i&&this._changeViewPeriod(n,u,l)))return f;return f&&(o=e.startSlot,h=e.endSlot,i?(c=n.backward,c&&o?n.start=o.startDate():!c&&h&&(n.end=h.endDate())):o&&h&&(n.isAllDay=o.isDaySlot,n.start=o.startDate(),n.end=h.endDate()),n.events=[]),f},moveToEventInGroup:function(t,i,r,u){for(var c,f,o=t._continuousEvents||[],h=u?-1:1,s=o.length,e=u?s-1:0;e<s&&e>-1;){if(f=o[e],(!u&&f.start.startDate()>=i.startDate()||u&&f.start.startDate()<=i.startDate())&&(r.length&&(f=o[e+h]),f&&n.inArray(f.uid,r)===-1)){c=!!f;break}e+=h}return f},moveToEvent:function(n,t){var i,l,a,r,c,u,o=n.groupIndex,e=this.groups[o],f=e.ranges(n.start,n.end,n.isAllDay,!1)[0].start,v=this.groups.length,h=t?-1:1,s=n.events;if(this._isGroupedByDate())if(l=this._getAllEvents(),a=this._getUniqueEvents(l),r=this._getSortedEvents(a),0===s.length)c=this._getNextEventIndexBySlot(f,r,o),t&&c--,i=r[c];else for(u=this._getStartIdx(s,r);u<r.length&&u>-1&&(s.length>0&&(f=this._getSelectedSlot(f,r,i,u,h,t)),f);){if((!t&&r[u].start.startDate()>=f.startDate()||t&&r[u].start.startDate()<=f.startDate())&&s[0]!=r[u].uid){i=r[u];break}u+=h}else for(;o<v&&o>-1&&(i=this.moveToEventInGroup(e,f,s,t),o+=h,e=this.groups[o],e&&!i);)s=[],f=t?e.lastSlot():e.firstSlot(!0);return i&&(n.events=[i.uid],n.start=i.start.startDate(),n.end=i.end.endDate(),n.isAllDay=i.start.isDaySlot,n.groupIndex=i.start.groupIndex),!!i},current:function(n){return void 0===n?this._current:(this._current=n,void(this.content.has(n)&&this._scrollTo(n,this.content[0])))},select:function(n){this.clearSelection(),this._selectEvents(n)||this._selectSlots(n)},_getNextEventIndexBySlot:function(n,i,r){for(var e,f=0,o=t.date.getDate(n.startDate()),u=0;u<i.length;u++)if(e=t.date.getDate(i[u].start.startDate()),o>e)f++;else if(o.getTime()===e.getTime()&&r>i[u].start.groupIndex)f++;else{if(!(o.getTime()===e.getTime()&&r>=i[u].start.groupIndex&&n.startDate()>i[u].start.startDate()))break;f++}return f},_getSelectedSlot:function(n,t,i,r,u,f){var o,e;return t[r+u]&&t[r].start.groupIndex!==t[r+u].start.groupIndex&&(o=t[r+u].start.groupIndex,e=this.groups[o],e&&!i||(n=null),n=f?e.lastSlot():e.firstSlot(!0)),n},_getStartIdx:function(t,i){var r=0;return n.each(i,function(){return this.uid!==t[0]&&void r++}),r},_getAllEvents:function(){for(var i=[],t=this.groups,n=0;n<t.length;n++)t[n]._continuousEvents&&(i=i.concat(t[n]._continuousEvents));return i},_getUniqueEvents:function(n){for(var u,i,r=[],t=0;t<n.length;t++){for(u=!1,i=0;i<r.length;i++)if(n[t].uid===r[i].uid){u=!0;break}u||r.push(n[t])}return r},_getSortedEvents:function(i){return i.sort(function(i,r){var f=i.start.startDate(),e=r.start.startDate(),u=t.date.getDate(f)-t.date.getDate(e);return 0===u&&(u=i.start.groupIndex-r.start.groupIndex),0===u&&(u=f.getTime()-e.getTime()),0===u&&(i.start.isDaySlot&&!r.start.isDaySlot&&(u=-1),!i.start.isDaySlot&&r.start.isDaySlot&&(u=1)),0===u&&(u=n(i.element).index()-n(r.element).index()),u})},_selectSlots:function(n){var f,t,e,u,i,h,r,s=n.isAllDay,o=this.groups[n.groupIndex];for(o.timeSlotCollectionCount()||(s=!0),this._selectedSlots=[],f=o.ranges(n.start,n.end,s,!1),u=0;u<f.length;u++)for(i=f[u],h=i.collection,r=i.start.index;r<=i.end.index;r++)e=h.at(r),t=e.element,t.setAttribute("aria-selected",!0),yt(t),this._selectedSlots.push({start:e.startDate(),end:e.endDate(),element:t});n.backward&&(t=f[0].start.element),this.current(t)},_selectEvents:function(t){var r,i,f=!1,e=t.events,u=this.groups[t.groupIndex]._continuousEvents||[],o=u.length;if(!e[0]||!u[0])return f;for(i=n(),t.events=[],r=0;r<o;r++)n.inArray(u[r].uid,e)>-1&&(i=i.add(u[r].element),t.events.push(u[r].uid));return i[0]&&(i.addClass("k-state-selected").attr("aria-selected",!0),this.current(i.last()[0]),this._selectedSlots=[],f=!0),f},inRange:function(n){var u=this.startDate(),f=t.date.addDays(this.endDate(),1),i=n.start,r=n.end;return u<=i&&i<f&&u<r&&r<=f},_resourceValue:function(n,i){return n.valuePrimitive&&(i=t.getter(n.dataValueField)(i)),i},_resourceBySlot:function(n){var u,f,i,r,s,e=this.groupedResources,o={};if(e.length)for(u=n.groupIndex,f=e.length-1;f>=0;f--)i=e[f],r=this._resourceValue(i,i.dataSource.view()[u%i.dataSource.total()]),i.multiple&&(r=[r]),s=t.setter(i.field),s(o,r),u=Math.floor(u/i.dataSource.total());return o},_createResizeHint:function(t,i,r,u){return n(g).css({left:t,top:i,width:r,height:u})},_removeResizeHint:function(){this._resizeHint.remove(),this._resizeHint=n()},_removeMoveHint:function(){this._moveHint.remove(),this._moveHint=n()},_scrollTo:function(n,t){var i=n.offsetTop,o=n.offsetHeight,u=t.scrollTop,r=t.clientHeight,e=i+o,f=0;f=u>i?i:e>u+r?o<=r?e-r:i:u,t.scrollTop=f},_shouldInverseResourceColor:function(n){var u=new i(n.color).isDark(),r=this.element.css("color"),t=new i(r).isDark();return u==t},_eventTmpl:function(i,r){var f,h=this.options,s=n.extend({},t.Template,h.templateSettings),c=s.paramName,e="",o=typeof i,u={storage:{},count:0};return"function"===o?(u.storage["tmpl"+u.count]=i,e+="#=this.tmpl"+u.count+"("+c+")#",u.count++):"string"===o&&(e+=i),f=t.template(t.format(r,e),s),u.count>0&&(f=n.proxy(f,u.storage)),f},eventResources:function(n){var s,i,a,r,h,o,u,e,f,v,c=[],l=this.options;if(!l.resources)return c;for(s=0;s<l.resources.length;s++)if(i=l.resources[s],a=i.field,r=t.getter(a)(n),null!=r)for(i.multiple||(r=[r]),h=i.dataSource.view(),o=0;o<r.length;o++){for(u=null,e=r[o],i.valuePrimitive||(e=t.getter(i.dataValueField)(e)),f=0;f<h.length;f++)if(h[f].get(i.dataValueField)==e){u=h[f];break}null!==u&&(v=t.getter(i.dataColorField)(u),c.push({field:i.field,title:i.title,name:i.name,text:t.getter(i.dataTextField)(u),value:e,color:v}))}return c},createLayout:function(t){var i,o,f,r,e,u=-1;for(t.rows||(t.rows=[]),i=0;i<t.rows.length;i++)if(t.rows[i].allDay){u=i;break}o=t.rows[u],u>=0&&t.rows.splice(u,1),f=this.columnLevels=y(t,"columns"),r=this.rowLevels=y(t,"rows"),this.table=n("<table "+h()+' class="k-scheduler-layout k-scheduler-'+this.name+'view"><tbody></tbody></table>'),e=r[r.length-1].length,this.table.find("tbody:first").append(this._topSection(f,o,e)),this.table.find("tbody:first").append(this._bottomSection(f,r,e)),this.element.append(this.table),this._scroller()},refreshLayout:function(){for(var a,l,r,y,c,i=this,v=i.element.find(">.k-scheduler-toolbar"),f=i.element.innerHeight(),s=this._scrollbar,e=0,h=this._isRtl?"left":"right",o=0;o<v.length;o++)f-=u(v.eq(o));i.datesHeader&&(e=u(i.datesHeader)),i.timesHeader&&u(i.timesHeader)>e&&(e=u(i.timesHeader)),i.datesHeader&&i.timesHeader&&(a=i.datesHeader.find("table:first tr"),i.timesHeader.find("tr").height(function(t){n(this).height(a.eq(t).height())})),e&&(f-=e),i.footer&&(f-=u(i.footer)),l=function(n){var i,t;return!!n[0].style.height||(i=n.height(),n.height("auto"),t=n.height(),i!=t?(n.height(""),!0):(n.height(""),!1))},r=i.content[0],y=t.support.kineticScrollNeeded?0:s,l(i.element)&&(i.content.height(f>2*s?f:2*s+1),i.times.height(r.clientHeight),c=i.times.find("table"),c.length&&c.height(i.content.find("table")[0].clientHeight)),r.offsetWidth-r.clientWidth>0?(i.table.addClass("k-scrollbar-v"),i.datesHeader.css("padding-"+h,y-parseInt(i.datesHeader.children().css("border-"+h+"-width"),10))):i.datesHeader.css("padding-"+h,""),r.offsetHeight-r.clientHeight>0||r.clientHeight>i.content.children(".k-scheduler-table").height()?i.table.addClass("k-scrollbar-h"):i.table.removeClass("k-scrollbar-h")},_topSection:function(t,i,r){this.timesHeader=ct(t.length,i,r);var u=t[t.length-1].length;return this.datesHeader=lt(t,u,i),n("<tr>").append(this.timesHeader.add(this.datesHeader).wrap("<td>").parent())},_bottomSection:function(t,i,r){return this.times=et(i,r),this.content=ot(t[t.length-1],i[i.length-1]),n("<tr>").append(this.times.add(this.content).wrap("<td>").parent())},_scroller:function(){var i,r=this;this.content.bind("scroll"+tt,function(){r.datesHeader.find(">.k-scheduler-header-wrap").scrollLeft(this.scrollLeft),r.times.scrollTop(this.scrollTop)}),i=t.touchScroller(this.content,{avoidScrolling:function(t){return n(t.event.target).closest(".k-event.k-event-active").length>0}}),i&&i.movable&&(this._touchScroller=i,this.content=i.scrollElement,i.movable.bind("change",function(n){r.datesHeader.find(">.k-scheduler-header-wrap").scrollLeft(-n.sender.x),r.times.scrollTop(-n.sender.y)}))},_resourcesForGroups:function(){var t,f,r,u,e=[],n=this.options.group,i=this.options.resources;if(n=n&&n.resources?n.resources:[],i&&n.length)for(t=0,f=i.length;t<f;t++)for(r=0,u=n.length;r<u;r++)i[t].name===n[r]&&e.push(i[t]);this.groupedResources=e},_createDateLayout:function(n,t,i){return a("rows",n,t,i)},_createColumnsLayout:function(n,t,i,r,u){return f("columns",n,t,i,r,u)},_groupOrientation:function(){var n=this.options.group;return n&&n.resources?n.orientation:"horizontal"},_isGroupedByDate:function(){return this.options.group&&this.options.group.date},_isVerticallyGrouped:function(){return this.groupedResources.length&&"vertical"===this._groupOrientation()},_createRowsLayout:function(n,t,i,r){return f("rows",n,t,i,r)},selectionByElement:function(){return null},clearSelection:function(){this.content.find(".k-state-selected").removeAttr("id").attr("aria-selected",!1).removeClass("k-state-selected")},destroy:function(){var n=this;l.fn.destroy.call(this),n.table&&(t.destroy(n.table),n.table.remove()),n.groups=null,n.table=null,n.content=null,n.times=null,n.datesHeader=null,n.timesHeader=null,n.footer=null,n._resizeHint=null,n._moveHint=null},calendarInfo:function(){return t.getCulture().calendars.standard},prevGroupSlot:function(n,t,i){var u,r=this.groups[t],f=r.ranges(n,n,i,!1)[0].start;if(!(t<=0))return this._isGroupedByDate()?f:this._isVerticallyGrouped()?r.timeSlotCollectionCount()?(u=r._collection(i?f.index:f.collectionIndex,!1),u.last()):(u=r._collection(r.daySlotCollectionCount()-1,!0),u.at(f.index)):r.timeSlotCollectionCount()?(u=r._collection(i?0:r.timeSlotCollectionCount()-1,i),i?u.last():u.at(f.index)):(u=r._collection(f.collectionIndex,!0),u.last())},nextGroupSlot:function(n,t,i){var r,e,u=this.groups[t],f=u.ranges(n,n,i,!1)[0].start;if(!(t>=this.groups.length-1))return this._isGroupedByDate()?f:this._isVerticallyGrouped()?u.timeSlotCollectionCount()?(e=u.daySlotCollectionCount(),r=u._collection(e?0:f.collectionIndex,e),i?r.first():r.at(f.collectionIndex)):(r=u._collection(0,!0),r.at(f.index)):u.timeSlotCollectionCount()?(r=u._collection(0,i),i?r.first():r.at(f.index)):(r=u._collection(f.collectionIndex,!0),r.first())},_eventOptionsForMove:function(){return{}},_updateEventForResize:function(){},_updateEventForSelection:function(n){return n}}),i=function(n){var o,s,e,r,u,t=this,f=i.formats;if(1===arguments.length)for(n=t.resolveColor(n),r=0;r<f.length;r++)o=f[r].re,s=f[r].process,e=o.exec(n),e&&(u=s(e),t.r=u[0],t.g=u[1],t.b=u[2]);else t.r=arguments[0],t.g=arguments[1],t.b=arguments[2];t.r=t.normalizeByte(t.r),t.g=t.normalizeByte(t.g),t.b=t.normalizeByte(t.b)},i.prototype={resolveColor:function(n){return n=n||"#000","#"==n.charAt(0)&&(n=n.substr(1,6)),n=n.replace(/ /g,""),n=n.toLowerCase(),n=i.namedColors[n]||n},normalizeByte:function(n){return n<0||isNaN(n)?0:n>255?255:n},percBrightness:function(){var n=this;return rt.sqrt(.241*n.r*n.r+.691*n.g*n.g+.068*n.b*n.b)},isDark:function(){var t=this,n=t.percBrightness();return n<180}},i.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(n){return[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(n){return[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(n){return[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]}}],i.namedColors={aqua:"00ffff",azure:"f0ffff",beige:"f5f5dc",black:"000000",blue:"0000ff",brown:"a52a2a",coral:"ff7f50",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgray:"a9a9a9",darkgreen:"006400",darkorange:"ff8c00",darkred:"8b0000",dimgray:"696969",fuchsia:"ff00ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lightblue:"add8e6",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumblue:"0000cd",navy:"000080",olive:"808000",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",pink:"ffc0cb",plum:"dda0dd",purple:"800080",red:"ff0000",royalblue:"4169e1",salmon:"fa8072",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",steelblue:"4682b4",tan:"d2b48c",teal:"008080",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},p=/\s*k-state-selected/,n.extend(v.SchedulerView,{createColumns:bt,createRows:at,rangeIndex:o,collidingEvents:pt,groupEqFilter:vt})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.scheduler.dayview.min",["kendo.scheduler.view.min"],n)}(function(){return function(n,t){function k(n){var t=new Date(1980,1,1,0,0,0);return h(t,r(n)),t}function e(n,t,i){return n>=t&&n<=i}function v(n,t,i,r){return r=r?n<=i:n<i,n>t&&r}function p(n,t,r,u){var e,f=n._continuousEvents,h=f[f.length-1],s=o(t.start.startDate()).getTime();if(u&&h&&o(h.start.startDate()).getTime()==s){for(e=f.length-1;e>-1&&!(f[e].isAllDay||o(f[e].start.startDate()).getTime()<s);e--);f.splice(e+1,0,{element:r,isAllDay:!0,uid:r.attr(i.attr("uid")),start:t.start,end:t.end})}else f.push({element:r,isAllDay:u,uid:r.attr(i.attr("uid")),start:t.start,end:t.end})}function ft(n){var i=[],t=n.workWeekStart;for(i.push(t);n.workWeekEnd!=t;)t>6?t-=7:t++,i.push(t);return i}var i=window.kendo,d=i.ui,h=i.date.setTime,f=d.SchedulerView,g=i._outerWidth,a=i._outerHeight,c=n.extend,rt=n.proxy,o=i.date.getDate,y=i.date.MS_PER_MINUTE,u=i.date.MS_PER_DAY,w="k-current-time",b="k-current-time-arrow",ut=.8666,r=i.date.getMilliseconds,s=".kendoMultiDayView",ot=i.template('<div title="(#=kendo.format("{0:t} - {1:t}", start, end)#): #=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template k-event-time">#:kendo.format("{0:t} - {1:t}", start, end)#</div><div class="k-event-template">${title}</div></div>'),et=i.template('<div title="(#=kendo.format("{0:t}", start)#): #=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template">${title}</div></div>'),nt=i.template("<span class='k-link k-nav-day'>#=kendo.toString(date, 'ddd M/dd')#</span>"),tt='<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color#; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#" #} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-60-left"></span>#}## if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}## if(data.head || data.middle) {#<span class="k-icon k-i-arrow-60-right"></span>#}#</span>#if(resizable && !singleDay && !data.tail && !data.middle){#<span class="k-resize-handle k-resize-w"></span>#}##if(resizable && !singleDay && !data.head && !data.middle){#<span class="k-resize-handle k-resize-e"></span>#}#</div>',it='<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#" #if (resources[0]) { #style="background-color:#=resources[0].color #; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#"#} else {#class="k-event"#}#><span class="k-event-actions"># if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}#</span><span class="k-event-top-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-60-up"></span># } #</span><span class="k-event-bottom-actions"># if(data.head || data.middle) {#<span class="k-icon k-i-arrow-60-down"></span># } #</span># if(resizable && !data.tail && !data.middle) {#<span class="k-resize-handle k-resize-n"></span># } ## if(resizable && !data.head && !data.middle) {#<span class="k-resize-handle k-resize-s"></span># } #</div>',l=f.extend({init:function(n,t){var i=this;f.fn.init.call(i,n,t),i.title=i.options.title||i.options.name,i._workDays=ft(i.options),i._templates(),i._editable(),i.calculateDateRange(),i._groups(),i._currentTime(!0)},_currentTimeMarkerUpdater:function(){this._updateCurrentTimeMarker(new Date)},_updateCurrentTimeMarker:function(t){var h,tt,d,p,y,o,v,s,e,k,nt,l,u,c,f,r=this.options;for(r.currentTimeMarker.useLocalTimezone===!1&&(h=r.dataSource.options.schema.timezone,r.dataSource&&h&&(tt=i.timezone.offset(t,h),t=i.timezone.convert(t,t.getTimezoneOffset(),tt))),this.times.find("."+w).remove(),this.content.find("."+w).remove(),d=r.group&&"horizontal"!=r.group.orientation?this.groups.length:1,p=this.times.find("tr:first th:first"),y=this.times.find("tr:first th:last"),o=0;o<d;o++){if(v=this.groups[o],!v)return;if(s=i.date.toUtcTime(t),e=v.timeSlotRanges(s,s+1),0===e.length)return;k=e[0].collection,nt=k.slotByStartDate(t),nt&&(l="<div class='"+w+"'></div>",u=n(l).prependTo(this.times),c=Math.round(e[0].innerRect(t,new Date(t.getTime()+1),!1).top),f={},this._isRtl?(f.right=p.position().left+a(p)-a(y),u.addClass(b+"-left")):(f.left=y.position().left,u.addClass(b+"-right")),f.top=c-g(u)*ut/2,u.css(f),n(l).prependTo(this.content).css({top:c,height:"1px",right:"1px",width:this.content[0].scrollWidth,left:0}))}},_currentTime:function(n){var i=this,r=i.options.currentTimeMarker;r!==!1&&r.updateInterval!==t&&(i._currentTimeMarkerUpdater(),n&&(i._currentTimeUpdateTimer=setInterval(rt(this._currentTimeMarkerUpdater,i),r.updateInterval)))},_updateResizeHint:function(n,t,r,u){var s,l,a,k,w,e,o,b,h,p,v,c,y=n.isMultiDay(),g=this.groups[t],d=g.ranges(r,u,y,n.isAllDay);for(this._removeResizeHint(),w=0;w<d.length;w++)if(e=d[w],o=e.startSlot(),this._isGroupedByDate()&&y)for(b=o.index;b<=e.end.index;b++)h=e.collection._slots[b],s=h.offsetWidth,l=h.clientHeight,a=h.offsetTop,k=f.fn._createResizeHint.call(this,h.offsetLeft,a,s,l),this._resizeHint=this._resizeHint.add(k);else s=o.offsetWidth,l=o.clientHeight,a=o.offsetTop,y?s=e.innerWidth():(p=e.outerRect(r,u,this.options.snap),a=p.top,l=p.bottom-p.top),k=f.fn._createResizeHint.call(this,o.offsetLeft,a,s,l),this._resizeHint=this._resizeHint.add(k);v="t",c=this.content,y&&(v="M/dd",c=this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div"),c.length||(c=this.content)),this._resizeHint.appendTo(c),this._resizeHint.find(".k-label-top,.k-label-bottom").text(""),this._resizeHint.first().addClass("k-first").find(".k-label-top").text(i.toString(i.timezone.toLocalDate(r),v)),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(i.toString(i.timezone.toLocalDate(u),v))},_updateMoveHint:function(n,t,u){var p,l,h,y,f,w,c,b,a,o=n.isMultiDay(),k=this.groups[t],s=i.date.toUtcTime(n.start)+u,e=s+n.duration(),v=k.ranges(s,e,o,n.isAllDay);for(s=i.timezone.toLocalDate(s),e=i.timezone.toLocalDate(e),this._removeMoveHint(),!o&&(0===r(e)||r(e)<r(this.startTime()))&&v.length>1&&v.pop(),p=0;p<v.length;p++)if(l=v[p],h=l.start,f={left:h.offsetLeft+2,top:h.offsetTop},this._isGroupedByDate()&&o)for(w=h.index;w<=l.end.index;w++)c=l.collection._slots[w],f.left=this._isRtl?.1*c.clientWidth+c.offsetLeft+2:c.offsetLeft+2,f.height=c.offsetHeight,f.width=.9*c.clientWidth-4,y=this._createEventElement(n.clone({start:s,end:e}),!o),this._appendMoveHint(y,f);else this._isRtl&&(f.left=.1*h.clientWidth+h.offsetLeft+2),o?f.width=l.innerWidth()-4:(b=l.outerRect(s,e,this.options.snap),f.top=b.top,f.height=b.bottom-b.top,f.width=.9*h.clientWidth-4),y=this._createEventElement(n.clone({start:s,end:e}),!o),this._appendMoveHint(y,f);a=this.content,o&&(a=this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div"),a.length||(a=this.content)),this._moveHint.appendTo(a)},_appendMoveHint:function(n,t){n.addClass("k-event-drag-hint"),n.css(t),this._moveHint=this._moveHint.add(n)},_slotByPosition:function(n,t){var u,i,f,r;for(this._isVerticallyGrouped()?(i=this.content.offset(),t+=this.content[0].scrollTop,n+=this.content[0].scrollLeft):i=this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day)").find(">div").offset(),i&&(n-=i.left,t-=i.top),n=Math.ceil(n),t=Math.ceil(t),r=0;r<this.groups.length;r++)if(f=this.groups[r],u=f.daySlotByPosition(n,t,this._isGroupedByDate()))return u;for(i&&(n+=i.left,t+=i.top),i=this.content.offset(),n-=i.left,t-=i.top,this._isVerticallyGrouped()||(t+=this.content[0].scrollTop,n+=this.content[0].scrollLeft),n=Math.ceil(n),t=Math.ceil(t),r=0;r<this.groups.length;r++)if(f=this.groups[r],u=f.timeSlotByPosition(n,t))return u;return null},_groupCount:function(){var n=this.groupedResources,t=this._isGroupedByDate();return n.length?"vertical"===this._groupOrientation()?t?this._columnCountForLevel(n.length-1):this._rowCountForLevel(n.length-1):t?this._columnCountForLevel(n.length)/this._columnCountForLevel(0):this._columnCountForLevel(n.length)/this._columnOffsetForResource(n.length):1},_columnCountInResourceView:function(){var t=this.groupedResources,n=this._isGroupedByDate();return!t.length||this._isVerticallyGrouped()?n?this._rowCountForLevel(0):this._columnCountForLevel(0):n?this._columnCountForLevel(0):this._columnOffsetForResource(t.length)},_timeSlotGroups:function(n,t){var e,h,c,i,f,u,a,s,v,o,l=this._timeSlotInterval(),p=n,w=this._isGroupedByDate(),y=this.content.find("tr:not(.k-scheduler-header-all-day)");for(y.attr("role","row"),f=y.length,this._isVerticallyGrouped()&&(w&&(p=t),f=Math.floor(f/p)),u=0;u<p;u++)for(a=0,s=0,this._isVerticallyGrouped()?a=u:s=u,c=a*f;c<(a+1)*f;){if(v=y[c].children,c%f==0&&(h=r(new Date(+this.startTime()))),o=0,w)if(this._isVerticallyGrouped())for(i=0;i<n;i++)e=this.groups[i],this._addTimeSlotGroup(e,v,i,h,l,u);else for(e=this.groups[u],i=s;i<n*t;i+=n)this._addTimeSlotGroup(e,v,i,h,l,o),o++;else for(e=this.groups[u],i=s*t;i<(s+1)*t;i++)this._addTimeSlotGroup(e,v,i,h,l,o),o++;h+=l,c++}},_addTimeSlotGroup:function(n,t,i,r,u,f){var o=t[i],c=n.getTimeSlotCollection(f),e=this._dates[f],l=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),s=l+r,h=s+u;o.setAttribute("role","gridcell"),o.setAttribute("aria-selected",!1),c.addTimeSlot(o,s,h)},_addDaySlotGroup:function(n,t,r,u,f){var o=t[r],e=this._dates[f],s=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate());o.setAttribute("role","gridcell"),o.setAttribute("aria-selected",!1),n.addDaySlot(o,s,s+i.date.MS_PER_DAY)},_daySlotGroups:function(n,t){var s,i,r,c,u,f,h,o,e,a=n,l=this._isGroupedByDate();for(this._isVerticallyGrouped()?(l&&(a=t),s=this.element.find(".k-scheduler-header-all-day")):s=this.element.find(".k-scheduler-header-all-day tr"),s.attr("role","row"),r=0;r<a;r++)if(c=0,this._isVerticallyGrouped()&&(c=r),h=s[c].children,o=0,this._isVerticallyGrouped()||(o=r),e=0,l)if(this._isVerticallyGrouped())for(i=0;i<n;i++)u=this.groups[i],f=u.getDaySlotCollection(0),this._addDaySlotGroup(f,h,i,t,r);else for(u=this.groups[r],f=u.getDaySlotCollection(0),i=o;i<n*t;i+=n)this._addDaySlotGroup(f,h,i,t,e),e++;else for(u=this.groups[r],f=u.getDaySlotCollection(0),i=o*t;i<(o+1)*t;i++)this._addDaySlotGroup(f,h,i,t,e),e++},_groups:function(){var t,f,n,u=this._groupCount(),r=this._columnCountInResourceView();for(this.groups=[],t=0;t<u;t++){for(f=this._addResourceView(t),n=0;n<r;n++)f.addTimeSlotCollection(this._dates[n],i.date.addDays(this._dates[n],1));this.options.allDaySlot&&f.addDaySlotCollection(this._dates[0],i.date.addDays(this._dates[this._dates.length-1],1))}this._timeSlotGroups(u,r),this.options.allDaySlot&&this._daySlotGroups(u,r)},options:{name:"MultiDayView",selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}",allDaySlot:!0,showWorkHours:!1,title:"",startTime:i.date.today(),endTime:i.date.today(),minorTickCount:2,majorTick:60,majorTimeHeaderTemplate:"#=kendo.toString(date, 't')#",minorTimeHeaderTemplate:"&\\#8203;",groupHeaderTemplate:"#=text#",slotTemplate:"&nbsp;",allDaySlotTemplate:"&nbsp;",eventTemplate:ot,allDayEventTemplate:et,dateHeaderTemplate:nt,editable:!0,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,footer:{command:"workDay"},messages:{allDay:"all day",showFullDay:"Show full day",showWorkDay:"Show business hours"},currentTimeMarker:{updateInterval:1e4,useLocalTimezone:!0}},events:["remove","add","edit"],_templates:function(){var n=this.options,t=c({},i.Template,n.templateSettings);this.eventTemplate=this._eventTmpl(n.eventTemplate,it),this.allDayEventTemplate=this._eventTmpl(n.allDayEventTemplate,tt),this.majorTimeHeaderTemplate=i.template(n.majorTimeHeaderTemplate,t),this.minorTimeHeaderTemplate=i.template(n.minorTimeHeaderTemplate,t),this.dateHeaderTemplate=i.template(n.dateHeaderTemplate,t),this.slotTemplate=i.template(n.slotTemplate,t),this.allDaySlotTemplate=i.template(n.allDaySlotTemplate,t),this.groupHeaderTemplate=i.template(n.groupHeaderTemplate,t)},_editable:function(){this.options.editable&&(this._isMobile()?this._touchEditable():this._mouseEditable())},_mouseEditable:function(){var t=this;t.element.on("click"+s,".k-event a:has(.k-i-close)",function(r){t.trigger("remove",{uid:n(this).closest(".k-event").attr(i.attr("uid"))}),r.preventDefault()}),t.options.editable.create!==!1&&t.element.on("dblclick"+s,".k-scheduler-content td",function(i){var r,u;n(this).parent().hasClass("k-scheduler-header-all-day")||(r=t._slotByPosition(i.pageX,i.pageY),r&&(u=t._resourceBySlot(r),t.trigger("add",{eventInfo:c({start:r.startDate(),end:r.endDate()},u)})),i.preventDefault())}).on("dblclick"+s,".k-scheduler-header-all-day td",function(n){var u,r=t._slotByPosition(n.pageX,n.pageY);r&&(u=t._resourceBySlot(r),t.trigger("add",{eventInfo:c({},{isAllDay:!0,start:i.date.getDate(r.startDate()),end:i.date.getDate(r.startDate())},u)})),n.preventDefault()}),t.options.editable.update!==!1&&t.element.on("dblclick"+s,".k-event",function(r){t.trigger("edit",{uid:n(this).closest(".k-event").attr(i.attr("uid"))}),r.preventDefault()})},_touchEditable:function(){var r=this,u=0;i.support.mobileOS.android&&(u=5),r.options.editable.create!==!1&&(r._addUserEvents=new i.UserEvents(r.element,{threshold:u,filter:".k-scheduler-content td",tap:function(i){var e,o,u,f;n(i.target).parent().hasClass("k-scheduler-header-all-day")||(e=i.x.location!==t?i.x.location:i.x,o=i.y.location!==t?i.y.location:i.y,u=r._slotByPosition(e,o),u&&(f=r._resourceBySlot(u),r.trigger("add",{eventInfo:c({start:u.startDate(),end:u.endDate()},f)})),i.preventDefault())}}),r._allDayUserEvents=new i.UserEvents(r.element,{threshold:u,filter:".k-scheduler-header-all-day td",tap:function(n){var f,e=n.x.location!==t?n.x.location:n.x,o=n.y.location!==t?n.y.location:n.y,u=r._slotByPosition(e,o);u&&(f=r._resourceBySlot(u),r.trigger("add",{eventInfo:c({},{isAllDay:!0,start:i.date.getDate(u.startDate()),end:i.date.getDate(u.startDate())},f)})),n.preventDefault()}})),r.options.editable.update!==!1&&(r._editUserEvents=new i.UserEvents(r.element,{threshold:u,filter:".k-event",tap:function(t){var u=n(t.target).closest(".k-event");u.hasClass("k-event-active")||r.trigger("edit",{uid:u.attr(i.attr("uid"))}),t.preventDefault()}}))},_layout:function(n){for(var o,u,t=[],f=[],h=this.options,r=this,s=r._isGroupedByDate(),e=0;e<n.length;e++)o={},o.text=r.dateHeaderTemplate({date:n[e]}),i.date.isToday(n[e])&&(o.className="k-today"),t.push(o);return u=this.groupedResources,h.allDaySlot&&f.push({text:h.messages.allDay,allDay:!0,cellContent:function(t){var i=t;return t=u.length&&"vertical"!==r._groupOrientation()?t%n.length:t,r.allDaySlotTemplate({date:n[t],resources:function(){return r._resourceBySlot({groupIndex:i})}})}}),this._forTimeRange(this.startTime(),this.endTime(),function(n,t,i,u){var o=t?r.majorTimeHeaderTemplate:r.minorTimeHeaderTemplate,e={text:o({date:n}),className:u?"k-slot-cell":""};f.push(e)}),u.length&&("vertical"===this._groupOrientation()?s?(f=this._createDateLayout(t,f),t=this._createColumnsLayout(u,null,this.groupHeaderTemplate)):f=this._createRowsLayout(u,f,this.groupHeaderTemplate):t=s?this._createColumnsLayout(u,t,this.groupHeaderTemplate,t):this._createColumnsLayout(u,t,this.groupHeaderTemplate)),{columns:t,rows:f}},_footer:function(){var i,r,u,t=this.options;t.footer!==!1&&(i='<div class="k-header k-scheduler-footer">',r=t.footer.command,r&&"workDay"===r?(i+='<ul class="k-reset k-header">',i+='<li class="k-state-default k-scheduler-fullday"><a href="#" class="k-link"><span class="k-icon k-i-clock"></span>',i+=(t.showWorkHours?t.messages.showFullDay:t.messages.showWorkDay)+"</a></li>",i+="</ul>"):i+="&nbsp;",i+="</div>",this.footer=n(i).appendTo(this.element),u=this,this.footer.on("click"+s,".k-scheduler-fullday",function(n){n.preventDefault(),u.trigger("navigate",{view:u.name||t.name,date:t.date,isWorkDay:!t.showWorkHours})}))},_forTimeRange:function(n,t,i,f){var b,v,o,w,g,s,e,it,d,p,c,a,l,rt,nt,tt;for(n=k(n),t=k(t),b=this,v=r(n),o=r(t),w=b.options.minorTickCount,g=b.options.majorTick*y,s=g/w||1,e=new Date(+n),it=e.getDate(),p=0,a="",c=u/s,v!=o&&(v>o&&(o+=u),c=(o-v)/s),c=Math.round(c);p<c;p++)l=p%(g/s),rt=0===l,nt=l<w-1,tt=l===w-1,a+=i(e,rt,nt,tt),h(e,s,!1);return o&&(d=r(e),it<e.getDate()&&(d+=u),d>o&&(e=new Date(+t))),f&&(a+=f(e)),a},_content:function(n){var o,c,i,t=this,p=t.options,y=t.startTime(),v=this.endTime(),u=1,l=1,a=n.length,r="",w=this.groupedResources,h=this.allDaySlotTemplate,f=!1,e=t._isGroupedByDate(),s=0;for(w.length&&(f="vertical"===t._groupOrientation(),f?(l=this._rowCountForLevel(this.rowLevels.length-2),e&&(u=this._columnCountForLevel(this.columnLevels.length-1)),p.allDaySlot&&(o=function(i){var r,o='<tr class="k-scheduler-header-all-day">',f=e?0:i,c=function(){return t._resourceBySlot({groupIndex:f})};if(e)for(;f<u;f++)o+="<td>"+h({date:n[s],resources:c})+"</td>";else for(r=0;r<n.length;r++)o+="<td>"+h({date:n[r],resources:c})+"</td>";return o+"</tr>"})):u=e?this._columnCountForLevel(this.columnLevels.length-1)/this._columnCountForLevel(0):this._columnCountForLevel(this.columnLevels.length-2)),r+="<tbody>",c=function(r,o){var h,v,y,l="",c=0;if(l="<tr"+(o?' class="k-middle-row"':"")+">",e)for(h=0,v=a;h<v;h++){for(c=0;c<u;c++)y=h,f&&(y=s),l=t._addCellsToContent(l,n,r,y,c,i);if(f)break}else for(;c<u;c++)for(h=0,v=a;h<v;h++)l=t._addCellsToContent(l,n,r,h,c,i);return l+="</tr>"},i=0;i<l;i++)r+=o?o(i):"",r+=this._forTimeRange(y,v,c),f&&s++;r+="</tbody>",this.content.find("table").append(r)},_addCellsToContent:function(n,t,r,u,f,e){var s,h=this,o="",a=this.slotTemplate,l="vertical"===this._groupOrientation(),c=function(n){return function(){return h._resourceBySlot({groupIndex:n})}};return i.date.isToday(t[u])&&(o+="k-today"),(i.date.getMilliseconds(r)<i.date.getMilliseconds(this.options.workDayStart)||i.date.getMilliseconds(r)>=i.date.getMilliseconds(this.options.workDayEnd)||!this._isWorkDay(t[u]))&&(o+=" k-nonwork-hour"),n+="<td"+(""!==o?' class="'+o+'"':"")+">",s=i.date.getDate(t[u]),i.date.setTime(s,i.date.getMilliseconds(r)),n+=a({date:s,resources:c(l&&!h._isGroupedByDate()?e:f)}),n+="</td>"},_isWorkDay:function(n){for(var r=n.getDay(),i=this._workDays,t=0;t<i.length;t++)if(i[t]===r)return!0;return!1},_render:function(t){var r,i=this;t=t||[],this._dates=t,this._startDate=t[0],this._endDate=t[t.length-1||0],this.createLayout(this._layout(t)),this._content(t),this._footer(),this.refreshLayout(),r=this.element.find(".k-scheduler-header-all-day td"),r.length&&(this._allDayHeaderHeight=r.first()[0].clientHeight),i.element.on("click"+s,".k-nav-day",function(t){var e,f=n(t.currentTarget).closest("th"),o=f.offset(),u=0,r=a(f);i._isGroupedByDate()&&(i._isVerticallyGrouped()?(u=g(i.times),r=0):r=a(i.datesHeader)),e=i._slotByPosition(o.left+u,o.top+r),i.trigger("navigate",{view:"day",date:e.startDate()})})},startTime:function(){var n=this.options;return n.showWorkHours?n.workDayStart:n.startTime},endTime:function(){var n=this.options;return n.showWorkHours?n.workDayEnd:n.endTime},startDate:function(){return this._startDate},endDate:function(){return this._endDate},_end:function(n){var t=r(this.endTime())||u;return n&&(t=0),new Date(this._endDate.getTime()+t)},nextDate:function(){return i.date.nextDay(this.endDate())},previousDate:function(){return i.date.previousDay(this.startDate())},calculateDateRange:function(){this._render([this.options.date])},destroy:function(){var n=this;n._currentTimeUpdateTimer&&clearInterval(n._currentTimeUpdateTimer),n.datesHeader&&n.datesHeader.off(s),n.element&&n.element.off(s),n.footer&&n.footer.remove(),f.fn.destroy.call(this),this._isMobile()&&n.options.editable&&(n.options.editable.create!==!1&&(n._addUserEvents.destroy(),n._allDayUserEvents.destroy()),n.options.editable.update!==!1&&n._editUserEvents.destroy())},inRange:function(n){var o,s,e,t,u=f.fn.inRange.call(this,n);return n.isAllDay?u:(o=r(this.startTime()),s=r(this.endTime())||i.date.MS_PER_DAY,e=r(n.start),t=r(n.end)||i.date.MS_PER_DAY,u&&o<=e&&t<=s)},selectionByElement:function(n){var t=n.offset();return this._slotByPosition(t.left,t.top)},_timeSlotInterval:function(){var n=this.options;return n.majorTick/n.minorTickCount*y},_timeSlotIndex:function(n){var t=this.options,f=r(n),u=r(this.startTime()),i=t.majorTick/t.minorTickCount*y;return(f-u)/i},_slotIndex:function(n,t){return t?this._dateSlotIndex(n):this._timeSlotIndex(n)},_dateSlotIndex:function(n,t){for(var h,o,f=this._dates||[],c=1,r=0,s=f.length;r<s;r++)if(h=i.date.getDate(f[r]),o=new Date(i.date.getDate(f[r]).getTime()+u-(t?0:1)),e(n,h,o))return r*c;return-1},_positionAllDayEvent:function(t,i){var u,l,e,v,h,o,a,b=i.innerWidth(),r=i.start.index,s=i.end.index,c=f.collidingEvents(i.events(),r,s),k=this._headerColumnCount||0,d=2,y=r!==s?5:4,p=this._allDayHeaderHeight,w=i.startSlot();for(t.css({left:w.offsetLeft+d,width:b-y}),i.addEvent({slotIndex:r,start:r,end:s,element:t}),c.push({slotIndex:r,start:r,end:s,element:t}),u=f.createRows(c),u.length&&u.length>k&&(this._headerColumnCount=u.length),l=i.start.offsetTop,e=0,v=u.length;e<v;e++)for(h=u[e].events,o=0,a=h.length;o<a;o++)n(h[o].element).css({top:l+e*p})},_arrangeColumns:function(n,t,i,r){var s,h,a,o,y,v,l,u,w,e,p,c=r.start;for(n={element:n,slotIndex:c.index,start:t,end:t+i},h=c.clientWidth,a=.1*h,y=r.events(),v=f.collidingEvents(y,n.start,n.end),r.addEvent(n),v.push(n),s=f.createColumns(v),l=(h-a)/s.length,u=0,w=s.length;u<w;u++)for(o=s[u].events,e=0,p=o.length;e<p;e++)o[e].element[0].style.width=l-4+"px",o[e].element[0].style.left=(this._isRtl?a:0)+c.offsetLeft+u*l+2+"px"},_positionEvent:function(n,t,i){var f=n._startTime||n.start,e=n._endTime||n.end,r=i.innerRect(f,e,!1),u=r.bottom-r.top-2;u<0&&(u=0),t.css({top:r.top,height:u}),this._arrangeColumns(t,r.top,t[0].clientHeight,i)},_createEventElement:function(t,f,s,h){var it,a,l,y,d,tt,ft=f?this.eventTemplate:this.allDayEventTemplate,rt=this.options,p=rt.editable,ut=this._isMobile(),ot=p&&p.destroy!==!1&&!ut,et=p&&p.resize!==!1,nt=o(this.startDate()),v=o(this.endDate()),g=r(this.startTime()),b=r(this.endTime()),w=t._time("start"),k=t._time("end");return g>=b&&(b=r(new Date(this.endTime().getTime()+u-1))),f||t.isAllDay||(v=new Date(v.getTime()+u)),a=t.start,l=t.end,t.isAllDay&&(l=o(t.end)),!e(o(a),nt,v)&&!e(l,nt,v)||f&&w<g&&k>b?it=!0:o(a)<nt||f&&w<g?h=!0:(l>v&&!f||f&&k>b)&&(s=!0),y=this.eventResources(t),t._startTime&&w!==i.date.getMilliseconds(t.start)&&(a=new Date(w),a=i.timezone.apply(a,"Etc/UTC")),t._endTime&&k!==i.date.getMilliseconds(t.end)&&(l=new Date(k),l=i.timezone.apply(l,"Etc/UTC")),d=c({},{ns:i.ns,resizable:et,showDelete:ot,middle:it,head:s,tail:h,singleDay:1==this._dates.length,resources:y,inverseColor:!(!y||!y[0])&&this._shouldInverseResourceColor(y[0]),messages:rt.messages},t,{start:a,end:l}),tt=n(ft(d)),this.angular("compile",function(){return{elements:tt,data:[{dataItem:d}]}}),tt},_isInTimeSlot:function(n){var s,o=this.startTime(),t=this.endTime(),f=n._startTime||n.start,e=n._endTime||n.end;return r(t)===r(i.date.getDate(t))&&(t=i.date.getDate(t),h(t,u-1)),n._date("end")>n._date("start")&&(e=+n._date("end")+(u-1)),e-=n._date("end"),f-=n._date("start"),t=r(t),o=r(o),o===f&&f===e||(s=f!==t,v(f,o,t,s)||v(e,o,t,s)||v(o,f,e)||v(t,f,e))},_isInDateSlot:function(n){var o=this.groups[0],u=o.firstSlot().start,f=o.lastSlot().end-1,t=i.date.toUtcTime(n.start),r=i.date.toUtcTime(n.end);return(e(t,u,f)||e(r,u,f)||e(u,t,r)||e(f,t,r))&&(!e(r,u,u)||e(r,t,t)||n.isAllDay)},_updateAllDayHeaderHeight:function(n){var i,t;if(this._height!==n&&(this._height=n,i=this.element.find(".k-scheduler-header-all-day td"),i.length))for(i.parent().add(this.element.find(".k-scheduler-times-all-day").parent()).height(n),t=0;t<this.groups.length;t++)this.groups[t].refresh()},_renderEvents:function(n,t){for(var r,c,w,f,o,i,s,a,e,k,h,nt,rt,tt,g,v,y,l,d,ft=this.datesHeader.find(".k-scheduler-header-wrap > div"),ut=this._isGroupedByDate(),b=0,it=n.length;b<it;b++)if(r=n[b],this._isInDateSlot(r))if(c=r.isAllDay||r.end.getTime()-r.start.getTime()>=u,w=c&&!this._isVerticallyGrouped()?ft:this.content,c){if(this.options.allDaySlot&&(e=this.groups[t],e._continuousEvents||(e._continuousEvents=[]),o=e.slotRanges(r),o.length))if(i=o[0],tt=i.start.index,g=i.end.index,ut&&tt!==g)for(s=i.start.start,a=i.end.end,v=new Date(s),y=new Date(s),l=i.start.index;l<=i.end.index;l++)f=this._createEventElement(r,!c,l!==g,l!==tt),d=e.daySlotRanges(v,y,!0)[0],y.setDate(y.getDate()+1),v.setDate(v.getDate()+1),this._positionAllDayEvent(f,d),p(e,d,f,!0),f.appendTo(w);else f=this._createEventElement(r,!c),this._positionAllDayEvent(f,o[0]),p(e,o[0],f,!0),f.appendTo(w)}else if(this._isInTimeSlot(r))for(e=this.groups[t],e._continuousEvents||(e._continuousEvents=[]),o=e.slotRanges(r),k=o.length,h=0;h<k;h++)i=o[h],s=r.start,a=r.end,k>1&&(0===h?a=i.end.endDate():h==k-1?s=i.start.startDate():(s=i.start.startDate(),a=i.end.endDate())),nt=r.clone({start:s,end:a,_startTime:r._startTime,_endTime:r.endTime}),this._isInTimeSlot(nt)&&(rt=i.head,f=this._createEventElement(r,!c,rt,i.tail),f.appendTo(w),this._positionEvent(nt,f,i),p(e,i,f,!1))},render:function(t){var u,f,s,r;for(this._headerColumnCount=0,this._groups(),this.element.find(".k-event").remove(),t=new i.data.Query(t).sort([{field:"start",dir:"asc"},{field:"end",dir:"desc"}]).toArray(),u=[],this._eventsByResource(t,this.groupedResources,u),f=n.map(this._dates,function(t){return Math.max.apply(null,n.map(u,function(i){return n.grep(i,function(n){return n.isMultiDay()&&e(t,o(n.start),o(n.end))}).length}))}),s=Math.max.apply(null,f),this._updateAllDayHeaderHeight((s+1)*this._allDayHeaderHeight),r=0;r<u.length;r++)this._renderEvents(u[r],r);this.refreshLayout(),this._currentTime(!1),this.trigger("activate")},_eventsByResource:function(n,t,r){var s,u,h,o,e=t[0];if(e)for(s=e.dataSource.view(),u=0;u<s.length;u++)h=this._resourceValue(e,s[u]),o=new i.data.Query(n).filter({field:e.field,operator:f.groupEqFilter(h)}).toArray(),t.length>1?this._eventsByResource(o,t.slice(1),r):r.push(o);else r.push(n)},_columnOffsetForResource:function(n){return this._columnCountForLevel(n)/this._columnCountForLevel(n-1)},_columnCountForLevel:function(n){var t=this.columnLevels[n];return t?t.length:0},_rowCountForLevel:function(n){var t=this.rowLevels[n];return t?t.length:0},clearSelection:function(){this.content.add(this.datesHeader).find(".k-state-selected").removeAttr("id").attr("aria-selected",!1).removeClass("k-state-selected")},_updateDirection:function(n,t,i,r,u){var o=n.isAllDay,f=t[0].start,e=t[t.length-1].end;i&&(u?o||f.index!==e.index||f.collectionIndex!==e.collectionIndex||(n.backward=r):(o&&f.index===e.index||!o&&f.collectionIndex===e.collectionIndex)&&(n.backward=r))},_changeViewPeriod:function(n,t,i){var l,w,a,y,f,c,o,s,e,p,v;if(!i)return l=t?this.previousDate():this.nextDate(),w=n.start,a=n.end,y=this._isGroupedByDate()&&this._isVerticallyGrouped(),f=this.groups[n.groupIndex],c=t?f._timeSlotCollections:f._getCollections(f.daySlotCollectionCount()),o=c[c.length-1]._slots,s=t||f.daySlotCollectionCount()?o.length-1:0,n.start=new Date(l),n.end=new Date(l),y?(p=new Date(o[s].startDate()),v=new Date(o[s].endDate()),e=r(v)?r(v):u,h(n.start,r(p)),h(n.end,e),f.daySlotCollectionCount()&&(n.isAllDay=!n.isAllDay)):(e=n.isAllDay||!r(a)?u:r(a),h(n.start,r(w)),h(n.end,e)),this._isVerticallyGrouped()||(n.groupIndex=t?this.groups.length-1:0),n.events=[],!0}});c(!0,d,{MultiDayView:l,DayView:l.extend({options:{name:"DayView",title:"Day"},name:"day"}),WeekView:l.extend({options:{name:"WeekView",title:"Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"},name:"week",calculateDateRange:function(){for(var f=this.options.date,n=i.date.dayOfWeek(f,this.calendarInfo().firstDay,-1),r=[],t=0,u=7;t<u;t++)r.push(n),n=i.date.nextDay(n);this._render(r)}}),WorkWeekView:l.extend({options:{name:"WorkWeekView",title:"Work Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"},name:"workWeek",nextDate:function(){var n=i.date.dayOfWeek(i.date.nextDay(this.startDate()),this.calendarInfo().firstDay,1);return i.date.addDays(n,this._workDays[0])},previousDate:function(){var t=i.date.dayOfWeek(this.startDate(),this.calendarInfo().firstDay,-1),n=this._workDays;return i.date.addDays(t,n[n.length-1]-7)},calculateDateRange:function(){for(var u=this.options.date,t=i.date.dayOfWeek,e=t(u,this.calendarInfo().firstDay,-1),n=t(e,this.options.workWeekStart,1),f=t(n,this.options.workWeekEnd,1),r=[];n<=f;)r.push(n),n=i.date.nextDay(n);this._render(r)}})})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.scheduler.agendaview.min",["kendo.scheduler.view.min"],n)}(function(){return function(n){function h(n){for(var i=0,t=0,r=n.length;t<r;t++)i+=n[t].items.length;return i}function c(n,i){return n.valuePrimitive&&(i=t.getter(n.dataValueField)(i)),i}function s(n){for(var t,r=0,f=n.length,i=[];r<f;r++)t=n[r],t.groups?(t=u(t.groups),i=i.concat(t)):i=i.concat(u(t.items));return i}function u(n){for(var i=[].concat(n),t=i.shift(),u=[],r=[].push;t;)t.groups?r.apply(i,t.groups):t.items?r.apply(i,t.items):r.call(u,t),t=i.shift();return u}var t=window.kendo,i=t.ui,r=".kendoAgendaView",e='<div class="k-task" title="#:title.replace(/"/g,"\'")#" data-#=kendo.ns#uid="#=uid#"># if (resources[0]) {#<span class="k-scheduler-mark" style="background-color:#=resources[0].color#"></span># } ## if (data.isException()) { #<span class="k-icon k-i-non-recurrence"></span># } else if (data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #{0}#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}#</div>',o=t.Class.extend({init:function(n){this._view=n},_getColumns:function(n,t){return n.concat(t)},_getGroupsInDay:function(){return[]},_getSumOfItemsForDate:function(){return 0},_renderTaskGroupsCells:function(n,t,i,r){var u=this._view;0===i&&0===r&&t.length&&u._renderTaskGroupsCells(n,t)},_renderDateCell:function(n,i,r,u,f,e){var o=this._view;n.push(t.format('<td class="k-scheduler-datecolumn{3}{2}" rowspan="{0}">{1}</td>',r.length,o._dateTemplate({date:u}),f!=e.length-1||i.length?"":" k-last",i.length?"":" k-first"))},_renderDates:function(){},_getParents:function(n){return n.splice(0)},_getGroupsByDate:function(){},_renderTaskGroups:function(n,t,i){var r=this._view;n.append(r._renderTaskGroups(t,i))}}),f=t.Class.extend({init:function(n){this._view=n},_getColumns:function(n,t){var r,i,u=this._view;return u._isMobilePhoneView()?n.concat(t):(r=t.slice(0,1),i=t.slice(1),r.concat(n).concat(i))},_compareDateGroups:function(n,t,i){return n[i].text==t[i].text&&(0===i||this._compareDateGroups(n,t,i-1))},_getGroupsInDay:function(n,t){for(var e,i,s,f,r=[],o=null,u=0;u<n.length;u++)for(e=0;e<n[u].items.length;e++){if(i=0,0===r.length)for(i;i<t[u].length;i++)r.push([1]);else for(i;i<t[u].length;i++)if(this._compareDateGroups(t[u],o,i))r[i][r[i].length-1]++;else{for(s=r[i][r[i].length-1]-1,f=0;f<s;f++)r[i].push(0);r[i].push(1)}o=t[u]}return r},_getSumOfItemsForDate:function(n){for(var i=0,t=0;t<n.length;t++)i+=n[t].items.length;return i},_renderTaskGroupsCells:function(n,i,r,u,f,e,o,s){var h,c=this._view,l=c._isMobilePhoneView();if(l)0===r&&0===u&&i.length&&c._renderTaskGroupsCells(n,i);else for(0===r&&0===u&&n.push(t.format('<td class="k-scheduler-datecolumn k-first" rowspan="{0}">{1}</td>',e,c._dateTemplate({date:o}))),h=0;h<i[r].length;h++)f[h][s]&&n.push(t.format('<td class="k-scheduler-groupcolumn" rowspan="{0}">{1}</td>',f[h][s],c._groupTemplate({value:i[r][h].text}),i[r][h].className))},_renderDateCell:function(){},_renderDates:function(n){for(var r=this._view,i=r._groupsByDate.sort(function(n,t){return n.array[0].value.getTime()-t.array[0].value.getTime()}),t=0;t<i.length;t++)n.append(r._renderTaskGroups(i[t].array,i[t].groups))},_getParents:function(n){return n.slice(0)},_getGroupsByDate:function(n,t,i){var u,o,e,r,f=this._view;if(n[t].items)for(u=0;u<n[t].items.length;u++){for(o=n[t].items[u].value,e=!1,r=0;r<f._groupsByDate.length;r++)f._groupsByDate[r].array[0].value.getTime()===o.getTime()&&(e=!0,f._groupsByDate[r].array.push(n[t].items[u]),f._groupsByDate[r].groups.push(i));e||f._groupsByDate.push({array:[n[t].items[u]],groups:[i]})}},_renderTaskGroups:function(){}});t.ui.scheduler.AgendaGroupedView=o,t.ui.scheduler.AgendaGroupedByDateView=f,i.AgendaView=i.SchedulerView.extend({init:function(u,f){i.SchedulerView.fn.init.call(this,u,f),this._groupedView=this._getGroupedView(),f=this.options,f.editable&&(f.editable=n.extend({"delete":!0},f.editable,{create:!1,update:!1},{messages:f.messages})),this.title=f.title,this._eventTemplate=this._eventTmpl(f.eventTemplate,e),this._dateTemplate=t.template(f.eventDateTemplate),this._groupTemplate=t.template(f.eventGroupTemplate),this._timeTemplate=t.template(f.eventTimeTemplate),this.element.on("mouseenter"+r,".k-scheduler-agenda .k-scheduler-content tr","_mouseenter").on("mouseleave"+r,".k-scheduler-agenda .k-scheduler-content tr","_mouseleave").on("click"+r,".k-scheduler-agenda .k-scheduler-content .k-link:has(.k-i-close)","_remove"),this._renderLayout(f.date)},name:"agenda",_getGroupedView:function(){return this._isGroupedByDate()?new t.ui.scheduler.AgendaGroupedByDateView(this):new t.ui.scheduler.AgendaGroupedView(this)},_mouseenter:function(t){n(t.currentTarget).addClass("k-state-hover")},_mouseleave:function(t){n(t.currentTarget).removeClass("k-state-hover")},_remove:function(i){i.preventDefault(),this.trigger("remove",{uid:n(i.currentTarget).closest(".k-task").attr(t.attr("uid"))})},nextDate:function(){return t.date.nextDay(this.startDate())},startDate:function(){return this._startDate},endDate:function(){return this._endDate},previousDate:function(){return t.date.previousDay(this.startDate())},_renderLayout:function(n){this._startDate=n,this._endDate=t.date.addDays(n,7),this.createLayout(this._layout()),this.table.addClass("k-scheduler-agenda")},_layout:function(){var t,r,i,n=[{text:this.options.messages.time,className:"k-scheduler-timecolumn"},{text:this.options.messages.event}];if(this._isMobilePhoneView()||n.splice(0,0,{text:this.options.messages.date,className:"k-scheduler-datecolumn"}),t=this.groupedResources,t.length){for(r=[],i=0;i<t.length;i++)r.push({text:"",className:"k-scheduler-groupcolumn"});n=this._groupedView._getColumns(r,n)}return{columns:n}},_tasks:function(n){for(var r,u,f,e,i,o,h=[],s=0;s<n.length;s++)if(r=n[s],u=r.start,f=r.isAllDay?t.date.getDate(r.end):r.end,e=Math.ceil((f-t.date.getDate(u))/t.date.MS_PER_DAY),r.isAllDay&&(e+=1),i=r.clone(),i.startDate=t.date.getDate(u),i.startDate>=this.startDate()&&h.push(i),e>1)for(i.end=t.date.nextDay(u),i.head=!0,o=1;o<e;o++)u=i.end,i=r.clone(),i.start=i.startDate=t.date.getDate(u),i.end=t.date.nextDay(u),o==e-1?(i.end=new Date(i.start.getFullYear(),i.start.getMonth(),i.start.getDate(),f.getHours(),f.getMinutes(),f.getSeconds(),f.getMilliseconds()),i.tail=!0):(i.isAllDay=!0,i.middle=!0),(t.date.getDate(i.end)<=this.endDate()&&i.start>=this.startDate()||t.date.getDate(i.start).getTime()==this.endDate().getTime())&&h.push(i);return new t.data.Query(h).sort([{field:"start",dir:"asc"},{field:"end",dir:"asc"}]).groupBy({field:"startDate"}).toArray()},_renderTaskGroups:function(n,i){for(var o,s,l,f,r,e,h,c=[],y=this.options.editable,p=y&&y.destroy!==!1&&!this._isMobile(),a=this._isMobilePhoneView(),b=this._groupedView._getSumOfItemsForDate(n),w=this._groupedView._getGroupsInDay(n,i),v=0,u=0;u<n.length;u++)for(o=n[u].value,s=n[u].items,l=t.date.isToday(o),f=0;f<s.length;f++)r=s[f],e=[],h=a?[]:e,this._groupedView._renderTaskGroupsCells(h,i,u,f,w,b,o,v),v++,0===f&&(a?(h.push(t.format('<td class="k-scheduler-datecolumn" colspan="2">{0}</td>',this._dateTemplate({date:o}))),c.push('<tr role="row" aria-selected="false"'+(l?' class="k-today">':">")+h.join("")+"</tr>")):this._groupedView._renderDateCell(e,i,s,o,u,n)),r.format=r.head?"{0:t}":r.tail?"{1:t}":"{0:t}-{1:t}",r.resources=this.eventResources(r),e.push(t.format('<td class="k-scheduler-timecolumn"><div>{0}{1}{2}</div></td><td>{3}</td>',r.tail||r.middle?'<span class="k-icon k-i-arrow-60-left"></span>':"",this._timeTemplate(r.clone({start:r._startTime||r.start,end:r.endTime||r.end})),r.head||r.middle?'<span class="k-icon k-i-arrow-60-right"></span>':"",this._eventTemplate(r.clone({showDelete:p,messages:this.options.messages})))),c.push('<tr role="row" aria-selected="false"'+(l?' class="k-today">':">")+e.join("")+"</tr>");return c.join("")},_renderTaskGroupsCells:function(n,i){for(var r=0;r<i.length;r++)n.push(t.format('<td class="k-scheduler-groupcolumn{2}" rowspan="{0}">{1}</td>',i[r].rowSpan,this._groupTemplate({value:i[r].text}),i[r].className))},render:function(n){var r,u,i=this.content.find("table").empty(),t=[];n.length>0&&(r=this.groupedResources,r.length?(t=this._createGroupConfiguration(n,r,null),this._groupsByDate=[],this._renderGroups(t,i,[]),this._groupedView._renderDates(i)):(t=this._tasks(n),i.append(this._renderTaskGroups(t,[])))),u=this._eventsList=s(t),this._angularItems(i,u),this.refreshLayout(),this.trigger("activate")},_angularItems:function(n,i){this.angular("compile",function(){var r=[],u=i.map(function(i){return r.push({dataItem:i}),n.find(".k-task["+t.attr("uid")+"="+i.uid+"]")});return{elements:u,data:r}})},_renderGroups:function(n,t,i){for(var u,r=0,f=n.length;r<f;r++)u=this._groupedView._getParents(i),u.push(n[r]),this._groupedView._getGroupsByDate(n,r,u),n[r].groups?this._renderGroups(n[r].groups,t,u):this._groupedView._renderTaskGroups(t,n[r].items,u)},_createGroupConfiguration:function(n,r,u){for(var v,l,w,y,f,s,o=r[0],p=[],a=o.dataSource.view(),b=this._isMobilePhoneView(),e=0;e<a.length;e++)v=c(o,a[e]),l=new t.data.Query(n).filter({field:o.field,operator:i.SchedulerView.groupEqFilter(v)}).toArray(),l.length&&(w=this._tasks(l),y=u?"":" k-first",e===a.length-1&&(!u||u.className.indexOf("k-last")>-1)&&(y+=" k-last"),f={text:t.getter(o.dataTextField)(a[e]),value:v,rowSpan:0,className:y},r.length>1?(f.groups=this._createGroupConfiguration(l,r.slice(1),f),u&&(u.rowSpan+=f.rowSpan)):(f.items=w,s=h(f.items),b&&(s+=f.items.length),f.rowSpan=s,u&&(u.rowSpan+=s)),p.push(f));return p},selectionByElement:function(t){var r,i,u;if(t=n(t),!t.hasClass("k-scheduler-datecolumn")&&this._eventsList.length)return t.is(".k-task")&&(t=t.closest("td")),this._isMobile()?(u=t.parent(),r=u.parent().children().filter(function(){return n(this).children(":not(.k-scheduler-datecolumn)").length}).index(u)):r=t.parent().index(),i=this._eventsList[r],{index:r,start:i.start,end:i.end,isAllDay:i.isAllDay,uid:i.uid}},select:function(n){this.clearSelection();var t=this.table.find(".k-task").eq(n.index).closest("tr").addClass("k-state-selected").attr("aria-selected",!0)[0];this.current(t)},move:function(n,i){var r,f=!1,u=n.index;return i==t.keys.UP?(u--,f=!0):i==t.keys.DOWN&&(u++,f=!0),f&&(r=this._eventsList[u],r&&(n.start=r.start,n.end=r.end,n.isAllDay=r.isAllDay,n.events=[r.uid],n.index=u)),f},moveToEvent:function(){return!1},constrainSelection:function(n){var t=this._eventsList[0];t&&(n.start=t.start,n.end=t.end,n.isAllDay=t.isAllDay,n.events=[t.uid],n.index=0)},isInRange:function(){return!0},destroy:function(){this.element&&this.element.off(r),i.SchedulerView.fn.destroy.call(this)},options:{title:"Agenda",name:"agenda",editable:!0,selectedDateFormat:"{0:D}-{1:D}",selectedShortDateFormat:"{0:d} - {1:d}",eventTemplate:"#:title#",eventTimeTemplate:"#if(data.isAllDay) {##=this.options.messages.allDay##} else { ##=kendo.format(format, start, end)## } #",eventDateTemplate:'<strong class="k-scheduler-agendaday">#=kendo.toString(date, "dd")#</strong><em class="k-scheduler-agendaweek">#=kendo.toString(date,"dddd")#</em><span class="k-scheduler-agendadate">#=kendo.toString(date, "y")#</span>',eventGroupTemplate:'<strong class="k-scheduler-adgendagroup">#=value#</strong>',messages:{event:"Event",date:"Date",time:"Time",allDay:"all day"}}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.scheduler.monthview.min",["kendo.scheduler.view.min"],n)}(function(){return function(n){function k(n,t){return n.slice(t).concat(n.slice(0,t))}function p(n,i){for(var u=i.firstDay,r=new Date(n.getFullYear(),n.getMonth(),0,n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds());r.getDay()!=u;)t.date.setTime(r,-1*w);return r}function f(n,t,i){var r,f=t,u=i;return r=n,r>=f&&r<=u}var t=window.kendo,h=t.ui,r=h.SchedulerView,e=".kendoMonthView",o=n.extend,s=t.date.getDate,w=t.date.MS_PER_DAY,u=6,i=7,b=t.template('<span class="k-link k-nav-day">#:kendo.toString(date, "dd")#</span>'),y='<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color #; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#"#} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-60-left"></span>#}## if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span>#}#</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}## if(data.head || data.middle) {#<span class="k-icon k-i-arrow-60-right"></span>#}#</span># if(resizable && !data.tail && !data.middle) {#<span class="k-resize-handle k-resize-w"></span>#}## if(resizable && !data.head && !data.middle) {#<span class="k-resize-handle k-resize-e"></span>#}#</div>',l=t.template('<div title="#=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template">#:title#</div></div>'),c=t.template('<div style="width:#=width#px;left:#=left#px;top:#=top#px" class="k-more-events k-button"><span>...</span></div>'),v=t.Class.extend({init:function(n){this._view=n},_verticalRowCountForLevel:function(n){var t=this._view;return t._rowCountForLevel(n)},_horizontalGroupCountForLevel:function(n){var t=this._view;return t._columnCountForLevel(n)},_getCalendarRowsLength:function(n,t){return t/n},_createRows:function(n,t,r,u){for(var o=this._view,s=i,h=o._isVerticallyGrouped(),e="",f=0;f<r;f++)e+=o._createRow(n,t,s,h?u:f);return e},_adjustStartDate:function(n){return t.date.addDays(n,i)},_getContent:function(n,t,i){return n({date:t,resources:i})},_getTimeSlotByPosition:function(n,t,i){var r=this._view.groups[i];return r.daySlotByPosition(n,t)},_nextSlotStartDate:function(n){return t.date.nextDay(n)},_createRowsLayout:function(n,t,i){var r=this._view;return r._createRowsLayout(n,t,i)},_createVerticalColumnsLayout:function(n,t,i,r){return r},_createColumnsLayout:function(n,t,i){var r=this._view;return r._createColumnsLayout(n,t,i)},_verticalGroupCount:function(n){var t=this._view;return t._rowCountForLevel(n)},_horizontalGroupCount:function(n){var t=this._view;return t._columnCountForLevel(n)/t._columnOffsetForResource(n)},_positionEvent:function(n,t,i,r,u,f,e){var s,o=this._view,h=o._isMobilePhoneView();r>1&&(0===e?f=i.end.endDate():e==r-1?u=i.start.startDate():(u=i.start.startDate(),f=i.end.endDate())),s=n.clone({start:u,end:f,head:i.head,tail:i.tail}),h?o._positionMobileEvent(i,o._createEventElement(s),t):o._positionEvent(i,o._createEventElement(s),t)},_addDaySlotCollections:function(n,r,f){for(var o,a,l,b,k,y,d,h,c,w,s=this._view,v=i,p=u,e=0;e<n;e++)for(o=0,a=0,s._isVerticallyGrouped()&&(a=e),l=a*p;l<(a+1)*p;l++)for(b=s.groups[e],k=b.addDaySlotCollection(t.date.addDays(f,o),t.date.addDays(f,o+v)),y=r[l],d=y.children,h=0,y.setAttribute("role","row"),s._isVerticallyGrouped()||(h=e),c=h*v;c<(h+1)*v;c++)w=d[c],s.addDaySlot(k,w,f,o),o++},_changePeriodGroupIndex:function(n){var t=this._view;return n?t.groups.length-1:0},_createResizeHint:function(n){var t=this._view,e=n.startSlot().offsetLeft,o=n.start.offsetTop,f=n.innerWidth(),i=n.start.clientHeight-2,u=r.fn._createResizeHint.call(t,e,o,f,i);t._appendResizeHint(u)},_createMoveHint:function(n,t){var u=this._view,i=n.startSlot(),f=n.endSlot(),r=u._createEventElement(t.clone({head:n.head,tail:n.tail}));r.css({left:i.offsetLeft+2,top:i.offsetTop+i.firstChildHeight,height:u.options.eventHeight,width:n.innerWidth()-(i.index!==f.index?5:4)}),r.addClass("k-event-drag-hint"),u._appendMoveHint(r)}}),a=t.Class.extend({init:function(n){this._view=n},_verticalRowCountForLevel:function(){return 1},_horizontalGroupCountForLevel:function(n){var t=this._view;return t._columnCountForLevel(n+1)/i},_createRows:function(n,r,f){var s,l,o=this._view,c=i,a=o._isVerticallyGrouped(),h="",e=0;if(a){for(s=new Date(n),l=o._groupCount(),e;e<u;e++)h+=o._createRow(s,r,l,e),s=t.date.addDays(s,c);n=t.date.nextDay(n)}else{for(e;e<c;e++)h+=o._createRow(n,r,f,e),n=t.date.nextDay(n);n=t.date.addDays(n,c)}return h},_adjustStartDate:function(n,r){var e=this._view,f=e._isVerticallyGrouped();return f?r?t.date.addDays(n,i*(u-1)+1):t.date.nextDay(n):t.date.addDays(n,i)},_getContent:function(n,t,i,r){return 0===r?n({date:t,resources:i}):""},_getTimeSlotByPosition:function(n,t,i){var r=this._view.groups[i];return r.daySlotByPosition(n,t,!0)},_nextSlotStartDate:function(n){return n},_getCalendarRowsLength:function(){var t=this._view,n=t._isVerticallyGrouped();return n?i:u},_createRowsLayout:function(n,t,i,r){var u=this._view;return u._createDateLayout(r,null,!1)},_createVerticalColumnsLayout:function(n,i,r){for(var s,c=this._view,f=n[0],h=[],e=f.dataSource.view(),o=0;o<e.length*u;o++)s={text:r({text:t.htmlEncode(t.getter(f.dataTextField)(e[o%e.length])),color:t.getter(f.dataColorField)(e[o%e.length]),field:f.field,title:f.title,name:f.name,value:t.getter(f.dataValueField)(e[o%e.length])}),className:"k-slot-cell"},s.columns=c._createColumnsLayout(n.slice(1),null,r),h.push(s);return h},_createColumnsLayout:function(n,t,i,r){var u=this._view;return u._createColumnsLayout(n,t,i,r,!0)},_verticalGroupCount:function(n){var t=this._view;return t._columnCountForLevel(n)/u},_horizontalGroupCount:function(n){var t=this._view;return t._columnCountForLevel(n)/i},_positionEvent:function(n,t,i,r,u,f){for(var s,h,c,o=this._view,a=i.start.index,l=i.end.index,v=o._isMobilePhoneView(),e=i.start.index;e<=i.end.index;e++)s=i.collection._slots[e],h=t.daySlotRanges(s.start,s.start,!0)[0],c=n.clone({start:e===a?s.start:u,end:e===l?s.end:f,head:e!==l||i.head,tail:e!==a||i.tail}),v?o._positionMobileEvent(h,o._createEventElement(c),t):o._positionEvent(h,o._createEventElement(c),t)},_addDaySlotCollections:function(n,r,f){for(var e,w,b,y,g,h,s,l,d,tt,nt,a,k,c=this._view,v=i,it=u,p=c._isVerticallyGrouped(),o=0;o<v;o++)for(e=0;e<it;e++)for(w=0,b=p?o:e,y=r[b],g=y.children,h=0,y.setAttribute("role","row"),c._isVerticallyGrouped()||(h=o),s=h*n;s<(h+1)*n;s++)l=e*v+o,d=p?s+e*n:s,tt=g[d],nt=p?s:w,a=c.groups[nt],k=0===o?a.addDaySlotCollection(t.date.addDays(f,l),t.date.addDays(f,l+v)):a._daySlotCollections[e],c.addDaySlot(k,tt,f,l),w++},_changePeriodGroupIndex:function(n,t,i){var r=this._view;return t&&r._isVerticallyGrouped()?n?r.groups.length-1:0:i},_createResizeHint:function(n){var f,s,o,e,h,u,i,t=this._view;if(t._isVerticallyGrouped())f=n.startSlot().offsetLeft,s=n.start.offsetTop,o=n.startSlot().offsetWidth,e=n.endSlot().offsetTop+n.startSlot().offsetHeight-n.startSlot().offsetTop-2,h=r.fn._createResizeHint.call(t,f,s,o,e),t._appendResizeHint(h);else for(u=n.startSlot().index;u<=n.endSlot().index;u++)i=n.collection._slots[u],f=i.offsetLeft,s=i.offsetTop,o=i.offsetWidth,e=i.offsetHeight-2,h=r.fn._createResizeHint.call(t,f,s,o,e),t._appendResizeHint(h)},_createMoveHint:function(n,t){for(var i,r,f=this._view,o=n.startSlot(),e=n.endSlot(),u=o.index;u<=e.index;u++)i=n.collection._slots[u],r=f._createEventElement(t.clone({head:n.head,tail:n.tail})),r.css({left:i.offsetLeft,top:i.offsetTop+i.firstChildHeight,height:f.options.eventHeight,width:i.offsetWidth-2}),r.addClass("k-event-drag-hint"),f._appendMoveHint(r)}});t.ui.scheduler.MonthGroupedView=v,t.ui.scheduler.MonthGroupedByDateView=a,h.MonthView=r.extend({init:function(n,t){var i=this;r.fn.init.call(i,n,t),i._groupedView=i._getGroupedView(),i.title=i.options.title,i._templates(),i._editable(),i._renderLayout(i.options.date),i._groups()},name:"month",_getGroupedView:function(){return this._isGroupedByDate()?new t.ui.scheduler.MonthGroupedByDateView(this):new t.ui.scheduler.MonthGroupedView(this)},_updateDirection:function(n,t,i,r,u){var o,s,e,f,h;i&&(o=t[0].start,s=t[t.length-1].end,e=o.index===s.index,f=o.collectionIndex===s.collectionIndex,h=u?e&&f||f:e&&f,h&&(n.backward=r))},_changeDate:function(n,t,i){var u,r,e,f=this.groups[n.groupIndex];if(i){if(u=f._getCollections(f.daySlotCollectionCount()),r=t.collectionIndex-1,r>=0)return u[r]._slots[u[r]._slots.length-1]}else if(u=f._getCollections(f.daySlotCollectionCount()),r=t.collectionIndex+1,e=0,u[r]&&u[r]._slots[e])return u[r]._slots[e]},_getNextHorizontalRange:function(n,t,i){var r=this._isVerticallyGrouped();return i.startSlot=n[t](i.startSlot,r),i.endSlot=n[t](i.endSlot,r),i},_getNextVerticalRange:function(n,t,i,r){var u=this._isVerticallyGrouped()&&this._isGroupedByDate();return i.startSlot=n[t](i.startSlot,r,u),i.endSlot=n[t](i.endSlot,r,u),i},_changeViewPeriod:function(n,i,r){var u=r?7:1;return i&&(u*=-1),n.start=t.date.addDays(n.start,u),n.end=t.date.addDays(n.end,u),(!r||r&&this._isVerticallyGrouped())&&(n.groupIndex=this._groupedView._changePeriodGroupIndex(i,r,n.groupIndex)),n.events=[],!0},_continuousSlot:function(n,t,i){var u=n.backward?0:t.length-1,r=this.groups[n.groupIndex];return r.continuousSlot(t[u].start,i)},_changeGroupContinuously:function(n,t,i,r){var u,f,e,o;return i||(u=n.groupIndex,f=this.groups.length-1,e=this._isVerticallyGrouped(),o=this.groups[u],!t&&e?(t=o[r?"lastSlot":"firstSlot"](),u+=r?-1:1):t&&!e&&(u=r?f:0),(u<0||u>f)&&(u=r?f:0,t=null),n.groupIndex=u),t},_normalizeHorizontalSelection:function(n,t,i){var r;return r=i?t[0].start:t[t.length-1].end},_normalizeVerticalSelection:function(n,t){var i;return i=n.backward?t[0].start:t[t.length-1].end},_templates:function(){var n=this.options,i=o({},t.Template,n.templateSettings);this.eventTemplate=this._eventTmpl(n.eventTemplate,y),this.dayTemplate=t.template(n.dayTemplate,i),this.groupHeaderTemplate=t.template(n.groupHeaderTemplate,i)},dateForTitle:function(){return t.format(this.options.selectedDateFormat,this._firstDayOfMonth,this._lastDayOfMonth)},shortDateForTitle:function(){return t.format(this.options.selectedShortDateFormat,this._firstDayOfMonth,this._lastDayOfMonth)},nextDate:function(){return t.date.nextDay(this._lastDayOfMonth)},previousDate:function(){return t.date.previousDay(this._firstDayOfMonth)},startDate:function(){return this._startDate},endDate:function(){return this._endDate},_renderLayout:function(i){var r=this;this._firstDayOfMonth=t.date.firstDayOfMonth(i),this._lastDayOfMonth=t.date.lastDayOfMonth(i),this._startDate=p(i,this.calendarInfo()),this.createLayout(this._layout()),this._content(),this.refreshLayout(),this.content.on("click"+e,".k-nav-day,.k-more-events",function(t){var i=n(t.currentTarget).offset(),u=r._slotByPosition(i.left,i.top);t.preventDefault(),r.trigger("navigate",{view:"day",date:u.startDate()})})},_editable:function(){this.options.editable&&!this._isMobilePhoneView()&&(this._isMobile()?this._touchEditable():this._mouseEditable())},_mouseEditable:function(){var i=this;i.element.on("click"+e,".k-scheduler-monthview .k-event a:has(.k-i-close)",function(r){i.trigger("remove",{uid:n(this).closest(".k-event").attr(t.attr("uid"))}),r.preventDefault()}),i.options.editable.create!==!1&&i.element.on("dblclick"+e,".k-scheduler-monthview .k-scheduler-content td",function(t){var u,f=n(t.currentTarget).offset(),r=i._slotByPosition(f.left,f.top);r&&(u=i._resourceBySlot(r),i.trigger("add",{eventInfo:o({isAllDay:!0,start:r.startDate(),end:r.startDate()},u)})),t.preventDefault()}),i.options.editable.update!==!1&&i.element.on("dblclick"+e,".k-scheduler-monthview .k-event",function(r){i.trigger("edit",{uid:n(this).closest(".k-event").attr(t.attr("uid"))}),r.preventDefault()})},_touchEditable:function(){var i=this,r=0;t.support.mobileOS.android&&(r=5),i.options.editable.create!==!1&&(i._addUserEvents=new t.UserEvents(i.element,{threshold:r,filter:".k-scheduler-monthview .k-scheduler-content td",tap:function(t){var u,f=n(t.target).offset(),r=i._slotByPosition(f.left,f.top);r&&(u=i._resourceBySlot(r),i.trigger("add",{eventInfo:o({isAllDay:!0,start:r.startDate(),end:r.startDate()},u)})),t.preventDefault()}})),i.options.editable.update!==!1&&(i._editUserEvents=new t.UserEvents(i.element,{threshold:r,filter:".k-scheduler-monthview .k-event",tap:function(r){0===n(r.event.target).closest("a:has(.k-i-close)").length&&(i.trigger("edit",{uid:n(r.target).closest(".k-event").attr(t.attr("uid"))}),r.preventDefault())}}))},selectionByElement:function(t){var i=n(t).offset();return this._slotByPosition(i.left,i.top)},_columnCountForLevel:function(n){var t=this.columnLevels[n];return t?t.length:0},_rowCountForLevel:function(n){var t=this.rowLevels[n];return t?t.length:0},_content:function(){var n,t="<tbody>",r=1,u=this._groupedView,i=this.groupedResources;for(i.length&&this._isVerticallyGrouped()&&(r=u._verticalRowCountForLevel(i.length-1)),n=0;n<r;n++)t+=this._createCalendar(n);t+="</tbody>",this.content.find("table").html(t)},_createCalendar:function(n){var s,f,l,r=this.startDate(),p=i*u,a=i,v=[r],o="",c=1,y=this._isVerticallyGrouped(),e=this._groupedView,h=this.groupedResources;for(h.length&&(y||(c=e._horizontalGroupCountForLevel(h.length-1))),this._slotIndices={},s=e._getCalendarRowsLength(a,p),f=0;f<s;f++)o+="<tr>",v.push(r),l=f*a,o+=e._createRows(r,l,c,n),r=e._adjustStartDate(r,f===s-1),o+="</tr>";return this._weekStartDates=v,this._endDate=t.date.previousDay(r),o},_createRow:function(n,i,r,u){for(var o=this,a=o._firstDayOfMonth,v=o._lastDayOfMonth,y=o.dayTemplate,e="",f="",c=this._groupedView,l=function(){return o._resourceBySlot({groupIndex:u})},h=0;h<r;h++)e="",t.date.isToday(n)&&(e+="k-today"),t.date.isInDateRange(n,a,v)||(e+=" k-other-month"),f+="<td ",""!==e&&(f+='class="'+e+'"'),f+=">",f+=c._getContent(y,n,l,h),f+="</td>",o._slotIndices[s(n).getTime()]=i+h,n=c._nextSlotStartDate(n);return f},_layout:function(){var o,r,f,e=this.calendarInfo(),s=this._isMobile()?e.days.namesShort:e.days.names,h=k(s,e.firstDay),t=n.map(h,function(n){return{text:n}}),i=this.groupedResources,u=this._groupedView;if(i.length)if(this._isVerticallyGrouped()){for(r=[],f=0;f<6;f++)r.push({text:"<div>&nbsp;</div>",className:"k-hidden k-slot-cell"});o=u._createRowsLayout(i,r,this.groupHeaderTemplate,t),t=u._createVerticalColumnsLayout(i,r,this.groupHeaderTemplate,t)}else t=u._createColumnsLayout(i,t,this.groupHeaderTemplate,t);return{columns:t,rows:o}},_createEventElement:function(i){var u,e=this.options,r=e.editable,f=this._isMobile();return i.showDelete=r&&r.destroy!==!1&&!f,i.resizable=r&&r.resize!==!1&&!f,i.ns=t.ns,i.resources=this.eventResources(i),i.inverseColor=!(!i.resources||!i.resources[0])&&this._shouldInverseResourceColor(i.resources[0]),i.messages=e.messages||{destroy:"Delete"},u=n(this.eventTemplate(i)),this.angular("compile",function(){return{elements:u,data:[{dataItem:i}]}}),u},_isInDateSlot:function(n){var o=this.groups[0],u=o.firstSlot().start,e=o.lastSlot().end-1,i=t.date.toUtcTime(n.start),r=t.date.toUtcTime(n.end);return(f(i,u,e)||f(r,u,e)||f(u,i,r)||f(e,i,r))&&(!f(r,u,u)||f(r,i,i)||n.isAllDay)},_slotIndex:function(n){return this._slotIndices[s(n).getTime()]},_positionMobileEvent:function(i,u,f){var o,h,a,c,v,l,s,e=i.start;i.start.offsetLeft>i.end.offsetLeft&&(e=i.end),o=i.start.index,h=o,a=3,c=r.collidingEvents(i.events(),o,h),c.push({element:u,start:o,end:h}),v=r.createRows(c),l=i.collection.at(o),s=l.container,s||(s=n(t.format('<div class="k-events-container" style="top:{0};left:{1};width:{2}"/>',e.offsetTop+e.firstChildTop+e.firstChildHeight-3+"px",e.offsetLeft+"px",e.offsetWidth+"px")),l.container=s,this.content[0].appendChild(s[0])),v.length<=a&&(i.addEvent({element:u,start:o,end:h,groupIndex:e.groupIndex}),f._continuousEvents.push({element:u,uid:u.attr(t.attr("uid")),start:i.start,end:i.end}),s[0].appendChild(u[0]))},_positionEvent:function(i,u,f){var a,l,v,w,g,p,o,tt,k,d,y,nt,s,it,e,b=this.options.eventHeight,h=i.start;for(i.start.offsetLeft>i.end.offsetLeft&&(h=i.end),a=i.start.index,l=i.end.index,v=h.eventCount,w=r.collidingEvents(i.events(),a,l),g=a!==l?5:4,w.push({element:u,start:a,end:l}),p=r.createRows(w),o=0,tt=Math.min(p.length,v);o<tt;o++)for(k=p[o].events,d=h.offsetTop+h.firstChildHeight+o*b+3*o+"px",y=0,nt=k.length;y<nt;y++)k[y].element[0].style.top=d;if(p.length>v)for(s=a;s<=l;s++){if(it=i.collection,e=it.at(s),e.more)return;e.more=n(c({ns:t.ns,start:s,end:s,width:e.clientWidth-2,left:e.offsetLeft+2,top:e.offsetTop+e.firstChildHeight+v*b+3*v})),this.content[0].appendChild(e.more[0])}else i.addEvent({element:u,start:a,end:l,groupIndex:h.groupIndex}),u[0].style.width=i.innerWidth()-g+"px",u[0].style.left=h.offsetLeft+2+"px",u[0].style.height=b+"px",f._continuousEvents.push({element:u,uid:u.attr(t.attr("uid")),start:i.start,end:i.end}),u.appendTo(this.content)},_slotByPosition:function(n,t){var i,u,r=this.content.offset();for(n-=r.left,t-=r.top,t+=this.content[0].scrollTop,n+=this.content[0].scrollLeft,n=Math.ceil(n),t=Math.ceil(t),i=0;i<this.groups.length;i++)if(u=this._groupedView._getTimeSlotByPosition(n,t,i))return u;return null},_appendResizeHint:function(n){n.appendTo(this.content),this._resizeHint=this._resizeHint.add(n)},_updateResizeHint:function(n,i,r,u){var o,e,f;for(this._removeResizeHint(),o=this.groups[i],e=o.ranges(r,u,!0,n.isAllDay),f=0;f<e.length;f++)this._groupedView._createResizeHint(e[f]);this._resizeHint.find(".k-label-top,.k-label-bottom").text(""),this._resizeHint.first().addClass("k-first").find(".k-label-top").text(t.toString(t.timezone.toLocalDate(r),"M/dd")),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(t.toString(t.timezone.toLocalDate(u),"M/dd"))},_updateMoveHint:function(n,i,r){var u,e=t.date.toUtcTime(n.start)+r,o=e+n.duration(),s=this.groups[i],f=s.ranges(e,o,!0,n.isAllDay);for(this._removeMoveHint(),u=0;u<f.length;u++)this._groupedView._createMoveHint(f[u],n)},_appendMoveHint:function(n){n.appendTo(this.content),this._moveHint=this._moveHint.add(n)},_groups:function(){var n,t=this._groupCount(),r=this.content[0].getElementsByTagName("tr"),i=this.startDate();for(this.groups=[],n=0;n<t;n++)this._addResourceView(n);this._groupedView._addDaySlotCollections(t,r,i)},addDaySlot:function(n,i,r,u){var o,s=i.clientHeight,h=i.children.length?i.children[0].offsetHeight+3:0,f=t.date.addDays(r,u),e=t.date.MS_PER_DAY;r.getHours()!==f.getHours()&&(e+=(r.getHours()-f.getHours())*t.date.MS_PER_HOUR),f=t.date.toUtcTime(f),e+=f,o=Math.floor((s-h-this.options.moreButtonHeight)/(this.options.eventHeight+3)),i.setAttribute("role","gridcell"),i.setAttribute("aria-selected",!1),n.addDaySlot(i,f,e,o)},render:function(n){this.content.children(".k-event,.k-more-events,.k-events-container").remove(),this._groups(),n=new t.data.Query(n).sort([{field:"start",dir:"asc"},{field:"end",dir:"desc"}]).toArray();var i=this.groupedResources;i.length?this._renderGroups(n,i,0,1):this._renderEvents(n,0),this.refreshLayout(),this.trigger("activate")},_renderEvents:function(n,t){for(var i,r,o,e,u,l,s,h,f=0,c=n.length;f<c;f++)if(i=n[f],this._isInDateSlot(i))for(r=this.groups[t],r._continuousEvents||(r._continuousEvents=[]),o=r.slotRanges(i,!0),e=o.length,u=0;u<e;u++)l=o[u],s=i.start,h=i.end,this._groupedView._positionEvent(i,r,l,e,s,h,u)},_renderGroups:function(n,i,u,f){var h,e,c,s,o=i[0];if(o)for(h=o.dataSource.view(),e=0;e<h.length;e++)c=this._resourceValue(o,h[e]),s=new t.data.Query(n).filter({field:o.field,operator:r.groupEqFilter(c)}).toArray(),i.length>1?u=this._renderGroups(s,i.slice(1),u++,f+1):this._renderEvents(s,u++);return u},_groupCount:function(){var n=this.groupedResources,t=this._groupedView;return n.length?this._isVerticallyGrouped()?t._verticalGroupCount(n.length-1):t._horizontalGroupCount(n.length):1},_columnOffsetForResource:function(n){return this._columnCountForLevel(n)/this._columnCountForLevel(n-1)},destroy:function(){this.table&&this.table.removeClass("k-scheduler-monthview"),this.content&&this.content.off(e),this.element&&this.element.off(e),r.fn.destroy.call(this),this._isMobile()&&!this._isMobilePhoneView()&&this.options.editable&&(this.options.editable.create!==!1&&this._addUserEvents.destroy(),this.options.editable.update!==!1&&this._editUserEvents.destroy())},events:["remove","add","edit","navigate"],options:{title:"Month",name:"month",eventHeight:25,moreButtonHeight:13,editable:!0,selectedDateFormat:"{0:y}",selectedShortDateFormat:"{0:y}",groupHeaderTemplate:"#=text#",dayTemplate:b,eventTemplate:l}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.scheduler.recurrence.min",["kendo.dropdownlist.min","kendo.datepicker.min","kendo.numerictextbox.min"],n)}(function(){return function(n,t){function y(n,t){var i;return 0!==n&&n<t?i=t-n:(i=n%t,i&&(i=t-i)),i}function wt(n){var t=n.getMonth(),i=ti(n)?hr[t]:ur[t];return i+n.getDate()}function ct(n,i){var f,u;return n=new Date(n.getFullYear(),n.getMonth(),n.getDate()),r(n,0),f=n.getFullYear(),i!==t?(c(n,i,-1),n.setDate(n.getDate()+4)):n.setDate(n.getDate()+(4-(n.getDay()||7))),r(n,0),u=Math.floor((n.getTime()-new Date(f,0,1,-6))/864e5),1+Math.floor(u/7)}function h(n,t){var r=or(n).getDay(),i=7-(r+7-(t||7))||7;return i<0&&(i+=7),Math.ceil((n.getDate()-i)/7)+1}function a(n,t){return n+(n<t?7:0)}function pt(n,t,i){var e,u,o,s,f,r=t.offset;return r?(e=new Date(n.getFullYear(),n.getMonth()+1,0),u=h(e,i),o=a(t.day,i),s=o<a(new Date(n.getFullYear(),n.getMonth(),1).getDay(),i),f=o>a(e.getDay(),i),r<0?r=u+(r+1-(f?1:0)):s&&(r+=1),u-=f?1:0,r<(s?1:0)||r>u?null:r):h(n,i)}function si(n,t){return h(new Date(n.getFullYear(),n.getMonth()+1,0),t)}function tr(n,t,i){return h(n,i)===pt(n,t,i)}function yi(n,t,i){for(var u,r,s,o,c=a(t.getDay(),i),l=n.length,f=[],e=0;e<l;e++)if(r=n[e],o=h(t,i),u=pt(t,r,i),null!==u)if(o<u)f.push(r);else if(o===u)if(s=a(r.day,i),c<s)f.push(r);else if(c===s)return null;return f}function l(n,t,i){for(var r,u=0,e=n.length,f=[];u<e;u++){if(r=n[u],i&&(r=i(r)),t===r)return null;t<r&&f.push(r)}return f}function e(n,t){for(var i,r=0,u=n.length;r<u;r++){if(i=parseInt(n[r],10),isNaN(i)||i<t.start||i>t.end||0===i&&t.start<0)return null;n[r]=i}return n.sort(k)}function ki(n){for(var r,f,i,u=0,e=n.length;u<e;u++){if(r=n[u],f=r.length,i=r.substring(f-2).toUpperCase(),i=bt[i],i===t)return null;n[u]={offset:parseInt(r.substring(0,f-2),10)||0,day:i}}return n}function wi(n){for(var t,i,r=0,f=n.length,u=[];r<f;r++)t=n[r],"string"==typeof t?i=t:(i=""+kt[t.day],t.offset&&(i=t.offset+i)),u.push(i);return""+u}function ai(n){var t=n.getMonth();return 1===t?1===new Date(n.getFullYear(),1,29).getMonth()?29:28:fr[t]}function ti(n){return n=n.getFullYear(),n%4==0&&n%100!=0||n%400==0}function k(n,t){return n-t}function ii(n,t){var f,i,r=0,u=[];if(n)for(n=n.split(n.indexOf(";")!==-1?";":","),f=n.length;r<f;r++)i=nt(n[r],t),i&&u.push(i);return u}function ft(t,i,r){for(var f=n.isArray(t)?t:ii(t,r),o=i.getTime()-i.getMilliseconds(),u=0,e=f.length;u<e;u++)if(f[u].getTime()===o)return!0;return!1}function ri(n,t){for(var r,u=0,f=[].concat(n),e=f.length;u<e;u++)r=f[u],r=i.timezone.convert(r,t||r.getTimezoneOffset(),"Etc/UTC"),f[u]=i.toString(r,hi);return f.join(",")}function sr(n,t){var i=new Date(n);switch(t.freq){case"yearly":i.setFullYear(i.getFullYear(),0,1);break;case"monthly":i.setFullYear(i.getFullYear(),i.getMonth(),1);break;case"weekly":c(i,t.weekStart,-1)}return t.hours&&i.setHours(0),t.minutes&&i.setMinutes(0),t.seconds&&i.setSeconds(0),i}function et(n,t){var i=new Date(n);switch(t.freq){case"yearly":i.setFullYear(i.getFullYear(),11,31);break;case"monthly":i.setFullYear(i.getFullYear(),i.getMonth()+1,0);break;case"weekly":c(i,t.weekStart,-1),i.setDate(i.getDate()+6)}return t.hours&&i.setHours(23),t.minutes&&i.setMinutes(59),t.seconds&&i.setSeconds(59),i}function nr(n,t,i){for(var r,f,s=n.length,e=[],u=0,o=i.length;u<o;u++)r=i[u],r<0?r=s+r:r-=1,f=n[r],f&&f.start>=t&&e.push(f);return e}function gi(n,t,i){for(var u,f=[],r=0;r<n.length;r++)u=n[r],ft(t,u.start,i)||f.push(u);return f}function rr(n,i,r,f){var b,rt,it,l,st,ht,ut,ot,vt,nt,g,at,k,a,ct,d,o,v,s,y,c,tt,lt,e=w(n.recurrenceRule,f),h=[];if(!e)return[n];for(y=e.positions,c=y?0:1,nt=e.start,g=e.end,(nt||g)&&(n=n.clone({start:nt?new Date(nt.value[0]):t,end:g?new Date(g.value[0]):t})),o=n.start,d=o.getTime(),ct=p(o),a=ii(n.recurrenceException,f),!a[0]&&e.exdates&&(a=e.exdates.value,n.set("recurrenceException",ri(a,f))),ot=i=new Date(i),r=new Date(r),k=e.freq,s=li[k],v=e.count,e.until&&e.until<r&&(r=new Date(e.until)),at="yearly"===k||"monthly"===k||"weekly"===k,i<d||v||e.interval>1||at?i=new Date(d):(l=i.getHours(),st=i.getMinutes(),ht=i.getSeconds(),e.hours||(l=o.getHours()),e.minutes||(st=o.getMinutes()),e.seconds||(ht=o.getSeconds()),i.setHours(l,st,ht,o.getMilliseconds())),e._startPeriod=new Date(i),y&&(i=sr(i,e),r=et(r,e),lt=p(r)-p(i),lt<0&&(l=i.getHours(),r.setHours(l,i.getMinutes(),i.getSeconds(),i.getMilliseconds()),u.adjustDST(r,l)),e._startPeriod=new Date(i),e._endPeriod=et(i,e)),ut=n.duration(),e._startTime=b=u.toInvariantTime(i),s.setup&&s.setup(e,o,i),s.limit(i,r,e);i<=r;)if(it=new Date(i),di(it,ut),vt=i>=ot||it>ot,(vt&&!ft(a,i,f)||y)&&(b=u.toUtcTime(u.getDate(i))+p(e._startTime),rt=b+ut,d!==i.getTime()||ct!==p(e._startTime)?h.push(n.toOccurrence({start:new Date(i),end:it,_startTime:b,_endTime:rt})):(n._startTime=b,n._endTime=rt,h.push(n))),y){if(s.next(i,e),s.limit(i,r,e),i>e._endPeriod&&(tt=nr(h.slice(c),o,y),tt=gi(tt,a,f),h=h.slice(0,c).concat(tt),e._endPeriod=et(i,e),c=h.length),v&&v===c)break}else{if(v&&v===c)break;c+=1,s.next(i,e),s.limit(i,r,e)}return h}function nt(n,t){return n=i.parseDate(n,er),n&&t&&(n=ut.convert(n,n.getTimezoneOffset(),t)),n}function it(n,t){for(var e,f,i,o,r,c,s=n.split(";"),u=0,h=s.length;u<h;u++)if(e=s[u].split(":"),f=e[0],i=e[1],f.indexOf("TZID")!==-1&&(o=f.substring(f.indexOf("TZID")).split("=")[1]),i)for(i=i.split(","),r=0,c=i.length;r<c;r++)i[r]=nt(i[r],o||t);if(i)return{value:i,tzid:o}}function w(r,u){var w,o,y,l,s,v,b,a,p,f={},c=0,h=!1,k=function(n,t){var r=n.day,i=t.day;return r<a&&(r+=7),i<a&&(i+=7),r-i};if(!r)return null;for(v=r.split("\n"),v[1]||r.indexOf("DTSTART")===-1&&r.indexOf("DTEND")===-1&&r.indexOf("EXDATE")===-1||(v=r.split(" ")),c=0,y=v.length;c<y;c++)s=n.trim(v[c]),s.indexOf("DTSTART")!==-1?f.start=it(s,u):s.indexOf("DTEND")!==-1?f.end=it(s,u):s.indexOf("EXDATE")!==-1?f.exdates=it(s,u):s.indexOf("RRULE")!==-1?l=s.substring(6):n.trim(s)&&(l=s);for(l=l.split(";"),c=0,y=l.length;c<y;c++)switch(b=l[c],w=b.split("="),o=n.trim(w[1]).split(","),n.trim(w[0]).toUpperCase()){case"FREQ":f.freq=o[0].toLowerCase();break;case"UNTIL":f.until=nt(o[0],u);break;case"COUNT":f.count=parseInt(o[0],10);break;case"INTERVAL":f.interval=parseInt(o[0],10);break;case"BYSECOND":f.seconds=e(o,{start:0,end:60}),h=!0;break;case"BYMINUTE":f.minutes=e(o,{start:0,end:59}),h=!0;break;case"BYHOUR":f.hours=e(o,{start:0,end:23}),h=!0;break;case"BYMONTHDAY":f.monthDays=e(o,{start:-31,end:31}),h=!0;break;case"BYYEARDAY":f.yearDays=e(o,{start:-366,end:366}),h=!0;break;case"BYMONTH":f.months=e(o,{start:1,end:12}),h=!0;break;case"BYDAY":f.weekDays=p=ki(o),h=!0;break;case"BYWEEKNO":f.weeks=e(o,{start:-53,end:53}),h=!0;break;case"BYSETPOS":f.positions=e(o,{start:-366,end:366});break;case"WKST":f.weekStart=a=bt[o[0]]}return f.freq===t||f.count!==t&&f.until?null:(f.interval||(f.interval=1),a===t&&(f.weekStart=a=i.culture().calendar.firstDay),p&&(f.weekDays=p.sort(k)),f.positions&&!h&&(f.positions=null),f._hasRuleValue=h,f)}function tt(n,t){for(var u,e=n.value,r=n.tzid||"",o=e.length,f=0;f<o;f++)u=e[f],u=ut.convert(u,r||t||u.getTimezoneOffset(),"Etc/UTC"),e[f]=i.toString(u,"yyyyMMddTHHmmssZ");return r&&(r=";TZID="+r),r+":"+e.join(",")+" "}function g(n,r){var h=n.weekStart,u="FREQ="+n.freq.toUpperCase(),s=n.exdates||"",o=n.start||"",e=n.end||"",f=n.until;return n.interval>1&&(u+=";INTERVAL="+n.interval),n.count&&(u+=";COUNT="+n.count),f&&(f=ut.convert(f,r||f.getTimezoneOffset(),"Etc/UTC"),u+=";UNTIL="+i.toString(f,"yyyyMMddTHHmmssZ")),n.months&&(u+=";BYMONTH="+n.months),n.weeks&&(u+=";BYWEEKNO="+n.weeks),n.yearDays&&(u+=";BYYEARDAY="+n.yearDays),n.monthDays&&(u+=";BYMONTHDAY="+n.monthDays),n.weekDays&&(u+=";BYDAY="+wi(n.weekDays)),n.hours&&(u+=";BYHOUR="+n.hours),n.minutes&&(u+=";BYMINUTE="+n.minutes),n.seconds&&(u+=";BYSECOND="+n.seconds),n.positions&&(u+=";BYSETPOS="+n.positions),h!==t&&(u+=";WKST="+kt[h]),o&&(o="DTSTART"+tt(o,r)),e&&(e="DTEND"+tt(e,r)),s&&(s="EXDATE"+tt(s,r)),(o||e||s)&&(u=o+e+s+"RRULE:"+u),u}var rt,gt,ni,ui,oi,s,ei,fi,ot,st,d,dt,i=window.kendo,ut=i.timezone,ir=i.Class,b=i.ui,ht=b.Widget,v=b.DropDownList,u=i.date,di=u.setTime,c=u.setDayOfWeek,r=u.adjustDST,or=u.firstDayOfMonth,p=u.getMilliseconds,hr=[0,31,60,91,121,152,182,213,244,274,305,335,366],ur=[0,31,59,90,120,151,181,212,243,273,304,334,365],fr=[31,28,30,31,30,31,30,31,30,31,30,31],kt={0:"SU",1:"MO",2:"TU",3:"WE",4:"TH",5:"FR",6:"SA"},bt={SU:0,MO:1,TU:2,WE:3,TH:4,FR:5,SA:6},er=["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"],at=["months","weeks","yearDays","monthDays","weekDays","hours","minutes","seconds"],lt=at.length,hi="yyyyMMddTHHmmssZ",ci={months:function(n,t,i){var f=i.months,r=l(f,n.getMonth()+1),u=!1;return null!==r&&(r.length?n.setMonth(r[0]-1,1):n.setFullYear(n.getFullYear()+1,f[0]-1,1),u=!0),u},monthDays:function(n,t,i){for(var o,f,u,e=!1,h=n.getHours(),s=function(n){return n<0&&(n=o+n),n};n<=t;){if(f=n.getMonth(),o=ai(n),u=l(i.monthDays,n.getDate(),s),null===u)return e;if(e=!0,u.length){if(n.setMonth(f,u.sort(k)[0]),r(n,h),f===n.getMonth())break}else n.setMonth(f+1,1)}return e},yearDays:function(n,t,i){for(var u,f,e=!1,s=n.getHours(),o=function(n){return n<0&&(n=u+n),n};n<t;){if(u=ti(n)?366:365,f=l(i.yearDays,wt(n),o),null===f)return e;if(e=!0,u=n.getFullYear(),f.length){n.setFullYear(u,0,f.sort(k)[0]),r(n,s);break}n.setFullYear(u+1,0,1)}return e},weeks:function(n,t,i){for(var e,u,s,o=i.weekStart,f=!1,a=n.getHours(),h=function(n){return n<0&&(n=53+n),n};n<t;){if(u=l(i.weeks,ct(n,o),h),null===u)return f;if(f=!0,e=n.getFullYear(),u.length){s=7*u.sort(k)[0]-1,n.setFullYear(e,0,s),c(n,o,-1),r(n,a);break}n.setFullYear(e+1,0,1)}return f},weekDays:function(n,t,i){var f,e,l=i.weekDays,u=i.weekStart,s=yi(l,n,u),o=n.getHours();if(null===s)return!1;if(f=s[0],f||(f=l[0],c(n,u)),e=f.day,f.offset)for(;n<=t&&!tr(n,f,u);)h(n,u)===si(n,u)?(n.setMonth(n.getMonth()+1,1),r(n,o)):(n.setDate(n.getDate()+7),r(n,o),c(n,u,-1));return n.getDay()!==e&&c(n,e),!0},hours:function(n,t,i){var o=i.hours,s=i._startTime,f=s.getHours(),u=l(o,f),e=!1;return null!==u&&(e=!0,n.setHours(f),r(n,f),u.length?(u=u[0],n.setHours(u)):(u=n.getHours(),n.setDate(n.getDate()+1),r(n,u),u=o[0],n.setHours(u),r(n,u)),i.minutes&&n.setMinutes(0),s.setHours(u,n.getMinutes())),e},minutes:function(n,t,i){var o=i.minutes,s=n.getMinutes(),u=l(o,s),f=i._startTime.getHours(),e=!1;return null!==u&&(e=!0,u.length?u=u[0]:(f+=1,u=o[0]),i.seconds&&n.setSeconds(0),n.setHours(f,u),f%=24,r(n,f),i._startTime.setHours(f,u,n.getSeconds())),e},seconds:function(n,t,i){var o=i.seconds,f=i._startTime.getHours(),u=l(o,n.getSeconds()),r=n.getMinutes(),e=!1;return null!==u&&(e=!0,u.length?n.setSeconds(u[0]):(r+=1,n.setMinutes(r,o[0]),r>59&&(r%=60,f=(f+1)%24)),i._startTime.setHours(f,r,n.getSeconds())),e}},o=ir.extend({next:function(n,t){var u,r,i=t._startTime,f=i.getDate();if(t.seconds)r=n.getSeconds()+1,n.setSeconds(r),i.setSeconds(r),i.setDate(f);else{if(!t.minutes)return!1;u=n.getMinutes()+1,n.setMinutes(u),i.setMinutes(u),i.setDate(f)}return!0},normalize:function(n){var t=n.rule;4===n.idx&&t.hours&&(t._startTime.setHours(0),this._hour(n.date,t))},limit:function(n,i,r){for(var e,o,f,u,s,h=r.interval;n<=i;){for(f=o=t,s=n.getDate(),u=0;u<lt;u++){if(e=at[u],r[e]){if(f=ci[e](n,i,r),o!==t&&f)break;o=f}f&&this.normalize({date:n,rule:r,day:s,idx:u})}if((1===h||!this.interval(r,n))&&u===lt)break}},interval:function(n,t){var f,p,k,b,o=new Date(n._startPeriod),e=new Date(t),c=t.getHours(),d=n.weekStart,l=n.interval,h=n.freq,s=!1,i=0,w=0,v=1;return"hourly"===h?(f=e.getTimezoneOffset()-o.getTimezoneOffset(),p=n._startTime.getHours(),e=e.getTime(),c!==p&&(e+=(p-c)*u.MS_PER_HOUR),e-=o,f&&(e-=f*u.MS_PER_MINUTE),f=Math.floor(e/u.MS_PER_HOUR),i=y(f,l),0!==i&&(this._hour(t,n,i),s=!0)):"daily"===h?(u.setTime(e,-o,!0),f=Math.ceil(e/u.MS_PER_DAY),i=y(f,l),0!==i&&(this._date(t,n,i),s=!0)):"weekly"===h?(i=this._getNumberOfWeeksBetweenDates(o,t),k=a(t.getDay(),d),b=a(o.getDay(),d),k<b&&(i+=1),i=y(i,l),0!==i&&(u.setDayOfWeek(t,n.weekStart,-1),t.setDate(t.getDate()+7*i),r(t,c),s=!0)):"monthly"===h?(f=t.getFullYear()-o.getFullYear(),f=t.getMonth()-o.getMonth()+12*f,i=y(f,l),0!==i&&(v=n._hasRuleValue?1:t.getDate(),t.setFullYear(t.getFullYear(),t.getMonth()+i,v),r(t,c),s=!0)):"yearly"===h&&(f=t.getFullYear()-o.getFullYear(),i=y(f,l),n.months||(w=t.getMonth()),n.yearDays||n.monthDays||n.weekDays||(v=t.getDate()),0!==i&&(t.setFullYear(t.getFullYear()+i,w,v),r(t,c),s=!0)),s},_getNumberOfWeeksBetweenDates:function(n,t){var r=(t-n)/6048e5,i=Math.floor(r);return r-i>.99&&(i=Math.round(r)),i},_hour:function(n,t,i){var f=t._startTime,u=f.getHours();i&&(u+=i),n.setHours(u),u%=24,f.setHours(u),r(n,u)},_date:function(n,t,i){var u=n.getHours();n.setDate(n.getDate()+i),r(n,u)||this._hour(n,t)}}),bi=o.extend({next:function(n,t){o.fn.next(n,t)||this._hour(n,t,1)},normalize:function(n){var t=n.rule;4===n.idx&&(t._startTime.setHours(0),this._hour(n.date,t))}}),yt=o.extend({next:function(n,t){o.fn.next(n,t)||this[t.hours?"_hour":"_date"](n,t,1)}}),vi=yt.extend({setup:function(n,t){n.weekDays||(n.weekDays=[{day:t.getDay(),offset:0}])}}),vt=o.extend({next:function(n,t){var u,i;if(!o.fn.next(n,t))if(t.hours)this._hour(n,t,1);else if(t.monthDays||t.weekDays||t.yearDays||t.weeks)this._date(n,t,1);else{for(u=n.getDate(),i=n.getHours(),n.setMonth(n.getMonth()+1),r(n,i);n.getDate()!==u;)n.setDate(u),r(n,i);this._hour(n,t)}},normalize:function(n){var i=n.rule,t=n.date,u=t.getHours();0!==n.idx||i.monthDays||i.weekDays?o.fn.normalize(n):(t.setDate(n.day),r(t,u))},setup:function(n,t,i){n.monthDays||n.weekDays||i.setDate(t.getDate())}}),pi=vt.extend({next:function(n,t){var u,i=n.getHours();if(!o.fn.next(n,t))if(t.hours)this._hour(n,t,1);else if(t.monthDays||t.weekDays||t.yearDays||t.weeks)this._date(n,t,1);else if(t.months){for(u=n.getDate(),n.setMonth(n.getMonth()+1),r(n,i);n.getDate()!==u;)n.setDate(u),r(n,i);this._hour(n,t)}else n.setFullYear(n.getFullYear()+1),r(n,i),this._hour(n,t)},setup:function(){}}),li={hourly:new bi,daily:new yt,weekly:new vi,monthly:new vt,yearly:new pi},f="click";i.recurrence={rule:{parse:w,serialize:g},expand:rr,dayInYear:wt,weekInYear:ct,weekInMonth:h,numberOfWeeks:si,isException:ft,toExceptionString:ri},rt=function(n){for(var u=i.culture().calendar.days.namesShort,f=u.length,e="",t=0,r=[];t<f;t++)r.push(t);for(u=u.slice(n).concat(u.slice(0,n)),r=r.slice(n).concat(r.slice(0,n)),t=0;t<f;t++)e+='<label class="k-check"><input class="k-recur-weekday-checkbox" type="checkbox" value="'+r[t]+'" /> '+u[t]+"</label>";return e},gt=i.template('# if (frequency !== "never") { #<div class="k-edit-label"><label>#:messages.repeatEvery#</label></div><div class="k-edit-field"><input class="k-recur-interval" title="#:messages.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" title="#:messages.day#" />#:messages.day#</label><input class="k-recur-monthday" title="#:messages.day#" /></li><li><input class="k-recur-month-radio" type="radio" name="month" value="weekday" title="#:messages.repeatOn#" /><input class="k-recur-weekday-offset" title="#:messages.repeatOn#" /><input class="k-recur-weekday" title="#:messages.day#" /></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" title="#:messages.repeatOn#" /><input class="k-recur-month" title="#:messages.repeatOn#" /><input class="k-recur-monthday" title="#:messages.day#" /></li><li><input class="k-recur-year-radio" type="radio" name="year" value="weekday" title="#:messages.repeatOn#" /><input class="k-recur-weekday-offset" title="#:messages.repeatOn#" /><input class="k-recur-weekday" title="#:messages.day#"  />#:messages.of#<input class="k-recur-month" title="#:messages.of#"/></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" title="#:end.occurrence#" />#: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" title="#:end.on#" /></li></ul></div># } #'),ni=[{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}],ui=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],oi=[{day:0,offset:0},{day:6,offset:0}],s=ht.extend({init:function(n,t){var f,r=this,e=t&&t.frequencies;ht.fn.init.call(r,n,t),r.wrapper=r.element,t=r.options,t.start=f=t.start||u.today(),e&&(t.frequencies=e),"string"==typeof f&&(t.start=i.parseDate(f,"yyyyMMddTHHmmss")),null===t.firstWeekDay&&(t.firstWeekDay=i.culture().calendar.firstDay),r._namespace="."+t.name},options:{value:"",start:"",timezone:"",spinners:!0,firstWeekDay:null,frequencies:["never","daily","weekly","monthly","yearly"],mobile:!1,messages:{recurrenceEditorTitle:"Recurrence editor",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 n=this,t=n._value;n._container.find(".k-recur-interval").kendoNumericTextBox({spinners:n.options.spinners,value:t.interval||1,decimals:0,format:"#",min:1,change:function(){t.interval=this.value(),n._trigger()}})},_weekDayRule:function(n){var t=this,u=(t._weekDay.element||t._weekDay).val(),f=+(t._weekDayOffset.element||t._weekDayOffset).val(),i=null,r=null;n||("day"===u?(i=ni,r=f):"weekday"===u?(i=ui,r=f):"weekend"===u?(i=oi,r=f):i=[{offset:f,day:+u}]),t._value.weekDays=i,t._value.positions=r},_weekDayView:function(){var i,n,r,e,u=this,t=u._value.weekDays,f=u._value.positions,o=u._weekDayOffset;t&&(r=t.length,f&&(7===r?(n="day",i=f):5===r?(n="weekday",i=f):2===r&&(n="weekend",i=f)),n||(t=t[0],n=t.day,i=t.offset||""),e=o.value?"value":"val",o[e](i),u._weekDay[e](n))},_initWeekDay:function(){var o,t=this,u=t.options.messages.weekdays,r=t.options.messages.offsetPositions,e=t._container.find(".k-recur-weekday"),f=function(){t._weekDayRule(),t._trigger()};e[0]&&(t._weekDayOffset=new v(t._container.find(".k-recur-weekday-offset"),{change:f,dataTextField:"text",dataValueField:"value",dataSource:[{text:r.first,value:"1"},{text:r.second,value:"2"},{text:r.third,value:"3"},{text:r.fourth,value:"4"},{text:r.last,value:"-1"}]}),o=[{text:u.day,value:"day"},{text:u.weekday,value:"weekday"},{text:u.weekend,value:"weekend"}],t._weekDay=new v(e,{value:t.options.start.getDay(),change:f,dataTextField:"text",dataValueField:"value",dataSource:o.concat(n.map(i.culture().calendar.days.names,function(n,t){return{text:n,value:t}}))}),t._weekDayView())},_initWeekDays:function(){var u,o,e,s,h,t=this,r=t._value,i=t._container.find(".k-recur-weekday-checkbox");if(i[0]&&(i.on(f+t._namespace,function(){r.weekDays=n.map(i.filter(":checked"),function(n){return{day:+n.value,offset:0}}),t.options.mobile||t._trigger()}),r.weekDays))for(e=0,s=i.length,h=r.weekDays.length;e<s;e++)for(o=i[e],u=0;u<h;u++)o.value==r.weekDays[u].day&&(o.checked=!0)},_initMonthDay:function(){var n=this,t=n._value,r=n._container.find(".k-recur-monthday");r[0]&&(n._monthDay=new i.ui.NumericTextBox(r,{spinners:n.options.spinners,min:1,max:31,decimals:0,format:"#",value:t.monthDays?t.monthDays[0]:n.options.start.getDate(),change:function(){var i=this.value();t.monthDays=i?[i]:i,n._trigger()}}))},_initCount:function(){var n=this,i=n._container.find(".k-recur-count"),t=n._value;n._count=i.kendoNumericTextBox({spinners:n.options.spinners,value:t.count||1,decimals:0,format:"#",min:1,change:function(){t.count=this.value(),n._trigger()}}).data("kendoNumericTextBox")},_initUntil:function(){var t=this,u=t._container.find(".k-recur-until"),n=t.options.start,r=t._value,i=r.until;t._until=u.kendoDatePicker({min:i&&i<n?i:n,value:i||new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59),change:function(){var n=this.value();r.until=new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59),t._trigger()}}).data("kendoDatePicker")},_trigger:function(){this.options.mobile||this.trigger("change")}}),ei=s.extend({init:function(n,t){var i=this;s.fn.init.call(i,n,t),i._initFrequency(),i._initContainer(),i.value(i.options.value)},options:{name:"RecurrenceEditor"},events:["change"],destroy:function(){var n=this;n._frequency.destroy(),n._container.find("input[type=radio],input[type=checkbox]").off(f+n._namespace),i.destroy(n._container),s.fn.destroy.call(n)},value:function(n){var r,i=this,u=i.options.timezone;return n===t?i._value.freq?g(i._value,u):"":(i._value=w(n,u)||{},r=i._value.freq,r?i._frequency.value(r):i._frequency.select(0),i._initView(i._frequency.value()),t)},_initContainer:function(){var r=this.element,t=n('<div class="k-recur-view" />'),i=r.parent(".k-edit-field");i[0]?t.insertAfter(i):r.append(t),this._container=t},_initFrequency:function(){var r,t=this,u=t.options,i=u.frequencies,e=u.messages.frequencies,f=n("<input />").attr({title:u.messages.recurrenceEditorTitle});i=n.map(i,function(n){return{text:e[n],value:n}}),r=i[0],r&&"never"===r.value&&(r.value=""),t.element.append(f),t._frequency=new v(f,{dataTextField:"text",dataValueField:"value",dataSource:i,change:function(){t._value={},t._initView(t._frequency.value()),t.trigger("change")}})},_initView:function(n){var r=this,f=r._value,u=r.options,e={frequency:n||"never",weekDayCheckBoxes:rt,firstWeekDay:u.firstWeekDay,messages:u.messages[n],end:u.messages.end};return i.destroy(r._container),r._container.html(gt(e)),n?(f.freq=n,"weekly"!==n||f.weekDays||(f.weekDays=[{day:u.start.getDay(),offset:0}]),r._initInterval(),r._initWeekDays(),r._initMonthDay(),r._initWeekDay(),r._initMonth(),r._initCount(),r._initUntil(),r._period(),r._end(),t):(r._value={},t)},_initMonth:function(){var f,t=this,e=t._value,r=e.months||[t.options.start.getMonth()+1],u=t._container.find(".k-recur-month");u[0]&&(f={change:function(){e.months=[+this.value()],t.trigger("change")},dataTextField:"text",dataValueField:"value",dataSource:n.map(i.culture().calendar.months.names,function(n,t){return{text:n,value:t+1}})},t._month1=new v(u[0],f),t._month2=new v(u[1],f),r&&(r=r[0],t._month1.value(r),t._month2.value(r)))},_end:function(){var r,n=this,e=n._value,t=n._container,i=n._namespace,u=function(t){n._toggleEnd(t.currentTarget.value),n.trigger("change")};n._buttonNever=t.find(".k-recur-end-never").on(f+i,u),n._buttonCount=t.find(".k-recur-end-count").on(f+i,u),n._buttonUntil=t.find(".k-recur-end-until").on(f+i,u),e.count?r="count":e.until&&(r="until"),n._toggleEnd(r)},_period:function(){var n=this,r=n._value,i="monthly"===r.freq,u=i?n._toggleMonthDay:n._toggleYear,e=".k-recur-"+(i?"month":"year")+"-radio",t=n._container.find(e);(i||"yearly"===r.freq)&&(t.on(f+n._namespace,function(t){u.call(n,t.currentTarget.value),n.trigger("change")}),n._buttonMonthDay=t.eq(0),n._buttonWeekDay=t.eq(1),u.call(n,r.weekDays?"weekday":"monthday"))},_toggleEnd:function(n){var u,r,f,i,t=this;"count"===n?(t._buttonCount.prop("checked",!0),f=!0,i=!1,u=t._count.value(),r=null):"until"===n?(t._buttonUntil.prop("checked",!0),f=!1,i=!0,u=null,r=t._until.value()):(t._buttonNever.prop("checked",!0),f=i=!1,u=r=null),t._count.enable(f),t._until.enable(i),t._value.count=u,t._value.until=r},_toggleMonthDay:function(n){var r,t=this,f=!1,i=!0,u=!1;"monthday"===n?(t._buttonMonthDay.prop("checked",!0),r=[t._monthDay.value()],f=!0,i=!1,u=!0):(t._buttonWeekDay.prop("checked",!0),r=null),t._weekDay.enable(i),t._weekDayOffset.enable(i),t._monthDay.enable(f),t._value.monthDays=r,t._weekDayRule(u)},_toggleYear:function(n){var i,t=this,u=!1,r=!0;"monthday"===n?(u=!0,r=!1,i=t._month1.value()):i=t._month2.value(),t._month1.enable(u),t._month2.enable(r),t._value.months=[i],t._toggleMonthDay(n)}}),b.plugin(ei),fi=i.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>'),ot=i.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" title="#:messages.day#" 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" title="#:messages.every#"></select></div><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><select class="k-recur-weekday" title="#:messages.day#"></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" title="#:messages.day#" 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" title="#:messages.every#"></select></div><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><select class="k-recur-weekday" title="#:messages.day#"></select></div></div><div class="k-edit-label"><label>#:messages.month#</label></div><div class="k-edit-field"><select class="k-recur-month" title="#:messages.month#"></select></div># } #'),st=i.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># } #'),d=i.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>'),dt=s.extend({init:function(n,t){var r=this;s.fn.init.call(r,n,t),t=r.options,r._optionTemplate=i.template('<option value="#:value#">#:text#</option>'),r.value(t.value),r._pane=t.pane,r._initRepeatButton(),r._initRepeatEnd(),r._defaultValue=r._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(n){var i=this,r=i.options.timezone;return n===t?i._value.freq?g(i._value,r):"":(i._value=w(n,r)||{},t)},destroy:function(){this._destroyView(),i.destroy(this._endFields),this._repeatButton.off(f+this._namespace),s.fn.destroy.call(this)},_initRepeatButton:function(){var t=this,i=t.options.messages.frequencies[this._value.freq||"never"];t._repeatButton=n('<a href="#" class="k-button k-scheduler-recur">'+i+"</a>").on(f+t._namespace,function(n){n.preventDefault(),t._createView("repeat"),t._pane.navigate("recurrence",t.options.animations.left)}),t.element.append(t._repeatButton)},_initRepeatEnd:function(){var t=this,r=n('<div class="k-edit-label"><label>'+t.options.messages.end.mobileLabel+"</label></div>").insertAfter(t.element.parent(".k-edit-field")),i=n('<div class="k-edit-field"><a href="#" class="k-button k-scheduler-recur-end"></a></div>').on(f+t._namespace,function(n){n.preventDefault(),t._value.freq&&(t._createView("end"),t._pane.navigate("recurrence",t.options.animations.left))}).insertAfter(r);t._endFields=r.add(i).toggleClass("k-state-disabled",!t._value.freq),t._endButton=i.find(".k-scheduler-recur-end").text(t._endText())},_endText:function(){var n=this._value,r=this.options.messages.end,t=r.never;return n.count?t=i.format("{0} {1}",r.after,n.count):n.until&&(t=i.format("{0} {1:d}",r.on,n.until)),t},_initFrequency:function(){var t=this,u=t.options.messages.frequencies,r=d({dataSource:n.map(this.options.frequencies,function(n){return{text:u[n],value:"never"!==n?n:""}}),value:t._value.freq||"",ns:i.ns});t._view.element.find(".k-recur-pattern").append(r).on(f+t._namespace,".k-scheduler-navigation li",function(r){var u=n(this);r.preventDefault(),u.addClass("k-state-selected").siblings().removeClass("k-state-selected"),t._value={freq:u.children("a").attr(i.attr("value"))},t._initRepeatView()})},_initEndNavigation:function(){var o,t=this,e=t.options.messages.end.patterns,r=t._value,u="";r.count?u="count":r.until&&(u="until"),o=d({dataSource:[{text:e.never,value:""},{text:e.after,value:"count"},{text:e.on,value:"until"}],value:u,ns:i.ns}),t._view.element.find(".k-recur-pattern").append(o).on(f+t._namespace,".k-scheduler-navigation li",function(u){var o=n(this),f=null,e=null;u.preventDefault(),o.addClass("k-state-selected").siblings().removeClass("k-state-selected"),t._initEndView(o.children("a").attr(i.attr("value"))),t._count?(f=t._count.value(),e=null):t._until&&(f=null,e=t._until.val?i.parseDate(t._until.val(),"yyyy-MM-dd"):t._until.value()),r.count=f,r.until=e})},_createView:function(t){var i=this,o=i.options,r=o.messages,s=r["repeat"===t?"repeatTitle":"endTitle"],u='<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">'+r.cancel+"</a>"+r.headerTitle+'<a href="#" class="k-button k-scheduler-update">'+r.update+"</a></div>",e=i._pane.view().id;i._view=i._pane.append(u+fi({headerTitle:s})),i._view.element.on(f+i._namespace,"a.k-scheduler-cancel, a.k-scheduler-update",function(t){t.preventDefault(),t.stopPropagation(),n(this).hasClass("k-scheduler-update")?(i.trigger("change"),i._defaultValue=n.extend({},i._value)):i._value=i._defaultValue;var u=i._value.freq;i._endButton.text(i._endText()),i._endFields.toggleClass("k-state-disabled",!u),i._repeatButton.text(r.frequencies[u||"never"]),i._pane.one("viewShow",function(){i._destroyView()}),i._pane.navigate(e,i.options.animations.right)}),i._container=i._view.element.find(".k-recur-view"),"repeat"===t?(i._initFrequency(),i._initRepeatView()):(i._initEndNavigation(),i._initEndView())},_destroyView:function(){this._view&&(this._view.destroy(),this._view.element.remove()),this._view=null},_initRepeatView:function(){var n=this,r=n._value.freq||"never",o={frequency:r,weekDayCheckBoxes:rt,firstWeekDay:n.options.firstWeekDay,messages:n.options.messages[r]},f=ot(o),u=n._container,e=n._value;return i.destroy(u),u.html(f),f?("weekly"!==r||e.weekDays||(e.weekDays=[{day:n.options.start.getDay(),offset:0}]),n._initInterval(),n._initMonthDay(),n._initWeekDays(),n._initWeekDay(),n._initMonth(),n._period(),t):(n._value={},t)},_initEndView:function(n){var f,r=this,u=r._value;n===t&&(u.count?n="count":u.until&&(n="until")),f={endPattern:n,messages:r.options.messages.end},i.destroy(r._container),r._container.html(st(f)),r._initCount(),r._initUntil()},_initWeekDay:function(){var u,t=this,f=t.options.messages.weekdays,r=t.options.messages.offsetPositions,o=t._container.find(".k-recur-weekday"),e=function(){t._weekDayRule(),t.trigger("change")};o[0]&&(t._weekDayOffset=t._container.find(".k-recur-weekday-offset").html(t._options([{text:r.first,value:"1"},{text:r.second,value:"2"},{text:r.third,value:"3"},{text:r.fourth,value:"4"},{text:r.last,value:"-1"}])).change(e),u=[{text:f.day,value:"day"},{text:f.weekday,value:"weekday"},{text:f.weekend,value:"weekend"}],u=u.concat(n.map(i.culture().calendar.days.names,function(n,t){return{text:n,value:t}})),t._weekDay=o.html(t._options(u)).change(e).val(t.options.start.getDay()),t._weekDayView())},_initMonth:function(){var f,t=this,e=t._value,s=t.options.start,u=e.months||[s.getMonth()+1],r=t._container.find(".k-recur-month"),o=i.culture().calendar.months.names;r[0]&&(f=n.map(o,function(n,t){return{text:n,value:t+1}}),r.html(t._options(f)).change(function(){e.months=[+this.value]}),t._monthSelect=r,u&&r.val(u[0]))},_period:function(){var e,l,o,t=this,r=t._value,u=t._container,a=t.options.messages[r.freq],c=u.find(".k-repeat-rule"),s=u.find(".k-weekday-view"),h=u.find(".k-monthday-view");c[0]&&(e=r.weekDays?"weekday":"monthday",l=d({value:e,dataSource:[{text:a.dayOfMonth,value:"monthday"},{text:a.dayOfWeek,value:"weekday"}],ns:i.ns}),o=function(n){var e=t._weekDay.val(),f=t._weekDayOffset.val(),u=t._monthDay.value(),i=t._monthSelect?t._monthSelect.val():null;"monthday"===n?(r.weekDays=null,r.monthDays=u?[u]:u,r.months=i?[+i]:i,s.hide(),h.show()):(r.monthDays=null,r.months=i?[+i]:i,r.weekDays=[{offset:+f,day:+e}],s.show(),h.hide())},c.append(l).on(f+t._namespace,".k-scheduler-navigation li",function(t){var u,r=n(this).addClass("k-state-selected");t.preventDefault(),r.siblings().removeClass("k-state-selected"),u=r.children("a").attr(i.attr("value")),o(u)}),o(e))},_initUntil:function(){var r=this,e=r._container.find(".k-recur-until"),t=r.options.start,u=r._value,n=u.until,f=n&&n<t?n:t;r._until=i.support.input.date?e.attr("min",i.toString(f,"yyyy-MM-dd")).val(i.toString(n||t,"yyyy-MM-dd")).on("change",function(){u.until=i.parseDate(this.value,"yyyy-MM-dd")}):e.kendoDatePicker({min:f,value:n||t,change:function(){u.until=this.value()}}).data("kendoDatePicker")},_options:function(n,t){var r=0,i="",f=n.length,u=this._optionTemplate;for(t&&(i+=u({value:"",text:t}));r<f;r++)i+=u(n[r]);return i}}),b.plugin(dt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.scheduler.timelineview.min",["kendo.scheduler.view.min"],n)}(function(){return function(n,t){function g(n){var t=new Date(1980,1,1,0,0,0);return r(t,u(n)),t}function ot(n){var i=[],t=n.workWeekStart;for(i.push(t);n.workWeekEnd!=t;)t>6?t-=7:t++,i.push(t);return i}function w(n){var t,i=0;if(n.columns){for(t=0;t<n.columns.length;t++)i+=w(n.columns[t]);return n.colspan=i,i}return n.colspan=1,1}function st(n,t,i){for(var r,e,u,f=n.length-1;f>=0;f--)r=n[f].rectLeft,u=n[f].rectRight,e=r<=t&&u>=t,(e||r>=t&&u<=i||t<=r&&i>=r)&&(r<t&&(t=r),u>i&&(i=u));return ft(n,t,i)}function ft(n,t,i){for(var u,f=[],r=0;r<n.length;r++)u={rectLeft:n[r].rectLeft,rectRight:n[r].rectRight},(u.rectLeft<t&&u.rectRight>t||u.rectLeft>=t&&u.rectRight<=i)&&f.push(n[r]);return f}var l,i=window.kendo,k=i.ui,r=i.date.setTime,o=k.SchedulerView,p=i._outerWidth,d=i._outerHeight,c=n.extend,et=n.proxy,f=i.date.getDate,u=i.date.getMilliseconds,e=i.date.MS_PER_DAY,v=i.date.MS_PER_MINUTE,h="k-current-time",a="k-current-time-arrow",b="k-scheduler-header-wrap",y=.8666,s=".kendoTimelineView",ut=i.template('<div><div class="k-event-template k-event-time">#:kendo.format("{0:t} - {1:t}", start, end)#</div><div class="k-event-template">${title}</div></div>'),it=i.template("<span class='k-link k-nav-day'>#=kendo.format('{0:m}', date)#</span>"),nt='<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color#; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#" #} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail) {#<span class="k-icon k-i-arrow-60-left"></span>#}## if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}## if(data.head) {#<span class="k-icon k-i-arrow-60-right"></span>#}#</span>#if(resizable && !data.tail){#<span class="k-resize-handle k-resize-w"></span>#}##if(resizable && !data.head){#<span class="k-resize-handle k-resize-e"></span>#}#</div>',tt=i.Class.extend({init:function(n){this._view=n},_getTimeSlotByPosition:function(n,t,i){var r=this._view.groups[i];return r.timeSlotByPosition(n,t)},_hideHeaders:function(){var n=this._view;n.timesHeader.find("table tr:last").hide(),n.datesHeader.find("table tr:last").hide()},_setColspan:function(n){w(n)},_createRowsLayout:function(n,t,i){var r=this._view;return r._createRowsLayout(n,t,i)},_createVerticalColumnsLayout:function(n,t,i,r){return r},_createColumnsLayout:function(n,t,i){var r=this._view;return r._createColumnsLayout(n,t,i)},_getRowCount:function(){var n=this._view;return n._groupCount()},_getGroupsCount:function(){return 1},_addContent:function(n,t,r,u,f,e,o,s){for(var a,h,p,c=this._view,l="",y=c.options,w=function(t){var f,u="",r="",e=function(n){return function(){return c._resourceBySlot({groupIndex:n})}};return i.date.isToday(n[h])&&(r+="k-today"),(i.date.getMilliseconds(t)<i.date.getMilliseconds(y.workDayStart)||i.date.getMilliseconds(t)>=i.date.getMilliseconds(y.workDayEnd)||!c._isWorkDay(n[h]))&&(r+=" k-nonwork-hour"),u+="<td"+(""!==r?' class="'+r+'"':"")+">",f=i.date.getDate(n[h]),i.date.setTime(f,i.date.getMilliseconds(t)),u+=o({date:f,resources:e(s?v:a)}),u+="</td>"},v=0;v<u;v++){for(l+="<tr>",a=0;a<r;a++)for(h=0,p=t;h<p;h++)l+=c._forTimeRange(f,e,w);l+="</tr>"}return l},_addTimeSlotsCollections:function(n,t,i,r,f){var e,y,d,v,b,p,a,h,c,o,k,s,l=this._view,w=i.length;for(f&&(w=Math.floor(w/n)),e=0;e<n;e++)for(y=0,d=l.groups[e],f&&(y=e),b=y*w,p=0,f||(p=e),a=i[b].children,h=a.length/(f?1:n),c=h/t,o=0;o<t;o++)for(k=o*c+h*p,v=u(new Date(+l.startTime())),s=0;s<c;s++)l._addTimeSlotToCollection(d,a,s,k,o,v,r),v+=r},_getVerticalGroupCount:function(n){return n},_getVerticalRowCount:function(n,t,i){var r=this._view;return r._isVerticallyGrouped()?n[t].maxRowCount:i},_renderEvent:function(n,t,i,r,u,f){var s,e=this._view,o=e._createEventElement(i.occurrence,t,u.head||i.head,u.tail||i.tail);o.appendTo(f).css({top:0,height:e.options.eventHeight}),s={start:i.occurrence._startTime||i.occurrence.start,end:i.occurrence._endTime||i.occurrence.end,element:o,uid:t.uid,slotRange:u,rowIndex:0,offsetTop:0},n.events[t.uid]=s,e.addContinuousEvent(r,u,o,t.isAllDay),e._arrangeRows(s,u,n)},_verticalCountForLevel:function(n){var t=this._view;return t._rowCountForLevel(n)},_horizontalCountForLevel:function(n){var t=this._view;return t._columnCountForLevel(n)},_updateCurrentVerticalTimeMarker:function(t,i){var r=this._view,e="<div class='"+h+"'></div>",o=r.datesHeader.find("."+b),u=Math.round(t[0].innerRect(i,new Date(i.getTime()+1),!1).left),f=n(e).prependTo(o).addClass(a+"-down");f.css({left:r._adjustLeftPosition(u-p(f)*y/2),top:o.find("tr:last").prev().position().top}),n(e).prependTo(r.content).css({left:r._adjustLeftPosition(u),width:"1px",height:r.content[0].scrollHeight-1,top:0})},_changeGroup:function(){return t},_prevGroupSlot:function(n,t,i){var r,u=this._view;return u._isVerticallyGrouped()?n:(r=t._collection(0,i),r.last())},_nextGroupSlot:function(n,t,i){var r,u=this._view;return u._isVerticallyGrouped()?n:(r=t._collection(0,i),r.first())},_verticalSlots:function(n,t){var i=this._view;return i._changeGroup(n,t)},_verticalMethod:function(n){return n?"leftSlot":"rightSlot"},_normalizeVerticalSelection:function(){return t},_horizontalSlots:function(n,t,i,r,u,f,e){var s=this._view,o={};return o.startSlot=t[i](r),o.endSlot=t[i](u),f||!s._isHorizontallyGrouped()||o.startSlot&&o.endSlot||(o.startSlot=o.endSlot=s._changeGroup(n,e)),o},_changeVerticalViewPeriod:function(){return!1},_changeHorizontalViewPeriod:function(n,t,i,r){var u=this._view;return!(n.startSlot&&n.endSlot||t||!u._changeViewPeriod(i,r,!1))},_updateDirection:function(n,t,i,r){var u=this._view;u._updateDirection(n,t,i,r,!0)},_createMoveHint:function(n,t){var r,u,e,s,i=this._view,o=n.start,f=i._createEventElement(t.occurrence,t.occurrence,!1,!1);f.addClass("k-event-drag-hint"),r=n.innerRect(t.occurrence.start,t.occurrence.end,i.options.snap),u=r.right-r.left-2,u<0&&(u=0),e=i._adjustLeftPosition(r.left),s={left:e,top:o.offsetTop,height:o.offsetHeight-2,width:u},f.css(s),i._moveHint=i._moveHint.add(f)},_adjustLeftPosition:function(n){var t=this._view;return t._isRtl&&(n-=t.content[0].scrollWidth-t.content[0].offsetWidth),n}}),rt=i.Class.extend({init:function(n){this._view=n},_getTimeSlotByPosition:function(n,t,i){var r=this._view.groups[i];return r.timeSlotByPosition(n,t,!0)},_hideHeaders:function(){var n=this._view;n._isVerticallyGrouped()?n.times.find(".k-last").hide():(n.timesHeader.find("table tr").eq(2).hide(),n.datesHeader.find("table tr").eq(2).hide())},_setColspan:function(){},_createRowsLayout:function(n,t,i,r){var u=this._view;return u._createDateLayout(r,null,!0)},_createVerticalColumnsLayout:function(n,t,i){var r=this._view;return r._createColumnsLayout(n,null,i)},_createColumnsLayout:function(n,t,i,r){var u=this._view;return u._createColumnsLayout(n,t,i,r,!0)},_getRowCount:function(n){var t=this._view;return t._rowCountForLevel(n)},_getGroupsCount:function(){var n=this._view;return n._groupCount()},_addContent:function(n,t,u,f,e,o,s,h){for(var w,l,k,c=this._view,y="",b=c.options,nt=function(t,r,u,f,e,o){var a,v="",h="",p=c._isVerticallyGrouped()?w:l,y=function(n){return function(){return c._resourceBySlot({groupIndex:n})}};return i.date.isToday(n[l])&&(h+="k-today"),(i.date.getMilliseconds(t)<i.date.getMilliseconds(b.workDayStart)||i.date.getMilliseconds(t)>=i.date.getMilliseconds(b.workDayEnd)||!c._isWorkDay(n[p]))&&(h+=" k-nonwork-hour"),v+="<td"+(""!==h?' class="'+h+'"':"")+">",a=i.date.getDate(n[l]),i.date.setTime(a,i.date.getMilliseconds(t)),v+=s({date:a,resources:y(o)}),v+="</td>"},p=new Date(e),tt=c.options.minorTickCount,d=c.options.majorTick*v,g=d/tt||1,a=0;a<f;a++){for(y+="<tr>",a%(f/c._dates.length)==0&&(w=a/(f/c._dates.length),p=new Date(c._dates[w]),i.date.setTime(p,i.date.getMilliseconds(e))),l=0,k=t;l<k;l++)if(y+=c._forTimeRange(p,o,nt,h,u),h){r(p,g,!1);break}y+="</tr>"}return y},_addTimeSlotsCollections:function(n,t,i,r,f){var e,v,p,k,w,o,a,d,l,h,s,b,c=this._view,y=i.length;for(f&&(y/=t),e=0;e<t;e++)for(v=0,f&&(v=e),k=v*y,w=0,o=i[k].children,a=f?y:o.length/(t*n),d=o.length/t,p=u(new Date(+c.startTime())),h=0;h<a;h++){for(f?(l=0,o=i[h+a*e].children):(l=e*d+n*h,w++),s=0;s<n;s++)b=c.groups[s],c._addTimeSlotToCollection(b,o,s,l,e,p,r);p+=r}},_getVerticalGroupCount:function(){var n=this._view;return n.content.find("tr").length},_getVerticalRowCount:function(n,t,i){return i},_renderEvent:function(n,t,i,r,u,f,e,o){for(var a,h,v,c,l=this._view,y=[],s=u.start.index;s<=u.end.index;s++)a=l._createEventElement(i.occurrence,t,s!==o,s!==e),a.appendTo(f).css({top:0,height:l.options.eventHeight}),h=r._timeSlotCollections[0]._slots[s],v=r.timeSlotRanges(h.start,h.end,!1)[0],c={start:s===e?i.occurrence._startTime||i.occurrence.start:h.start,end:s===o?i.occurrence._endTime||i.occurrence.end:h.end,element:a,uid:t.uid,slotRange:v,rowIndex:0,offsetTop:0},n.events[t.uid]=c,y.push(c),l.addContinuousEvent(r,v,a,t.isAllDay),l._arrangeRows(c,v,n);n.events[t.uid]=y},_verticalCountForLevel:function(n){var t=this._view;return t._columnCountForLevel(n)},_horizontalCountForLevel:function(n,t){var i=this._view;return i._columnCountForLevel(t)/i._columnCountForLevel(2)},_updateCurrentVerticalTimeMarker:function(t,i){var r=this._view,c=r.times.find("tr:first th:first"),o=r.times.find("tr:first th:last"),s="<div class='"+h+"'></div>",u=n(s).prependTo(r.times),e=Math.round(t[0].innerRect(i,new Date(i.getTime()+1),!1).top),f={};this._isRtl?(f.right=c.position().left+d(c)-d(o),u.addClass(a+"-left")):(f.left=o.position().left,u.addClass(a+"-right")),f.top=e-p(u)*y/2,u.css(f),n(s).prependTo(r.content).css({top:e,height:"1px",right:"1px",width:r.content[0].scrollWidth,left:0})},_changeGroup:function(n,t,i){var r=this._view;i||(n.groupIndex=t?r.groups.length-1:0)},_prevGroupSlot:function(n){return n},_nextGroupSlot:function(n){return n},_changeDate:function(n,t,i){var u,r,e=this._view,f=e.groups[n.groupIndex];if(t){if(u=f._getCollections(!1),r=i.index-1,r>=0)return u[0]._slots[r]}else if(u=f._getCollections(!1),r=i.index+1,u[0]&&u[0]._slots[r])return u[0]._slots[r]},_verticalSlots:function(n,t,i){return this._changeDate(n,t,i)},_verticalMethod:function(n,t){return t?n?"upSlot":"downSlot":n?"leftSlot":"rightSlot"},_normalizeVerticalSelection:function(n,i,r,u){var f=this._view;return u?t:f._normalizeVerticalSelection(n,i,r)},_horizontalSlots:function(n,t,i,r,u,f,e){var s=this._view,h=s._changeGroup(n,e),o={};return h?o.startSlot=o.endSlot=h:s._isVerticallyGrouped()||(o.startSlot=t[i](r),o.endSlot=t[i](u)),o},_changeVerticalViewPeriod:function(n,t,i,r){var u=this._view;return!(n.startSlot&&n.endSlot||t||!u._changeViewPeriod(i,r,u._isVerticallyGrouped()))},_changeHorizontalViewPeriod:function(n,t,i,r){var u=this._view;return!u._isVerticallyGrouped()&&!(n.startSlot&&n.endSlot||t||!u._changeViewPeriod(i,r,!1))},_updateDirection:function(n,t,i,r){var u=this._view;u._updateDirection(n,t,i,r,!u._isVerticallyGrouped())},_createMoveHint:function(n,t){for(var f,i,e,r=this._view,s=n.start,o=n.end,u=s.index;u<=o.index;u++)f=n.collection._slots[u],i=r._createEventElement(t.occurrence,t.occurrence,!1,!1),i.addClass("k-event-drag-hint"),e={left:f.offsetLeft+2,top:f.offsetTop,height:r.options.eventHeight,width:f.offsetWidth},i.css(e),r._moveHint=r._moveHint.add(i)},_adjustLeftPosition:function(n){var t=this._view;return t._isRtl&&!t._isVerticallyGrouped()&&(n-=t.content[0].scrollWidth-t.content[0].offsetWidth),n}});i.ui.scheduler.TimelineGroupedView=tt,i.ui.scheduler.TimelineGroupedByDateView=rt,l=o.extend({init:function(n,t){var i=this;o.fn.init.call(i,n,t),i._groupedView=i._getGroupedView(),i.title=i.options.title||i.options.name,i._workDays=ot(i.options),i._templates(),i._editable(),i.calculateDateRange(),i._groups(),i._currentTime(!0)},name:"timeline",_getGroupedView:function(){return this._isGroupedByDate()?new i.ui.scheduler.TimelineGroupedByDateView(this):new i.ui.scheduler.TimelineGroupedView(this)},_getNextEventIndexBySlot:function(n,t,r){var f,u;if(this._isVerticallyGrouped())return i.ui.SchedulerView.fn._getNextEventIndexBySlot.call(this,n,t,r);for(f=0,u=0;u<t.length;u++)if(n.startDate()>t[u].start.startDate())f++;else{if(!(n.startDate().getTime()===t[u].start.startDate().getTime()&&r>t[u].start.groupIndex))break;f++}return f},_getSelectedSlot:function(n,t,r,u,f,e){return this._isVerticallyGrouped()?i.ui.SchedulerView.fn._getSelectedSlot.call(this,n,t,r,u,f,e):n},_getSortedEvents:function(t){return this._isVerticallyGrouped()?i.ui.SchedulerView.fn._getSortedEvents.call(this,t):t.sort(function(t,i){var r=t.start.startDate().getTime()-i.start.startDate().getTime();return 0===r&&(t.start.isDaySlot&&!i.start.isDaySlot&&(r=-1),!t.start.isDaySlot&&i.start.isDaySlot&&(r=1)),0===r&&(r=t.start.groupIndex-i.start.groupIndex),0===r&&(r=n(t.element).index()-n(i.element).index()),r})},_currentTimeMarkerUpdater:function(){this._updateCurrentTimeMarker(new Date)},_updateCurrentTimeMarker:function(t){var l,d,k,f,v,w,r,g,nt,s,c,o,e,u=this.options;if(this.datesHeader.find("."+h).remove(),this.times.find("."+h).remove(),this.content.find("."+h).remove(),this._isInDateSlot({start:t,end:t}))for(u.currentTimeMarker.useLocalTimezone===!1&&(l=u.dataSource.options.schema.timezone,u.dataSource&&l&&(d=i.timezone.offset(t,l),t=i.timezone.convert(t,t.getTimezoneOffset(),d))),k=u.group&&"vertical"!=u.group.orientation?this.groups.length:1,f=0;f<k;f++){if(v=this.groups[f],!v)return;if(w=i.date.toUtcTime(t),r=v.timeSlotRanges(w,w+1),0===r.length)return;g=r[0].collection,nt=g.slotByStartDate(t),nt&&(this._isVerticallyGrouped()?this._groupedView._updateCurrentVerticalTimeMarker(r,t):(s="<div class='"+h+"'></div>",c=this.datesHeader.find("."+b),o=Math.round(r[0].innerRect(t,new Date(t.getTime()+1),!1).left),e=n(s).prependTo(c).addClass(a+"-down"),e.css({left:this._adjustLeftPosition(o-p(e)*y/2),top:c.find("tr:last").prev().position().top}),n(s).prependTo(this.content).css({left:this._adjustLeftPosition(o),width:"1px",height:this.content[0].scrollHeight-1,top:0})))}},_adjustLeftPosition:function(n){return this._groupedView._adjustLeftPosition(n)},_currentTime:function(n){var i=this,r=i.options.currentTimeMarker;r!==!1&&r.updateInterval!==t&&(i._currentTimeMarkerUpdater(),n&&(i._currentTimeUpdateTimer=setInterval(et(this._currentTimeMarkerUpdater,i),r.updateInterval)))},_editable:function(){this.options.editable&&(this._isMobile()?this._touchEditable():this._mouseEditable())},_mouseEditable:function(){var t=this;t.element.on("click"+s,".k-event a:has(.k-i-close)",function(r){t.trigger("remove",{uid:n(this).closest(".k-event").attr(i.attr("uid"))}),r.preventDefault()}),t.options.editable.create!==!1&&t.element.on("dblclick"+s,".k-scheduler-content td",function(n){var r,i=t._slotByPosition(n.pageX,n.pageY);i&&(r=t._resourceBySlot(i),t.trigger("add",{eventInfo:c({start:i.startDate(),end:i.endDate()},r)})),n.preventDefault()}),t.options.editable.update!==!1&&t.element.on("dblclick"+s,".k-event",function(r){t.trigger("edit",{uid:n(this).closest(".k-event").attr(i.attr("uid"))}),r.preventDefault()})},_touchEditable:function(){var r=this,u=0;i.support.mobileOS.android&&(u=5),r.options.editable.create!==!1&&(r._addUserEvents=new i.UserEvents(r.element,{threshold:u,filter:".k-scheduler-content td",tap:function(n){var u,f=n.x.location!==t?n.x.location:n.x,e=n.y.location!==t?n.y.location:n.y,i=r._slotByPosition(f,e);i&&(u=r._resourceBySlot(i),r.trigger("add",{eventInfo:c({start:i.startDate(),end:i.endDate()},u)})),n.preventDefault()}})),r.options.editable.update!==!1&&(r._editUserEvents=new i.UserEvents(r.element,{threshold:u,filter:".k-event",tap:function(t){var u=n(t.target).closest(".k-event");u.hasClass("k-event-active")||r.trigger("edit",{uid:u.attr(i.attr("uid"))}),t.preventDefault()}}))},_slotByPosition:function(n,t){var o,f,u,r=this.content,e=r.offset();for(n-=e.left,t-=e.top,this._isRtl?(u=i.support.browser,u.mozilla?(n+=r[0].scrollWidth-r[0].offsetWidth,n+=r[0].scrollLeft):u.msie?(n-=r.scrollLeft(),n+=r[0].scrollWidth-r[0].offsetWidth):u.webkit&&(n+=r[0].scrollLeft)):n+=r[0].scrollLeft,t+=r[0].scrollTop,n=Math.ceil(n),t=Math.ceil(t),f=0;f<this.groups.length;f++)if(o=this._groupedView._getTimeSlotByPosition(n,t,f))return o;return null},options:{name:"TimelineView",title:"Timeline",selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}",date:i.date.today(),startTime:i.date.today(),endTime:i.date.today(),showWorkHours:!1,minorTickCount:2,editable:!0,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,majorTick:60,eventHeight:25,eventMinWidth:0,columnWidth:100,groupHeaderTemplate:"#=text#",majorTimeHeaderTemplate:"#=kendo.toString(date, 't')#",slotTemplate:"&nbsp;",eventTemplate:ut,dateHeaderTemplate:it,footer:{command:"workDay"},currentTimeMarker:{updateInterval:1e4,useLocalTimezone:!0},messages:{defaultRowText:"All events",showFullDay:"Show full day",showWorkDay:"Show business hours"}},events:["remove","add","edit"],_templates:function(){var n=this.options,t=c({},i.Template,n.templateSettings);this.eventTemplate=this._eventTmpl(n.eventTemplate,nt),this.majorTimeHeaderTemplate=i.template(n.majorTimeHeaderTemplate,t),this.dateHeaderTemplate=i.template(n.dateHeaderTemplate,t),this.slotTemplate=i.template(n.slotTemplate,t),this.groupHeaderTemplate=i.template(n.groupHeaderTemplate,t)},_render:function(t){var i=this;t=t||[],i._dates=t,i._startDate=t[0],i._endDate=t[t.length-1||0],i._calculateSlotRanges(),i.createLayout(i._layout(t)),i._content(t),i._footer(),i._setContentWidth(),i.refreshLayout(),i.datesHeader.on("click"+s,".k-nav-day",function(t){var u=n(t.currentTarget).closest("th"),r=i._slotByPosition(u.offset().left,i.content.offset().top);i.trigger("navigate",{view:"timeline",date:r.startDate()})}),i._groupedView._hideHeaders()},_setContentWidth:function(){var u=this.content,r=u.width(),i=this.content.find("table"),f=i.find("tr:first").children().length,t=100,n=f*this.options.columnWidth;r<n&&(t=Math.ceil(n/r*100)),i.add(this.datesHeader.find("table")).css("width",t+"%")},_calculateSlotRanges:function(){var s,t,c,l,h=this._dates,o=this.startTime(),n=this.endTime();for(u(n)===u(i.date.getDate(n))&&(n=i.date.getDate(n),r(n,e-1)),n=u(n),o=u(o),s=[],t=0;t<h.length;t++)c=f(h[t]),r(c,o),l=f(h[t]),r(l,n),s.push({start:i.date.toUtcTime(c),end:i.date.toUtcTime(l)});this._slotRanges=s},_forTimeRange:function(n,t,i,f,o){var it,w,a,h,nt,y,c,ft,tt,l,s,b,p,d,et,ut,k,rt;for(n=g(n),t=g(t),it=this,w=u(n),a=u(t),h=it.options.minorTickCount,nt=it.options.majorTick*v,y=nt/h||1,c=new Date(+n),ft=c.getDate(),l=0,b="",s=e/y,w!=a&&(w>a&&(a+=e),s=(a-w)/y),s=f?1:Math.round(s),o&&(s*=o);l<s;l++)p=l%(nt/y),d=0===p,et=p<h-1,ut=p===h-1,k=h,s%h!=0&&(rt=s-(l+1)<h,d&&rt&&(k=s%h)),b+=i(c,d,et,ut,k,l%o),f||(o?l%o==o-1&&r(c,y,!1):r(c,y,!1));return a&&(tt=u(c),ft<c.getDate()&&(tt+=e),tt>a&&(c=new Date(+t))),b},_layout:function(n){for(var f,r,s=[],t=[],i=this,h=[{text:i.options.messages.defaultRowText}],u=i._groupedView,o=[],e=0;e<i.options.minorTickCount;e++)o.push({text:"&#8203;",className:"k-last",minorTicks:!0});for(this._forTimeRange(i.startTime(),i.endTime(),function(n,t,r,f,e){var h,c=i.majorTimeHeaderTemplate;t&&(h={text:c({date:n}),className:f?"k-slot-cell":"",columns:o.slice(0,e)},u._setColspan(h),s.push(h))}),f=0;f<n.length;f++)t.push({text:i.dateHeaderTemplate({date:n[f]}),className:"k-slot-cell",columns:s.slice(0)});return r=this.groupedResources,r.length&&("vertical"===this._groupOrientation()?(h=u._createRowsLayout(r,null,this.groupHeaderTemplate,t),t=u._createVerticalColumnsLayout(r,null,this.groupHeaderTemplate,t)):t=u._createColumnsLayout(r,t,this.groupHeaderTemplate,t)),{columns:t,rows:h}},_footer:function(){var t,u,r,i=this.options;i.footer!==!1&&(t='<div class="k-header k-scheduler-footer">',u=i.footer.command,u&&"workDay"===u?(t+='<ul class="k-reset k-header">',t+='<li class="k-state-default k-scheduler-fullday"><a href="#" class="k-link"><span class="k-icon k-i-clock"></span>',t+=(i.showWorkHours?i.messages.showFullDay:i.messages.showWorkDay)+"</a></li>",t+="</ul>"):t+="&nbsp;",t+="</div>",this.footer=n(t).appendTo(this.element),r=this,this.footer.on("click"+s,".k-scheduler-fullday",function(n){n.preventDefault(),r.trigger("navigate",{view:r.name||i.name,date:r.startDate(),isWorkDay:!i.showWorkHours})}))},_columnCountForLevel:function(n){var t=this.columnLevels[n];return t?t.length:0},_rowCountForLevel:function(n){var t=this.rowLevels[n];return t?t.length:0},_isWorkDay:function(n){for(var r=n.getDay(),i=this._workDays,t=0;t<i.length;t++)if(i[t]===r)return!0;return!1},_content:function(n){var t=this,c=t.startTime(),o=this.endTime(),u=1,f=1,h=n.length,i="",s=this.groupedResources,e=this.slotTemplate,r=!1;s.length&&(r="vertical"===t._groupOrientation(),r?(f=t._groupedView._getRowCount(this.rowLevels.length-1),u=t._groupedView._getGroupsCount()):u=t._groupCount()),i+="<tbody>",i+=t._groupedView._addContent(n,h,u,f,c,o,e,r),i+="</tbody>",this.content.find("table").append(i)},_groups:function(){var t,f,e,u,r=this._groupCount(),n=this._dates,o=n.length;for(this.groups=[],t=0;t<r;t++)f=this._addResourceView(t),e=n[0],u=n[n.length-1||0],f.addTimeSlotCollection(e,i.date.addDays(u,1));this._timeSlotGroups(r,o)},_isHorizontallyGrouped:function(){return this.groupedResources.length&&"horizontal"===this._groupOrientation()},_timeSlotGroups:function(n,t){var r=this._timeSlotInterval(),u=this._isVerticallyGrouped(),i=this.content.find("tr");i.attr("role","row"),this._groupedView._addTimeSlotsCollections(n,t,i,r,u)},_addTimeSlotToCollection:function(n,t,i,r,u,f,e){var s=t[i+r],l=n.getTimeSlotCollection(0),o=this._dates[u],a=Date.UTC(o.getFullYear(),o.getMonth(),o.getDate()),h=a+f,c=h+e;s.setAttribute("role","gridcell"),s.setAttribute("aria-selected",!1),l.addTimeSlot(s,h,c,!0)},startDate:function(){return this._startDate},endDate:function(){return this._endDate},startTime:function(){var n=this.options;return n.showWorkHours?n.workDayStart:n.startTime},endTime:function(){var n=this.options;return n.showWorkHours?n.workDayEnd:n.endTime},_timeSlotInterval:function(){var n=this.options;return n.majorTick/n.minorTickCount*v},nextDate:function(){return i.date.nextDay(this.endDate())},previousDate:function(){return i.date.previousDay(this.startDate())},calculateDateRange:function(){this._render([this.options.date])},render:function(n){var r,f,e,t,u;for(this._headerColumnCount=0,this._groups(),this.element.find(".k-event").remove(),n=new i.data.Query(n).sort([{field:"start",dir:"asc"},{field:"end",dir:"desc"}]).toArray(),r=[],this._eventsByResource(n,this.groupedResources,r),f=[],e=0,t=0;t<r.length;t++)u={groupIndex:t,maxRowCount:0,events:{}},f.push(u),this._renderEvents(r[t],t,u),e<u.maxRowCount&&(e=u.maxRowCount);this._setRowsHeight(f,r.length,e),this._positionEvents(f,r.length),this._currentTime(!1),this.trigger("activate")},_positionEvents:function(t,i){for(var e,o,r,u,f=0;f<i;f++){e=t[f].events;for(o in e)if(r=e[o],n.isArray(r))for(u=0;u<r.length;u++)this._positionEvent(r[u]);else this._positionEvent(r)}},_setRowsHeight:function(t,i,r){var u,f,e,h,s,l=this.options.eventHeight+2,a=this._getBottomRowOffset(),o=this._groupedView,c=o._getVerticalGroupCount(i);for(i=this._isVerticallyGrouped()?c:1,u=0;u<i;u++)f=o._getVerticalRowCount(t,u,r),f=f?f:1,e=(l+2)*f+a,h=n(this.times.find("tr")[u]),s=n(this.content.find("tr")[u]),h.height(e),s.height(e);this._setContentWidth(),this.refreshLayout(),this._refreshSlots()},_getBottomRowOffset:function(){var i,t,n=.5*this.options.eventHeight,r=this._isMobile();return r?(i=30,t=60):(i=15,t=30),n>t?n=t:n<i&&(n=i),n},_positionEvent:function(n){var f,u,r,o=this.options.eventHeight+2,i=n.slotRange.innerRect(n.start,n.end,!1),e=this._adjustLeftPosition(i.left),t=i.right-i.left-2;t<0&&(t=0),t<this.options.eventMinWidth&&(f=n.slotRange.collection,u=f._slots[f._slots.length-1],r=u.offsetLeft+u.offsetWidth,t=this.options.eventMinWidth,r<e+t&&(t=r-i.left-2)),n.element.css({top:n.slotRange.start.offsetTop+n.rowIndex*(o+2)+"px",left:e,width:t})},_refreshSlots:function(){for(var n=0;n<this.groups.length;n++)this.groups[n].refresh()},_eventsByResource:function(n,t,r){var s,u,h,e,f=t[0];if(f)for(s=f.dataSource.view(),u=0;u<s.length;u++)h=this._resourceValue(f,s[u]),e=new i.data.Query(n).filter({field:f.field,operator:o.groupEqFilter(h)}).toArray(),t.length>1?this._eventsByResource(e,t.slice(1),r):r.push(e);else r.push(n)},_isInDateSlot:function(n){var u=n.start,e=n.end,t=f(this._startDate),r=i.date.addDays(f(this._endDate),1);return u<r&&t<=e},_isInTimeSlot:function(n){var t,f=n._startTime||i.date.toUtcTime(n.start),r=n._endTime||i.date.toUtcTime(n.end),u=this._slotRanges;for(f===r&&(r+=1),t=0;t<u.length;t++)if(f<u[t].end&&u[t].start<r)return!0;return!1},_adjustEvent:function(n){var w,a=n.start,l=n.end,y=n._time("start"),p=n._time("end"),h=u(this.startTime()),s=u(this.endTime()),o=null,t=null,c=!1,v=!1;return n.isAllDay?(o=f(a),h>y&&(r(o,h),v=!0),t=f(l),s===u(f(this.endTime()))?t=i.date.addDays(t,1):(r(t,s),c=!0)):(s=0===s?e:s,h>y?(o=f(a),r(o,h),v=!0):s<y&&(o=f(a),o=i.date.addDays(o,1),r(o,h),v=!0),s<p?(t=f(l),r(t,s),c=!0):h>p&&(t=f(l),t=i.date.addDays(t,-1),r(t,s),c=!0)),w=n.clone({start:o?o:a,end:t?t:l,_startTime:o?i.date.toUtcTime(o):n._startTime,_endTime:t?i.date.toUtcTime(t):n._endTime,isAllDay:!1}),{occurrence:w,head:c,tail:v}},_renderEvents:function(n,t,i){for(var r,v,y,o,u,l,s,c,h,f=0,a=n.length;f<a;f++)r=n[f],this._isInDateSlot(r)&&(v=r.isAllDay||r.end.getTime()-r.start.getTime()>=e,y=this.content,(v||this._isInTimeSlot(r))&&(o=this._adjustEvent(r),u=this.groups[t],u._continuousEvents||(u._continuousEvents=[]),l=u.slotRanges(o.occurrence,!1),s=l[0],c=s.start.index,h=s.end.index,this._isInTimeSlot(o.occurrence)&&this._groupedView._renderEvent(i,r,o,u,s,y,c,h)))},addContinuousEvent:function(n,t,r,u){var f=n._continuousEvents;f.push({element:r,isAllDay:u,uid:r.attr(i.attr("uid")),start:t.start,end:t.end})},_createEventElement:function(t,r,u,f){var a,l,k=this.eventTemplate,h=this.options.editable,w=this._isMobile(),p=h&&h.destroy!==!1&&!w,b=h&&h.resize!==!1,y=r._time("start"),v=r._time("end"),e=r.start,o=r.end,s=this.eventResources(r);return r._startTime&&y!==i.date.getMilliseconds(r.start)&&(e=new Date(y),e=i.timezone.apply(e,"Etc/UTC")),r._endTime&&v!==i.date.getMilliseconds(r.end)&&(o=new Date(v),o=i.timezone.apply(o,"Etc/UTC")),a=c({},{ns:i.ns,resizable:b,showDelete:p,head:u,tail:f,singleDay:1==this._dates.length,resources:s,inverseColor:!(!s||!s[0])&&this._shouldInverseResourceColor(s[0]),messages:this.options.messages},r,{start:e,end:o}),l=n(k(a)),this.angular("compile",function(){return{elements:l,data:[{dataItem:a}]}}),l},_arrangeRows:function(n,t,i){var u,r,a,h,f,v,s=t.start.index,y=t.end.index,e=n.slotRange.innerRect(n.start,n.end,!1),c=e.right+this.options.eventMinWidth,l=st(t.events(),e.left,c);for(t.addEvent({slotIndex:s,start:s,end:y,rectLeft:e.left,rectRight:c,element:n.element,uid:n.uid}),l.push({start:s,end:y,uid:n.uid}),u=o.createRows(l),i.maxRowCount<u.length&&(i.maxRowCount=u.length),r=0,a=u.length;r<a;r++)for(h=u[r].events,f=0,v=h.length;f<v;f++)i.events[h[f].uid].rowIndex=r},_groupCount:function(){var n=this.groupedResources,t=this._groupedView;return n.length?"vertical"===this._groupOrientation()?t._verticalCountForLevel(n.length-1):t._horizontalCountForLevel(n.length-1,this.columnLevels.length-1):1},_updateEventForSelection:function(n){var t=this._adjustEvent(n.clone());return t.occurrence},_eventOptionsForMove:function(n){return n.isAllDay?{isAllDay:!1}:{}},_updateEventForResize:function(n){n.isAllDay&&n.set("isAllDay",!1)},_updateMoveHint:function(n,t,i){var f,e,u,o,h=this.groups[t],r=n.clone({start:n.start,end:n.end}),s=r.duration();for(r.start=new Date(r.start.getTime()+i),r.end=new Date(+r.start+s),f=this._adjustEvent(r),e=h.slotRanges(f.occurrence,!1),this._removeMoveHint(),u=0;u<e.length;u++)this._groupedView._createMoveHint(e[u],f);o=this.content,this._moveHint.appendTo(o)},_updateResizeHint:function(n,t,r,u){var e,s,c,f,y,p,w,v,h,a,b=this.groups[t],l=b.ranges(r,u,!1,!1);for(this._removeResizeHint(),e=0;e<l.length;e++)s=l[e],c=s.startSlot(),f=s.innerRect(r,u,!1),f.top=c.offsetTop,y=f.right-f.left,p=s.endSlot().offsetTop+c.offsetHeight-f.top,w=this._adjustLeftPosition(f.left),v=o.fn._createResizeHint.call(this,w,f.top,y,p),this._resizeHint=this._resizeHint.add(v);h="t",a=this.content,this._resizeHint.appendTo(a),this._resizeHint.find(".k-label-top,.k-label-bottom").text(""),this._resizeHint.first().addClass("k-first").find(".k-label-top").text(i.toString(i.timezone.toLocalDate(r),h)),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(i.toString(i.timezone.toLocalDate(u),h))},selectionByElement:function(n){var t=n.offset();return this._slotByPosition(t.left,t.top)},_updateDirection:function(n,t,i,r,u){var e=t[0].start,f=t[t.length-1].end;i&&!u&&e.index===f.index&&e.collectionIndex===f.collectionIndex&&(n.backward=r)},_changeGroup:function(n,t){var r=t?"prevGroupSlot":"nextGroupSlot",i=this[r](n.start,n.groupIndex,!1);return i&&(n.groupIndex+=t?-1:1),this._groupedView._changeGroup(n,t,i),i},prevGroupSlot:function(n,t,i){var r=this.groups[t],u=r.ranges(n,n,i,!1)[0].start;if(!(t<=0))return this._groupedView._prevGroupSlot(u,r,i)},nextGroupSlot:function(n,t,i){var r=this.groups[t],u=r.ranges(n,n,i,!1)[0].start;if(!(t>=this.groups.length-1))return this._groupedView._nextGroupSlot(u,r,i)},_verticalSlots:function(n,t,i,r){var o=this._groupedView,s=o._verticalMethod(r,i),u=t[0].start,f=t[t.length-1].end,h=this.groups[n.groupIndex],e=o._normalizeVerticalSelection(n,t,r,i);return e&&(u=f=e),u=h[s](u),f=h[s](f),i||!this._isVerticallyGrouped()||u&&f||(u=f=o._verticalSlots(n,r,e)),{startSlot:u,endSlot:f}},_horizontalSlots:function(n,t,i,r){var e=r?"upSlot":"downSlot",o=t[0].start,s=t[t.length-1].end,f=this.groups[n.groupIndex],u={};return i?(u.startSlot=f[e](o),u.endSlot=f[e](s),i||!this._isHorizontallyGrouped()||o&&s||(u.startSlot=u.endSlot=this._changeGroup(n,r))):u=this._groupedView._horizontalSlots(n,f,e,o,s,i,r),u},_changeViewPeriod:function(n,t){var o,s=t?this.previousDate():this.nextDate(),f=n.start,i=n.end;return n.start=new Date(s),n.end=new Date(s),this._isHorizontallyGrouped()&&(n.groupIndex=t?this.groups.length-1:0),o=i-f,t?(i=u(this.endTime()),i=0===i?e:i,r(n.start,i-o),r(n.end,i)):(f=u(this.startTime()),r(n.start,f),r(n.end,f+o)),n.events=[],!0},move:function(n,t,r){var s,h,u,o,a,e=!1,v=this.groups[n.groupIndex],f=i.keys,l=this._groupedView,c=v.ranges(n.start,n.end,!1,!1);if(t===f.DOWN||t===f.UP){if(e=!0,u=t===f.UP,l._updateDirection(n,c,r,u),o=this._verticalSlots(n,c,r,u),l._changeVerticalViewPeriod(o,r,n,u))return e}else if((t===f.LEFT||t===f.RIGHT)&&(e=!0,u=t===f.LEFT,this._updateDirection(n,c,r,u,!1),o=this._horizontalSlots(n,c,r,u),l._changeHorizontalViewPeriod(o,r,n,u)))return e;return e&&(s=o.startSlot,h=o.endSlot,r?(a=n.backward,a&&s?n.start=s.startDate():!a&&h&&(n.end=h.endDate())):s&&h&&(n.start=s.startDate(),n.end=h.endDate()),n.events=[]),e},destroy:function(){var n=this;n.element&&n.element.off(s),n.footer&&n.footer.remove(),n._currentTimeUpdateTimer&&clearInterval(n._currentTimeUpdateTimer),o.fn.destroy.call(this),this._isMobile()&&n.options.editable&&(n.options.editable.create!==!1&&n._addUserEvents.destroy(),n.options.editable.update!==!1&&n._editUserEvents.destroy())}}),c(!0,k,{TimelineView:l,TimelineWeekView:l.extend({options:{name:"TimelineWeekView",title:"Timeline Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",majorTick:120},name:"timelineWeek",calculateDateRange:function(){for(var f=this.options.date,n=i.date.dayOfWeek(f,this.calendarInfo().firstDay,-1),r=[],t=0,u=7;t<u;t++)r.push(n),n=i.date.nextDay(n);this._render(r)}}),TimelineWorkWeekView:l.extend({options:{name:"TimelineWorkWeekView",title:"Timeline Work Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",majorTick:120},name:"timelineWorkWeek",nextDate:function(){var n=i.date.dayOfWeek(i.date.nextDay(this.endDate()),this.calendarInfo().firstDay,1);return i.date.addDays(n,this._workDays[0])},previousDate:function(){var t=i.date.dayOfWeek(this.startDate(),this.calendarInfo().firstDay,-1),n=this._workDays;return i.date.addDays(t,n[n.length-1]-7)},calculateDateRange:function(){for(var r=this.options.date,n=i.date.dayOfWeek(r,this.options.workWeekStart,-1),u=i.date.dayOfWeek(n,this.options.workWeekEnd,1),t=[];n<=u;)t.push(n),n=i.date.nextDay(n);this._render(t)}}),TimelineMonthView:l.extend({options:{name:"TimelineMonthView",title:"Timeline Month",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",workDayStart:new Date(1980,1,1,0,0,0),workDayEnd:new Date(1980,1,1,23,59,59),footer:!1,majorTick:1440,minorTickCount:1},name:"timelineMonth",calculateDateRange:function(){for(var f=this.options.date,n=i.date.firstDayOfMonth(f),e=i.date.lastDayOfMonth(f),r=[],t=0,u=e.getDate();t<u;t++)r.push(n),n=i.date.nextDay(n);this._render(r)}})})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.scheduler.min",["kendo.dropdownlist.min","kendo.editable.min","kendo.multiselect.min","kendo.window.min","kendo.datetimepicker.min","kendo.scheduler.recurrence.min","kendo.scheduler.view.min","kendo.scheduler.dayview.min","kendo.scheduler.agendaview.min","kendo.scheduler.monthview.min","kendo.scheduler.timelineview.min","kendo.mobile.actionsheet.min","kendo.mobile.pane.min","kendo.pdf.min"],n)}(function(){return function(n,t){function vt(n,t){return t=t||"",n.startTimezone&&(t=n.startTimezone,n.endTimezone&&(t+=" | "+n.endTimezone)),t}function lt(n,t){var r=t.timezone;r&&(n[i.attr("timezone")]=r)}function gt(n,t){var r,u=t.model.fields[t.field].validation;u&&(r=u.dateCompare,r&&f(r)&&r.message&&(n[i.attr("dateCompare-msg")]=r.message))}function vr(n,t){return function(i){return i=n(i),at(i,"apply",t),i||[]}}function cr(n,t){return function(r){return r&&("[object Array]"===ar.call(r)||r instanceof i.data.ObservableArray||(r=[r])),at(r,"remove",t,!0),r=n(r),r||[]}}function at(n,t,r,u){var f,e,o;for(n=n||[],e=0,o=n.length;e<o;e++)f=n[e],u?f.startTimezone||f.endTimezone?r?(f.start=i.timezone.convert(f.start,f.startTimezone||f.endTimezone,r),f.end=i.timezone.convert(f.end,f.endTimezone||f.startTimezone,r),f.start=i.timezone[t](f.start,r),f.end=i.timezone[t](f.end,r)):(f.start=i.timezone[t](f.start,f.startTimezone||f.endTimezone),f.end=i.timezone[t](f.end,f.endTimezone||f.startTimezone)):r&&(f.start=i.timezone[t](f.start,r),f.end=i.timezone[t](f.end,r)):f.startTimezone||f.endTimezone?(f.start=i.timezone[t](f.start,f.startTimezone||f.endTimezone),f.end=i.timezone[t](f.end,f.endTimezone||f.startTimezone),r&&(f.start=i.timezone.convert(f.start,f.startTimezone||f.endTimezone,r),f.end=i.timezone.convert(f.end,f.endTimezone||f.startTimezone,r))):r&&(f.start=i.timezone[t](f.start,r),f.end=i.timezone[t](f.end,r)),u&&delete f.uid;return n}function si(n,t){for(var r,u=n.length,i=0;i<u;i++)if(r=n[i],r.uid===t)return r}function ui(n,t,r){return n=r?i.timezone.convert(n,t,r):i.timezone.remove(n,t)}function er(n){var o,e,h,r,t,c,a,v,s,l,u,f;return!(n.filter("[name=end]").length&&(o=n.closest(".k-scheduler-edit-form"),e=o.find("[name=start]:visible"),h=o.find("[name=end]:visible"),h[0]&&e[0]&&(c=i.widgetInstance(e,i.ui),a=i.widgetInstance(h,i.ui),v=o.data("kendoEditable"),s=v?v.options.model:null,c&&a?(r=c.value(),t=a.value()):(r=i.parseDate(e.val()),t=i.parseDate(h.val())),r&&t)))||(s&&(l=e.attr(i.attr("timezone")),u=s.startTimezone,f=s.endTimezone,u=u||f,f=f||u,u&&(r=ui(r,u,l),t=ui(t,f,l))),r<=t)}function hr(n,t,i,r){for(var e=n.length,f=[],u=0;u<e;u++)f=f.concat(n[u].expand(t,i,r));return f}function kr(n){return delete n.name,delete n.prefix,delete n.remove,delete n.edit,delete n.add,delete n.navigate,n}function d(t,r){var u,e,h=(t.fields||t)[r],c=["url","email","number","date","boolean"],s=h?h.validation:{},a=i.attr("type"),l=n.inArray,o={};for(u in s)e=s[u],l(u,c)>=0?o[a]=u:i.isFunction(e)||(o[u]=f(e)?e.value||u:e),o[i.attr(u+"-msg")]=e.message;return o}function dt(t,r){var u=d(r,t.field);return function(f){n(i.format('<select data-{0}bind="value:{1}" title="'+r.title+'">',i.ns,t.field)).appendTo(f).attr(u).kendoDropDownList({dataTextField:t.dataTextField,dataValueField:t.dataValueField,dataSource:t.dataSource,valuePrimitive:t.valuePrimitive,optionLabel:"None",template:i.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField)})}}function wt(t){var i=d(t.model,t.field);return function(t,r){n('<textarea name="description" class="k-textbox" title="'+r.title+'"/>').attr(i).appendTo(t)}}function nu(t,r){var u=d(r,t.field);return function(r){n(i.format('<select data-{0}bind="value:{1}">',i.ns,t.field)).appendTo(r).attr(u).kendoMultiSelect({dataTextField:t.dataTextField,dataValueField:t.dataValueField,dataSource:t.dataSource,valuePrimitive:t.valuePrimitive,itemTemplate:i.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField),tagTemplate:i.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField)})}}function dr(t,r){var u=d(r,t.field);return function(r){for(var s="",e=t.dataSource.view(),f=0,o=e.length;f<o;f++)s+=i.format('<option value="{0}">{1}</option>',i.getter(t.dataValueField)(e[f]),i.getter(t.dataTextField)(e[f]));n(i.format('<select data-{0}bind="value:{1}" multiple="multiple" data-{0}value-primitive="{3}">{2}</select>',i.ns,t.field,s,t.valuePrimitive)).appendTo(r).attr(u)}}function ti(n,t){var u,f=n.end.getTime()-n.start.getTime(),r=new Date(n.start.getTime());return i.date.setTime(r,t),u=new Date(r.getTime()),i.date.setTime(u,f,!0),{start:r,end:u}}var ot,ft,it,li,ci,b,fi,ht,hi,ei,oi,ii,i=window.kendo,ri=i.date,sr=i.support.input,k=ri.MS_PER_DAY,e=ri.getDate,ut=i.date.getMilliseconds,v=i.recurrence,et=i.keys,a=i.ui,s=a.Widget,or=a.DataBoundWidget,w="string",lr=a.Popup,yr=a.Calendar,c=i.data.DataSource,f=n.isPlainObject,u=n.extend,h=n.proxy,ar=Object.prototype.toString,yt=n.isArray,r=".kendoScheduler",o="click",ai="mousedown",st="change",tt="cancel",p="remove",rt="save",ni="add",y="edit",gr=/(?:value:start|value:end)(?:,|$)/,pr=e(new Date),g=",",pt=/\;/g,ct="recurrenceException",br="Are you sure you want to delete this event?",wr="Do you want to delete only this event occurrence or the whole series?",kt="Do you want to edit only this event occurrence or the whole series?",fr="Are you sure you want to delete this event occurrence?",wi="Are you sure you want to delete the whole series?",bi='<a class="k-button #=className#" #=attr# href="\\#">#=text#</a>',yi=i.template('<li class="k-current-view" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>'),vi=i.template('<div class="k-floatwrap k-header k-scheduler-toolbar"># if (pdf) { #<ul class="k-reset k-scheduler-tools"><li><a role="button" href="\\#" class="k-button k-pdf"><span class="k-icon k-i-file-pdf"></span>${messages.pdf}</a></li></ul># } #<ul class="k-reset k-scheduler-navigation"><li class="k-state-default k-header k-nav-today"><a role="button" href="\\#" class="k-link" title="${messages.today}">${messages.today}</a></li><li class="k-state-default k-header k-nav-prev"><a role="button" href="\\#" class="k-link" title="${messages.previous}" aria-label="${messages.previous}"><span class="k-icon k-i-arrow-60-left"></span></a></li><li class="k-state-default k-header k-nav-next"><a role="button" href="\\#" class="k-link" title="${messages.next}" aria-label="${messages.next}"><span class="k-icon k-i-arrow-60-right"></span></a></li><li class="k-state-default k-nav-current"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-calendar"></span><span class="k-sm-date-format" data-#=ns#bind="text: formattedShortDate"></span><span class="k-lg-date-format" data-#=ns#bind="text: formattedDate"></span></a></li></ul>#if(viewsCount === 1){#<a role="button" data-#=ns#name="#=view#" href="\\#" class="k-link k-scheduler-refresh"><span class="k-icon k-i-reload"></span></a>#}else{#<ul class="k-reset k-header k-scheduler-views">#for(var view in views){#<li class="k-state-default k-view-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>#}#</ul>#}#</div>'),ki=i.template('<div class="k-floatwrap k-header k-scheduler-toolbar"><ul class="k-reset k-header k-scheduler-navigation"><li class="k-state-default k-nav-today"><a role="button" href="\\#" class="k-link">${messages.today}</a></li></ul>#if(viewsCount === 1){#<a role="button" data-#=ns#name="#=view#" href="\\#" class="k-link k-scheduler-refresh"><span class="k-icon k-i-reload"></span></a>#}else{#<ul class="k-reset k-header k-scheduler-views">#for(var view in views){#<li class="k-state-default k-view-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>#}#</ul>#}#</div><div class="k-floatwrap k-header k-scheduler-toolbar"><ul class="k-reset k-header k-scheduler-navigation"><li class="k-state-default k-nav-prev"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-60-left"></span></a></li><li class="k-state-default k-nav-current"><span class="k-sm-date-format" data-#=ns#bind="text: formattedShortDate"></span><span class="k-lg-date-format" data-#=ns#bind="text: formattedDate"></span></li><li class="k-state-default k-nav-next"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-60-right"></span></a></li></ul></div>'),ir=function(t,r){var u={name:r.field,title:r.title},s=sr.date?"":i.attr("role")+'="datepicker" ',h=i.attr("role")+'="datetimepicker" ',f=r.model.isAllDay,o=i.attr("validate")+"='"+!f+"'",e=i.attr("validate")+"='"+f+"'";lt(u,r),gt(u,r),n('<input type="datetime-local" required '+i.attr("type")+'="date" '+h+i.attr("bind")+'="value:'+r.field+',invisible:isAllDay" '+o+"/>").attr(u).appendTo(t),n('<input type="date" required '+i.attr("type")+'="date" '+s+i.attr("bind")+'="value:'+r.field+',visible:isAllDay" '+e+"/>").attr(u).appendTo(t),n("<span "+i.attr("for")+'="'+r.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},ur=function(t,r){var u={name:r.field,title:r.title},f=r.model.isAllDay,o=i.attr("validate")+"='"+!f+"' ",e=i.attr("validate")+"='"+f+"' ";lt(u,r),gt(u,r),n('<input type="text" required '+i.attr("type")+'="date" '+i.attr("role")+'="datetimepicker" '+i.attr("bind")+'="value:'+r.field+',invisible:isAllDay" '+o+"/>").attr(u).appendTo(t),n('<input type="text" required '+i.attr("type")+'="date" '+i.attr("role")+'="datepicker" '+i.attr("bind")+'="value:'+r.field+',visible:isAllDay" '+e+"/>").attr(u).appendTo(t),n("<span "+i.attr("bind")+'="text: '+r.field+'Timezone"></span>').appendTo(t),"end"===r.field&&n("<span "+i.attr("bind")+'="text: startTimezone, invisible: endTimezone"></span>').appendTo(t),n("<span "+i.attr("for")+'="'+r.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},tr=function(t,r){n("<div "+i.attr("bind")+'="value:'+r.field+'" />').attr({name:r.field}).appendTo(t).kendoRecurrenceEditor({start:r.model.start,timezone:r.timezone,messages:r.messages})},gi=function(t,r){n("<div "+i.attr("bind")+'="value:'+r.field+'" />').attr({name:r.field}).appendTo(t).kendoMobileRecurrenceEditor({start:r.model.start,timezone:r.timezone,messages:r.messages,pane:r.pane,value:r.model[r.field]})},nr=function(t,i){var r=vt(i.model,i.messages.noTimezone);n('<a href="#" class="k-button k-timezone-button" data-bind="invisible:isAllDay">'+r+"</a>").click(i.click).appendTo(t)},di=function(t,i){n('<a href="#" class="k-button" data-bind="invisible:isAllDay">'+i.messages.timezoneEditorButton+"</a>").click(i.click).appendTo(t)},pi=function(t,r){n("<div "+i.attr("bind")+'="value:'+r.field+'" />').attr({name:r.field}).toggle(r.visible).appendTo(t).kendoMobileTimezoneEditor({optionLabel:r.noTimezone})},rr=function(r,u){var f=u.visible||u.visible===t;n("<div "+i.attr("bind")+'="value:'+u.field+'" />').attr({name:u.field}).toggle(f).appendTo(r).kendoTimezoneEditor({optionLabel:u.noTimezone,title:u.title})},bt=i.Class.extend({init:function(t,i){var r=t.timezone;this.reader=i,i.model&&(this.model=i.model),this.timezone=r,this.data=vr(n.proxy(this.data,this),r),this.serialize=cr(n.proxy(this.serialize,this),r)},errors:function(n){return this.reader.errors(n)},parse:function(n){return this.reader.parse(n)},data:function(n){return this.reader.data(n)},total:function(n){return this.reader.total(n)},groups:function(n){return this.reader.groups(n)},aggregates:function(n){return this.reader.aggregates(n)},serialize:function(n){return this.reader.serialize(n)}}),nt=i.data.Model.define({init:function(n){var t=this;i.data.Model.fn.init.call(t,n),t._defaultId=t.defaults[t.idField]},_time:function(n){var r=this[n],t="_"+n+"Time";return this[t]?this[t]-i.date.toUtcTime(i.date.getDate(r)):ut(r)},_date:function(n){var t="_"+n+"Time";return this[t]?this[t]-this._time(n):i.date.getDate(this[n])},clone:function(t,i){var u=this.uid,r=new this.constructor(n.extend({},this.toJSON(),t));return i||(r.uid=u),r},duration:function(){var t=this.end,n=this.start,r=(t.getTimezoneOffset()-n.getTimezoneOffset())*i.date.MS_PER_MINUTE;return t-n-r},expand:function(n,t,i){return v?v.expand(this,n,t,i):[this]},update:function(n){for(var t in n)this.set(t,n[t]);this._startTime&&this.set("_startTime",i.date.toUtcTime(this.start)),this._endTime&&this.set("_endTime",i.date.toUtcTime(this.end))},isMultiDay:function(){return this.isAllDay||this.duration()>=i.date.MS_PER_DAY},isException:function(){return!this.isNew()&&this.recurrenceId},isOccurrence:function(){return this.isNew()&&this.recurrenceId},isRecurring:function(){return!(!this.recurrenceRule&&!this.recurrenceId)},isRecurrenceHead:function(){return!(!this.id||!this.recurrenceRule)},toOccurrence:function(t){return t=n.extend(t,{recurrenceException:null,recurrenceRule:null,recurrenceId:this.id||this.recurrenceId}),t[this.idField]=this.defaults[this.idField],this.clone(t,!0)},toJSON:function(){var n=i.data.Model.fn.toJSON.call(this);return n.uid=this.uid,delete n._startTime,delete n._endTime,n},shouldSerialize:function(n){return i.data.Model.fn.shouldSerialize.call(this,n)&&"_defaultId"!==n},set:function(n,t){var f,r,u,e=this.isAllDay||!1;i.data.Model.fn.set.call(this,n,t),"isAllDay"==n&&t!=e&&(f=i.date.getDate(this.start),r=new Date(this.end),u=i.date.getMilliseconds(r),0===u&&t&&(u=k),this.set("start",f),t===!0?(i.date.setTime(r,-u),r<f&&(r=f)):i.date.setTime(r,k-u),this.set("end",r))},id:"id",fields:{id:{type:"number"},title:{defaultValue:"",type:"string"},start:{type:"date",validation:{required:!0}},startTimezone:{type:"string"},end:{type:"date",validation:{required:!0,dateCompare:{value:er}}},endTimezone:{type:"string"},recurrenceRule:{defaultValue:"",type:"string"},recurrenceException:{defaultValue:"",type:"string"},isAllDay:{type:"boolean",defaultValue:!1},description:{type:"string"}}}),l=c.extend({init:function(n){c.fn.init.call(this,u(!0,{},{schema:{modelBase:nt,model:nt}},n)),this.reader=new bt(this.options.schema,this.reader)},expand:function(n,t){var r=this.view(),u={};return n&&t&&(t=new Date(t.getTime()+k-1),u={logic:"or",filters:[{logic:"and",filters:[{field:"start",operator:"gte",value:n},{field:"end",operator:"gte",value:n},{field:"start",operator:"lte",value:t}]},{logic:"and",filters:[{field:"start",operator:"lte",value:new Date(n.getTime()+k-1)},{field:"end",operator:"gte",value:n}]}]},r=new i.data.Query(hr(r,n,t,this.reader.timezone)).filter(u).toArray()),r},cancelChanges:function(n){n&&n.isOccurrence()&&this._removeExceptionDate(n),c.fn.cancelChanges.call(this,n)},insert:function(n,t){if(t){if(!(t instanceof nt)){var i=t;t=this._createNewModel(),t.accept(i)}return(!this._pushCreated&&t.isRecurrenceHead()||t.recurrenceId)&&(t=t.recurrenceId?t:t.toOccurrence(),this._addExceptionDate(t)),c.fn.insert.call(this,n,t)}},pushCreate:function(n){this._pushCreated=!0,c.fn.pushCreate.call(this,n),this._pushCreated=!1},remove:function(n){return n.isRecurrenceHead()?this._removeExceptions(n):n.isRecurring()&&this._addExceptionDate(n),c.fn.remove.call(this,n)},_removeExceptions:function(n){for(var i=this.data().slice(0),t=i.shift(),r=n.id;t;)t.recurrenceId===r&&c.fn.remove.call(this,t),t=i.shift();n.set(ct,"")},_removeExceptionDate:function(n){var t,u,r,i;n.recurrenceId&&(t=this.get(n.recurrenceId),t&&(u=n.start,r=RegExp("(\\"+g+"?)"+v.toExceptionString(u,this.reader.timezone)),i=(t.recurrenceException||"").replace(pt,g).replace(/\,$/,""),t.set(ct,i.replace(r,""))))},_addExceptionDate:function(n){var i,r=n.start,f=this.reader.timezone,u=this.get(n.recurrenceId),t=(u.recurrenceException||"").replace(pt,g).replace(/\,$/,"");v.isException(t,r,f)||(i=v.toExceptionString(r,f),u.set(ct,t+(t&&i?g:"")+i))}});l.create=function(n){(yt(n)||n instanceof i.data.ObservableArray)&&(n={data:n});var t=n||{},r=t.data;if(t.data=r,!(t instanceof l)&&t instanceof i.data.DataSource)throw Error("Incorrect DataSource type. Only SchedulerDataSource instances are supported");return t instanceof l?t:new l(t)},u(!0,i.data,{SchedulerDataSource:l,SchedulerDataReader:bt,SchedulerEvent:nt}),ot={update:{text:"Save",className:"k-primary k-scheduler-update"},canceledit:{text:"Cancel",className:"k-scheduler-cancel"},destroy:{text:"Delete",imageClass:"k-i-close",className:"k-primary k-scheduler-delete",iconClass:"k-icon"}},ft={mobile:{dateRange:ir,timezonePopUp:nr,timezone:pi,recurrence:gi,description:wt,multipleResources:dr,resources:dt},desktop:{dateRange:ur,timezonePopUp:di,timezone:rr,recurrence:tr,description:wt,multipleResources:nu,resources:dt}},it=i.Observable.extend({init:function(n,t){i.Observable.fn.init.call(this),this.element=n,this.options=u(!0,{},this.options,t),this.createButton=this.options.createButton,this.toggleDateValidationHandler=h(this._toggleDateValidation,this)},_toggleDateValidation:function(t){if("isAllDay"==t.field){var r,e,f,o=this.container,s=this.editable.options.model.isAllDay,u=i.attr("bind");o.find("["+u+"*=end],["+u+"*=start]").each(function(){r=n(this),gr.test(r.attr(u))&&(e=r.is("["+i.attr("role")+"=datetimepicker],[type*=datetime]"),f=s!==e,r.attr(i.attr("validate"),f))})}},fields:function(n,t){var e,f,o=this,r=o.options.messages,s=o.options.timezone,h=function(n){n.preventDefault(),o._initTimezoneEditor(t,this)},u=[{field:"title",title:r.editor.title},{field:"start",title:r.editor.start,editor:n.dateRange,timezone:s},{field:"end",title:r.editor.end,editor:n.dateRange,timezone:s},{field:"isAllDay",title:r.editor.allDayEvent}];for(i.timezone.windows_zones&&(u.push({field:"timezone",title:r.editor.timezone,editor:n.timezonePopUp,click:h,messages:r.editor,model:t}),u.push({field:"startTimezone",title:r.editor.startTimezone,editor:n.timezone,noTimezone:r.editor.noTimezone}),u.push({field:"endTimezone",title:r.editor.endTimezone,editor:n.timezone,noTimezone:r.editor.noTimezone})),t.recurrenceId||u.push({field:"recurrenceRule",title:r.editor.repeat,editor:n.recurrence,timezone:s,messages:r.recurrenceEditor,pane:this.pane}),("description"in t)&&u.push({field:"description",title:r.editor.description,editor:n.description({model:t,field:"description"})}),e=0;e<this.options.resources.length;e++)f=this.options.resources[e],u.push({field:f.field,title:f.title,editor:f.multiple?n.multipleResources(f,t):n.resources(f,t)});return u},end:function(){return this.editable.end()},_buildEditTemplate:function(n,t,r){var h,l,f,o,a=this.options.messages,c=u({},i.Template,this.options.templateSettings),v=c.paramName,s=this.options.editable.template,e="";if(s)typeof s===w&&(s=window.unescape(s)),e+=i.template(s,c)(n);else for(h=0,l=t.length;h<l;h++)f=t[h],"startTimezone"===f.field&&(e+='<div class="k-popup-edit-form k-scheduler-edit-form k-scheduler-timezones" style="display:none">',e+='<div class="k-edit-form-container">',e+='<div class="k-edit-label"></div>',e+='<div class="k-edit-field"><label class="k-check"><input class="k-timezone-toggle" type="checkbox" />'+a.editor.separateTimezones+"</label></div>"),e+='<div class="k-edit-label"><label for="'+f.field+'">'+(f.title||f.field||"")+"</label></div>",!n.editable||n.editable(f.field)?(r.push(f),e+="<div "+i.attr("container-for")+'="'+f.field+'" class="k-edit-field"></div>'):(o="#:",f.field?(f=i.expr(f.field,v),o+=f+"==null?'':"+f):o+="''",o+="#",o=i.template(o,c),e+='<div class="k-edit-field">'+o(n)+"</div>"),"endTimezone"===f.field&&(e+=this._createEndTimezoneButton());return e},_createEndTimezoneButton:function(){return"</div></div>"},_revertTimezones:function(n){n.set("startTimezone",this._startTimezone),n.set("endTimezone",this._endTimezone),delete this._startTimezone,delete this._endTimezone}}),li=it.extend({init:function(){it.fn.init.apply(this,arguments),this.pane=i.mobile.ui.Pane.wrap(this.element),this.pane.element.parent().css("height",this.options.height),this.view=this.pane.view(),this._actionSheetButtonTemplate=i.template('<li><a #=attr# class="k-button #=className#" href="\\#">#:text#</a></li>'),this._actionSheetPopupOptions=n(document.documentElement).hasClass("km-root")?{modal:!1}:{align:"bottom center",position:"bottom center",effect:"slideIn:up"}},options:{animations:{left:"slide",right:"slide:right"}},destroy:function(){this.close(),this.unbind(),this.pane.destroy()},_initTimezoneEditor:function(t){var a,i=this,h=i.pane,c=i.options.messages,u=i.timezoneView,s=i.container.find(".k-scheduler-timezones"),f=s.find(".k-timezone-toggle"),e=s.find(".k-edit-label:last").add(s.find(".k-edit-field:last")),l=function(n){if("startTimezone"===n.field){var i=t.startTimezone;f.prop("disabled",!i),i||(e.hide(),t.set("endTimezone",""),f.prop("checked",!1))}};i._startTimezone=t.startTimezone||"",i._endTimezone=t.endTimezone||"",u||(a='<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">'+c.cancel+"</a>"+c.editor.timezoneTitle+'<a href="#" class="k-button k-scheduler-update">'+c.save+"</a></div></div>",this.timezoneView=u=h.append(a),u.contentElement().append(s.show()),u.element.on(o+r,".k-scheduler-cancel, .k-scheduler-update",function(r){var u,f;r.preventDefault(),r.stopPropagation(),n(this).hasClass("k-scheduler-cancel")&&i._revertTimezones(t),t.unbind("change",l),u=h.element.find("#edit").data("kendoMobileView"),f=vt(t,c.editor.noTimezone),u.contentElement().find(".k-timezone-button").text(f),h.navigate(u,i.options.animations.right)}),f.click(function(){e.toggle(f.prop("checked")),t.set("endTimezone","")}),t.bind("change",l)),f.prop("checked",t.endTimezone).prop("disabled",!t.startTimezone),t.endTimezone?e.show():e.hide(),h.navigate(u,i.options.animations.left)},_createActionSheetButton:function(n){return n.template=this._actionSheetButtonTemplate,this.createButton(n)},showDialog:function(t){var u,r,o="",f='<ul><li class="km-actionsheet-title">'+t.title+"</li>",e=this.element.find(".k-event["+i.attr("uid")+"='"+t.model.uid+"']");for(this.container&&(e=this.container.find(".k-scheduler-delete"),e[0]&&(o="phone")),u=0;u<t.buttons.length;u++)f+=this._createActionSheetButton(t.buttons[u]);f+="</ul>",r=n(f).appendTo(this.pane.view().element).kendoMobileActionSheet({type:o,cancel:this.options.messages.cancel,cancelTemplate:'<li class="km-actionsheet-cancel"><a class="k-button" href="\\#">#:cancel#</a></li>',close:function(){this.destroy()},command:function(i){var u=r.element.find("li:not(.km-actionsheet-cancel) > .k-button").index(n(i.currentTarget));u>-1&&(r.close(),t.buttons[u].click())},popup:this._actionSheetPopupOptions}).data("kendoMobileActionSheet"),r.open(e)},editEvent:function(t){var a,f,c,l,u,h=this.pane,e="",s=this.options.messages,p=s.save,w=s.destroy,v=s.cancel,y=s.editor.editorTitle;return e+='<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list" id="edit" '+i.attr("uid")+'="'+t.uid+'"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">'+v+"</a>"+y+'<a href="#" class="k-button k-scheduler-update">'+p+"</a></div>",a=this.fields(ft.mobile,t),f=this,c=[],e+=this._buildEditTemplate(t,a,c),!t.isNew()&&this.options.editable&&this.options.editable.destroy!==!1&&(e+='<div class="k-edit-buttons"><a href="#" class="k-scheduler-delete k-button">'+w+"</a></div>"),e+="</div>",l=h.append(e),u=this.container=l.element,this.editable=u.kendoEditable({fields:c,model:t,clearContainer:!1,target:f.options.target,validateOnBlur:!0}).data("kendoEditable"),u.find("input[type=checkbox],input[type=radio]").parent(".k-edit-field").addClass("k-check").prev(".k-edit-label").addClass("k-check").click(function(){n(this).next().children("input").click()}),this.trigger("edit",{container:u,model:t})?this.trigger("cancel",{container:u,model:t}):(u.on(o+r,"a.k-scheduler-edit, a.k-scheduler-cancel, a.k-scheduler-update, a.k-scheduler-delete",function(i){var e,r;i.preventDefault(),i.stopPropagation(),e=n(this),e.hasClass("k-scheduler-edit")?h.navigate("#edit",f.options.animations.right):(r="cancel",e.hasClass("k-scheduler-update")?r="save":e.hasClass("k-scheduler-delete")&&(r="remove"),f.trigger(r,{container:u,model:t}))}),h.navigate(l,f.options.animations.left),t.bind("change",f.toggleDateValidationHandler)),this.editable},_views:function(){return this.pane.element.find(i.roleSelector("view")).not(this.view.element)},close:function(){var t,i,n,r;if(this.container){for(this.pane.navigate("",this.options.animations.right),t=this._views(),n=0,r=t.length;n<r;n++)i=t.eq(n).data("kendoMobileView"),i&&i.purge();t.remove(),this.container=null,this.editable&&(this.editable.options.model.unbind("change",this.toggleDateValidationHandler),this.editable.destroy(),this.editable=null),this.timezoneView=null}}}),ci=it.extend({destroy:function(){this.close(),this.unbind()},editEvent:function(t){var l,w,s,e=this,a=e.options.editable,h="<div "+i.attr("uid")+'="'+t.uid+'" class="k-popup-edit-form k-scheduler-edit-form"><div class="k-edit-form-container">',c=e.options.messages,k=c.save,d=c.cancel,g=c.destroy,b=this.fields(ft.desktop,t),v=[];return h+=this._buildEditTemplate(t,b,v),w=f(a)?a.window:{},h+='<div class="k-edit-buttons k-state-default">',h+=this.createButton({name:"update",text:k,attr:l})+this.createButton({name:"canceledit",text:d,attr:l}),t.isNew()||a.destroy===!1||(h+=this.createButton({name:"delete",text:g,attr:l})),h+="</div></div></div>",s=this.container=n(h).appendTo(e.element).eq(0).kendoWindow(u({modal:!0,resizable:!1,draggable:!0,title:c.editor.editorTitle,visible:!1,close:function(n){n.userTriggered&&e.trigger(tt,{container:s,model:t})&&n.preventDefault()}},w)),e.editable=s.kendoEditable({fields:v,model:t,clearContainer:!1,validateOnBlur:!0,target:e.options.target}).data("kendoEditable"),e.trigger(y,{container:s,model:t})?e.trigger(tt,{container:s,model:t}):(s.data("kendoWindow").center().open(),s.on(o+r,"a.k-scheduler-cancel",function(n){n.preventDefault(),n.stopPropagation(),e.trigger(tt,{container:s,model:t})}),s.on(o+r,"a.k-scheduler-update",function(n){n.preventDefault(),n.stopPropagation(),e.trigger("save",{container:s,model:t})}),s.on(o+r,"a.k-scheduler-delete",function(n){n.preventDefault(),n.stopPropagation(),e.trigger(p,{container:s,model:t})}),i.cycleForm(s),t.bind("change",e.toggleDateValidationHandler)),e.editable},close:function(){var n=this,t=function(){n.editable&&(n.editable.options.model.unbind("change",n.toggleDateValidationHandler),n.editable.destroy(),n.editable=null,n.container=null),n.popup&&(n.popup.destroy(),n.popup=null)};n.editable?(n._timezonePopup&&n._timezonePopup.data("kendoWindow")&&(n._timezonePopup.data("kendoWindow").destroy(),n._timezonePopup=null),n.container.is(":visible")?n.container.data("kendoWindow").bind("deactivate",t).close():t()):t()},_createEndTimezoneButton:function(){var t=this.options.messages,n="";return n+='<div class="k-edit-buttons k-state-default">',n+=this.createButton({name:"savetimezone",text:t.save})+this.createButton({name:"canceltimezone",text:t.cancel}),n+="</div></div></div>"},showDialog:function(t){var u,f,e,r=i.format("<div class='k-popup-edit-form'><div class='k-edit-form-container'><p class='k-popup-message'>{0}</p>",t.text);for(r+='<div class="k-edit-buttons k-state-default">',u=0;u<t.buttons.length;u++)r+=this.createButton(t.buttons[u]);r+="</div></div></div>",f=this.element,this.popup&&this.popup.destroy(),e=this.popup=n(r).appendTo(f).eq(0).on("click",".k-button",function(i){i.preventDefault(),e.close();var r=n(i.currentTarget).index();t.buttons[r].click()}).kendoWindow({modal:!0,resizable:!1,draggable:!1,title:t.title,visible:!1,close:function(){this.destroy(),f.focus()}}).getKendoWindow(),e.center().open()},_initTimezoneEditor:function(n,t){var e,i=this,r=i.container.find(".k-scheduler-timezones"),u=r.find(".k-timezone-toggle"),f=r.find(".k-edit-label:last").add(r.find(".k-edit-field:last")),h=r.find(".k-scheduler-savetimezone"),c=r.find(".k-scheduler-canceltimezone"),o=i._timezonePopup,s=function(t){if("startTimezone"===t.field){var i=n.startTimezone;u.prop("disabled",!i),i||(f.hide(),n.set("endTimezone",""),u.prop("checked",!1))}};i._startTimezone=n.startTimezone,i._endTimezone=n.endTimezone,o||(i._timezonePopup=o=r.kendoWindow({modal:!0,resizable:!1,draggable:!0,title:i.options.messages.editor.timezoneEditorTitle,visible:!1,close:function(r){n.unbind("change",s),r.userTriggered&&i._revertTimezones(n),t&&t.focus()}}),u.click(function(){f.toggle(u.prop("checked")),n.set("endTimezone","")}),h.click(function(n){n.preventDefault(),e.close()}),c.click(function(t){t.preventDefault(),i._revertTimezones(n),e.close()}),n.bind("change",s)),u.prop("checked",n.endTimezone).prop("disabled",!n.startTimezone),n.endTimezone?f.show():f.hide(),e=o.data("kendoWindow"),e.center().open()}}),b=or.extend({init:function(t,u){var f=this;s.fn.init.call(f,t,u),f.options.views&&f.options.views.length||(f.options.views=["day","week"]),f.resources=[],f._initModel(),f._wrapper(),f._views(),f._toolbar(),f._dataSource(),f._resources(),f._resizeHandler=function(){f.resize()},f.wrapper.on("mousedown"+r+" selectstart"+r,function(t){n(t.target).is(":kendoFocusable")||t.preventDefault()}),f.options.editable&&f.options.editable.resize!==!1&&f._resizable(),f._movable(),f._bindResize(),f.options.messages&&f.options.messages.recurrence&&(v.options=f.options.messages.recurrence),f._selectable(),f._ariaId=i.guid(),f._createEditor()},_bindResize:function(){n(window).on("resize"+r,this._resizeHandler)},_unbindResize:function(){n(window).off("resize"+r,this._resizeHandler)},dataItems:function(){for(var s,c,u,f,h=this,a=h.items(),e=h._data,o=n.map(a,function(t){return n(t).attr("data-uid")}),r={},l=o.length,i=0;i<l;i++)r[o[i]]=null;for(c=e.length,i=0;i<c;i++)u=e[i],r[u.uid]!==t&&(r[u.uid]=u);f=[];for(s in r)f.push(r[s]);return f},_isMobile:function(){var n=this.options;return n.mobile===!0&&i.support.mobileOS||"phone"===n.mobile||"tablet"===n.mobile},_isMobilePhoneView:function(){var n=this.options;return n.mobile===!0&&i.support.mobileOS&&!i.support.mobileOS.tablet||"phone"===n.mobile},_groupsByResource:function(n,t,r,u,f){var s,e,c,l,o,h,a;if(r||(r=[]),s=n[0]){for(c=s.dataSource.view(),l=0,o=0;o<c.length;o++)h=i.getter(s.dataValueField)(c[o]),a=t+l+o,e=this._groupsByResource(n.slice(1),a,r,h,s.field),e[s.field]=h,l=e.groupIndex,f&&u&&(e[f]=u),1===n.length&&(e.groupIndex=t+o,r.push(e));return e}return{}},data:function(){return this._data},select:function(r){var h,y,w,a,l,v,p,b,k,f,u=this,o=u.view(),s=u._selection,c=o.groups;if(r===t)return w=o._selectedSlots,s?(s&&s.events&&(y=u._selectedEvents()),{start:s.start,end:s.end,events:y,slots:w,resources:o._resourceBySlot(s)}):[];if(!r)return u._selection=null,u._old=null,o.clearSelection(),t;if(n.isArray(r)&&(r={events:r.splice(0)}),r.resources){l=[],v=[],o.groupedResources&&u._groupsByResource(o.groupedResources,0,v);for(a in r.resources)l.push({field:a,operator:"eq",value:r.resources[a]});h=new i.data.Query(v).filter(l).toArray()}return r.events&&r.events.length?(u._selectEvents(r.events,h),u._select(),t):(c&&r.start&&r.end&&(p=e(o._startDate),b=i.date.addDays(e(o._endDate),1),r.start<b&&p<=r.end&&(k=h&&h.length?c[h[0].groupIndex]:c[0],f=k.ranges(r.start,r.end,r.isAllDay,!1),f.length&&(u._selection={start:i.timezone.toLocalDate(f[0].start.start),end:i.timezone.toLocalDate(f[f.length-1].end.end),groupIndex:f[0].start.groupIndex,index:f[0].start.index,isAllDay:f[0].start.isDaySlot,events:[]},u._select()))),t)},_selectEvents:function(n,t){for(var u,r,a,v,e,o,s,h=this,c=h.view(),l=c.groups,p=n.length,y=t&&t.length,f=0;f<p;f++)if(l&&y){for(u=l[t[0].groupIndex],r=[],a=u.timeSlotCollectionCount(),v=u.daySlotCollectionCount(),e=0;e<a;e++)r=r.concat(u.getTimeSlotCollection(e).events());for(o=0;o<v;o++)r=r.concat(u.getDaySlotCollection(o).events());r=new i.data.Query(r).filter({field:"element[0].getAttribute('data-uid')",operator:"eq",value:n[f]}).toArray(),r[0]&&h._createSelection(r[0].element)}else s=c.element.find(i.format(".k-event[data-uid={0}], .k-task[data-uid={0}]",n[f])),s.length&&h._createSelection(s[0])},_selectable:function(){var f,t=this,u=t.wrapper,e=i.support.mobileOS?"touchend":"mousedown";t.options.selectable&&(t._tabindex(),u.on(e+r,".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",function(n){var e=n.which,f=n.button,r=i.support.browser,o=e&&3===e||f&&2==f;i.support.mobileOS&&n.isDefaultPrevented()||(o||t._createSelection(n.currentTarget),u.focus(),r.msie&&r.version<9&&setTimeout(function(){u.focus()}))}),f=n.proxy(t._mouseMove,t),u.on("mousedown"+r,".k-scheduler-header-all-day td, .k-scheduler-content td",function(n){var i=n.which,t=n.button,e=i&&3===i||t&&2==t;e||u.on("mousemove"+r,".k-scheduler-header-all-day td, .k-scheduler-content td",f)}),u.on("mouseup"+r+" mouseleave"+r,function(){u.off("mousemove"+r,".k-scheduler-header-all-day td, .k-scheduler-content td",f)}),u.on("focus"+r,function(){t._selection||t._selectFirstSlot(),t._select()}),u.on("focusout"+r,function(){t._ctrlKey=t._shiftKey=!1}),u.on("keydown"+r,h(t._keydown,t)),u.on("keyup"+r,function(n){t._ctrlKey=n.ctrlKey,t._shiftKey=n.shiftKey}))},_selectFirstSlot:function(){this._createSelection(this.wrapper.find(".k-scheduler-content").find("td:first"))},_select:function(){var h,s,f,o,c,t=this,e=t.view(),l=t.wrapper,r=e.current(),u=t._selection;if(u&&(r&&(r.removeAttribute("id"),r.removeAttribute("aria-label"),l.removeAttr("aria-activedescendant")),e.select(u),r=e.current(),r&&t._old!==r)){if(h=n(r).data("uid"),t._old&&h&&h===n(t._old).data("uid"))return;f=u,o=t._selectedEvents(),c=e._selectedSlots,o[0]?(f=o[0]||u,s=i.format(t.options.messages.ariaEventLabel,f.title,f.start,f.start)):s=i.format(t.options.messages.ariaSlotLabel,f.start,f.end),r.setAttribute("id",t._ariaId),r.setAttribute("aria-label",s),l.attr("aria-activedescendant",t._ariaId),t._old=r,t.trigger("change",{start:u.start,end:u.end,events:o,slots:c,resources:e._resourceBySlot(u)})}},_selectedEvents:function(){for(var t,r=this._selection.events,u=r.length,n=0,i=[];n<u;n++)t=this.occurrenceByUid(r[n]),t&&i.push(t);return i},_mouseMove:function(t){var i=this;clearTimeout(i._moveTimer),i._moveTimer=setTimeout(function(){var u,e,f,o=i.view(),r=i._selection;r&&(u=o.selectionByElement(n(t.currentTarget)),u&&r.groupIndex===u.groupIndex&&(e=u.startDate(),f=u.endDate(),e>=r.end?r.backward=!1:f<=r.start&&(r.backward=!0),r.backward?r.start=e:r.end=f,i._select()))},5)},_viewByIndex:function(n){var t,i=this.views;for(t in i){if(!n)return t;n--}},_keydown:function(r){var f=this,o=r.keyCode,h=f.view(),s=h.options.editable,e=f._selection,c=r.shiftKey;return f._ctrlKey=r.ctrlKey,f._shiftKey=r.shiftKey,e?(o===et.TAB?h.moveToEvent(e,c)&&(f._select(),r.preventDefault()):s&&o===et.ENTER?e.events.length?s.update!==!1&&f.editEvent(e.events[0]):s.create!==!1&&(e.isAllDay&&(e=n.extend({},e,{end:i.date.addDays(e.end,-1)})),f.addEvent(u({},e,h._resourceBySlot(e)))):o===et.DELETE&&s!==!1&&s.destroy!==!1?f.removeEvent(e.events[0]):o>=49&&o<=57?f.view(f._viewByIndex(o-49)):h.move(e,o,c)&&(h.inRange(e)?f._select():f.date(e.start),r.preventDefault()),f._adjustSelectedDate(),t):(f._selectFirstSlot(),f._select(),t)},_createSelection:function(t){var u,r,f;this._selection&&(this._ctrlKey||this._shiftKey)||(this._selection={events:[],groupIndex:0}),t=n(t),f=this._selection,t.is(".k-event")&&(u=t.attr(i.attr("uid"))),r=this.view().selectionByElement(t),r&&(f.groupIndex=r.groupIndex||0),u&&(r=si(this._data,u)),r&&r.uid&&(u=[r.uid]),this._updateSelection(r,u),this._adjustSelectedDate()},_updateSelection:function(n,r,u){var e,o,f=this._selection;n&&f&&(e=this.view(),n.uid&&(n=e._updateEventForSelection(n)),this._shiftKey&&f.start&&f.end?(o=n.end<f.end,f.end=n.endDate?n.endDate():n.end,o&&e._timeSlotInterval&&i.date.setTime(f.end,-e._timeSlotInterval())):(f.start=n.startDate?n.startDate():n.start,f.end=n.endDate?n.endDate():n.end),f.isAllDay="isDaySlot"in n?n.isDaySlot:n.isAllDay,null!==u&&u!==t&&(f.groupIndex=u),f.index=n.index,f.events=this._ctrlKey?f.events.concat(r||[]):r||[])},options:{name:"Scheduler",date:pr,editable:!0,autoBind:!0,snap:!0,mobile:!1,timezone:"",allDaySlot:!0,min:new Date(1900,0,1),max:new Date(2099,11,31),toolbar:null,footer:{},messages:{today:"Today",pdf:"Export to PDF",save:"Save",cancel:"Cancel",destroy:"Delete",deleteWindowTitle:"Delete event",next:"Next",previous:"Previous",ariaSlotLabel:"Selected from {0:t} to {1:t}",ariaEventLabel:"{0} on {1:D} at {2:t}",views:{day:"Day",week:"Week",workWeek:"Work Week",agenda:"Agenda",month:"Month",timeline:"Timeline",timelineWeek:"Timeline Week",timelineWorkWeek:"Timeline Work Week",timelineMonth:"Timeline Month"},recurrenceMessages:{deleteWindowTitle:"Delete Recurring Item",deleteWindowOccurrence:"Delete current occurrence",deleteWindowSeries:"Delete the series",editWindowTitle:"Edit Recurring Item",editWindowOccurrence:"Edit current occurrence",editWindowSeries:"Edit the series"},editable:{confirmation:br},editor:{title:"Title",start:"Start",end:"End",allDayEvent:"All day event",description:"Description",repeat:"Repeat",timezone:"Timezone",startTimezone:"Start timezone",endTimezone:"End timezone",separateTimezones:"Use separate start and end time zones",timezoneEditorTitle:"Timezones",timezoneEditorButton:"Time zone",timezoneTitle:"Time zones",noTimezone:"No timezone",editorTitle:"Event"}},height:null,width:null,resources:[],group:{resources:[],orientation:"horizontal"},views:[],selectable:!1},events:[p,y,tt,rt,"add","dataBinding","dataBound","moveStart","move","moveEnd","resizeStart","resize","resizeEnd","navigate","change"],destroy:function(){var u,t=this;s.fn.destroy.call(t),t.dataSource&&(t.dataSource.unbind(st,t._refreshHandler),t.dataSource.unbind("progress",t._progressHandler),t.dataSource.unbind("error",t._errorHandler)),t.calendar&&(t.calendar.destroy(),t.popup.destroy()),t.view()&&t.view().destroy(),t._editor&&t._editor.destroy(),this._moveDraggable&&this._moveDraggable.destroy(),this._resizeDraggable&&this._resizeDraggable.destroy(),u=t.element.add(t.wrapper).add(t.toolbar).add(t.popup),u.off(r),clearTimeout(t._moveTimer),t._model=null,t.toolbar=null,t.element=null,n(window).off("resize"+r,t._resizeHandler),i.destroy(t.wrapper)},setDataSource:function(n){this.options.dataSource=n,this._dataSource(),this.options.autoBind&&n.fetch()},items:function(){var t=this.wrapper.find(".k-scheduler-content"),n=this.view();return n&&"agenda"===n.options.name?t.find(".k-task"):t.find(".k-event").add(this.wrapper.find(".k-scheduler-header-wrap").find(".k-scheduler-header-all-day").siblings())},_movable:function(){var o,u,s,c,e,f,l,r=this,v=0,h=r._isMobile(),a=r.options.editable&&r.options.editable.move!==!1,y=r.options.editable&&r.options.editable.resize!==!1;(a||y&&h)&&(h&&i.support.mobileOS.android&&(v=5),r._moveDraggable=new i.ui.Draggable(r.element,{distance:v,filter:".k-event",ignore:".k-resize-handle",holdToDrag:h,autoScroll:!0}),a&&r._moveDraggable.bind("dragstart",function(n){var c=r.view(),a=n.currentTarget;return c.options.editable&&c.options.editable.move!==!1?h&&!a.hasClass("k-event-active")?(r.element.find(".k-event-active").removeClass("k-event-active"),n.preventDefault(),t):(e=r.occurrenceByUid(a.attr(i.attr("uid"))),f=e.clone(),f.update(c._eventOptionsForMove(f)),o=c._slotByPosition(n.x.startLocation,n.y.startLocation),s=o.startOffset(n.x.startLocation,n.y.startLocation,r.options.snap),u=o,l=o,o&&!r.trigger("moveStart",{event:e})||n.preventDefault(),t):(n.preventDefault(),t)}).bind("drag",function(n){var l,a,h=r.view(),t=h._slotByPosition(n.x.location,n.y.location);t&&(c=t.startOffset(n.x.location,n.y.location,r.options.snap),t.isDaySlot!==o.isDaySlot?(o=h._slotByPosition(n.x.location,n.y.location),s=o.startOffset(n.x.location,n.y.location,r.options.snap),l=c-s,f.isAllDay=t.isDaySlot,f.start=i.timezone.toLocalDate(s),f.end=i.timezone.toLocalDate(c),h._updateMoveHint(f,t.groupIndex,l),a={start:f.start,end:f.end}):(l=c-s,h._updateMoveHint(f,t.groupIndex,l),a=ti(f,l)),r.trigger("move",{event:e,slot:{element:t.element,start:t.startDate(),end:t.endDate(),isDaySlot:t.isDaySlot},resources:h._resourceBySlot(t),start:a.start,end:a.end})?h._updateMoveHint(f,t.groupIndex,l):u=t)}).bind("dragend",function(t){var k,p,v,a,h,d,b,y,w;r.view()._removeMoveHint(),k=c-s,p=ti(f,k),v=p.start,a=p.end,h=r.view()._resourceBySlot(u),d=r.view()._resourceBySlot(o),b=r.trigger("moveEnd",{event:e,slot:{element:u.element,start:u.startDate(),end:u.endDate()},start:v,end:a,resources:h}),b||e.start.getTime()===v.getTime()&&e.end.getTime()===a.getTime()&&l.isDaySlot===u.isDaySlot&&i.stringify(h)===i.stringify(d)||(y=r.view()._eventOptionsForMove(e),w=l.isDaySlot!==u.isDaySlot?u.isDaySlot?n.extend({start:u.startDate(),end:u.startDate(),isAllDay:u.isDaySlot},y,h):n.extend({isAllDay:u.isDaySlot,start:v,end:a},y,h):n.extend({isAllDay:e.isAllDay,start:v,end:a},y,h),r._updateEvent(null,e,w,u.groupIndex)),t.currentTarget.removeClass("k-event-active"),this.cancelHold()}).bind("dragcancel",function(){r.view()._removeMoveHint(),this.cancelHold()}),h&&(r._moveDraggable.bind("hold",function(n){r.element.find(".k-scheduler-monthview").length&&n.preventDefault(),r.element.find(".k-event-active").removeClass("k-event-active"),n.currentTarget.addClass("k-event-active")}),i.support.mobileOS.android||r._moveDraggable.userEvents.bind("press",function(n){n.preventDefault()})))},_resizable:function(){function h(n){var t,i={"k-resize-e":"east","k-resize-w":"west","k-resize-n":"north","k-resize-s":"south"};for(t in i)if(n.hasClass(t))return i[t]}var e,f,o,u,t,r=this,s=0;r._isMobile()&&i.support.mobileOS.android&&(s=5),r._resizeDraggable=new i.ui.Draggable(r.element,{distance:s,filter:".k-resize-handle",autoScroll:!0,dragstart:function(s){var a=n(s.currentTarget),c=a.closest(".k-event"),l=c.attr(i.attr("uid")),h=r.view();o=r.occurrenceByUid(l),u=o.clone(),h._updateEventForResize(u),t=h._slotByPosition(s.x.startLocation,s.y.startLocation),r.trigger("resizeStart",{event:o})&&s.preventDefault(),e=i.date.toUtcTime(u.start),f=i.date.toUtcTime(u.end)},drag:function(s){var p,l,c,a,y,v;t&&(p=n(s.currentTarget),l=h(p),c=r.view(),a=c._slotByPosition(s.x.location,s.y.location),a&&t.groupIndex==a.groupIndex&&(t=a,y=e,v=f,"south"==l?!t.isDaySlot&&t.end-i.date.toUtcTime(u.start)>=c._timeSlotInterval()&&(f=u.isAllDay?t.startOffset(s.x.location,s.y.location,r.options.snap):t.endOffset(s.x.location,s.y.location,r.options.snap)):"north"==l?!t.isDaySlot&&i.date.toUtcTime(u.end)-t.start>=c._timeSlotInterval()&&(e=t.startOffset(s.x.location,s.y.location,r.options.snap)):"east"==l?t.isDaySlot&&i.date.toUtcTime(i.date.getDate(t.endDate()))>=i.date.toUtcTime(i.date.getDate(u.start))?f=u.isAllDay?t.startOffset(s.x.location,s.y.location,r.options.snap):t.endOffset(s.x.location,s.y.location,r.options.snap):!t.isDaySlot&&t.end-i.date.toUtcTime(u.start)>=c._timeSlotInterval()&&(f=t.endOffset(s.x.location,s.y.location,r.options.snap)):"west"==l&&(t.isDaySlot&&i.date.toUtcTime(i.date.getDate(u.end))>=i.date.toUtcTime(i.date.getDate(t.startDate()))?e=t.startOffset(s.x.location,s.y.location,r.options.snap):!t.isDaySlot&&i.date.toUtcTime(u.end)-t.start>=c._timeSlotInterval()&&(e=t.startOffset(s.x.location,s.y.location,r.options.snap))),r.trigger("resize",{event:o,slot:{element:t.element,start:t.startDate(),end:t.endDate()},start:i.timezone.toLocalDate(e),end:i.timezone.toLocalDate(f),resources:c._resourceBySlot(t)})?(e=y,f=v):c._updateResizeHint(u,t.groupIndex,e,f)))},dragend:function(s){var v,y=n(s.currentTarget),c=new Date(u.start.getTime()),l=new Date(u.end.getTime()),a=h(y);r.view()._removeResizeHint(),"south"==a?l=i.timezone.toLocalDate(f):"north"==a?c=i.timezone.toLocalDate(e):"east"==a?l=t.isDaySlot?i.date.getDate(i.timezone.toLocalDate(f)):i.timezone.toLocalDate(f):"west"==a&&(t.isDaySlot?(c=new Date(i.timezone.toLocalDate(e)),c.setHours(0),c.setMinutes(0)):c=i.timezone.toLocalDate(e)),v=r.trigger("resizeEnd",{event:o,slot:{element:t.element,start:t.startDate(),end:t.endDate()},start:c,end:l,resources:r.view()._resourceBySlot(t)}),!v&&l.getTime()>=c.getTime()&&(u.start.getTime()==c.getTime()&&u.end.getTime()==l.getTime()||(r.view()._updateEventForResize(o),r._updateEvent(a,o,{start:c,end:l}))),t=null,o=null},dragcancel:function(){r.view()._removeResizeHint(),t=null,o=null}})},_updateEvent:function(n,t,r,u){var e,f=this,o=function(n,t){try{f._preventRefresh=!0,n.update(r),f._convertDates(n)}finally{f._preventRefresh=!1}f.trigger(rt,{event:n})||(t&&t(),f._updateSelection(n,[n.uid],u),f.dataSource.sync())},s=function(n){return n.recurrenceRule?f.dataSource.getByUid(n.uid):f.dataSource.get(n.recurrenceId)},c=function(){var e,h,u=s(t);"south"!=n&&"north"!=n||(r.start&&(e=i.date.getDate(u.start),i.date.setTime(e,ut(r.start)),r.start=e),r.end&&(h=i.date.getDate(u.end),i.date.setTime(h,ut(r.end)),r.end=h)),f.dataSource._removeExceptions(u),o(u)},h=function(){var n=s(t),r=function(){f._convertDates(n)},i=n.toOccurrence({start:t.start,end:t.end});o(f.dataSource.add(i),r)};t.recurrenceRule||t.isOccurrence()?(e=f.options.messages.recurrenceMessages,f._showRecurringDialog(t,h,c,{title:e.editWindowTitle,text:e.editRecurring?e.editRecurring:kt,occurrenceText:e.editWindowOccurrence,seriesText:e.editWindowSeries})):o(f.dataSource.getByUid(t.uid))},_modelForContainer:function(t){return t=n(t).closest("["+i.attr("uid")+"]"),this.dataSource.getByUid(t.attr(i.attr("uid")))},showDialog:function(n){this._editor.showDialog(n)},focus:function(){this.wrapper.focus()},_confirmation:function(n,t){var u,e,s,r,o,f=this.options.editable;f===!0||f.confirmation!==!1?(u=this.options.messages,e=u.deleteWindowTitle,s=typeof f.confirmation===w?f.confirmation:u.editable.confirmation,this._isEditorOpened()&&t.isRecurring()&&(r=this.options.messages.recurrenceMessages,e=r.deleteWindowTitle,s=t.isException()?r.deleteRecurringConfirmation?r.deleteRecurringConfirmation:fr:r.deleteSeriesConfirmation?r.deleteSeriesConfirmation:wi),o=[{name:"destroy",text:u.destroy,click:function(){n()}}],this._isMobile()&&i.mobile.ui.Pane||o.push({name:"canceledit",text:u.cancel,click:function(){n(!0)}}),this._unbindResize(),this.showDialog({model:t,text:s,title:e,buttons:o}),this._bindResize()):n()},addEvent:function(n){var i,r,t=this._editor.editable,u=this.dataSource;n=n||{},r=this.trigger("add",{event:n}),!r&&(t&&t.end()||!t)&&(this.cancelEvent(),n&&n.toJSON&&(n=n.toJSON()),i=u.add(n),i&&(this.cancelEvent(),this._editEvent(i)))},saveEvent:function(){var r,t,n,i=this._editor;i&&(r=i.editable,t=i.container,n=this._modelForContainer(t),t&&r&&r.end()&&!this.trigger(rt,{container:t,event:n})&&(n.isRecurrenceHead()&&this.dataSource._removeExceptions(n),n.dirty||n.isOccurrence()||this._convertDates(n,"remove"),this.dataSource.sync()))},cancelEvent:function(){var n,i=this._editor,t=i.container;t&&(n=this._modelForContainer(t),n&&n.isOccurrence()&&(this._convertDates(n,"remove"),this._convertDates(this.dataSource.get(n.recurrenceId),"remove")),this.dataSource.cancelChanges(n),i.close())},editEvent:function(n){var t="string"==typeof n?this.occurrenceByUid(n):n;t&&(this.cancelEvent(),t.isRecurring()?this._editRecurringDialog(t):this._editEvent(t))},_editEvent:function(n){this._unbindResize(),this._createPopupEditor(n),this._bindResize()},_editRecurringDialog:function(n){var t=this,r=function(){n.isException()?t._editEvent(n):t.addEvent(n)},u=function(){n.recurrenceId&&(n=t.dataSource.get(n.recurrenceId)),t._editEvent(n)},i=t.options.messages.recurrenceMessages;t._showRecurringDialog(n,r,u,{title:i.editWindowTitle,text:i.editRecurring?i.editRecurring:kt,occurrenceText:i.editWindowOccurrence,seriesText:i.editWindowSeries})},_showRecurringDialog:function(n,t,i,r){var o=this,e=o.options.editable,u=f(e)?e.editRecurringMode:"dialog";"series"===u?i():"occurrence"===u?t():(this._unbindResize(),o.showDialog({model:n,title:r.title,text:r.text,buttons:[{text:r.occurrenceText,click:t},{text:r.seriesText,click:i}]}),this._bindResize())},_createButton:function(n){var e=n.template||bi,t=typeof n===w?n:n.name||n.text,r={className:"k-scheduler-"+(t||"").replace(/\s/g,""),text:t,attr:""};if(!(t||f(n)&&n.template))throw Error("Custom commands should have name specified");return f(n)?(n.className&&(n.className+=" "+r.className),"edit"===t&&f(n.text)&&(n=u(!0,{},n),n.text=n.text.edit),r=u(!0,r,ot[t],n)):r=u(!0,r,ot[t]),i.template(e)(r)},_convertDates:function(n,t){var f=this.dataSource.reader.timezone,r=n.startTimezone,u=n.endTimezone,o=n.start,e=n.start;t=t||"apply",r=r||u,u=u||r,r&&(f?"apply"===t?(o=i.timezone.convert(n.start,f,r),e=i.timezone.convert(n.end,f,u)):(o=i.timezone.convert(n.start,r,f),e=i.timezone.convert(n.end,u,f)):(o=i.timezone[t](n.start,r),e=i.timezone[t](n.end,u)),n._set("start",o),n._set("end",e))},_createEditor:function(){var r,n=this;r=n._editor=this._isMobile()&&i.mobile.ui.Pane?new li(this.wrapper,u({},this.options,{target:this,timezone:n.dataSource.reader.timezone,resources:n.resources,createButton:h(this._createButton,this)})):new ci(this.wrapper,u({},this.options,{target:this,createButton:h(this._createButton,this),timezone:n.dataSource.reader.timezone,resources:n.resources})),r.bind("cancel",function(i){return n.trigger("cancel",{container:i.container,event:i.model})?(i.preventDefault(),t):(n.cancelEvent(),n.focus(),t)}),r.bind("edit",function(t){n.trigger(y,{container:t.container,event:t.model})&&t.preventDefault()}),r.bind("save",function(){n.saveEvent()}),r.bind("remove",function(t){n.removeEvent(t.model)})},_createPopupEditor:function(n){var t=this._editor;n.isNew()&&!n.isOccurrence()||(n.isOccurrence()&&this._convertDates(n.recurrenceId?this.dataSource.get(n.recurrenceId):n),this._convertDates(n)),this.editable=t.editEvent(n)},removeEvent:function(n){var i=this,t="string"==typeof n?i.occurrenceByUid(n):n;t&&(t.isRecurring()?i._deleteRecurringDialog(t):i._confirmation(function(n){n||i._removeEvent(t)},t))},occurrenceByUid:function(n){var t=this.dataSource.getByUid(n);return t||(t=si(this._data,n)),t},occurrencesInRange:function(n,t){return new i.data.Query(this._data).filter({logic:"or",filters:[{logic:"and",filters:[{field:"start",operator:"gte",value:n},{field:"end",operator:"gte",value:n},{field:"start",operator:"lt",value:t}]},{logic:"and",filters:[{field:"start",operator:"lte",value:n},{field:"end",operator:"gt",value:n}]}]}).toArray()},_removeEvent:function(n){this.trigger(p,{event:n})||this.dataSource.remove(n)&&this.dataSource.sync()},_deleteRecurringDialog:function(n){var l,c,u,e,r,t=this,i=n,h=t.options.editable,a=f(h)?h.editRecurringMode:"dialog",o=function(){var n=i.recurrenceId?i:i.toOccurrence(),r=t.dataSource.get(n.recurrenceId);t._convertDates(r),t._removeEvent(n)},s=function(){i.recurrenceId&&(i=t.dataSource.get(i.recurrenceId)),t._removeEvent(i)};("dialog"!=a||t._isEditorOpened())&&(l=function(){t._confirmation(function(n){n||o()},i)},c=function(){t._confirmation(function(n){n||s()},i)}),u=c||s,e=l||o,t._isEditorOpened()?n.isException()?e():u():(r=t.options.messages.recurrenceMessages,t._showRecurringDialog(n,e,u,{title:r.deleteWindowTitle,text:r.deleteRecurring?r.deleteRecurring:wr,occurrenceText:r.deleteWindowOccurrence,seriesText:r.deleteWindowSeries}))},_isEditorOpened:function(){return!!this._editor.container},_unbindView:function(n){var t=this;t.angular("cleanup",function(){return{elements:t.items()}}),n.destroy()},_bindView:function(n){var t=this;t.options.editable&&(t._viewRemoveHandler&&n.unbind(p,t._viewRemoveHandler),t._viewRemoveHandler=function(n){t.removeEvent(n.uid)},n.bind(p,t._viewRemoveHandler),t._viewAddHandler&&n.unbind(ni,t._viewAddHandler),t._viewAddHandler=function(n){t.addEvent(n.eventInfo)},n.bind(ni,this._viewAddHandler),t._viewEditHandler&&n.unbind(y,t._viewEditHandler),t._viewEditHandler=function(n){t.editEvent(n.uid)},n.bind(y,this._viewEditHandler)),t._viewNavigateHandler&&n.unbind("navigate",t._viewNavigateHandler),t._viewNavigateHandler=function(n){var i,r;n.view&&(i="isWorkDay"in n,r=i?"changeWorkDay":"changeView",t.trigger("navigate",{view:n.view,isWorkDay:n.isWorkDay,action:r,date:n.date})||(i&&(t._workDayMode=n.isWorkDay),t._selectView(n.view),t.date(n.date)))},n.bind("navigate",t._viewNavigateHandler),t._viewActivateHandler&&n.unbind("activate",t._viewActivateHandler),t._viewActivateHandler=function(){var n=this;t._selection&&(n.constrainSelection(t._selection),t._select(),t._adjustSelectedDate())},n.bind("activate",t._viewActivateHandler)},_selectView:function(n){var u,r,f,t=this;n&&t.views[n]&&(t._selectedView&&t._unbindView(t._selectedView),t._selectedView=t._renderView(n),t._selectedViewName=n,t._viewsCount>1&&(u=yi({views:t.views,view:n,ns:i.ns}),r=t.toolbar.find(".k-scheduler-views li:first-child"),r.is(".k-current-view")?r.replaceWith(u):t.toolbar.find(".k-scheduler-views").prepend(u),f=t.toolbar.find(".k-scheduler-views li").removeClass("k-state-selected"),f.end().find(".k-view-"+n.replace(/\./g,"\\.").toLowerCase()).addClass("k-state-selected")))},view:function(n){var i=this;return n?(i._selectView(n),i.rebind(),t):i._selectedView},viewName:function(){return this.view().name},_renderView:function(n){var t=this._initializeView(n);return this._bindView(t),this._model.set("formattedDate",t.dateForTitle()),this._model.set("formattedShortDate",t.shortDateForTitle()),t},resize:function(n){var i=this.getSize(),t=this._size,r=this.view();r&&r.groups&&(!n&&t&&i.width===t.width&&i.height===t.height||(this.refresh({action:"resize"}),this._size=i))},_adjustSelectedDate:function(){var t=this._model.selectedDate,r=this._selection,n=r.start;n&&!i.date.isInDateRange(t,e(n),e(r.end))&&t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate())},_initializeView:function(n){var e,r,t=this.views[n];if(t){if(e=f(t),r=t.type,typeof r===w&&(r=i.getter(t.type)(window)),!r)throw Error("There is no such view");t=new r(this.wrapper,kr(u(!0,{},this.options,e?t:{},{resources:this.resources,date:this.date(),showWorkHours:this._workDayMode})))}return t},_views:function(){var n,i,e,s,t,h,r,l,o,c=this.options.views;for(this.views={},this._viewsCount=0,r=0,l=c.length;r<l;r++)o=!1,n=c[r],s=f(n),s?(h=t=n.type?n.type:n,typeof h!==w&&(t=n.name||n.title,o=!0)):h=t=n,i=fi[t],i&&!o&&(n.type=i.type,i.title=this.options.messages.views[t],"day"===i.type?i.messages={allDay:this.options.messages.allDay}:"agenda"===i.type&&(i.messages={event:this.options.messages.event,date:this.options.messages.date,time:this.options.messages.time})),n=u({title:t},i,s?n:{}),t&&(this.views[t]=n,this._viewsCount++,e&&!n.selected||(e=t));e&&(this._selectedViewName=e)},rebind:function(){this.dataSource.fetch()},_dataSource:function(){var n=this,r=n.options,t=r.dataSource;t=yt(t)?{data:t}:t,!r.timezone||t instanceof l?t instanceof l&&(r.timezone=t.options.schema?t.options.schema.timezone:""):t=u(!0,t,{schema:{timezone:r.timezone}}),n.dataSource&&n._refreshHandler?n.dataSource.unbind(st,n._refreshHandler).unbind("progress",n._progressHandler).unbind("error",n._errorHandler):(n._refreshHandler=h(n.refresh,n),n._progressHandler=h(n._requestStart,n),n._errorHandler=h(n._error,n)),n.dataSource=i.data.SchedulerDataSource.create(t).bind(st,n._refreshHandler).bind("progress",n._progressHandler).bind("error",n._errorHandler),n.options.dataSource=n.dataSource},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_progress:function(n){var t=this.element.find(".k-scheduler-content");i.ui.progress(t,n)},_resources:function(){for(var t,u,e,s,r=this,o=r.options.resources,f=0;f<o.length;f++){if(t=o[f],u=t.field,e=t.dataSource,!u||!e)throw Error('The "field" and "dataSource" options of the scheduler resource are mandatory.');r.resources.push({field:u,name:t.name||u,title:t.title||u,dataTextField:t.dataTextField||"text",dataValueField:t.dataValueField||"value",dataColorField:t.dataColorField||"color",valuePrimitive:null==t.valuePrimitive||t.valuePrimitive,multiple:t.multiple||!1,dataSource:i.data.DataSource.create(e)})}s=n.map(r.resources,function(n){return n.dataSource.fetch()}),n.when.apply(null,s).then(function(){r.options.autoBind?r.view(r._selectedViewName):r._selectView(r._selectedViewName)})},_initModel:function(){var n=this;n._model=i.observable({selectedDate:new Date(this.options.date),formattedDate:"",formattedShortDate:""}),n._model.bind("change",function(t){"selectedDate"===t.field&&n.view(n._selectedViewName)})},_wrapper:function(){var n=this,r=n.options,i=r.height,t=r.width;n.wrapper=n.element.addClass("k-widget k-scheduler k-floatwrap").attr("role","grid").attr("aria-multiselectable",!0),n._isMobile()&&n.wrapper.addClass("k-scheduler-mobile"),n._isMobilePhoneView()&&n.wrapper.addClass("k-scheduler-phone"),i&&n.wrapper.height(i),t&&n.wrapper.width(t)},date:function(n){return null!=n&&e(n)>=e(this.options.min)&&e(n)<=e(this.options.max)&&this._model.set("selectedDate",n),e(this._model.get("selectedDate"))},_toolbar:function(){var h,f,u=this,e=u.options,s=[];e.toolbar&&(s=n.isArray(e.toolbar)?e.toolbar:[e.toolbar]),h=this._isMobilePhoneView()?ki:vi,f=n(h({messages:e.messages,pdf:n.grep(s,function(n){return"pdf"==n||"pdf"==n.name}).length>0,ns:i.ns,views:u.views,viewsCount:u._viewsCount})),u.wrapper.append(f),u.toolbar=f,i.bind(u.toolbar,u._model),f.on(o+r,".k-pdf",function(n){n.preventDefault(),u.saveAsPDF()}),f.on(o+r,".k-scheduler-navigation li",function(i){var e=n(this),r=new Date(u.date()),f="";if(i.preventDefault(),e.hasClass("k-nav-today"))f="today",r=new Date;else if(e.hasClass("k-nav-next"))f="next",r=u.view().nextDate();else if(e.hasClass("k-nav-prev"))f="previous",r=u.view().previousDate();else if(e.hasClass("k-nav-current")&&!u._isMobilePhoneView())return u._showCalendar(),t;u.trigger("navigate",{view:u._selectedViewName,action:f,date:r})||u.date(r)}),f.on(o+r,".k-scheduler-views li:not(.k-current-view), .k-scheduler-refresh",function(t){t.preventDefault();var r=n(this).attr(i.attr("name"));u.trigger("navigate",{view:r,action:"changeView",date:u.date()})||(u.view(r),u.element.find(".k-state-expanded").removeClass("k-state-expanded"))}),f.on(o+r,".k-scheduler-views li.k-current-view",function(){u.element.find(".k-scheduler-views").toggleClass("k-state-expanded"),n(document).on(ai+r,function(t){0===n(t.target).closest(".k-scheduler-views").length&&(u.element.find(".k-state-expanded").removeClass("k-state-expanded"),n(document).off(o+r))})}),f.find("li").hover(function(){n(this).addClass("k-state-hover")},function(){n(this).removeClass("k-state-hover")})},_showCalendar:function(){var t=this,r=t.toolbar.find(".k-nav-current"),i=n('<div class="k-calendar-container"><div class="k-scheduler-calendar"/></div>');t.popup||(t.popup=new lr(i,{anchor:r,open:function(){t.calendar||(t.calendar=new yr(this.element.find(".k-scheduler-calendar"),{change:function(){var n=this.value();t.trigger("navigate",{view:t._selectedViewName,action:"changeDate",date:n})||(t.date(n),t.popup.close())},min:t.options.min,max:t.options.max})),t.calendar.value(t.date())},copyAnchorStyles:!1})),t.popup.open()},refresh:function(n){var i=this,t=this.view();this._progress(!1),this.angular("cleanup",function(){return{elements:i.items()}}),n=n||{},t&&(n&&"itemchange"===n.action&&(this._editor.editable||this._preventRefresh)||this.trigger("dataBinding",{action:n.action||"rebind",index:n.index,items:n.items})||(n&&"resize"===n.action||!this._editor||this._editor.close(),this._data=this.dataSource.expand(t.startDate(),t.endDate()),t.refreshLayout(),t.render(this._data),this.trigger("dataBound")))},slotByPosition:function(n,t){var i,r=this.view();return r._slotByPosition?(i=r._slotByPosition(n,t),i?{startDate:i.startDate(),endDate:i.endDate(),groupIndex:i.groupIndex,element:i.element,isDaySlot:i.isDaySlot}:null):null},slotByElement:function(t){var i=n(t).offset();return this.slotByPosition(i.left,i.top)},resourcesBySlot:function(n){return this.view()._resourceBySlot(n)}}),fi={day:{type:"kendo.ui.DayView"},week:{type:"kendo.ui.WeekView"},workWeek:{type:"kendo.ui.WorkWeekView"},agenda:{type:"kendo.ui.AgendaView"},month:{type:"kendo.ui.MonthView"},timeline:{type:"kendo.ui.TimelineView"},timelineWeek:{type:"kendo.ui.TimelineWeekView"},timelineWorkWeek:{type:"kendo.ui.TimelineWorkWeekView"},timelineMonth:{type:"kendo.ui.TimelineMonthView"}},a.plugin(b),i.PDFMixin&&(i.PDFMixin.extend(b.prototype),ht="k-scheduler-pdf-export",b.fn._drawPDF=function(t){var r,u,f,i=this.wrapper,e=i[0].style.cssText;return i.css({width:i.width(),height:i.height()}),i.addClass(ht),r=this,u=new n.Deferred,f=i.find(".k-scheduler-content").find("table").css("table-layout","auto"),setTimeout(function(){f.css("table-layout","fixed"),r.resize(!0),r._drawPDFShadow({},{avoidLinks:r.options.pdf.avoidLinks}).done(function(n){var i={page:n,pageNumber:1,progress:1,totalPages:1};t.notify(i),u.resolve(i.page)}).fail(function(n){u.reject(n)}).always(function(){i[0].style.cssText=e,i.removeClass(ht),r.resize(!0),r.resize(!0)})}),u}),hi=s.extend({init:function(n,t){var r=this,u=i.timezone.windows_zones;if(!u||!i.timezone.zones_titles)throw Error("kendo.timezones.min.js is not included.");s.fn.init.call(r,n,t),r.wrapper=r.element,r._zonesQuery=new i.data.Query(u),r._zoneTitleId=i.guid(),r._zoneTitlePicker(),r._zonePicker(),r._zoneTitle.bind("cascade",function(){this.value()||r._zone.wrapper.hide()}),r._zone.bind("cascade",function(){r._value=this.value(),r.trigger("change")}),r.value(r.options.value)},options:{name:"TimezoneEditor",value:"",optionLabel:"No timezone"},events:["change"],_zoneTitlePicker:function(){var t=this,r=n('<input id="'+t._zoneTitleId+'" aria-label="'+t.options.title+'"/>').appendTo(t.wrapper);t._zoneTitle=new i.ui.DropDownList(r,{dataSource:i.timezone.zones_titles,dataValueField:"other_zone",dataTextField:"name",optionLabel:t.options.optionLabel})},_zonePicker:function(){var t=this,r=n('<input aria-label="'+t.options.title+'"/>').appendTo(this.wrapper);t._zone=new i.ui.DropDownList(r,{dataValueField:"zone",dataTextField:"territory",dataSource:t._zonesQuery.data,cascadeFrom:t._zoneTitleId,dataBound:function(){t._value=this.value(),this.wrapper.toggle(this.dataSource.view().length>1)}}),t._zone.wrapper.hide()},destroy:function(){s.fn.destroy.call(this),i.destroy(this.wrapper)},value:function(n){var r,i=this;return n===t?i._value:(r=i._zonesQuery.filter({field:"zone",operator:"eq",value:n}).data[0],r?(i._zoneTitle.value(r.other_zone),i._zone.value(r.zone)):i._zoneTitle.select(0),t)}}),a.plugin(hi),ei=i.template('<option value="#=other_zone#">#=name#</option>'),oi=i.template('<option value="#=zone#">#=territory#</option>'),ii=s.extend({init:function(n,t){var r=this,u=i.timezone.windows_zones;if(!u||!i.timezone.zones_titles)throw Error("kendo.timezones.min.js is not included.");s.fn.init.call(r,n,t),r.wrapper=r.element,r._zonesQuery=new i.data.Query(u),r._zoneTitlePicker(),r._zonePicker(),r.value(r.options.value)},options:{name:"MobileTimezoneEditor",optionLabel:"No timezone",value:""},events:["change"],_bindZones:function(n){var t=n?this._filter(n):[];this._zone.html(this._options(t,oi))},_filter:function(n){return this._zonesQuery.filter({field:"other_zone",operator:"eq",value:n}).data},_options:function(n,t,i){var u=0,r="",f=n.length;for(i&&(r+=t({other_zone:"",name:i}));u<f;u++)r+=t(n[u]);return r},_zoneTitlePicker:function(){var t=this,r=t._options(i.timezone.zones_titles,ei,t.options.optionLabel);t._zoneTitle=n("<select>"+r+"</select>").appendTo(t.wrapper).change(function(){var i=this.value,n=t._zone;t._bindZones(i),i&&n[0].children.length>1?n.show():n.hide(),t._value=n[0].value,t.trigger("change")})},_zonePicker:function(){var t=this;t._zone=n('<select style="display:none"></select>').appendTo(this.wrapper).change(function(){t._value=this.value,t.trigger("change")}),t._bindZones(t._zoneTitle.val()),t._value=t._zone[0].value},destroy:function(){s.fn.destroy.call(this),i.destroy(this.wrapper)},value:function(n){var f,i=this,u=i._zone,e="",r="";return n===t?i._value:(f=i._zonesQuery.filter({field:"zone",operator:"eq",value:n}).data[0],f&&(r=f.zone,e=f.other_zone),i._zoneTitle.val(e),i._bindZones(e),u.val(r),r=u[0].value,r&&u[0].children.length>1?u.show():u.hide(),i._value=r,t)}}),a.plugin(ii)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.touch.min",["kendo.core.min","kendo.userevents.min"],n)}(function(){return function(n){var i=window.kendo,f=i.ui.Widget,r=n.proxy,u=Math.abs,o=20,e=f.extend({init:function(n,t){function e(n){return function(t){u._triggerTouch(n,t)}}function o(n){return function(t){u.trigger(n,{touches:t.touches,distance:t.distance,center:t.center,event:t.event})}}var u=this;f.fn.init.call(u,n,t),t=u.options,n=u.element,u.wrapper=n,u.events=new i.UserEvents(n,{filter:t.filter,surface:t.surface,minHold:t.minHold,multiTouch:t.multiTouch,allowSelection:!0,fastTap:t.fastTap,press:e("touchstart"),hold:e("hold"),tap:r(u,"_tap"),gesturestart:o("gesturestart"),gesturechange:o("gesturechange"),gestureend:o("gestureend")}),t.enableSwipe?(u.events.bind("start",r(u,"_swipestart")),u.events.bind("move",r(u,"_swipemove"))):(u.events.bind("start",r(u,"_dragstart")),u.events.bind("move",e("drag")),u.events.bind("end",e("dragend"))),i.notify(u)},events:["touchstart","dragstart","drag","dragend","tap","doubletap","hold","swipe","gesturestart","gesturechange","gestureend"],options:{name:"Touch",surface:null,global:!1,fastTap:!1,filter:null,multiTouch:!1,enableSwipe:!1,minXDelta:30,maxYDelta:20,maxDuration:1e3,minHold:800,doubleTapTimeout:800},cancel:function(){this.events.cancel()},destroy:function(){this.events.destroy()},_triggerTouch:function(n,t){this.trigger(n,{touch:t.touch,event:t.event})&&t.preventDefault()},_tap:function(n){var t=this,u=t.lastTap,r=n.touch;u&&r.endTime-u.endTime<t.options.doubleTapTimeout&&i.touchDelta(r,u).distance<o?(t._triggerTouch("doubletap",n),t.lastTap=null):(t._triggerTouch("tap",n),t.lastTap=r)},_dragstart:function(n){this._triggerTouch("dragstart",n)},_swipestart:function(n){2*u(n.x.velocity)>=u(n.y.velocity)&&n.sender.capture()},_swipemove:function(n){var r=this,i=r.options,t=n.touch,e=n.event.timeStamp-t.startTime,f=t.x.initialDelta>0?"right":"left";u(t.x.initialDelta)>=i.minXDelta&&u(t.y.initialDelta)<i.maxYDelta&&e<i.maxDuration&&(r.trigger("swipe",{direction:f,touch:n.touch}),t.cancel())}});i.ui.plugin(e)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.gantt.list.min",["kendo.dom.min","kendo.touch.min","kendo.draganddrop.min","kendo.columnsorter.min","kendo.datetimepicker.min","kendo.editable.min"],n)}(function(){return function(n){function it(n){for(var r=[],f=n.className,t=0,u=n.level;t<u;t++)r.push(i("span",{className:f}));return r}function p(){var i=t._activeElement();i&&"body"!==i.nodeName.toLowerCase()&&n(i).blur()}var t=window.kendo,o=t.dom,i=o.element,w=o.text,k=t.support.browser,b=t.support.mobileOS,l=t.ui,v=l.Widget,s=n.extend,e=t._outerWidth,h=t._outerHeight,g=n.map,tt=n.isFunction,ut=k.msie&&k.version<9,a=t.keys,rt={title:"Title",start:"Start Time",end:"End Time",percentComplete:"% Done",parentId:"Predecessor ID",id:"ID",orderId:"Order ID"},c="string",u=".kendoGanttList",y="click",f=".",d="<table style='visibility: hidden;'><tbody><tr style='height:{0}'><td>&nbsp;</td></tr></tbody></table>",nt={wrapper:"k-treelist k-grid k-widget",header:"k-header",alt:"k-alt",rtl:"k-rtl",editCell:"k-edit-cell",group:"k-treelist-group",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",gridContentWrap:"k-grid-content",selected:"k-state-selected",icon:"k-icon",iconCollapse:"k-i-collapse",iconExpand:"k-i-expand",iconHidden:"k-i-none",iconPlaceHolder:"k-icon k-i-none",input:"k-input",link:"k-link",resizeHandle:"k-resize-handle",resizeHandleInner:"k-resize-handle-inner",dropPositions:"k-i-insert-up k-i-insert-down k-i-plus k-i-insert-middle",dropTop:"k-i-insert-up",dropBottom:"k-i-insert-down",dropAdd:"k-i-plus",dropMiddle:"k-i-insert-middle",dropDenied:"k-i-cancel",dragStatus:"k-drag-status",dragClue:"k-drag-clue",dragClueText:"k-clue-text"},r=l.GanttList=v.extend({init:function(t,i){v.fn.init.call(this,t,i),0===this.options.columns.length&&this.options.columns.push("title"),this.dataSource=this.options.dataSource,this._columns(),this._layout(),this._domTrees(),this._header(),this._sortable(),this._editable(),this._selectable(),this._draggable(),this._resizable(),this._attachEvents(),this._adjustHeight(),this.bind("render",function(){var i,t;this.options.resizable&&(i=this.header.find("col"),t=this.content.find("col"),this.header.find("th").not(":last").each(function(r){var u=e(n(this));i.eq(r).width(u),t.eq(r).width(u)}),i.last().css("width","auto"),t.last().css("width","auto"))},!0)},_adjustHeight:function(){this.content&&this.content.height(this.element.height()-h(this.header.parent()))},destroy:function(){v.fn.destroy.call(this),this._reorderDraggable&&this._reorderDraggable.destroy(),this._tableDropArea&&this._tableDropArea.destroy(),this._contentDropArea&&this._contentDropArea.destroy(),this._columnResizable&&this._columnResizable.destroy(),this.touch&&this.touch.destroy(),this.timer&&clearTimeout(this.timer),this.content.off(u),this.header.find("thead").off(u),this.header.find(f+r.link).off(u),this.header=null,this.content=null,this.levels=null,t.destroy(this.element)},options:{name:"GanttList",selectable:!0,editable:!0,resizable:!1},_attachEvents:function(){var i=this,t=r.styles;i.content.on(y+u,"td > span."+t.icon+":not(."+t.iconHidden+")",function(t){var u=n(this),r=i._modelFromElement(u);r.set("expanded",!r.get("expanded")),t.stopPropagation()})},_domTrees:function(){this.headerTree=new o.Tree(this.header[0]),this.contentTree=new o.Tree(this.content[0])},_columns:function(){var t=this.options.columns,n=function(){this.field="",this.title="",this.editable=!1,this.sortable=!1};this.columns=g(t,function(t){return t=typeof t===c?{field:t,title:rt[t]}:t,s(new n,t)})},_layout:function(){var s=this,u=this.options,e=this.element,i=r.styles,o=function(){var r,f=typeof u.rowHeight===c?u.rowHeight:u.rowHeight+"px",i=n(t.format(d,f));return s.content.append(i),r=h(i.find("tr")),i.remove(),r};e.addClass(i.wrapper).append("<div class='"+i.gridHeader+"'><div class='"+i.gridHeaderWrap+"'></div></div>").append("<div class='"+i.gridContentWrap+"'></div>"),this.header=e.find(f+i.gridHeaderWrap),this.content=e.find(f+i.gridContent),u.rowHeight&&(this._rowHeight=o())},_header:function(){var r=this.headerTree,u=i("colgroup",null,this._cols()),n=i("thead",{role:"rowgroup"},[i("tr",{role:"row"},this._ths())]),t=i("table",{style:{minWidth:this.options.listWidth+"px"},role:"grid"},[u,n]);r.render([t])},_render:function(n){var u,f,t,r={style:{minWidth:this.options.listWidth+"px"},tabIndex:0,role:"treegrid"};this._rowHeight&&(r.style.height=n.length*this._rowHeight+"px"),this.levels=[{field:null,value:0}],u=i("colgroup",null,this._cols()),f=i("tbody",{role:"rowgroup"},this._trs(n)),t=i("table",r,[u,f]),this.contentTree.render([t]),this.trigger("render")},_ths:function(){for(var t,f,e=this.columns,u=[],n=0,o=e.length;n<o;n++)t=e[n],f={"data-field":t.field,"data-title":t.title,className:r.styles.header,role:"columnheader"},u.push(i("th",f,[w(t.title)]));return this.options.resizable&&u.push(i("th",{className:r.styles.header,role:"columnheader"})),u},_cols:function(){for(var f,e,n,u=this.columns,r=[],t=0,o=u.length;t<o;t++)f=u[t],n=f.width,e=n&&0!==parseInt(n,10)?{style:{width:typeof n===c?n:n+"px"}}:null,r.push(i("col",e,[]));return this.options.resizable&&r.push(i("col",{style:{width:"1px"}})),r},_trs:function(n){for(var t,f,e,h=[],u=[],o=r.styles,i=0,s=n.length;i<s;i++)t=n[i],e=this._levels({idx:t.parentId,id:t.id,summary:t.summary}),f={"data-uid":t.uid,"data-level":e,role:"row"},t.summary&&(f["aria-expanded"]=t.expanded),i%2!=0&&u.push(o.alt),t.summary&&u.push(o.group),u.length&&(f.className=u.join(" ")),h.push(this._tds({task:t,attr:f,level:e})),u=[];return h},_tds:function(n){for(var f,r=[],u=this.columns,t=0,e=u.length;t<e;t++)f=u[t],r.push(this._td({task:n.task,column:f,level:n.level}));return this.options.resizable&&r.push(i("td",{role:"gridcell"})),i("tr",n.attr,r)},_td:function(n){var f,l,s,c=[],a=this.options.resourcesField,o=r.styles,h=n.task,e=n.column,u=h.get(e.field);if(e.field==a){for(u=u||[],f=[],s=0;s<u.length;s++)f.push(t.format("{0} [{1}]",u[s].get("name"),u[s].get("formatedValue")));f=f.join(", ")}else f=e.format?t.format(e.format,u):u;return"title"===e.field&&(c=it({level:n.level,className:o.iconPlaceHolder}),c.push(i("span",{className:o.icon+" "+(h.summary?h.expanded?o.iconCollapse:o.iconExpand:o.iconHidden)})),l=t.format("{0}, {1:P0}",f,h.percentComplete)),c.push(i("span",{"aria-label":l},[w(f)])),i("td",{role:"gridcell"},c)},_levels:function(n){for(var i,r=this.levels,o=n.summary,e=n.idx,f=n.id,t=0,u=r.length;t<u;t++)if(i=r[t],i.field==e)return o&&r.push({field:f,value:i.value+1}),i.value},_sortable:function(){for(var i,f,e,r=this,h=this.options.resourcesField,c=this.columns,u=this.header.find("th["+t.attr("field")+"]"),s=function(n){(0===r.dataSource.total()||r.editable&&r.editable.trigger("validate"))&&n.preventDefault()},n=0,o=u.length;n<o;n++)i=c[n],i.sortable&&i.field!==h&&(e=u.eq(n),f=e.data("kendoColumnSorter"),f&&f.destroy(),e.attr("data-"+t.ns+"field",i.field).kendoColumnSorter({dataSource:this.dataSource,change:s}));u=null},_selectable:function(){var t=this,i=this.options.selectable;i&&this.content.on(y+u,"tr",function(i){var r=n(this);t.editable&&t.editable.trigger("validate"),i.ctrlKey?t.clearSelection():t.select(r)})},select:function(n){var i=this.content.find(n),t=r.styles.selected;return i.length?(i.siblings(f+t).removeClass(t).attr("aria-selected",!1).end().addClass(t).attr("aria-selected",!0),void this.trigger("change")):this.content.find(f+t)},clearSelection:function(){var n=this.select();n.length&&(n.removeClass(r.styles.selected),this.trigger("change"))},_setDataSource:function(n){this.dataSource=n,this._sortable()},_editable:function(){var t=this,o=this.options.editable,i=r.styles,s="span."+i.icon+":not("+i.iconHidden+")",f=function(){var n=t.editable;n&&(n.end()?t._closeCell():n.trigger("validate"))},e=function(t){var r=n(t.currentTarget);r.hasClass(i.editCell)||p()};o&&o.update!==!1&&(this._startEditHandler=function(i){var u=i.currentTarget?n(i.currentTarget):i,r=t._columnFromElement(u);t.editable||r&&r.editable&&t._editCell({cell:u,column:r})},t.content.on("focusin"+u,function(){clearTimeout(t.timer),t.timer=null}).on("focusout"+u,function(){t.timer=setTimeout(f,1)}).on("keydown"+u,function(n){n.keyCode===a.ENTER&&n.preventDefault()}).on("keyup"+u,function(n){var i,r,u=n.keyCode;switch(u){case a.ENTER:p(),f();break;case a.ESC:t.editable&&(i=t._editableContainer,r=t._modelFromElement(i),t.trigger("cancel",{model:r,cell:i})||t._closeCell(!0))}}),b?t.touch=t.content.kendoTouch({filter:"td",touchstart:function(n){e(n.touch)},doubletap:function(i){n(i.touch.initialTouch).is(s)||t._startEditHandler(i.touch)}}).data("kendoTouch"):t.content.on("mousedown"+u,"td",function(n){e(n)}).on("dblclick"+u,"td",function(i){n(i.target).is(s)||t._startEditHandler(i)}))},_editCell:function(i){var c,p=this.options.resourcesField,v=r.styles,f=i.cell,u=i.column,l=this._modelFromElement(f),s=this.dataSource._createNewModel(l.toJSON()),e=s.fields[u.field]||s[u.field],o=e.validation,w=t.attr("type"),y=t.attr("bind"),a=t.attr("format"),h={name:u.field,required:!!e.validation&&e.validation.required===!0};return u.field===p?void u.editor(f,s):(this._editableContent=f.children().detach(),this._editableContainer=f,f.data("modelCopy",s),"date"!==e.type&&"date"!==n.type(e)||u.format&&!/H|m|s|F|g|u/.test(u.format)||(h[y]="value:"+u.field,h[w]="date",u.format&&(h[a]=t._extractFormat(u.format)),c=function(t,i){n('<input type="text"/>').attr(h).appendTo(t).kendoDateTimePicker({format:i.format})}),this.editable=f.addClass(v.editCell).kendoEditable({fields:{field:u.field,format:u.format,editor:u.editor||c},model:s,clearContainer:!1}).data("kendoEditable"),o&&o.dateCompare&&tt(o.dateCompare)&&o.message&&(n("<span "+t.attr("for")+'="'+u.field+'" class="k-invalid-msg"/>').hide().appendTo(f),f.find("[name="+u.field+"]").attr(t.attr("dateCompare-msg"),o.message)),this.editable.bind("validate",function(n){var t=this.element.find(":kendoFocusable:first").focus();ut&&t.focus(),n.preventDefault()}),void(this.trigger("edit",{model:l,cell:f})&&this._closeCell(!0)))},_closeCell:function(n){var e=r.styles,i=this._editableContainer,f=this._modelFromElement(i),s=this._columnFromElement(i),u=s.field,o=i.data("modelCopy"),t={};t[u]=o.get(u),i.empty().removeData("modelCopy").removeClass(e.editCell).append(this._editableContent),this.editable.unbind(),this.editable.destroy(),this.editable=null,this._editableContainer=null,this._editableContent=null,n||("start"===u&&(t.end=new Date(t.start.getTime()+f.duration())),this.trigger("update",{task:f,updateInfo:t}))},_draggable:function(){var u,o=this,e=null,h=!0,i=r.styles,k=t.support.isRtl(this.element),p="tr["+t.attr("level")+" = 0]:last",c={},l=this.options.editable,v=function(){e=null,u=null,h=!0,c={}},d=function(n){for(var t=n;t;){if(e.get("id")===t.get("id")){h=!1;break}t=o.dataSource.taskParent(t)}},w=function(){var r=n(u).height(),i=t.getOffset(u).top;s(u,{beforeLimit:i+.25*r,afterLimit:i+.75*r})},y=function(n){var o,r,e,s,f;u&&(o=n.location,r=i.dropAdd,e="add",s=parseInt(u.attr(t.attr("level")),10),o<=u.beforeLimit?(f=u.prev(),r=i.dropTop,e="insert-before"):o>=u.afterLimit&&(f=u.next(),r=i.dropBottom,e="insert-after"),f&&parseInt(f.attr(t.attr("level")),10)===s&&(r=i.dropMiddle),c.className=r,c.command=e)},a=function(){return o._reorderDraggable.hint.children(f+i.dragStatus).removeClass(i.dropPositions)};l&&l.reorder!==!1&&l.update!==!1&&(this._reorderDraggable=this.content.kendoDraggable({distance:10,holdToDrag:b,group:"listGroup",filter:"tr[data-uid]",ignore:f+i.input,hint:function(t){return n('<div class="'+i.header+" "+i.dragClue+'"/>').css({width:300,paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).append('<span class="'+i.icon+" "+i.dragStatus+'" /><span class="'+i.dragClueText+'"/>')},cursorOffset:{top:-20,left:0},container:this.content,dragstart:function(n){var t=o.editable;return t&&t.reorder!==!1&&t.trigger("validate")?void n.preventDefault():(e=o._modelFromElement(n.currentTarget),this.hint.children(f+i.dragClueText).text(e.get("title")),void(k&&this.hint.addClass(i.rtl)))},drag:function(n){h&&(y(n.y),a().addClass(c.className))},dragend:function(){v()},dragcancel:function(){v()}}).data("kendoDraggable"),this._tableDropArea=this.content.kendoDropTargetArea({distance:0,group:"listGroup",filter:"tr[data-uid]",dragenter:function(n){u=n.dropTarget,d(o._modelFromElement(u)),w(),a().toggleClass(i.dropDenied,!h)},dragleave:function(){h=!0,a()},drop:function(){var n=o._modelFromElement(u),i=n.orderId,t={parentId:n.parentId};if(h){switch(c.command){case"add":t.parentId=n.id;break;case"insert-before":t.orderId=n.parentId===e.parentId&&n.orderId>e.orderId?i-1:i;break;case"insert-after":t.orderId=n.parentId===e.parentId&&n.orderId>e.orderId?i:i+1}o.trigger("update",{task:e,updateInfo:t})}}}).data("kendoDropTargetArea"),this._contentDropArea=this.element.kendoDropTargetArea({distance:0,group:"listGroup",filter:f+i.gridContent,drop:function(){var i=o._modelFromElement(o.content.find(p)),n=i.orderId,t={parentId:null,orderId:null!==e.parentId?n+1:n};o.trigger("update",{task:e,updateInfo:t})}}).data("kendoDropTargetArea"))},_resizable:function(){var t=this,i=r.styles,o=function(r){var s,p,u=n(r.currentTarget),f=t.resizeHandle,a=u.position(),y=a.left,v=e(u),c=u.closest("div"),l=r.clientX+n(window).scrollLeft(),o=t.options.columnResizeHandleWidth;return y+=c.scrollLeft(),f||(f=t.resizeHandle=n('<div class="'+i.resizeHandle+'"><div class="'+i.resizeHandleInner+'" /></div>')),s=u.offset().left+v,(p=l>s-o&&l<s+o)?(c.append(f),void f.show().css({top:a.top,left:y+v-o-1,height:h(u),width:3*o}).data("th",u)):void f.hide()};this.options.resizable&&(this._columnResizable&&this._columnResizable.destroy(),this.header.find("thead").on("mousemove"+u,"th",o),this._columnResizable=this.header.kendoResizable({handle:f+i.resizeHandle,start:function(i){var u=n(i.currentTarget).data("th"),o="col:eq("+u.index()+")",r=t.header.find("table"),f=t.content.find("table");t.element.addClass("k-grid-column-resizing"),this.col=f.children("colgroup").find(o).add(r.find(o)),this.th=u,this.startLocation=i.x.location,this.columnWidth=e(u),this.table=r.add(f),this.totalWidth=this.table.width()-e(r.find("th:last"))},resize:function(n){var i=11,t=n.x.location-this.startLocation;this.columnWidth+t<i&&(t=i-this.columnWidth),this.table.css({minWidth:this.totalWidth+t}),this.col.width(this.columnWidth+t)},resizeend:function(){var r,i,n;t.element.removeClass("k-grid-column-resizing"),r=Math.floor(this.columnWidth),i=Math.floor(e(this.th)),n=t.columns[this.th.index()],t.trigger("columnResize",{column:n,oldWidth:r,newWidth:i}),this.table=this.col=this.th=null}}).data("kendoResizable"))},_modelFromElement:function(n){var r=n.closest("tr");return this.dataSource.getByUid(r.attr(t.attr("uid")))},_columnFromElement:function(n){var t=n.closest("td"),r=t.parent(),i=r.children().index(t);return this.columns[i]}});s(!0,l.GanttList,{styles:nt})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.gantt.timeline.min",["kendo.dom.min","kendo.touch.min","kendo.draganddrop.min"],n)}(function(){return function(n){function pt(n){return delete n.name,delete n.prefix,delete n.views,n}function wt(n){var i=[],t=n.workWeekStart;for(i.push(t);n.workWeekEnd!=t;)t>6?t-=7:t++,i.push(t);return i}function v(){var t=kendo._activeElement();t&&"body"!==t.nodeName.toLowerCase()&&n(t).blur()}var y,f,l=kendo.ui.Widget,r=kendo.dom.element,a=kendo.dom.text,rt=kendo.dom.html,st=n.isPlainObject,s=kendo._outerWidth,o=kendo._outerHeight,c=n.extend,bt=n.proxy,tt=kendo.support.browser,u=!1,dt=kendo.keys,nt=kendo.data.Query,yt="string",e=".kendoGanttTimeline",h="click",vt="dblclick",w="mousemove",lt="mouseenter",p="mouseleave",at="keydown",t=".",kt=kendo.template("#=kendo.toString(start, 't')#"),b=kendo.template("#=kendo.toString(start, 'ddd M/dd')#"),g=kendo.template("#=kendo.toString(start, 'ddd M/dd')# - #=kendo.toString(kendo.date.addDays(end, -1), 'ddd M/dd')#"),d=kendo.template("#=kendo.toString(start, 'MMM')#"),ut=kendo.template("#=kendo.toString(start, 'yyyy')#"),ft=kendo.template('<div class="#=styles.marquee#"><div class="#=styles.marqueeColor#"></div></div>'),k=kendo.template('<div style="z-index: 100002;" class="#=styles.tooltipWrapper#"><div class="#=styles.tooltipContent#"><div>#=messages.start#: #=kendo.toString(start, format)#</div><div>#=messages.end#: #=kendo.toString(end, format)#</div></div></div>'),it=kendo.template('<div style="z-index: 100002;" class="#=styles.tooltipWrapper#" ><div class="#=styles.tooltipContent#">#=text#%</div><div class="#=styles.tooltipCallout#" style="left:13px;"></div></div>'),et=kendo.template('<div class="#=kendo.htmlEncode(styles.taskDetails)#"><strong>#=kendo.htmlEncode(task.title)#</strong><div class="#=styles.taskDetailsPercent#">#=kendo.toString(task.percentComplete, "p0")#</div><ul class="#=styles.reset#"><li>#=messages.start#: #=kendo.toString(task.start, "h:mm tt ddd, MMM d")#</li><li>#=messages.end#: #=kendo.toString(task.end, "h:mm tt ddd, MMM d")#</li></ul></div>'),ht="<table style='visibility: hidden;'><tbody><tr style='height:{0}'><td>&nbsp;</td></tr></tbody></table>",ct={day:{type:"kendo.ui.GanttDayView"},week:{type:"kendo.ui.GanttWeekView"},month:{type:"kendo.ui.GanttMonthView"},year:{type:"kendo.ui.GanttYearView"}},ot={alt:"k-alt",reset:"k-reset",nonWorking:"k-nonwork-hour",header:"k-header",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",tasksWrapper:"k-gantt-tables",rowsTable:"k-gantt-rows",columnsTable:"k-gantt-columns",tasksTable:"k-gantt-tasks",dependenciesWrapper:"k-gantt-dependencies",resource:"k-resource",resourceAlt:"k-resource k-alt",task:"k-task",taskSingle:"k-task-single",taskMilestone:"k-task-milestone",taskSummary:"k-task-summary",taskWrap:"k-task-wrap",taskMilestoneWrap:"k-milestone-wrap",resourcesWrap:"k-resources-wrap",taskDot:"k-task-dot",taskDotStart:"k-task-start",taskDotEnd:"k-task-end",taskDragHandle:"k-task-draghandle",taskContent:"k-task-content",taskTemplate:"k-task-template",taskActions:"k-task-actions",taskDelete:"k-task-delete",taskComplete:"k-task-complete",taskDetails:"k-task-details",taskDetailsPercent:"k-task-pct",link:"k-link",icon:"k-icon",iconDelete:"k-i-close",taskResizeHandle:"k-resize-handle",taskResizeHandleWest:"k-resize-w",taskResizeHandleEast:"k-resize-e",taskSummaryProgress:"k-task-summary-progress",taskSummaryComplete:"k-task-summary-complete",line:"k-line",lineHorizontal:"k-line-h",lineVertical:"k-line-v",arrowWest:"k-arrow-w",arrowEast:"k-arrow-e",dragHint:"k-drag-hint",dependencyHint:"k-dependency-hint",tooltipWrapper:"k-widget k-tooltip k-popup k-group k-reset",tooltipContent:"k-tooltip-content",tooltipCallout:"k-callout k-callout-s",callout:"k-callout",marquee:"k-marquee k-gantt-marquee",marqueeColor:"k-marquee-color"},i=kendo.ui.GanttView=l.extend({init:function(n,r){l.fn.init.call(this,n,r),this.title=this.options.title||this.options.name,this.header=this.element.find(t+i.styles.gridHeader),this.content=this.element.find(t+i.styles.gridContent),this.contentWidth=this.content.width(),this._workDays=wt(this.options),this._headerTree=r.headerTree,this._taskTree=r.taskTree,this._taskTemplate=r.taskTemplate?kendo.template(r.taskTemplate,c({},kendo.Template,r.templateSettings)):null,this._dependencyTree=r.dependencyTree,this._taskCoordinates={},this._currentTime()},destroy:function(){l.fn.destroy.call(this),clearTimeout(this._tooltipTimeout),this.headerRow=null,this.header=null,this.content=null,this._dragHint=null,this._resizeHint=null,this._resizeTooltip=null,this._taskTooltip=null,this._percentCompleteResizeTooltip=null,this._headerTree=null,this._taskTree=null,this._dependencyTree=null},options:{showWorkHours:!1,showWorkDays:!1,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,hourSpan:1,slotSize:100,currentTimeMarker:{updateInterval:1e4}},renderLayout:function(){this._slots=this._createSlots(),this._tableWidth=this._calculateTableWidth(),this.createLayout(this._layout()),this._slotDimensions(),this._adjustHeight(),this.content.find(t+i.styles.dependenciesWrapper).width(this._tableWidth)},_adjustHeight:function(){this.content&&this.content.height(this.element.height()-o(this.header))},createLayout:function(n){var f=this._headers(n),e=this._colgroup(),u=this._headerTree,t=r("thead",null,f),i=r("table",{style:{width:this._tableWidth+"px"}},[e,t]);u.render([i]),this.headerRow=this.header.find("table:first tr").last()},_slotDimensions:function(){for(var t,i,r=this.headerRow[0].children,f=this._timeSlots(),n=0,u=r.length;n<u;n++)i=r[n],t=f[n],t.offsetLeft=i.offsetLeft,t.offsetWidth=i.offsetWidth},render:function(n){var u,e,s=n.length,f=i.styles,h=this._rowsTable(s),c=this._columnsTable(s),l=this._tasksTable(n),o=this.options.currentTimeMarker,r=this.options.calculatedSize;this._taskTree.render([h,c,l]),u=this.content.find(t+f.rowsTable),r&&(e=r.row*n.length,this.content.find(t+f.tasksTable).height(e),u.height(e)),this._contentHeight=u.height(),this._rowHeight=r?r.row:this._contentHeight/u.find("tr").length,this.content.find(t+f.columnsTable).height(this._contentHeight),o!==!1&&void 0!==o.updateInterval&&this._renderCurrentTime()},_rowsTable:function(n){for(var e,f=[],u=i.styles,o=[null,{className:u.alt}],t=0;t<n;t++)e=r("tr",o[t%2],[r("td",null,[a(" ")])]),f.push(e);return this._createTable(1,f,{className:u.rowsTable})},_columnsTable:function(){for(var h,f,n,t,c=[],s=i.styles,e=this._timeSlots(),l=e.length,o=0,u=0;u<l;u++)f=e[u],t={},n=f.span,o+=n,1!==n&&(t.colspan=n),f.isNonWorking&&(t.className=s.nonWorking),c.push(r("td",t,[a(" ")]));return h=r("tr",null,c),this._createTable(o,[h],{className:s.columnsTable})},_tasksTable:function(n){for(var l,s,f,t,a,o,w=[],c=i.styles,tt=this._taskCoordinates={},p=this._calculateMilestoneWidth(),v=Math.round(p.width),h=this.options.resourcesField,nt=[c.resource,c.resourceAlt],y=this.options.calculatedSize,g=this._calculateResourcesMargin(),k=this._calculateTaskBorderWidth(),d=function(n){var i=f.left,r=i+f.width;t.isMilestone()&&(i-=v/2,r=i+v),tt[t.id]={start:i,end:r,rowIndex:n}},e=0,b=n.length;e<b;e++)t=n[e],f=this._taskPosition(t),f.borderWidth=k,l=r("tr",null),s=r("td"),t.start<=this.end&&t.end>=this.start&&(s.children.push(this._renderTask(n[e],f)),t[h]&&t[h].length&&(a=u?this._tableWidth-f.left:Math.max(f.width||p.clientWidth,0)+f.left,o={width:this._tableWidth-(a+g)+"px"},o[u?"right":"left"]=a+"px",y&&(o.height=y.cell+"px"),s.children.push(r("div",{className:c.resourcesWrap,style:o},this._renderResources(t[h],nt[e%2])))),d(e)),l.children.push(s),w.push(l);return this._createTable(1,w,{className:i.styles.tasksTable})},_createTable:function(n,t,i){for(var e,o,f=[],u=0;u<n;u++)f.push(r("col"));return e=r("colgroup",null,f),o=r("tbody",null,t),i.style||(i.style={}),i.style.width=this._tableWidth+"px",r("table",i,[e,o])},_calculateTableWidth:function(){for(var t,e,u=this._timeSlots(),i=0,r=0,n=0,f=u.length;n<f;n++)t=u[n].span,r+=t,t>i&&(i=t);return e=Math.round(r*this.options.slotSize/i)},_calculateMilestoneWidth:function(){var u,r,f=i.styles.task+" "+i.styles.taskMilestone,t=n("<div class='"+f+"' style='visibility: hidden; position: absolute'>");return this.content.append(t),r=t[0].getBoundingClientRect(),u={width:r.right-r.left,clientWidth:t[0].clientWidth},t.remove(),u},_calculateResourcesMargin:function(){var r,t=n("<div class='"+i.styles.resourcesWrap+"' style='visibility: hidden; position: absolute'>");return this.content.append(t),r=parseInt(t.css(u?"margin-right":"margin-left"),10),t.remove(),r},_calculateTaskBorderWidth:function(){var r,u,f=i.styles.task+" "+i.styles.taskSingle,t=n("<div class='"+f+"' style='visibility: hidden; position: absolute'>");return this.content.append(t),u=kendo.getComputedStyles(t[0],["border-left-width"]),r=parseFloat(u["border-left-width"],10),t.remove(),r},_renderTask:function(n,t){var o,s,c,e=this.options.editable,v=t.left,f=i.styles,y=f.taskWrap,a=this.options.calculatedSize,l={},h={className:y,style:{left:v+"px"}};return a&&(h.style.height=a.cell+"px"),n.summary?s=this._renderSummary(n,t):n.isMilestone()?(s=this._renderMilestone(n,t),h.className+=" "+f.taskMilestoneWrap):s=this._renderSingleTask(n,t),o=r("div",h,[s]),e&&e.dependencyCreate!==!1&&(o.children.push(r("div",{className:f.taskDot+" "+f.taskDotStart})),o.children.push(r("div",{className:f.taskDot+" "+f.taskDotEnd}))),n.summary||n.isMilestone()||!e||e.dragPercentComplete===!1||e.update===!1||null!==this._taskTemplate||(c=Math.round(t.width*n.percentComplete),l[u?"right":"left"]=c+"px",o.children.push(r("div",{className:f.taskDragHandle,style:l}))),o},_renderSingleTask:function(n,t){var s,f,h,u=i.styles,c=Math.round(t.width*n.percentComplete),o=[],e=this.options.editable;return null!==this._taskTemplate?s=rt(this._taskTemplate(n)):(s=a(n.title),o.push(r("div",{className:u.taskComplete,style:{width:c+"px"}}))),f=r("div",{className:u.taskContent},[r("div",{className:u.taskTemplate},[s])]),o.push(f),e&&(e.destroy!==!1&&f.children.push(r("span",{className:u.taskActions},[r("a",{className:u.link+" "+u.taskDelete,href:"#","aria-label":"Delete"},[r("span",{className:u.icon+" "+u.iconDelete})])])),e.resize!==!1&&e.update!==!1&&(f.children.push(r("span",{className:u.taskResizeHandle+" "+u.taskResizeHandleWest})),f.children.push(r("span",{className:u.taskResizeHandle+" "+u.taskResizeHandleEast})))),h=r("div",{className:u.task+" "+u.taskSingle,"data-uid":n.uid,style:{width:Math.max(t.width-2*t.borderWidth,0)+"px"}},o)},_renderMilestone:function(n){var t=i.styles;return r("div",{className:t.task+" "+t.taskMilestone,"data-uid":n.uid})},_renderSummary:function(n,t){var u=i.styles,e=Math.round(t.width*n.percentComplete);return r("div",{className:u.task+" "+u.taskSummary,"data-uid":n.uid,style:{width:t.width+"px"}},[r("div",{className:u.taskSummaryProgress,style:{width:e+"px"}},[r("div",{className:u.taskSummaryComplete,style:{width:t.width+"px"}})])])},_renderResources:function(n,t){for(var e,f=[],i=0,o=n.length;i<o;i++)e=n[i],f.push(r("span",{className:t,style:{color:e.get("color")}},[a(e.get("name"))]));return u&&f.reverse(),f},_taskPosition:function(n){var i=Math.round,t=i(this._offset(u?n.end:n.start)),r=i(this._offset(u?n.start:n.end));return{left:t,width:r-t}},_offset:function(n){var t,e,f,o,r=this._timeSlots(),i=0;return r.length?(o=this._slotIndex("start",n),t=r[o],t.end<n?i=t.offsetWidth:t.start<=n&&(e=n-t.start,f=t.end-t.start,i=e/f*t.offsetWidth),u&&(i=t.offsetWidth+1-i),t.offsetLeft+i):0},_slotIndex:function(n,t,i){var u,f=this._timeSlots(),r=0,e=f.length-1;i&&(f=[].slice.call(f).reverse());do u=Math.ceil((e+r)/2),f[u][n]<t?r=u:(u===e&&u--,e=u);while(r!==e);return i&&(r=f.length-1-r),r},_timeByPosition:function(r,f,e){var h,c,s,o=this._slotByPosition(r);return f?e?o.end:o.start:(h=r-n(t+i.styles.tasksTable).offset().left,c=o.end-o.start,s=h-o.offsetLeft,u&&(s=o.offsetWidth-s),new Date(o.start.getTime()+c*(s/o.offsetWidth)))},_slotByPosition:function(r){var e=r-n(t+i.styles.tasksTable).offset().left,f=this._slotIndex("offsetLeft",e,u);return this._timeSlots()[f]},_renderDependencies:function(n){for(var i=[],u=this._dependencyTree,t=0,r=n.length;t<r;t++)i.push.apply(i,this._renderDependency(n[t]));u.render(i)},_renderDependency:function(n){var i,e,t,o,r=this._taskCoordinates[n.predecessorId],f=this._taskCoordinates[n.successorId];if(!r||!f)return[];for(e="_render"+["FF","FS","SF","SS"][u?3-n.type:n.type],i=this[e](r,f),t=0,o=i.length;t<o;t++)i[t].attr["data-uid"]=n.uid;return i},_renderFF:function(n,t){var i=this._dependencyFF(n,t,!1);return i[i.length-1].children[0]=this._arrow(!0),i},_renderSS:function(n,t){var i=this._dependencyFF(t,n,!0);return i[0].children[0]=this._arrow(!1),i.reverse()},_renderFS:function(n,t){var i=this._dependencyFS(n,t,!1);return i[i.length-1].children[0]=this._arrow(!1),i},_renderSF:function(n,t){var i=this._dependencyFS(t,n,!0);return i[0].children[0]=this._arrow(!0),i.reverse()},_dependencyFF:function(n,t,r){var p,b=this,y=[],e=0,f=0,u=0,o=0,s=r?"start":"end",h=2,d=1,l=this._rowHeight,k=10,g=n.rowIndex*l+Math.floor(l/2)-1,c=t.rowIndex*l+Math.floor(l/2)-1,a=i.styles,v=function(){y.push(b._line(a.line+" "+a.lineHorizontal,{left:e+"px",top:f+"px",width:u+"px"}))},w=function(){y.push(b._line(a.line+" "+a.lineVertical,{left:e+"px",top:f+"px",height:o+"px"}))};return e=n[s],f=g,u=k,p=t[s]-n[s],p>0!==r&&(u=Math.abs(p)+k),r?(e-=u,u-=d,v()):(v(),e+=u-h),c<f?(o=f-c,o+=h,f=c,w()):(o=c-f,o+=h,w(),f+=o-h),u=Math.abs(e-t[s]),r||(u-=d,e-=u),v(),y},_dependencyFS:function(n,t,r){var nt=this,p=[],o=0,f=0,u=0,e=0,l=this._rowHeight,g=Math.floor(l/2),h=10,k=2*h,b=t.start-n.end,c=2,d=1,v=n.rowIndex*l+Math.floor(l/2)-1,s=t.rowIndex*l+Math.floor(l/2)-1,a=i.styles,w=function(){p.push(nt._line(a.line+" "+a.lineHorizontal,{left:o+"px",top:f+"px",width:u+"px"}))},y=function(){p.push(nt._line(a.line+" "+a.lineVertical,{left:o+"px",top:f+"px",height:e+"px"}))};return o=n.end,f=v,u=h,r&&(o+=d,b>k&&(u=b-(h-c)),u-=d),w(),o+=u-c,b<=k&&(e=r?Math.abs(s-v)-g:g,s<v?(f-=e,e+=c,y()):(y(),f+=e),u=n.end-t.start+k,u<h&&(u=h),o-=u-c,w()),s<v?(e=f-s,f=s,e+=c,y()):(e=s-f,y(),f+=e),u=t.start-o,r||(u-=d),w(),p},_line:function(n,t){return r("div",{className:n,style:t})},_arrow:function(n){return r("span",{className:n?i.styles.arrowWest:i.styles.arrowEast})},_colgroup:function(){for(var t,f,u=this._timeSlots(),e=u.length,i=[],n=0;n<e;n++)for(t=0,f=u[n].span;t<f;t++)i.push(r("col"));return r("colgroup",null,i)},_createDragHint:function(n){this._dragHint=n.clone().addClass(i.styles.dragHint).css("cursor","move"),n.parent().append(this._dragHint)},_updateDragHint:function(n){var t=this._offset(n);this._dragHint.css({left:t})},_removeDragHint:function(){this._dragHint.remove(),this._dragHint=null},_createResizeHint:function(t){var e,r,h=i.styles,u=this._taskCoordinates[t.id].rowIndex*this._rowHeight,f=this.options,c=f.messages;this._resizeHint=n(ft({styles:h})).css({top:0,height:this._contentHeight}),this.content.append(this._resizeHint),this._resizeTooltip=n(k({styles:h,start:t.start,end:t.end,messages:c.views,format:f.resizeTooltipFormat})).css({top:0,left:0}),this.content.append(this._resizeTooltip),this._resizeTooltipWidth=s(this._resizeTooltip),e=o(this._resizeTooltip),r=u-e,r<0&&(r=u+this._rowHeight),this._resizeTooltipTop=r},_updateResizeHint:function(r,f,e){var s=this._offset(u?f:r),a=this._offset(u?r:f),y=a-s,o=e!==u?s:a,l=this._tableWidth-kendo.support.scrollbar(),h=this._resizeTooltipWidth,c=this.options,p=c.messages,v=n(t+i.styles.tasksTable).offset().left-n(t+i.styles.tasksWrapper).offset().left;u&&(s+=v),this._resizeHint.css({left:s,width:y}),this._resizeTooltip&&this._resizeTooltip.remove(),o-=Math.round(h/2),o<0?o=0:o+h>l&&(o=l-h),u&&(o+=v),this._resizeTooltip=n(k({styles:i.styles,start:r,end:f,messages:p.views,format:c.resizeTooltipFormat})).css({top:this._resizeTooltipTop,left:o,"min-width":h}).appendTo(this.content)},_removeResizeHint:function(){this._resizeHint.remove(),this._resizeHint=null,this._resizeTooltip.remove(),this._resizeTooltip=null},_updatePercentCompleteTooltip:function(r,u,f){var e,l,c,h;this._removePercentCompleteTooltip(),e=this._percentCompleteResizeTooltip=n(it({styles:i.styles,text:f})).appendTo(this.element),l=Math.round(s(e)/2),c=e.find(t+i.styles.callout),h=Math.round(s(c)/2),e.css({top:r-(o(e)+h),left:u-l}),c.css("left",l-h)},_removePercentCompleteTooltip:function(){this._percentCompleteResizeTooltip&&this._percentCompleteResizeTooltip.remove(),this._percentCompleteResizeTooltip=null},_updateDependencyDragHint:function(n,t,i){this._removeDependencyDragHint(),i?this._creteVmlDependencyDragHint(n,t):this._creteDependencyDragHint(n,t)},_creteDependencyDragHint:function(t,r){var e=i.styles,f=r.x-t.x,o=r.y-t.y,s=Math.sqrt(f*f+o*o),u=Math.atan(o/f);f<0&&(u+=Math.PI),n("<div class='"+e.line+" "+e.lineHorizontal+" "+e.dependencyHint+"'></div>").css({top:t.y,left:t.x,width:s,"transform-origin":"0% 0","-ms-transform-origin":"0% 0","-webkit-transform-origin":"0% 0",transform:"rotate("+u+"rad)","-ms-transform":"rotate("+u+"rad)","-webkit-transform":"rotate("+u+"rad)"}).appendTo(this.content)},_creteVmlDependencyDragHint:function(t,r){var u=n("<kvml:line class='"+i.styles.dependencyHint+"' style='position:absolute; top: 0px; left: 0px;' strokecolor='black' strokeweight='2px' from='"+t.x+"px,"+t.y+"px' to='"+r.x+"px,"+r.y+"px'></kvml:line>").appendTo(this.content);u[0].outerHTML=u[0].outerHTML},_removeDependencyDragHint:function(){this.content.find(t+i.styles.dependencyHint).remove()},_createTaskTooltip:function(r,f,e){var y,w=i.styles,p=this.options,h=this.content,v=h.offset(),d=h.width(),a=kendo.scrollLeft(h),k=n(f).parents("tr").first(),b=k.offset(),g=p.tooltip&&p.tooltip.template?kendo.template(p.tooltip.template):et,l=u?e-(v.left+a+kendo.support.scrollbar()):e-(v.left-a),nt=b.top+o(k)-v.top+h.scrollTop(),c=this._taskTooltip=n('<div style="z-index: 100002;" class="'+w.tooltipWrapper+'" ><div class="'+w.taskContent+'"></div></div>');c.css({left:l,top:nt}).appendTo(h).find(t+w.taskContent).append(g({styles:w,task:r,messages:p.messages.views})),o(c)<b.top-v.top&&c.css("top",b.top-v.top-o(c)+h.scrollTop()),y=s(c),y+l-a>d&&(l-=y,l<a&&(l=a+d-(y+17)),c.css("left",l))},_removeTaskTooltip:function(){this._taskTooltip&&this._taskTooltip.remove(),this._taskTooltip=null},_scrollTo:function(n){var i=n.offset().left,u=n.width(),o=i+u,a=n.closest("tr"),h=a.offset().top,w=a.height(),y=h+w,t=this.content,v=t.offset(),s=v.top,p=t.height(),c=s+p,f=v.left,r=t.width(),e=f+r,l=kendo.support.scrollbar();h<s?t.scrollTop(t.scrollTop()+(h-s)):y>c&&t.scrollTop(t.scrollTop()+(y+l-c)),i<f&&u>r&&o<e||o>e&&u<r?t.scrollLeft(t.scrollLeft()+(o+l-e)):(o>e&&u>r&&i>f||i<f&&u<r)&&t.scrollLeft(t.scrollLeft()+(i-f))},_scrollToDate:function(n){var t,r=this.start,i=this.end;n>=r&&n<i&&(t=this._offset(n),kendo.support.isRtl(this.element)&&(t=this._tableWidth-t),kendo.scrollLeft(this.content,t))},_timeSlots:function(){return this._slots&&this._slots.length?this._slots[this._slots.length-1]:[]},_headers:function(n){for(var o,e,f,v,u,c,s=[],h=i.styles,t=0,l=n.length;t<l;t++){for(o=n[t],e=[],u=0,c=o.length;u<c;u++)f=o[u],v=a(f.text),e.push(r("th",{colspan:f.span,className:h.header+(f.isNonWorking?" "+h.nonWorking:"")},[v]));s.push(r("tr",null,e))}return s},_hours:function(n,t){var i,f,u,o=[],r=this.options,s=r.workDayStart.getHours(),h=r.workDayEnd.getHours(),e=r.hourSpan;for(n=new Date(n),t=new Date(t);n<t;)i=new Date(n),u=i.getHours(),f=u>=s&&u<h,i.setHours(i.getHours()+e),u==i.getHours()&&i.setHours(i.getHours()+2*e),r.showWorkHours&&!f||o.push({start:n,end:i,isNonWorking:!f,span:1}),n=i;return o},_days:function(n,t){var r,i,u=[];for(n=new Date(n),t=new Date(t);n<t;)r=t<kendo.date.nextDay(n)?t:kendo.date.nextDay(n),i=this._isWorkDay(n),this.options.showWorkDays&&!i||u.push({start:n,end:r,isNonWorking:!i,span:1}),n=r;return u},_weeks:function(n,t){var i,u,r,f=[],e=this.calendarInfo().firstDay;for(n=new Date(n),t=new Date(t);n<t;)i=kendo.date.dayOfWeek(kendo.date.addDays(n,1),e,1),i>t&&(i=t),u=this._days(n,i),r=u.length,r>0&&f.push({start:u[0].start,end:u[r-1].end,span:r}),n=i;return f},_months:function(n,t){var i,f,r,u,e=[];for(n=new Date(n),t=new Date(t);n<t;)i=new Date(n),f=kendo.date.firstDayOfMonth(new Date(i.setMonth(i.getMonth()+1))),i=t<f?t:f,r=this._days(n,i),u=r.length,u>0&&e.push({start:r[0].start,end:r[u-1].end,span:u}),n=i;return e},_years:function(n,t){var i,f,u,r=[];for(n=new Date(n),t=new Date(t);n<t;)i=new Date(n),i=kendo.date.firstDayOfMonth(new Date(i.setMonth(12))),i>=t&&(i=t),u=i.getMonth()||12,f=u-n.getMonth(),r.push({start:n,end:i,span:f}),n=i;return r},_slotHeaders:function(n,t){for(var r,u=[],i=0,f=n.length;i<f;i++)r=n[i],u.push({text:t(r),isNonWorking:!!r.isNonWorking,span:r.span});return u},_isWorkDay:function(n){for(var u=n.getDay(),i=this._workDays,t=0,r=i.length;t<r;t++)if(i[t]===u)return!0;return!1},calendarInfo:function(){return kendo.getCulture().calendars.standard},_renderCurrentTime:function(){var u,r=this._getCurrentTime(),o=this._offset(r),h=n("<div class='k-current-time'></div>"),f=i.styles,e=n(t+f.tasksWrapper),s=n(t+f.tasksTable);this.content&&this._timeSlots().length&&(this.content.find(".k-current-time").remove(),u=this._timeSlots()[this._slotIndex("start",r)],r<u.start||r>u.end||(e.length&&s.length&&(o+=s.offset().left-e.offset().left),h.css({left:o+"px",top:"0px",width:"1px",height:this._contentHeight+"px"}).appendTo(this.content)))},_getCurrentTime:function(){return new Date},_currentTime:function(){var n=this.options.currentTimeMarker;n!==!1&&void 0!==n.updateInterval&&(this._renderCurrentTime(),this._currentTimeUpdateTimer=setInterval(bt(this._renderCurrentTime,this),n.updateInterval))}});c(!0,i,{styles:ot}),kendo.ui.GanttDayView=i.extend({name:"day",options:{timeHeaderTemplate:kt,dayHeaderTemplate:b,resizeTooltipFormat:"h:mm tt ddd, MMM d"},range:function(n){var t=this.options.range;this.start=kendo.date.getDate(n.start),this.end=kendo.date.getDate(n.end),(kendo.date.getMilliseconds(n.end)>0||this.end.getTime()===this.start.getTime())&&(this.end=kendo.date.addDays(this.end,1)),t&&t.start&&(this.start=kendo.date.getDate(t.start),this.start.setHours(t.start.getHours())),t&&t.end&&(this.end=kendo.date.getDate(t.end),this.end.setHours(t.end.getHours()))},_createSlots:function(){for(var t,u,i=[],r=this._days(this.start,this.end),f=[],n=0,e=r.length;n<e;n++)t=r[n],u=this._hours(t.start,t.end),t.span=u.length,f.push.apply(f,u);return i.push(r),i.push(f),i},_layout:function(){var n=[],t=this.options;return n.push(this._slotHeaders(this._slots[0],kendo.template(t.dayHeaderTemplate))),n.push(this._slotHeaders(this._slots[1],kendo.template(t.timeHeaderTemplate))),n}}),kendo.ui.GanttWeekView=i.extend({name:"week",options:{dayHeaderTemplate:b,weekHeaderTemplate:g,resizeTooltipFormat:"h:mm tt ddd, MMM d"},range:function(n){var i,t=this.options.range,f=this.calendarInfo(),u=f.firstDay,r=n.end;u===r.getDay()&&r.setDate(r.getDate()+7),this.start=kendo.date.getDate(kendo.date.dayOfWeek(n.start,u,-1)),this.end=kendo.date.getDate(kendo.date.dayOfWeek(r,u,1)),t&&t.start&&(this.start=kendo.date.getDate(t.start)),t&&t.end&&(i=new Date(t.end),this.end=kendo.date.getDate(i)<t.end?kendo.date.getDate(new Date(i.setDate(i.getDate()+1))):kendo.date.getDate(i))},_createSlots:function(){var n=[];return n.push(this._weeks(this.start,this.end)),n.push(this._days(this.start,this.end)),n},_layout:function(){var n=[],t=this.options;return n.push(this._slotHeaders(this._slots[0],kendo.template(t.weekHeaderTemplate))),n.push(this._slotHeaders(this._slots[1],kendo.template(t.dayHeaderTemplate))),n}}),kendo.ui.GanttMonthView=i.extend({name:"month",options:{weekHeaderTemplate:g,monthHeaderTemplate:d,resizeTooltipFormat:"dddd, MMM d, yyyy"},range:function(n){var i,t=this.options.range;this.start=kendo.date.firstDayOfMonth(n.start),this.end=kendo.date.addDays(kendo.date.getDate(kendo.date.lastDayOfMonth(n.end)),1),t&&t.start&&(this.start=kendo.date.getDate(t.start)),t&&t.end&&(i=new Date(t.end),this.end=kendo.date.getDate(i)<t.end?kendo.date.getDate(new Date(i.setDate(i.getDate()+1))):kendo.date.getDate(i))},_createSlots:function(){var n=[];return n.push(this._months(this.start,this.end)),n.push(this._weeks(this.start,this.end)),n},_layout:function(){var n=[],t=this.options;return n.push(this._slotHeaders(this._slots[0],kendo.template(t.monthHeaderTemplate))),n.push(this._slotHeaders(this._slots[1],kendo.template(t.weekHeaderTemplate))),n}}),kendo.ui.GanttYearView=i.extend({name:"year",options:{yearHeaderTemplate:ut,monthHeaderTemplate:d,resizeTooltipFormat:"dddd, MMM d, yyyy"},range:function(n){var i,t=this.options.range;this.start=kendo.date.firstDayOfMonth(new Date(n.start.setMonth(0))),this.end=kendo.date.firstDayOfMonth(new Date(n.end.setMonth(12))),t&&t.start&&(this.start=kendo.date.firstDayOfMonth(t.start)),t&&t.end&&(i=kendo.date.firstDayOfMonth(t.end),this.end=kendo.date.getDate(new Date(i.setMonth(i.getMonth()+1))))},_createSlots:function(){var t=[],i=this._months(this.start,this.end);return n(i).each(function(n,t){t.span=1}),t.push(this._years(this.start,this.end)),t.push(i),t},_layout:function(){var n=[],t=this.options;return n.push(this._slotHeaders(this._slots[0],kendo.template(t.yearHeaderTemplate))),n.push(this._slotHeaders(this._slots[1],kendo.template(t.monthHeaderTemplate))),n}}),y={wrapper:"k-timeline k-grid k-widget",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",gridContentWrap:"k-grid-content",tasksWrapper:"k-gantt-tables",dependenciesWrapper:"k-gantt-dependencies",task:"k-task",line:"k-line",taskResizeHandle:"k-resize-handle",taskResizeHandleWest:"k-resize-w",taskDragHandle:"k-task-draghandle",taskComplete:"k-task-complete",taskDelete:"k-task-delete",taskWrapActive:"k-task-wrap-active",taskWrap:"k-task-wrap",taskDot:"k-task-dot",taskDotStart:"k-task-start",taskDotEnd:"k-task-end",hovered:"k-state-hover",selected:"k-state-selected",origin:"k-origin"},f=kendo.ui.GanttTimeline=l.extend({init:function(n,t){l.fn.init.call(this,n,t),this.options.views&&this.options.views.length||(this.options.views=["day","week","month"]),u=kendo.support.isRtl(n),this._wrapper(),this._domTrees(),this._views(),this._selectable(),this._draggable(),this._resizable(),this._percentResizeDraggable(),this._createDependencyDraggable(),this._attachEvents(),this._tooltip()},options:{name:"GanttTimeline",messages:{views:{day:"Day",week:"Week",month:"Month",year:"Year",start:"Start",end:"End"}},snap:!0,selectable:!0,editable:!0},destroy:function(){l.fn.destroy.call(this),clearTimeout(this._tooltipTimeout),this._currentTimeUpdateTimer&&clearInterval(this._currentTimeUpdateTimer),this._unbindView(this._selectedView),this._moveDraggable&&this._moveDraggable.destroy(),this._resizeDraggable&&this._resizeDraggable.destroy(),this._percentDraggable&&this._percentDraggable.destroy(),this._dependencyDraggable&&this._dependencyDraggable.destroy(),this.touch&&this.touch.destroy(),this._headerTree=null,this._taskTree=null,this._dependencyTree=null,this.wrapper.off(e),kendo.destroy(this.wrapper)},_wrapper:function(){var i=f.styles,e=this,r=this.options,u=function(){var f,s,c=typeof r.rowHeight===yt?r.rowHeight:r.rowHeight+"px",u=n(kendo.format(ht,c)),h=e.wrapper.find(t+i.tasksWrapper);return h.append(u),f=o(u.find("tr")),s=u.find("td").height(),u.remove(),{row:f,cell:s}};this.wrapper=this.element.addClass(i.wrapper).append("<div class='"+i.gridHeader+"'><div class='"+i.gridHeaderWrap+"'></div></div>").append("<div class='"+i.gridContentWrap+"'><div class='"+i.tasksWrapper+"'></div><div class='"+i.dependenciesWrapper+"'></div></div>"),r.rowHeight&&(this._calculatedSize=u())},_domTrees:function(){var r=f.styles,i=kendo.dom.Tree,n=this.wrapper;this._headerTree=new i(n.find(t+r.gridHeaderWrap)[0]),this._taskTree=new i(n.find(t+r.tasksWrapper)[0]),this._dependencyTree=new i(n.find(t+r.dependenciesWrapper)[0])},_views:function(){var n,r,t,i,f,u,o,e=this.options.views;for(this.views={},u=0,o=e.length;u<o;u++)n=e[u],r=st(n),r&&n.selectable===!1||(t=r?"string"!=typeof n.type?n.title:n.type:n,i=ct[t],i&&(r&&(n.type=i.type),i.title=this.options.messages.views[t]),n=c({title:t},i,r?n:{}),t&&(this.views[t]=n,f&&!n.selected||(f=t)));f&&(this._selectedViewName=f)},view:function(n){return n&&(this._selectView(n),this.trigger("navigate",{view:n,action:"changeView"})),this._selectedView},_selectView:function(n){n&&this.views[n]&&(this._selectedView&&this._unbindView(this._selectedView),this._selectedView=this._initializeView(n),this._selectedViewName=n)},_viewByIndex:function(n){var t,i=this.views;for(t in i){if(!n)return t;n--}},_initializeView:function(n){var i,r,u,t=this.views[n];if(t){if(i=t.type,"string"==typeof i&&(i=kendo.getter(t.type)(window)),!i)throw Error("There is no such view");r={},c(r,this.options.range,t.range),u=t.date||this.options.date,t=new i(this.wrapper,pt(c(!0,{headerTree:this._headerTree,taskTree:this._taskTree,dependencyTree:this._dependencyTree,calculatedSize:this._calculatedSize},t,this.options,{date:u,range:r})))}return t},_unbindView:function(n){n&&n.destroy()},_range:function(n){var i,t,u={field:"start",dir:"asc"},r={field:"end",dir:"desc"};return n&&n.length?(i=new nt(n).sort(u).toArray()[0].start||new Date,t=new nt(n).sort(r).toArray()[0].end||new Date,{start:new Date(i),end:new Date(t)}):{start:new Date,end:new Date}},_render:function(n){var t=this.view(),r=this._range(n),i=t.options.date;this._tasks=n,t.range(r),t.renderLayout(),t.render(n),i&&t._scrollToDate(i)},_renderDependencies:function(n){this.view()._renderDependencies(n)},_taskByUid:function(n){for(var i,r=this._tasks,u=r.length,t=0;t<u;t++)if(i=r[t],i.uid===n)return i},_draggable:function(){var r,i,e,c,n=this,l=this.options.snap,h=f.styles,o=this.options.editable,s=function(){n.view()._removeDragHint(),r&&r.css("opacity",1),r=null,i=null,n.dragInProgress=!1};o&&o.move!==!1&&o.update!==!1&&(this._moveDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:t+h.task,holdToDrag:kendo.support.mobileOS,ignore:t+h.taskResizeHandle}),this._moveDraggable.bind("dragstart",function(t){var u=n.view();return r=t.currentTarget.parent(),i=n._taskByUid(t.currentTarget.attr("data-uid")),n.trigger("moveStart",{task:i})?void t.preventDefault():(e=i.start,c=u._timeByPosition(t.x.location,l)-e,u._createDragHint(r),r.css("opacity",.5),clearTimeout(n._tooltipTimeout),void(n.dragInProgress=!0))}).bind("drag",kendo.throttle(function(t){var o,r,f;n.dragInProgress&&(o=n.view(),r=new Date(o._timeByPosition(t.x.location,l)-c),f=r,n.trigger("move",{task:i,start:r})||(e=r,u&&(f=new Date(e.getTime()+i.duration())),o._updateDragHint(f)))},15)).bind("dragend",function(){n.trigger("moveEnd",{task:i,start:e}),s()}).bind("dragcancel",function(){s()}).userEvents.bind("select",function(){v()}))},_resizable:function(){var c,i,o,r,e,n=this,a=this.options.snap,s=f.styles,h=this.options.editable,l=function(){n.view()._removeResizeHint(),c=null,i=null,n.dragInProgress=!1};h&&h.resize!==!1&&h.update!==!1&&(this._resizeDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:t+s.taskResizeHandle,holdToDrag:!1}),this._resizeDraggable.bind("dragstart",function(f){return e=f.currentTarget.hasClass(s.taskResizeHandleWest),u&&(e=!e),c=f.currentTarget.closest(t+s.task),i=n._taskByUid(c.attr("data-uid")),n.trigger("resizeStart",{task:i})?void f.preventDefault():(o=i.start,r=i.end,n.view()._createResizeHint(i),clearTimeout(n._tooltipTimeout),void(n.dragInProgress=!0))}).bind("drag",kendo.throttle(function(t){var f,u;n.dragInProgress&&(f=n.view(),u=f._timeByPosition(t.x.location,a,!e),e?o=u<r?u:r:r=u>o?u:o,n.trigger("resize",{task:i,start:o,end:r})||f._updateResizeHint(o,r,e))},15)).bind("dragend",function(){n.trigger("resizeEnd",{task:i,resizeStart:e,start:o,end:r}),l()}).bind("dragcancel",function(){l()}).userEvents.bind("select",function(){v()}))},_percentResizeDraggable:function(){var h,i,c,y,p,e,o,k,a,d,n=this,r=f.styles,l=this.options.editable,w=function(){n.view()._removePercentCompleteTooltip(),i=null,h=null,n.dragInProgress=!1},b=function(n){i.find(t+r.taskComplete).width(n).end().siblings(t+r.taskDragHandle).css(u?"right":"left",n)};l&&l.dragPercentComplete!==!1&&l.update!==!1&&(this._percentDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:t+r.taskDragHandle,holdToDrag:!1}),this._percentDraggable.bind("dragstart",function(u){return n.trigger("percentResizeStart")?void u.preventDefault():(i=u.currentTarget.siblings(t+r.task),h=n._taskByUid(i.attr("data-uid")),o=h.percentComplete,c=i.offset(),y=this.element.offset(),p=i.find(t+r.taskComplete).width(),e=s(i),clearTimeout(n._tooltipTimeout),void(n.dragInProgress=!0))}).bind("drag",kendo.throttle(function(t){if(n.dragInProgress){d=u?-t.x.initialDelta:t.x.initialDelta;var i=Math.max(0,Math.min(e,p+d));o=Math.round(i/e*100),b(i),k=c.top-y.top,a=c.left+i-y.left,u&&(a+=e-2*i),n.view()._updatePercentCompleteTooltip(k,a,o)}},15)).bind("dragend",function(){n.trigger("percentResizeEnd",{task:h,percentComplete:o/100}),w()}).bind("dragcancel",function(){b(p),w()}).userEvents.bind("select",function(){v()}))},_createDependencyDraggable:function(){var u,w,a,r=this,e=n(),h=n(),p=tt.msie&&tt.version<9,i=f.styles,y=this.options.editable,l=function(){u.css("display","").removeClass(i.hovered),u.parent().removeClass(i.origin),u=null,c(!1),h=n(),e=n(),r.view()._removeDependencyDragHint(),r.dragInProgress=!1},c=function(n){h.hasClass(i.origin)||(h.find(t+i.taskDot).css("display",n?"block":""),e.toggleClass(i.hovered,n))};y&&y.dependencyCreate!==!1&&(p&&document.namespaces&&document.namespaces.add("kvml","urn:schemas-microsoft-com:vml","#default#VML"),this._dependencyDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:t+i.taskDot,holdToDrag:!1}),this._dependencyDraggable.bind("dragstart",function(n){var e,f;return r.trigger("dependencyDragStart")?void n.preventDefault():(u=n.currentTarget.css("display","block").addClass(i.hovered),u.parent().addClass(i.origin),e=u.offset(),f=r.wrapper.find(t+i.tasksWrapper).offset(),w=Math.round(e.left-f.left+o(u)/2),a=Math.round(e.top-f.top+s(u)/2),clearTimeout(r._tooltipTimeout),void(r.dragInProgress=!0))}).bind("drag",kendo.throttle(function(u){var f,o,l,s;r.dragInProgress&&(r.view()._removeDependencyDragHint(),f=n(kendo.elementUnderCursor(u)),o=r.wrapper.find(t+i.tasksWrapper).offset(),l=u.x.location-o.left,s=u.y.location-o.top,r.view()._updateDependencyDragHint({x:w,y:a},{x:l,y:s},p),c(!1),e=f.hasClass(i.taskDot)?f:n(),h=f.closest(t+i.taskWrap),c(!0))},15)).bind("dragend",function(){var s,f,h,n,o;e.length&&(s=u.hasClass(i.taskDotStart),f=e.hasClass(i.taskDotStart),h=s?f?3:2:f?1:0,n=r._taskByUid(u.siblings(t+i.task).attr("data-uid")),o=r._taskByUid(e.siblings(t+i.task).attr("data-uid")),n!==o&&r.trigger("dependencyDragEnd",{type:h,predecessor:n,successor:o})),l()}).bind("dragcancel",function(){l()}).userEvents.bind("select",function(){v()}))},_selectable:function(){var i=this,r=f.styles;this.options.selectable&&this.wrapper.on(h+e,t+r.task,function(t){t.stopPropagation(),t.ctrlKey?i.trigger("clear"):i.trigger("select",{uid:n(this).attr("data-uid")})}).on(h+e,t+r.taskWrap,function(t){t.stopPropagation(),n(this).css("z-index","0");var i=n(document.elementFromPoint(t.clientX,t.clientY));i.hasClass(r.line)&&i.click(),n(this).css("z-index","")}).on(h+e,t+r.tasksWrapper,function(){i.selectDependency().length>0?i.clearSelection():i.trigger("clear")}).on(h+e,t+r.line,function(n){n.stopPropagation(),i.selectDependency(this)})},select:function(n){var r=this.wrapper.find(n),i=f.styles;return r.length?(this.clearSelection(),r.addClass(i.selected),void(kendo.support.mobileOS&&r.parent().addClass(i.taskWrapActive))):this.wrapper.find(t+i.task+t+i.selected)},selectDependency:function(i){var u,e=this.wrapper.find(i),r=f.styles;return e.length?(this.clearSelection(),this.trigger("clear"),u=n(e).attr("data-uid"),void this.wrapper.find(t+r.line+"[data-uid='"+u+"']").addClass(r.selected)):this.wrapper.find(t+r.line+t+r.selected)},clearSelection:function(){var n=f.styles;this.wrapper.find(t+n.selected).removeClass(n.selected),kendo.support.mobileOS&&this.wrapper.find(t+n.taskWrapActive).removeClass(n.taskWrapActive)},_attachEvents:function(){var i=this,r=f.styles,u=this.options.editable;u&&(this._tabindex(),this.wrapper.on(h+e,t+r.taskDelete,function(u){i.trigger("removeTask",{uid:n(this).closest(t+r.task).attr("data-uid")}),u.stopPropagation(),u.preventDefault()}).on(at+e,function(n){var t,r=i.options.editable;n.keyCode===dt.DELETE&&r&&r.dependencyDestroy!==!1&&(t=i.selectDependency(),t.length&&(i.trigger("removeDependency",{uid:t.attr("data-uid")}),i.clearSelection()))}),kendo.support.mobileOS?this.touch=this.wrapper.kendoTouch({filter:t+r.task,doubletap:function(t){i.options.editable.update!==!1&&i.trigger("editTask",{uid:n(t.touch.currentTarget).attr("data-uid")})}}).data("kendoTouch"):this.wrapper.on(vt+e,t+r.task,function(t){i.options.editable.update!==!1&&(i.trigger("editTask",{uid:n(this).attr("data-uid")}),t.stopPropagation(),t.preventDefault())}))},_tooltip:function(){var o,i=this,s=this.options.tooltip,r=f.styles,u=function(n){o=n.clientX};s&&s.visible===!1||(kendo.support.mobileOS?(this.wrapper.on(h+e,t+r.taskDelete,function(n){n.stopPropagation(),i.view()._removeTaskTooltip()}).on(p+e,t+r.task,function(u){var f=n(u.relatedTarget).parents(t+r.taskWrap,t+r.task);0===f.length&&i.view()._removeTaskTooltip()}),this.touch&&this.touch.bind("tap",function(t){var r=t.touch.target,f=i._taskByUid(n(r).attr("data-uid")),u=t.touch.x.client;i.view()._taskTooltip&&i.view()._removeTaskTooltip(),i.view()._createTaskTooltip(f,r,u)}).bind("doubletap",function(){i.view()._removeTaskTooltip()})):this.wrapper.on(lt+e,t+r.task,function(){var r=this,t=i._taskByUid(n(this).attr("data-uid"));i.dragInProgress||(i._tooltipTimeout=setTimeout(function(){i.view()._createTaskTooltip(t,r,o)},800),n(this).on(w,u))}).on(p+e,t+r.task,function(){clearTimeout(i._tooltipTimeout),i.view()._removeTaskTooltip(),n(this).off(w,u)}))}}),c(!0,f,{styles:y})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.gantt.min",["kendo.data.min","kendo.popup.min","kendo.window.min","kendo.resizable.min","kendo.gantt.list.min","kendo.gantt.timeline.min","kendo.grid.min","kendo.pdf.min"],n)}(function(){return function(n,t){function c(n){return"["+i.attr("uid")+(n?"='"+n+"']":"]")}function ei(n){return delete n.name,delete n.prefix,delete n.remove,delete n.edit,delete n.add,delete n.navigate,n}function gi(n){var o,e,t,r,u,f;if(n.filter("[name=end], [name=start]").length){for(o=n.attr("name"),e=i.widgetInstance(n,i.ui),t={},r=n;r!==window&&!u;)r=r.parent(),u=r.data("kendoEditable");return!(f=u?u.options.model:null)||(t.start=f.start,t.end=f.end,t[o]=e?e.value():i.parseDate(n.value()),t.start<=t.end)}return!0}function tt(t,r){var e=t.parents("["+i.attr("role")+'="gantt"]'),u=[],f=di(e);t.attr(it,0),r&&f.each(function(t,i){u[t]=n(i).scrollTop()});try{t[0].setActive()}catch(o){t[0].focus()}r&&f.each(function(t,i){n(i).scrollTop(u[t])})}function di(t){return n(t).parentsUntil("body").filter(function(n,t){var r=i.getComputedStyles(t,["overflow"]);return"visible"!=r.overflow}).add(window)}var b,k,g,ot,vt,lt,st,u,i=window.kendo,ht="matchMedia"in window,ct=i.support.browser,yi=i.support.mobileOS,pt=i.Observable,a=i.ui.Widget,v=i.data.DataSource,wt=i.data.ObservableObject,vi=i.data.ObservableArray,l=i.data.Query,w=n.isArray,ai=n.inArray,ki=i.isFunction,o=n.proxy,e=n.extend,y=n.isPlainObject,ii=n.map,p=i._outerWidth,gt=i._outerHeight,s=i.keys,hi=3,f=".kendoGantt",rt="p0",it="tabIndex",h="click",yt="width",ut="string",ci={down:{origin:"bottom left",position:"top left"},up:{origin:"top left",position:"bottom left"}},d="aria-activedescendant",li="aria-label",bt="gantt_active_cell",nt="action-option-focused",r=".",pi="Are you sure you want to delete this task?",wi="Are you sure you want to delete this dependency?",bi=i.template('<button class="#=styles.buttonToggle#" type="button" '+li+'="Toggle"><span class="#=styles.iconToggle#"></span></button>'),at='<button class="#=styles.button# #=className#" type="button" #if (action) {#data-action="#=action#"#}#><span class="#=iconClass#"></span><span>#=text#</span></button>',ri='<a class="#=className#" #=attr# href="\\#">#=text#</a>',ti=i.template('<li class="#=styles.currentView# #=styles.viewButtonDefault#"><a href="\\#" class="#=styles.link#">&nbps;</a></li>'),ni=i.template('<ul class="#=styles.viewsWrapper#">#for(var view in views){#<li class="#=styles.viewButtonDefault# #=styles.viewButton#-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a href="\\#" class="#=styles.link#">#=views[view].title#</a></li>#}#</ul>'),ui=i.template('<div class="#=styles.popupWrapper#"><ul class="#=styles.popupList#" role="listbox">#for(var i = 0, l = actions.length; i < l; i++){#<li class="#=styles.item#" data-action="#=actions[i].data#" role="option">#=actions[i].text#</span>#}#</ul></div>'),oi=function(t,r){var f={name:r.field,title:r.title},u=r.model.fields[r.field].validation;u&&y(u)&&u.message&&(f[i.attr("dateCompare-msg")]=u.message),n('<input type="text" required '+i.attr("type")+'="date" '+i.attr("role")+'="datetimepicker" '+i.attr("bind")+'="value:'+r.field+'" '+i.attr("validate")+"='true' />").attr(f).appendTo(t),n("<span "+i.attr("for")+'="'+r.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},si=function(t,i){n('<a href="#" class="'+i.styles.button+'">'+i.messages.assignButton+"</a>").click(i.click).appendTo(t)},fi={wrapper:"k-widget k-gantt",rowHeight:"k-gantt-rowheight",listWrapper:"k-gantt-layout k-gantt-treelist",list:"k-gantt-treelist",timelineWrapper:"k-gantt-layout k-gantt-timeline",timeline:"k-gantt-timeline",splitBarWrapper:"k-splitbar k-state-default k-splitbar-horizontal k-splitbar-draggable-horizontal k-gantt-layout",splitBar:"k-splitbar",splitBarHover:"k-splitbar-horizontal-hover",popupWrapper:"k-list-container",popupList:"k-list k-reset",resizeHandle:"k-resize-handle",icon:"k-icon",item:"k-item",line:"k-line",buttonDelete:"k-gantt-delete",buttonCancel:"k-gantt-cancel",buttonSave:"k-gantt-update",buttonToggle:"k-gantt-toggle",primary:"k-primary",hovered:"k-state-hover",selected:"k-state-selected",focused:"k-state-focused",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",popup:{form:"k-popup-edit-form",editForm:"k-gantt-edit-form",formContainer:"k-edit-form-container",resourcesFormContainer:"k-resources-form-container",message:"k-popup-message",buttonsContainer:"k-edit-buttons k-state-default",button:"k-button",editField:"k-edit-field",editLabel:"k-edit-label",resourcesField:"k-gantt-resources"},toolbar:{headerWrapper:"k-floatwrap k-header k-gantt-toolbar",footerWrapper:"k-floatwrap k-header k-gantt-toolbar",toolbar:"k-gantt-toolbar",expanded:"k-state-expanded",views:"k-gantt-views",viewsWrapper:"k-reset k-header k-gantt-views",actions:"k-gantt-actions",button:"k-button k-button-icontext",buttonToggle:"k-button k-button-icon k-gantt-toggle",iconPlus:"k-icon k-i-plus",iconPdf:"k-icon k-i-file-pdf",iconToggle:"k-icon k-i-layout-1-by-4",viewButtonDefault:"k-state-default",viewButton:"k-view",currentView:"k-current-view",link:"k-link",pdfButton:"k-gantt-pdf",appendButton:"k-gantt-create"}},kt=pt.extend({init:function(n,t){pt.fn.init.call(this),this.element=n,this.options=e(!0,{},this.options,t),this._popup()},options:{direction:"down",navigatable:!1},_current:function(n){var t=u.styles,f=this.list.find(r+t.focused),i=f[n]();i.length&&(f.removeClass(t.focused).removeAttr("id"),i.addClass(t.focused).attr("id",nt),this.list.find("ul").removeAttr(d).attr(d,nt))},_popup:function(){var t=this,o=u.styles,l="li"+r+o.item,v=r+o.toolbar.appendButton,c=this.options.messages.actions,a=this.options.navigatable;this.list=n(ui({styles:o,actions:[{data:"add",text:c.addChild},{data:"insert-before",text:c.insertBefore},{data:"insert-after",text:c.insertAfter}]})),this.element.append(this.list),this.popup=new i.ui.Popup(this.list,e({anchor:this.element.find(v),open:function(){t._adjustListWidth()},animation:this.options.animation},ci[this.options.direction])),this.element.on(h+f,v,function(r){var f=n(this),u=f.attr(i.attr("action"));r.preventDefault(),u?t.trigger("command",{type:u}):(t.popup.open(),a&&t.list.find("li:first").addClass(o.focused).attr("id",nt).end().find("ul").attr({TABINDEX:0,"aria-activedescendant":nt}).focus())}),this.list.find(l).hover(function(){n(this).addClass(o.hovered)},function(){n(this).removeClass(o.hovered)}).end().on(h+f,l,function(){t.trigger("command",{type:n(this).attr(i.attr("action"))}),t.popup.close()}),a&&(this.popup.bind("close",function(){t.list.find(l).removeClass(o.focused).end().find("ul").attr(it,0),t.element.parents("["+i.attr("role")+'="gantt"]').find(r+o.gridContent+" > table:first").focus()}),this.list.find("ul").on("keydown"+f,function(n){var i=n.keyCode;switch(i){case s.UP:n.preventDefault(),t._current("prev");break;case s.DOWN:n.preventDefault(),t._current("next");break;case s.ENTER:t.list.find(r+o.focused).click();break;case s.ESC:n.preventDefault(),t.popup.close()}}))},_adjustListWidth:function(){var n,f,t=this.list,s=u.styles,i=t[0].style.width,e=this.element.find(r+s.toolbar.appendButton),o=p(t);!t.data(yt)&&i||(n=window.getComputedStyle?window.getComputedStyle(e[0],null):0,f=n?parseFloat(n.width):p(e),n&&(ct.mozilla||ct.msie)&&(f+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)),i="border-box"!==t.css("box-sizing")?f-(p(t)-t.width()):f,o>i&&(i=o),t.css({fontFamily:e.css("font-family"),width:i}).data(yt,i))},destroy:function(){clearTimeout(this._focusTimeout),this.popup.destroy(),this.element.off(f),this.list.off(f),this.unbind()}}),dt=function(n,t){return function(i){var r,u;if(i=w(i)?{data:i}:i,r=i||{},u=r.data,r.data=u,!(r instanceof n)&&r instanceof v)throw Error("Incorrect DataSource type. Only "+t+" instances are supported");return r instanceof n?r:new n(r)}},et=i.data.Model.define({id:"id",fields:{id:{type:"number"},predecessorId:{type:"number"},successorId:{type:"number"},type:{type:"number"}}}),ft=v.extend({init:function(n){v.fn.init.call(this,e(!0,{},{schema:{modelBase:et,model:et}},n))},successors:function(n){return this._dependencies("predecessorId",n)},predecessors:function(n){return this._dependencies("successorId",n)},dependencies:function(n){var t=this.predecessors(n),i=this.successors(n);return t.push.apply(t,i),t},_dependencies:function(n,t){var i=this.view(),r={field:n,operator:"eq",value:t};return i=new l(i).filter(r).toArray()}});ft.create=dt(ft,"GanttDependencyDataSource"),k=i.data.Model.define({duration:function(){var t=this.end,n=this.start;return t-n},isMilestone:function(){return 0===this.duration()},_offset:function(n){for(var r,i=["start","end"],t=0;t<i.length;t++)r=new Date(this.get(i[t]).getTime()+n),this.set(i[t],r)},id:"id",fields:{id:{type:"number"},parentId:{type:"number",defaultValue:null,validation:{required:!0}},orderId:{type:"number",validation:{required:!0}},title:{type:"string",defaultValue:"New task"},start:{type:"date",validation:{required:!0}},end:{type:"date",validation:{required:!0,dateCompare:gi,message:"End date should be after or equal to the start date"}},percentComplete:{type:"number",validation:{required:!0,min:0,max:1,step:.01}},summary:{type:"boolean"},expanded:{type:"boolean",defaultValue:!0}}}),g=v.extend({init:function(n){v.fn.init.call(this,e(!0,{},{schema:{modelBase:k,model:k}},n))},remove:function(n){var i=n.get("parentId"),t=this.taskAllChildren(n);return this._removeItems(t),n=v.fn.remove.call(this,n),this._childRemoved(i,n.get("orderId")),n},add:function(n){if(n)return n=this._toGanttTask(n),this.insert(this.taskSiblings(n).length,n)},insert:function(n,t){if(t)return t=this._toGanttTask(t),t.set("orderId",n),t=v.fn.insert.call(this,n,t),this._reorderSiblings(t,this.taskSiblings(t).length-1),this._resolveSummaryFields(this.taskParent(t)),t},taskChildren:function(n){var i,u=this.view(),r={field:"parentId",operator:"eq",value:null},f=this._sort&&this._sort.length?this._sort:{field:"orderId",dir:"asc"};if(n){if(i=n.get("id"),i===t||null===i||""===i)return[];r.value=i}return u=new l(u).filter(r).sort(f).toArray()},taskAllChildren:function(n){var t=[],r=this,i=function(n){var u=r.taskChildren(n);t.push.apply(t,u),ii(u,i)};return n?i(n):t=this.view(),t},taskSiblings:function(n){if(!n)return null;var t=this.taskParent(n);return this.taskChildren(t)},taskParent:function(n){return n&&null!==n.get("parentId")?this.get(n.parentId):null},taskLevel:function(n){for(var i=0,t=this.taskParent(n);null!==t;)i+=1,t=this.taskParent(t);return i},taskTree:function(n){for(var r,e,t=[],u=this.taskChildren(n),i=0,f=u.length;i<f;i++)r=u[i],t.push(r),r.get("expanded")&&(e=this.taskTree(r),t.push.apply(t,e));return t},update:function(n,i){var u,f,r=this,o=function(n,t){for(var u=r.taskAllChildren(n),i=0,f=u.length;i<f;i++)u[i]._offset(t)},e=function(n){var i=n.field,t=n.sender;switch(i){case"start":r._resolveSummaryStart(r.taskParent(t)),o(t,t.get(i).getTime()-u.getTime());break;case"end":r._resolveSummaryEnd(r.taskParent(t));break;case"percentComplete":r._resolveSummaryPercentComplete(r.taskParent(t));break;case"orderId":r._reorderSiblings(t,u)}};i.parentId!==t&&(u=n.get("parentId"),u!==i.parentId&&(n.set("parentId",i.parentId),r._childRemoved(u,n.get("orderId")),n.set("orderId",r.taskSiblings(n).length-1),r._resolveSummaryFields(r.taskParent(n))),delete i.parentId),n.bind("change",e);for(f in i)u=n.get(f),n.set(f,i[f]);n.unbind("change",e)},_resolveSummaryFields:function(n){n&&(this._updateSummary(n),this.taskChildren(n).length&&(this._resolveSummaryStart(n),this._resolveSummaryEnd(n),this._resolveSummaryPercentComplete(n)))},_resolveSummaryStart:function(n){var i=this,t=function(n){for(var f,r=i.taskChildren(n),u=r[0].start.getTime(),t=1,e=r.length;t<e;t++)f=r[t].start.getTime(),f<u&&(u=f);return new Date(u)};this._updateSummaryRecursive(n,"start",t)},_resolveSummaryEnd:function(n){var i=this,t=function(n){for(var f,r=i.taskChildren(n),u=r[0].end.getTime(),t=1,e=r.length;t<e;t++)f=r[t].end.getTime(),f>u&&(u=f);return new Date(u)};this._updateSummaryRecursive(n,"end",t)},_resolveSummaryPercentComplete:function(n){var i=this,t=function(n){var r=i.taskChildren(n),t=new l(r).aggregate([{field:"percentComplete",aggregate:"average"}]);return t.percentComplete.average};this._updateSummaryRecursive(n,"percentComplete",t)},_updateSummaryRecursive:function(n,t,i){var u,r;n&&(u=i(n),n.set(t,u),r=this.taskParent(n),r&&this._updateSummaryRecursive(r,t,i))},_childRemoved:function(n,t){for(var u=null===n?null:this.get(n),r=this.taskChildren(u),i=t,f=r.length;i<f;i++)r[i].set("orderId",i);this._resolveSummaryFields(u)},_reorderSiblings:function(n,t){for(var e=n.get("orderId"),o=e>t,f=o?t:e,r=o?e:t,s=o?f:f+1,u=this.taskSiblings(n),r=Math.min(r,u.length-1),i=f;i<=r;i++)u[i]!==n&&(u[i].set("orderId",s),s+=1)},_updateSummary:function(n){if(null!==n){var t=this.taskChildren(n).length;n.set("summary",t>0)}},_toGanttTask:function(n){if(!(n instanceof k)){var t=n;n=this._createNewModel(),n.accept(t)}return n}}),g.create=dt(g,"GanttDataSource"),e(!0,i.data,{GanttDataSource:g,GanttTask:k,GanttDependencyDataSource:ft,GanttDependency:et}),ot={desktop:{dateRange:oi,resources:si}},vt=i.Observable.extend({init:function(n,t){i.Observable.fn.init.call(this),this.element=n,this.options=e(!0,{},this.options,t),this.createButton=this.options.createButton},fields:function(t,i){var e,c=this,o=this.options,f=o.messages.editor,s=o.resources,h=function(n){n.preventDefault(),s.editor(c.container.find(r+u.styles.popup.resourcesField),i)};return o.editable.template?e=n.map(i.fields,function(n,t){return{field:t}}):(e=[{field:"title",title:f.title},{field:"start",title:f.start,editor:t.dateRange},{field:"end",title:f.end,editor:t.dateRange},{field:"percentComplete",title:f.percentComplete,format:rt}],i.get(s.field)&&e.push({field:s.field,title:f.resources,messages:f,editor:t.resources,click:h,styles:u.styles.popup})),e},_buildEditTemplate:function(n,t,r){var l,v,f,o,y=this.options.resources,h=this.options.editable.template,a=e({},i.Template,this.options.templateSettings),p=a.paramName,c=u.styles.popup,s="";if(h)typeof h===ut&&(h=window.unescape(h)),s+=i.template(h,a)(n);else for(l=0,v=t.length;l<v;l++)f=t[l],s+='<div class="'+c.editLabel+'"><label for="'+f.field+'">'+(f.title||f.field||"")+"</label></div>",f.field===y.field&&(s+='<div class="'+c.resourcesField+'" style="display:none"></div>'),!n.editable||n.editable(f.field)?(r.push(f),s+="<div "+i.attr("container-for")+'="'+f.field+'" class="'+c.editField+'"></div>'):(o="#:",f.field?(f=i.expr(f.field,p),o+=f+"==null?'':"+f):o+="''",o+="#",o=i.template(o,a),s+='<div class="'+c.editField+'">'+o(n)+"</div>");return s}}),lt=vt.extend({destroy:function(){this.close(),this.unbind()},editTask:function(n){this.editable=this._createPopupEditor(n)},close:function(){var n=this,t=function(){n.editable&&(n.editable.destroy(),n.editable=null,n.container=null),n.popup&&(n.popup.destroy(),n.popup=null)};this.editable&&this.container.is(":visible")?(n.trigger("close",{window:n.container}),this.container.data("kendoWindow").bind("deactivate",t).close()):t()},showDialog:function(t){for(var h,c,o=t.buttons,f=u.styles.popup,s=i.format('<div class="{0}"><div class="{1}"><p class="{2}">{3}</p><div class="{4}">',f.form,f.formContainer,f.message,t.text,f.buttonsContainer),e=0,l=o.length;e<l;e++)s+=this.createButton(o[e]);s+="</div></div></div>",h=this.element,this.popup&&this.popup.destroy(),c=this.popup=n(s).appendTo(h).eq(0).on("click",r+f.button,function(t){t.preventDefault(),c.close();var i=n(t.currentTarget).index();o[i].click()}).kendoWindow({modal:!0,resizable:!1,draggable:!1,title:t.title,visible:!1,deactivate:function(){this.destroy(),h.focus()}}).getKendoWindow(),c.center().open()},_createPopupEditor:function(t){var o,p,s=this,w={},v=this.options.messages,l=u.styles,a=l.popup,c=i.format('<div {0}="{1}" class="{2} {3}"><div class="{4}">',i.attr("uid"),t.uid,a.form,a.editForm,a.formContainer),b=this.fields(ot.desktop,t),y=[];return c+=this._buildEditTemplate(t,b,y),c+='<div class="'+a.buttonsContainer+'">',c+=this.createButton({name:"update",text:v.save,className:u.styles.primary}),c+=this.createButton({name:"cancel",text:v.cancel}),s.options.editable.destroy!==!1&&(c+=this.createButton({name:"delete",text:v.destroy})),c+="</div></div></div>",o=this.container=n(c).appendTo(this.element).eq(0).kendoWindow(e({modal:!0,resizable:!1,draggable:!0,title:v.editor.editorTitle,visible:!1,close:function(n){n.userTriggered&&s.trigger("cancel",{container:o,model:t})&&n.preventDefault()}},w)),p=o.kendoEditable({fields:y,model:t,clearContainer:!1,validateOnBlur:!0,target:s.options.target}).data("kendoEditable"),i.cycleForm(o),this.trigger("edit",{container:o,model:t})?s.trigger("cancel",{container:o,model:t}):(o.data("kendoWindow").center().open(),o.on(h+f,r+l.buttonCancel,function(n){n.preventDefault(),n.stopPropagation(),s.trigger("cancel",{container:o,model:t})}),o.on(h+f,r+l.buttonSave,function(n){var u,f,r,i,e;for(n.preventDefault(),n.stopPropagation(),u=s.fields(ot.desktop,t),f={},i=0,e=u.length;i<e;i++)r=u[i].field,f[r]=t.get(r);s.trigger("save",{container:o,model:t,updateInfo:f})}),o.on(h+f,r+l.buttonDelete,function(n){n.preventDefault(),n.stopPropagation(),s.trigger("remove",{container:o,model:t})})),p}}),st=a.extend({init:function(n,t){a.fn.init.call(this,n,t),this.wrapper=this.element,this.model=this.options.model,this.resourcesField=this.options.resourcesField,this.createButton=this.options.createButton,this._initContainer(),this._attachHandlers()},events:["save"],open:function(){this.window.center().open()},close:function(){this.window.bind("deactivate",o(this.destroy,this)).close()},destroy:function(){this._dettachHandlers(),this.grid.destroy(),this.grid=null,this.window.destroy(),this.window=null,a.fn.destroy.call(this),i.destroy(this.wrapper),this.element=this.wrapper=null},_attachHandlers:function(){var e=u.styles,t=this.grid,s=this._cancelProxy=o(this._cancel,this);this.container.on(h+f,r+e.buttonCancel,this._cancelProxy),this._saveProxy=o(this._save,this),this.container.on(h+f,r+e.buttonSave,this._saveProxy),this.window.bind("close",function(n){n.userTriggered&&s(n)}),t.wrapper.on(h+f,"input[type='checkbox']",function(){var r=n(this),e=n(r).closest("tr"),f=t.dataSource.getByUid(e.attr(i.attr("uid"))),u=n(r).is(":checked")?1:"";f.set("value",u)})},_dettachHandlers:function(){this._cancelProxy=null,this._saveProxy=null,this.container.off(f),this.grid.wrapper.off()},_cancel:function(n){n.preventDefault(),this.close()},_save:function(n){n.preventDefault(),this._updateModel(),this.wrapper.is(r+u.styles.popup.resourcesField)||this.trigger("save",{container:this.wrapper,model:this.model}),this.close()},_initContainer:function(){var e=this,t=u.styles.popup,f=i.format('<div class="{0} {1}"><div class="{2} {3}"/></div>"',t.form,t.editForm,t.formContainer,t.resourcesFormContainer);f=n(f),this.container=f.find(r+t.resourcesFormContainer),this.window=f.kendoWindow({modal:!0,resizable:!1,draggable:!0,visible:!1,title:this.options.messages.resourcesEditorTitle,open:function(){e.grid.resize(!0)}}).data("kendoWindow"),this._resourceGrid(),this._createButtons()},_resourceGrid:function(){var u=this,t=this.options.messages,r=n('<div id="resources-grid"/>').appendTo(this.container);this.grid=new i.ui.Grid(r,{columns:[{field:"name",title:t.resourcesHeader,template:"<label><input type='checkbox' value='#=name#'# if (value > 0 && value !== null) {#checked='checked'# } #/>#=name#</labe>"},{field:"value",title:t.unitsHeader,template:function(n){var r=n.format,t=null!==n.value?n.value:"";return r?i.toString(t,r):t}}],height:280,sortable:!0,editable:!0,filterable:!0,dataSource:{data:u.options.data,schema:{model:{id:"id",fields:{id:{from:"id"},name:{from:"name",type:"string",editable:!1},value:{from:"value",type:"number",defaultValue:""},format:{from:"format",type:"string"}}}}},save:function(n){var t=!!n.values.value;n.container.parent().find("input[type='checkbox']").prop("checked",t)}})},_createButtons:function(){for(var r=this.options.buttons,t='<div class="'+u.styles.popup.buttonsContainer+'">',n=0,i=r.length;n<i;n++)t+=this.createButton(r[n]);t+="</div>",this.container.append(t)},_updateModel:function(){for(var i,u=[],t=this.grid.dataSource.data(),n=0,r=t.length;n<r;n++)i=t[n].get("value"),null!==i&&i>0&&u.push(t[n]);this.model[this.resourcesField]=u}}),u=a.extend({init:function(n,t,r){w(t)&&(t={dataSource:t}),b={append:{text:"Add Task",action:"add",className:u.styles.toolbar.appendButton,iconClass:u.styles.toolbar.iconPlus},pdf:{text:"Export to PDF",className:u.styles.toolbar.pdfButton,iconClass:u.styles.toolbar.iconPdf}},a.fn.init.call(this,n,t),r&&(this._events=r),this._wrapper(),this._resources(),this.options.views&&this.options.views.length||(this.options.views=["day","week","month"]),this._timeline(),this._toolbar(),this._footer(),this._adjustDimensions(),this._preventRefresh=!0,this.view(this.timeline._selectedViewName),this._preventRefresh=!1,this._dataSource(),this._assignments(),this._dropDowns(),this._list(),this._dependencies(),this._resizable(),this._scrollable(),this._dataBind(),this._attachEvents(),this._createEditor(),i.notify(this)},events:["dataBinding","dataBound","add","edit","remove","cancel","save","change","navigate","moveStart","move","moveEnd","resizeStart","resize","resizeEnd","columnResize"],options:{name:"Gantt",autoBind:!0,navigatable:!1,selectable:!0,editable:!0,resizable:!1,columnResizeHandleWidth:hi,columns:[],views:[],dataSource:{},dependencies:{},resources:{},assignments:{},taskTemplate:null,messages:{save:"Save",cancel:"Cancel",destroy:"Delete",deleteTaskConfirmation:pi,deleteDependencyConfirmation:wi,deleteTaskWindowTitle:"Delete task",deleteDependencyWindowTitle:"Delete dependency",views:{day:"Day",week:"Week",month:"Month",year:"Year",start:"Start",end:"End"},actions:{append:"Add Task",addChild:"Add Child",insertBefore:"Add Above",insertAfter:"Add Below",pdf:"Export to PDF"},editor:{editorTitle:"Task",resourcesEditorTitle:"Resources",title:"Title",start:"Start",end:"End",percentComplete:"Complete",resources:"Resources",assignButton:"Assign",resourcesHeader:"Resources",unitsHeader:"Units"}},showWorkHours:!0,showWorkDays:!0,toolbar:null,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,hourSpan:1,snap:!0,height:600,listWidth:"30%",rowHeight:null},select:function(n){var i=this.list;return n?(i.select(n),t):i.select()},clearSelection:function(){this.list.clearSelection()},destroy:function(){a.fn.destroy.call(this),this.dataSource&&(this.dataSource.unbind("change",this._refreshHandler),this.dataSource.unbind("progress",this._progressHandler),this.dataSource.unbind("error",this._errorHandler)),this.dependencies&&(this.dependencies.unbind("change",this._dependencyRefreshHandler),this.dependencies.unbind("error",this._dependencyErrorHandler)),this.timeline&&(this.timeline.unbind(),this.timeline.destroy()),this.list&&(this.list.unbind(),this.list.destroy()),this.footerDropDown&&this.footerDropDown.destroy(),this.headerDropDown&&this.headerDropDown.destroy(),this._editor&&this._editor.destroy(),this._resizeDraggable&&this._resizeDraggable.destroy(),this.toolbar.off(f),ht&&(this._mediaQuery.removeListener(this._mediaQueryHandler),this._mediaQuery=null),n(window).off("resize"+f,this._resizeHandler),n(this.wrapper).off(f),this.toolbar=null,this.footer=null},setOptions:function(t){var u,r=i.deepExtend({},this.options,t),f=this._events;t.views||(u=this.view().name,r.views=n.map(this.options.views,function(n){var t=y(n),i=t?"string"!=typeof n.type?n.title:n.type:n;return u===i?t?n.selected=!0:n={type:i,selected:!0}:t&&(n.selected=!1),n})),t.dataSource||(r.dataSource=this.dataSource),t.dependencies||(r.dependencies=this.dependencies),t.resources||(r.resources=this.resources),t.assignments||(r.assignments=this.assignments),this.destroy(),this.element.empty(),this.options=null,this.init(this.element,r,f),a.fn._setEvents.call(this,r)},_attachEvents:function(){this._resizeHandler=o(this.resize,this,!1),n(window).on("resize"+f,this._resizeHandler)},_wrapper:function(){var n=u.styles,e=[n.icon,n.resizeHandle].join(" "),t=this.options,f=t.height,i=t.width;this.wrapper=this.element.addClass(n.wrapper).append("<div class='"+n.listWrapper+"'><div></div></div>").append("<div class='"+n.splitBarWrapper+"'><div class='"+e+"'></div></div>").append("<div class='"+n.timelineWrapper+"'><div></div></div>"),this.wrapper.find(r+n.list).width(t.listWidth),f&&this.wrapper.height(f),i&&this.wrapper.width(i),t.rowHeight&&this.wrapper.addClass(n.rowHeight)},_toolbar:function(){var v,l,p,e=this,t=u.styles,d=r+t.toolbar.views+" > li",g=r+t.toolbar.pdfButton,nt=r+t.buttonToggle,y=r+t.gridContent,c=n(r+t.list),a=n(r+t.timeline),w=t.hovered,s=this.options.toolbar,b=n("<div class='"+t.toolbar.actions+"'>"),k=function(n){n.matches?c.css({display:"none","max-width":0}):(c.css({display:"inline-block",width:"30%","max-width":"none"}),a.css("display","inline-block"),e.refresh(),a.find(y).scrollTop(e.scrollTop)),e._resize()};ki(s)||(s=typeof s===ut?s:this._actions(s),s=o(i.template(s),this)),p=n(bi({styles:t.toolbar})),l=n(ni({ns:i.ns,views:this.timeline.views,styles:t.toolbar})),b.append(s({})),v=n("<div class='"+t.toolbar.headerWrapper+"'>").append(p).append(l).append(b),l.find("li").length>1&&l.prepend(ti({styles:t.toolbar})),this.wrapper.prepend(v),this.toolbar=v,ht&&(this._mediaQueryHandler=o(k,this),this._mediaQuery=window.matchMedia("(max-width: 480px)"),this._mediaQuery.addListener(this._mediaQueryHandler)),v.on(h+f,d,function(u){var s,o,f;u.preventDefault(),s=e.list,o=n(this).attr(i.attr("name")),f=l.find(r+t.toolbar.currentView),f.is(":visible")&&f.parent().toggleClass(t.toolbar.expanded),s.editable&&s.editable.trigger("validate")||e.trigger("navigate",{view:o})||e.view(o)}).on(h+f,g,function(n){n.preventDefault(),e.saveAsPDF()}).on(h+f,nt,function(n){n.preventDefault(),c.is(":visible")?(c.css({display:"none",width:"0"}),a.css({display:"inline-block",width:"100%"}),e.refresh(),a.find(y).scrollTop(e.scrollTop)):(a.css({display:"none",width:0}),c.css({display:"inline-block",width:"100%","max-width":"none"}).find(y).scrollTop(e.scrollTop)),e._resize()}),this.wrapper.find(r+t.toolbar.toolbar+" li").hover(function(){n(this).addClass(w)},function(){n(this).removeClass(w)})},_actions:function(){var t,u,r=this.options,f=r.editable,n=r.toolbar,i="";if(!w(n)){if(!f||f.create===!1)return i;n=["append"]}for(t=0,u=n.length;t<u;t++)i+=this._createButton(n[t]);return i},_footer:function(){var t,s,h,o,r,f=this.options.editable;f&&f.create!==!1&&(t=u.styles.toolbar,s=this.options.messages.actions,h=n(i.template(at)(e(!0,{styles:t},b.append,{text:s.append}))),o=n("<div class='"+t.actions+"'>").append(h),r=n("<div class='"+t.footerWrapper+"'>").append(o),this.wrapper.append(r),this.footer=r)},_createButton:function(n){var s=n.template||at,f=this.options.messages.actions,t=typeof n===ut?n:n.name||n.text,o=b[t]?b[t].className:"k-gantt-"+(t||"").replace(/\s/g,""),r={iconClass:"",action:"",text:t,className:o,styles:u.styles.toolbar};if(!(t||y(n)&&n.template))throw Error("Custom commands should have name specified");return r=e(!0,r,b[t],{text:f[t]}),y(n)&&(n.className&&ai(r.className,n.className.split(" "))<0&&(n.className+=" "+r.className),r=e(!0,r,n)),i.template(s)(r)},_adjustDimensions:function(){var n=this.element,f=u.styles,e=r+f.list,s=r+f.timeline,h=r+f.splitBar,c=gt(this.toolbar),a=this.footer?gt(this.footer):0,l=n.height(),i=n.width(),t=p(n.find(h)),o=p(n.find(e));n.children([e,s,h].join(",")).height(l-(c+a)).end().children(s).width(i-(t+o)),i<o+t&&n.find(e).width(i-t)},_scrollTo:function(n){var u,t,r=this.timeline.view(),o=this.list,s=i.attr("uid"),f="string"==typeof n?n:n.closest("tr"+c()).attr(s),e=function(){0!==t.length&&u()};r.content.is(":visible")?(t=r.content.find(c(f)),u=function(){r._scrollTo(t)}):(t=o.content.find(c(f)),u=function(){t.get(0).scrollIntoView()}),e()},_dropDowns:function(){var n=this,f=r+u.styles.toolbar.actions,e=this.options.messages.actions,o=this.timeline,t=this.options.editable,i=function(t){var r,e=t.type,c=n.dataSource,i=c._createNewModel(),f=n.dataItem(n.select()),l=c.taskParent(f),h=o.view()._timeSlots()[0],u="add"===e?f:l,s=n.list.editable;s&&s.trigger("validate")||(i.set("title","New task"),u?(i.set("parentId",u.get("id")),i.set("start",u.get("start")),i.set("end",u.get("end"))):(i.set("start",h.start),i.set("end",h.end)),"add"!==e&&(r=f.get("orderId"),r="insert-before"===e?r:r+1),n._createTask(i,r))};t&&t.create!==!1&&(this.footerDropDown=new kt(this.footer.children(f).eq(0),{messages:{actions:e},direction:"up",animation:{open:{effects:"slideIn:up"}},navigatable:n.options.navigatable}),this.headerDropDown=new kt(this.toolbar.children(f).eq(0),{messages:{actions:e},navigatable:n.options.navigatable}),this.footerDropDown.bind("command",i),this.headerDropDown.bind("command",i))},_list:function(){for(var t,n=this,v=n.options.navigatable,l=u.styles,a=this.wrapper.find(r+l.list),y=a.find("> div"),s=this.wrapper.find(r+l.toolbar.actions+" > button"),e={columns:this.options.columns||[],dataSource:this.dataSource,selectable:this.options.selectable,editable:this.options.editable,resizable:this.options.resizable,columnResizeHandleWidth:this.options.columnResizeHandleWidth,listWidth:p(a),resourcesField:this.resources.field,rowHeight:this.options.rowHeight},c=e.columns,h=function(){v&&(n._current(n._cachedCurrent),tt(n.list.content.find("table"),!0)),delete n._cachedCurrent},f=0;f<c.length;f++)t=c[f],t.field===this.resources.field&&"function"!=typeof t.editor&&(t.editor=o(this._createResourceEditor,this));this.list=new i.ui.GanttList(y,e),this.list.bind("render",function(){n._navigatable()},!0).bind("edit",function(t){n._cachedCurrent=t.cell,n.trigger("edit",{task:t.model,container:t.cell})&&t.preventDefault()}).bind("cancel",function(t){n.trigger("cancel",{task:t.model,container:t.cell})&&t.preventDefault(),h()}).bind("update",function(t){n._updateTask(t.task,t.updateInfo),h()}).bind("change",function(){n.trigger("change");var t=n.list.select();t.length?(s.removeAttr("data-action","add"),n.timeline.select("[data-uid='"+t.attr("data-uid")+"']")):(s.attr("data-action","add"),n.timeline.clearSelection())}).bind("columnResize",function(t){n.trigger("columnResize",{column:t.column,oldWidth:t.oldWidth,newWidth:t.newWidth})})},_timeline:function(){var n=this,f=u.styles,h=ei(e(!0,{resourcesField:this.resources.field},this.options)),s=this.wrapper.find(r+f.timeline+" > div"),o=r+f.toolbar.currentView+" > "+r+f.toolbar.link;this.timeline=new i.ui.GanttTimeline(s,h),this.timeline.bind("navigate",function(t){var u=t.view.replace(/\./g,"\\.").toLowerCase(),i=n.toolbar.find(r+f.toolbar.views+" > li").removeClass(f.selected).end().find(r+f.toolbar.viewButton+"-"+u).addClass(f.selected).find(r+f.toolbar.link).text();n.toolbar.find(o).text(i),n.refresh()}).bind("moveStart",function(i){var r=n.list.editable;return r&&r.trigger("validate")?(i.preventDefault(),t):(n.trigger("moveStart",{task:i.task})&&i.preventDefault(),t)}).bind("move",function(t){var r=t.task,i=t.start,u=new Date(i.getTime()+r.duration());n.trigger("move",{task:r,start:i,end:u})&&t.preventDefault()}).bind("moveEnd",function(t){var r=t.task,i=t.start,u=new Date(i.getTime()+r.duration());n.trigger("moveEnd",{task:r,start:i,end:u})||n._updateTask(n.dataSource.getByUid(r.uid),{start:i,end:u})}).bind("resizeStart",function(i){var r=n.list.editable;return r&&r.trigger("validate")?(i.preventDefault(),t):(n.trigger("resizeStart",{task:i.task})&&i.preventDefault(),t)}).bind("resize",function(t){n.trigger("resize",{task:t.task,start:t.start,end:t.end})&&t.preventDefault()}).bind("resizeEnd",function(t){var r=t.task,i={};t.resizeStart?i.start=t.start:i.end=t.end,n.trigger("resizeEnd",{task:r,start:t.start,end:t.end})||n._updateTask(n.dataSource.getByUid(r.uid),i)}).bind("percentResizeStart",function(t){var i=n.list.editable;i&&i.trigger("validate")&&t.preventDefault()}).bind("percentResizeEnd",function(t){n._updateTask(n.dataSource.getByUid(t.task.uid),{percentComplete:t.percentComplete})}).bind("dependencyDragStart",function(t){var i=n.list.editable;i&&i.trigger("validate")&&t.preventDefault()}).bind("dependencyDragEnd",function(t){var i=n.dependencies._createNewModel({type:t.type,predecessorId:t.predecessor.id,successorId:t.successor.id});n._createDependency(i)}).bind("select",function(t){var i=n.list.editable;i&&i.trigger("validate"),n.select("[data-uid='"+t.uid+"']")}).bind("editTask",function(t){var i=n.list.editable;i&&i.trigger("validate")||n.editTask(t.uid)}).bind("clear",function(){n.clearSelection()}).bind("removeTask",function(t){var i=n.list.editable;i&&i.trigger("validate")||n.removeTask(n.dataSource.getByUid(t.uid))}).bind("removeDependency",function(t){var i=n.list.editable;i&&i.trigger("validate")||n.removeDependency(n.dependencies.getByUid(t.uid))})},_dataSource:function(){var t=this.options,n=t.dataSource;n=w(n)?{data:n}:n,this.dataSource&&this._refreshHandler?this.dataSource.unbind("change",this._refreshHandler).unbind("progress",this._progressHandler).unbind("error",this._errorHandler):(this._refreshHandler=o(this.refresh,this),this._progressHandler=o(this._requestStart,this),this._errorHandler=o(this._error,this)),this.dataSource=i.data.GanttDataSource.create(n).bind("change",this._refreshHandler).bind("progress",this._progressHandler).bind("error",this._errorHandler)},_dependencies:function(){var n=this.options.dependencies||{},t=w(n)?{data:n}:n;this.dependencies&&this._dependencyRefreshHandler?this.dependencies.unbind("change",this._dependencyRefreshHandler).unbind("error",this._dependencyErrorHandler):(this._dependencyRefreshHandler=o(this.refreshDependencies,this),this._dependencyErrorHandler=o(this._error,this)),this.dependencies=i.data.GanttDependencyDataSource.create(t).bind("change",this._dependencyRefreshHandler).bind("error",this._dependencyErrorHandler)},_resources:function(){var n=this.options.resources,t=n.dataSource||{};this.resources={field:"resources",dataTextField:"name",dataColorField:"color",dataFormatField:"format"},e(this.resources,n),this.resources.dataSource=i.data.DataSource.create(t)},_assignments:function(){var n=this.options.assignments,t=n.dataSource||{};this.assignments?this.assignments.dataSource.unbind("change",this._assignmentsRefreshHandler):this._assignmentsRefreshHandler=o(this.refresh,this),this.assignments={dataTaskIdField:"taskId",dataResourceIdField:"resourceId",dataValueField:"value"},e(this.assignments,n),this.assignments.dataSource=i.data.DataSource.create(t),this.assignments.dataSource.bind("change",this._assignmentsRefreshHandler)},_createEditor:function(){var n=this,i=this._editor=new lt(this.wrapper,e({},this.options,{target:this,resources:{field:this.resources.field,editor:o(this._createResourceEditor,this)},createButton:o(this._createPopupButton,this)}));i.bind("cancel",function(i){var r=n.dataSource.getByUid(i.model.uid);return n.trigger("cancel",{container:i.container,task:r})?(i.preventDefault(),t):(n.cancelTask(),t)}).bind("edit",function(t){var i=n.dataSource.getByUid(t.model.uid);n.trigger("edit",{container:t.container,task:i})&&t.preventDefault()}).bind("save",function(t){var i=n.dataSource.getByUid(t.model.uid);n.saveTask(i,t.updateInfo)}).bind("remove",function(t){n.removeTask(t.model.uid)}).bind("close",n._onDialogClose)},_onDialogClose:function(){},_createResourceEditor:function(n,t){var f=this,s=t instanceof wt?t:t.model,c=s.get("id"),i=this.options.messages,r=f.resources.field,h=this._resourceEditor=new st(n,{resourcesField:r,data:this._wrapResourceData(c),model:s,messages:e({},i.editor),buttons:[{name:"update",text:i.save,className:u.styles.primary},{name:"cancel",text:i.cancel}],createButton:o(this._createPopupButton,this),save:function(n){f._updateAssignments(n.model.get("id"),n.model.get(r))}});h.open()},_createPopupButton:function(n){var r=n.name||n.text,t={className:u.styles.popup.button+" k-gantt-"+(r||"").replace(/\s/g,""),text:r,attr:""};if(!(r||y(n)&&n.template))throw Error("Custom commands should have name specified");return y(n)&&(n.className&&(n.className+=" "+t.className),t=e(!0,t,n)),i.template(ri)(t)},view:function(n){return this.timeline.view(n)},range:function(n){var r=this.dataSource,t=this.view(),i=this.timeline;return n&&(t.options.range={start:n.start,end:n.end},i._render(r.taskTree()),i._renderDependencies(this.dependencies.view())),{start:t.start,end:t.end}},date:function(n){var t=this.view();return n&&(t.options.date=n,t._scrollToDate(n)),t.options.date},dataItem:function(n){var t,i;return n?(t=this.list,i=t.content.find(n),t._modelFromElement(i)):null},setDataSource:function(n){this.options.dataSource=n,this._dataSource(),this.list._setDataSource(this.dataSource),this.options.autoBind&&n.fetch()},setDependenciesDataSource:function(n){this.options.dependencies=n,this._dependencies(),this.options.autoBind&&n.fetch()},items:function(){return this.wrapper.children(".k-task")},_updateAssignments:function(n,t){for(var u,f,h,i,s,r,c,a=this.assignments.dataSource,v=this.assignments.dataTaskIdField,y=this.assignments.dataResourceIdField,e=!1,o=new l(a.view()).filter({field:v,operator:"eq",value:n}).toArray();o.length;){for(u=o[0],i=0,s=t.length;i<s;i++)if(f=t[i],u.get(y)===f.get("id")){h=t[i].get("value"),this._updateAssignment(u,h),t.splice(i,1),e=!0;break}e||this._removeAssignment(u),e=!1,o.shift()}for(r=0,c=t.length;r<c;r++)f=t[r],this._createAssignment(f,n);a.sync()},cancelTask:function(){var n=this._editor,t=n.container;t&&n.close()},editTask:function(n){var i,t="string"==typeof n?this.dataSource.getByUid(n):n;t&&(i=this.dataSource._createNewModel(t.toJSON()),i.uid=t.uid,this.cancelTask(),this._editTask(i))},_editTask:function(n){this._editor.editTask(n)},saveTask:function(n,t){var r=this._editor,u=r.container,i=r.editable;u&&i&&i.end()&&this._updateTask(n,t)},_updateTask:function(n,t){var i=this.resources.field;this.trigger("save",{task:n,values:t})||(this._preventRefresh=!0,this.dataSource.update(n,t),t[i]&&this._updateAssignments(n.get("id"),t[i]),this._syncDataSource())},_updateAssignment:function(n,t){var i=this.assignments.dataValueField;n.set(i,t)},removeTask:function(n){var i=this,t="string"==typeof n?this.dataSource.getByUid(n):n;t&&this._taskConfirm(function(n){n||i._removeTask(t)},t)},_createTask:function(n,i){if(!this.trigger("add",{task:n,dependency:null})){var r=this.dataSource;this._preventRefresh=!0,i===t?r.add(n):r.insert(i,n),this._scrollToUid=n.uid,this._syncDataSource()}},_createDependency:function(n){this.trigger("add",{task:null,dependency:n})||(this._preventDependencyRefresh=!0,this.dependencies.add(n),this._preventDependencyRefresh=!1,this.dependencies.sync())},_createAssignment:function(n,t){var r=this.assignments,u=r.dataSource,o=r.dataTaskIdField,f=r.dataResourceIdField,e=r.dataValueField,i=u._createNewModel();i[o]=t,i[f]=n.get("id"),i[e]=n.get("value"),u.add(i)},removeDependency:function(n){var i=this,t="string"==typeof n?this.dependencies.getByUid(n):n;t&&this._dependencyConfirm(function(n){n||i._removeDependency(t)},t)},_removeTaskDependencies:function(n,t){this._preventDependencyRefresh=!0;for(var i=0,r=t.length;i<r;i++)this.dependencies.remove(t[i]);this._preventDependencyRefresh=!1,this.dependencies.sync()},_removeTaskAssignments:function(n){var i,u,r=this.assignments.dataSource,t=r.view(),f={field:this.assignments.dataTaskIdField,operator:"eq",value:n.get("id")};for(t=new l(t).filter(f).toArray(),this._preventRefresh=!0,i=0,u=t.length;i<u;i++)r.remove(t[i]);this._preventRefresh=!1,r.sync()},_removeTask:function(n){var t=this.dependencies.dependencies(n.id);this.trigger("remove",{task:n,dependencies:t})||(this._removeTaskDependencies(n,t),this._removeTaskAssignments(n),this._preventRefresh=!0,this.dataSource.remove(n)&&this._syncDataSource(),this._preventRefresh=!1)},_removeDependency:function(n){this.trigger("remove",{task:null,dependencies:[n]})||this.dependencies.remove(n)&&this.dependencies.sync()},_removeAssignment:function(n){this.assignments.dataSource.remove(n)},_taskConfirm:function(n,t){var i=this.options.messages;this._confirm(n,{model:t,text:i.deleteTaskConfirmation,title:i.deleteTaskWindowTitle})},_dependencyConfirm:function(n,t){var i=this.options.messages;this._confirm(n,{model:t,text:i.deleteDependencyConfirmation,title:i.deleteDependencyWindowTitle})},_confirm:function(n,t){var i,f,r=this.options.editable;r===!0||r.confirmation!==!1?(i=this.options.messages,f=[{name:"delete",text:i.destroy,className:u.styles.primary,click:function(){n()}},{name:"cancel",text:i.cancel,click:function(){n(!0)}}],this.showDialog(e(!0,{},t,{buttons:f}))):n()},showDialog:function(n){this._editor.showDialog(n)},refresh:function(){var f,r,n,e,u,t;this._preventRefresh||this.list.editable||(this._progress(!1),f=this.dataSource,r=f.taskTree(),n=this._scrollToUid,t=-1,this.current&&(u=this.current.closest("tr").attr(i.attr("uid")),t=this.current.index()),this.trigger("dataBinding")||(0!==this.resources.dataSource.data().length&&this._assignResources(r),this._editor&&this._editor.close(),this.clearSelection(),this.list._render(r),this.timeline._render(r),this.timeline._renderDependencies(this.dependencies.view()),n&&(this._scrollTo(n),this.select(c(n))),(n||u)&&t>=0&&(e=this.list.content.find("tr"+c(n||u)+" > td:eq("+t+")"),this._current(e)),this._scrollToUid=null,this.trigger("dataBound")))},refreshDependencies:function(){this._preventDependencyRefresh||this.trigger("dataBinding")||(this.timeline._renderDependencies(this.dependencies.view()),this.trigger("dataBound"))},_assignResources:function(n){for(var t=this.resources,r=this.assignments,h=function(){var n=r.dataSource.view(),t={field:r.dataTaskIdField};return n=new l(n).group(t).toArray()},f=h(),s=function(n,r){var u,e,o=n.get("id");for(i.setter(t.field)(n,new vi([])),u=0,e=f.length;u<e;u++)f[u].value===o&&r(n,f[u].items)},o=function(n,u){for(var f,e,s,a,h,c,o=0,l=u.length;o<l;o++)f=u[o],e=t.dataSource.get(f.get(r.dataResourceIdField)),s=f.get(r.dataValueField),a=f.get(r.dataResourceIdField),h=e.get(t.dataFormatField)||rt,c=i.toString(s,h),n[t.field].push(new wt({id:a,name:e.get(t.dataTextField),color:e.get(t.dataColorField),value:s,formatedValue:c}))},u=0,e=n.length;u<e;u++)s(n[u],o)},_wrapResourceData:function(n){for(var i,t=this,f=[],u=this.resources.dataSource.view(),h=this.assignments.dataSource.view(),s=new l(h).filter({field:t.assignments.dataTaskIdField,operator:"eq",value:n}).toArray(),o=function(n){var i=null;return new l(s).filter({field:t.assignments.dataResourceIdField,operator:"eq",value:n}).select(function(n){i+=n.get(t.assignments.dataValueField)}),i},r=0,e=u.length;r<e;r++)i=u[r],f.push({id:i.get("id"),name:i.get(t.resources.dataTextField),format:i.get(t.resources.dataFormatField)||rt,value:o(i.id)});return f},_syncDataSource:function(){this._preventRefresh=!1,this._requestStart(),this.dataSource.sync()},_requestStart:function(){this._progress(!0)},_error:function(){this._progress(!1)},_progress:function(n){i.ui.progress(this.element,n)},_resizable:function(){var o,h,c,a=this,e=this.wrapper,t=u.styles,l=r+t.gridContent,s=e.find(r+t.list),f=e.find(r+t.timeline);this._resizeDraggable=e.find(r+t.splitBar).height(s.height()).hover(function(){n(this).addClass(t.splitBarHover)},function(){n(this).removeClass(t.splitBarHover)}).end().kendoResizable({orientation:"horizontal",handle:r+t.splitBar,start:function(){o=s.width(),h=f.width(),c=f.find(l).scrollLeft()},resize:function(n){var t=n.x.initialDelta;i.support.isRtl(e)&&(t*=-1),o+t<0||h-t<0||(s.width(o+t),f.width(h-t),f.find(l).scrollLeft(c+t),a.timeline.view()._renderCurrentTime())}}).data("kendoResizable")},_scrollable:function(){var c=this,s=u.styles,h=r+s.gridContent,o=r+s.gridHeaderWrap,a=this.timeline.element.find(o),t=this.timeline.element.find(h),l=this.list.element.find(o),e=this.list.element.find(h);yi&&e.css("overflow-y","auto"),t.on("scroll",function(){c.scrollTop=this.scrollTop,a.scrollLeft(this.scrollLeft),e.scrollTop(this.scrollTop)}),e.on("scroll",function(){l.scrollLeft(this.scrollLeft)}).on("DOMMouseScroll"+f+" mousewheel"+f,function(r){var e=t.scrollTop(),u=i.wheelDeltaY(r);u&&(r.preventDefault(),n(r.currentTarget).one("wheel"+f,!1),t.scrollTop(e+-u))})},_navigatable:function(){var g,e=this,a=this.options.navigatable,ft=this.options.editable,v=this.list.header.find("table"),l=this.list.content.find("table"),d=u.styles,h=i.support.isRtl(this.wrapper),nt=this.timeline.element.find(r+d.gridContent),ut=v.add(l),rt=c(),o={collapse:!1,expand:!0},p=function(n){var t=e.timeline.view()._timeSlots()[0].offsetWidth;nt.scrollLeft(nt.scrollLeft()+(n?-t:t))},w=function(n){var i=e.current.parent("tr"+c()),r=e.current.index(),t=i[n]();0!==e.select().length&&e.clearSelection(),0!==t.length?(e._current(t.children("td:eq("+r+")")),e._scrollTo(e.current)):e.current.is("td")&&"prev"==n?tt(v):e.current.is("th")&&"next"==n&&tt(l)},k=function(n){var t=e.current[n]();0!==t.length&&(e._current(t),g=e.current.index())},b=function(n){var t=e.dataItem(e.current);t.summary&&t.expanded!==n&&t.set("expanded",n)},y=function(){var n,r,t=e.options.editable;t&&t.destroy!==!1&&!e.list.editable&&(n=e.select(),r=i.attr("uid"),n.length&&e.removeTask(n.attr(r)))};return n(this.wrapper).on("mousedown"+f,"tr"+rt+", div"+rt+":not("+r+d.line+")",function(t){var u,r=n(t.currentTarget),f=n(t.target).is(":button,a,:input,a>.k-icon,textarea,span.k-icon,span.k-link,.k-input,.k-multiselect-wrap");t.ctrlKey||(a&&(u=r.is("tr")?n(t.target).closest("td"):e.list.content.find("tr"+c(r.attr(i.attr("uid")))+" > td:first"),e._current(u)),!a&&!ft||f||(e._focusTimeout=setTimeout(function(){tt(e.list.content.find("table"),!0)},2)))}),a!==!0?(l.on("keydown"+f,function(n){n.keyCode==s.DELETE&&y()}),t):(ut.on("focus"+f,function(){var r=this===l.get(0)?"td":"th",t=e.select(),i=e.current||n(t.length?t:this).find(r+":eq("+(g||0)+")");e._current(i)}).on("blur"+f,function(){e._current(),this==v&&n(this).attr(it,-1)}).on("keydown"+f,function(t){var r,i=t.keyCode;if(e.current)switch(r=e.current.is("td"),i){case s.RIGHT:t.preventDefault(),t.altKey?p():t.ctrlKey?b(h?o.collapse:o.expand):k(h?"prev":"next");break;case s.LEFT:t.preventDefault(),t.altKey?p(!0):t.ctrlKey?b(h?o.expand:o.collapse):k(h?"next":"prev");break;case s.UP:t.preventDefault(),w("prev");break;case s.DOWN:t.preventDefault(),w("next");break;case s.SPACEBAR:t.preventDefault(),r&&e.select(e.current.closest("tr"));break;case s.ENTER:t.preventDefault(),r?e.options.editable&&e.options.editable.update!==!1&&(e._cachedCurrent=e.current,e.list._startEditHandler(e.current),n(this).one("keyup",function(n){n.stopPropagation()})):e.current.children("a.k-link").click();break;case s.ESC:t.stopPropagation();break;case s.DELETE:r&&y();break;default:i>=49&&i<=57&&e.view(e.timeline._viewByIndex(i-49))}}),t)},_current:function(t){var r,f=u.styles;this.current&&this.current.length&&this.current.removeClass(f.focused).removeAttr("id"),t&&t.length?(this.current=t.addClass(f.focused).attr("id",bt),r=n(i._activeElement()),r.is("table")&&this.wrapper.find(r).length>0&&r.removeAttr(d).attr(d,bt)):this.current=null},_dataBind:function(){var i,t=this;t.options.autoBind&&(this._preventRefresh=!0,this._preventDependencyRefresh=!0,i=n.map([this.dataSource,this.dependencies,this.resources.dataSource,this.assignments.dataSource],function(n){return n.fetch()}),n.when.apply(null,i).done(function(){t._preventRefresh=!1,t._preventDependencyRefresh=!1,t.refresh()}))},_resize:function(){this._adjustDimensions(),this.timeline.view()._adjustHeight(),this.timeline.view()._renderCurrentTime(),this.list._adjustHeight()}}),i.PDFMixin&&(i.PDFMixin.extend(u.fn),u.fn._drawPDF=function(){var i=u.styles,t="."+i.list,r=this.wrapper.find(t).width(),n=this.wrapper.clone();return n.find(t).css("width",r),this._drawPDFShadow({content:n},{avoidLinks:this.options.pdf.avoidLinks})}),i.ui.plugin(u),e(!0,u,{styles:fi})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.treelist.min",["kendo.dom.min","kendo.data.min","kendo.columnsorter.min","kendo.editable.min","kendo.window.min","kendo.filtermenu.min","kendo.selectable.min","kendo.resizable.min","kendo.treeview.draganddrop.min"],n)}(function(){return function(n,t){function g(n){return function(t){return t[n]}}function hi(n){return function(t){return!n(t)}}function ir(){return"none"!==this.style.display}function gi(i){var f,u=i.find(">tr:not(.k-filter-row)"),e=function(){var t=n(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},r=n();return u.length>1&&(r=u.find("th").filter(e).filter(function(){return this.rowSpan>1})),r=r.add(u.last().find("th").filter(e)),f=kendo.attr("index"),r.sort(function(i,r){var e,u;return i=n(i),r=n(r),e=i.attr(f),u=r.attr(f),e===t&&(e=n(i).index()),u===t&&(u=n(r).index()),e=parseInt(e,10),u=parseInt(u,10),e>u?1:e<u?-1:0}),r}function li(n){for(var i=[],u=n.className,t=0,r=n.level;t<r;t++)i.push(o("span",{className:u}));return i}function si(n){for(var i,r=0,t=0,u=n.length;t<u;t++)i=n[t].style.width,i&&i.indexOf("%")==-1&&(r+=parseInt(i,10));return r}function nr(n,t){var u,r,i,f;n=n[0],t=t[0],n.rows.length!==t.rows.length&&(u=n.offsetHeight,r=t.offsetHeight,u>r?(i=t.rows[t.rows.length-1],f=u-r):(i=n.rows[n.rows.length-1],f=r-u),i.style.height=i.offsetHeight+f+"px")}var k,nt,ri,b,ut=kendo.data,u=n.extend,e=kendo.dom,o=e.element,at=e.text,p=e.html,v=kendo._outerWidth,vt=kendo._outerHeight,y=kendo.ui,st=y.DataBoundWidget,c=ut.DataSource,ci=ut.ObservableArray,tt=ut.Query,a=ut.Model,i=n.proxy,ct=n.map,s=n.grep,lt=n.inArray,ai=n.isPlainObject,pt=Array.prototype.push,oi="string",w="change",ot="error",et="progress",l=".",f=".kendoTreeList",rt="click",di="mousedown",vi="edit",it="save",ki="expand",yi="collapse",wi="remove",pi="dataBinding",bi="dataBound",ft="cancel",dt="filterMenuInit",wt="columnHide",kt="columnShow",tr="th.k-header",bt="columnReorder",ht="columnResize",gt="columnMenuInit",ui="columnLock",ei="columnUnlock",d="parentId",ni="dragstart",ti="drag",ii="drop",fi="dragend",r={wrapper:"k-treelist k-grid k-widget k-display-block",header:"k-header",button:"k-button",alt:"k-alt",editCell:"k-edit-cell",group:"k-treelist-group",gridToolbar:"k-grid-toolbar",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",gridContentWrap:"k-grid-content",gridFilter:"k-grid-filter",footerTemplate:"k-footer-template",loading:"k-i-loading",refresh:"k-i-reload",retry:"k-request-retry",selected:"k-state-selected",status:"k-status",link:"k-link",withIcon:"k-with-icon",filterable:"k-filterable",icon:"k-icon",iconFilter:"k-i-filter",iconCollapse:"k-i-collapse",iconExpand:"k-i-expand",iconHidden:"k-i-none",iconPlaceHolder:"k-icon k-i-none",input:"k-input",dropPositions:"k-i-insert-up k-i-insert-down k-i-plus k-i-insert-middle",dropTop:"k-i-insert-up",dropBottom:"k-i-insert-down",dropAdd:"k-i-plus",dropMiddle:"k-i-insert-middle",dropDenied:"k-i-cancel",dragStatus:"k-drag-status",dragClue:"k-drag-clue",dragClueText:"k-clue-text"},yt={create:{imageClass:"k-i-plus",className:"k-grid-add",methodName:"addRow"},createchild:{imageClass:"k-i-plus",className:"k-grid-add",methodName:"addRow"},destroy:{imageClass:"k-i-close",className:"k-grid-delete",methodName:"removeRow"},edit:{imageClass:"k-i-edit",className:"k-grid-edit",methodName:"editRow"},update:{imageClass:"k-i-check",className:"k-primary k-grid-update",methodName:"saveRow"},canceledit:{imageClass:"k-i-cancel",className:"k-grid-cancel",methodName:"_cancelEdit"},excel:{imageClass:"k-i-file-excel",className:"k-grid-excel",methodName:"saveAsExcel"},pdf:{imageClass:"k-i-file-pdf",className:"k-grid-pdf",methodName:"saveAsPDF"}},h=a.define({id:"id",parentId:d,fields:{id:{type:"number"},parentId:{type:"number",nullable:!0}},init:function(n){a.fn.init.call(this,n),this._loaded=!1,this.parentIdField||(this.parentIdField=d),this.parentId=this.get(this.parentIdField)},accept:function(n){a.fn.accept.call(this,n),this.parentId=this.get(this.parentIdField)},set:function(n,t,i){n==d&&this.parentIdField!=d&&(this[this.parentIdField]=t),a.fn.set.call(this,n,t,i),n==this.parentIdField&&(this.parentId=this.get(this.parentIdField))},loaded:function(n){return n===t?this._loaded:(this._loaded=n,t)},shouldSerialize:function(n){return a.fn.shouldSerialize.call(this,n)&&"_loaded"!==n&&"_error"!=n&&"_edit"!=n&&!("parentId"!==this.parentIdField&&"parentId"===n)}});h.parentIdField=d,h.define=function(n,i){var r,u;return i===t&&(i=n,n=h),r=i.parentId||d,i.parentIdField=r,u=a.define(n,i),r&&(u.parentIdField=r),u},k=c.extend({init:function(n){c.fn.init.call(this,u(!0,{},{schema:{modelBase:h,model:h}},n))},_createNewModel:function(n){var t={},i=n instanceof a;return i&&(t=n),t=c.fn._createNewModel.call(this,t),i||(n.parentId&&(n[t.parentIdField]=n.parentId),t.accept(n)),t},_shouldWrap:function(){return!0},_push:function(n,t){var i=c.fn._readData.call(this,n);i||(i=n),this[t](i)},_readData:function(n){var t=this.data();return n=c.fn._readData.call(this,n),this._replaceData(t.toJSON().concat(n),t),n instanceof ci?n:t},_replaceData:function(n,t){for(var r=n.length,i=0;i<r;i++)t[i]=n[i];t.length=r},_readAggregates:function(n){var t=u(this._aggregateResult,this.reader.aggregates(n));return""in t&&(t[this._defaultParentId()]=t[""],delete t[""]),t},remove:function(n){var t=this._subtree(this._childrenMap(this.data()),n.id);this._removeItems(t),c.fn.remove.call(this,n)},_filterCallback:function(n){for(var t,i={},u=[],f=n.toArray(),r=0;r<f.length;r++)for(t=f[r];t&&(i[t.id]||(i[t.id]=!0,u.push(t)),!i[t.parentId]);)i[t.parentId]=!0,t=this.parentNode(t),t&&u.push(t);return new tt(u)},_subtree:function(n,t){for(var i=n[t]||[],f=this._defaultParentId(),r=0,u=i.length;r<u;r++)i[r].id!==f&&(i=i.concat(this._subtree(n,i[r].id)));return i},_childrenMap:function(n){var u,r,f,i,t={};for(n=this._observeView(n),u=0;u<n.length;u++)r=n[u],f=r.id,i=r.parentId,t[f]=t[f]||[],t[i]=t[i]||[],t[i].push(r);return t},_calculateAggregates:function(n,t){var u,o,s,r,e,f;for(t=t||{},u={},e=t.filter,e&&(n=tt.process(n,{filter:e,filterCallback:i(this._filterCallback,this)}).data),f=this._childrenMap(n),u[this._defaultParentId()]=new tt(this._subtree(f,this._defaultParentId())).aggregate(t.aggregate),r=0;r<n.length;r++)o=n[r],s=this._subtree(f,o.id),u[o.id]=new tt(s).aggregate(t.aggregate);return u},_queryProcess:function(n,t){var h,e,s,f,u,r,o;for(t=t||{},t.filterCallback=i(this._filterCallback,this),h=this._defaultParentId(),e=tt.process(n,t),s=this._childrenMap(e.data),n=s[h]||[],u=0;u<n.length;u++)r=n[u],r.id!==h&&(o=s[r.id],f=!(!o||!o.length),r.loaded()||r.loaded(f||!r.hasChildren),(r.loaded()||r.hasChildren!==!0)&&(r.hasChildren=f),f&&(n=n.slice(0,u+1).concat(o,n.slice(u+1))));return e.data=n,e},_queueRequest:function(n,t){t.call(this)},_modelLoaded:function(n){var t=this.get(n);t.loaded(!0),t.hasChildren=this.childNodes(t).length>0},_modelError:function(n,t){this.get(n)._error=t},success:function(n,i){return i&&t!==i.id||(this._data=this._observe([])),c.fn.success.call(this,n,i)},load:function(t){var r="_query",f=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates,u=n.Deferred().resolve().promise();if(t.loaded()){if(f)return u}else t.hasChildren&&(r="read");return this[r]({id:t.id}).done(i(this._modelLoaded,this,t.id)).fail(i(this._modelError,this,t.id))},contains:function(n,t){for(var i=n.id;t;){if(t.parentId===i)return!0;t=this.parentNode(t)}return!1},_byParentId:function(n,t){var r,i,f=[],u=this.view();if(n===t)return[];for(i=0;i<u.length;i++)r=u.at(i),r.parentId==n&&f.push(r);return f},_defaultParentId:function(){return this.reader.model.fn.defaults[this.reader.model.parentIdField]},childNodes:function(n){return this._byParentId(n.id,this._defaultParentId())},rootNodes:function(){return this._byParentId(this._defaultParentId())},parentNode:function(n){return this.get(n.parentId)},level:function(n){var t=-1;n instanceof h||(n=this.get(n));do n=this.parentNode(n),t++;while(n);return t},filter:function(n){var i=c.fn.filter;return n===t?i.call(this,n):(i.call(this,n),t)}}),k.create=function(t){return n.isArray(t)?t={data:t}:t instanceof ci&&(t={data:t.toJSON()}),t instanceof k?t:new k(t)},nt=kendo.Observable.extend({init:function(n,t){kendo.Observable.fn.init.call(this),t=this.options=u(!0,{},this.options,t),this.element=n,this.bind(this.events,t),this.model=this.options.model,this.fields=this._fields(this.options.columns),this._initContainer(),this.createEditable()},events:[],_initContainer:function(){this.wrapper=this.element},createEditable:function(){var n=this.options;this.editable=new y.Editable(this.wrapper,{fields:this.fields,target:n.target,clearContainer:n.clearContainer,model:this.model})},_isEditable:function(n){return n.field&&this.model.editable(n.field)},_fields:function(n){for(var t,r=[],i=0,u=n.length;i<u;i++)t=n[i],this._isEditable(t)&&r.push({field:t.field,format:t.format,editor:t.editor});return r},end:function(){return this.editable.end()},close:function(){this.destroy()},destroy:function(){this.editable.destroy(),this.editable.element.find("["+kendo.attr("container-for")+"]").empty().end().removeAttr(kendo.attr("role")),this.model=this.wrapper=this.element=this.columns=this.editable=null}}),ri=nt.extend({init:function(n,t){nt.fn.init.call(this,n,t),this._attachHandlers(),kendo.cycleForm(this.wrapper),this.open()},events:[ft,it],options:{window:{modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1}},_initContainer:function(){var i=this.options,t=[];this.wrapper=n('<div class="k-popup-edit-form"/>').attr(kendo.attr("uid"),this.model.uid).append('<div class="k-edit-form-container"/>'),i.template?(this._appendTemplate(t),this.fields=[]):this._appendFields(t),this._appendButtons(t),new e.Tree(this.wrapper.children()[0]).render(t),this.wrapper.appendTo(i.appendTo),this.window=new y.Window(this.wrapper,i.window)},_appendTemplate:function(n){var t=this.options.template;typeof t===oi&&(t=window.unescape(t)),t=kendo.template(t)(this.model),n.push(p(t))},_appendFields:function(n){for(var t,r=this.options.columns,i=0,u=r.length;i<u;i++)t=r[i],t.command||(n.push(p('<div class="k-edit-label"><label for="'+t.field+'">'+(t.title||t.field||"")+"</label></div>")),n.push(this._isEditable(t)?p("<div "+kendo.attr("container-for")+'="'+t.field+'" class="k-edit-field"></div>'):o("div",{"class":"k-edit-field"},[this.options.fieldRenderer(t,this.model)])))},_appendButtons:function(n){n.push(o("div",{"class":"k-edit-buttons k-state-default"},this.options.commandRenderer()))},_attachHandlers:function(){var n=this._cancelProxy=i(this._cancel,this);this.wrapper.on(rt+f,".k-grid-cancel",this._cancelProxy),this._saveProxy=i(this._save,this),this.wrapper.on(rt+f,".k-grid-update",this._saveProxy),this.window.bind("close",function(t){t.userTriggered&&n(t)})},_dettachHandlers:function(){this._cancelProxy=null,this._saveProxy=null,this.wrapper.off(f)},_cancel:function(n){this.trigger(ft,n)},_save:function(){this.trigger(it)},open:function(){this.window.center().open()},close:function(){this.window.bind("deactivate",i(this.destroy,this)).close()},destroy:function(){this.window.destroy(),this.window=null,this._dettachHandlers(),nt.fn.destroy.call(this)}}),b=st.extend({init:function(t,i){if(st.fn.init.call(this,t,i),this._dataSource(this.options.dataSource),this._columns(),this._layout(),this._selectable(),this._sortable(),this._resizable(),this._filterable(),this._attachEvents(),this._toolbar(),this._scrollable(),this._reorderable(),this._columnMenu(),this._minScreenSupport(),this._draggable(),this.options.autoBind&&this.dataSource.fetch(),this._hasLockedColumns){var r=this;this.wrapper.addClass("k-grid-lockedcolumns"),this._resizeHandler=function(){r.resize()},n(window).on("resize"+f,this._resizeHandler)}kendo.notify(this)},_draggable:function(){var t=this.options.editable;t&&t.move&&(this._dragging=new kendo.ui.HierarchicalDragAndDrop(this.wrapper,{$angular:this.$angular,autoScroll:!0,filter:"tbody>tr",itemSelector:"tr",allowedContainers:this.wrapper,hintText:function(t){var r=function(){return n(this).text()},i="<span class='k-header k-drag-separator' />";return t.children("td").map(r).toArray().join(i)},contains:i(function(n,t){var r=this.dataItem(t),i=this.dataItem(n);return i==r||this.dataSource.contains(i,r)},this),itemFromTarget:function(n){var t=n.closest("tr");return{item:t,content:t}},dragstart:i(function(n){this.wrapper.addClass("k-treelist-dragging");var t=this.dataItem(n);return this.trigger(ni,{source:t})},this),drag:i(function(n){n.source=this.dataItem(n.source),this.trigger(ti,n)},this),drop:i(function(n){return n.source=this.dataItem(n.source),n.destination=this.dataItem(n.destination),this.wrapper.removeClass("k-treelist-dragging"),this.trigger(ii,n)},this),dragend:i(function(n){var t=this.dataItem(n.destination),i=this.dataItem(n.source);i.set("parentId",t?t.id:null),n.source=i,n.destination=t,this.trigger(fi,n)},this),reorderable:!1,dropHintContainer:function(n){return n.children("td:eq(1)")},dropPositionFrom:function(n){return n.prevAll(".k-i-none").length>0?"after":"before"}}))},itemFor:function(n){return"number"==typeof n&&(n=this.dataSource.get(n)),this.tbody.find("["+kendo.attr("uid")+"="+n.uid+"]")},_scrollable:function(){var u,r,t;this.options.scrollable&&(u=this.thead.closest(".k-grid-header-wrap"),r=n(this.lockedContent).bind("DOMMouseScroll"+f+" mousewheel"+f,i(this._wheelScroll,this)),this.content.bind("scroll"+f,function(){u.scrollLeft(this.scrollLeft),r.scrollTop(this.scrollTop)}),t=kendo.touchScroller(this.content),t&&t.movable&&(this._touchScroller=t,t.movable.bind("change",function(n){u.scrollLeft(-n.sender.x),r&&r.scrollTop(-n.sender.y)})))},_wheelScroll:function(t){var r,i;t.ctrlKey||(r=kendo.wheelDeltaY(t),i=n(t.currentTarget),r&&(i[0].scrollHeight>i[0].clientHeight&&(i[0].scrollTop<i[0].scrollHeight-i[0].clientHeight&&r<0||i[0].scrollTop>0&&r>0)&&t.preventDefault(),i.one("wheel"+f,!1),this.content.scrollTop(this.content.scrollTop()+-r)))},_progress:function(){var n=this.options.messages;this.tbody.find("tr").length||this._showStatus(kendo.template("<span class='#= className #' /> #: messages.loading #")({className:r.icon+" "+r.loading,messages:n}))},_error:function(n){this.dataSource.rootNodes().length||this._render({error:n})},refresh:function(n){n=n||{},"itemchange"==n.action&&this.editor||this.trigger(pi)||(this._cancelEditor(),this._render(),this._adjustHeight(),this.trigger(bi))},_angularFooters:function(n){for(var i,u,f=this.dataSource.aggregates(),r=this._footerItems(),t=0;t<r.length;t++)i=r.eq(t),u=f[i.attr("data-parentId")],this._angularFooter(n,i.find("td").get(),u)},_angularFooter:function(n,t,i){var r=this.columns;this.angular(n,function(){return{elements:t,data:ct(r,function(n){return{column:n,aggregate:i&&i[n.field]}})}})},items:function(){return this._hasLockedColumns?this._items(this.tbody).add(this._items(this.lockedTable)):this._items(this.tbody)},_items:function(t){return t.find("tr").filter(function(){return!n(this).hasClass(r.footerTemplate)})},_footerItems:function(){var t=this.tbody;return this._hasLockedColumns&&(t=t.add(this.lockedTable)),t.find("tr").filter(function(){return n(this).hasClass(r.footerTemplate)})},dataItems:function(){var i,r,n,t=kendo.ui.DataBoundWidget.fn.dataItems.call(this);if(this._hasLockedColumns){for(i=t.length,r=Array(2*i),n=i;--n>=0;)r[n]=r[n+i]=t[n];t=r}return t},_showStatus:function(t){var i=this.element.find(".k-status"),r=n(this.content).add(this.lockedContent);i.length||(i=n("<div class='k-status' />").appendTo(this.element)),this._contentTree.render([]),this._hasLockedColumns&&this._lockedContentTree.render([]),r.hide(),i.html(t)},_hideStatus:function(){this.element.find(".k-status").remove(),n(this.content).add(this.lockedContent).show()},_adjustHeight:function(){var i,u,n=this.element,f=n.find(l+r.gridContentWrap),o=n.find(l+r.gridHeader),e=n.find(l+r.gridToolbar),t=kendo.support.scrollbar();n.height(this.options.height),u=function(n){var i,t;return!!n[0].style.height||(i=n.height(),n.height("auto"),t=n.height(),n.height(""),i!=t)},u(n)&&(i=n.height()-vt(o)-vt(e),f.height(i),this._hasLockedColumns&&(t=this.table[0].offsetWidth>this.table.parent()[0].clientWidth?t:0,this.lockedContent.height(i-t)))},_resize:function(){this._applyLockedContainersWidth(),this._adjustHeight()},_minScreenSupport:function(){var t=this.hideMinScreenCols();t&&(this.minScreenResizeHandler=i(this.hideMinScreenCols,this),n(window).on("resize",this.minScreenResizeHandler))},hideMinScreenCols:function(){for(var i,n,f=this.columns,u=!1,e=window.innerWidth>0?window.innerWidth:screen.width,r=0;r<f.length;r++)i=f[r],n=i.minScreenWidth,n!==t&&null!==n&&(u=!0,n>e?this.hideColumn(i):this.showColumn(i));return u},destroy:function(){st.fn.destroy.call(this);var t=this.dataSource;t.unbind(w,this._refreshHandler),t.unbind(ot,this._errorHandler),t.unbind(et,this._progressHandler),this._resizeHandler&&n(window).off("resize"+f,this._resizeHandler),this._dragging&&(this._dragging.destroy(),this._dragging=null),this.resizable&&(this.resizable.destroy(),this.resizable=null),this.reorderable&&(this.reorderable.destroy(),this.reorderable=null),this._draggableInstance&&this._draggableInstance.element&&(this._draggableInstance.destroy(),this._draggableInstance=null),this.minScreenResizeHandler&&n(window).off("resize",this.minScreenResizeHandler),this._destroyEditor(),this.element.off(f),this._touchScroller&&this._touchScroller.destroy(),this._autoExpandable=null,this._refreshHandler=this._errorHandler=this._progressHandler=this._dataSourceFetchProxy=null,this.thead=this.content=this.tbody=this.table=this.element=this.lockedHeader=this.lockedContent=null,this._statusTree=this._headerTree=this._contentTree=this._lockedHeaderColsTree=this._lockedContentColsTree=this._lockedHeaderTree=this._lockedContentTree=null},options:{name:"TreeList",columns:[],autoBind:!0,scrollable:!0,selectable:!1,sortable:!1,toolbar:null,height:null,columnMenu:!1,messages:{noRows:"No records to display",loading:"Loading...",requestFailed:"Request failed.",retry:"Retry",commands:{edit:"Edit",update:"Update",canceledit:"Cancel",create:"Add new record",createchild:"Add child record",destroy:"Delete",excel:"Export to Excel",pdf:"Export to PDF"}},excel:{hierarchy:!0},resizable:!1,filterable:!1,editable:!1,reorderable:!1},events:[w,vi,it,wi,ki,yi,pi,bi,ft,ni,ti,ii,fi,dt,wt,kt,bt,ht,gt,ui,ei],_toggle:function(r,u){var f=n.Deferred().resolve().promise(),e=r.loaded();return r._error&&(r.expanded=!1,r._error=t),!e&&r.expanded?f:(t===u&&(u=!r.expanded),r.expanded=u,e||(f=this.dataSource.load(r).always(i(function(){this._render(),this._syncLockedContentHeight()},this))),this._render(),this._syncLockedContentHeight(),f)},expand:function(n){return this._toggle(this.dataItem(n),!0)},collapse:function(n){return this._toggle(this.dataItem(n),!1)},_toggleChildren:function(t){var u=n(t.currentTarget),i=this.dataItem(u),r=i.expanded?yi:ki;this.trigger(r,{model:i})||this._toggle(i),t.preventDefault()},_attachEvents:function(){var t=l+r.iconCollapse+", ."+r.iconExpand+", ."+r.refresh,n=l+r.retry;this.element.on(di+f,t,i(this._toggleChildren,this)).on(rt+f,n,this._dataSourceFetchProxy).on(rt+f,".k-button[data-command]",i(this._commandClick,this))},_commandByName:function(t){var i,u,f,r,o=this.columns,e=n.isArray(this.options.toolbar)?this.options.toolbar:[];if(t=t.toLowerCase(),yt[t])return yt[t];for(i=0;i<o.length;i++)if(f=o[i].command)for(u=0;u<f.length;u++)if(r=f[u].name,r&&r.toLowerCase()==t)return f[u];for(i=0;i<e.length;i++)if(r=e[i].name,r&&r.toLowerCase()==t)return e[i]},_commandClick:function(i){var f=n(i.currentTarget),e=f.attr("data-command"),r=this._commandByName(e),u=f.parentsUntil(this.wrapper,"tr");u=u.length?u:t,r&&(r.methodName?this[r.methodName](u):r.click&&r.click.call(this,i),i.preventDefault())},_ensureExpandableColumn:function(){var n,t;this._autoExpandable&&delete this._autoExpandable.expandable,n=s(this.columns,hi(g("hidden"))),t=s(n,g("expandable")),this.columns.length&&!t.length&&(this._autoExpandable=n[0],n[0].expandable=!0)},_columns:function(){var n,t=this.options.columns||[];this.columns=ct(t,function(n){return n="string"==typeof n?{field:n}:n,u({encoded:!0},n)}),n=this._lockedColumns(),n.length>0&&(this._hasLockedColumns=!0,this.columns=n.concat(this._nonLockedColumns())),this._ensureExpandableColumn(),this._columnTemplates(),this._columnAttributes()},_columnTemplates:function(){for(var n,i=this.columns,t=0,r=i.length;t<r;t++)n=i[t],n.template&&(n.template=kendo.template(n.template)),n.headerTemplate&&(n.headerTemplate=kendo.template(n.headerTemplate)),n.footerTemplate&&(n.footerTemplate=kendo.template(n.footerTemplate))},_columnAttributes:function(){function r(t){var f,i,u,r;if(t&&t.style)for(f=t.style.split(";"),t.style={},i=0;i<f.length;i++)u=f[i].split(":"),r=n.trim(u[0]),r&&(t.style[n.camelCase(r)]=n.trim(u[1]))}for(var i=this.columns,t=0,u=i.length;t<u;t++)r(i[t].attributes),r(i[t].headerAttributes)},_layout:function(){var u,f,i,e=this.columns,n=this.element,t="";this.wrapper=n.addClass(r.wrapper),t="<div class='#= gridHeader #'>",this._hasLockedColumns&&(t+="<div class='k-grid-header-locked'><table role='grid'><colgroup></colgroup><thead role='rowgroup' /></table></div>"),t+="<div class='#= gridHeaderWrap #'><table role='grid'><colgroup></colgroup><thead role='rowgroup' /></table></div></div>",this._hasLockedColumns&&(t+="<div class='k-grid-content-locked'><table role='treegrid' tabindex='0'><colgroup></colgroup><tbody /></table></div>"),t+="<div class='#= gridContentWrap # k-auto-scrollable'><table role='treegrid' tabindex='0'><colgroup></colgroup><tbody /></table></div>",this.options.scrollable||(t="<table role='treegrid' tabindex='0'><colgroup></colgroup><thead class='#= gridHeader #' role='rowgroup' /><tbody /></table>"),this.options.toolbar&&(t="<div class='#= header # #= gridToolbar #' />"+t),n.append(kendo.template(t)(r)+"<div class='k-status' />"),this.toolbar=n.find(l+r.gridToolbar),u=n.find(l+r.gridHeader).find("thead").addBack().filter("thead"),this.thead=u.last(),this.options.scrollable&&(f=kendo.support.isRtl(n),n.find("div."+r.gridHeader).css(f?"padding-left":"padding-right",kendo.support.scrollbar())),i=n.find(l+r.gridContentWrap),i.length?this.content=i:i=n,this.table=i.find(">table"),this.tbody=this.table.find(">tbody"),this._hasLockedColumns&&(this.lockedHeader=u.first().closest(".k-grid-header-locked"),this.lockedContent=n.find(".k-grid-content-locked"),this.lockedTable=this.lockedContent.children()),this._initVirtualTrees(),this._renderCols(),this._renderHeader(),this.angular("compile",function(){return{elements:u.find("th.k-header").get(),data:ct(e,function(n){return{column:n}})}})},_initVirtualTrees:function(){this._headerColsTree=new e.Tree(this.thead.prev()[0]),this._contentColsTree=new e.Tree(this.tbody.prev()[0]),this._headerTree=new e.Tree(this.thead[0]),this._contentTree=new e.Tree(this.tbody[0]),this._statusTree=new e.Tree(this.element.children(".k-status")[0]),this.lockedHeader&&(this._lockedHeaderColsTree=new e.Tree(this.lockedHeader.find("colgroup")[0]),this._lockedContentColsTree=new e.Tree(this.lockedTable.find(">colgroup")[0]),this._lockedHeaderTree=new e.Tree(this.lockedHeader.find("thead")[0]),this._lockedContentTree=new e.Tree(this.lockedTable.find(">tbody")[0]))},_toolbar:function(){var r,t=this.options.toolbar,i=this.toolbar;t&&(n.isArray(t)?(r=this._buildCommands(t),new e.Tree(i[0]).render(r)):i.append(kendo.template(t)({})),this.angular("compile",function(){return{elements:i.get()}}))},_lockedColumns:function(){return s(this.columns,g("locked"))},_nonLockedColumns:function(){return s(this.columns,hi(g("locked")))},_templateColumns:function(){return s(this.columns,g("template"))},_flushCache:function(){this.options.$angular&&this._templateColumns().length&&(this._contentTree.render([]),this._hasLockedColumns&&this._lockedContentTree.render([]))},_render:function(t){var f,u,e,i;t=t||{},f=this.options.messages,u=this.dataSource.rootNodes(),e=kendo.attr("uid"),i=this.select().removeClass("k-state-selected").map(function(t,i){return n(i).attr(e)}),this._absoluteIndex=0,this._angularItems("cleanup"),this._angularFooters("cleanup"),this._flushCache(),t.error?this._showStatus(kendo.template("#: messages.requestFailed # <button class='#= buttonClass #'>#: messages.retry #</button>")({buttonClass:[r.button,r.retry].join(" "),messages:f})):u.length?(this._hideStatus(),this._contentTree.render(this._trs({columns:this._nonLockedColumns(),aggregates:t.aggregates,selected:i,data:u,visible:!0,level:0})),this._hasLockedColumns&&(this._absoluteIndex=0,this._lockedContentTree.render(this._trs({columns:this._lockedColumns(),aggregates:t.aggregates,selected:i,data:u,visible:!0,level:0})))):this._showStatus(kendo.htmlEncode(f.noRows)),this._touchScroller&&this._touchScroller.contentResized(),this._muteAngularRebind(function(){this._angularItems("compile"),this._angularFooters("compile")}),this.items().filter(function(){return n.inArray(n(this).attr(e),i)>=0}).addClass("k-state-selected"),this._adjustRowsHeight()},_adjustRowsHeight:function(){var c,h,i,s,n,t,o,l,f,a,v,u,r,e;if(this._hasLockedColumns){for(c=this.table,h=this.lockedTable,i=c[0].rows,s=i.length,t=h[0].rows,o=c.add(h),l=o.length,f=[],a=this.lockedHeader.find("tr"),v=this.thead.find("tr"),a.add(v).height("auto").height(Math.max(a.height(),v.height())),n=0;n<s&&t[n];n++)i[n].style.height&&(i[n].style.height=t[n].style.height="");for(n=0;n<s&&t[n];n++)u=i[n].offsetHeight,r=t[n].offsetHeight,e=0,u>r?e=u:u<r&&(e=r),f.push(e);for(n=0;n<l;n++)o[n].style.display="none";for(n=0;n<s;n++)f[n]&&(i[n].style.height=t[n].style.height=f[n]+1+"px");for(n=0;n<l;n++)o[n].style.display=""}},_ths:function(n){for(var t,h,s,a,i,e,c=[],f=0,l=n.length;f<l;f++)t=n[f],s=[],a=[r.header],h=t.headerTemplate?t.headerTemplate({}):t.title||t.field||"",e=t.headerTemplate?p(h):at(h),s.push(t.sortable?o("a",{href:"#",className:r.link},[e]):e),i={"data-field":t.field,"data-title":t.title,style:t.hidden===!0?{display:"none"}:{},className:a.join(" "),role:"columnheader"},i=u(!0,{},i,t.headerAttributes),c.push(o("th",i,s));return c},_cols:function(n){for(var t,r,u=[],i=0;i<n.length;i++)n[i].hidden!==!0&&(t=n[i].width,r={},t&&0!==parseInt(t,10)&&(r.style={width:"string"==typeof t?t:t+"px"}),u.push(o("col",r)));return u},_renderCols:function(){var n=this._nonLockedColumns();this._headerColsTree.render(this._cols(n)),this.options.scrollable&&this._contentColsTree.render(this._cols(n)),this._hasLockedColumns&&(n=this._lockedColumns(),this._lockedHeaderColsTree.render(this._cols(n)),this._lockedContentColsTree.render(this._cols(n)))},_renderHeader:function(){var n=this._nonLockedColumns();this._headerTree.render([o("tr",{role:"row"},this._ths(n))]),this._hasLockedColumns&&(n=this._lockedColumns(),this._lockedHeaderTree.render([o("tr",{role:"row"},this._ths(n))]),this._applyLockedContainersWidth())},_applyLockedContainersWidth:function(){var n,i,f,t,r,u;this._hasLockedColumns&&(n=si(this.lockedHeader.find(">table>colgroup>col")),i=this.thead.parent(),f=si(i.find(">colgroup>col")),t=this.wrapper[0].clientWidth,r=kendo.support.scrollbar(),n>=t&&(n=t-3*r),this.lockedHeader.add(this.lockedContent).width(n),i.add(this.table).width(f),u=t-n-2,this.content.width(u),i.parent().width(u-r))},_trs:function(t){for(var u,f,e,h,c,o=[],a=t.level,p=t.data,w=this.dataSource,v=w.aggregates()||{},l=t.columns,s=0,y=p.length;s<y;s++)e=[],u=p[s],c=u.loaded()&&w.childNodes(u),h=c&&c.length,f={role:"row"},f[kendo.attr("uid")]=u.uid,h&&(f["aria-expanded"]=!!u.expanded),t.visible?(this._absoluteIndex%2!=0&&e.push(r.alt),this._absoluteIndex++):f.style={display:"none"},n.inArray(u.uid,t.selected)>=0&&e.push(r.selected),h&&e.push(r.group),u._edit&&e.push("k-grid-edit-row"),f.className=e.join(" "),o.push(this._tds({model:u,attr:f,level:a},l,i(this._td,this))),h&&(o=o.concat(this._trs({columns:l,aggregates:v,selected:t.selected,visible:t.visible&&!!u.expanded,data:c,level:a+1})));return this._hasFooterTemplate()&&(f={className:r.footerTemplate,"data-parentId":u.parentId},t.visible||(f.style={display:"none"}),o.push(this._tds({model:v[u.parentId],attr:f,level:a},l,this._footerTd))),o},_footerTd:function(t){var f=[],i=t.column,s=t.column.footerTemplate||n.noop,h=t.model[i.field]||{},e={role:"gridcell",style:i.hidden===!0?{display:"none"}:{}};return i.expandable&&(f=f.concat(li({level:t.level+1,className:r.iconPlaceHolder}))),i.attributes&&u(e,i.attributes),f.push(p(s(h)||"")),o("td",e,f)},_hasFooterTemplate:function(){return!!s(this.columns,function(n){return n.footerTemplate}).length},_tds:function(n,t,i){for(var e,u=[],r=0,f=t.length;r<f;r++)e=t[r],u.push(i({model:n.model,column:e,level:n.level}));return o("tr",n.attr,u)},_td:function(n){var f,e=[],i=n.model,t=n.column,s={role:"gridcell",style:t.hidden===!0?{display:"none"}:{}};return i._edit&&t.field&&i.editable(t.field)?s[kendo.attr("container-for")]=t.field:(t.expandable&&(e=li({level:n.level,className:r.iconPlaceHolder}),f=[r.icon],f.push(i.hasChildren?i.expanded?r.iconCollapse:r.iconExpand:r.iconHidden),i._error?f.push(r.refresh):!i.loaded()&&i.expanded&&f.push(r.loading),e.push(o("span",{className:f.join(" ")})),s.style["white-space"]="nowrap"),t.attributes&&u(!0,s,t.attributes),t.command?e=this._buildCommands(i._edit?["update","canceledit"]:t.command):e.push(this._cellContent(t,i))),o("td",s,e)},_cellContent:function(n,i){var r;return n.template?r=n.template(i):n.field&&(r=i.get(n.field),null!==r&&n.format&&(r=kendo.format(n.format,r))),null!==r&&t!==r||(r=""),n.template||!n.encoded?p(r):at(r)},_buildCommands:function(n){for(var i=[],t=0;t<n.length;t++)i.push(this._button(n[t]));return i},_button:function(n){var t=(n.name||n).toLowerCase(),r=this.options.messages.commands[t],i=[];return n=u({},yt[t],{text:r},n),n.imageClass&&i.push(o("span",{className:["k-icon",n.imageClass].join(" ")})),o("button",{type:"button","data-command":t,className:["k-button k-button-icontext",n.className].join(" ")},i.concat([at(n.text||n.name)]))},_positionResizeHandle:function(i){var h,w,o,r=n(i.currentTarget),u=this.resizeHandle,y=r.position(),p=y.left,a=v(r),c=r.closest("div"),l=i.clientX+n(window).scrollLeft(),e=this.options.columnResizeHandleWidth||3;return p+=c.scrollLeft(),u||(u=this.resizeHandle=n('<div class="k-resize-handle"><div class="k-resize-handle-inner" /></div>')),h=r.offset().left+a,(w=l>h-e&&l<h+e)?(c.append(u),u.show().css({top:y.top,left:p+a-e-1,height:vt(r),width:3*e}).data("th",r),o=this,u.off("dblclick"+f).on("dblclick"+f,function(){var t=r.index();n.contains(o.thead[0],r[0])&&(t+=s(o.columns,function(n){return n.locked&&!n.hidden}).length),o.autoFitColumn(t)}),t):(u.hide(),t)},autoFitColumn:function(t){var r,k,h,o,y,l,d,b,c,u,it,w,g,a,e,p,rt,i=this,ut=i.options,f=i.columns,tt=kendo.support.browser,nt=i.lockedHeader?gi(i.lockedHeader.find(">table>thead")).filter(ir).length:0;if(t="number"==typeof t?f[t]:ai(t)?s(f,function(n){return n===t})[0]:s(f,function(n){return n.field===t})[0],t&&!t.hidden){for(r=lt(t,f),o=t.locked,h=o?i.lockedHeader.children("table"):i.thead.parent(),k=h.find("[data-index='"+r+"']"),l=o?i.lockedTable:i.table,d=i.footer||n(),i.footer&&i.lockedContent&&(d=i.footer.children(o?".k-grid-footer-locked":".k-grid-footer-wrap")),b=d.find("table").first(),i.lockedHeader&&nt>=r&&!o&&(r-=nt),c=0;c<f.length&&f[c]!==t;c++)f[c].hidden&&r--;if(y=ut.scrollable?h.find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+r+")").add(l.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+r+")")).add(b.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+r+")")):l.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+r+")"),u=h.add(l).add(b),it=v(k),y.width(""),u.css("table-layout","fixed"),y.width("auto"),u.addClass("k-autofitting"),u.css("table-layout",""),w=Math.ceil(Math.max(v(k),v(l.find("tr").eq(0).children("td:visible").eq(r)),v(b.find("tr").eq(0).children("td:visible").eq(r)))),y.width(w),t.width=w,ut.scrollable){for(g=h.find("col"),e=0,p=0,rt=g.length;p<rt;p+=1){if(a=g[p].style.width,!a||a.indexOf("%")!=-1){e=0;break}e+=parseInt(a,10)}e&&u.each(function(){this.style.width=e+"px"})}tt.msie&&8==tt.version&&(u.css("display","inline-table"),setTimeout(function(){u.css("display","table")},1)),u.removeClass("k-autofitting"),i.trigger(ht,{column:t,oldWidth:it,newWidth:w}),i._applyLockedContainersWidth(),i._syncLockedContentHeight(),i._syncLockedHeaderHeight()}},_adjustLockedHorizontalScrollBar:function(){var t=this.table,n=t.parent(),i=t[0].offsetWidth>n[0].clientWidth?kendo.support.scrollbar():0;this.lockedContent.height(n.height()-i)},_syncLockedContentHeight:function(){this.lockedTable&&(this._touchScroller||this._adjustLockedHorizontalScrollBar(),this._adjustRowsHeight(this.table,this.lockedTable))},_syncLockedHeaderHeight:function(){var t,n;this.lockedHeader&&(t=this.lockedHeader.children("table"),n=this.thead.parent(),this._adjustRowsHeight(t,n),nr(t,n))},_resizable:function(){if(this.options.resizable){this.resizable&&this.resizable.destroy();var t=this;n(this.lockedHeader).find("thead").add(this.thead).on("mousemove"+f,"th",n.proxy(this._positionResizeHandle,this)),this.resizable=new kendo.ui.Resizable(this.wrapper,{handle:".k-resize-handle",start:function(i){var f,u,r=n(i.currentTarget).data("th"),e="col:eq("+n.inArray(r[0],r.parent().children().filter(":visible"))+")";t.wrapper.addClass("k-grid-column-resizing"),t.lockedHeader&&n.contains(t.lockedHeader[0],r[0])?(f=t.lockedHeader,u=t.lockedTable):(f=t.thead.parent(),u=t.table),this.col=u.children("colgroup").find(e).add(f.find(e)),this.th=r,this.startLocation=i.x.location,this.columnWidth=v(r),this.table=this.col.closest("table"),this.totalWidth=this.table.width()},resize:function(n){var i=11,t=n.x.location-this.startLocation;this.columnWidth+t<i&&(t=i-this.columnWidth),this.table.width(this.totalWidth+t),this.col.width(this.columnWidth+t)},resizeend:function(){var r,i,n;t.wrapper.removeClass("k-grid-column-resizing"),r=this.th.attr("data-field"),i=s(t.columns,function(n){return n.field==r}),n=Math.floor(v(this.th)),i[0].width=n,t._resize(),t._adjustRowsHeight(),t.trigger(ht,{column:i,oldWidth:this.columnWidth,newWidth:n}),this.table=this.col=this.th=null}})}},_sortable:function(){var t,f,r,i,s,h=this.columns,e=n(this.lockedHeader).add(this.thead).find("th"),c=kendo.attr("field"),o=this.options.sortable;if(o)for(i=0,s=e.length;i<s;i++)t=h[i],t.sortable!==!1&&!t.command&&t.field&&(r=e.eq(i),f=r.data("kendoColumnSorter"),f&&f.destroy(),r.attr(c,t.field).kendoColumnSorter(u({},o,t.sortable,{dataSource:this.dataSource})))},_filterable:function(){var t,h,r,e,f,c,o=n(this.lockedHeader).add(this.thead).find("th"),s=this.options.filterable;if(s&&!this.options.columnMenu)for(c=i(function(n){this.trigger(dt,{field:n.field,container:n.container})},this),t=0,h=o.length;t<h;t++)r=this.columns[t],e=o.eq(t),f=e.data("kendoFilterMenu"),f&&f.destroy(),r.command||r.filterable===!1||e.kendoFilterMenu(u(!0,{},s,r.filterable,{dataSource:this.dataSource,init:c}))},_change:function(){this.trigger(w)},_selectable:function(){var r,f,n=this.options.selectable,u=this.table;n&&(n=kendo.ui.Selectable.parseOptions(n),this._hasLockedColumns&&(u=u.add(this.lockedTable),f=n.multiple&&n.cell),r=">tbody>tr:not(.k-footer-template)",n.cell&&(r+=">td"),this.selectable=new kendo.ui.Selectable(u,{filter:r,aria:!0,multiple:n.multiple,change:i(this._change,this),useAllItems:f,continuousItems:i(this._continuousItems,this,r,n.cell),relatedTarget:!n.cell&&this._hasLockedColumns?i(this._selectableTarget,this):t}))},_continuousItems:function(t,i){var e,o,f,s,u,r;if(this.lockedContent){for(e=n(t,this.lockedTable),o=n(t,this.table),f=i?this._lockedColumns().length:1,s=i?this.columns.length-f:1,u=[],r=0;r<e.length;r+=f)pt.apply(u,e.slice(r,r+f)),pt.apply(u,o.splice(0,s));return u}},_selectableTarget:function(t){for(var u,r=n(),i=0,f=t.length;i<f;i++)u=this._relatedRow(t[i]),lt(u[0],t)<0&&(r=r.add(u));return r},_relatedRow:function(t){var i,u,r=this.lockedTable;return t=n(t),r?(i=t.closest(this.table.add(this.lockedTable)),u=i.find(">tbody>tr").index(t),i=i[0]===this.table[0]?r:this.table,i.find(">tbody>tr").eq(u)):t},select:function(r){var u=this.selectable;return u?(t!==r&&(u.options.multiple||(u.clear(),r=r.first()),this._hasLockedColumns&&(r=r.add(n.map(r,i(this._relatedRow,this))))),u.value(r)):n()},clearSelection:function(){var n=this.select();n.length&&(this.selectable.clear(),this.trigger(w))},_dataSource:function(n){var t=this.dataSource;t&&(t.unbind(w,this._refreshHandler),t.unbind(ot,this._errorHandler),t.unbind(et,this._progressHandler)),this._refreshHandler=i(this.refresh,this),this._errorHandler=i(this._error,this),this._progressHandler=i(this._progress,this),t=this.dataSource=k.create(n),t.bind(w,this._refreshHandler),t.bind(ot,this._errorHandler),t.bind(et,this._progressHandler),this._dataSourceFetchProxy=i(function(){this.dataSource.fetch()},this)},setDataSource:function(n){this._dataSource(n),this._sortable(),this._filterable(),this._contentTree.render([]),this.options.autoBind&&this.dataSource.fetch()},dataItem:function(t){var i,r;return t instanceof h?t:(i=n(t).closest("tr"),r=this.dataSource.getByUid(i.attr(kendo.attr("uid"))))},editRow:function(n){var t;typeof n===oi&&(n=this.tbody.find(n)),t=this.dataItem(n),t&&("popup"!=this._editMode()&&(t._edit=!0),this._cancelEditor(),this._render(),this._createEditor(t),this.trigger(vi,{container:this.editor.wrapper,model:t}))},_cancelEdit:function(n){n=u(n,{container:this.editor.wrapper,model:this.editor.model}),this.trigger(ft,n)||this.cancelRow()},cancelRow:function(){this._cancelEditor(),this._render()},saveRow:function(){var t,n=this.editor;n&&(t={model:n.model,container:n.wrapper},n.end()&&!this.trigger(it,t)&&this.dataSource.sync())},addRow:function(n){var f=this.editor,r=0,u={};if(!f||f.end())return n?(n instanceof h||(n=this.dataItem(n)),u[n.parentIdField]=n.id,r=this.dataSource.indexOf(n)+1,this.expand(n).then(i(this._insertAt,this,u,r)),t):(this._insertAt(u,r),t)},_insertAt:function(n,t){n=this.dataSource.insert(t,n);var i=this.itemFor(n);this.editRow(i)},removeRow:function(n){var t=this.dataItem(n),i={model:t,row:n};t&&!this.trigger(wi,i)&&(this.dataSource.remove(t),this.dataSource.sync())},_cancelEditor:function(){var n,t=this.editor;t&&(n=t.model,this._destroyEditor(),this.dataSource.cancelChanges(n),n._edit=!1)},_destroyEditor:function(){this.editor&&(this.editor.close(),this.editor=null)},_createEditor:function(n){var f,r,t=this.itemFor(n);t=t.add(this._relatedRow(t)),f=this._editMode(),r={columns:this.columns,model:n,target:this,clearContainer:!1,template:this.options.editable.template},"inline"==f?this.editor=new nt(t,r):(u(r,{window:this.options.editable.window,commandRenderer:i(function(){return this._buildCommands(["update","canceledit"])},this),fieldRenderer:this._cellContent,save:i(this.saveRow,this),cancel:i(this._cancelEdit,this),appendTo:this.wrapper}),this.editor=new ri(t,r))},_editMode:function(){var t="inline",n=this.options.editable;return n!==!0&&(t="string"==typeof n?n:n.mode||t),t.toLowerCase()},hideColumn:function(n){this._toggleColumnVisibility(n,!0)},showColumn:function(n){this._toggleColumnVisibility(n,!1)},_toggleColumnVisibility:function(n,t){n=this._findColumn(n),n&&n.hidden!==t&&(n.hidden=t,this._ensureExpandableColumn(),this._renderCols(),this._renderHeader(),this._render(),this._adjustTablesWidth(),this.trigger(t?wt:kt,{column:n}),t||n.width||this.table.add(this.thead.closest("table")).width(""))},_findColumn:function(n){return n="number"==typeof n?this.columns[n]:ai(n)?s(this.columns,function(t){return t===n})[0]:s(this.columns,function(t){return t.field===n})[0]},_adjustTablesWidth:function(){for(var n,u=this.thead.prev().children(),t=0,i=0,r=u.length;i<r;i++){if(n=u[i].style.width,!n||n.indexOf("%")!=-1){t=0;break}t+=parseInt(n,10)}t&&this.table.add(this.thead.closest("table")).width(t)},_reorderable:function(){var r,u,t;this.options.reorderable&&(r=this.options.scrollable===!0,u=(r?".k-grid-header:first ":"table:first>.k-grid-header ")+tr,t=this,this._draggableInstance=new y.Draggable(this.wrapper,{group:kendo.guid(),filter:u,hint:function(t){return n('<div class="k-header k-drag-clue" />').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(t.attr(kendo.attr("title"))||t.attr(kendo.attr("field"))||t.text()).prepend('<span class="k-icon k-drag-status k-i-cancel" />')}}),this.reorderable=new y.Reorderable(this.wrapper,{draggable:this._draggableInstance,dragOverContainers:i(this._allowDragOverContainers,this),inSameContainer:function(t){return n(t.source).parent()[0]===n(t.target).parent()[0]},change:function(n){var u=n.newIndex,r=n.oldIndex,f="before"===n.position,i=t.columns[r];t.trigger(bt,{newIndex:u,oldIndex:r,column:i}),t.reorderColumn(u,i,f)}}))},_allowDragOverContainers:function(n){return this.columns[n].lockable!==!1},reorderColumn:function(i,r,u){var h,c,e,s=this.columns,f=lt(r,s),a=s[i],o=!!a.locked,l=this._nonLockedColumns().length;f!==i&&(o&&!r.locked&&1==l||!o&&r.locked&&s.length-l==1||(u===t&&(u=i<f),h=!!r.locked,h=h!=o,r.locked=o,s.splice(u?i:i+1,0,r),s.splice(f<i?f:f+1,1),this._renderCols(),c=n(this.lockedHeader).add(this.thead).find("th"),c.eq(f)[u?"insertBefore":"insertAfter"](c.eq(i)),e=this._headerTree.children[0].children,this._hasLockedColumns&&(e=this._lockedHeaderTree.children[0].children.concat(e)),e.splice(u?i:i+1,0,e[f]),e.splice(f<i?f:f+1,1),this._hasLockedColumns&&(this._lockedHeaderTree.children[0].children=e.splice(0,this._lockedColumns().length),this._headerTree.children[0].children=e),this._applyLockedContainersWidth(),this.refresh(),h&&(o?this.trigger(ui,{column:r}):this.trigger(ei,{column:r}))))},lockColumn:function(n){var i,t=this.columns;n="number"==typeof n?t[n]:s(t,function(t){return t.field===n})[0],n&&!n.hidden&&(i=this._lockedColumns().length-1,this.reorderColumn(i,n,!1))},unlockColumn:function(n){var i,t=this.columns;n="number"==typeof n?t[n]:s(t,function(t){return t.field===n})[0],n&&!n.hidden&&(i=this._lockedColumns().length,this.reorderColumn(i,n,!0))},_columnMenu:function(){var t,s,o,l,c,e,h=n(this.lockedHeader).add(this.thead).find("th"),y=this.columns,r=this.options,f=r.columnMenu,v=i(this._columnMenuInit,this),a=this._lockedColumns().length;if(f)for("boolean"==typeof f&&(f={}),e=0;e<h.length;e++)t=y[e],t.field&&(s=h.eq(e).data("kendoColumnMenu"),s&&s.destroy(),l=!1,t.sortable!==!1&&f.sortable!==!1&&r.sortable!==!1&&(l=u({},r.sortable,{compare:(t.sortable||{}).compare})),c=!1,r.filterable&&t.filterable!==!1&&f.filterable!==!1&&(c=u({pane:this.pane},t.filterable,r.filterable)),o={dataSource:this.dataSource,values:t.values,columns:f.columns,sortable:l,filterable:c,messages:f.messages,owner:this,closeCallback:n.noop,init:v,pane:this.pane,lockedColumns:t.lockable!==!1&&a>0},r.$angular&&(o.$angular=r.$angular),h.eq(e).kendoColumnMenu(o))},_columnMenuInit:function(n){this.trigger(gt,{field:n.field,container:n.container})}}),kendo.ExcelMixin&&kendo.ExcelMixin.extend(b.prototype),kendo.PDFMixin&&(kendo.PDFMixin.extend(b.prototype),b.fn._drawPDF=function(t){var i=new n.Deferred;return this._drawPDFShadow({width:this.wrapper.width()},{avoidLinks:this.options.pdf.avoidLinks}).done(function(n){var r={page:n,pageNumber:1,progress:1,totalPages:1};t.notify(r),i.resolve(r.page)}).fail(function(n){i.reject(n)}),i}),u(!0,kendo.data,{TreeListDataSource:k,TreeListModel:h}),u(!0,kendo.ui,{TreeList:b}),y.plugin(b)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("util/main.min",["kendo.core.min"],n)}(function(){return function(){function u(n){return n*n}function o(n){return"string"!=typeof n&&(n+="px"),n}function e(t){var r,i,u=[];if(t)for(r=n.toHyphens(t).split("-"),i=0;i<r.length;i++)u.push("k-pos-"+r[i]);return u.join(" ")}function s(n){for(var r={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"},t=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],i="";n>0;)n<t[0]?t.shift():(i+=r[t[0]],n-=t[0]);return i}function c(n){var f,r,u,i,t;for(n=n.toLowerCase(),f={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3},r=0,u=0,i=0;i<n.length;++i){if(t=f[n.charAt(i)],!t)return null;r+=t,t>u&&(r-=2*u),u=t}return r}function h(n){var t=Object.create(null);return function(){for(var i="",r=arguments.length;--r>=0;)i+=":"+arguments[r];return i in t?t[i]:t[i]=n.apply(this,arguments)}}function r(n){return i.test(n)}var i,n=window.kendo,f=n.deepExtend,t=Date.now;t||(t=function(){return+new Date}),f(n,{util:{now:t,renderPos:e,renderSize:o,sqr:u,romanToArabic:c,arabicToRoman:s,memoize:h,isUnicodeLetter:r}}),i=RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]")}(),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("util/parse-xml.min",["kendo.core.min","util/main.min"],n)}(function(){"use strict";function n(n){for(var i=[],t=0;t<n.length;++t)i.push(n.charCodeAt(t));return i}function i(n,t){t>65535?(t-=65536,n.push(t>>>10&1023|55296,56320|1023&t)):n.push(t)}function c(n,c){function ct(t){var r=n[rt++];240&r^240?224&r^224?192&r^192?t.push(r):i(t,(31&r)<<6|63&n[rt++]):i(t,(15&r)<<12|(63&n[rt++])<<6|63&n[rt++]):i(t,(3&r)<<18|(63&n[rt++])<<12|(63&n[rt++])<<6|63&n[rt++])}function ft(n){throw Error(n+", at "+rt);}function dt(t){for(var i=[];rt<n.length&&t(n[rt]);)i.push(n[rt++]);return i}function at(n){return t.apply(0,dt(n))}function lt(){dt(ni)}function ut(t){for(var r=rt,i=0;i<t.length;++i)if(n[rt++]!=t[i])return rt=r,!1;return t}function st(n){ut(n)||ft("Expecting "+n.join(", "))}function ni(n){return 9==n||10==n||13==n||32==n}function wt(n){return n>=48&&n<=57}function fi(n){return n>=48&&n<=57||(n|=32)>=97&&n<=102}function bt(n){return 58==n||95==n||(n|=32)>=97&&n<=122}function gt(n){return 45==n||wt(n)||bt(n)}function ri(){for(var i=[];rt<n.length;){if(ut(k))return et("comment",t.apply(0,i));ct(i)}}function vt(){var n,t;ut(it)?ei():ut(d)?ri():(n=ht(),t=yt(n),ot.push(t),ut(w)?et("enter",n,t,!0):(st(e),et("enter",n,t),ii(n),n!=ht()&&ft("Bad closing tag"),et("leave",n,t),lt(),st(e)),ot.pop())}function ii(i){for(var u=[];rt<n.length;){if(ut(b))return u.length&&et("text",t.apply(0,u));if(ut(g))for(;rt<n.length&&!ut(tt);)ct(u);else ut(r)?(u.length&&et("text",t.apply(0,u)),vt(),u=[]):ut(f)?pt(u):ct(u)}ft("Unclosed tag "+i)}function ht(){return bt(n[rt])||ft("Expecting XML name"),at(gt)}function ui(){var i,r=ut(o)||ut(s);for(r||ft("Expecting string"),i=[];rt<n.length;){if(ut(r))return t.apply(0,i);ut(f)?pt(i):ct(i)}ft("Unfinished string")}function pt(n){var t,r;ut(v)?(t=ut(y)||ut(l)?parseInt(at(fi),16):parseInt(at(wt),10),isNaN(t)&&ft("Bad numeric entity")):(r=ht(),t=nt[r],void 0===t&&ft("Unknown entity "+r)),i(n,t),st(p)}function ei(){et("decl",ht(),yt()),st(a)}function yt(t){for(var i,r={$tag:t};rt<n.length&&(lt(),i=n[rt],63!=i&&62!=i&&47!=i);)r[ht()]=(st(h),ui());return r}function et(n,t,i,r){var u=c&&c[n];u&&u.call(ti,t,i,r)}var rt=0,ot=[],ti={is:function(n){for(var i=ot.length,t=n.length;--i>=0&&--t>=0;)if(ot[i].$tag!=n[t]&&"*"!=n[t])return!1;return t<0?ot[ot.length-1]:null},exit:function(){throw u;},stack:ot},kt=[];for(ct(kt),65279!=kt[0]&&(rt=0);rt<n.length;)lt(),st(r),vt(),lt()}var t=String.fromCharCode,nt={amp:38,lt:60,gt:62,quot:34,apos:39,nbsp:160},g=n("<![CDATA["),tt=n("]\]>"),k=n("-->"),d=n("!--"),w=n("/>"),b=n("</"),a=n("?>"),it=n("?"),r=n("<"),e=n(">"),p=n(";"),h=n("="),f=n("&"),o=n('"'),s=n("'"),v=n("#"),y=n("x"),l=n("X"),u={};kendo.util.parseXML=function(){try{return c.apply(this,arguments)}catch(n){if(n!==u)throw n;}}},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/commands.min",["kendo.core.min","kendo.binder.min","kendo.window.min","kendo.list.min","kendo.tabstrip.min"],n)}(function(){!function(n){function s(n){var t=document.createElement("textarea");i(t).addClass("k-spreadsheet-clipboard").val(n).appendTo(document.body).focus().select(),document.execCommand("copy"),i(t).remove()}var i,t,u,r,h,o,e,f;n.support.browser.msie&&n.support.browser.version<9||(i=n.jQuery,t=n.spreadsheet.Command=n.Class.extend({init:function(n){this.options=n,this._workbook=n.workbook,this._property=n&&n.property,this._state={}},range:function(n){return void 0!==n&&this._setRange(n),this._range},_setRange:function(n){this._range=n},redo:function(){this.exec()},undo:function(){this.setState(this._state)},getState:function(){this._state=this.range().getState(this._property)},setState:function(n){this.range().setState(n)},_forEachCell:function(n){var t=this.range(),i=t._ref;i.forEach(function(i){t.sheet().forEach(i.toRangeRef(),n.bind(this))}.bind(this))}}),u=t.extend({init:function(n){t.fn.init.call(this,n),this._target=n.target,this._value=n.value},exec:function(){this.getState(),this.setState(this._value)}}),n.spreadsheet.ColumnWidthCommand=u.extend({getState:function(){this._state=this.range().sheet().columnWidth(this._target)},setState:function(n){this.range().sheet().columnWidth(this._target,n)}}),n.spreadsheet.RowHeightCommand=u.extend({getState:function(){this._state=this.range().sheet().rowHeight(this._target)},setState:function(n){this.range().sheet().rowHeight(this._target,n)}}),n.spreadsheet.HyperlinkCommand=t.extend({init:function(n){t.fn.init.call(this,n),this._link=n.link},exec:function(){var n=this.range();this._prevLink=n.link(),this._prevUnderline=n.underline(),n.link(this._link),n.underline(!0),null==n.value()&&(this._hasSetValue=!0,n.value(this._link))},undo:function(){var n=this.range();n.link(this._prevLink),n.underline(this._prevUnderline),this._hasSetValue&&n.value(null)}}),n.spreadsheet.GridLinesChangeCommand=u.extend({getState:function(){this._state=this._range.sheet().showGridLines()},setState:function(n){this._range.sheet().showGridLines(n)}}),r=n.spreadsheet.PropertyChangeCommand=t.extend({_setRange:function(n){t.prototype._setRange.call(this,n.skipHiddenCells())},init:function(n){t.fn.init.call(this,n),this._value=n.value},exec:function(){var n=this.range();n.enable()&&(this.getState(),"format"===this.options.property&&this._workbook.trigger("changeFormat",{range:n}),n[this._property](this._value))}}),n.spreadsheet.ClearContentCommand=t.extend({exec:function(){this.getState(),this.range().clearContent()}}),n.spreadsheet.EditCommand=r.extend({init:function(n){n.property=n.property||"input",r.fn.init.call(this,n)},rejectState:function(n){return this.undo(),{title:n.title,body:n.message,reason:"error",type:"validationError"}},getState:function(){this._state=this.range().getState()},exec:function(){var i,r,t=this.range();if(!t.enable())return{reason:"error",type:"rangeDisabled"};if(i=this._value,this.getState(),"value"==this._property)return void t.value(i);try{if(t.link(null),""===i?t.value(null):(t.input(i),/\n/.test(t.value())&&t.wrap(!0)),t._adjustRowHeight(),r=t._getValidationState())return this.rejectState(r)}catch(u){if(u instanceof n.spreadsheet.calc.ParseError)return{title:"Error in formula",body:u+"",reason:"error"};throw u;}}}),n.spreadsheet.TextWrapCommand=r.extend({init:function(n){n.property="wrap",r.fn.init.call(this,n),this._value=n.value},getState:function(){var n={};this.range().forEachRow(function(t){var i=t.topLeft().row;n[i]=t.sheet().rowHeight(i)}),this._state=this.range().getState(this._property),this._rowHeight=n},undo:function(){var n,i=this.range().sheet(),t=this._rowHeight;this.range().setState(this._state);for(n in t)i.rowHeight(n,t[n])}}),n.spreadsheet.AdjustDecimalsCommand=t.extend({init:function(n){this._decimals=n.value,n.property="format",t.fn.init.call(this,n)},exec:function(){var i=this.range().sheet(),t=this._decimals,r=n.spreadsheet.formatting;this.getState(),i.batch(function(){this.range().forEachCell(function(n,u,f){var e=f.format;(e||t>0)&&(e=r.adjustDecimals(e||"#",t),i.range(n,u).format(e))})}.bind(this))}}),n.spreadsheet.BorderChangeCommand=t.extend({init:function(n){n.property="border",t.fn.init.call(this,n),this._type=n.border,this._style=n.style},_batch:function(n){return this.range().sheet().batch(n,{})},exec:function(){var n=this;n.getState(),n._batch(function(){n[n._type](n._style)})},noBorders:function(){this.range().insideBorders(null),this.outsideBorders(null)},allBorders:function(n){this.range().insideBorders(n),this.outsideBorders(n)},leftBorder:function(n){this.range().leftColumn().borderLeft(n)},rightBorder:function(n){this.range().rightColumn().borderRight(n)},topBorder:function(n){this.range().topRow().borderTop(n)},bottomBorder:function(n){this.range().bottomRow().borderBottom(n)},outsideBorders:function(n){var t=this.range();t.leftColumn().borderLeft(n),t.topRow().borderTop(n),t.rightColumn().borderRight(n),t.bottomRow().borderBottom(n)},insideBorders:function(n){this.range().insideBorders(n),this.outsideBorders(null)},insideHorizontalBorders:function(n){this.range().insideHorizontalBorders(n)},insideVerticalBorders:function(n){this.range().insideVerticalBorders(n)}}),n.spreadsheet.MergeCellCommand=t.extend({init:function(n){t.fn.init.call(this,n),this._type=n.value},exec:function(){this.getState(),this[this._type]()},activate:function(n){this.range().sheet().activeCell(n)},getState:function(){this._state=this.range().getState()},undo:function(){"unmerge"!==this._type&&(this.range().unmerge(),this.activate(this.range().topLeft())),this.range().setState(this._state)},cells:function(){var n=this.range(),t=n._ref;n.merge(),this.activate(t)},horizontally:function(){var n=this.range().topRow()._ref;this.range().forEachRow(function(n){n.merge()}),this.activate(n)},vertically:function(){var n=this.range().leftColumn()._ref;this.range().forEachColumn(function(n){n.merge()}),this.activate(n)},unmerge:function(){var n=this.range(),t=n._ref.topLeft;n.unmerge(),this.activate(t)}}),n.spreadsheet.FreezePanesCommand=t.extend({init:function(n){t.fn.init.call(this,n),this._type=n.value},exec:function(){this.getState(),this._topLeft=this.range().topLeft(),this[this._type]()},getState:function(){this._state=this.range().sheet().getState()},undo:function(){this.range().sheet().setState(this._state)},panes:function(){var n=this._topLeft,t=this.range().sheet();t.frozenColumns(n.col).frozenRows(n.row)},rows:function(){var t=this._topLeft,n=this.range().sheet();n.frozenRows(t.row)},columns:function(){var t=this._topLeft,n=this.range().sheet();n.frozenColumns(t.col)},unfreeze:function(){var n=this.range().sheet();n.frozenRows(0).frozenColumns(0)}}),n.spreadsheet.PasteCommand=t.extend({init:function(n){t.fn.init.call(this,n),this._clipboard=n.workbook.clipboard(),this._event=n.event},getState:function(){this._range=this._workbook.activeSheet().range(this._clipboard.pasteRef()),this._state=this._range.getState()},exec:function(){var n,t,i;return this.getState(),this._clipboard.parse(),n=this._clipboard.canPaste(),n.canPaste?(t=this._workbook.activeSheet().selection(),i=this._workbook.trigger("paste",{range:t}),void(i?this._event.preventDefault():(this._clipboard.paste(),t._adjustRowHeight()))):n.menuInvoked?{reason:"error",type:"useKeyboard"}:n.pasteOnMerged?{reason:"error",type:"modifyMerged"}:n.overflow?{reason:"error",type:"overflow"}:n.pasteOnDisabled?(this._event.preventDefault(),{reason:"error",type:"cannotModifyDisabled"}):{reason:"error"}}}),n.spreadsheet.AdjustRowHeightCommand=t.extend({exec:function(){var n=this.options,i=this._workbook.activeSheet(),t=n.range||i.range(n.rowIndex);t._adjustRowHeight()}}),n.spreadsheet.ToolbarPasteCommand=t.extend({exec:function(){return n.support.clipboard.paste?(this._workbook._view.clipboard.focus().select(),void document.execCommand("paste")):{reason:"error",type:"useKeyboard"}}}),n.spreadsheet.CopyCommand=t.extend({init:function(n){t.fn.init.call(this,n),this._clipboard=n.workbook.clipboard(),this._event=n.event},undo:i.noop,exec:function(){var t,i,n=this._clipboard.canCopy();if(this._clipboard.menuInvoked=!0,n.canCopy)t=this._workbook.activeSheet().selection(),i=this._workbook.trigger("copy",{range:t}),i?this._event.preventDefault():this._clipboard.copy();else{if(n.menuInvoked)return{reason:"error",type:"useKeyboard"};if(n.multiSelection)return{reason:"error",type:"unsupportedSelection"}}}}),n.spreadsheet.ToolbarCopyCommand=t.extend({init:function(n){t.fn.init.call(this,n),this._clipboard=n.workbook.clipboard()},undo:i.noop,exec:function(){if(!n.support.clipboard.copy)return{reason:"error",type:"useKeyboard"};var t=this._workbook._view.clipboard;s(t.html()),t.trigger("copy")}}),n.spreadsheet.CutCommand=t.extend({init:function(n){t.fn.init.call(this,n),this._clipboard=n.workbook.clipboard(),this._event=n.event},exec:function(){var n,t;return this.range().enable()&&this._clipboard.canCopy()?(this.getState(),n=this._workbook.activeSheet().selection(),(t=this._workbook.trigger("cut",{range:n}))?void this._event.preventDefault():void this._clipboard.cut()):(this._event.preventDefault(),{reason:"error",type:"cannotModifyDisabled"})}}),n.spreadsheet.AutoFillCommand=t.extend({init:function(n){t.fn.init.call(this,n)},origin:function(n){this._origin=n},exec:function(){var t=this.range();if(!t.enable())return{reason:"error",type:"rangeDisabled"};this.getState();try{t.fillFrom(this._origin)}catch(i){if(i instanceof n.spreadsheet.Range.FillError)return{reason:"error",type:i.code};throw i;}}}),n.spreadsheet.ToolbarCutCommand=t.extend({init:function(n){t.fn.init.call(this,n),this._clipboard=n.workbook.clipboard()},exec:function(){if(!n.support.clipboard.copy)return{reason:"error",type:"useKeyboard"};var t=this._workbook._view.clipboard;s(t.html()),t.trigger("cut")}}),n.spreadsheet.FilterCommand=t.extend({undo:function(){this.range().filter(this._state)},exec:function(){var n=this.range();this._state=n.hasFilter(),n.filter(!this._state)}}),n.spreadsheet.SortCommand=t.extend({undo:function(){var n=this.range().sheet();n.setState(this._state)},exec:function(){var i,n=this.range(),t=n.sheet(),f=t.activeCell(),u=this.options.sheet?f.topLeft.col:this.options.column||0,r="asc"===this.options.value;return this._state=t.getState(),this.options.sheet&&(n=this.expandRange()),(i=n.cantSort())?{reason:"error",type:i.code}:void n.sort({column:u,ascending:r})},expandRange:function(){var t=this.range().sheet();return new n.spreadsheet.Range(t._sheetRef,t)}}),h=n.spreadsheet.ApplyFilterCommand=t.extend({column:function(){return this.options.column||0},undo:function(){var n=this.range().sheet();n.clearFilter(this.column()),this._state.length&&this.range().filter(this._state)},getState:function(){var t=this.range().sheet(),n=t.filter();n&&(this._state=n.columns.filter(function(n){return n.index==this.column()}.bind(this)))},exec:function(){var u,i,f=this.range(),r=this.column(),t=f.sheet().filter(),e=!1;this.options.valueFilter?i={column:r,filter:new n.spreadsheet.ValueFilter(this.options.valueFilter)}:this.options.customFilter&&(i={column:r,filter:new n.spreadsheet.CustomFilter(this.options.customFilter)}),this.getState(),t&&t.ref.eq(f._ref)&&t.columns.length?(t.columns.forEach(function(n){n.index===r&&(e=!0)}),u=t.columns.map(function(n){return n.index===r?i:{column:n.index,filter:n.filter}}),e||u.push(i)):u=i,f.filter(u)}}),n.spreadsheet.ClearFilterCommand=h.extend({exec:function(){var t=this.range(),n=this.column();this.getState(),t.clearFilter(n)}}),n.spreadsheet.HideLineCommand=t.extend({init:function(n){t.fn.init.call(this,n),this.axis=n.axis},undo:function(){var n=this.range().sheet();n.setAxisState(this._state)},exec:function(){var n=this.range().sheet();this._state=n.getAxisState(),"row"==this.axis?n.axisManager().hideSelectedRows():n.axisManager().hideSelectedColumns()}}),n.spreadsheet.UnHideLineCommand=n.spreadsheet.HideLineCommand.extend({exec:function(){var n=this.range().sheet();this._state=n.getAxisState(),"row"==this.axis?n.axisManager().unhideSelectedRows():n.axisManager().unhideSelectedColumns()}}),o=n.spreadsheet.DeleteCommand=t.extend({undo:function(){var n=this.range().sheet();n.setState(this._state)}}),n.spreadsheet.DeleteRowCommand=o.extend({exec:function(){var n=this.range().sheet();this._state=n.getState(),n.axisManager().deleteSelectedRows()}}),n.spreadsheet.DeleteColumnCommand=o.extend({exec:function(){var n=this.range().sheet();this._state=n.getState(),n.axisManager().deleteSelectedColumns()}}),e=t.extend({init:function(n){t.fn.init.call(this,n),this._value=n.value},undo:function(){var n=this.range().sheet();n.setState(this._state)}}),n.spreadsheet.AddColumnCommand=e.extend({exec:function(){var n=this.range().sheet(),t=n.axisManager().preventAddColumn();return t?t:(this._state=n.getState(),void("left"===this._value?n.axisManager().addColumnLeft():n.axisManager().addColumnRight()))}}),n.spreadsheet.AddRowCommand=e.extend({exec:function(){var n=this.range().sheet(),t=n.axisManager().preventAddRow();return t?t:(this._state=n.getState(),void("above"===this._value?n.axisManager().addRowAbove():n.axisManager().addRowBelow()))}}),n.spreadsheet.EditValidationCommand=t.extend({init:function(n){t.fn.init.call(this,n),this._value=n.value},exec:function(){this.range().validation(this._value)}}),n.spreadsheet.OpenCommand=t.extend({cannotUndo:!0,exec:function(){var n,t=this.options.file;return null===t.name.match(/.xlsx$/i)?{reason:"error",type:"openUnsupported"}:(n=this.options.workbook,void n.fromFile(this.options.file).then(function(){var t=n.excelImportErrors;t&&t.length&&n._view.openDialog("importError",{errors:t})}))}}),n.spreadsheet.SaveAsCommand=t.extend({exec:function(){var n=this.options.name+this.options.extension;".xlsx"===this.options.extension?this.options.workbook.saveAsExcel({fileName:n}):".pdf"===this.options.extension&&this.options.workbook.saveAsPDF(i.extend(this.options.pdf,{workbook:this.options.workbook,fileName:n}))}}),f=t.extend({init:function(n){t.fn.init.call(this,n),this._name=n.name,this._value=n.value},getState:function(){this._state=this._workbook.nameDefinition(this._name)},setState:function(){this._workbook.nameDefinition(this._name,this._state),this._workbook.trigger("change",{recalc:!0})}}),n.spreadsheet.DefineNameCommand=f.extend({exec:function(){this.getState();try{this._workbook.defineName(this._name,this._value),this._workbook.trigger("change",{recalc:!0})}catch(n){return{title:"Error",body:n+"",reason:"error"}}}}),n.spreadsheet.DeleteNameCommand=f.extend({exec:function(){this.getState(),this._workbook.undefineName(this._name),this._workbook.trigger("change",{recalc:!0})}}))}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/formulabar.min",["kendo.core.min"],n)}(function(){!function(n){var i,r,t;n.support.browser.msie&&n.support.browser.version<9||(i=n.jQuery,r={wrapper:"k-spreadsheet-formula-bar"},t=n.ui.Widget.extend({init:function(r,u){n.ui.Widget.call(this,r,u),r=this.element.addClass(t.classNames.wrapper),this.formulaInput=new n.spreadsheet.FormulaInput(i("<div/>").appendTo(r))},destroy:function(){this.formulaInput&&this.formulaInput.destroy(),this.formulaInput=null}}),n.spreadsheet.FormulaBar=t,i.extend(!0,t,{classNames:r}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/formulainput.min",["kendo.core.min"],n)}(function(){!function(n,t){function a(n){return"("==n||"["==n||"{"==n}function w(n){return")"==n||"]"==n||"}"==n}function p(n,t){return"("==t?")"==n:"["==t?"]"==n:"{"==t&&"}"==n}function r(n,t){return n.begin<=t.begin&&n.end>=t.end}function v(t){return n.spreadsheet.calc.runtime.FUNCS[t.toLowerCase()]}function y(n,t){return!(!n||!t)&&("ref"==n.type&&"ref"==t.type?n.ref.eq(t.ref):n.value===t.value)}var f,o,e,i,s,c,h,l,u;n.support.browser.msie&&n.support.browser.version<9||(f=n.jQuery,o=n.ui.Widget,e=".kendoFormulaInput",i=n.keys,s={wrapper:"k-spreadsheet-formula-input",listWrapper:"k-spreadsheet-formula-list"},c=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],h={27:"esc",37:"left",39:"right",35:"end",36:"home",32:"spacebar"},l=/(^_|[^a-z0-9]$)/i,u=o.extend({init:function(n,t){o.call(this,n,t),n=this.element,n.addClass(u.classNames.wrapper).attr("contenteditable",!0).attr("spellcheck",!1).css("white-space","pre"),this.options.autoScale&&n.on("input",this.scale.bind(this)),this._highlightedRefs=[],this._staticTokens=[],this._formulaSource(),this._formulaList(),this._popup(),this._tooltip(),n.on("keydown",this._keydown.bind(this)).on("keyup",this._keyup.bind(this)).on("blur",this._blur.bind(this)).on("input click",this._input.bind(this)).on("focus",this._focus.bind(this)).on("paste",this._paste.bind(this))},options:{name:"FormulaInput",autoScale:!1,filterOperator:"startswith",scalePadding:30,minLength:1},events:["keyup","focus"],enable:function(n){return void 0===n?"true"===this.element.attr("contenteditable"):(n?this.element.attr("contenteditable",n):this.element.removeAttr("contenteditable"),void this.element.toggleClass("k-state-disabled",!n))},getPos:function(){function f(n,t){try{!function i(r){if(r===n)throw t;if(1==r.nodeType)for(var u=r.firstChild;u;u=u.nextSibling)i(u);else 3==r.nodeType&&(t+=r.nodeValue.length)}(e)}catch(r){return r}}var u,e=this.element[0],r=t.getSelection(),n=f(r.focusNode,r.focusOffset),i=f(r.anchorNode,r.anchorOffset);if(null!=n&&null!=i)return n>i&&(u=n,n=i,i=u),{begin:n,end:i,collapsed:n==i}},setPos:function(n,i){function s(n,t){return n.startOffset!=t.startOffset||n.endOffset!=t.endOffset||n.startContainer!=t.endContainer||n.endContainer!=t.endContainer}function o(n,t){try{!function i(n){var u,r;if(3==n.nodeType){if(u=n.nodeValue.length,u>=t)throw n;t-=u}else if(1==n.nodeType)for(r=n.firstChild;r;r=r.nextSibling)i(r)}(n)}catch(r){return{node:r,pos:t}}}var r,u,e,f=this.element[0];n=o(f,n),i=null!=i?o(f,i):n,n&&i&&(r=document.createRange(),r.setStart(n.node,n.pos),r.setEnd(i.node,i.pos),u=t.getSelection(),e=u.getRangeAt(0),s(r,e)&&(u.removeAllRanges(),u.addRange(r)))},end:function(){this.setPos(this.length())},home:function(){this.setPos(0)},select:function(){this.setPos(0,this.length())},length:function(){return this.value().length},_formulaSource:function(){var i,t,r=[];for(t in n.spreadsheet.calc.runtime.FUNCS)l.test(t)||(i=t.toUpperCase(),r.push({value:i,text:i}));this.formulaSource=new n.data.DataSource({data:r})},_formulaList:function(){this.list=new n.ui.StaticList(f("<ul />").addClass(u.classNames.listWrapper).insertAfter(this.element),{autoBind:!1,selectable:!0,change:this._formulaListChange.bind(this),dataSource:this.formulaSource,dataValueField:"value",template:"#:data.value#"}),this.list.element.on("mousedown",function(n){n.preventDefault()})},_formulaListChange:function(){var t,i,r,n=this._tokenContext();n&&!this._mute&&(t=n.token,i=this.list.value()[0],r={replace:!0,token:t,end:t.end},n.nextToken&&"("==n.nextToken.value||(i+="("),this._replaceAt(r,i),this.popup.close())},_popup:function(){this.popup=new n.ui.Popup(this.list.element,{anchor:this.element})},_blur:function(){this.popup.close(),clearTimeout(this._focusId),this.trigger("blur")},_isFormula:function(){return/^=/.test(this.value())},_keydown:function(n){var t=n.keyCode;h[t]?(this.popup.close(),this._navigated=!0):this._move(t)&&(this._navigated=!0,n.preventDefault()),this._keyDownTimeout=setTimeout(this._syntaxHighlight.bind(this))},_keyup:function(){var t,n=this.popup;this._isFormula()&&!this._navigated&&(t=((this._tokenContext()||{}).token||{}).value,this.filter(t),t&&this.formulaSource.view().length?(n[n.visible()?"position":"open"](),this.list.focusFirst()):n.close()),this._navigated=!1,this._syntaxHighlight(),this.trigger("keyup")},_input:function(){this._syntaxHighlight()},_focus:function(){this._focusTimeout=setTimeout(this._syntaxHighlight.bind(this)),this.trigger("focus")},_paste:function(i){var u,f,r;i.preventDefault(),u=this.getPos(),f=n.support.browser.msie?t.clipboardData.getData("Text"):i.originalEvent.clipboardData.getData("text/plain"),r=this.value(),r=r.substr(0,u.begin)+f+r.substr(u.end),this.value(r),this.setPos(u.begin+f.length),this.scale()},_move:function(n){var t=this.list,r=this.popup;if(r.visible()){if(n===i.DOWN)return t.focusNext(),t.focus()||t.focusFirst(),!0;if(n===i.UP)return t.focusPrev(),t.focus()||t.focusLast(),!0;if(n===i.ENTER||n===i.TAB)return t.select(t.focus()),r.close(),!0;if(n===i.PAGEUP)return t.focusFirst(),!0;if(n===i.PAGEDOWN)return t.focusLast(),!0}return n===i.ENTER||n===i.TAB},_tokenContext:function(){var i,u,t,f=this.getPos(),e=this.value();if(!e||!f||!f.collapsed)return null;for(i=n.spreadsheet.calc.tokenize(e,this.row(),this.col()),t=0;t<i.length;++t)if(u=i[t],r(u,f)&&/^(?:str|sym|func)$/.test(u.type))return{token:u,nextToken:i[t+1]};return null},_sync:function(){this._editorToSync&&this.isActive()&&this._editorToSync.value(this.value())},_textContainer:function(){var t=n.getComputedStyles(this.element[0],c);t.position="absolute",t.visibility="hidden",t.whiteSpace="pre",t.top=-3333,t.left=-3333,this._span=f("<span style='white-space: pre'/>").css(t).insertAfter(this.element)},_tooltip:function(){this._cellTooltip=f('<div class="k-widget k-tooltip" style="position:absolute; display:none">A1</div>').insertAfter(this.element)},tooltip:function(n){this._cellTooltip.text(n)},toggleTooltip:function(n){this._cellTooltip.toggle(n)},isActive:function(){return this.element[0]===n._activeElement()},filter:function(n){!n||n.length<this.options.minLength||(this._mute=!0,this.list.select(-1),this._mute=!1,this.formulaSource.filter({field:this.list.options.dataValueField,operator:this.options.filterOperator,value:n}))},hide:function(){this.enable(!1),this.element.hide(),this._cellTooltip.hide()},show:function(){this.enable(!0),this.element.show()},row:function(){if(this.activeCell)return this.activeCell.row},col:function(){if(this.activeCell)return this.activeCell.col},position:function(n){n&&(this.show(),this.element.css({top:n.top+1+"px",left:n.left+1+"px"}),this._cellTooltip.css({top:n.top-this._cellTooltip.height()-10+"px",left:n.left}))},resize:function(n){n&&this.element.css({width:n.width-1,height:n.height-1})},canInsertRef:function(n){var t,i=this._canInsertRef(n),r=i&&i.token;if(r)for(t=0;t<this._staticTokens.length;t++)if(y(r,this._staticTokens[t]))return null;return i},_canInsertRef:function(t){function h(n){return n.begin>i.begin}function c(n){if(n){if(/^(?:num|str|bool|sym|ref)$/.test(n.type))return{replace:!0,token:n,end:n.end};if(/^(?:op|punc|startexp)$/.test(n.type))return n.end==i.end?o(n,f[u+1]):o(f[u-1],n)}}function o(n,t){if(null==n)return null;if(null==t)return/^(?:op|startexp)$/.test(n.type)||a(n.value)?{token:n,end:i.end}:null;if(s){if("op"==n.type&&/^(?:punc|op)$/.test(t.type))return{token:n,end:i.end}}else{if("startexp"==n.type)return{token:n,end:i.end};if(/^(?:ref|op|punc)$/.test(n.type))return{token:n,end:i.end};if(/^(?:punc|op)$/.test(n.type))return/^[,;({]$/.test(n.value)?{token:n,end:i.end}:null}return!1}var s,i,f,e,u;if(this.popup.visible())return null;if(s=t,i=this.getPos(),i&&this._isFormula()){if(0===i.begin)return null;for(f=n.spreadsheet.calc.tokenize(this.value(),this.row(),this.col()),u=0;u<f.length;++u){if(e=f[u],r(e,i))return c(e);if(h(e))return o(f[u-1],e)}return o(e,null)}return null},refAtPoint:function(n){var t=this._canInsertRef();t&&this._replaceAt(t,""+n.simplify())},_replaceAt:function(n,t){var r,i=this.value(),f=n.token,u=i.substr(n.end);i=i.substr(0,n.replace?f.begin:n.end)+t,r=i.length,i+=u,this._value(i),this.setPos(r),this.scale(),this._syntaxHighlight(),this._sync()},syncWith:function(t){var f,i=this,r="input"+e,u=i._sync.bind(i);n.support.browser.msie&&(r="keydown"+e,f=function(){setTimeout(u)}),i._editorToSync=t,i.element.off(r).on(r,f||u)},scale:function(){var t,i,n=this.element;this._span||this._textContainer(),this._span.html(n.html()),t=this._span.width()+this.options.scalePadding,i=this._span.height(),t>n.width()&&n.width(t),i>n.height()&&n.height(i)},_value:function(n){this.element.text(n)},value:function(n){if(void 0===n){var t=this.element[0].innerText;return t.replace(/\n$/,"")}this._value(n),this._syntaxHighlight()},highlightedRefs:function(){return this._highlightedRefs.slice()},_syntaxHighlight:function(){var f,t=this.getPos(),i=this.value(),o=n.spreadsheet.Pane.classNames.series,s=[],h=0,e=[],u=[];if(!t||t.collapsed){if(!/^=/.test(i))return(this._staticTokens.length||this._highlightedRefs.length)&&(this._staticTokens=[],this._highlightedRefs=[],this.element.text(i)),void(this.popup&&this.popup.close());u=n.spreadsheet.calc.tokenize(i,this.row(),this.col()),u.forEach(function(n){if(n.active=!1,n.cls=["k-syntax-"+n.type],"ref"==n.type&&(n.colorClass=o[h++%o.length],n.cls.push(n.colorClass),s.push(n)),t&&"punc"==n.type)if(a(n.value))e.unshift(n);else if(w(n.value)){var i=e.shift();i?p(n.value,i.value)?(r(n,t)||r(i,t))&&(n.cls.push("k-syntax-paren-match"),i.cls.push("k-syntax-paren-match")):(n.cls.push("k-syntax-error"),i.cls.push("k-syntax-error")):n.cls.push("k-syntax-error")}t&&r(n,t)&&(n.cls.push("k-syntax-at-point"),n.active=!0,f=n),"func"!=n.type||v(n.value)||t&&r(n,t)||n.cls.push("k-syntax-error")}),u.reverse().forEach(function(t){var u=t.begin,r=t.end,f=n.htmlEncode(i.substring(u,r));i=i.substr(0,u)+"<span class='"+t.cls.join(" ")+"'>"+f+"</span>"+i.substr(r)}),this.element.html(i),t&&this.setPos(t.begin,t.end),f&&/^(?:startexp|op|punc)$/.test(f.type)&&this._setStaticTokens(u),this._highlightedRefs=s}},_setStaticTokens:function(n){var t,i;for(this._staticTokens=[],t=0;t<n.length;t++)i=n[t],/^(?:num|str|bool|sym|ref)$/.test(i.type)&&this._staticTokens.push(i)},destroy:function(){this._editorToSync=null,this.element.off(e),clearTimeout(this._focusTimeout),clearTimeout(this._keyDownTimeout),this._cellTooltip=null,this._span=null,this.popup.destroy(),this.popup=null,o.fn.destroy.call(this)},insertNewline:function(){var n=this.value(),t=this.getPos(),i=t.end==n.length;n=n.substr(0,t.begin)+(i?"\n\n":"\n"+n.substr(t.end)),this.value(n),this.setPos(t.begin+1)}}),n.spreadsheet.FormulaInput=u,f.extend(!0,u,{classNames:s}))}(kendo,window)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/eventlistener.min",["kendo.core.min"],n)}(function(){!function(n){var t,f,e,u,i,r;n.support.browser.msie&&n.support.browser.version<9||(t=n.jQuery,f={8:"backspace",9:"tab",13:"enter",27:"esc",37:"left",38:"up",39:"right",40:"down",35:"end",36:"home",32:"spacebar",33:"pageup",34:"pagedown",46:"delete",113:":edit"},e=navigator.platform.toUpperCase().indexOf("MAC")>=0,u=function(n){return n>47&&n<58||n>64&&n<91||n>95&&n<112||n>185&&n<193||n>218&&n<223},i=function(n){var i=n.keyCode,t=f[i];return!t&&u(i)&&(t=":alphanum"),!t&&n.key&&1==n.key.length&&(t=":alphanum"),t},r=n.Class.extend({init:function(n,i,r){if(this._handlers={},this.target=n,this._observer=i||window,this.keyDownProxy=this.keyDown.bind(this),this.mouseProxy=this.mouse.bind(this),this.threshold=5,this._pressLocation=null,n.on("keydown",this.keyDownProxy),n.on("contextmenu mousedown cut copy paste scroll wheel click dblclick focus",this.mouseProxy),t(document.documentElement).on("mousemove mouseup",this.mouseProxy),r)for(var u in r)this.on(u,r[u])},keyDown:function(n){this.handleEvent(n,i(n.originalEvent))},mouse:function(n){var i,t,u,r,f;n.which?i=3==n.which:n.button&&(i=2==n.button),t=n.type,"mousedown"===t&&(i?t="rightmousedown":this._pressLocation={x:n.pageX,y:n.pageY}),"mouseup"===t&&(i||(this._pressLocation=null)),"mousemove"===t&&this._pressLocation&&(u=this._pressLocation.x-n.pageX,r=this._pressLocation.y-n.pageY,f=Math.sqrt(u*u+r*r),f>this.threshold&&(t="mousedrag")),this.handleEvent(n,t)},handleEvent:function(n,t){var r,u,i="";n.mod=e?n.metaKey:n.ctrlKey&&!n.altKey,n.altKey&&(i+="alt+"),n.shiftKey&&(i+="shift+"),n.ctrlKey&&(i+="ctrl+"),i+=t,r=this._handlers["*+"+t],r&&r.call(this._observer,n,i),u=this._handlers[i],u&&u.call(this._observer,n,i)},on:function(n,t){var i=this._handlers;"string"==typeof t&&(t=this._observer[t]),"string"==typeof n&&(n=n.split(",")),n.forEach(function(n){i[n]=t})},destroy:function(){this.target.off("keydown",this.keyDownProxy),this.target.off("keydown",this.mouseProxy),t(document.documentElement).off("mousemove mouseup",this.mouseProxy)}}),n.spreadsheet.EventListener=r)}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/rangelist.min",["kendo.core.min"],n)}(function(){!function(n){function p(n){return n}function e(n){if(n.left.level===n.level){var t=n;n=n.left,t.left=n.right,n.right=t}return n}function h(n){if(n.right.right.level===n.level){var t=n;n=n.right,t.right=n.left,n.left=t,n.level+=1}return n}function s(n,i){return n===t?new y(1,i,t,t):(n.value.start>i.start?n.left=s(n.left,i):n.right=s(n.right,i),h(e(n)))}function f(n,i){var u,r;if(n===t)return n;if(u=n.value.start-i.start,0===u)if(n.left!==t&&n.right!==t){for(r=n.left;r.right!==t;)r=r.right;n.value=r.value,n.left=f(n.left,n.value)}else n=n.left===t?n.right:n.left;else u>0?n.left=f(n.left,i):n.right=f(n.right,i);return(n.left.level<n.level-1||n.right.level<n.level-1)&&(n.level-=1,n.right.level>n.level&&(n.right.level=n.level),n=e(n),n.right=e(n.right),n.right.right=e(n.right.right),n=h(n),n.right=h(n.right)),n}function c(n,i){n!==t&&(c(n.left,i),i.push(n.value),c(n.right,i))}function l(n,i,r){if(n!==t){var u=n.value;i.start<u.start&&l(n.left,i,r),u.intersects(i)&&r.push(u),i.end>u.end&&l(n.right,i,r)}}function o(n,i,r){i!==t&&(o(n,i.left,r),n.insert(r(i.value)),o(n,i.right,r))}var y,t,i,r,u,a,v;n.support.browser.msie&&n.support.browser.version<9||(y=n.Class.extend({init:function(n,t,i,r){this.level=n,this.value=t,this.left=i,this.right=r}}),t=new function(){this.left=this,this.right=this,this.level=0},i=n.Class.extend({init:function(n,t,i){this.start=n,this.end=t,this.value=i},intersects:function(n){return n.start<=this.end&&n.end>=this.start}}),r=n.Class.extend({init:function(){this.root=t},insert:function(n){this.root=s(this.root,n)},remove:function(n){this.root=f(this.root,n)},findrange:function(n){for(var i=this.root;i!=t;)if(n<i.value.start)i=i.left;else{if(!(n>i.value.end))return i.value;i=i.right}return null},values:function(){var n=[];return c(this.root,n),n},intersecting:function(n,t){var r=[];return l(this.root,new i(n,t),r),r},map:function(n){var t=new r;return o(t,this.root,n),t},clone:function(){return this.map(p)},first:function(){for(var n=this.root;n.left!=t;)n=n.left;return n},last:function(){for(var n=this.root;n.right!=t;)n=n.right;return n}}),u=n.Class.extend({init:function(n,t,u){void 0===t?this.tree=n:(this.tree=new r,this.tree.insert(new i(n,t,u)))},values:function(){return this.tree.values()},map:function(n){return new u(this.tree.map(n))},intersecting:function(n,t){return this.tree.intersecting(n,t)},first:function(){return this.tree.first().value},last:function(){return this.tree.last().value},insert:function(n,t,r){return this.tree.insert(new i(n,t,r))},value:function(n,t,i){var r,h,s,c,l,f,u,o,e;if(void 0===i)return void 0===t&&(t=n),this.intersecting(n,t)[0].value;if(r=this.tree.intersecting(n-1,t+1),r.length)for(h=r[0],s=r[r.length-1],h.end<n&&(h.value===i?n=h.start:r.shift()),s.start>t&&(s.value===i?t=s.end:r.pop()),c=0,l=r.length;c<l;c++)f=r[c],u=f.value,o=f.start,e=f.end,this.tree.remove(f),o<n&&(u!==i?this.insert(o,n-1,u):n=o),e>t&&(u!==i?this.insert(t+1,e,u):t=e);this.insert(n,t,i)},expandedValues:function(n,t){for(var u=this.intersecting(n,t),f=[],r=0,i=n;i<=t;i++)u[r].end<i&&r++,f.push({index:i-n,value:u[r].value});return f},sortedIndices:function(n,t,i,r){var f=this.expandedValues(n,t),u=function(n,t){return n.value===t.value?n.index-t.index:i(n.value,t.value)};return r&&(u=function(n,t){var f=r[n.index],u=r[t.index];return f.value===u.value?i(n.value,t.value):n.index-t.index}),f.sort(u),f},sort:function(n,t,i){var f,r,u;if(1!==this.intersecting(n,t).length)for(f=this.expandedValues(n,t),r=0,u=i.length;r<u;r++)this.value(r+n,r+n,f[i[r].index].value)},copy:function(n,t,i){for(var s,e,f,u=this.intersecting(n,t),o=i,r=0,h=u.length;r<h;r++)e=u[r].start,e<n&&(e=n),f=u[r].end,f>t&&(f=t),s=o+(f-e),this.value(o,s,u[r].value),o=++s},iterator:function(n,t){return new a(n,t,this.intersecting(n,t))},getState:function(){return this.tree.clone()},setState:function(n){this.tree=n}}),a=n.Class.extend({init:function(n,t,i){this.start=n,this.end=t,this.index=0,this.ranges=i},unique:function(){return this.ranges.map(function(n){return n.value})},at:function(n){for(;this.ranges[this.index].end<n;)this.index++;return this.ranges[this.index].value},forEach:function(n){for(var t=this.start;t<=this.end;t++)n(this.at(t),t);this.index=0}}),v=u.extend({init:function(n,t,u){this.tree=new r,this.range=new i(n,t,u)},intersecting:function(n,t){var r,f,o,e=this.tree.intersecting(n,t),u=[];if(!e.length)return[this.range];for(f=0,o=e.length;f<o;f++)r=e[f],r.start>n&&u.push(new i(n,r.start-1,this.range.value)),u.push(r),n=r.end+1;return r.end<t&&u.push(new i(r.end+1,t,this.range.value)),u},insert:function(n,t,r){r!==this.range.value&&this.tree.insert(new i(n,t,r))},lastRangeStart:function(){var n=this.tree.root;if(n===t)return this.range.start;for(;n.right!==t;)n=n.right;return n.value.end+1}}),n.spreadsheet.RangeTree=r,n.spreadsheet.RangeList=u,n.spreadsheet.SparseRangeList=v,n.spreadsheet.ValueRange=i)}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/propertybag.min",["kendo.core.min"],n)}(function(){!function(n){function u(n){return n.replace(/M/g,"m").replace(/'/g,'"').replace(/tt/,"am/pm")}var t,i,r;n.support.browser.msie&&n.support.browser.version<9||(t=n.Class.extend({init:function(n){this.list=n},get:function(n){return this.parse(this.list.value(n,n))},set:function(n,t,i){void 0===i&&(i=t,t=n),this.list.value(n,t,i)},parse:function(n){return n},copy:function(n,t,i){this.list.copy(n,t,i)},iterator:function(n,t){return this.list.iterator(n,t)}}),i=t.extend({set:function(n,t,i){this.list.value(n,t,JSON.stringify(i))},parse:function(n){return JSON.parse(n)}}),r=t.extend({init:function(n,i){t.prototype.init.call(this,n),this.formats=i},set:function(t,i,r){r instanceof Date&&(r=n.spreadsheet.dateToNumber(r),this.formats.value(t,i,u(n.culture().calendar.patterns.d))),this.list.value(t,i,r)}}),n.spreadsheet.PropertyBag=n.Class.extend({specs:[{property:t,name:"format",value:null,sortable:!0,serializable:!0},{property:r,name:"value",value:null,sortable:!0,serializable:!0,depends:"format"},{property:t,name:"formula",value:null,sortable:!0,serializable:!0},{property:t,name:"background",value:null,sortable:!0,serializable:!0},{property:i,name:"vBorders",value:null,sortable:!1,serializable:!1},{property:i,name:"hBorders",value:null,sortable:!1,serializable:!1},{property:t,name:"color",value:null,sortable:!0,serializable:!0},{property:t,name:"fontFamily",value:null,sortable:!0,serializable:!0},{property:t,name:"underline",value:null,sortable:!0,serializable:!0},{property:t,name:"fontSize",value:null,sortable:!0,serializable:!0},{property:t,name:"italic",value:null,sortable:!0,serializable:!0},{property:t,name:"bold",value:null,sortable:!0,serializable:!0},{property:t,name:"textAlign",value:null,sortable:!0,serializable:!0},{property:t,name:"verticalAlign",value:null,sortable:!0,serializable:!0},{property:t,name:"wrap",value:null,sortable:!0,serializable:!0},{property:t,name:"validation",value:null,sortable:!1,serializable:!0},{property:t,name:"enable",value:null,sortable:!1,serializable:!0},{property:t,name:"link",value:null,sortable:!1,serializable:!0},{property:t,name:"editor",value:null,sortable:!1,serializable:!0}],init:function(t,i,r){r=r||{};var u=t*i-1;this.rowCount=t,this.columnCount=i,this.cellCount=u,this.properties={},this.lists={},this.specs.forEach(function(t){var i=t.name,f=r[i];void 0===f&&(f=t.value),this.lists[i]=new n.spreadsheet.SparseRangeList(0,u,f),this.properties[i]=new t.property(this.lists[i],this.lists[t.depends])},this)},getState:function(){var n={};return this.specs.forEach(function(t){n[t.name]=this.lists[t.name].getState()},this),n},setState:function(n){this.specs.forEach(function(t){this.lists[t.name].setState(n[t.name])},this)},get:function(n,t){if(void 0===t)return this.lists[n];switch(n){case"borderRight":t+=this.rowCount;case"borderLeft":n="vBorders";break;case"borderBottom":t++;case"borderTop":n="hBorders"}return t>this.cellCount?null:this.properties[n].get(t)},set:function(n,t,i,r){switch(n){case"borderRight":t+=this.rowCount,i+=this.rowCount;case"borderLeft":n="vBorders";break;case"borderBottom":t++,i++;case"borderTop":n="hBorders"}t<=i&&i<=this.cellCount&&this.properties[n].set(t,i,r)},fromJSON:function(n,t){for(var i,r=0;r<this.specs.length;r++)i=this.specs[r],i.serializable&&void 0!==t[i.name]&&this.set(i.name,n,n,t[i.name],!1);["borderLeft","borderRight","borderTop","borderBottom"].forEach(function(i){void 0!==t[i]&&this.set(i,n,n,t[i])},this)},copy:function(n,t,i){this.specs.forEach(function(r){this.properties[r.name].copy(n,t,i)},this)},iterator:function(n,t,i){var u=this.properties[n],r=u.iterator(t,i),e=r.at,f=this.cellCount;return r.at=function(n){return n>f?null:u.parse(e.call(r,n))},r.name=n,r.value=u.list.range.value,r},sortable:function(){return this.specs.filter(function(n){return n.sortable}).map(function(n){return this.lists[n.name]},this)},iterators:function(n,t){return this.specs.reduce(function(i,r){return r.serializable&&i.push(this.iterator(r.name,n,t)),i}.bind(this),[])},forEach:function(n,t,i){function e(n,t,i){var r=t.at(i);r!==t.value&&(o[n]=r)}for(var o,f,u,s,c=this.iterators(n,t),h=this.iterator("hBorders",n,t+1),a=this.iterator("vBorders",n,t),l=this.iterator("vBorders",n+this.rowCount,t+this.rowCount),r=n;r<=t;r++){for(o={},f=0;f<c.length;f++)u=c[f],s=u.at(r),s!==u.value&&(o[u.name]=s);e("borderLeft",a,r),e("borderRight",l,r+this.rowCount),e("borderTop",h,r),(r+1)%this.rowCount&&e("borderBottom",h,r+1),i(o)}},forEachProperty:function(n){for(var t in this.properties)n(this.properties[t])}}),n.spreadsheet.ALL_PROPERTIES=n.spreadsheet.PropertyBag.prototype.specs.reduce(function(n,t){return t.serializable&&n.push(t.name),n},["borderTop","borderRight","borderBottom","borderLeft"]))}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/references.min",["kendo.core.min"],n)}(function(){"use strict";function h(n){var t=Math.floor(n/26)-1;return(t>=0?h(t):"")+String.fromCharCode(65+n%26)}function e(n){return/^[a-z0-9_]*$/i.test(n)?n:"'"+n.replace(/\x27/g,"\\'")+"'"}function o(n,t,i,r){var u="";return++t,isFinite(t)?null==r||2&r||(t="$"+t):t="",isFinite(i)?(u=h(i),null==r||1&r||(u="$"+u)):i="",n?e(n)+"!"+u+t:u+t}var u,c,f,i,s,n,t,r;kendo.support.browser.msie&&kendo.support.browser.version<9||(u=kendo.spreadsheet,c=kendo.Class,f=c.extend({type:"ref",sheet:"",clone:function(){return this},hasSheet:function(){return this._hasSheet},simplify:function(){return this},setSheet:function(n,t){return this.sheet=n,null!=t&&(this._hasSheet=t),this},absolute:function(){return this},relative:function(){return this},adjust:function(){return this},toString:function(){return this.relative(0,0,3,3).print(0,0)},forEach:function(n,t){n.call(t,this)},map:function(n,t){return n.call(t,this)},intersects:function(n){return this.intersect(n)!==i},isCell:function(){return!1},toRow:function(){return this},toColumn:function(){return this},first:function(){return this},lastRange:function(){return this},size:function(){return 1},rangeAt:function(){return this},nextRangeIndex:function(){return 0},previousRangeIndex:function(){return 0},eq:function(u){var s,h,o,c,e=this,f=u;if(e===i||f===i)return e===f;if((f instanceof n||f instanceof t&&!(e instanceof n))&&(e=u,f=this),e instanceof n)return f=f.simplify(),f instanceof n&&e.row==f.row&&e.col==f.col&&e.sheet==f.sheet;if(e instanceof t){if(f instanceof t)return f.topLeft.eq(e.topLeft)&&f.bottomRight.eq(e.bottomRight);if(f instanceof r)return f.single()&&e.eq(f.refs[0])}else if(e instanceof r&&f instanceof r){if(s=e.refs,h=f.refs,s.length!=h.length)return!1;for(o=0,c=s.length;o<c;o++)if(!s[o].eq(h[o]))return!1;return!0}return e===f},concat:function(n){return new r([this,n])},replaceAt:function(n,t){return t},forEachColumnIndex:function(n){this.forEachAxisIndex("col",n)},forEachRowIndex:function(n){this.forEachAxisIndex("row",n)},forEachAxisIndex:function(n,t){var i=[],r="row"===n?"forEachRow":"forEachColumn";this[r](function(t){var r=t.first()[n];i.indexOf(r)===-1&&i.push(r)}),i.sort(function(n,t){return n>t?1:n<t?-1:0}).forEach(t)},valid:function(){return!1},renameSheet:function(n,t){if(this.sheet&&this.sheet.toLowerCase()==n.toLowerCase())return this.sheet=t,!0}}),f.display=o,i=new(f.extend({init:function(){},print:function(){return"#NULL!"},eq:function(n){return n===this},forEach:function(){}})),s=f.extend({ref:"name",init:function(n){this.name=n},clone:function(){return new s(this.name).setSheet(this.sheet,this.hasSheet())},print:function(){var n=e(this.name);return this.hasSheet()&&(n=e(this.sheet)+"!"+n),n}}),n=f.extend({ref:"cell",init:function(n,t,i){this.row=n,this.col=t,this.rel=i||0},clone:function(){return new n(this.row,this.col,this.rel).setSheet(this.sheet,this.hasSheet())},intersect:function(t){return t instanceof n?this.eq(t)?this:i:t.intersect(this)},print:function(n,t,i){var f,h,r=this.col,u=this.row,s=this.rel;return null==n&&s?(h=this.hasSheet()?e(this.sheet)+"!":"",r=isFinite(r)?1&s?"C["+r+"]":"C"+(r+1):"",u=isFinite(u)?2&s?"R["+u+"]":"R"+(u+1):"",h+u+r):(f=this.absolute(n,t),i?(u=f.row%1048576,r=f.col%16384,u<0&&(u+=1048576),r<0&&(r+=16384),o(this._hasSheet&&this.sheet,u,r,s)):f.valid()?o(this._hasSheet&&this.sheet,f.row,f.col,s):"#REF!")},absolute:function(n,t){var i=this.clone();return i.rel&!1?i:(1&i.rel&&(i.col=(i.col+t)%16384),2&i.rel&&(i.row=(i.row+n)%1048576),i.rel=0,i)},toRangeRef:function(){return new t(this,this)},relative:function(t,i,r){var f,u;return null==r&&(r=this.rel),f=2&r?this.row-t:this.row,u=1&r?this.col-i:this.col,new n(f,u,r).setSheet(this.sheet,this.hasSheet())},height:function(){return 1},width:function(){return 1},toString:function(){return o(null,this.row,this.col,3)},isCell:function(){return!0},leftColumn:function(){return this},rightColumn:function(){return this},topRow:function(){return this},bottomRow:function(){return this},forEachRow:function(n){n(this.toRangeRef())},forEachColumn:function(n){n(this.toRangeRef())},adjust:function(n,t,r,u,f,e,o){var s=this.absolute(n,t);if(f){if(s.row>=e){if(o<0&&s.row<e-o)return i;s.row+=o}}else if(s.col>=e){if(o<0&&s.col<e-o)return i;s.col+=o}return null!=r&&null!=u&&(s=s.relative(r,u,this.rel)),s},valid:function(){if(this.rel)throw Error("valid() called on relative reference");var t=this.col,n=this.row;return!(isFinite(t)&&t<0||isFinite(n)&&n<0)}}),t=f.extend({ref:"range",init:function(t,i){t._hasSheet&&i._hasSheet&&t.sheet.toLowerCase()!=i.sheet.toLowerCase()&&(this.endSheet=i.sheet),this.topLeft=new n(t.row,t.col,t.rel),this.bottomRight=new n(i.row,i.col,i.rel),this.normalize()},clone:function(){return new t(this.topLeft.clone(),this.bottomRight.clone()).setSheet(this.sheet,this.hasSheet())},_containsRange:function(n){return this._containsCell(n.topLeft)&&this._containsCell(n.bottomRight)},_containsCell:function(n){return n.sheet==this.sheet&&n.row>=this.topLeft.row&&n.col>=this.topLeft.col&&n.row<=this.bottomRight.row&&n.col<=this.bottomRight.col},contains:function(i){if(i instanceof Array){var r=this;return i.some(function(n){return r.contains(n)})}return i instanceof n?this._containsCell(i):i instanceof t&&this._containsRange(i)},_intersectRange:function(r){var h,s,l,c,f,u,o,e;return this.sheet!=r.sheet?i:(h=this.topLeft.col,s=this.topLeft.row,l=this.bottomRight.col,c=this.bottomRight.row,f=r.topLeft.col,u=r.topLeft.row,o=r.bottomRight.col,e=r.bottomRight.row,h<=o&&f<=l&&s<=e&&u<=c?new t(new n(Math.max(s,u),Math.max(h,f)),new n(Math.min(c,e),Math.min(l,o))).setSheet(this.sheet,this.hasSheet()):i)},intersect:function(u){return u instanceof n?this._containsCell(u)?u:i:u instanceof t?this._intersectRange(u).simplify():u instanceof r?u.intersect(this):i},simplify:function(){return this.isCell()?new n(this.topLeft.row,this.topLeft.col,this.topLeft.rel).setSheet(this.sheet,this.hasSheet()):this},normalize:function(){var t,f=this.topLeft,e=this.bottomRight,o=f.row,i=f.col,r=e.row,u=e.col,l=2&f.rel,a=1&f.rel,c=2&e.rel,s=1&e.rel,h=!1;return o>r&&(h=!0,t=o,o=r,r=t,t=l,l=c,c=t),i>u&&(h=!0,t=i,i=u,u=t,t=a,a=s,s=t),h&&(this.topLeft=new n(o,i,a|l),this.bottomRight=new n(r,u,s|c)),this},print:function(n,t,i){if(i||this.absolute(n,t).valid()){var r=this.topLeft.print(n,t,i)+":"+this.bottomRight.print(n,t,i);return this.hasSheet()&&(r=e(this.sheet)+(this.endSheet?":"+e(this.endSheet):"")+"!"+r),r}return"#REF!"},absolute:function(n,i){return new t(this.topLeft.absolute(n,i),this.bottomRight.absolute(n,i)).setSheet(this.sheet,this.hasSheet())},relative:function(n,i,r,u){return null==u&&(u=r),new t(this.topLeft.relative(n,i,r),this.bottomRight.relative(n,i,u)).setSheet(this.sheet,this.hasSheet())},height:function(){if(this.topLeft.rel!=this.bottomRight.rel)throw Error("Mixed relative/absolute references");return this.bottomRight.row-this.topLeft.row+1},width:function(){if(this.topLeft.rel!=this.bottomRight.rel)throw Error("Mixed relative/absolute references");return this.bottomRight.col-this.topLeft.col+1},collapse:function(){return this.topLeft.toRangeRef()},leftColumn:function(){return new t(this.topLeft,new n(this.bottomRight.row,this.topLeft.col))},rightColumn:function(){return new t(new n(this.topLeft.row,this.bottomRight.col),this.bottomRight)},topRow:function(){return new t(this.topLeft,new n(this.topLeft.row,this.bottomRight.col))},bottomRow:function(){return new t(new n(this.bottomRight.row,this.topLeft.col),this.bottomRight)},toRangeRef:function(){return this},toRow:function(i){return i+=Math.max(0,this.topLeft.row),new t(new n(i,this.topLeft.col),new n(i,this.bottomRight.col)).setSheet(this.sheet,this.hasSheet())},toColumn:function(i){return i+=Math.max(0,this.topLeft.col),new t(new n(this.topLeft.row,i),new n(this.bottomRight.row,i)).setSheet(this.sheet,this.hasSheet())},toCell:function(t,i){return t+=Math.max(0,this.topLeft.row),i+=Math.max(0,this.topLeft.col),new n(t,i,0).setSheet(this.sheet,this.hasSheet())},forEachRow:function(i){for(var e=this.topLeft.row,o=this.bottomRight.row,u=this.topLeft.col,f=this.bottomRight.col,r=e;r<=o;r++)i(new t(new n(r,u),new n(r,f)))},forEachColumn:function(i){for(var e=this.topLeft.row,o=this.bottomRight.row,u=this.topLeft.col,f=this.bottomRight.col,r=u;r<=f;r++)i(new t(new n(e,r),new n(o,r)))},intersecting:function(n){return n.filter(function(n){return n.toRangeRef().intersects(this)},this)},union:function(i,r){var h,c=this.intersecting(i),o=this.topLeft.row,s=this.topLeft.col,f=this.bottomRight.row,e=this.bottomRight.col,u=!1;return c.forEach(function(n){n=n.toRangeRef(),n.topLeft.row<o&&(u=!0,o=n.topLeft.row),n.topLeft.col<s&&(u=!0,s=n.topLeft.col),n.bottomRight.row>f&&(u=!0,f=n.bottomRight.row),n.bottomRight.col>e&&(u=!0,e=n.bottomRight.col),r&&r(n)}),h=new t(new n(o,s),new n(f,e)),u?h.union(i,r):h},resize:function(r){function f(n){return n||0}var u=Math.max.bind(Math,0),s=this.topLeft.row+f(r.top),h=this.topLeft.col+f(r.left),e=this.bottomRight.row+f(r.bottom),o=this.bottomRight.col+f(r.right);return h<0&&o<0||s<0&&e<0?i:s<=e&&h<=o?new t(new n(u(s),u(h)),new n(u(e),u(o))):i},move:function(i,r){return new t(new n(this.topLeft.row+i,this.topLeft.col+r),new n(this.bottomRight.row+i,this.bottomRight.col+r))},first:function(){return this.topLeft},isCell:function(){return!this.endSheet&&this.topLeft.eq(this.bottomRight)},toString:function(){return this.topLeft+":"+this.bottomRight},adjust:function(n,r,u,f,e,o,s){var c=this.topLeft.adjust(n,r,u,f,e,o,s),h=this.bottomRight.adjust(n,r,u,f,e,o,s);return c===i&&h===i?i:(c===i?(c=this.topLeft.absolute(n,r),e?c.row=o:c.col=o,null!=u&&null!=f&&(c=c.relative(u,f,this.topLeft.rel))):h===i&&(h=this.bottomRight.absolute(n,r),e?h.row=o-1:h.col=o-1,null!=u&&null!=f&&(h=h.relative(u,f,this.bottomRight.rel))),new t(c,h).setSheet(this.sheet,this.hasSheet()).simplify())},valid:function(){return this.topLeft.valid()&&this.bottomRight.valid()}}),r=f.extend({init:function(n){this.refs=n,this.length=n.length},clone:function(){return new r(this.refs.slice())},intersect:function(n){for(var f,u=[],t=0;t<this.length;++t)f=n.intersect(this.refs[t]),f!==i&&u.push(f);return u.length>0?new r(u).simplify():i},simplify:function(){var n=new r(this.refs.reduce(function(n,t){return t=t.simplify(),t!==i&&n.push(t),n},[]));return n.empty()?i:n.single()?n.refs[0]:n},absolute:function(n,t){return new r(this.refs.map(function(i){return i.absolute(n,t)}))},forEach:function(n,t){this.refs.forEach(function(i){i instanceof r?i.forEach(n,t):n.call(t,i)},t)},toRangeRef:function(){return this.refs[0].toRangeRef()},contains:function(n){return this.refs.some(function(t){return t.contains(n)})},map:function(n,t){var i=[];return this.forEach(function(r){i.push(n.call(t,r))}),new r(i)},first:function(){return this.refs[0].first()},lastRange:function(){return this.refs[this.length-1]},size:function(){return this.length},single:function(){return 1==this.length},empty:function(){return 0===this.length},isCell:function(){return this.single()&&this.refs[0].isCell()},rangeAt:function(n){return this.refs[n]},nextRangeIndex:function(n){return n===this.length-1?0:n+1},previousRangeIndex:function(n){return 0===n?this.length-1:n-1},concat:function(n){return new r(this.refs.concat([n]))},print:function(n,t,i){return this.refs.map(function(r){return r.print(n,t,i)}).join(",")},replaceAt:function(n,t){var i=this.refs.slice();return i.splice(n,1,t),new r(i)},leftColumn:function(){return this.map(function(n){return n.leftColumn()})},rightColumn:function(){return this.map(function(n){return n.rightColumn()})},topRow:function(){return this.map(function(n){return n.topRow()})},bottomRow:function(){return this.map(function(n){return n.bottomRow()})},forEachRow:function(n){this.forEach(function(t){t.forEachRow(n)})},forEachColumn:function(n){this.forEach(function(t){t.forEachColumn(n)})},adjust:function(n,t,i,r,u,f,e){return this.map(function(o){return o.adjust(n,t,i,r,u,f,e)}).simplify()},toString:function(){return this.refs.map(function(n){return""+n}).join(", ")},valid:function(){for(var n=this.refs.length;--n>=0;)if(this.refs[n].valid())return!1;return!0},renameSheet:function(n,t){this.refs.forEach(function(i){i.renameSheet(n,t)})}}),u.NULLREF=i,u.SHEETREF=new t(new n(0,0),new n(1/0,1/0)),u.FIRSTREF=new n(0,0),u.Ref=f,u.NameRef=s,u.CellRef=n,u.RangeRef=t,u.UnionRef=r,u.SHEETREF.print=function(){return"#SHEET"})},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/autofillcalculator.min",["kendo.core.min"],n)}(function(){!function(n){var r,t,i;n.support.browser.msie&&n.support.browser.version<9||(r=n.spreadsheet.RangeRef,t=n.spreadsheet.CellRef,i=n.Class.extend({init:function(n){this._grid=n},rectIsVertical:function(n,t,i,r){var f=this._grid.rectangle(n.toRangeRef()),u=this._grid.rectangle(t.toRangeRef());return Math.abs(u[r]-f[r])>Math.abs(f[i]-u[i])},autoFillDest:function(n,i){var h,o,e,s,l,a,v,u=n.topLeft,f=n.bottomRight,y=i.row>=u.row,c=i.col>=u.col;return h=y?c?4:3:c?2:1,4===h?(o=u,e=f,l=i.row>e.row||i.col>e.col,l&&(i=new t(Math.max(i.row,e.row),Math.max(i.col,e.col))),s=this.rectIsVertical(e,i,"right","bottom")?new t(i.row,e.col):new t(e.row,i.col)):3===h?(a=new t(u.col,f.row),i.row>f.row&&this.rectIsVertical(a,i,"left","bottom")?(o=u,s=new t(i.row,f.col)):(o=f,s=new t(u.row,i.col))):2===h?(v=new t(u.row,f.col),i.col>f.col&&!this.rectIsVertical(v,i,"right","top")?(o=u,s=new t(f.row,i.col)):(o=f,s=new t(i.row,u.col))):(o=f,s=this.rectIsVertical(u,i,"left","top")?new t(i.row,u.col):new t(u.row,i.col)),this._grid.normalize(new r(o,s))}}),n.spreadsheet.AutoFillCalculator=i)}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/navigator.min",["kendo.core.min","spreadsheet/autofillcalculator.min"],n)}(function(){!function(n){var i,t,r,u;n.support.browser.msie&&n.support.browser.version<9||(i=n.spreadsheet.RangeRef,t=n.spreadsheet.CellRef,r=n.Class.extend({init:function(n,t,i,r){this.rangeGetter=i,this.prevLeft=function(i){var f=r(this.range(i)),u=this.range(t.prevVisible(f.topLeft[n]));return r(u).topLeft[n]},this.nextRight=function(i){var f=r(this.range(i)),u=this.range(t.nextVisible(f.bottomRight[n]));return r(u).bottomRight[n]},this.nextLeft=function(i){var u=r(this.range(i));return t.nextVisible(u.bottomRight[n])},this.prevRight=function(i){var u=r(this.range(i));return t.prevVisible(u.topLeft[n])}},boundary:function(n,t){this.top=n,this.bottom=t},range:function(n){return this.rangeGetter(n,this.top,this.bottom)}}),u=n.Class.extend({init:function(t){this._sheet=t,this.columns=this._sheet._grid._columns,this.autoFillCalculator=new n.spreadsheet.AutoFillCalculator(t._grid),this.colEdge=new r("col",this._sheet._grid._columns,this.columnRange.bind(this),this.union.bind(this)),this.rowEdge=new r("row",this._sheet._grid._rows,this.rowRange.bind(this),this.union.bind(this))},height:function(n){this._viewPortHeight=n},union:function(n){return this._sheet.unionWithMerged(n)},columnRange:function(n,t,i){return this._sheet._ref(t,n,i-t,1)},rowRange:function(n,t,i){return this._sheet._ref(n,t,1,i-t)},selectionIncludesMergedCells:function(){return this._sheet.select().contains(this._sheet._mergedCells)},setSelectionValue:function(n){var t=this._sheet.selection();setTimeout(function(){t.value(n())})},selectAll:function(){this._sheet.select(this._sheet._sheetRef)},select:function(n,t,i){n=this.refForMode(n,t),i&&(n=this._sheet.select().concat(n)),this._sheet.select(n)},refForMode:function(n,t){var i=this._sheet._grid;switch(t){case"range":n=i.normalize(n);break;case"row":n=i.rowRef(n.row);break;case"column":n=i.colRef(n.col);break;case"sheet":n=this._sheet._sheetRef}return n},startSelection:function(n,t,r,u){if("autofill"==t)this._sheet.startAutoFill();else if(u&&"range"==t){var f=new i(this._sheet.activeCell().first(),n);this._sheet.select(f,!1,!1),this._sheet.startSelection()}else this._sheet.startSelection(),this.select(n,t,r)},completeSelection:function(){this._sheet.completeSelection()},selectForContextMenu:function(n,t){var i=this._sheet;i.select().contains(this.refForMode(n,t))||this.select(n,t)},modifySelection:function(n){var u,l,a=this.determineDirection(n),o=this._sheet,h=this._viewPortHeight,f=o._grid._rows,c=o._grid._columns,v=o.currentOriginalSelectionRange(),s=o.select().toRangeRef(),e=o.activeCell(),r=v.topLeft.clone(),t=v.bottomRight.clone();switch(this.colEdge.boundary(s.topLeft.row,s.bottomRight.row),this.rowEdge.boundary(s.topLeft.col,s.bottomRight.col),a){case"expand-left":r.col=this.colEdge.prevLeft(r.col),u=r;break;case"shrink-right":r.col=this.colEdge.nextLeft(r.col),u=r;break;case"expand-right":t.col=this.colEdge.nextRight(t.col),u=t;break;case"shrink-left":t.col=this.colEdge.prevRight(t.col),u=t;break;case"expand-up":r.row=this.rowEdge.prevLeft(r.row),u=r;break;case"shrink-down":r.row=this.rowEdge.nextLeft(r.row),u=r;break;case"expand-down":t.row=this.rowEdge.nextRight(t.row),u=t;break;case"shrink-up":t.row=this.rowEdge.prevRight(t.row),u=t;break;case"expand-page-up":r.row=f.prevPage(r.row,h);break;case"shrink-page-up":t.row=f.prevPage(t.row,h);break;case"expand-page-down":t.row=f.nextPage(t.row,h);break;case"shrink-page-down":r.row=f.nextPage(r.row,h);break;case"first-col":r.col=c.firstVisible(),t.col=e.bottomRight.col,u=r;break;case"last-col":t.col=c.lastVisible(),r.col=e.topLeft.col,u=t;break;case"first-row":r.row=f.firstVisible(),t.row=e.bottomRight.row,u=r;break;case"last-row":t.row=f.lastVisible(),r.row=e.topLeft.row,u=t;break;case"last":t.row=f.lastVisible(),t.col=c.lastVisible(),r=e.topLeft,u=t;break;case"first":r.row=f.firstVisible(),r.col=c.firstVisible(),t=e.bottomRight,u=r}return l=new i(r,t),this.union(l).intersects(e)?(u&&o.focus(u),void this.updateCurrentSelectionRange(l)):void this.modifySelection(a.replace("shrink","expand"))},moveActiveCell:function(n){var e=this._sheet,c=e.activeCell(),s=c.topLeft,o=c.bottomRight,h=e.originalActiveCell(),r=e._grid._rows,f=e._grid._columns,i=h.row,u=h.col;switch(n){case"left":u=f.prevVisible(s.col);break;case"up":i=r.prevVisible(s.row);break;case"right":u=f.nextVisible(o.col);break;case"down":i=r.nextVisible(o.row);break;case"first-col":u=f.firstVisible();break;case"last-col":u=f.lastVisible();break;case"first-row":i=r.firstVisible();break;case"last-row":i=r.lastVisible();break;case"last":i=r.lastVisible(),u=f.lastVisible();break;case"first":i=r.firstVisible(),u=f.firstVisible();break;case"next-page":i=r.nextPage(o.row,this._viewPortHeight);break;case"prev-page":i=r.prevPage(o.row,this._viewPortHeight)}e.select(new t(i,u))},navigateInSelection:function(n){for(var s,f=this._sheet,w=f.activeCell(),y=w.topLeft,v=f.originalActiveCell(),h=f._grid._rows,c=f._grid._columns,i=v.row,r=v.col,u=f.currentNavigationRange(),o=u.topLeft,e=u.bottomRight,p=!1,l=y.col,a=y.row;!p;){switch(s=new t(i,r),n){case"next":e.eq(s)?(u=f.nextNavigationRange(),i=u.topLeft.row,r=u.topLeft.col):(r=c.nextVisible(l,!0),r>e.col&&(r=o.col,i=h.nextVisible(i,!0)));break;case"previous":o.eq(s)?(u=f.previousNavigationRange(),i=u.bottomRight.row,r=u.bottomRight.col):(r=c.prevVisible(l,!0),r<o.col&&(r=e.col,i=h.prevVisible(i,!0)));break;case"lower":e.eq(s)?(u=f.nextNavigationRange(),i=u.topLeft.row,r=u.topLeft.col):(i=h.nextVisible(a,!0),i>e.row&&(i=o.row,r=c.nextVisible(r,!0)));break;case"upper":o.eq(s)?(u=f.previousNavigationRange(),i=u.bottomRight.row,r=u.bottomRight.col):(i=h.prevVisible(a,!0),i<o.row&&(i=e.row,r=c.prevVisible(r,!0)));break;default:throw Error("Unknown entry navigation: "+n);}p=!this.shouldSkip(i,r),l=r,a=i}f.singleCellSelection()?f.select(new t(i,r)):f.activeCell(new t(i,r))},extendSelection:function(n,t){var u,f=this._sheet,r=f._grid;return"autofill"===t?void this.resizeAutoFill(n):("range"===t?n=r.normalize(n):"row"===t?n=r.rowRef(n.row).bottomRight:"column"===t&&(n=r.colRef(n.col).bottomRight),u=f.originalActiveCell().toRangeRef(),void this.updateCurrentSelectionRange(new i(u.topLeft,n)))},shouldSkip:function(n,i){var u=new t(n,i),r=!1;return this._sheet.forEachMergedCell(function(n){n.intersects(u)&&!n.collapse().eq(u)&&(r=!0)}),r},resizeAutoFill:function(n){var e,r,t,f,i,u=this._sheet,h=u.select(),c=u._autoFillOrigin,o=this.autoFillCalculator.autoFillDest(h,n),s=this.punch(h,o);s||(f=u.range(o)._previewFillFrom(u.range(c)),f&&(r=f.direction,i=f.props,0===r||1==r?(t=i[i.length-1],e=t[t.length-1].value):2===r?(t=i[0],e=t[t.length-1].value):3===r&&(t=i[i.length-1],e=t[0].value))),u.updateAutoFill(o,s,e,r)},determineDirection:function(n){var i=this._sheet.currentSelectionRange(),t=this._sheet.activeCell(),f=t.topLeft.col==i.topLeft.col,e=t.bottomRight.col==i.bottomRight.col,r=t.topLeft.row==i.topLeft.row,u=t.bottomRight.row==i.bottomRight.row;switch(n){case"left":n=e?"expand-left":"shrink-left";break;case"right":n=f?"expand-right":"shrink-right";break;case"up":n=u?"expand-up":"shrink-up";break;case"down":n=r?"expand-down":"shrink-down";break;case"prev-page":n=u?"expand-page-up":"shrink-page-up";break;case"next-page":n=r?"expand-page-down":"shrink-page-down"}return n},updateCurrentSelectionRange:function(n){var t=this._sheet;t.select(t.originalSelect().replaceAt(t.selectionRangeIndex(),n),!1)},punch:function(n,r){var u,e,f;return r.topLeft.eq(n.topLeft)&&(r.bottomRight.row<n.bottomRight.row?(e=this.rowEdge.nextRight(r.bottomRight.row),u=new i(new t(e,n.topLeft.col),n.bottomRight)):r.bottomRight.col<n.bottomRight.col&&(f=this.colEdge.nextRight(r.bottomRight.col),u=new i(new t(n.topLeft.row,f),n.bottomRight))),u}}),n.spreadsheet.SheetNavigator=u)}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/axismanager.min",["kendo.core.min"],n)}(function(){!function(n){if(!(n.support.browser.msie&&n.support.browser.version<9)){var t=n.Class.extend({init:function(n){this._sheet=n},forEachSelectedColumn:function(n){var t=this._sheet;t.batch(function(){t.select().forEachColumnIndex(function(i,r){n(t,i,r)})},{layout:!0,recalc:!0})},forEachSelectedRow:function(n){var t=this._sheet;t.batch(function(){t.select().forEachRowIndex(function(i,r){n(t,i,r)})},{layout:!0,recalc:!0})},includesHiddenColumns:function(n){return this._sheet._grid._columns.includesHidden(n.topLeft.col,n.bottomRight.col)},includesHiddenRows:function(n){return this._sheet._grid._rows.includesHidden(n.topLeft.row,n.bottomRight.row)},selectionIncludesHiddenColumns:function(){return this.includesHiddenColumns(this._sheet.select())},selectionIncludesHiddenRows:function(){return this.includesHiddenRows(this._sheet.select())},deleteSelectedColumns:function(){this.forEachSelectedColumn(function(n,t,i){n.deleteColumn(t-i)})},deleteSelectedRows:function(){this.forEachSelectedRow(function(n,t,i){n.deleteRow(t-i)})},hideSelectedColumns:function(){var t,u,f,r,i,o,e;for(this.forEachSelectedColumn(function(n,t){n.hideColumn(t)}),t=this._sheet,u=t.select().toRangeRef(),f=u.topLeft.col,r=u.bottomRight.col,i=null;;){if(o=r<t._columns._count,e=f>=0,!e&&!o)break;if(o&&!t.isHiddenColumn(r)){i=r;break}if(e&&!t.isHiddenColumn(f)){i=f;break}f--,r++}null!==i&&(u=new n.spreadsheet.RangeRef(new n.spreadsheet.CellRef(0,i),new n.spreadsheet.CellRef(t._rows._count-1,i)),t.range(u).select())},hideSelectedRows:function(){var t,u,f,r,i,o,e;for(this.forEachSelectedRow(function(n,t){n.hideRow(t)}),t=this._sheet,u=t.select().toRangeRef(),f=u.topLeft.row,r=u.bottomRight.row,i=null;;){if(o=r<t._rows._count,e=f>=0,!e&&!o)break;if(o&&!t.isHiddenRow(r)){i=r;break}if(e&&!t.isHiddenRow(f)){i=f;break}f--,r++}null!==i&&(u=new n.spreadsheet.RangeRef(new n.spreadsheet.CellRef(i,0),new n.spreadsheet.CellRef(i,t._columns._count-1)),t.range(u).select())},unhideSelectedColumns:function(){this.forEachSelectedColumn(function(n,t){n.unhideColumn(t)})},unhideSelectedRows:function(){this.forEachSelectedRow(function(n,t){n.unhideRow(t)})},addColumnLeft:function(){this.forEachSelectedColumn(function(n,t,i){n.insertColumn(t-i)})},addColumnRight:function(){this.forEachSelectedColumn(function(n,t,i){n.insertColumn(t+(i+1))})},preventAddRow:function(){var t=this._sheet.select().toRangeRef(),n=t.height();return this._sheet.preventInsertRow(0,n)},preventAddColumn:function(){var t=this._sheet.select().toRangeRef(),n=t.width();return this._sheet.preventInsertColumn(0,n)},addRowAbove:function(){this.forEachSelectedRow(function(n,t,i){n.insertRow(t-i)})},addRowBelow:function(){this.forEachSelectedRow(function(n,t,i){n.insertRow(t+(i+1))})}});n.spreadsheet.AxisManager=t}}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/clipboard.min",["kendo.core.min"],n)}(function(){!function(n){function r(){var n=new f(0,0,0);return{ref:n,mergedCells:[],data:[],foreign:!0,origRef:n.toRangeRef()}}function i(n,t,i,r){var u,f=n.data||(n.data=[]);f[t]||(f[t]=[]),f[t][i]=r,u=n.origRef.bottomRight,u.row=Math.max(u.row,t),u.col=Math.max(u.col,i)}function e(n){return n.replace(/^-(?:ms|moz|webkit)-/,"")}function c(n){var t={};return["borderBottom","borderRight","borderLeft","borderTop"].forEach(function(i){t[i]="none"==n[i+"Style"]?null:{size:1,color:n[i+"Color"]}}),t}function s(n){var t=window.getComputedStyle(n[0]),u=n[0].innerText,r=c(t),i={value:""===u?null:u,borderBottom:r.borderBottom,borderRight:r.borderRight,borderLeft:r.borderLeft,borderTop:r.borderTop,fontSize:parseInt(t["font-size"],10)};return"rgb(0, 0, 0)"!==t["background-color"]&&"rgba(0, 0, 0, 0)"!==t["background-color"]&&(i.background=t["background-color"]),"rgb(0, 0, 0)"!==t.color&&"rgba(0, 0, 0, 0)"!==t.color&&(i.color=t.color),"underline"==t["text-decoration"]&&(i.underline=!0),"italic"==t["font-style"]&&(i.italic=!0),"bold"==t["font-weight"]&&(i.bold=!0),"right"!==e(t["text-align"])&&(i.textAlign=e(t["text-align"])),"middle"!==t["vertical-align"]&&(i.verticalAlign=t["vertical-align"]),"normal"!==t["word-wrap"]&&(i.wrap=!0),i}function h(n){var u=r();return n.find(">tr, >tbody>tr").each(function(i,r){t(r).find(">td, >th").each(function(u,f){var e,l,h,s,a,v=parseInt(t(f).attr("rowspan"),10)-1||0,c=parseInt(t(f).attr("colspan"),10)-1||0,o="<td/>";if(v){for(l=i+v,h=i;h<=l;h++)if(s=n.find("tr").eq(h),h>i&&(o="<td class='rowspan'></td>",0===u?s.find("td").eq(u).after(o):(a=Math.min(s.find("td").length,u),s.find("td").eq(a-1).after(o))),c)for(e=u;e<c+u;e++)o="<td class='rowspan colspan'></td>",s.find("td").eq(e).after(o)}else if(c)for(e=u;e<c+u;e++)o="<td class='colspan'></td>",t(r).find("td").eq(e).after(o)})}),n.find(">tr, >tbody>tr").each(function(n,r){t(r).find(">td, >th").each(function(r,f){var c,l,h,e=parseInt(t(f).attr("rowspan"),10)-1||0,o=parseInt(t(f).attr("colspan"),10)-1||0;i(u,n,r,s(t(f))),(e||o)&&(c=String.fromCharCode(65+r),l=String.fromCharCode(65+r+o),h=c+(n+1)+":"+l+(n+1+e),u.mergedCells.push(h))})}),u}function u(n){var e,u,o,t,f=r();if(n.indexOf("\t")===-1&&n.indexOf("\n")==-1)i(f,0,0,{value:n});else for(e=n.split("\n"),u=0;u<e.length;u++)for(o=e[u].split("\t"),t=0;t<o.length;t++)i(f,u,t,{value:o[t]});return f}var t,f,o;n.support.browser.msie&&n.support.browser.version<9||(t=n.jQuery,f=n.spreadsheet.CellRef,o=n.Class.extend({init:function(t){this._content={},this._externalContent={},this._internalContent={},this.workbook=t,this.origin=n.spreadsheet.NULLREF,this.iframe=document.createElement("iframe"),this.iframe.className="k-spreadsheet-clipboard-paste",this.menuInvoked=!0,this._uid=n.guid(),document.body.appendChild(this.iframe)},destroy:function(){document.body.removeChild(this.iframe)},canCopy:function(){var t={canCopy:!0},i=this.workbook.activeSheet().select();return i===n.spreadsheet.NULLREF&&(t.canCopy=!1),i instanceof n.spreadsheet.UnionRef&&(t.canCopy=!1,t.multiSelection=!0),this.menuInvoked&&(t.canCopy=!1,t.menuInvoked=!0),t},canPaste:function(){var i=this.workbook.activeSheet(),t=this.pasteRef(),r=i.range(t),n={canPaste:!0,pasteOnMerged:!1,pasteOnDisabled:!1};return r.enable()||(n.canPaste=!1,n.pasteOnDisabled=!0),t.eq(i.unionWithMerged(t))||(n.canPaste=!1,n.pasteOnMerged=!0),this.menuInvoked&&(n.canPaste=!1,n.menuInvoked=!0),(t.bottomRight.row>=i._rows._count||t.bottomRight.col>=i._columns._count)&&(n.canPaste=!1,n.overflow=!0),n},intersectsMerged:function(){var n,t=this.workbook.activeSheet();return this.parse(),this.origin=this._content.origRef,n=this.pasteRef(),!n.eq(t.unionWithMerged(n))},copy:function(){var n=this.workbook.activeSheet();this.origin=n.select(),this._internalContent=n.selection().getState(),delete this._externalContent.html,delete this._externalContent.plain},cut:function(){var n=this.workbook.activeSheet();this.copy(),n.range(n.select()).clear()},pasteRef:function(){var u=this.workbook.activeSheet(),n=u.activeCell().first(),t=this.origin.first(),r=t.row-n.row,i=t.col-n.col;return this.origin.relative(r,i,3)},paste:function(){var t=this.workbook.activeSheet(),n=this.pasteRef();t.range(n).setState(this._content,this),t.triggerChange({recalc:!0,ref:n})},external:function(n){return n&&(n.html||n.plain)?void(this._externalContent=n):this._externalContent},isExternal:function(){return!this._isInternal()},parse:function(){var f,i,e,n=r();this._isInternal()?n=this._internalContent:(f=this._externalContent,f.html?(i=this.iframe.contentWindow.document,i.open(),i.write(f.html),i.close(),e=t(i).find("table:first"),n=e.length?h(e):u(f.plain)):n=u(f.plain),this.origin=n.origRef),this._content=n},_isInternal:function(){var i,n;return void 0===this._externalContent.html||(i=!!t("<div/>").html(this._externalContent.html).find("table.kendo-clipboard-"+this._uid).length,n=!!t("<div/>").html(this._externalContent.plain).find("table.kendo-clipboard-"+this._uid).length,i||n)}}),n.spreadsheet.Clipboard=o)}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/range.min",["kendo.core.min","util/text-metrics.min"],n)}(function(){!function(n){function e(n,t,i){for(;n<=t&&i(n);)n++;if(n>t)return[];for(var r=n+1;r<=t;++r)if(i(r))return[{begin:n,end:r-1}].concat(e(r+1,t,i));return[{begin:n,end:t}]}function l(n){return n.replace(/M/g,"m").replace(/'/g,'"').replace(/tt/,"am/pm")}function h(t){return!/^=/.test(t)&&/number|percent/.test(n.spreadsheet.calc.parse(null,0,0,t).type)}function c(t,i,r,u){var f={baselineMarkerSize:0,width:u===!0?i+"px":"auto","font-size":(r||12)+"px","word-break":u===!0?"break-all":"normal","white-space":u===!0?"pre-wrap":"pre"};return n.util.measureText(t,f,s).height}var o,i,r,u,f,t,s;n.support.browser.msie&&n.support.browser.version<9||(o=n.jQuery,i=n.spreadsheet.UnionRef,r=n.spreadsheet.CellRef,u=n.spreadsheet.RangeRef,f=["color","fontFamily","underline","italic","bold","textAlign","verticalAlign","background","format","link","editor","borderTop","borderRight","borderBottom","borderLeft"],t=n.Class.extend({init:function(n,t){this._sheet=t,this._ref=n},clone:function(){return new t(this._ref.clone(),this._sheet)},skipHiddenCells:function(){var t=[],f=this,n=f._sheet,s=n.isHiddenRow.bind(n),o=n.isHiddenColumn.bind(n);return f._ref.forEach(function(n){var v,a,c,l,h,i;for(n=f._normalize(n.toRangeRef()),v=n.topLeft,a=n.bottomRight,c=e(v.row,a.row,s),l=e(v.col,a.col,o),h=0;h<c.length;++h)for(i=0;i<l.length;++i)t.push(new u(new r(c[h].begin,l[i].begin),new r(c[h].end,l[i].end)))}),n.range(t.length>1?new i(t):t[0])},_normalize:function(n){return this._sheet._grid.normalize(n)},_set:function(n,t,i){var r=this,u=r._sheet;return r._ref.forEach(function(i){u._set(i.toRangeRef(),n,t)}),i||u.triggerChange({recalc:"formula"==n||"value"==n||"validation"==n,value:t,range:r,ref:r._ref}),r},_get:function(n){return this._sheet._get(this._ref.toRangeRef(),n)},_property:function(n,t){return void 0===t?this._get(n):this._set(n,t)},value:function(n){return void 0!==n&&this._set("formula",null,!0),this._property("value",n)},resize:function(n){var i=this._resizedRef(n);return new t(i,this._sheet)},_resizedRef:function(n){return this._ref.map(function(t){return t.toRangeRef().resize(n)})},input:function(t){var i,o,u,f,e,s,r=this._get("format");return void 0!==t?(o=this._ref.toRangeRef().topLeft,i=n.spreadsheet.calc.parse(this._sheet.name(),o.row,o.col,t),this._sheet.batch(function(){var f,u=null;"exp"==i.type?u=n.spreadsheet.calc.compile(i):"@"!=r?(f=r&&n.spreadsheet.formatting.type(i.value,r),"date"==i.type&&"date"!=f?this.format(i.format||l(n.culture().calendar.patterns.d)):"percent"==i.type&&"percent"!=f?this.format(100*i.value==(100*i.value|0)?"0%":"0.00%"):i.format&&!r&&this.format(i.format)):"string"!=i.type&&(i.value=t),this.formula(u),u||this.value(i.value)}.bind(this),{recalc:!0,value:t,ref:this._ref,editorChange:this._sheet.isInEditMode()}),this):(t=this._get("value"),u=this._get("formula"),f=r&&!u&&n.spreadsheet.formatting.type(t,r),u?t="="+u:r&&"date"==f&&(e=n.spreadsheet.formatting.text(t,r),i=n.spreadsheet.calc.parse(null,null,null,e),"number"==typeof i.value&&(s=n.spreadsheet.formatting.text(i.value,r),e==s))?t=e:"date"===f?t=n.toString(n.spreadsheet.numberToDate(t),n.culture().calendar.patterns.d):"percent"===f?t=100*t+"%":"string"==typeof t&&(/^[=']/.test(t)||/^(?:true|false)$/i.test(t)||h(t))&&(t="'"+t),t)},enable:function(n){return void 0===n?(n=!0,this._sheet.forEach(this._ref.toRangeRef(),function(t,i,r){r.enable===!1&&(n=!1)}),n):this._property("enable",n)},formula:function(n){if(void 0===n){var t=this._get("formula");return t?""+t:null}return this._property("formula",n)},validation:function(n){if(void 0===n){var t=this._get("validation");return t?t.toJSON():null}return this._property("validation",n)},_getValidationState:function(){for(var r,n,t=this._ref.toRangeRef(),e=t.topLeft.row,o=t.topLeft.col,u=t.bottomRight.row,f=t.bottomRight.col,i=o;i<=f;i++)for(r=e;r<=u;r++)if(n=this._sheet._validation(r,i),n&&"reject"===n.type&&n.value===!1)return n;return!1},merge:function(){return this._ref=this._sheet._merge(this._ref),this},unmerge:function(){var n=this._sheet._mergedCells;return this._ref.forEach(function(t){t.toRangeRef().intersecting(n).forEach(function(t){n.splice(n.indexOf(t),1)})}),this._sheet.triggerChange({}),this},select:function(){return this._sheet.select(this._ref),this},values:function(t){var f,e,o,l,a,u,r,s,c,h;if(this._ref instanceof i)throw Error("Unsupported for multiple ranges.");if(this._ref===n.spreadsheet.NULLREF){if(void 0!==t)throw Error("Unsupported for NULLREF.");return[]}if(f=this._ref.toRangeRef(),e=f.topLeft.row,o=f.topLeft.col,l=f.bottomRight.row,a=f.bottomRight.col,void 0===t){for(t=Array(f.height()),s=0;s<t.length;s++)t[s]=Array(f.width());for(u=o;u<=a;u++)for(r=e;r<=l;r++)t[r-e][u-o]=this._sheet._value(r,u);return t}for(this._sheet._set(f,"formula",null),u=o;u<=a;u++)for(r=e;r<=l;r++)c=t[r-e],c&&(h=c[u-o],void 0!==h&&this._sheet._value(r,u,h));return this._sheet.triggerChange({recalc:!0,ref:f}),this},_properties:function(t){var r,s,o,v,l,f,e,u,h,a,c;if(this._ref instanceof i)throw Error("Unsupported for multiple ranges.");if(this._ref===n.spreadsheet.NULLREF){if(void 0!==t)throw Error("Unsupported for NULLREF.");return[]}if(r=this._ref.toRangeRef(),s=r.topLeft.row,o=r.topLeft.col,v=r.bottomRight.row,l=r.bottomRight.col,u=this._sheet,void 0===t)return t=Array(r.height()),u.forEach(r,function(n,i,r){n-=s,i-=o;var u=t[n]||(t[n]=[]);u[i]=r}),t;for(r=r.clone(),a=function(n){var t=h[n];r.topLeft.row=r.bottomRight.row=e,r.topLeft.col=r.bottomRight.col=f,"value"==n&&u._set(r,"formula",null),u._set(r,n,t)},f=o;f<=l;f++)if(!u.isHiddenColumn(f))for(e=s;e<=v;e++)c=t[e-s],c&&!u.isHiddenRow(e)&&(h=c[f-o],h&&Object.keys(h).forEach(a));return u.triggerChange({recalc:!0,ref:this._ref}),this},clear:function(n){var t,r,i;return n=n||{},t=n.clearAll||!Object.keys(n).length,r=this._sheet,i={recalc:t||n.contentsOnly,ref:this._ref},r.batch(function(){i.recalc&&this.formula(null),t&&this.validation(null),(t||n.formatOnly)&&(f.forEach(function(t){n.keepBorders&&/^border/i.test(t)||this[t](null)}.bind(this)),this.unmerge())}.bind(this),i),this},clearContent:function(){return this.clear({contentsOnly:!0})},clearFormat:function(){return this.clear({formatOnly:!0})},isSortable:function(){return!this.cantSort()},cantSort:function(){var f,s,o,t,e,u;if(this._ref instanceof i)return{code:"cantSortMultipleSelection",message:"Unsupported for multiple ranges."};if(this._ref===n.spreadsheet.NULLREF)return{code:"cantSortNullRef",message:"Unsupported for NULLREF."};f=this._sheet._getMergedCells(this._ref.toRangeRef()),s=f.primary,o=f.secondary,t=null,e=null,u={};try{this._sheet.forEach(this,function(n,i){var c=new r(n,i).print(),h=s[c];if(h){if(null===t)t=h.width(),e=h.height();else if(t!=h.width()||e!=h.height())throw u;}else if(!o[c]&&f.hasMerged)throw u;})}catch(h){if(h!==u)throw h;return{code:"cantSortMixedCells",message:"Unsupported for range containing cells of different shapes."}}return!1},sort:function(n){var t=this.cantSort();if(t)throw Error(t.message);return void 0===n&&(n={column:0}),n=n instanceof Array?n:[n],this._sheet._sortBy(this._ref.toRangeRef(),n.map(function(n,t){return"number"==typeof n&&(n={column:n}),{index:void 0===n.column?t:n.column,ascending:void 0===n.ascending||n.ascending}})),this},isFilterable:function(){return!(this._ref instanceof i)},filter:function(n){if(this._ref instanceof i)throw Error("Unsupported for multiple ranges.");return n===!1?this.clearFilters():(n=n===!0?[]:n instanceof Array?n:[n],this._sheet._filterBy(this._ref.toRangeRef(),n.map(function(n,t){return{index:void 0===n.column?t:n.column,filter:n.filter}}))),this},clearFilter:function(n){this._sheet.clearFilter(n)},clearFilters:function(){var n,i=this._sheet.filter(),t=[];if(i){for(n=0;n<i.columns.length;n++)t.push(n);this._sheet.batch(function(){this.clearFilter(t),this._filter=null},{layout:!0,filter:!0})}},hasFilter:function(){var n=this._sheet.filter();return!!n},leftColumn:function(){return new t(this._ref.leftColumn(),this._sheet)},rightColumn:function(){return new t(this._ref.rightColumn(),this._sheet)},topRow:function(){return new t(this._ref.topRow(),this._sheet)},bottomRow:function(){return new t(this._ref.bottomRow(),this._sheet)},column:function(n){return new t(this._ref.toColumn(n),this._sheet)},row:function(n){return new t(this._ref.toRow(n),this._sheet)},forEachRow:function(n){this._ref.forEachRow(function(i){n(new t(i,this._sheet))}.bind(this))},forEachColumn:function(n){this._ref.forEachColumn(function(i){n(new t(i,this._sheet))}.bind(this))},sheet:function(){return this._sheet},topLeft:function(){return this._ref.toRangeRef().topLeft},intersectingMerged:function(){var t=this._sheet,n=[];return t._mergedCells.forEach(function(t){t.intersects(this._ref)&&n.push(""+t)}.bind(this)),n},getState:function(t){var f,i,u=this._ref.first(),r={ref:u,data:[],origRef:this._ref};return t?f="input"===t?["value","formula"]:"border"===t?["borderLeft","borderTop","borderRight","borderBottom"]:[t]:(f=n.spreadsheet.ALL_PROPERTIES,r.mergedCells=this.intersectingMerged()),i=r.data,this.forEachCell(function(n,t,r){var o={},e=n-u.row,s=t-u.col;i[e]||(i[e]=[]),i[e][s]=o,f.forEach(function(n){o[n]=void 0===r[n]?null:r[n]})}),r},setState:function(n,t){var i=this._sheet,r=this._ref.first(),f=n.ref.row-r.row,u=n.ref.col-r.col;i.batch(function(){var o,e;n.mergedCells&&this.unmerge(),o=r.row,e=this.hasFilter(),n.data.forEach(function(u,f){if(!e||!t||t.isExternal()||!i.isHiddenRow(n.ref.row+f)){var s=r.col;u.forEach(function(u,h){var c,l;if(!e||!t||t.isExternal()||!i.isHiddenColumn(n.ref.col+h)){if(c=t?i.range(o,s):i.range(r.row+f,r.col+h),c.enable()){for(l in u)"value"!=l&&(t&&"enable"==l||c._set(l,u[l]));if(!u.formula)if(t&&t.isExternal())try{null==u.value?c._set("value",null):c.input(u.value)}catch(a){c._set("value",u.value)}else c._set("value",u.value)}s++}}),o++}}),n.mergedCells&&n.mergedCells.forEach(function(n){n=i._ref(n).relative(f,u,3),i.range(n).merge()},this)}.bind(this),{recalc:!0})},_adjustRowHeight:function(){for(var t=this._sheet,u=this.getState(),r=[],i=0;i<u.mergedCells.length;i++)r.push(t.range(u.mergedCells[i]));this.forEachRow(function(i){if(!(i.topLeft().row>=i.sheet()._rows._count)){var u=i.sheet().rowHeight(i.topLeft().row);i.forEachCell(function(i,f,e){for(var h,c=t.range(i,f),s=0,o=0;o<r.length;o++)if(c._ref.intersects(r[o]._ref)){s+=e.width;break}h=Math.max(t.columnWidth(f),s),u=Math.max(u,n.spreadsheet.util.getTextHeight(e.value,h,e.fontSize,e.wrap))}),t.rowHeight(i.topLeft().row,Math.max(t.rowHeight(i.topLeft().row),u))}})},forEachCell:function(n){this._ref.forEach(function(t){this._sheet.forEach(t.toRangeRef(),n.bind(this))}.bind(this))},hasValue:function(){var n={},t=this._sheet._defaultCellStyle;try{this.forEachCell(function(i,r,u){var e,f;for(e in u)if(f=u[e],void 0!==f&&null!==f&&f!==t[e])throw n;})}catch(i){if(i===n)return!0;throw i;}return!1},wrap:function(t){return void 0===t?!!this._property("wrap"):(this.forEachRow(function(t){var i=t.sheet().rowHeight(t.topLeft().row);t.forEachCell(function(t,r,u){var f=this._sheet.columnWidth(r);null!==u.value&&void 0!==u.value&&(i=Math.max(i,n.spreadsheet.util.getTextHeight(u.value,f,u.fontSize,!0)))}),t.sheet().rowHeight(t.topLeft().row,i)}.bind(this)),this._property("wrap",t),this)},fontSize:function(t){return void 0===t?this._property("fontSize"):(this.forEachRow(function(i){var r=i.sheet().rowHeight(i.topLeft().row);i.forEachCell(function(i,u,f){var e=this._sheet.columnWidth(u);null!==f.value&&void 0!==f.value&&(r=Math.max(r,n.spreadsheet.util.getTextHeight(f.value,e,t,f.wrap)))}),i.sheet().rowHeight(i.topLeft().row,r)}.bind(this)),this._property("fontSize",t),this)},draw:function(n,t){this._sheet.draw(this,n,t)},insideBorders:function(n){return this.insideVerticalBorders(n).insideHorizontalBorders(n)},insideVerticalBorders:function(n){return this._ref.forEach(function(t){t instanceof u&&t.width()>1&&(t=t.clone(),t.topLeft.col++,this._sheet.range(t)._set("vBorders",n))},this),this},insideHorizontalBorders:function(n){return this._ref.forEach(function(t){t instanceof u&&t.height()>1&&(t=t.clone(),t.topLeft.row++,this._sheet.range(t)._set("hBorders",n))},this),this}}),o.each(f,function(n,i){t.prototype[i]=function(n){return this._property(i,n)}}),s=o('<div style="position: absolute !important; top: -4000px !important; height: auto !important;padding: 1px !important; margin: 0 !important; border: 1px solid black !important;line-height: normal !important; visibility: hidden !important;white-space: pre-wrap; word-break: break-all;" />')[0],n.spreadsheet.util={getTextHeight:c},n.spreadsheet.Range=t)}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/runtime.min",["spreadsheet/references.min"],n)}(function(){"use strict";function t(n){return n instanceof t?n:void(this.code=n)}function wt(n,t,i){for(var r,f=i(n),u=n;++n<t;)r=i(n),r>f&&(f=r,u=n);return u}function tt(n,i){function a(n){var t,i,s,h;return r=n[0],t="{ ",Array.isArray(r)?(e+="while (i < args.length) { ",f+="while (i < args.length) { ",t+="xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ",t+="while (i < args.length) { ",t+=n.map(a).join(""),t+="} ",t+="xargs = stack.pop(); ",f+="} ",e+="} "):"+"==r?(e+="while (i < args.length) { ",f+="while (i < args.length) { ",t+="if (i >= args.length) return new CalcError('N/A'); ",t+="xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ",t+="do { ",t+=n.slice(1).map(a).join(""),t+="} while (i < args.length); ",t+="xargs = stack.pop(); ",f+="} ",e+="} "):"?"==r?t+="if (!("+o(n[1])+")) return new CalcError(err); ":(i=n[1],Array.isArray(i)&&/^#?collect/.test(i[0])?(s=i[2],u(),t+="try {var $"+r+" = this.cellValues(args.slice(i",s&&(t+=", i + "+s),t+=")).filter(function($"+r+"){ ","collect"==i[0]&&(t+="if ($"+r+" instanceof CalcError) throw $"+r+"; "),t+="return "+o(i[1])+"; }, this); ",t+=s?"i += "+s+"; ":"i = args.length; ",t+="xargs.push($"+r+")} catch(ex) { if (ex instanceof CalcError) return ex; throw ex; } ",f+="toResolve.push(args.slice(i)); "):"rest"==i?t+="xargs.push(args.slice(i)); i = args.length; ":((v=/^\*/.test(r))&&(y=!0,r=r.substr(1)),t+="var $"+r+" = args[i++]; ",h=!1,/!$/.test(i)?(i=i.substr(0,i.length-1),h=!0):t+="if ($"+r+" instanceof CalcError) return $"+r+"; ",t+=w(i,h)+"xargs.push($"+r+"); ")),t+="} "}function u(){return l?"$"+r:(p=!0,l=!0,f+="toResolve.push(args[i++]); ","($"+r+" = this.force($"+r+"))")}function s(n){return"("+(n?"(typeof "+u()+" == 'number' ? ($"+r+" = round($"+r+"), true) : false) || ":"(typeof "+u()+" == 'number') || ")+"(typeof $"+r+" == 'boolean') || (typeof $"+r+" == 'string' && !/^(?:=|true|false)/i.test($"+r+") ? (tmp = kendo.spreadsheet.calc.parse(0, 0, 0, $"+r+"), /^date|number|percent$/.test(tmp.type) ? ($"+r+" = +tmp.value, true) : false) : false))"}function w(n,t){l=!1;var i="if (!("+o(n)+")) { ";return l&&!t&&(i+=" if ($"+r+" instanceof CalcError) return $"+r+"; "),i+="return new CalcError(err); } ",l||(f+="i++; "),e+=v?"var $"+r+" = this.asMatrix(args[i]); if ($"+r+") { xargs.push($"+r+"); width = Math.max(width, $"+r+".width); height = Math.max(height, $"+r+".height); arrays.push(true) } else { xargs.push(args[i]); arrays.push(false); } i++; ":"xargs.push(args[i++]); arrays.push(false); ",i}function o(n){if(Array.isArray(n)){if("or"==n[0])return"("+n.slice(1).map(o).join(") || (")+")";if("and"==n[0])return"("+n.slice(1).map(o).join(") && (")+")";if("values"==n[0])return"("+n.slice(1).map(function(n){return u()+" === "+n}).join(") || (")+")";if("null"==n[0])return"("+o("null")+" ? (($"+r+" = "+n[1]+"), true) : false)";if("between"==n[0]||"[between]"==n[0])return"("+u()+" >= "+n[1]+" && $"+r+" <= "+n[2]+" ? true : ((err = 'NUM'), false))";if("(between)"==n[0])return"("+u()+" > "+n[1]+" && $"+r+" < "+n[2]+" ? true : ((err = 'NUM'), false))";if("(between]"==n[0])return"("+u()+" > "+n[1]+" && $"+r+" <= "+n[2]+" ? true : ((err = 'NUM'), false))";if("[between)"==n[0])return"("+u()+" >= "+n[1]+" && $"+r+" < "+n[2]+" ? true : ((err = 'NUM'), false))";if("assert"==n[0]){var t=n[2]||"N/A";return"(("+n[1]+") ? true : (err = "+JSON.stringify(t)+", false))"}if("not"==n[0])return"!("+o(n[1])+")";throw Error("Unknown array type condition: "+n[0]);}if("number"==n||"datetime"==n)return s(!0);if("integer"==n||"date"==n)return"("+s()+" && (($"+r+" |= 0), true))";if("divisor"==n)return"("+s(!0)+" && ($"+r+" == 0 ? ((err = 'DIV/0'), false) : true))";if("number+"==n)return"("+s(!0)+" && ($"+r+" >= 0 ? true : ((err = 'NUM'), false)))";if("integer+"==n)return"("+s()+" && (($"+r+" |= 0) >= 0 ? true : ((err = 'NUM'), false)))";if("number++"==n)return"("+s(!0)+" && ($"+r+" > 0 ? true : ((err = 'NUM'), false)))";if("integer++"==n)return"("+s()+" && (($"+r+" |= 0) > 0 ? true : ((err = 'NUM'), false)))";if("string"==n)return"((typeof "+u()+" == 'string' || typeof $"+r+" == 'boolean' || typeof $"+r+" == 'number') ? ($"+r+" += '', true) : ($"+r+" === undefined ? (($"+r+" = ''), true) : false))";if("boolean"==n)return"(typeof "+u()+" == 'boolean')";if("logical"==n)return"(typeof "+u()+" == 'boolean' || (typeof $"+r+" == 'number' ? ($"+r+" = !!$"+r+", true) : false))";if("matrix"==n)return u(),"((m = this.asMatrix($"+r+")) ? ($"+r+" = m) : false)";if("#matrix"==n)return"((m = this.asMatrix($"+r+")) ? ($"+r+" = m) : false)";if("ref"==n)return"($"+r+" instanceof kendo.spreadsheet.Ref)";if("area"==n)return"($"+r+" instanceof kendo.spreadsheet.CellRef || $"+r+" instanceof kendo.spreadsheet.RangeRef)";if("cell"==n)return"($"+r+" instanceof kendo.spreadsheet.CellRef)";if("null"==n)return"("+u()+" == null)";if("anyvalue"==n)return"("+u()+" != null && i <= args.length)";if("forced"==n)return"("+u()+", i <= args.length)";if("anything"==n)return"(i <= args.length)";if("blank"==n)return"("+u()+" == null || $"+r+" === '')";throw Error("Can't check for type: "+n);}var r,l,h,e="function arrayArgs(args) { var xargs = [], width = 0, height = 0, arrays = [], i = 0; ",f="function resolve(args, callback) { var toResolve = [], i = 0; ",c="'use strict'; function check(args) { var stack = [], tmp, xargs = [], i = 0, m, err = 'VALUE'; ",p=!1,v=!1,y=!1;return c+=i.map(a).join(""),c+="if (i < args.length) return new CalcError('N/A'); ",c+="return xargs; } ",e+="return { args: xargs, width: width, height: height, arrays: arrays }; } ",p?(f+="this.resolveCells(toResolve, callback); } ",h=Function("CalcError","round",c+f+e+" return { resolve: resolve, check: check, arrayArgs: arrayArgs };")):h=Function("CalcError","round",c+" return { check: check };"),h=h(t,ut),y||delete h.arrayArgs,h}function ut(n){var t=Math.floor(n),i=n-t;return t+Math.round(1e15*i)/1e15}function bt(n){return"number"==typeof n?ut(n):n}function vt(n,i,r){if(r instanceof t)return r;try{return i.apply(n,r)}catch(u){if(u instanceof t)return u;throw u;}}function dt(n,t,r,u){return function(f,e){function o(){var s,a,c,h,t,o,l;if(u&&(s=u.call(this,e),e=s.args,s.width>0&&s.height>0)){for(a=new i(this),c=0;c<s.height;++c)for(h=0;h<s.width;++h){for(t=[],o=0;o<e.length;++o)s.arrays[o]?(l=e[o],t[o]=l.get(c%l.height,h%l.width)):t[o]=e[o];t=r.call(this,t),a.set(c,h,vt(this,n,t))}return f(a)}t=r.call(this,e),f(vt(this,n,t))}t?t.call(this,e,o):o.call(this)}}function gt(n,r,u,f){return function(e,o){function s(){var r,v,c,p,a,l,s,h,y;if(f&&(r=f.call(this,o),o=r.args,r.width>0&&r.height>0))for(v=new i(this),c=r.width*r.height,p=function(n,t){return function(i){if(v.set(n,t,i),--c,0===c)return e(v)}},a=0;a<r.height&&c>0;++a)for(l=0;l<r.width&&c>0;++l){for(s=[],h=0;h<o.length;++h)r.arrays[h]?(y=o[h],s[h]=y.get(a%y.height,l%y.width)):s[h]=o[h];if(s=u.call(this,s),s instanceof t){if(v.set(a,l,s),--c,0===c)return e(v)}else s.unshift(p(a,l)),n.apply(this,s)}else r=u.call(this,o),r instanceof t?e(r):(r.unshift(e),n.apply(this,r))}r?r.call(this,o,s):s.call(this)}}function n(n,t){return n=n.toLowerCase(),f[n]=t,{args:function(i,r){var e,u=tt(n,i);return r&&(u.arrayArgs&&console.log(""+u.arrayArgs),u.resolve&&console.log(""+u.resolve),u.check&&console.log(""+u.check)),e=f[n]=dt(t,u.resolve,u.check,u.arrayArgs),e.kendoSpreadsheetArgs=i,this},argsAsync:function(i,r){var e,u=tt(n,i);return r&&(u.arrayArgs&&console.log(""+u.arrayArgs),u.resolve&&console.log(""+u.resolve),u.check&&console.log(""+u.check)),e=f[n]=gt(t,u.resolve,u.check,u.arrayArgs),e.kendoSpreadsheetArgs=i,this}}}function yt(n,t,i){return t++,(1461*(n+4800+((t-14)/12|0))/4|0)+(367*(t-2-12*((t-14)/12|0))/12|0)-(3*((n+4900+((t-14)/12|0))/100|0)/4|0)+i-32075}function kt(n){var t,o,r,e,i,u,f;return t=n+68569,o=4*t/146097|0,t-=(146097*o+3)/4|0,e=4e3*(t+1)/1461001|0,t=t-(1461*e/4|0)+31,r=80*t/2447|0,u=t-(2447*r/80|0),t=r/11|0,i=r+2-12*t,f=100*(o-49)+e+t,i--,{year:f,month:i,date:u,day:(n+1)%7,ord:g[p(f)][i]+u}}function p(n){return n%4?0:n%100?1:n%400?0:1}function pt(n){return p(n)?366:365}function ni(n,t){return p(n)&&1==t?29:et[t]}function ct(n){return kt((0|n)+d)}function lt(n,t,i){return yt(n,t,i)-d}function ht(n){var t,u,f,i,r=n-(0|n);return r<0&&r++,t=Math.round(it*r),u=Math.floor(t/w),t-=u*w,f=Math.floor(t/l),t-=f*l,i=Math.floor(t/1e3),t-=1e3*i,{hours:u,minutes:f,seconds:i,milliseconds:t}}function ot(n){var i=ct(n),t=ht(n);return new Date(i.year,i.month,i.date,t.hours,t.minutes,t.seconds,t.milliseconds)}function st(n,t,i,r){return(n+(t+(i+r/1e3)/60)/60)/24}function at(n){var t=st(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds());return n=lt(n.getFullYear(),n.getMonth(),n.getDate()),n<0?n-1+t:n+t}function ti(n){return kendo.parseDate(n)||kendo.parseDate(n,["MMMM dd yyyy","MMMM dd yy","MMM dd yyyy","MMM dd yy","dd MMMM yyyy","dd MMMM yy","dd MMM yyyy","dd MMM yy","MMMM dd, yyyy","MMMM dd, yy","MMM dd, yyyy","MMM dd, yy","MMMM dd","MMM dd","MMMM yyyy","MMM yyyy","dd MMMM","dd MMM"])}function y(n){return function(i,r){return"string"==typeof i&&"string"!=typeof r&&(r=null==r?"":r+""),"string"!=typeof i&&"string"==typeof r&&(i=null==i?"":i+""),"number"==typeof i&&null==r&&(r=0),"number"==typeof r&&null==i&&(i=0),"string"==typeof i&&"string"==typeof r&&(i=i.toLowerCase(),r=r.toLowerCase()),typeof r==typeof i?n(i,r):new t("VALUE")}}var b,u,r,v,e,k,h,nt,ft,rt,i,a,f,d,et,g,l,w,it,o,c,s;kendo.support.browser.msie&&kendo.support.browser.version<9||(b={},u=kendo.spreadsheet,u.calc=b,r=b.runtime={},v=kendo.Class,e=u.Ref,k=u.CellRef,h=u.RangeRef,nt=u.UnionRef,ft=u.NULLREF,t.prototype.toString=function(){return"#"+this.code+("NAME"==this.code?"?":"!")},rt=v.extend({init:function(n,t,i,r){this.callback=n,this.formula=t,this.ss=i,this.parent=r},resolve:function(n){var t=this;n instanceof e?t.resolveCells([n],function(){t._resolve(n)}):t._resolve(n)},error:function(n){return new t(n)},_resolve:function(n){n=void 0===n?null:Array.isArray(n)?this.asMatrix(n):bt(n);var t=this.formula;t.value=n,this.ss.onFormula(t)&&this.callback&&this.callback.call(t,n)},resolveCells:function(n,t){function s(n){n.exec(i.ss,function(){--f||t.call(i)},i)}function h(n){for(var i,t=0;t<n.length;++t)i=n[t],i.formula&&r.push(i.formula);return!0}var f,u,i=this,r=[];if(function o(n){for(var t,r=0;r<n.length;++r)t=n[r],t instanceof e&&h(i.getRefCells(t)),Array.isArray(t)&&o(t)}(n),!r.length)return t.call(i);for(f=r.length,u=0;u<r.length;++u)s(r[u])},cellValues:function(n,t){for(var r,u=[],f=0;f<n.length;++f)r=n[f],r instanceof e?(r=this.getRefData(r),u=u.concat(r)):Array.isArray(r)?u=u.concat(this.cellValues(r)):r instanceof i?u=u.concat(this.cellValues(r.data)):u.push(r);return t?t.apply(this,u):u},fetchName:function(n,i){var o,f=this.formula,r=this.ss.nameValue(n,f.sheet,f.row,f.col);r instanceof a?(r=r.clone(f.sheet,f.row,f.col,!0),o=new u.ValidationFormulaContext(this.ss.workbook),r.exec(o,i,this)):(r instanceof e&&(r=r.absolute(f.row,f.col),r.sheet||(r.sheet=f.sheet)),i(null==r?new t("NAME"):r))},force:function(n){return n instanceof e?this.getRefData(n):n},func:function(n,i,r){n=n.toLowerCase();var u=f[n];return u?u.call(this,i,r):void i(new t("NAME"))},bool:function(n){return n instanceof e&&(n=this.getRefData(n)),"string"==typeof n?"true"==n.toLowerCase():"number"==typeof n?0!==n:"boolean"==typeof n?n:null!=n},asMatrix:function(n){var r,s,o,f,c,t,u;return n instanceof i?n:(r=this,n instanceof h?(s=n.topLeft,o=s.row,f=s.col,c=r.getRefCells(n),t=new i(r),isFinite(n.width())&&(t.width=n.width()),isFinite(n.height())&&(t.height=n.height()),isFinite(o)||(o=0),isFinite(f)||(f=0),c.forEach(function(n){t.set(n.row-o,n.col-f,n.value)}),t):Array.isArray(n)&&n.length>0?(t=new i(r),u=0,n.forEach(function(n){var o=0,f=1;n.forEach(function(n){var s=n instanceof h;n instanceof e&&!s&&(n=r.getRefData(n)),(s||Array.isArray(n))&&(n=r.asMatrix(n)),n instanceof i?(n.each(function(n,i,r){t.set(u+i,o+r,n)}),f=Math.max(f,n.height),o+=n.width):t.set(u,o++,n)}),u+=f}),t):void 0)},getRefCells:function(n,t){var i=this.formula;return this.ss.getRefCells(n,t,i.sheet,i.row,i.col)},getRefData:function(n){var t=this.formula;return this.ss.getData(n,t.sheet,t.row,t.col)},workbook:function(){return this.ss.workbook}}),i=v.extend({init:function(n){this.context=n,this.height=0,this.width=0,this.data=[]},clone:function(){var n=new i(this.context);return n.height=this.height,n.width=this.width,n.data=this.data.map(function(n){return n.slice()}),n},get:function(n,t){var r=this.data[n],i=r?r[t]:null;return i instanceof e?this.context.getRefData(i):i},set:function(n,t,i){var r=this.data[n];null==r&&(r=this.data[n]=[]),r[t]=i,n>=this.height&&(this.height=n+1),t>=this.width&&(this.width=t+1)},each:function(n,t){for(var u,i,r=0;r<this.height;++r)for(u=0;u<this.width;++u)if(i=this.get(r,u),(t||null!=i)&&(i=n.call(this.context,i,r,u),void 0!==i))return i},map:function(n,t){var r=new i(this.context);return this.each(function(t,i,u){r.set(i,u,n.call(this,t,i,u))},t),r},eachRow:function(n){for(var i,t=0;t<this.height;++t)if(i=n.call(this.context,t),void 0!==i)return i},eachCol:function(n){for(var i,t=0;t<this.width;++t)if(i=n.call(this.context,t),void 0!==i)return i},mapRow:function(n){var t=new i(this.context);return this.eachRow(function(i){t.set(i,0,n.call(this.context,i))}),t},mapCol:function(n){var t=new i(this.context);return this.eachCol(function(i){t.set(0,i,n.call(this.context,i))}),t},toString:function(){return JSON.stringify(this.data)},transpose:function(){var n=new i(this.context);return this.each(function(t,i,r){n.set(r,i,t)}),n},unit:function(n){var r,i,u,t;for(this.width=this.height=n,r=this.data=Array(n),i=n;--i>=0;)for(u=r[i]=Array(n),t=n;--t>=0;)u[t]=i==t?1:0;return this},multiply:function(n){for(var u,s,r,h,o,e=this,c=new i(e.context),f=0;f<e.height;++f)for(u=0;u<n.width;++u){for(s=0,r=0;r<e.width;++r){if(h=e.get(f,r),o=n.get(r,u),"number"!=typeof h||"number"!=typeof o)throw new t("VALUE");s+=h*o}c.set(f,u,s)}return c},adds:function(n,t){for(var r,o,s,f=this,e=new i(f.context),h=t?-1:1,u=0;u<f.height;++u)for(r=0;r<f.width;++r)o=f.get(u,r),s=n.get(u,r),e.set(u,r,o+h*s);return e},determinant:function(){for(var r,f,t,o,i=this.clone().data,u=i.length,e=1,n=0;n<u;n++){for(r=n;r<u&&!i[r][n];r++);if(r==u)return 0;if(r!=n)for(e=-e,t=n;t<u;t++)o=i[n][t],i[n][t]=i[r][t],i[r][t]=o;for(f=n+1;f<u;f++)for(t=n+1;t<u;t++)i[f][t]-=i[n][t]*i[f][n]/i[n][n];e*=i[n][n]}return e},inverse:function(){for(var o,e,t,f,h,u=this.width,s=this.augment(new i(this.context).unit(u)),r=s.data,n=0;n<u;++n){if(e=wt(n,u,function(t){return r[t][n]}),!r[e][n])return null;for(n!=e&&(o=r[n],r[n]=r[e],r[e]=o),t=n+1;t<u;++t){for(f=n+1;f<2*u;++f)r[t][f]-=r[n][f]*r[t][n]/r[n][n];r[t][n]=0}}for(t=0;t<u;++t)for(h=r[t][t],f=0;f<2*u;++f)r[t][f]/=h;for(n=u;--n>=0;)for(t=n;--t>=0;)if(r[t][n])for(f=2*u;--f>=u;)r[t][f]-=r[n][f]*r[t][n];return s.slice(0,u,u,u)},augment:function(n){var t=this.clone(),i=t.width;return n.each(function(n,r,u){t.set(r,u+i,n)}),t},slice:function(n,t,r,u){for(var f,o=new i(this.context),e=0;e<r;++e)for(f=0;f<u;++f)o.set(e,f,this.get(n+e,t+f));return o}}),a=v.extend({init:function(n,t,i,r,u,f){this.refs=n,this.handler=t,this.print=i,this.absrefs=null,this.sheet=r,this.row=u,this.col=f,this.onReady=[],this.pending=!1},clone:function(n,t,i,r){var f=n.toLowerCase(),u=this.refs;return(r||f!=this.sheet.toLowerCase())&&(u=u.map(function(t){return t.hasSheet()||t.sheet&&t.sheet.toLowerCase()==f||(t=t.clone().setSheet(n)),t})),new a(u,this.handler,this.print,n,t,i)},resolve:function(n){this.pending=!1,this.onReady.forEach(function(t){t(n)})},exec:function(n,i,r){var e,f,u;if("value"in this)i&&i(this.value);else{for(i&&this.onReady.push(i),e=new rt(this.resolve,this,n,r),f=0;r;){if(r.formula===this)return this.pending=!1,void e.resolve(new t("CIRCULAR"));r=r.parent,++f}if(this.pending)return;this.pending=!0,u=function(){this.absrefs||(this.absrefs=this.refs.map(function(n){return n.absolute(this.row,this.col)},this)),this.handler.call(e)}.bind(this),f<20?u():setTimeout(u,0)}},reset:function(){this.onReady=[],this.pending=!1,delete this.value},renameSheet:function(n,t){n=n.toLowerCase(),this.absrefs=null,this.sheet.toLowerCase()==n&&(this.sheet=t),this.refs.forEach(function(i){i.renameSheet(n,t)})},adjust:function(n,t,i,r){var e,f,h,u,s,o;n=n.toLowerCase(),e=this.row,f=this.col,h=this.sheet.toLowerCase(),u=!1,h==n&&("row"==t&&e>=i&&(this.row+=r,u=!0),"col"==t&&f>=i&&(this.col+=r,u=!0)),s=this.row,o=this.col,this.absrefs=null,this.refs=this.refs.map(function(h){return h===ft?h:h.sheet.toLowerCase()!=n?(u&&("row"==t&&e>=i&&(h=h.relative(r,0)),"col"==t&&f>=i&&(h=h.relative(0,r))),h):h.adjust(e,f,s,o,"row"==t,i,r)},this)},toString:function(){return this.print(this.row,this.col)}}),f=Object.create(null),f["if"]=function(n,i){var u=this,r=i[0],e=i[1],f=i[2];this.resolveCells([r],function(){var i=u.asMatrix(r);i?e(function(r){f(function(f){var o=u.asMatrix(r),e=u.asMatrix(f);n(i.map(function(n,i,s){return n instanceof t?n:u.bool(n)?o?o.get(i,s):r:e?e.get(i,s):f}))})}):(r=this.force(r),r instanceof t?n(r):u.bool(r)?e(n):f(n))})},f["φ"]=function(n){n((1+Math.sqrt(5))/2)},d=yt(1900,0,-1),et=[31,28,31,30,31,30,31,31,30,31,30,31],g=[[0,31,59,90,120,151,181,212,243,273,304,334],[0,31,60,91,121,152,182,213,244,274,305,335]],l=6e4,w=60*l,it=24*w,r.CalcError=t,r.Formula=a,r.Matrix=i,r.packDate=lt,r.unpackDate=ct,r.packTime=st,r.unpackTime=ht,r.serialToDate=ot,r.dateToSerial=at,r.daysInMonth=ni,r.isLeapYear=p,r.daysInYear=pt,r.parseDate=ti,u.dateToNumber=at,u.numberToDate=ot,u.defineFunction=n,u.CalcError=t,r.defineFunction=n,r.defineAlias=function(n,t){var i=f[t];if(!i)throw Error("Function "+t+" is not yet defined");i.kendoSpreadsheetAliases||(i.kendoSpreadsheetAliases=[t]),i.kendoSpreadsheetAliases.push(n),f[n]=i},r.FUNCS=f,o=["or","number",["null",0]],c=[["*a",o],["*b",o]],s=[["*a",["or","anyvalue",["null",0]]],["*b",["or","anyvalue",["null",0]]]],n("binary+",function(n,t){return n+t}).args(c),n("binary-",function(n,t){return n-t}).args(c),n("binary*",function(n,t){return n*t}).args(c),n("binary/",function(n,t){return n/t}).args([["*a",o],["*b","divisor"]]),n("binary^",function(n,t){return Math.pow(n,t)}).args(c),n("binary&",function(n,t){return null==n&&(n=""),null==t&&(t=""),""+n+t}).args([["*a",["or","number","string","boolean","null"]],["*b",["or","number","string","boolean","null"]]]),n("binary=",function(n,t){return n===t}).args(s),n("binary<>",function(n,t){return n!==t}).args(s),n("binary<",y(function(n,t){return n<t})).args(s),n("binary<=",y(function(n,t){return n<=t})).args(s),n("binary>",y(function(n,t){return n>t})).args(s),n("binary>=",y(function(n,t){return n>=t})).args(s),n("unary+",function(n){return n}).args([["*a",o]]),n("unary-",function(n){return-n}).args([["*a",o]]),n("unary%",function(n){return n/100}).args([["*a",o]]),n("binary:",function(n,t){return new h(n,t).setSheet(n.sheet||this.formula.sheet,n.hasSheet())}).args([["a","cell"],["b","cell"]]),n("binary,",function(n,t){return new nt([n,t])}).args([["a","ref"],["b","ref"]]),n("binary ",function(n,t){return n.intersect(t)}).args([["a","ref"],["b","ref"]]),n("not",function(n){return!this.bool(n)}).args([["*a",["or","anyvalue",["null",0]]]]),n("isblank",function(n){return n instanceof k&&(n=this.getRefData(n),null==n)}).args([["*value","anything!"]]),n("iserror",function(n){return n instanceof t}).args([["*value","forced!"]]),n("iserr",function(n){return n instanceof t&&"N/A"!=n.code}).args([["*value","forced!"]]),n("isna",function(n){return n instanceof t&&"N/A"==n.code}).args([["*value","forced!"]]),n("islogical",function(n){return"boolean"==typeof n}).args([["*value","forced!"]]),n("isnontext",function(n){return"string"!=typeof n}).args([["*value","forced!"]]),n("istext",function(n){return"string"==typeof n}).args([["*value","forced!"]]),n("isnumber",function(n){return"number"==typeof n}).args([["*value","forced!"]]),n("isref",function(n){return n instanceof k||n instanceof h}).args([["*value","anything!"]]),f[",getname"]=function(n,t){this.fetchName(t[0],n)})},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/validation.min",["spreadsheet/runtime.min"],n)}(function(){"use strict";function s(r,u,e,s){var a,h,l,c;if("string"==typeof s&&(s=JSON.parse(s)),s.from&&("list"!==s.dataType||s.fromIsListValue||(s.from=kendo.format(f,s.from),s.fromIsListValue=!0),"date"===s.dataType&&(l=n.runtime.parseDate(s.from),l&&(s.from=kendo.format(i,s.from),s.fromIsDateValue=!0)),s.from=n.compile(n.parseFormula(r,u,e,s.from))),s.to&&("date"===s.dataType&&(c=n.runtime.parseDate(s.to),c&&(s.to=kendo.format(i,s.to),s.toIsDateValue=!0)),s.to=n.compile(n.parseFormula(r,u,e,s.to))),h="custom"==s.dataType?t.validationComparers.custom:"list"==s.dataType?t.validationComparers.list:t.validationComparers[s.comparerType],!h)throw kendo.format("'{0}' comparer is not implemented.",s.comparerType);return a=function(n){var i,t=this.to&&this.to_value?this.to_value:void 0;return null===n||""===n?this.value=!!this.allowNulls:"custom"==this.dataType?this.value=h(n,this.from_value,t):"list"==this.dataType?(i=this._getListData(),this.value=h(n,i,t)):this.value=h(n,this.from_value,t),this.value},new kendo.spreadsheet.validation.Validation(o.extend(s,{handler:a,sheet:r,row:u,col:e}))}var r,t,n,e,f,i,u,o=kendo.jQuery;kendo.support.browser.msie&&kendo.support.browser.version<9||(r=kendo.spreadsheet,t={},r.validation=t,n=r.calc,e=kendo.Class,f="_matrix({0})",i='DATEVALUE("{0}")',n.runtime.defineFunction("_matrix",function(n){return"string"==typeof n&&(n=this.asMatrix([n.split(/\s*,\s*/)])),n}).args([["m",["or","matrix","string"]]]),u=e.extend({init:function(n){this.handler=n.handler,this.from=n.from,this.to=n.to,this.dataType=n.dataType,this.comparerType=n.comparerType,this.type=n.type?n.type:"warning",this.allowNulls=!!n.allowNulls,this.fromIsDateValue=!!n.fromIsDateValue,this.toIsDateValue=!!n.toIsDateValue,this.showButton=n.showButton,this.fromIsListValue=!!n.fromIsListValue,this.sheet=n.sheet,this.row=n.row,this.col=n.col,n.tooltipMessageTemplate&&(this.tooltipMessageTemplate=n.tooltipMessageTemplate),n.tooltipTitleTemplate&&(this.tooltipTitleTemplate=n.tooltipTitleTemplate),n.messageTemplate&&(this.messageTemplate=n.messageTemplate),n.titleTemplate&&(this.titleTemplate=n.titleTemplate)},_formatMessages:function(n){var f=this.from?this.from_value:"",e=this.to?this.to_value:"",o=this.from?""+this.from:"",u=this.to?""+this.to:"",t=this.dataType,i=this.type,r=this.comparerType;return kendo.format(n,f,e,o,u,t,i,r)},_setMessages:function(){this.title="",this.message="",this.tooltipTitleTemplate&&(this.tooltipTitle=this._formatMessages(this.tooltipTitleTemplate)),this.tooltipMessageTemplate&&(this.tooltipMessage=this._formatMessages(this.tooltipMessageTemplate)),this.titleTemplate&&(this.title=this._formatMessages(this.titleTemplate)),this.messageTemplate&&(this.message=this._formatMessages(this.messageTemplate))},_getListData:function(){var u,n,t,r,i;if(!this.from_value||!this.from_value.data)return[];for(u=this.from_value.data,r=[],n=0;n<u.length;n++)if(i=u[n])for(t=0;t<i.length;t++)r.push(i[t]);return r},clone:function(n,t,i){var r=this._getOptions();return r.from&&(r.from=r.from.clone(n,t,i)),r.to&&(r.to=r.to.clone(n,t,i)),new u(o.extend(r,{handler:this.handler},{sheet:n,row:t,col:i}))},exec:function(n,t,i,r){function e(t){return t instanceof kendo.spreadsheet.Ref&&(t=n.getData(t),Array.isArray(t)&&(t=t[0])),t}var u=this,f=function(n){u.from_value=e(n),u.value=u.handler.call(u,t,i),u._setMessages(),r&&r(u.value)};u.to?u.to.exec(n,function(t){u.to_value=e(t),u.from.exec(n,f)}):u.from.exec(n,f)},reset:function(){this.from&&this.from.reset(),this.to&&this.to.reset(),delete this.value},adjust:function(n,t,i,r){var f,u;if(this.from&&this.from.adjust(n,t,i,r),this.to&&this.to.adjust(n,t,i,r),this.sheet.toLowerCase()==n.toLowerCase())switch(f=this.row,u=this.col,t){case"row":f>=i&&(this.row+=r);break;case"col":u>=i&&(this.col+=r)}},toJSON:function(){var n=this._getOptions();return n.from&&(n.from=""+n.from,"list"===n.dataType&&(n.from=n.from.replace(/^_matrix\((.*)\)$/i,"$1"),delete n.fromIsListValue),"date"===n.dataType&&this.fromIsDateValue&&(n.from=n.from.replace(/^DATEVALUE\("(.*)"\)$/i,"$1"),delete n.fromIsDateValue)),n.to&&(n.to=""+n.to,"date"===n.dataType&&this.toIsDateValue&&(n.to=n.to.replace(/^DATEVALUE\("(.*)"\)$/i,"$1"),delete n.toIsDateValue)),n},_getOptions:function(){return{from:this.from,to:this.to,dataType:this.dataType,type:this.type,comparerType:this.comparerType,row:this.row,col:this.col,sheet:this.sheet,allowNulls:this.allowNulls,fromIsListValue:this.fromIsListValue,fromIsDateValue:this.fromIsDateValue,toIsDateValue:this.toIsDateValue,tooltipMessageTemplate:this.tooltipMessageTemplate,tooltipTitleTemplate:this.tooltipTitleTemplate,messageTemplate:this.messageTemplate,titleTemplate:this.titleTemplate,showButton:this.showButton}}}),t.compile=s,t.validationComparers={greaterThan:function(n,t){return n>t},lessThan:function(n,t){return n<t},between:function(n,t,i){return n>=t&&n<=i},equalTo:function(n,t){return n==t},notEqualTo:function(n,t){return n!=t},greaterThanOrEqualTo:function(n,t){return n>=t},lessThanOrEqualTo:function(n,t){return n<=t},notBetween:function(n,t,i){return n<t||n>i},custom:function(n,t){return t},list:function(n,t){return t.indexOf(n)>-1}},t.Validation=u)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/sheet.min",["kendo.core.min","kendo.color.min","spreadsheet/runtime.min","spreadsheet/validation.min","spreadsheet/references.min"],n)}(function(){!function(n){var i,t,r,u,f;n.support.browser.msie&&n.support.browser.version<9||(i=n.spreadsheet.RangeRef,t=n.spreadsheet.CellRef,r=n.spreadsheet.Range,u=n.Class.extend({init:function(t){this._sheet=t,this.selection=n.spreadsheet.FIRSTREF.toRangeRef(),this.originalSelection=n.spreadsheet.FIRSTREF.toRangeRef(),this._activeCell=n.spreadsheet.FIRSTREF.toRangeRef(),this.originalActiveCell=n.spreadsheet.FIRSTREF},currentSelectionRange:function(){return this.selection.rangeAt(this.selectionRangeIndex).toRangeRef()},currentOriginalNavigationRange:function(){return this.originalSelection.rangeAt(this.selectionRangeIndex).toRangeRef()},currentNavigationRange:function(){return this.singleCellSelection()?this._sheet._sheetRef:this.selection.rangeAt(this.selectionRangeIndex).toRangeRef()},nextNavigationRange:function(){return this.singleCellSelection()||(this.selectionRangeIndex=this.selection.nextRangeIndex(this.selectionRangeIndex)),this.currentNavigationRange()},previousNavigationRange:function(){return this.singleCellSelection()||(this.selectionRangeIndex=this.selection.previousRangeIndex(this.selectionRangeIndex)),this.currentNavigationRange()},activeCell:function(n){return n&&(this.originalActiveCell=n.first(),this._activeCell=this._sheet.unionWithMerged(n.toRangeRef()),this._sheet.focus(n),this._sheet.triggerChange({activeCell:!0,selection:!0})),this._activeCell},select:function(n,t,i){if(n){if(n.eq(this.originalSelection))return;this._sheet.triggerSelect(new r(n,this._sheet)),this.originalSelection=n,this.selection=t,i!==!1?(this.activeCell(n.isCell()?n:this.selection.lastRange().first()),this.selectionRangeIndex=this.selection.size()-1):this._sheet.triggerChange({selection:!0})}return this.selection},singleCellSelection:function(){return this._activeCell.eq(this.selection)}}),f=n.Observable.extend({init:function(){n.Observable.prototype.init.call(this),this._reinit.apply(this,arguments)},events:["commandRequest","afterInsertRow","afterDeleteRow","insertRow","insertColumn","deleteRow","deleteColumn","hideRow","hideColumn","unhideRow","unhideColumn","select"],_reinit:function(t,i,r,f,e,o,s){s=s||{},this._defaultCellStyle={background:s.background,color:s.color,fontFamily:s.fontFamily,fontSize:s.fontSize,italic:s.italic,bold:s.bold,underline:s.underline,wrap:s.wrap},this._rows=new n.spreadsheet.Axis(t,r),this._columns=new n.spreadsheet.Axis(i,f),this._mergedCells=[],this._frozenRows=0,this._frozenColumns=0,this._suspendChanges=!1,this._filter=null,this._showGridLines=!0,this._gridLinesColor=null,this._grid=new n.spreadsheet.Grid(this._rows,this._columns,t,i,e,o),this._sheetRef=this._grid.normalize(n.spreadsheet.SHEETREF),this._properties=new n.spreadsheet.PropertyBag(t,i,this._defaultCellStyle),this._sorter=new n.spreadsheet.Sorter(this._grid,this._properties.sortable()),this._viewSelection=new u(this),this._editSelection=new u(this),this._formulaSelections=[]},_selectionState:function(){return this._inEdit?this._editSelection:this._viewSelection},navigator:function(){return this._navigator||(this._navigator=new n.spreadsheet.SheetNavigator(this)),this._navigator},axisManager:function(){return this._axisManager||(this._axisManager=new n.spreadsheet.AxisManager(this)),this._axisManager},_name:function(n){return n?(this._sheetName=n,this):this._sheetName},name:function(){return this._name()},_property:function(n,t,i){return void 0===t?n():(n(t),this.triggerChange(i))},_field:function(n,t,i){return void 0===t?this[n]:(this[n]=t,this.triggerChange(i))},suspendChanges:function(n){return void 0===n?this._suspendChanges:(this._suspendChanges=n,this)},triggerChange:function(n){return this._suspendChanges||this.trigger("change",n),this},triggerSelect:function(n){this.trigger("select",{range:n})},setDataSource:function(t,i){this.dataSourceBinder&&this.dataSourceBinder.destroy(),this.dataSourceBinder=new n.spreadsheet.SheetDataSourceBinder({dataSource:t,sheet:this,columns:i}),this.dataSource=this.dataSourceBinder.dataSource},hideColumn:function(n){if(!this.trigger("hideColumn",{index:n}))return this._property(this._columns.hide.bind(this._columns),n,{layout:!0})},unhideColumn:function(n){if(!this.trigger("unhideColumn",{index:n}))return this._property(this._columns.unhide.bind(this._columns),n,{layout:!0})},isHiddenColumn:function(n){return this._grid._columns.hidden(n)},_copyRange:function(n,t){var r=this._grid,i=r.rowCount,f=r.normalize(n.topLeft),u=r.normalize(n.bottomRight),s=f.col*i+f.row,o=u.col*i+u.row,e=t.col*i+t.row;this._properties.copy(s,o,e)},_adjustReferences:function(t,r,u,f){var o,e,s;this._mergedCells=f.reduce(function(n,f){return f=f.adjust(null,null,null,null,"row"==t,r,u),f instanceof i&&n.push(f),n},[]),this._workbook&&(o=this._name(),this._workbook._sheets.forEach(function(n){n._forFormulas(function(n){n.adjust(o,t,r,u)}),n._forValidations(function(n){n.adjust(o,t,r,u)})}),this._workbook.adjustNames(o,"row"==t,r,u)),e=this.select(),e=e.adjust(null,null,null,null,"row"==t,r,u),e!==n.spreadsheet.NULLREF&&this.select(e),s="col"==t?this._columns:this._rows,s.adjust(r,u)},_forFormulas:function(n){var r=this._properties,t=r.get("formula").values(),i=t.length;t.forEach(function(t,r){n.call(this,t.value,r,i)},this)},_forValidations:function(n){var t=this._properties;t.get("validation").values().forEach(function(t){n.call(this,t.value)},this)},preventInsertRow:function(n,t){var i,r;return this.selectedHeaders().allRows?{reason:"error",type:"insertRowWhenColumnIsSelected"}:(t=t||1,i=this._grid,r=this.range(i.rowCount-t,0,t,i.columnCount),!!r.hasValue()&&{reason:"error",type:"shiftingNonblankCells"})},preventInsertColumn:function(n,t){var i,r;return this.selectedHeaders().allCols?{reason:"error",type:"insertColumnWhenRowIsSelected"}:(t=t||1,i=this._grid,r=this.range(0,i.columnCount-t,i.rowCount,t),!!r.hasValue()&&{reason:"error",type:"shiftingNonblankCells"})},insertRow:function(n){var u=this.preventInsertRow(n);if(u)throw Error("Shifting nonblank cells off the worksheet is not supported!");if(!this.trigger("insertRow",{index:n}))return this.batch(function(){var c,u,o,f,l,h,e=this._grid,a=e.columnCount,v=e.rowCount,s=this.frozenRows();for(n<s&&this.frozenRows(s+1),c=this._mergedCells.slice(),u=0;u<a;u++)o=new i(new t(n,u),new t(n,u)),f=e.normalize(o.topLeft),l=e.normalize(o.bottomRight),h=new i(new t(f.row,f.col),new t(v-2,l.col)),this._copyRange(h,new t(f.row+1,f.col)),new r(o,this).clear({clearAll:!0,keepBorders:!0});this._adjustReferences("row",n,1,c)},{recalc:!0,layout:!0,insertRow:{index:n},ref:new i(new t(n,0),new t(1/0,1/0))}),this.trigger("afterInsertRow",{index:n}),this},isEnabledRow:function(n){var u=new i(new t(n,0),new t(n,this._grid.columnCount));return new r(u,this).enable()},deleteRow:function(n){return this.isEnabledRow(n)?this.trigger("deleteRow",{index:n})?void 0:(this.batch(function(){var l,u,e,o,a,s,h,f=this._grid,v=f.columnCount,c=this.frozenRows();for(n<c&&this.frozenRows(c-1),l=this._mergedCells.slice(),u=0;u<v;u++)e=new i(new t(n,u),new t(n,u)),new r(e,this).clear({clearAll:!0,keepBorders:!0}),o=f.normalize(e.topLeft),a=f.normalize(e.bottomRight),s=new i(new t(o.row+1,o.col),new t(1/0,a.col)),this._copyRange(s,o),h=f.normalize(s.bottomRight),new r(new i(h,h),this).clear();this._adjustReferences("row",n,-1,l)},{recalc:!0,layout:!0,deleteRow:{index:n},ref:new i(new t(n,0),new t(1/0,1/0))}),this.trigger("afterDeleteRow",{index:n}),this):this},insertColumn:function(n){if(!this.trigger("insertColumn",{index:n}))return this.batch(function(){var c,u,e,f,s,l,o=this._grid,a=o.columnCount,h=this.frozenColumns();for(n<h&&this.frozenColumns(h+1),c=this._mergedCells.slice(),u=a;u>=n&&(e=new i(new t(0,u),new t(1/0,u)),new r(e,this).clear({clearAll:!0,keepBorders:!0}),u!=n);u--)f=o.normalize(e.topLeft),s=o.normalize(e.bottomRight),l=new i(new t(f.row,f.col-1),new t(s.row,s.col-1)),this._copyRange(l,f);this._adjustReferences("col",n,1,c)},{recalc:!0,layout:!0,insertColumn:{index:n},ref:new i(new t(0,n),new t(1/0,1/0))}),this},isEnabledColumn:function(n){var u=new i(new t(0,n),new t(1/0,n));return new r(u,this).enable()},deleteColumn:function(n){return this.isEnabledColumn(n)?this.trigger("deleteColumn",{index:n})?void 0:(this.batch(function(){var l,u,f,e,s,a,o=this._grid,c=o.columnCount,h=this.frozenColumns();for(n<h&&this.frozenColumns(h-1),l=this._mergedCells.slice(),u=n;u<c&&(f=new i(new t(0,u),new t(1/0,u)),new r(f,this).clear({clearAll:!0,keepBorders:!0}),u!=c-1);u++)e=o.normalize(f.topLeft),s=o.normalize(f.bottomRight),a=new i(new t(e.row,e.col+1),new t(s.row,s.col+1)),this._copyRange(a,e);this._adjustReferences("col",n,-1,l)},{recalc:!0,layout:!0,deleteColumn:{index:n},ref:new i(new t(0,n),new t(1/0,1/0))}),this):this},hideRow:function(n){if(!this.trigger("hideRow",{index:n}))return this._property(this._rows.hide.bind(this._rows),n,{layout:!0})},unhideRow:function(n){if(!this.trigger("unhideRow",{index:n}))return this._property(this._rows.unhide.bind(this._rows),n,{layout:!0})},isHiddenRow:function(n){return this._grid._rows.hidden(n)},columnWidth:function(n,t){return this._property(this._columns.value.bind(this._columns,n,n),t,{layout:!0})},rowHeight:function(n,t){return this._property(this._rows.value.bind(this._rows,n,n),t,{layout:!0})},frozenRows:function(n){return this._field("_frozenRows",n,{layout:!0})},frozenColumns:function(n){return this._field("_frozenColumns",n,{layout:!0})},showGridLines:function(n){return this._field("_showGridLines",n,{layout:!0})},gridLinesColor:function(n){return this._field("_gridLinesColor",n,{layout:!0})},_ref:function(r,u,f,e){var o=null;return r instanceof n.spreadsheet.Ref?r:r instanceof n.spreadsheet.Range?r._ref.toRangeRef():("string"==typeof r?o=n.spreadsheet.calc.parseReference(r):(f||(f=1),e||(e=1),o=new i(new t(r,u),new t(r+f-1,u+e-1))),o)},range:function(n,t,i,u){return new r(this._ref(n,t,i,u),this)},_getMergedCells:function(n){var u=this._grid,i={},r={},t=!1;return this.forEachMergedCell(n,function(f){var e=f.topLeft;u.forEach(f,function(u){e.eq(u)?(i[u.print()]=f,t=!0):n.contains(u)&&(r[u.print()]=e,t=!0)})}),{primary:i,secondary:r,hasMerged:t}},forEachMergedCell:function(n,t){var i=!1;void 0===t&&(t=n,i=!0),this._mergedCells.forEach(function(r){(i||r.intersects(n))&&t(r)})},forEachFilterHeader:function(n,t){var i,r=!1;void 0===t&&(t=n,r=!0),this._filter&&(i=[],this._filter.ref.forEachColumn(function(t){(r||t.intersects(n))&&i.push(t.topLeft)}),this._mergedCells.forEach(function(n){i=i.map(function(t){return n.intersects(t)?n:t})}),i.reduce(function(n,t){return n.indexOf(t)<0&&n.push(t),n},[]).forEach(t))},forEach:function(n,t){function h(n){t(u++,r,n)}var e,f,r,u,o,s;for(n instanceof i||(n=this._ref(n)),e=this._grid.normalize(n.topLeft),f=this._grid.normalize(n.bottomRight),r=e.col;r<=f.col;r++)u=e.row,o=this._grid.index(u,r),s=this._grid.index(f.row,r),this._properties.forEach(o,s,h)},startResizing:function(n){this._initialPosition=n,this._resizeInProgress=!0},startAutoFill:function(){this._autoFillInProgress=!0;var n=this.select();this._autoFillOrigin=n,this._autoFillDest=n,this.triggerChange({selection:!0})},updateAutoFill:function(n,t,i,r){this._autoFillDest=n,this._autoFillPunch=t,this._autoFillHint=i,this._autoFillDirection=r,this.triggerChange({selection:!0})},autoFillRef:function(){return this._autoFillDest},autoFillPunch:function(){return this._autoFillPunch},autoFillInProgress:function(){return this._autoFillInProgress},resizingInProgress:function(){return this._resizeInProgress},completeResizing:function(){var t,n;this._resizeInProgress&&(this._resizeInProgress=!1,t=this.resizeHintPosition(),this._initialPosition&&t?(n=this.resizeHandlePosition(),n.col!==-(1/0)?this.trigger("commandRequest",{command:"ColumnWidthCommand",options:{target:n.col,value:this.columnWidth(n.col)-(this._initialPosition.x-t.x)}}):this.trigger("commandRequest",{command:"RowHeightCommand",options:{target:n.row,value:this.rowHeight(n.row)-(this._initialPosition.y-t.y)}})):this.trigger("change",{resize:!0}))},resizeHandlePosition:function(){return this._resizeHandlePosition},resizeHintPosition:function(n){return void 0!==n&&(this._resizeHintPosition=n,this.trigger("change",{resize:!0})),this._resizeHintPosition},removeResizeHandle:function(){this._resizeHandlePosition&&(this._resizeHintPosition=void 0,this._resizeHandlePosition=void 0,this._initialPosition=void 0,this.trigger("change",{resize:!0}))},positionResizeHandle:function(n){this._resizeHandlePosition=n,this.trigger("change",{resize:!0})},startSelection:function(){this._selectionInProgress=!0},completeSelection:function(){var n,t;this._selectionInProgress&&(this._selectionInProgress=!1,this._resizeHintPosition=void 0,this.trigger("change",{selection:!0})),this._autoFillInProgress&&(this._autoFillInProgress=!1,n=this._autoFillDest,t=this._autoFillOrigin,this._autoFillPunch?this.trigger("commandRequest",{command:"ClearContentCommand",options:{operatingRange:this.range(this._autoFillPunch)}}):n.eq(t)?this.triggerChange({selection:!0}):this.trigger("commandRequest",{command:"AutoFillCommand",options:{operatingRange:this.range(n),origin:this.range(t)}}),this._autoFillDest=null,this._autoFillPunch=null,this._autoFillOrigin=null,this.select(n))},selectionInProgress:function(){return this._selectionInProgress},select:function(n,t){var i,r=this._selectionState();return n&&(n=this._ref(n),n=this._grid.normalize(n),i=this._grid.isAxis(n)?n:this.unionWithMerged(n)),r.select(n,i,t)},originalSelect:function(){return this._selectionState().originalSelection},currentSelectionRange:function(){return this._selectionState().currentSelectionRange()},currentOriginalSelectionRange:function(){return this._selectionState().currentOriginalNavigationRange()},currentNavigationRange:function(){return this._selectionState().currentNavigationRange()},nextNavigationRange:function(){return this._selectionState().nextNavigationRange()},previousNavigationRange:function(){return this._selectionState().previousNavigationRange()},selectionRangeIndex:function(){return this._selectionState().selectionRangeIndex},activeCell:function(n){return this._selectionState().activeCell(n)},originalActiveCell:function(){return this._selectionState().originalActiveCell},singleCellSelection:function(){return this._selectionState().singleCellSelection()},unionWithMerged:function(n){var t=this._mergedCells;return n.map(function(n){return n.toRangeRef().union(t)})},trim:function(n){var t=[],i=this._grid;return this._properties.forEachProperty(function(r){t.push(i.trim(n,r.list))}),this.unionWithMerged(n.topLeft.toRangeRef().union(t))},focus:function(n){if(!n){var t=this._focus;return this._focus=null,t}this._focus=n.toRangeRef()},activeCellSelection:function(){return new r(this._grid.normalize(this.activeCell()),this)},selection:function(){return new r(this._grid.normalize(this._selectionState().selection),this)},selectedHeaders:function(){var e=this.select(),r={},n={},i=!1,t=!1,f=this._grid.rowCount-1,u=this._grid.columnCount-1;return e.forEach(function(e){var o,h,s,l,c,v="partial",a="partial";if(e=e.toRangeRef(),h=e.bottomRight,s=e.topLeft,l=s.col<=0&&h.col>=u,c=s.row<=0&&h.row>=f,c&&(t=!0,a="full"),l&&(i=!0,v="full"),!c)for(o=s.row;o<=h.row;o++)"full"!==r[o]&&(r[o]=v);if(!l)for(o=s.col;o<=h.col;o++)"full"!==n[o]&&(n[o]=a)}),{rows:r,cols:n,allRows:t,allCols:i,all:t&&i}},isInEditMode:function(n){return void 0===n?this._inEdit:(this._inEdit=n,void(n&&(this._editSelection.selection=this._viewSelection.selection.clone(),this._editSelection.originalSelection=this._viewSelection.originalSelection.clone(),this._editSelection._activeCell=this._viewSelection._activeCell.clone(),this._editSelection.originalActiveCell=this._viewSelection.originalActiveCell.clone())))},_setFormulaSelections:function(n){this._formulaSelections=(n||[]).slice(),this.triggerChange({selection:!0})},_viewActiveCell:function(){return this._viewSelection._activeCell.toRangeRef()},toJSON:function(){function o(n){Object.keys(r).forEach(function(t){n[t]===r[t]&&delete n[t]})}var t,u={},i=this._rows.toJSON("height",u),s=this._columns.toJSON("width",{}),e=this._viewSelection,f=[],r=this._defaultCellStyle||{};return this.forEach(n.spreadsheet.SHEETREF,function(t,r,e){if(o(e),0!==Object.keys(e).length){e.link&&f.push({ref:n.spreadsheet.Ref.display(null,t,r),target:e.link});var s=u[t];void 0===s&&(s=i.length,i.push({index:t}),u[t]=s),t=i[s],e.index=r,void 0===t.cells&&(t.cells=[]),e.formula&&(e.formula=""+e.formula),e.validation&&(e.validation=e.validation.toJSON()),e.color&&(e.color=n.parseColor(e.color).toCss()),e.background&&(e.background=n.parseColor(e.background).toCss()),e.borderTop&&e.borderTop.color&&(e.borderTop.color=n.parseColor(e.borderTop.color).toCss()),e.borderBottom&&e.borderBottom.color&&(e.borderBottom.color=n.parseColor(e.borderBottom.color).toCss()),e.borderRight&&e.borderRight.color&&(e.borderRight.color=n.parseColor(e.borderRight.color).toCss()),e.borderLeft&&e.borderLeft.color&&(e.borderLeft.color=n.parseColor(e.borderLeft.color).toCss()),t.cells.push(e)}}),t={name:this._name(),rows:i,columns:s,selection:""+e.selection,activeCell:""+e.activeCell(),frozenRows:this.frozenRows(),frozenColumns:this.frozenColumns(),showGridLines:this.showGridLines(),gridLinesColor:this.gridLinesColor(),mergedCells:this._mergedCells.map(function(n){return""+n}),hyperlinks:f,defaultCellStyle:r},this._sort&&(t.sort={ref:""+this._sort.ref,columns:this._sort.columns.map(function(n){return{index:n.index,ascending:n.ascending}})}),this._filter&&(t.filter={ref:""+this._filter.ref,columns:this._filter.columns.map(function(n){var t=n.filter.toJSON();return t.index=n.index,t})}),t},fromJSON:function(t){this.batch(function(){var f,e,r,o,i,u,h,s,c;if(void 0!==t.name&&this._name(t.name),void 0!==t.frozenColumns&&this.frozenColumns(t.frozenColumns),void 0!==t.frozenRows&&this.frozenRows(t.frozenRows),void 0!==t.columns&&this._columns.fromJSON("width",t.columns),void 0!==t.rows)for(this._rows.fromJSON("height",t.rows),f=0;f<t.rows.length;f++)if(e=t.rows[f],r=e.index,void 0===r&&(r=f),e.cells)for(o=0;o<e.cells.length;o++)i=e.cells[o],u=i.index,void 0===u&&(u=o),i.formula&&(i.formula=this._compileFormula(r,u,i.formula)),i.validation&&(i.validation=this._compileValidation(r,u,i.validation)),this._properties.fromJSON(this._grid.index(r,u),i);t.selection&&(this._viewSelection.selection=this._viewSelection.originalSelection=this._ref(t.selection)),t.activeCell&&(h=this._ref(t.activeCell),this._viewSelection._activeCell=h.toRangeRef(),this._viewSelection.originalActiveCell=h),t.mergedCells&&t.mergedCells.forEach(function(n){this.range(n).merge()},this),t.sort&&(this._sort={ref:this._ref(t.sort.ref),columns:t.sort.columns.slice(0)}),t.filter&&(s=t.filter.ref,c=void 0===t.filter.columns?[]:t.filter.columns,s?(this._filter={ref:this._ref(s),columns:c.map(function(t){return{index:t.index,filter:n.spreadsheet.Filter.create(t)}})},this._refreshFilter()):n.logToConsole("Dropping filter for sheet '"+t.name+"' due to missing ref")),void 0!==t.showGridLines&&(this._showGridLines=t.showGridLines),this._gridLinesColor=t.gridLinesColor}),this._rows._refresh(),this._columns._refresh()},formula:function(n){return this._properties.get("formula",this._grid.cellRefIndex(n))},validation:function(n){return this._properties.get("validation",this._grid.cellRefIndex(n))},resetFormulas:function(){this._forFormulas(function(n){n.reset()})},resetValidations:function(){this._forValidations(function(n){n.reset()})},recalc:function(n,t){function e(){r--,u!=i||r||t()}var f=this._properties.get("formula").values(),i=f.length,r=0,u=0;if(!i&&t)return t();for(;u<i;)r++,f[u++].value.exec(n,t?e:null)},revalidate:function(n){var r=this;this._forValidations(function(u){var e=new t(u.row,u.col),f=new i(e,e);u.exec(n,r._get(f,"value"),r._get(f,"format"))})},_value:function(n,t,i){var r=this._grid.index(n,t);return void 0===i?this._properties.get("value",r):void this._properties.set("value",r,r,i)},_validation:function(n,t){var i=this._grid.index(n,t);return this._properties.get("validation",i)},_compileValidation:function(t,i,r){return r instanceof n.spreadsheet.validation.Validation?r.clone(this._name(),t,i):(null!=r.from&&(r.from=(r.from+"").replace(/^=/,"")),null!=r.to&&(r.to=(r.to+"").replace(/^=/,"")),n.spreadsheet.validation.compile(this._name(),t,i,r))},_compileFormula:function(t,i,r){return r=r.replace(/^=/,""),r=n.spreadsheet.calc.parseFormula(this._name(),t,i,r),n.spreadsheet.calc.compile(r)},_copyValuesInRange:function(n,t,i,r){for(var o,s,f,e,u=n.col;u<=t.col;u++)for(o=this._grid.index(n.row,u),s=this._grid.index(t.row,u),f=o,e=n.row;f<=s;++f,++e)i=i.clone(this._name(),e,u),this._properties.set(r,f,f,i);return i},_set:function(n,t,i){var u,e,o,r=this._grid.normalize(n.topLeft),f=this._grid.normalize(n.bottomRight);if(i&&"formula"==t)"string"==typeof i&&(i=this._compileFormula(r.row,r.col,i)),i=this._copyValuesInRange(r,f,i,"formula");else if(i&&"validation"==t)i=this._compileValidation(r.row,r.col,i),i=this._copyValuesInRange(r,f,i,"validation");else for(u=r.col;u<=f.col;u++)e=this._grid.index(r.row,u),o=this._grid.index(f.row,u),this._properties.set(t,e,o,i),"formula"==t&&this._properties.set("value",e,o,null)},_get:function(n,t){var i=this._grid.normalize(n.topLeft),r=this._grid.index(i.row,i.col);return this._properties.get(t,r)},batch:function(n,t){var i=this.suspendChanges();return this.suspendChanges(!0),n.call(this),this.suspendChanges(i).triggerChange(t||{recalc:!0})},_sortBy:function(n,t){var i=null;t.forEach(function(t){i=this._sorter.sortBy(n,t.index,this._properties.get("value"),t.ascending,i)},this),this._sort={ref:n,columns:t},this._refreshFilter(),this.triggerChange({recalc:!0})},_refreshFilter:function(){this._filter&&this._filterBy(this._filter.ref,this._filter.columns)},_filterBy:function(t,i){this.batch(function(){for(var r=t.topLeft.row;r<=t.bottomRight.row;r++)this._rows.hidden(r)&&this._rows.unhide(r);i.forEach(function(i){var u,f,e,o=t.resize({top:1}).toColumn(i.index),r=[];if(o!==n.spreadsheet.NULLREF)for(this.forEach(o,function(n,t,i){i.row=n,r.push(i)}),i.filter.prepare(r),u=0;u<r.length;u++)f=r[u],e=i.filter.value(f),i.filter.matches(e)===!1&&this.hideRow(f.row)},this),this._filter={ref:t,columns:i}},{layout:!0,filter:!0})},filterColumn:function(n){var t=this.filter().ref;return n.toRangeRef().topLeft.col-t.topLeft.col},filter:function(){return this._filter},clearFilter:function(n){this._clearFilter(n instanceof Array?n:[n])},_clearFilter:function(n){this._filter&&this.batch(function(){this._filter.columns=this._filter.columns.filter(function(t){return n.indexOf(t.index)<0}),this._refreshFilter()},{layout:!0,filter:!0})},getAxisState:function(){return{rows:this._rows.getState(),columns:this._columns.getState()}},setAxisState:function(n){this._rows.setState(n.rows),this._columns.setState(n.columns),this.triggerChange({layout:!0})},getState:function(){return{rows:this._rows.getState(),columns:this._columns.getState(),mergedCells:this._mergedCells.map(function(n){return n.clone()}),properties:this._properties.getState()}},setState:function(t){this._rows.setState(t.rows),this._columns.setState(t.columns),this._mergedCells=t.mergedCells,this._properties.setState(t.properties),this.triggerChange(n.spreadsheet.ALL_REASONS)},_merge:function(t){var f,u=this._mergedCells,i=this;return this.batch(function(){f=t.map(function(t){var o,f,s,l,h,c,e;return t instanceof n.spreadsheet.CellRef?t:(o=t.toRangeRef().union(u,function(n){u.splice(u.indexOf(n),1)}),f=new r(o,i),s=f._get("formula"),l=f.value(),h=f.format(),c=f.background(),f.value(null),f.format(null),f.background(null),e=new r(o.collapse(),i),s?e._set("formula",s):e.value(l),e.format(h),e.background(c),u.push(o),o)});var e=i._viewSelection;e.selection=i.unionWithMerged(e.originalSelection),e._activeCell=i.unionWithMerged(e.originalActiveCell)},{activeCell:!0,selection:!0}),f}}),n.spreadsheet.Sheet=f)}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/sheetsbar.min",["kendo.core.min","kendo.sortable.min"],n)}(function(){!function(n){var u,f,r,t,e,i;n.support.browser.msie&&n.support.browser.version<9||(u=n.jQuery,f=n._outerWidth,r=".",t=" ",e={sheetsBarWrapper:"k-widget k-header",sheetsBarSheetsWrapper:"k-tabstrip k-floatwrap k-tabstrip-bottom",sheetsBarActive:"k-spreadsheet-sheets-bar-active",sheetsBarInactive:"k-spreadsheet-sheets-bar-inactive",sheetsBarAdd:"k-spreadsheet-sheets-bar-add",sheetsBarRemove:"k-spreadsheet-sheets-remove",sheetsBarItems:"k-spreadsheet-sheets-items",sheetsBarEditor:"k-spreadsheet-sheets-editor",sheetsBarScrollable:"k-tabstrip-scrollable",sheetsBarNext:"k-tabstrip-next",sheetsBarPrev:"k-tabstrip-prev",sheetsBarKItem:"k-item k-state-default",sheetsBarKActive:"k-state-active k-state-tab-on-top",sheetsBarKTextbox:"k-textbox",sheetsBarKLink:"k-link",sheetsBarKIcon:"k-icon",sheetsBarKFontIcon:"k-icon",sheetsBarKButton:"k-button k-button-icon",sheetsBarKButtonBare:"k-bare",sheetsBarKArrowW:"k-i-arrow-60-left",sheetsBarKArrowE:"k-i-arrow-60-right",sheetsBarKReset:"k-reset k-tabstrip-items",sheetsBarKIconX:"k-i-close",sheetsBarKSprite:"k-sprite",sheetsBarKIconPlus:"k-i-plus",sheetsBarHintWrapper:"k-widget k-tabstrip k-tabstrip-bottom k-spreadsheet-sheets-items-hint",sheetsBarKResetItems:"k-reset k-tabstrip-items"},i=n.ui.Widget.extend({init:function(t,u){var f=i.classNames;n.ui.Widget.call(this,t,u),t=this.element,t.addClass(f.sheetsBarWrapper),this._openDialog=u.openDialog,this._tree=new n.dom.Tree(t[0]),this._tree.render([this._addButton(),this._createSheetsWrapper([])]),this._toggleScrollEvents(!0),this._createSortable(),this._sortable.bind("start",this._onSheetReorderStart.bind(this)),this._sortable.bind("end",this._onSheetReorderEnd.bind(this)),t.on("click",r+f.sheetsBarRemove,this._onSheetRemove.bind(this)),t.on("click","li",this._onSheetSelect.bind(this)),t.on("dblclick","li"+r+f.sheetsBarActive,this._createEditor.bind(this)),t.on("click",r+f.sheetsBarAdd,this._onAddSelect.bind(this))},options:{name:"SheetsBar",scrollable:{distance:200}},events:["select","reorder","rename"],_createEditor:function(){this._editor||(this._renderSheets(this._sheets,this._selectedIndex,!0),this._editor=this.element.find(n.format("input{0}{1}",r,i.classNames.sheetsBarEditor)).focus().on("keydown",this._onEditorKeydown.bind(this)).on("blur",this._onEditorBlur.bind(this)))},_destroyEditor:function(n){var t=n?null:this._editor.val();this._editor.off(),this._editor=null,this._renderSheets(this._sheets,this._selectedIndex,!1),this._onSheetRename(t)},renderSheets:function(n,t){!n||t<0||this._renderSheets(n,t,!1)},_renderSheets:function(u,e,o){var y,p,a,b,w,v,k,h,d,c,g,s=this,l=i.classNames;s._isRtl=n.support.isRtl(s.element),s._sheets=u,s._selectedIndex=e,s._renderHtml(o,!0),s._scrollableAllowed()&&(a=s._sheetsWrapper(),b=a.children(r+l.sheetsBarPrev),w=a.children(r+l.sheetsBarNext),v=2,k=s.element.find(r+l.sheetsBarAdd),h=f(k)+k.position().left+v,d=f(b)+v,c=s._sheetsGroup(),b.css({left:h}),a.addClass(l.sheetsBarScrollable+t+l.sheetsBarSheetsWrapper),c.css({marginLeft:h}),y=a[0].offsetWidth,p=c[0].scrollWidth,p+h>y?(g=Math.ceil(n.parseFloat(w.css("right"))),s._scrollableModeActive||(s._nowScrollingSheets=!1,s._scrollableModeActive=!0),c.css({marginLeft:d+h,marginRight:f(w)+g+v})):s._scrollableModeActive&&p<=y?(s._scrollableModeActive=!1,c.css({marginLeft:h,marginRight:""})):c.css({marginLeft:h}),s._toggleScrollButtons())},_toggleScrollButtons:function(n){var f=this,t=f._sheetsGroup(),s=f._sheetsWrapper(),u=t.scrollLeft(),o=s.find(r+i.classNames.sheetsBarPrev),e=s.find(r+i.classNames.sheetsBarNext);n===!1?(o.toggle(!1),e.toggle(!1)):(o.toggle(f._isRtl?u<t[0].scrollWidth-t[0].offsetWidth-1:0!==u),e.toggle(f._isRtl?0!==u:u<t[0].scrollWidth-t[0].offsetWidth-1))},_toggleScrollEvents:function(n){var t=this,o=i.classNames,e=t.options,s=t._sheetsWrapper(),u=s.children(r+o.sheetsBarPrev),f=s.children(r+o.sheetsBarNext);n?(u.on("mousedown",function(){t._nowScrollingSheets=!0,t._scrollSheetsByDelta(e.scrollable.distance*(t._isRtl?1:-1))}),f.on("mousedown",function(){t._nowScrollingSheets=!0,t._scrollSheetsByDelta(e.scrollable.distance*(t._isRtl?-1:1))}),u.add(f).on("mouseup",function(){t._nowScrollingSheets=!1})):(u.off(),f.off())},_renderHtml:function(r,u){for(var h,a,l,s,p,v=[],y=n.dom,o=y.element,c=this._sheets,w=this._selectedIndex,f=i.classNames,e=0;e<c.length;e++)h=c[e],a=e===w,l={className:f.sheetsBarKItem+t},s=[],l.className+=a?f.sheetsBarKActive+t+f.sheetsBarActive:f.sheetsBarInactive,a&&r?s.push(o("input",{type:"text",value:h.name(),className:f.sheetsBarKTextbox+t+f.sheetsBarEditor,maxlength:50},[])):(s.push(o("span",{className:f.sheetsBarKLink,title:h.name()},[y.text(h.name())])),c.length>1&&(p=o("span",{className:f.sheetsBarKIcon+t+f.sheetsBarKFontIcon+t+f.sheetsBarKIconX},[]),s.push(o("span",{className:f.sheetsBarKLink+t+f.sheetsBarRemove},[p])))),v.push(o("li",l,s));this._tree.render([this._addButton(),this._createSheetsWrapper(v,u)])},_createSheetsWrapper:function(r,u){var s,e=n.dom.element,f=i.classNames,o=[e("ul",{className:f.sheetsBarKReset},r)];return u=!0,u&&(s=f.sheetsBarKButton+t+f.sheetsBarKButtonBare+t,o.push(e("span",{className:s+f.sheetsBarPrev},[e("span",{className:f.sheetsBarKIcon+t+f.sheetsBarKArrowW},[])])),o.push(e("span",{className:s+f.sheetsBarNext},[e("span",{className:f.sheetsBarKIcon+t+f.sheetsBarKArrowE},[])]))),e("div",{className:f.sheetsBarItems},o)},_createSortable:function(){var t=i.classNames;this._sortable=new n.ui.Sortable(this.element,{filter:n.format("ul li.{0},ul li.{1}",t.sheetsBarActive,t.sheetsBarInactive),container:r+t.sheetsBarItems,axis:"x",animation:!1,ignore:"input",end:function(){this.draggable.hint&&this.draggable.hint.remove()},hint:function(n){var i=u(n).clone();return i.wrap("<div class='"+t.sheetsBarHintWrapper+"'><ul class='"+t.sheetsBarKResetItems+"'></ul></div>").closest("div")}})},_onEditorKeydown:function(n){this._editor&&(13===n.which&&this._destroyEditor(),27===n.which&&this._destroyEditor(!0))},_onEditorBlur:function(){this._editor&&this._destroyEditor()},_onSheetReorderEnd:function(n){n.preventDefault(),this.trigger("reorder",{oldIndex:n.oldIndex,newIndex:n.newIndex})},_onSheetReorderStart:function(n){this._editor&&n.preventDefault()},_onSheetRemove:function(n){var t,i=u(n.target).closest("li").text();this._editor&&this._destroyEditor(),t=function(n){var t=n.sender;t.isConfirmed()&&this.trigger("remove",{name:i,confirmation:!0})}.bind(this),this._openDialog("confirmation",{close:t})},_onSheetSelect:function(n){var t=u(n.target).text();return u(n.target).is(r+i.classNames.sheetsBarEditor)||!t?void n.preventDefault():(this._editor&&this._destroyEditor(),this._scrollSheetsToItem(u(n.target).closest("li")),void this.trigger("select",{name:t,isAddButton:!1}))},_onSheetRename:function(n){this._sheets[this._selectedIndex].name()!==n&&null!==n&&this.trigger("rename",{name:n,sheetIndex:this._selectedIndex})},_onAddSelect:function(){this.trigger("select",{isAddButton:!0})},_addButton:function(){var u=n.dom.element,r=i.classNames;return u("a",{className:r.sheetsBarAdd+t+r.sheetsBarKButton},[u("span",{className:r.sheetsBarKIcon+t+r.sheetsBarKFontIcon+t+r.sheetsBarKIconPlus},[])])},destroy:function(){this._sortable.destroy()},_scrollableAllowed:function(){var n=this.options;return n.scrollable&&!isNaN(n.scrollable.distance)},_scrollSheetsToItem:function(n){var i,r,s,t,h,o,u,e=this;e._scrollableModeActive&&(i=e._sheetsGroup(),r=i.scrollLeft(),s=f(n),t=e._isRtl?n.position().left:n.position().left-i.children().first().position().left,h=i[0].offsetWidth,o=Math.ceil(parseFloat(i.css("padding-left"))),e._isRtl?t<0?u=r+t-(h-r)-o:t+s>h&&(u=r+t-s+2*o):r+h<t+s?u=t+s-h+2*o:r>t&&(u=t-o),i.finish().animate({scrollLeft:u},"fast","linear",function(){e._toggleScrollButtons()}))},_sheetsGroup:function(){return this._sheetsWrapper().children("ul")},_sheetsWrapper:function(){return this.element.find(r+i.classNames.sheetsBarItems)},_scrollSheetsByDelta:function(n){var t=this,i=t._sheetsGroup(),r=i.scrollLeft();i.finish().animate({scrollLeft:r+n},"fast","linear",function(){t._nowScrollingSheets?t._scrollSheetsByDelta(n):t._toggleScrollButtons()})}}),n.spreadsheet.SheetsBar=i,u.extend(!0,i,{classNames:e}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/calc.min",["spreadsheet/runtime.min"],n)}(function(){"use strict";function e(n){n=n.toUpperCase();for(var i=0,t=0;t<n.length;++t)i=26*i+n.charCodeAt(t)-64;return i-1}function f(n){return parseInt(n,10)-1}function st(n,t){var c,l,a,s,h,i;if("#sheet"==n.toLowerCase())return r.SHEETREF;n:{if(!(c=/^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(n))){for(s=y(n,{}),h=[];;){if(i=s.next(),i instanceof u)i.rel=0;else{if(!(i instanceof o))break n;i.topLeft.rel=0,i.bottomRight.rel=0}if(h.push(i),s.eof())break;if(!s.is("op",","))break n;s.next()}return 1==h.length?h[0]:new r.UnionRef(h)}if(l=f(c[4]),a=e(c[2]),l<1048576&&a<16384)return new u(f(c[4]),e(c[2]))}if(!t)throw Error("Cannot parse reference: "+n);}function v(n,i,r,u){function w(n){return n.index=v.length,v.push(n),n}function e(n,t,i){if(f(n,t))return u.next();var r=u.peek();r?u.croak("Expected "+n+" «"+t+"» but found "+r.type+" «"+r.value+"»"):i||u.croak("Expected "+n+" «"+t+"»")}function o(n){return a(nt(l(n)),0,n)}function k(n){return"TRUE"==n.upper||"FALSE"==n.upper?"TRUE"==n.upper?c:h:w(new s(n.value))}function b(){var n,t=u.next();for(t=t.value,e("punc","("),n=[];;){if(f("punc",")"))break;if(f("op",","))n.push({type:"null"}),u.next();else{if(n.push(o(!1)),u.eof()||f("punc",")"))break;e("op",",")}}return e("punc",")",!0),{type:"func",func:t,args:n}}function d(t){return t.hasSheet()||t.setSheet(n),w(t)}function l(n){var t;return f("ref")?t=d(u.next()):f("func")?t=b():f("punc","(")?(u.next(),t=o(!0),e("punc",")",!0)):f("punc","{")?(u.next(),t=g(),e("punc","}",!0)):f("num")||f("str")||f("error")?t=u.next():f("sym")?t=k(u.next()):f("op","+")||f("op","-")?t={type:"prefix",op:u.next().value,exp:l(n)}:u.croak(u.peek()?f("punc","[")?"External reference not supported":"Parse error":"Incomplete expression"),p(t)}function g(){for(var n=[],i=[n],t=!0;!u.eof()&&!f("punc","}");)t?t=!1:f("punc",";")?(i.push(n=[]),u.next()):e("op",","),n.push(o(!1));return{type:"matrix",value:i}}function nt(n){return f("punc","(")||f("ref")||f("num")||f("func")?{type:"binary",op:" ",left:n,right:o(!1)}:n}function p(n){return f("op","%")?(u.next(),p({type:"postfix",op:"%",exp:n})):n}function a(n,i,r){var o,s,e=f("op");return e&&(r||","!=e.value)&&(o=t[e.value],o>i)?(u.next(),s=a(l(r),o,r),a({type:"binary",op:e.value,left:n,right:s},i,r)):n}var f,v=[];return u=y(u,{row:i,col:r}),f=u.is,{type:"exp",ast:o(!0),refs:v,sheet:n,row:i,col:r}}function ft(n,t){var i,r=v(null,0,0,n);if(!(r.ast instanceof s))throw new l("Invalid name: "+n);return r=r.ast,t instanceof p||(i=v(r.sheet,0,0,t),t=i.ast instanceof p?i.ast:/^(?:str|num|bool|error)$/.test(i.ast.type)?i.ast.value:ut(i)),{name:r,value:t}}function ht(n){function i(n,u,f){function e(i){var e=n.op,o=t[e]<f||!f&&","==e||"prefix"==u.type&&f==t[e]&&"-"==u.op||"binary"==u.type&&f==t[e]&&n===u.right;return r(i(),o)}switch(n.type){case"num":case"bool":return JSON.stringify(n.value);case"error":return JSON.stringify("#"+n.value);case"str":return JSON.stringify(JSON.stringify(n.value));case"ref":return"this.refs["+n.index+"].print(row, col, mod)";case"prefix":return e(function(){return JSON.stringify(n.op)+" + "+i(n.exp,n,t[n.op])});case"postfix":return e(function(){return i(n.exp,n,t[n.op])+" + "+JSON.stringify(n.op)});case"binary":return e(function(){var f=r(i(n.left,n,t[n.op]),n.left instanceof s&&":"==n.op),u=r(i(n.right,n,t[n.op]),n.right instanceof s&&":"==n.op);return f+" + "+JSON.stringify(n.op)+" + "+u});case"func":return JSON.stringify(n.func+"(")+" + "+(n.args.length>0?n.args.map(function(t){return i(t,n,0)}).join(" + ', ' + "):"''")+" + ')'";case"matrix":return"'{ ' + "+n.value.map(function(t){return t.map(function(t){return i(t,n,0)}).join(" + ', ' + ")}).join(" + '; ' + ")+"+ ' }'";case"null":return"''"}throw Error("Cannot make printer for node "+n.type);}function r(n,t){return t?"'(' + "+n+" + ')'":n}return b("function(row, col, mod){return("+i(n.ast,n,0)+")}")}function at(n,t){function i(n,t){switch(n.type){case"ref":return p(n,t);case"num":case"str":case"null":case"error":case"bool":return u(n,t);case"prefix":case"postfix":return v(n,t);case"binary":return k(n,t);case"func":return o(n,t);case"lambda":return s(n,t);case"matrix":return e(n.value,t,!0)}throw Error("Cannot CPS "+n.type);}function p(n,t){return"name"==n.ref?y(n,t):u(n,t)}function u(n,t){return t(n)}function y(n,t){return{type:"func",func:",getname",args:[f(t),n]}}function v(n,t){return i({type:"func",func:"unary"+n.op,args:[n.exp]},t)}function k(n,t){return i({type:"func",func:"binary"+n.op,args:[n.left,n.right]},t)}function b(n,t,u,e){return i(n,function(n){var l=f(e),o=r("T"),s=r("E");return{type:"func",func:"if",args:[l,n,{type:"lambda",vars:[o],body:i(t||c,function(n){return{type:"call",func:{type:"var",name:o},args:[n]}})},{type:"lambda",vars:[s],body:i(u||h,function(n){return{type:"call",func:{type:"var",name:s},args:[n]}})}]}})}function w(n,t){return 0===n.length?u(c,t):i({type:"func",func:"IF",args:[n[0],{type:"func",func:"AND",args:n.slice(1)},h]},t)}function a(n,t){return 0===n.length?u(h,t):i({type:"func",func:"IF",args:[n[0],c,{type:"func",func:"OR",args:n.slice(1)}]},t)}function o(n,t){switch(n.func.toLowerCase()){case"if":return b(n.args[0],n.args[1],n.args[2],t);case"and":return w(n.args,t);case"or":return a(n.args,t);case"true":return t(c);case"false":return t(h)}return function r(t,u){return u==n.args.length?{type:"func",func:n.func,args:t}:i(n.args[u],function(n){return r(t.concat([n]),u+1)})}([f(t)],0)}function s(n,t){var u=r("K"),f=i(n.body,function(n){return{type:"call",func:{type:"var",value:u},args:[n]}});return t({type:"lambda",vars:[u].concat(n.vars),body:f})}function e(n,t,r){var u=[];return function f(o){return o==n.length?t({type:"matrix",value:u}):(r?e:i)(n[o],function(n){return u[o]=n,f(o+1)})}(0)}function f(n){var t=r("R");return{type:"lambda",vars:[t],body:n({type:"var",name:t})}}function r(n){return n||(n=""),n="_"+n,n+ ++l}var l=0;return i(n,t)}function ut(n){function t(n){var i=n.type;if("num"==i)return n.value+"";if("str"==i)return JSON.stringify(n.value);if("error"==i)return"context.error("+JSON.stringify(n.value)+")";if("return"==i)return"context.resolve("+t(n.value)+")";if("func"==i)return"context.func("+JSON.stringify(n.func)+", "+t(n.args[0])+", "+f(n.args.slice(1))+")";if("call"==i)return t(n.func)+"("+n.args.map(t).join(", ")+")";if("ref"==i)return"refs["+n.index+"]";if("bool"==i)return""+n.value;if("if"==i)return"(context.bool("+t(n.co)+") ? "+t(n.th)+" : "+t(n.el)+")";if("lambda"==i)return"(function("+n.vars.join(", ")+"){ return("+t(n.body)+") })";if("var"==i)return n.name;if("matrix"==i)return f(n.value);if("null"==i)return"null";throw Error("Cannot compile expression "+i);}function f(n){return"[ "+n.map(t).join(", ")+" ]"}var u,o=ht(n),e=o.call(n),r=w[e];return r?r.clone(n.sheet,n.row,n.col):(u=t(at(n.ast,function(n){return{type:"return",value:n}})),u=["function(){","var context = this, refs = context.formula.absrefs",u,"}"].join(";\n"),r=new i.Formula(n.refs,b(u),o,n.sheet,n.row,n.col),w[e]=r,r)}function nt(n){return n}function y(n,t){function b(n,t){var i=v();return null==i||null!=n&&i.type!==n||null!=t&&i.value!==t?null:i}function v(){return null==c&&(c=y()),c}function p(){if(null!=c){var n=c;return c=null,n}return y()}function y(){var i,t=n.peek();return t&&("sym"!=t.type&&"rc"!=t.type&&"num"!=t.type||(i=h(8,tt)||h(6,g)||h(6,w)||h(4,it)||h(4,ut)||h(2,rt)||h(2,k)),i||(i=n.next())),i}function i(i,r){var o,s,l,c,h;if("rc"==i.type)return!i.rel||t.forEditor||null!=t.row&&null!=t.col||n.croak("Cannot read relative cell in RC notation"),new u(i.row,i.col,i.rel);if("num"==i.type)return i.value<=1048577?a(new u(f(i.value),r?-(1/0):+(1/0),2)):null;if(o=i.value,s=/^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(o))return l=f(s[4]),c=e(s[2]),l<=1048576&&c<=16383?a(new u(f(s[4]),e(s[2]),(s[1]?0:1)|(s[3]?0:2))):null;if(h="$"==o.charAt(0),h&&(o=o.substr(1)),/^\d+$/.test(o)){if(l=f(o),l<=1048576)return a(new u(f(o),r?-(1/0):+(1/0),h?0:2))}else if(c=e(o),c<=16383)return a(new u(r?-(1/0):+(1/0),e(o),h?0:1))}function tt(n,t,u,f,e,s,h,c){if("sym"==n.type&&"op"==t.type&&":"==t.value&&"sym"==u.type&&"punc"==f.type&&"!"==f.value&&("sym"==e.type||"rc"==e.type||"num"==e.type&&e.value==e.value|0)&&"op"==s.type&&":"==s.value&&("sym"==h.type||"rc"==h.type||"num"==h.type&&h.value==h.value|0)&&h.type==e.type&&("punc"!=c.type||"("!=c.value||h.space)){var v=i(e,!0),a=i(h,!1);if(v&&a)return r(7),l(new o(v.setSheet(n.value,!0),a.setSheet(u.value,!0)).setSheet(n.value,!0),n,h)}}function g(n,t,u,f,e,s){var h,c;if("sym"==n.type&&"op"==t.type&&":"==t.value&&"sym"==u.type&&"punc"==f.type&&"!"==f.value&&("sym"==e.type||"rc"==e.type||"num"==e.type&&e.value==e.value|0)&&("punc"!=s.type||"("!=s.value||e.space)&&(h=i(e)))return r(5),c=h.clone(),l(new o(h.setSheet(n.value,!0),c.setSheet(u.value,!0)).setSheet(n.value,!0),n,e)}function w(n,t,u,f,e,s){if("sym"==n.type&&"punc"==t.type&&"!"==t.value&&("sym"==u.type||"rc"==u.type||"num"==u.type&&u.value==u.value|0)&&"op"==f.type&&":"==f.value&&("sym"==e.type||"rc"==e.type||"num"==e.type&&e.value==e.value|0)&&("punc"!=s.type||"("!=s.value||e.space)){var c=i(u,!0),h=i(e,!1);if(c&&h)return r(5),l(new o(c,h).setSheet(n.value,!0),n,e)}}function it(n,t,u,f){if("sym"==n.type&&"punc"==t.type&&"!"==t.value&&("sym"==u.type||"rc"==u.type||"num"==u.type&&u.value==u.value|0)&&("punc"!=f.type||"("!=f.value||u.space)){r(3);var e=i(u);return e&&isFinite(e.row)||(e=new s(u.value)),l(e.setSheet(n.value,!0),n,u)}}function ut(n,t,u,f){if(("sym"==n.type||"rc"==n.type||"num"==n.type&&n.value==n.value|0)&&"op"==t.type&&":"==t.value&&("sym"==u.type||"rc"==u.type||"num"==u.type&&u.value==u.value|0)&&("punc"!=f.type||"("!=f.value||u.space)){var s=i(n,!0),e=i(u,!1);if(s&&e)return r(3),l(new o(s,e),n,u)}}function rt(n,t){if(("sym"==n.type||"rc"==n.type)&&("punc"!=t.type||"("!=t.value||n.space)){var u=i(n);if(u&&isFinite(u.row)&&isFinite(u.col))return r(1),l(u,n,n)}}function k(n,t){if("sym"==n.type&&"punc"==t.type&&"("==t.value&&!n.space)return n.type="func",r(1),n}var h,r,c,a,l;return n=lt(d(n),t),h=n.ahead,r=n.skip,c=null,a=null!=t.row&&null!=t.col?function(n){return 1&n.rel&&(n.col-=t.col),2&n.rel&&(n.row-=t.row),n}:nt,l=t.forEditor?function(n,t,i){return n.begin=t.begin,n.end=i.end,n}:nt,{peek:v,next:p,croak:n.croak,eof:n.eof,is:b}}function tt(n){return" \t\n ​".indexOf(n)>=0}function lt(n,i){function e(n){return/[0-9]/i.test(n)}function s(n){return/[a-z$_]/i.test(n)||it.isUnicodeLetter(n)}function d(n){return s(n)||e(n)||"."==n}function g(n){return n in t}function b(n){return"!;(){}[]".indexOf(n)>=0}function k(){var n=!1,t=u(function(t){return"."==t?!n&&(n=!0,!0):e(t)});return{type:"num",value:parseFloat(t)}}function l(t,i){return{type:"sym",value:t,upper:t.toUpperCase(),space:tt(n.peek()),quote:i}}function c(n,t,i){if(!n&&!t&&!i)return null;if(!n&&!i||n&&i){var r=t?parseInt(t,10):0;return n?r:r-1}}function ft(){var i,r,t=n.lookingAt(/^R(\[)?(-?[0-9]+)?(\])?C(\[)?(-?[0-9]+)?(\])?/i);return t&&(i=c(t[1],t[2],t[3]),r=c(t[4],t[5],t[6]),null!=i&&null!=r)?(n.skip(t),{type:"rc",row:i,col:r,rel:(t[4]||!(t[4]||t[5]||t[6])?1:0)|(t[1]||!(t[1]||t[2]||t[3])?2:0)}):l(u(d))}function v(){return n.next(),{type:"str",value:n.readEscaped('"')}}function et(){return n.next(),l(n.readEscaped("'"),!0)}function nt(){return{type:"op",value:u(function(n,i){return i+n in t})}}function ut(){return{type:"punc",value:n.next()}}function w(){if(n.eof())return null;var r,t=n.peek();return'"'==t?v():"'"==t?et():e(t)||"."==t?k():s(t)?ft():g(t)?nt():b(t)?ut():(r=n.lookingAt(/^#([a-z\/]+)[?!]?/i))?(n.skip(r),{type:"error",value:r[1]}):(i.forEditor||n.croak("Can't handle character: "+t),{type:"error",value:n.next()})}function o(){for(var e,t;f.length<=r;)u(tt),e=n.pos(),t=w(),i.forEditor&&t&&(t.begin=e,t.end=n.pos()),f.push(t);return f[r]}function h(){var n=o();return n&&r++,n}function p(n,t){for(var u=r,i=[];n-->0;)i.push(h()||rt);return r=u,t.apply(i,i)}function y(n){r+=n}function a(){return null==o()}var f=[],r=0,u=n.readWhile;return{next:h,peek:o,eof:a,croak:n.croak,ahead:p,skip:y}}function d(n){function s(){return t}function r(){var i=n.charAt(t++);return"\n"==i?(h++,e=0):e++,i}function u(){return n.charAt(t)}function f(){return""===u()}function o(i){throw new l(i+" (input: "+n+")",t);}function c(r){if("string"==typeof r)n.substr(t,r.length)!=r&&o("Expected "+r),i(r.length);else if(r instanceof RegExp){var u=r.exec(n.substr(t));if(u)return i(u[0].length),u}else i(r[0].length)}function i(n){for(;n-->0;)r()}function a(n){for(var t,u=!1,i="";!f();)if(t=r(),u)i+=t,u=!1;else if("\\"==t)u=!0;else{if(t==n)break;i+=t}return i}function v(n){for(var t="";!f()&&n(u(),t);)t+=r();return t}function y(i){return i.exec(n.substr(t))}var t=0,h=1,e=0;return{next:r,peek:u,eof:f,croak:o,readWhile:v,readEscaped:a,lookingAt:y,skip:c,forward:i,pos:s}}function ct(n,t,i){function f(){var r=n.next();return"sym"==r.type?"TRUE"==r.upper?(r.type="bool",r.value=!0):"FALSE"==r.upper&&(r.type="bool",r.value=!1):"ref"==r.type&&(r={type:"ref",ref:null!=t&&null!=i?r.absolute(t,i):r,begin:r.begin,end:r.end}),r}var r,u=[];for(n=y(n,{forEditor:!0,row:t,col:i});!n.eof();)u.push(f());return r=u[0],"op"==r.type&&"="==r.value&&(r.type="startexp"),u}function vt(n,t,i){var u,r;for(t=t||0,i=i||0,n=y(n,{row:t,col:i}),u=[];!n.eof();){if(r=n.next(),"ref"!=r.type)throw new l("Expecting a reference but got: "+JSON.stringify(r));u.push(r.absolute(t,i))}return u}function et(n,t){var r=n+t,i=g[r];return i||(i="^(\\d+(COM\\d{3})*(DOT\\d+)?)",i=i.replace(/DOT/g,"\\"+t).replace(/COM/g,"\\"+n),i=RegExp(i),g[r]=i),i}function ot(n,t){for(var i="";t-->0;)i+=n;return i}var it,r,p,o,u,s,n,i,t,l,c,h,b,w,rt,a,k,g;kendo.support.browser.msie&&kendo.support.browser.version<9||(it=kendo.util,r=kendo.spreadsheet,p=r.Ref,o=r.RangeRef,u=r.CellRef,s=r.NameRef,n=r.calc,i=n.runtime,t=Object.create(null),l=kendo.Class.extend({init:function(n,t){this.message=n,this.pos=t},toString:function(){return this.message}}),function(n){n.forEach(function(i,r){i.forEach(function(i){t[i]=n.length-r})})}([[":"],[" "],[","],["%"],["^"],["*","/"],["+","-"],["&"],["=","<",">","<=",">=","<>"]]),c={type:"bool",value:!0},h={type:"bool",value:!1},b=function(n){return function(t){var i=n[t];return i||(i=n[t]=Function("'use strict';return("+t+")")()),i}}(Object.create(null)),w=Object.create(null),rt={type:"eof"},a=[],k=n.registerFormatParser=function(n){a.push(n)},n.parse=function(n,t,r,u){var o,f,e,h,s;if(u instanceof Date)return{type:"date",value:i.dateToSerial(u)};if("number"==typeof u)return{type:"number",value:u};if("boolean"==typeof u)return{type:"boolean",value:u};if(u+="",/^'/.test(u))return{type:"string",value:u.substr(1)};if(/^[0-9.]+%$/.test(u)&&(o=u.substr(0,u.length-1),f=parseFloat(o),!isNaN(f)&&f==o))return{type:"percent",value:f/100};if(/^=/.test(u))return u=u.substr(1),/\S/.test(u)?v(n,t,r,u):{type:"string",value:"="+u};for(e=0;e<a.length;++e)if(h=a[e](u))return h;return"true"==u.toLowerCase()?{type:"boolean",value:!0}:"false"==u.toLowerCase()?{type:"boolean",value:!1}:(s=i.parseDate(u))?{type:"date",value:i.dateToSerial(s)}:(f=parseFloat(u),!isNaN(f)&&u.length>0&&f==u?{type:"number",value:f}:{type:"string",value:u})},n.parseNameDefinition=ft,n.parseFormula=v,n.parseReference=st,n.compile=ut,n.parseSqref=vt,n.InputStream=d,n.ParseError=l,n.tokenize=ct,k(function(n){var t,f,r,u,e;return(t=/^(\d+):(\d+)$/.exec(n))?(f=parseInt(t[1],10),r=parseInt(t[2],10),{type:"date",format:"hh:mm",value:i.packTime(f,r,0,0)}):(t=/^(\d+):(\d+)(\.\d+)$/.exec(n))?(r=parseInt(t[1],10),u=parseInt(t[2],10),e=1e3*parseFloat(t[3]),{type:"date",format:"mm:ss.00",value:i.packTime(0,r,u,e)}):(t=/^(\d+):(\d+):(\d+)$/.exec(n))?(f=parseInt(t[1],10),r=parseInt(t[2],10),u=parseInt(t[3],10),{type:"date",format:"hh:mm:ss",value:i.packTime(f,r,u,0)}):(t=/^(\d+):(\d+):(\d+)(\.\d+)$/.exec(n))?(f=parseInt(t[1],10),r=parseInt(t[2],10),u=parseInt(t[3],10),e=1e3*parseFloat(t[4]),{type:"date",format:"hh:mm:ss.00",value:i.packTime(f,r,u,e)}):void 0}),k(function(n){var f,r,c,e=kendo.culture(),h=e.numberFormat[","],l=e.numberFormat["."],v=e.numberFormat.currency.symbol,a=et(h,l),o=RegExp("^\\s*\\"+v+"\\s*"),u=1,t="",s="",i=!1;if(n=d(n.replace(/^\s+|\s+$/g,"")),n.skip(/^-\s*/)&&(u=-1),(f=n.skip(o))&&(i=!0,t+='"'+f[0]+'"'),n.skip(/^-\s*/)){if(u<0)return null;u=-1}if(!(r=n.skip(a)))return null;if(t+="#",f=n.skip(o)){if(i)return null;i=!0,s='"'+f[0]+'"'}return n.eof()?((r[2]||i)&&(t+=",#"),r[3]&&(t+="."+ot("0",r[3].length-1)),c=r[0].replace(RegExp("\\"+h,"g"),"").replace(RegExp("\\"+l,"g"),"."),t+=s,i&&(t+=";-"+t),{type:"number",format:t,value:u*parseFloat(c)}):null}),g={})},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/excel-reader.min",["kendo.core.min","kendo.color.min","util/parse-xml.min","spreadsheet/calc.min"],n)}(function(){"use strict";function li(n,t,i){var r=new FileReader;r.onload=function(n){var r=new JSZip(n.target.result);kt(r,t,i)},r.readAsArrayBuffer(n)}function f(n){return n=/^\//.test(n)?n.substr(1):"xl/"+n}function kt(n,f,e){var v,a,p,y,s,l,c;u=f.excelImportErrors=[],v=vt(n),a=wt(n,"_rels/workbook.xml"),p=ni(n,a.byType.theme[0]),y=pt(n,p),s=[],l=0,r(n,"xl/workbook.xml",{enter:function(t,r){var o,e,h,u;this.is(g)?(o=r["r:id"],e=a.byId[o],h=r.name,u=pi(n,e),s.push({workbook:f,zip:n,strings:v,styles:y,file:e,options:{name:h,rows:Math.max(f.options.rows||0,u.rows),columns:Math.max(f.options.columns||0,u.cols),columnWidth:u.columnWidth,rowHeight:u.rowHeight}})):this.is(rt)&&r.activeTab&&(l=i(r.activeTab))},text:function(n){var e,r,u,i=this.is(ii);!i||t(i["function"])||t(i.vbProcedure)||(e=i.localSheetId,r=null,null!=e&&(r=s[e].options.name),u=i.name,r&&(u="'"+r.replace(/\'/g,"\\'")+"'!"+u),h(r,null,function(){f.defineName(u,n,t(i.hidden))},"reading user-defined name: "+u))}}),c=new o.Deferred,c.progress(function(n){e&&e.notify(n)}).then(function(){var n=f.sheets();yi(n),f.activeSheet(n[l]),e&&e.resolve()}),ci(s,f,c)}function ci(n,t,i){for(var u=(new o.Deferred).resolve(),r=0;r<n.length;r++)!function(r,f){u=u.then(function(){var e,o,u=t.insertSheet(r.options);return u.suspendChanges(!0),e=hi(u,r),o={sheet:u,progress:f/(n.length-1)},e.then(function(){i.notify(o)}),e})}(n[r],r);u.then(function(){i.resolve()})}function hi(n,t){var i=new o.Deferred;return setTimeout(function(){dt(t.zip,t.file,n,t.strings,t.styles),i.resolve()},0),i}function yi(n){for(var t=0;t<n.length;t++)n[t].suspendChanges(!1).triggerChange({recalc:!0})}function pi(n,t){var i={rows:0,cols:0};return r(n,f(t),{enter:function(n,t){if("dimension"==n){var r=e(t.ref);r.bottomRight&&(i.cols=r.bottomRight.col+1,i.rows=r.bottomRight.row+1)}else"sheetFormatPr"===n?(t.defaultColWidth&&(i.columnWidth=bt(parseFloat(t.defaultColWidth))),t.defaultRowHeight&&(i.rowHeight=gt(parseFloat(t.defaultRowHeight)))):this.is(c)&&this.exit()}}),i}function bt(n){var t=7,i=(256*n+Math.floor(128/t))/256;return Math.floor(i)*t}function gt(n){return 1.5625*n}function dt(n,o,a,v,y){var w,d,p,ot,et,kt,at,tt,rt,pt,ht,dt,ct,ni=a._columns._count,vt=null,oi=o.replace(/worksheets\//,"worksheets/_rels/"),ii=wt(n,oi),g=[];u=a._workbook.excelImportErrors,r(n,f(o),{enter:function(n,r){var v,ut,b,k,f,u,h,o,ft,at,it;if(this.is(l))p=null,ot=null,et=null,w=r.r,null==w&&(w=e(vt),w.col++,w=""+w),vt=w,d=r.t,ut=r.s,null!=ut&&yt(a,w,y,ut);else if(this.is(ui))a.range(r.ref).merge();else if(this.is(fi)){if(b=i(r.min)-1,k=Math.min(ni,i(r.max))-1,r.width&&(f=bt(parseFloat(r.width)),0!==f&&a._columns.values.value(b,k,f)),"1"===r.hidden||0===f)for(u=b;u<=k;u++)a.hideColumn(u);null!=r.style&&yt(a,new kendo.spreadsheet.RangeRef(new kendo.spreadsheet.CellRef(-(1/0),b),new kendo.spreadsheet.CellRef(+(1/0),k)),y,r.style)}else this.is(c)?(h=i(r.r)-1,r.ht&&(o=gt(parseFloat(r.ht)),0!==o&&a._rows.values.value(h,h,o)),"1"!==r.hidden&&0!==o||a.hideRow(h)):this.is(nt)?r.activeCell&&(ft=e(r.activeCell),a.select(ft,!0)):this.is(ri)?"frozen"==r.state&&(r.xSplit&&a.frozenColumns(i(r.xSplit)),r.ySplit&&a.frozenRows(i(r.ySplit))):this.is(lt)?a.showGridLines(t(r.showGridLines,!0)):this.is(st)?(at=r["r:id"],it=ii.byId[at],it&&a.range(r.ref).link(it)):this.is(["autoFilter"])?tt=r.ref:tt&&(this.is(["filterColumn"])?rt=parseInt(r.colId,10):this.is(["customFilters"])?(pt=t(r.and)?"and":"or",ht=[]):this.is(["customFilter"])?(v=ai(r.operator,r.val),v&&ht.push({operator:v.operator,value:v.value})):this.is(["dynamicFilter"])?g.push({column:rt,filter:new kendo.spreadsheet.DynamicFilter({type:vi(r.type)})}):this.is(["top10"])?g.push({column:rt,filter:new kendo.spreadsheet.TopFilter({value:s(r.val),type:function(n,t){return n&&t?"topPercent":t?"topNumber":n?"bottomPercent":"bottomNumber"}(t(r.percent),t(r.top))})}):this.is(["filters"])?(dt=t(r.blank),ct=[]):this.is(["filter"])&&ct.push(s(r.val)))},leave:function(n,r){var f,u;this.is(l)?null!=ot?(f=h(a,et||w,function(){a.range(et||w).formula(ot)},"parsing formula"),f&&a.range(et||w).value(ot).background("#ffaaaa")):null!=p&&(u=a.range(w),u._get("formula")||(d&&"n"!=d?"s"==d?p=v[i(p)]:"b"==d?p="1"===p:"d"==d&&(p=kendo.parseDate(p)):p=parseFloat(p),null!=p&&u.value(p))):this.is(ft)?!function(){var u=kendo.spreadsheet.calc.parseSqref(r.sqref),n=r.type.toLowerCase(),i=r.operator;/^(?:whole|decimal)$/.test(n)?n="number":"list"==n&&(i="list"),!i&&/^(?:number|date)$/.test(n)&&(i="between"),u.forEach(function(u){h(a,u,function(){a.range(u).validation({type:t(r.showErrorMessage,!0)?"reject":"warning",from:kt,to:at,dataType:n,comparerType:ei[i]||i,allowNulls:t(r.allowBlank),showButton:t(r.showDropDown)||"date"==n||"list"==n,messageTemplate:r.error,titleTemplate:r.errorTitle})},"parsing validation")})}():"cols"==n?a._columns._refresh():"sheetData"==n?a._rows._refresh():"autoFilter"==n?(a.range(tt).filter(g),tt=null):tt&&("customFilters"==n?g.push({column:rt,filter:new kendo.spreadsheet.CustomFilter({logic:pt,criteria:ht})}):"filters"==n&&g.push({column:rt,filter:new kendo.spreadsheet.ValueFilter({values:ct,blanks:dt})}))},text:function(n){var t;this.is(b)||this.is(it)?p=n:(t=this.is(ti))?(ot=n,"shared"==t.t&&(et=t.ref)):this.is(k)?kt=n:this.is(ut)&&(at=n)}})}function ai(n,t){var i={equal:"eq",notEqual:"ne",greaterThan:"gt",greaterThanOrEqual:"gte",lessThan:"lt",lessThanOrEqual:"lte"}[n];return t=s(t),i&&"number"==typeof t?{operator:i,value:t}:"notEqual"!=n&&n||"string"!=typeof t?void 0:{operator:n?"doesnotmatch":"matches",value:t}}function vi(n){return{Q1:"quarter1",Q2:"quarter2",Q3:"quarter3",Q4:"quarter4",M1:"january",M2:"february",M3:"march",M4:"april",M5:"may",M6:"june",M7:"july",M8:"august",M9:"september",M10:"october",M11:"november",M12:"december"}[n.toUpperCase()]||n}function s(n){var t=parseFloat(n);return isNaN(t)||t!=n?n:t}function h(n,t,i,r){try{return i(),!1}catch(e){var f={context:r,error:e+""};return n&&(f.sheet=n.name()),t&&(f.location=t+""),u.push(f),!0}}function yt(n,t,i,r){function h(n){var t="string"==typeof n?n:n.formatCode;null==t||/^general$/i.test(t)||(t=t.replace(/^\[\$-[0-9]+\]/,""),f.format(t))}function a(n){"solid"==n.type&&f.background(n.color)}function c(n){f.fontFamily(n.name),f._property("fontSize",n.size),n.bold&&f.bold(!0),n.italic&&f.italic(!0)}function l(n){function t(t,i){var e,r,u=n[t];u&&(e=et[u.style],0!==e&&(r=u.color,null==r&&(r="#000"),f._property(i,{size:e,color:r})))}t("left","borderLeft"),t("top","borderTop"),t("right","borderRight"),t("bottom","borderBottom")}function e(n,t){var i=s[n];if(null!=i&&!i)return!1;if(u=s[t],o&&null==u){if(i=o[n],null!=i&&!i)return!1;u=o[t]}return null!=u}var o,u,f=n.range(t),s=i.inlineStyles[r];s.xfId&&(o=i.namedStyles[s.xfId]),e("applyBorder","borderId")&&l(i.borders[u]),e("applyFont","fontId")&&c(i.fonts[u]),e("applyAlignment","textAlign")&&f.textAlign(u),e("applyAlignment","verticalAlign")&&f.verticalAlign(u),e("applyAlignment","wrapText")&&f._property("wrap",u),e("applyFill","fillId")&&a(i.fills[u]),e("applyNumberFormat","numFmtId")&&h(i.numFmts[u]||ot[u])}function r(n,t,i){var r=n.files[t];r&&si(r.asUint8Array(),i)}function vt(n){var i=[],t=null;return r(n,"xl/sharedStrings.xml",{leave:function(){this.is(d)&&(i.push(t),t=null)},text:function(n){this.is(tt)&&(null==t&&(t=""),t+=n)}}),i}function wt(n,t){var i={byId:{},byType:{theme:[]}};return r(n,f(t)+".rels",{enter:function(n,t){var u,r;"Relationship"==n&&(i.byId[t.Id]=t.Target,u=t.Type.match(/\w+$/)[0],r=i.byType[u]||[],r.push(t.Target),i.byType[u]=r)}}),i}function pt(u,f){function w(n){function r(i){null!=n[i]&&(u[i]=t(n[i]))}var u={borderId:i(n.borderId),fillId:i(n.fillId),fontId:i(n.fontId),numFmtId:i(n.numFmtId),pivotButton:t(n.pivotButton),quotePrefix:t(n.quotePrefix),xfId:i(n.xfId)};return r("applyAlignment"),r("applyBorder"),r("applyFill"),r("applyFont"),r("applyNumberFormat"),r("applyProtection"),u}function l(t){var e,r,u;return t.rgb?n(t.rgb):t.indexed?y[i(t.indexed)]:t.theme?(e=f.colorScheme[i(t.theme)])?(r=kendo.parseColor(e),t.tint&&(r=r.toHSL(),u=parseFloat(t.tint),r.l=u<0?r.l*(1+u):r.l*(1-u)+(100-100*(1-u))),r.toCssRgba()):y[0]:void 0}var s={fonts:[],numFmts:{},fills:[],borders:[],namedStyles:[],inlineStyles:[]},h=null,o=null,c=null,e=null;return r(u,"xl/styles.xml",{enter:function(n,i,r){if(this.is(ct))s.numFmts[i.numFmtId]=i;else if(this.is(v))s.fonts.push(h={});else if(h)"sz"==n?h.size=parseFloat(i.val):"name"==n?h.name=i.val:"b"==n?h.bold=t(i.val,!0):"i"==n&&(h.italic=t(i.val,!0));else if(this.is(a))s.fills.push(o={});else if(o)"patternFill"==n?o.type=i.patternType:"fgColor"==n&&"solid"===o.type?o.color=l(i):"bgColor"==n&&"solid"!==o.type&&(o.color=l(i));else if(this.is(p))s.borders.push(c={});else if(c){if(/^(?:left|top|right|bottom)$/.test(n)&&i.style&&(c[n]={style:i.style}),"color"==n){var u=this.stack[this.stack.length-2].$tag;c[u].color=l(i)}}else this.is(ht)?(e=w(i),s.namedStyles.push(e),r&&(e=null)):this.is(at)?(e=w(i),s.inlineStyles.push(e),r&&(e=null)):e&&"alignment"==n&&(/^(?:left|center|right|justify)$/.test(i.horizontal)&&(e.textAlign=i.horizontal),/^(?:top|center|bottom)$/.test(i.vertical)&&(e.verticalAlign=i.vertical),null!=i.wrapText&&(e.wrapText=t(i.wrapText)))},leave:function(n){this.is(v)?h=null:this.is(a)?o=null:this.is(p)?c=null:"xf"==n&&(e=null)}}),s}function ni(t,i){function o(n,t,i){var r=n[t];n[t]=n[i],n[i]=r}var u=[],s={colorScheme:u},e=f(i);return t.files[e]&&(r(t,e,{enter:function(t,i){this.is(oi)?u.push(n("window"==i.val?"FFFFFFFF":"FF000000")):this.is(w)&&u.push(n("FF"+i.val))}}),u.length>3&&(o(u,0,1),o(u,2,3))),s}function i(n){return null==n?null:parseInt(n,10)}function t(n,t){return null==n?t:"true"==n||n===!0||1==n}function n(n){var t=/^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(n);return"rgba("+parseInt(t[2],16)+", "+parseInt(t[3],16)+", "+parseInt(t[4],16)+", "+parseInt(t[1],16)/255+")"}var o,si,e,ei,u,l,fi,ii,ti,ui,ri,c,nt,g,it,tt,d,b,rt,lt,st,ft,k,ut,et,ot,p,a,v,at,ht,ct,y,w,oi;kendo.support.browser.msie&&kendo.support.browser.version<9||(o=kendo.jQuery,si=kendo.util.parseXML,e=kendo.spreadsheet.calc.parseReference,ei={greaterThanOrEqual:"greaterThanOrEqualTo",lessThanOrEqual:"lessThanOrEqualTo"},u=null,l=["sheetData","row","c"],fi=["cols","col"],ii=["definedNames","definedName"],ti=["sheetData","row","c","f"],ui=["mergeCells","mergeCell"],ri=["sheetViews","sheetView","pane"],c=["sheetData","row"],nt=["sheetViews","sheetView","selection"],g=["sheets","sheet"],it=["sheetData","row","c","is"],tt=["t"],d=["si"],b=["sheetData","row","c","v"],rt=["bookViews","workbookView"],lt=["sheetViews","sheetView"],st=["hyperlinks","hyperlink"],ft=["dataValidations","dataValidation"],k=["dataValidations","dataValidation","formula1"],ut=["dataValidations","dataValidation","formula2"],et={none:0,thin:1,medium:2,dashed:1,dotted:1,thick:3,double:3,hair:1,mediumDashed:2,dashDot:1,mediumDashDot:2,dashDotDot:1,mediumDashDotDot:2,slantDashDot:1},ot={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"mm-dd-yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@"},p=["borders","border"],a=["fills","fill"],v=["fonts","font"],at=["cellXfs","xf"],ht=["cellStyleXfs","xf"],ct=["numFmts","numFmt"],y=[n("FF000000"),n("FFFFFFFF"),n("FFFF0000"),n("FF00FF00"),n("FF0000FF"),n("FFFFFF00"),n("FFFF00FF"),n("FF00FFFF"),n("FF000000"),n("FFFFFFFF"),n("FFFF0000"),n("FF00FF00"),n("FF0000FF"),n("FFFFFF00"),n("FFFF00FF"),n("FF00FFFF"),n("FF800000"),n("FF008000"),n("FF000080"),n("FF808000"),n("FF800080"),n("FF008080"),n("FFC0C0C0"),n("FF808080"),n("FF9999FF"),n("FF993366"),n("FFFFFFCC"),n("FFCCFFFF"),n("FF660066"),n("FFFF8080"),n("FF0066CC"),n("FFCCCCFF"),n("FF000080"),n("FFFF00FF"),n("FFFFFF00"),n("FF00FFFF"),n("FF800080"),n("FF800000"),n("FF008080"),n("FF0000FF"),n("FF00CCFF"),n("FFCCFFFF"),n("FFCCFFCC"),n("FFFFFF99"),n("FF99CCFF"),n("FFFF99CC"),n("FFCC99FF"),n("FFFFCC99"),n("FF3366FF"),n("FF33CCCC"),n("FF99CC00"),n("FFFFCC00"),n("FFFF9900"),n("FFFF6600"),n("FF666699"),n("FF969696"),n("FF003366"),n("FF339966"),n("FF003300"),n("FF333300"),n("FF993300"),n("FF993366"),n("FF333399"),n("FF333333"),n("FF000000"),n("FFFFFFFF")],w=["a:clrScheme","*","a:srgbClr"],oi=["a:clrScheme","*","a:sysClr"],kendo.spreadsheet.readExcel=li,kendo.spreadsheet._readSheet=dt,kendo.spreadsheet._readStrings=vt,kendo.spreadsheet._readStyles=pt,kendo.spreadsheet._readTheme=ni,kendo.spreadsheet._readWorkbook=kt)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/workbook.min",["kendo.core.min","spreadsheet/runtime.min","spreadsheet/references.min","spreadsheet/excel-reader.min"],n)}(function(){!function(n){function e(n,t){function i(n,t,i){return void 0!==n?n:void 0!==t?t:i}var f,u,s,r,c,e,o=i(n.rowCount,t.rows,200),h=i(n.columnCount,t.columns,50),v=i(n.rowHeight,t.rowHeight,20),y=i(n.columnWidth,t.columnWidth,64),l=i(n.headerHeight,t.headerHeight,20),a=i(n.headerWidth,t.headerWidth,32);if(void 0!==n.rows)for(f=0;f<n.rows.length;++f)if(u=n.rows[f],s=i(u.index,f),s>=o&&(o=s+1),u.cells)for(r=0;r<u.cells.length;++r)c=u.cells[r],e=i(c.index,r),e>=h&&(h=e+1);return{rowCount:o,columnCount:h,rowHeight:v,columnWidth:y,headerHeight:l,headerWidth:a}}var t,u,i,f,r;n.support.browser.msie&&n.support.browser.version<9||(t=n.jQuery,u=n.spreadsheet.calc.runtime.Formula,i=n.spreadsheet.Ref,f=n.spreadsheet.CalcError,r=n.Observable.extend({init:function(t,i){n.Observable.fn.init.call(this),this.options=t,this._view=i,this._sheets=[],this._sheetsSearchCache={},this._sheet=this.insertSheet({rows:this.options.rows,columns:this.options.columns,rowHeight:this.options.rowHeight,columnWidth:this.options.columnWidth,headerHeight:this.options.headerHeight,headerWidth:this.options.headerWidth,dataSource:this.options.dataSource}),this.undoRedoStack=new n.util.UndoRedoStack,this.undoRedoStack.bind(["undo","redo"],this._onUndoRedo.bind(this)),this._context=new n.spreadsheet.FormulaContext(this),this._validationContext=new n.spreadsheet.ValidationFormulaContext(this),this._names=Object.create(null),this.fromJSON(this.options)},clipboard:function(){return this._clipboard||(this._clipboard=new n.spreadsheet.Clipboard(this)),this._clipboard},destroy:function(){this.unbind(),this._clipboard&&this._clipboard.destroy()},events:["cut","copy","paste","change","excelImport","excelExport","insertSheet","removeSheet","selectSheet","renameSheet","insertRow","insertColumn","deleteRow","deleteColumn","hideRow","hideColumn","unhideRow","unhideColumn","select","changeFormat"],_sheetChange:function(n){this.trigger("change",n)},_sheetInsertRow:function(n){this.trigger("insertRow",{sheet:n.sender,index:n.index})&&n.preventDefault()},_sheetInsertColumn:function(n){this.trigger("insertColumn",{sheet:n.sender,index:n.index})&&n.preventDefault()},_sheetDeleteRow:function(n){this.trigger("deleteRow",{sheet:n.sender,index:n.index})&&n.preventDefault()},_sheetDeleteColumn:function(n){this.trigger("deleteColumn",{sheet:n.sender,index:n.index})&&n.preventDefault()},_sheetHideRow:function(n){this.trigger("hideRow",{sheet:n.sender,index:n.index})&&n.preventDefault()},_sheetHideColumn:function(n){this.trigger("hideColumn",{sheet:n.sender,index:n.index})&&n.preventDefault()},_sheetUnhideRow:function(n){this.trigger("unhideRow",{sheet:n.sender,index:n.index})&&n.preventDefault()},_sheetUnhideColumn:function(n){this.trigger("unhideColumn",{sheet:n.sender,index:n.index})&&n.preventDefault()},_sheetSelect:function(n){this.trigger("select",n)},_sheetCommandRequest:function(n){this.trigger("commandRequest",n)},_inputForRef:function(t){return new n.spreadsheet.Range(t,this._sheet).input()},_onUndoRedo:function(n){n.command.range().select()},execute:function(i){var f,r=t.extend({workbook:this},i.options),u=new n.spreadsheet[i.command](r),e=this.activeSheet();return r.origin&&u.origin(r.origin),u.range(r.operatingRange?r.operatingRange:r.editActiveCell?e.activeCellSelection():e.selection()),f=u.exec(),f&&"error"===f.reason||(u.cannotUndo?this.undoRedoStack.clear():this.undoRedoStack.push(u)),f},resetFormulas:function(){this._sheets.forEach(function(n){n.resetFormulas()})},resetValidations:function(){this._sheets.forEach(function(n){n.resetValidations()})},refresh:function(n){n.recalc&&(this.resetFormulas(),this.resetValidations(),this._sheet.recalc(this._context),this._sheet.revalidate(this._validationContext))},activeSheet:function(t){return void 0===t?this._sheet:void(this.sheetByName(t.name())&&(this._sheet=t,t.triggerChange(n.spreadsheet.ALL_REASONS)))},moveSheetToIndex:function(n,t){var r=this.sheetIndex(n),i=this._sheets;r!==-1&&(this._sheetsSearchCache={},i.splice(t,0,i.splice(r,1)[0]),this.trigger("change",{sheetSelection:!0}))},insertSheet:function(t){var r,e,f,o,u,i;if(t=t||{},r=this,e="number"==typeof t.index?t.index:r._sheets.length,o=r._sheets,u=function(n){n=n?n:1;var t="Sheet"+n;return r.sheetByName(t)?u(n+1):t},!t.name||!r.sheetByName(t.name))return this._sheetsSearchCache={},f=t.name||u(),i=new n.spreadsheet.Sheet(t.rows||this.options.rows,t.columns||this.options.columns,t.rowHeight||this.options.rowHeight,t.columnWidth||this.options.columnWidth,t.headerHeight||this.options.headerHeight,t.headerWidth||this.options.headerWidth,t.defaultCellStyle||this.options.defaultCellStyle),i._workbook=this,i._name(f),this._bindSheetEvents(i),o.splice(e,0,i),t.data&&i.fromJSON(t.data),t.dataSource&&i.setDataSource(t.dataSource),this.trigger("change",{sheetSelection:!0}),i},_bindSheetEvents:function(n){n.bind("change",this._sheetChange.bind(this)),n.bind("insertRow",this._sheetInsertRow.bind(this)),n.bind("insertColumn",this._sheetInsertColumn.bind(this)),n.bind("deleteRow",this._sheetDeleteRow.bind(this)),n.bind("deleteColumn",this._sheetDeleteColumn.bind(this)),n.bind("hideRow",this._sheetHideRow.bind(this)),n.bind("hideColumn",this._sheetHideColumn.bind(this)),n.bind("unhideRow",this._sheetUnhideRow.bind(this)),n.bind("unhideColumn",this._sheetUnhideColumn.bind(this)),n.bind("select",this._sheetSelect.bind(this)),n.bind("commandRequest",this._sheetCommandRequest.bind(this))},sheets:function(){return this._sheets.slice()},sheetByName:function(n){return this._sheets[this.sheetIndex(n)]},sheetByIndex:function(n){return this._sheets[n]},sheetIndex:function(n){var i,r=this._sheets,u=("string"==typeof n?n:n.name()).toLowerCase(),t=this._sheetsSearchCache[u];if(t>=0)return t;for(t=0;t<r.length;t++)if(i=r[t].name().toLowerCase(),this._sheetsSearchCache[i]=t,i===u)return t;return-1},renameSheet:function(n,t){var r=n.name().toLowerCase();if(t&&r!==t.toLowerCase()&&!this.sheetByName(t)&&(n=this.sheetByName(r),n&&(this._sheetsSearchCache={},!this.trigger("renameSheet",{sheet:n,newSheetName:t}))))return this._sheets.forEach(function(n){n._forFormulas(function(n){n.renameSheet(r,t)})}),this.forEachName(function(n,f){n.nameref.renameSheet(r,t)&&(this.undefineName(f),n.name=n.nameref.print(),this.nameDefinition(n.name,n)),(n.value instanceof i||n.value instanceof u)&&n.value.renameSheet(r,t)}.bind(this)),n._name(t),this.trigger("change",{sheetSelection:!0}),n},removeSheet:function(n){var u,i=this,r=i._sheets,f=n.name(),t=i.sheetIndex(n);1!==r.length&&(this.trigger("removeSheet",{sheet:n})||(this._sheetsSearchCache={},t>-1&&(n.unbind(),r.splice(t,1),i.activeSheet().name()===f?(u=r[t===r.length?t-1:t],i.activeSheet(u)):this.trigger("change",{recalc:!0,sheetSelection:!0}))))},_clearSheets:function(){for(var n=0;n<this._sheets.length;n++)this._sheets[n].unbind();this._sheets=[],this._sheetsSearchCache={},this._names={}},fromJSON:function(n){var r,i,t,u;if(n.sheets)for(this._clearSheets(),r=0;r<n.sheets.length;r++)i=n.sheets[r],t=e(i,this.options),u=this.insertSheet({rows:t.rowCount,columns:t.columnCount,rowHeight:t.rowHeight,columnWidth:t.columnWidth,headerHeight:t.headerHeight,headerWidth:t.headerWidth,data:i}),i.dataSource&&u.setDataSource(i.dataSource);this.activeSheet(n.activeSheet?this.sheetByName(n.activeSheet):this._sheets[0]),n.names&&n.names.forEach(function(n){this.defineName(n.name,n.value,n.hidden)},this)},toJSON:function(){this.resetFormulas(),this.resetValidations();var n=Object.keys(this._names).map(function(n){var r=this._names[n],t=r.value;return t instanceof i||t instanceof u?t=t.print(0,0,!0):t instanceof f?t+="":t=JSON.stringify(t),{value:t,hidden:r.hidden,name:r.name,sheet:r.nameref.sheet,localName:r.nameref.name}},this);return{activeSheet:this.activeSheet().name(),sheets:this._sheets.map(function(n){return n.recalc(this._context),n.revalidate(this._validationContext),n.toJSON()},this),names:n,columnWidth:this.options.columnWidth,rowHeight:this.options.rowHeight}},fromFile:function(i){var r=new t.Deferred,u=r.promise(),f={file:i,promise:u};return i&&!this.trigger("excelImport",f)?(this._clearSheets(),n.spreadsheet.readExcel(i,this,r)):r.reject(),u},saveAsExcel:function(i){var r,u;i=t.extend({},this.options.excel,i),r=this.toJSON(),this.trigger("excelExport",{workbook:r})||(u=new n.ooxml.Workbook(r),n.saveAs({dataURI:u.toDataURL(),fileName:r.fileName||i.fileName,proxyURL:i.proxyURL,forceProxy:i.forceProxy}))},draw:function(t,i){"function"!=typeof t||i||(i=t,t={});var r=[],u=this._sheets;!function f(e){if(e<u.length)u[e].draw(n.spreadsheet.SHEETREF,t,function(n){r.push(n),f(e+1)});else{var o=r[0];for(e=1;e<r.length;++e)o.children=o.children.concat(r[e].children);i(o)}}(0)},nameForRef:function(n,t){var u,e,f,r;void 0===t&&(t=n.sheet),t=t.toLowerCase(),u=n+"";for(e in this._names)if(f=this._names[e],r=f.value,r instanceof i&&(!r.sheet||r.sheet&&t==r.sheet.toLowerCase())&&r+""==u)return f;return{name:u}},defineName:function(t,i,r){var u=n.spreadsheet.calc.parseNameDefinition(t,i);t=u.name.print(),this._names[t.toLowerCase()]={value:u.value,hidden:r,name:t,nameref:u.name}},undefineName:function(n){delete this._names[n.toLowerCase()]},nameValue:function(n){return n=n.toLowerCase(),n in this._names?this._names[n].value:null},nameDefinition:function(n,t){return n=n.toLowerCase(),arguments.length>1&&(void 0===t?delete this._names[n]:this._names[n]=t),this._names[n]},forEachName:function(n){Object.keys(this._names).forEach(function(t){n(this._names[t],t)},this)},adjustNames:function(n,t,r,f){n=n.toLowerCase(),Object.keys(this._names).forEach(function(e){var s=this._names[e],o=s.value;o instanceof i&&o.sheet.toLowerCase()==n?s.value=o.adjust(null,null,null,null,t,r,f):o instanceof u&&o.adjust(n,t?"row":"col",r,f)},this)},options:{}}),n.spreadsheet.Workbook=r,n.PDFMixin&&(n.PDFMixin.extend(r.prototype),r.prototype.saveAsPDF=function(i){var r=new t.Deferred,u=r.promise(),f={promise:u};if(!this.trigger("pdfExport",f))return this._drawPDF(i,r).then(function(t){return n.drawing.exportPDF(t)}).done(function(t){n.saveAs({dataURI:t,fileName:i.fileName,proxyURL:i.proxyURL,forceProxy:i.forceProxy,proxyTarget:i.proxyTarget}),r.resolve()}).fail(function(n){r.reject(n)}),u},r.prototype._drawPDF=function(n){var r=new t.Deferred,i=function(n){r.resolve(n)};switch(n.area){case"workbook":n.workbook.draw(n,i);break;case"sheet":n.workbook.activeSheet().draw(n,i);break;case"selection":n.workbook.activeSheet().selection().draw(n,i)}return r.promise()}))}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/formulacontext.min",["kendo.core.min"],n)}(function(){var n,i,e,o,r,t,u,f;kendo.support.browser.msie&&kendo.support.browser.version<9||(n=kendo.spreadsheet,i=n.CellRef,e=n.RangeRef,o=n.UnionRef,r=n.NameRef,t=n.Ref,u=kendo.Class.extend({init:function(n){this.workbook=n},getRefCells:function(n,u,f,s,h){var c,v,p,l,tt,a,ft,d,g,it,rt,ut,y,w,nt,k,b;if(n instanceof i)return c=this.workbook.sheetByName(n.sheet),c&&n.valid()?(v=c.formula(n),p=c.range(n.row,n.col).value(),null!=v||null!=p?[{formula:v,value:p,row:n.row,col:n.col,sheet:n.sheet,hidden:!!u&&(0===c.columnWidth(n.col)||0===c.rowHeight(n.row))}]:[]):[{value:new kendo.spreadsheet.calc.runtime.CalcError("REF")}];if(n instanceof e){if(l=this.workbook.sheetIndex(n.sheet),tt=[],a=l,n.endSheet&&(a=this.workbook.sheetIndex(n.endSheet),l>a&&(ft=l,l=a,a=ft)),l<0||a<0||!n.valid())return[{value:new kendo.spreadsheet.calc.runtime.CalcError("REF")}];for(;l<=a;)for(c=this.workbook.sheetByIndex(l++),d=c._grid.normalize(n.topLeft),g=c._grid.normalize(n.bottomRight),it=c._grid.cellRefIndex(d),rt=c._grid.cellRefIndex(g),ut=c._properties.iterator("value",it,rt),y=d.col;y<=g.col;++y)for(w=d.row;w<=g.row;++w)nt=c._grid.index(w,y),v=c._properties.get("formula",nt),p=ut.at(nt),null==v&&null==p||tt.push({formula:v,value:p,row:w,col:y,sheet:c.name(),hidden:!!u&&(0===c.columnWidth(y)||0===c.rowHeight(w))});return tt}if(n instanceof o){for(k=[],l=0;l<n.refs.length;++l)k=k.concat(this.getRefCells(n.refs[l],u,f,s,h));return k}return n instanceof r?(b=this.nameValue(n,f,s,h),b instanceof t?this.getRefCells(b,u,f,s,h):[{value:null==b?new kendo.spreadsheet.calc.runtime.CalcError("NAME"):b}]):[]},nameValue:function(n,i,r,u){var f;return n.hasSheet()?f=this.workbook.nameValue(n.print()):(n=n.clone().setSheet(i,!0),f=this.workbook.nameValue(n.print()),null==f&&(f=this.workbook.nameValue(n.name))),f instanceof t&&(f=f.absolute(r,u)),f},getData:function(n,t,u,f){var e,o=n instanceof i;return n instanceof r&&(o=this.workbook.nameValue(n.name)instanceof i),e=this.getRefCells(n,!1,t,u,f).map(function(n){var t=n.value;return t instanceof kendo.spreadsheet.calc.runtime.Formula&&(t=t.value),t}),o?e[0]:e},onFormula:function(n){var r=this.workbook.sheetByName(n.sheet),f=n.row,u=n.col,i=n.value,e=r.formula({row:f,col:u});return e===n&&(i instanceof t&&(i=this.getData(i,n.sheet,f,u),Array.isArray(i)&&(i=i[0]),void 0===i&&(i=null)),i instanceof kendo.spreadsheet.calc.runtime.Matrix?i.each(function(n,t,i){r._value(f+t,u+i,n)}):r._value(f,u,i),clearTimeout(r._formulaContextRefresh),r._formulaContextRefresh=setTimeout(function(){r.batch(function(){},{layout:!0})},50),!0)}}),f=u.extend({onFormula:function(){return!0}}),n.FormulaContext=u,n.ValidationFormulaContext=f)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/controller.min",["kendo.core.min"],n)}(function(){!function(n){"use strict";function p(n){return n.map(function(n){return'[data-action="'+n+'"]'}).join(",")}var t,y,i,o,w,r,l,k,f,h,b,v,s,e,c,u,a;if(!(n.support.browser.msie&&n.support.browser.version<9)){t=n.jQuery,y=/:alphanum$/,i={up:"up",down:"down",left:"left",right:"right",home:"first-col","ctrl+left":"first-col",end:"last-col","ctrl+right":"last-col","ctrl+up":"first-row","ctrl+down":"last-row","ctrl+home":"first","ctrl+end":"last",pageup:"prev-page",pagedown:"next-page"},o={tab:"next","shift+tab":"previous",enter:"lower","shift+enter":"upper","delete":"clearContents",backspace:"clearContents","shift+:alphanum":"edit",":alphanum":"edit","ctrl+:alphanum":"ctrl","alt+ctrl+:alphanum":"edit",":edit":"edit"},w={wheel:"onWheel","*+mousedown":"onMouseDown",contextmenu:"onContextMenu","*+mousedrag":"onMouseDrag","*+mouseup":"onMouseUp","*+dblclick":"onDblClick",mousemove:"onMouseMove"},r={"*+pageup":"onPageUp","*+pagedown":"onPageDown",mouseup:"onMouseUp","*+cut":"onCut","*+paste":"onPaste","*+copy":"onCopy"},l={esc:"onEditorEsc",enter:"onEditorBlur","alt+enter":"insertNewline","shift+enter":"onEditorBlur",tab:"onEditorBlur","shift+tab":"onEditorBlur"},k=t.extend({focus:"onEditorBarFocus"},l),f=t.extend({focus:"onEditorCellFocus"},l),h={cell:"range",rowheader:"row",columnheader:"column",topcorner:"sheet",autofill:"autofill"},b=p(["cut","copy","paste","insert-left","insert-right","insert-above","insert-below"]),v=p(["unhide-row","unhide-column"]),s=[],e=[],c=[];for(u in i)s.push(u),e.push("shift+"+u);for(u in o)c.push(u);r[s]="onAction",r[e]="onShiftAction",r[c]="onEntryAction",f[s]="onEditorAction",f[e]="onEditorShiftAction",a=n.Class.extend({init:function(i,r){this.view=i,this.workbook(r),this.container=t(i.container),this.clipboardElement=t(i.clipboard),this.cellContextMenu=i.cellContextMenu,this.rowHeaderContextMenu=i.rowHeaderContextMenu,this.colHeaderContextMenu=i.colHeaderContextMenu,this.scroller=i.scroller,this.tabstrip=i.tabstrip,this.sheetsbar=i.sheetsbar,i.nameEditor.bind("enter",this.onNameEditorEnter.bind(this)),i.nameEditor.bind("cancel",this.onNameEditorCancel.bind(this)),i.nameEditor.bind("select",this.onNameEditorSelect.bind(this)),i.nameEditor.bind("delete",this.onNameEditorDelete.bind(this)),this.editor=i.editor,this.editor.bind("change",this.onEditorChange.bind(this)),this.editor.bind("activate",this.onEditorActivate.bind(this)),this.editor.bind("deactivate",this.onEditorDeactivate.bind(this)),this.editor.bind("update",this.onEditorUpdate.bind(this)),t(i.scroller).on("scroll",this.onScroll.bind(this)),this.listener=new n.spreadsheet.EventListener(this.container,this,w),this._enableEditorEvents(),this.sheetsbar&&(this.sheetsbar.bind("select",this.onSheetBarSelect.bind(this)),this.sheetsbar.bind("reorder",this.onSheetBarReorder.bind(this)),this.sheetsbar.bind("rename",this.onSheetBarRename.bind(this)),this.sheetsbar.bind("remove",this.onSheetBarRemove.bind(this))),this.cellContextMenu.bind("select",this.onContextMenuSelect.bind(this)),this.rowHeaderContextMenu.bind("select",this.onContextMenuSelect.bind(this)),this.colHeaderContextMenu.bind("select",this.onContextMenuSelect.bind(this)),this.cellContextMenu.element.add(this.rowHeaderContextMenu.element).add(this.colHeaderContextMenu.element).on("contextmenu",!1),this.tabstrip&&(this.tabstrip.bind("action",this.onCommandRequest.bind(this)),this.tabstrip.bind("dialog",this.onDialogRequest.bind(this)))},_enableEditorEvents:function(t){void 0===t||t?(this.keyListener=new n.spreadsheet.EventListener(this.clipboardElement,this,r),this.barKeyListener=new n.spreadsheet.EventListener(this.editor.barElement(),this,k),this.inputKeyListener=new n.spreadsheet.EventListener(this.editor.cellElement(),this,f)):(this.keyListener.destroy(),this.barKeyListener.destroy(),this.inputKeyListener.destroy())},_execute:function(n){var t=this._workbook.execute(n);return"EditCommand"!==n.command||t||this._workbook.trigger("change",{editorClose:!0}),t&&(this._preventNavigation=!0,"error"===t.reason?this.view.showError(t,function(){this.activateEditor(),this.editor.value(this._lastEditorValue),this.editor._value=this._workbook._inputForRef(this._workbook.activeSheet()._viewActiveCell()),this.editor.select()}.bind(this)):this.view.openDialog(t.reason)),t},_activeTooltip:function(){return""+this._workbook.activeSheet().activeCell().simplify()},onContextMenuSelect:function(n){var i,r=t(n.item).data("action");switch(r){case"cut":i={command:"ToolbarCutCommand",options:{workbook:this._workbook}};break;case"copy":i={command:"ToolbarCopyCommand",options:{workbook:this._workbook}};break;case"paste":i={command:"ToolbarPasteCommand",options:{workbook:this._workbook}};break;case"unmerge":i={command:"MergeCellCommand",options:{value:"unmerge"}};break;case"merge":this.view.openDialog("merge");break;case"hide-row":i={command:"HideLineCommand",options:{axis:"row"}};break;case"hide-column":i={command:"HideLineCommand",options:{axis:"column"}};break;case"unhide-row":i={command:"UnHideLineCommand",options:{axis:"row"}};break;case"unhide-column":i={command:"UnHideLineCommand",options:{axis:"column"}};break;case"delete-row":i={command:"DeleteRowCommand"};break;case"delete-column":i={command:"DeleteColumnCommand"}}i&&this._execute(i)},onSheetBarRemove:function(n){var t=this._workbook.sheetByName(n.name);t&&this._workbook.removeSheet(t)},destroy:function(){this.listener.destroy(),this._enableEditorEvents(!1),this.keyListener.destroy(),this.inputKeyListener.destroy()},onSheetBarSelect:function(n){var t,i=this._workbook;if(n.isAddButton){if(this._workbook.trigger("insertSheet"))return;t=i.insertSheet()}else t=i.sheetByName(n.name);if(i.activeSheet().name()!==t.name()){if(this._workbook.trigger("selectSheet",{sheet:t}))return;i.activeSheet(t)}},onSheetBarReorder:function(n){var t=this._workbook.sheetByIndex(n.oldIndex);this._workbook.moveSheetToIndex(t,n.newIndex),this._workbook.activeSheet(t)},onSheetBarRename:function(n){var t=this._workbook.sheetByIndex(n.sheetIndex);return this._workbook.sheetByName(n.name)?void this.view.showError({reason:"error",type:"duplicateSheetName"}):(this._workbook.renameSheet(t,n.name),void this.clipboardElement.focus())},sheet:function(n){this.navigator=n.navigator(),this.axisManager=n.axisManager()},workbook:function(n){this._workbook=n,this.clipboard=n.clipboard(),n.bind("commandRequest",this.onCommandRequest.bind(this))},refresh:function(){var i,u,t=this.editor,r=this._workbook,n=r.activeSheet();this._viewPortHeight=this.view.scroller.clientHeight,this.navigator.height(this._viewPortHeight),t.isActive()||this.isEditorDisabled||(t.enable(n.selection().enable()!==!1),t.value(r._inputForRef(n.activeCell()))),i=n.selection()._ref.simplify(),u=this._workbook.nameForRef(i,n.name()),this.view.nameEditor.value(u.name)},onScroll:function(){this.view.render()},onWheel:function(n){var i=n.originalEvent.deltaX,t=n.originalEvent.deltaY;1===n.originalEvent.deltaMode&&(i*=10,t*=10),this.scrollWith(i,t),n.preventDefault()},onAction:function(n,t){this.navigator.moveActiveCell(i[t]),n.preventDefault()},onPageUp:function(){this.scrollDown(-this._viewPortHeight)},onPageDown:function(){this.scrollDown(this._viewPortHeight)},onEntryAction:function(n,t){var r,u,i;if(n.mod){switch(r=!0,u=String.fromCharCode(n.keyCode)){case"A":this.navigator.selectAll();break;case"Y":this._workbook.undoRedoStack.redo();break;case"Z":this._workbook.undoRedoStack.undo();break;default:r=!1}r&&n.preventDefault()}else if(i=this._workbook.activeSheet().selection().enable()===!1,"delete"==t||"backspace"==t)i||this._execute({command:"ClearContentCommand"}),n.preventDefault();else if(y.test(t)||":edit"===t){if(i)return void n.preventDefault();":edit"!==t&&this.editor.value(""),this.activateEditor()}else this.navigator.navigateInSelection(o[t]),n.preventDefault()},onShiftAction:function(n,t){this.navigator.modifySelection(i[t.replace("shift+","")],this.appendSelection),n.preventDefault()},onMouseMove:function(n){var i,t=this._workbook.activeSheet();t.resizingInProgress()||t.selectionInProgress()||(i=this.objectAt(n),"columnresizehandle"===i.type||"rowresizehandle"===i.type?t.positionResizeHandle(i.ref):t.removeResizeHandle())},onMouseDown:function(n){var i,t=this.objectAt(n);if(t.pane&&(this.originFrame=t.pane),"editor"===t.type)return this.onEditorEsc(),this.openCustomEditor(),void n.preventDefault();if(this.editor.canInsertRef(!1)&&t.ref)return this._workbook.activeSheet()._setFormulaSelections(this.editor.highlightedRefs()),this.navigator.startSelection(t.ref,this._selectionMode,this.appendSelection,n.shiftKey),void n.preventDefault();if(this._preventNavigation=!1,this.editor.deactivate(),!this._preventNavigation){if(i=this._workbook.activeSheet(),"columnresizehandle"===t.type||"rowresizehandle"===t.type)return i.startResizing({x:t.x,y:t.y}),void n.preventDefault();if("filtericon"===t.type)return this.openFilterMenu(n),void n.preventDefault();this._selectionMode=h[t.type],this.appendSelection=n.mod,this.navigator.startSelection(t.ref,this._selectionMode,this.appendSelection,n.shiftKey)}},onContextMenu:function(t){var r,i,f,u,e,o=this._workbook.activeSheet();o.resizingInProgress()||(t.preventDefault(),this.cellContextMenu.close(),this.colHeaderContextMenu.close(),this.rowHeaderContextMenu.close(),i=this.objectAt(t),"columnresizehandle"!==i.type&&"rowresizehandle"!==i.type&&(this.navigator.selectForContextMenu(i.ref,h[i.type]),f=this.navigator._sheet.select()instanceof n.spreadsheet.UnionRef,u=!1,e=!1,"columnheader"==i.type?(r=this.colHeaderContextMenu,u=!f&&this.axisManager.selectionIncludesHiddenColumns()):"rowheader"==i.type?(r=this.rowHeaderContextMenu,u=!f&&this.axisManager.selectionIncludesHiddenRows()):(r=this.cellContextMenu,e=this.navigator.selectionIncludesMergedCells()),r.element.find(b).toggle(!f),r.element.find(v).toggle(u),r.element.find("[data-action=unmerge]").toggle(e),setTimeout(function(){r.open(t.pageX,t.pageY)})))},prevent:function(n){n.preventDefault()},constrainResize:function(n,t){var r=this._workbook.activeSheet(),i=r.resizeHandlePosition();return!i||"outside"===n||"topcorner"===n||t.col<i.col||t.row<i.row},onMouseDrag:function(n){var r,t,u,i;if("sheet"!==this._selectionMode){if(r={clientX:n.clientX,clientY:n.clientY},t=this.objectAt(r),u=this._workbook.activeSheet(),u.resizingInProgress())return void(this.constrainResize(t.type,t.ref)||u.resizeHintPosition({x:t.x,y:t.y}));if("outside"===t.type)return void this.startAutoScroll(t);this.originFrame===t.pane?this.selectToLocation(r):(i=this.originFrame._grid,t.x>i.right&&this.scrollLeft(),t.y>i.bottom&&this.scrollTop(),t.y<i.top||t.x<i.left?this.startAutoScroll(t,r):this.selectToLocation(r)),n.preventDefault()}},onMouseUp:function(n){var i,t,u,r=this._workbook.activeSheet();if(r.completeResizing(),this.navigator.completeSelection(),this.stopAutoScroll(),i=this.editor.activeEditor()){for(t=n.target;t;){if(t===i.element[0])return;t=t.parentNode}u=this.objectAt(n),u&&u.ref&&i.canInsertRef(!1)&&(i.refAtPoint(r.selection()._ref),r._setFormulaSelections(i.highlightedRefs()))}},onDblClick:function(n){var i=this.objectAt(n),t=this._workbook.activeSheet().selection().enable()===!1;"cell"!==i.type||t||(this.editor.activate({range:this._workbook.activeSheet()._viewActiveCell(),rect:this.view.activeCellRectangle(),tooltip:this._activeTooltip()}).focus(),this.onEditorUpdate())},onCut:function(n){if(n){var t=this.clipboardElement.find("table.kendo-clipboard-"+this.clipboard._uid).detach();this.clipboardElement.append(t.clone(!1)),setTimeout(function(){this.clipboardElement.empty().append(t)}.bind(this))}this._execute({command:"CutCommand",options:{workbook:this.view._workbook,event:n.originalEvent||n}})},clipBoardValue:function(){return this.clipboardElement.html()},onPaste:function(t){var r,i,e,u="",f="";if(this.clipboard.menuInvoked=void 0===t,t){if(!t.originalEvent.clipboardData||!t.originalEvent.clipboardData.getData)return e=this.clipboardElement.find("table.kendo-clipboard-"+this.clipboard._uid).detach(),this.clipboardElement.empty(),void setTimeout(function(){var i=this.clipboardElement.html(),n=window.clipboardData.getData("Text").trim();(i||n)&&(this.clipboard.external({html:i,plain:n}),this.clipboardElement.empty().append(e),this._execute({command:"PasteCommand",options:{workbook:this.view._workbook,event:t.originalEvent||t}}),this.clipboard.menuInvoked=!0)}.bind(this));t.preventDefault(),r=!1,i=!1,window.DOMStringList&&t.originalEvent.clipboardData.types instanceof window.DOMStringList?(r=t.originalEvent.clipboardData.types.contains("text/html"),i=t.originalEvent.clipboardData.types.contains("text/plain")):(r=/text\/html/.test(t.originalEvent.clipboardData.types),i=/text\/plain/.test(t.originalEvent.clipboardData.types)),r&&(u=t.originalEvent.clipboardData.getData("text/html")),i&&(f=t.originalEvent.clipboardData.getData("text/plain").trim())}else{if(n.support.browser.msie)return this.clipboardElement.focus().select(),void document.execCommand("paste");this.clipboard.menuInvoked=!0}(u||f)&&(this.clipboard.external({html:u,plain:f}),this._execute({command:"PasteCommand",options:{workbook:this.view._workbook,event:t.originalEvent||t}}))},onCopy:function(n){this.clipboard.menuInvoked=void 0===n,this._execute({command:"CopyCommand",options:{workbook:this.view._workbook,event:n.originalEvent||n}})},scrollTop:function(){this.scroller.scrollTop=0},scrollLeft:function(){this.scroller.scrollLeft=0},scrollDown:function(n){this.scroller.scrollTop+=n},scrollRight:function(n){this.scroller.scrollLeft+=n},scrollWith:function(n,t){this.scroller.scrollTop+=t,this.scroller.scrollLeft+=n},objectAt:function(n){var t=this.container[0].getBoundingClientRect();return this.view.objectAt(n.clientX-t.left,n.clientY-t.top)},selectToLocation:function(n){var t=this.objectAt(n);t.pane&&(this.extendSelection(t),this.lastKnownCellLocation=n,this.originFrame=t.pane),this.stopAutoScroll()},extendSelection:function(n){this.navigator.extendSelection(n.ref,this._selectionMode,this.appendSelection)},autoScroll:function(){var r=this._autoScrollTarget.x,u=this._autoScrollTarget.y,n=this.originFrame._grid,i=this.view.scroller,t=8,e=i.scrollLeft,f=i.scrollTop;r<n.left&&this.scrollRight(-t),r>n.right&&this.scrollRight(t),u<n.top&&this.scrollDown(-t),u>n.bottom&&this.scrollDown(t),f===i.scrollTop&&e===i.scrollLeft?this.selectToLocation(this.finalLocation):this.extendSelection(this.objectAt(this.lastKnownCellLocation))},startAutoScroll:function(n,t){this._scrollInterval||(this._scrollInterval=setInterval(this.autoScroll.bind(this),50)),this.finalLocation=t||this.lastKnownCellLocation,this._autoScrollTarget=n},stopAutoScroll:function(){clearInterval(this._scrollInterval),this._scrollInterval=null},openCustomEditor:function(){this.view.openCustomEditor()},openFilterMenu:function(n){var u=this.objectAt(n),i=this._workbook.activeSheet(),r=i.filterColumn(u.ref),t=this.view.createFilterMenu(r);t.bind("action",this.onCommandRequest.bind(this)),t.bind("action",t.close.bind(t)),t.openFor(n.target)},onEditorChange:function(n){this._workbook.activeSheet().isInEditMode(!1),this._lastEditorValue=n.value,this._execute({command:"EditCommand",options:{editActiveCell:!0,value:n.value}})},onEditorActivate:function(){var t=this._workbook,n=t.activeSheet();n._setFormulaSelections(this.editor.highlightedRefs()),n.isInEditMode(!0)},onEditorDeactivate:function(){var n=this._workbook.activeSheet();n.isInEditMode(!1),n._setFormulaSelections([])},onEditorUpdate:function(){this._workbook.activeSheet()._setFormulaSelections(this.editor.highlightedRefs())},onEditorBarFocus:function(){var n=this._workbook.activeSheet().selection().enable()===!1;n||this.editor.activate({range:this._workbook.activeSheet()._viewActiveCell(),rect:this.view.activeCellRectangle(),tooltip:this._activeTooltip()})},onEditorCellFocus:function(){this.editor.scale()},onEditorEsc:function(){this.resetEditorValue(),this.editor.deactivate(),this.clipboardElement.focus()},insertNewline:function(n){n.preventDefault(),this.editor.insertNewline()},onEditorBlur:function(n,t){this.editor.isFiltered()||(this._preventNavigation=!1,this.editor.deactivate(),this._preventNavigation||(this.clipboardElement.focus(),this.navigator.navigateInSelection(o[t])))},onEditorAction:function(n,t){var r=this.editor,u=this._workbook.activeSheet();r.canInsertRef(!0)&&(this.navigator.moveActiveCell(i[t]),r.activeEditor().refAtPoint(u.selection()._ref),u._setFormulaSelections(r.highlightedRefs()),n.preventDefault())},onEditorShiftAction:function(n,t){var r=this.editor,u=this._workbook.activeSheet();r.canInsertRef(!0)&&(this.navigator.modifySelection(i[t.replace("shift+","")],this.appendSelection),r.activeEditor().refAtPoint(u.selection()._ref),u._setFormulaSelections(r.highlightedRefs()),n.preventDefault())},resetEditorValue:function(){this.editor.value(this._workbook._inputForRef(this._workbook.activeSheet()._viewActiveCell()))},activateEditor:function(){this.editor.activate({range:this._workbook.activeSheet()._viewActiveCell(),rect:this.view.activeCellRectangle(),tooltip:this._activeTooltip()}).focus()},deactivateEditor:function(){this.view.editor.deactivate()},onCommandRequest:function(n){n.command?this._execute(n):this._workbook.undoRedoStack[n.action]()},onDialogRequest:function(n){var i={pdfExport:this._workbook.options.pdf,excelExport:this._workbook.options.excel};n.options?t.extend(!0,n.options,i):n.options=i,this.view.openDialog(n.name,n.options)},onNameEditorEnter:function(){var r,u=this._workbook,i=u.activeSheet(),f=this.view.nameEditor.value(),t=n.spreadsheet.calc.parseReference(f,!0)||u.nameValue(f);return t instanceof n.spreadsheet.Ref?(t.sheet&&t.sheet.toLowerCase()!=i.name().toLowerCase()&&(r=u.sheetByName(t.sheet),r&&(u.activeSheet(r),i=r)),void i.range(t).select()):(t=i.selection()._ref.clone().simplify().setSheet(i.name(),!0),this._execute({command:"DefineNameCommand",options:{name:f,value:t}}),void this.clipboardElement.focus())},onNameEditorCancel:function(){this.clipboardElement.focus()},onNameEditorSelect:function(t){var u,e=t.name,r=this._workbook,f=r.activeSheet(),i=r.nameValue(e);return i instanceof n.spreadsheet.Ref?(i.sheet&&i.sheet.toLowerCase()!=f.name().toLowerCase()&&(u=r.sheetByName(i.sheet),u&&(r.activeSheet(u),f=u)),void f.range(i).select()):void this.clipboardElement.focus()},onNameEditorDelete:function(n){this._execute({command:"DeleteNameCommand",options:{name:n.name}}),this.clipboardElement.focus()}}),n.spreadsheet.Controller=a}}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/view.min",["kendo.core.min","kendo.menu.min","spreadsheet/sheetsbar.min"],n)}(function(){!function(n){function d(n){var t,i=window.getSelection();i.removeAllRanges(),t=document.createRange(),t.selectNodeContents(n),i.addRange(t)}function nt(n,t){var i=n.trs[t].children;return i[i.length-2]}function b(n,t){var r=n.trs[t-1],i=n.trs[t].children.length-1;if(r&&i>=0)return r.children[i]}function h(n){return(n.size||1)+"px solid "+(n.color||"#000")}function k(n){return/:\/\//.test(n)||(n="http://"+n),n}function c(t,i,r,u){function d(t){var u,r=i.link;return r||"object"==typeof i.value&&(r=i.value.link),r?(u={textDecoration:"none"},i.color&&(u.color=i.color),i.underline&&(u.textDecoration="underline"),n.dom.element("a",{href:k(r),style:u,target:"_blank"},t?[t]:[])):t}var f,l,s,o,w,c,b,p,v,a,y,g=null!=i.value||null!=i.validation&&!i.validation.value||i.background||i.merged;if(r||g){if(f={},l=i.background,l&&(s=l,u&&(s=n.parseColor(s).toHSV(),s.v*=.9,s=s.toCssRgba()),s=h({color:s}),f.outline=s),l&&(f.backgroundColor=l),i.color&&(f.color=i.color),i.fontFamily&&(f.fontFamily=i.fontFamily),i.underline&&(f.textDecoration="underline"),i.italic&&(f.fontStyle="italic"),i.textAlign&&(f.textAlign=i.textAlign),i.bold&&(f.fontWeight="bold"),i.fontSize&&(f.fontSize=i.fontSize+"px"),i.wrap===!0&&(f.whiteSpace="pre-wrap",f.overflowWrap="break-word",f.wordWrap="break-word"),f.left=i.left+1+"px",f.top=i.top+1+"px",f.width=i.width-1+"px",f.height=i.height-1+"px",o=i.value,w=typeof o,i.format&&null!=o?(o=n.spreadsheet.formatting.format(o,i.format),o.__dataType&&(w=o.__dataType)):null!==o&&void 0!==o&&(o=n.dom.text(o)),!f.textAlign)switch(w){case"number":case"date":case"percent":f.textAlign="right";break;case"boolean":f.textAlign="center"}return c=[e.cell],r&&c.push(r),i.enable===!1&&c.push("k-state-disabled"),i.merged&&c.push("k-spreadsheet-merged-cell"),b=i.verticalAlign||"bottom",o=b&&o?n.dom.element("div",{className:"k-vertical-align-"+b},[d(o)]):d(o),p=o?[o]:[],v={style:f},a=i.validation,a&&!a.value&&(p.push(n.dom.element("span",{className:"k-dirty"})),c.push("k-dirty-cell"),v.title=a.message),v.className=c.join(" "),y=n.dom.element("div",v,p),t.push(y),y}}function g(t,i,r){var f,c,s,l,e,o,u={};if(r.background&&(u.backgroundColor=r.background),r.color&&(u.color=r.color),r.fontFamily&&(u.fontFamily=r.fontFamily),r.underline&&(u.textDecoration="underline"),r.italic&&(u.fontStyle="italic"),r.textAlign&&(u.textAlign=r.textAlign),r.verticalAlign&&(u.verticalAlign="center"===r.verticalAlign?"middle":r.verticalAlign),r.bold&&(u.fontWeight="bold"),r.fontSize&&(u.fontSize=r.fontSize+"px"),r.wrap===!0&&(u.whiteSpace="pre-wrap",u.wordBreak="break-all"),r.borderRight?u.borderRight=h(r.borderRight):r.background&&(u.borderRightColor=r.background),r.borderBottom?u.borderBottom=h(r.borderBottom):r.background&&(u.borderBottomColor=r.background),f=r.value,c=typeof f,r.format&&null!=f&&(f=n.spreadsheet.formatting.format(f,r.format),f.__dataType&&(c=f.__dataType)),!u.textAlign)switch(c){case"number":case"date":case"percent":u.textAlign="right";break;case"boolean":u.textAlign="center"}return s=null,r.enable===!1&&(s="k-state-disabled"),l=t.addCell(i,f,u,s,r.validation),r.borderLeft?(o=nt(t,i),e=h(r.borderLeft),o&&e&&(o.attr.style.borderRight=e)):r.background&&(u.borderLeftColor=r.background),r.borderTop?(o=b(t,i),e=h(r.borderTop),o&&e&&(o.attr.style.borderBottom=e)):r.background&&(u.borderTopColor=r.background),l}function p(n,t,i){return n>=t&&n<=i}var t,o,r,u,s,y,w,l,v,a,f,e,i;n.support.browser.msie&&n.support.browser.version<9||(t=n.jQuery,o=n.spreadsheet.CellRef,r=".",u=7,s={view:"k-spreadsheet-view",fixedContainer:"k-spreadsheet-fixed-container",editContainer:"k-spreadsheet-edit-container",scroller:"k-spreadsheet-scroller",viewSize:"k-spreadsheet-view-size",clipboard:"k-spreadsheet-clipboard",cellEditor:"k-spreadsheet-cell-editor",barEditor:"k-spreadsheet-editor",topCorner:"k-spreadsheet-top-corner",filterHeadersWrapper:"k-filter-wrapper",filterRange:"k-filter-range",filterButton:"k-spreadsheet-filter",filterButtonActive:"k-state-active",horizontalResize:"k-horizontal-resize",verticalResize:"k-vertical-resize",icon:"k-icon",iconFilterDefault:"k-i-arrow-60-down",sheetsBar:"k-spreadsheet-sheets-bar",sheetsBarActive:"k-spreadsheet-sheets-bar-active",sheetsBarInactive:"k-spreadsheet-sheets-bar-inactive",cellContextMenu:"k-spreadsheet-cell-context-menu",rowHeaderContextMenu:"k-spreadsheet-row-header-context-menu",colHeaderContextMenu:"k-spreadsheet-col-header-context-menu"},n.spreadsheet.messages.view={nameBox:"Name Box",errors:{openUnsupported:"Unsupported format. Please select an .xlsx file.",shiftingNonblankCells:"Cannot insert cells due to data loss possibility. Select another insert location or delete the data from the end of your worksheet.",insertColumnWhenRowIsSelected:"Cannot insert column when all columns are selected.",insertRowWhenColumnIsSelected:"Cannot insert row when all rows are selected.",filterRangeContainingMerges:"Cannot create a filter within a range containing merges",sortRangeContainingMerges:"Cannot sort a range containing merges",cantSortMultipleSelection:"Cannot sort multiple selection",cantSortNullRef:"Cannot sort empty selection",cantSortMixedCells:"Cannot sort range containing cells of mixed shapes",validationError:"The value that you entered violates the validation rules set on the cell.",cannotModifyDisabled:"Cannot modify disabled cells."},tabs:{home:"Home",insert:"Insert",data:"Data"}},y=n.Class.extend({init:function(){this.cols=[],this.trs=[],this._height=0,this._width=0},addColumn:function(t){this._width+=t;var i=n.dom.element("col",{style:{width:t+"px"}});i.visible=t>0,this.cols.push(i)},addRow:function(t){var i,r=null;r={style:{height:t+"px"}},this._height+=t,i=n.dom.element("tr",r),i.visible=t>0,this.trs.push(i)},addCell:function(t,i,r,u,f){var s,e,o;return null!==i&&void 0!==i||(i=""),i instanceof n.dom.Node||(i=n.dom.text(i)),s=[i],e={style:r},f&&!f.value&&(s.push(n.dom.element("span",{className:"k-dirty"})),u=(u||"")+(u?" ":"")+"k-dirty-cell",e.title=f.message),u&&(e.className=u),o=n.dom.element("td",e,s),this.trs[t].children.push(o),o},toDomTree:function(t,i,r){this.trs=this.trs.filter(function(n){return n.visible});var u=0;return this.cols=this.cols.filter(function(n,t){return n.visible||(this.trs.forEach(function(n){n.children.splice(t-u,1)}),u++),n.visible},this),n.dom.element("table",{style:{left:t+"px",top:i+"px",height:this._height+"px",width:this._width+"px"},className:r},[n.dom.element("colgroup",null,this.cols),n.dom.element("tbody",null,this.trs)])}}),w='<ul class="#=classNames.cellContextMenu#"><li data-action=cut>Cut</li><li data-action=copy>Copy</li><li data-action=paste>Paste</li><li class="k-separator"></li><li data-action=merge>Merge</li><li data-action=unmerge>Unmerge</li></ul>',l='<ul class="#=classNames.rowHeaderContextMenu#"><li data-action=cut>Cut</li><li data-action=copy>Copy</li><li data-action=paste>Paste</li><li class="k-separator"></li><li data-action="delete-row">Delete</li><li data-action="hide-row">Hide</li><li data-action="unhide-row">Unhide</li></ul>',v='<ul class="#=classNames.colHeaderContextMenu#"><li data-action=cut>Cut</li><li data-action=copy>Copy</li><li data-action=paste>Paste</li><li class="k-separator"></li><li data-action="delete-column">Delete</li><li data-action="hide-column">Hide</li><li data-action="unhide-column">Unhide</li></ul>',n.spreadsheet.ContextMenu=n.ui.ContextMenu,a=n.template('<div class="#=classNames.view#"><div class="#=classNames.fixedContainer#"></div><div class="#=classNames.scroller#"><div class="#=classNames.viewSize#"></div></div><div tabindex="0" class="#=classNames.clipboard#" contenteditable=true></div><div class="#=classNames.cellEditor#"></div></div><div class="#=classNames.sheetsBar#"></div>'+w+l+v),f=n.Class.extend({init:function(i,u){var o,s,e=f.classNames;this.element=i,this.options=t.extend(!0,{messages:n.spreadsheet.messages.view},this.options,u),this._chrome(),this._dialogs=[],i.append(a({classNames:e})),this._formulaInput(),this.wrapper=i.find(r+e.view),this.container=i.find(r+e.fixedContainer)[0],this.scroller=i.find(r+e.scroller)[0],this.clipboard=i.find(r+e.clipboard),this.viewSize=t(this.scroller.firstChild),this.tree=new n.dom.Tree(this.container),this.clipboardContents=new n.dom.Tree(this.clipboard[0]),this.editor=new n.spreadsheet.SheetEditor(this),this._sheetsbar(),o={target:i,animation:!1,showOn:"never"},this.cellContextMenu=new n.spreadsheet.ContextMenu(i.find(r+e.cellContextMenu),o),this.colHeaderContextMenu=new n.spreadsheet.ContextMenu(i.find(r+e.colHeaderContextMenu),o),this.rowHeaderContextMenu=new n.spreadsheet.ContextMenu(i.find(r+e.rowHeaderContextMenu),o),s=n.support.scrollbar(),t(this.container).css({width:this.wrapper[0].clientWidth-s,height:this.wrapper[0].clientHeight-s})},enableClipboard:function(n){this.isClipboardDeactivated=!n,n?this.clipboard.attr("contenteditable",n):this.clipboard.removeAttr("contenteditable")},_resize:function(){var t=n._outerHeight,u=this.tabstrip?t(this.tabstrip.element):0,r=this.formulaBar?t(this.formulaBar.element):0,i=this.sheetsbar?t(this.sheetsbar.element):0;this.wrapper.height(this.element.height()-(u+r+i)),this.tabstrip&&this.tabstrip.quickAccessAdjust()},_chrome:function(){var r,i=t("<div class='k-spreadsheet-action-bar' />").prependTo(this.element),u=t("<div class='k-spreadsheet-name-editor' />").appendTo(i);this.nameEditor=new n.spreadsheet.NameEditor(u,this.options),r=t("<div />").appendTo(i),this.formulaBar=new n.spreadsheet.FormulaBar(r),this.options.toolbar&&this._tabstrip()},_formulaInput:function(){var t=this.element.find(r+f.classNames.cellEditor);this.formulaInput=new n.spreadsheet.FormulaInput(t,{autoScale:!0})},_sheetsbar:function(){if(this.options.sheetsbar){var i=t.extend(!0,{openDialog:this.openDialog.bind(this)},this.options.sheetsbar);this.sheetsbar=new n.spreadsheet.SheetsBar(this.element.find(r+f.classNames.sheetsBar),i)}},_tabstrip:function(){var i,f=this.options.messages.tabs,r=t.extend(!0,{home:!0,insert:!0,data:!0},this.options.toolbar),u=[];this.tabstrip&&(this.tabstrip.destroy(),this.element.children(".k-tabstrip").remove());for(i in r)(r[i]===!0||r[i]instanceof Array)&&u.push({id:i,text:f[i],content:""});this.tabstrip=new n.spreadsheet.TabStrip(t("<div />").prependTo(this.element),{animation:!1,dataTextField:"text",dataContentField:"content",dataSource:u,toolbarOptions:r,view:this}),this.tabstrip.select(0)},_executeCommand:function(n){this._sheet.trigger("commandRequest",n)},workbook:function(n){this._workbook=n,this.nameEditor._workbook=n},sheet:function(n){this._sheet=n},activeCellRectangle:function(){return this.cellRectangle(this._sheet._viewActiveCell())},_rectangle:function(n,t){return n._grid.boundingRectangle(t.toRangeRef())},isColumnResizer:function(n,t,i){var f,r,e=this._rectangle(t,i);return n-=this._sheet._grid._headerWidth,f=u/2,r=e.right-this.scroller.scrollLeft,r-f<=n&&n<=r+f},isRowResizer:function(n,t,i){var f,r,e=this._rectangle(t,i);return n-=this._sheet._grid._headerHeight,f=u/2,r=e.bottom-this.scroller.scrollTop,r-f<=n&&n<=r+f},isFilterIcon:function(n,t,i,r){var u,f=i._grid,o=f.rows.frozen?0:this.scroller.scrollTop,e=f.columns.frozen?0:this.scroller.scrollLeft;return n-=this._sheet._grid._headerWidth-e,t-=this._sheet._grid._headerHeight-o,u=!1,this._sheet.forEachFilterHeader(r,function(r){if(!u){var f=this._rectangle(i,r);u=i.filterIconRect(f).intersects(n,t)}}.bind(this)),u},isAutoFill:function(n,t,i){var r,u=this._sheet.select();return!(u.size>1)&&(n-=this._sheet._grid._headerWidth,t-=this._sheet._grid._headerHeight,i._grid.columns.frozen||(n+=this.scroller.scrollLeft),i._grid.rows.frozen||(t+=this.scroller.scrollTop),r=this._rectangle(i,u),Math.abs(r.right-n)<8&&Math.abs(r.bottom-t)<8)},isEditButton:function(n,t){var i,r=this._sheet.activeCellCustomEditor();if(r&&(i=this.activeCellRectangle(),n>i.right&&n<=i.right+20&&t>=i.top&&t<=i.bottom))return!0},objectAt:function(n,t){var r,i,s,c,u,f,h,e=this._sheet._grid;return n<0||t<0||n>this.scroller.clientWidth||t>this.scroller.clientHeight?r={type:"outside"}:n<e._headerWidth&&t<e._headerHeight?r={type:"topcorner"}:(i=this.paneAt(n,t),i?(s=i._grid.rows.indexVisible(t,this.scroller.scrollTop),c=i._grid.columns.indexVisible(n,this.scroller.scrollLeft),u="cell",f=new o(s,c),h=this._sheet.selectionInProgress(),this.isAutoFill(n,t,i)?u="autofill":this.isFilterIcon(n,t,i,f)?u="filtericon":!h&&n<e._headerWidth?(f=new o(s,-(1/0)),u=this.isRowResizer(t,i,f)?"rowresizehandle":"rowheader"):!h&&t<e._headerHeight?(f=new o(-(1/0),c),u=this.isColumnResizer(n,i,f)?"columnresizehandle":"columnheader"):this.isEditButton(n,t)&&(u="editor"),r={type:u,ref:f}):r={type:"outside"}),r.pane=i,r.x=n,r.y=t,r},paneAt:function(n,t){return this.panes.filter(function(i){var r=i._grid;return p(t,r.top,r.bottom)&&p(n,r.left,r.right)})[0]},containingPane:function(n){return this.panes.filter(function(t){return!!t._grid.contains(n)})[0]},cellRectangle:function(n){var t=this.containingPane(n)._grid,i=this._sheet._grid.rectangle(n);return i.offset(t.headerWidth-(t.columns.frozen?0:this.scroller.scrollLeft),t.headerHeight-(t.rows.frozen?0:this.scroller.scrollTop))},refresh:function(n){var r,i,t=this._sheet;this.tabstrip&&this.tabstrip.refreshTools(t.range(t.activeCell())),n.sheetSelection&&this.sheetsbar&&this.sheetsbar.renderSheets(this._workbook.sheets(),this._workbook.sheetIndex(this._sheet)),this._resize(),this.viewSize[0].style.height=t._grid.totalHeight()+"px",this.viewSize[0].style.width=t._grid.totalWidth()+"px",n.layout&&(r=t.frozenColumns(),i=t.frozenRows(),this.panes=[this._pane(i,r)],r>0&&this.panes.push(this._pane(i,0,null,r)),i>0&&this.panes.push(this._pane(0,r,i,null)),i>0&&r>0&&this.panes.push(this._pane(0,0,i,r))),n.filter&&this._destroyFilterMenu(),n.activeCell&&(this._focus=t.activeCell().toRangeRef())},createFilterMenu:function(i){var u,o,e,s,f,r;return this._filterMenu&&this._filterMenu.options.column==i?this._filterMenu:(this._destroyFilterMenu(),u=this._sheet,o=u.filter().ref,e=new n.spreadsheet.Range(o,u),s=t("<div />").appendTo(this.element),f={column:i,range:e},r=new n.spreadsheet.FilterMenu(s,f),this._filterMenu=r,r)},selectClipBoardContents:function(){this.isClipboardDeactivated||(this.clipboard.focus(),d(this.clipboard[0]))},scrollIntoView:function(n){var r=!1,u=this.containingPane(n)._grid,t=u.scrollBoundaries(n),i=this.scroller,e=u.rows.frozen?0:i.scrollTop,f=u.columns.frozen?0:i.scrollLeft;return t.top<e&&(r=!0,i.scrollTop=t.scrollTop),t.bottom>e&&(r=!0,i.scrollTop=t.scrollBottom),t.left<f&&(r=!0,i.scrollLeft=t.scrollLeft),t.right>f&&(r=!0,i.scrollLeft=t.scrollRight),r},_destroyDialog:function(){this._dialogs.pop()},openCustomEditor:function(){var n=this,i=n._sheet.activeCell().first(),r=n._sheet.activeCellCustomEditor(),t=n._sheet.range(i);r.edit({range:t,rect:n.activeCellRectangle(),view:this,validation:this._sheet.validation(i),callback:function(i,r){n._executeCommand({command:"EditCommand",options:{operatingRange:t,property:r?"input":"value",value:i}})}})},openDialog:function(t,i){var u,f,e,r=n.spreadsheet.dialogs.create(t,i);if(r)return r.bind("action",this._executeCommand.bind(this)),r.bind("deactivate",this._destroyDialog.bind(this)),this._dialogs.push(r),u=this._sheet,f=u.activeCell(),e=new n.spreadsheet.Range(f,u),r.open(e),r},showError:function(i,r){var u,o=this.options.messages.errors,e=function(t){var i=t.sender.dialog().element;i.find(".k-button:first").focus(),i.find(".k-button, input").on("keydown",function(i){i.keyCode==n.keys.ESC&&t.sender.close()})},f=function(n){var t=n.sender;this.selectClipBoardContents(),t._retry&&r&&r()}.bind(this);n.spreadsheet.dialogs.registered(i.type)?(u={close:f},"validationError"===i.type&&(u=t.extend(u,{title:i.title||"Error",text:i.body?i.body:o[i.type],activate:e})),this.openDialog(i.type,u)):this.openDialog("message",{title:i.title||"Error",text:i.body?i.body:o[i.type],activate:e,close:f})},destroy:function(){this._dialogs.forEach(function(n){n.destroy()}),this.cellContextMenu.destroy(),this.rowHeaderContextMenu.destroy(),this.colHeaderContextMenu.destroy(),this.tabstrip&&this.tabstrip.destroy(),this._destroyFilterMenu()},_destroyFilterMenu:function(){this._filterMenu&&(this._filterMenu.destroy(),this._filterMenu=void 0,this._filterMenuColumn=void 0)},render:function(){var t,e,o,h,i,r,u,c;this.element.is(":visible")&&(t=this._sheet,e=t.focus(),e&&this.scrollIntoView(e)||(o=t.resizingInProgress()?t.resizeHandlePosition().col===-(1/0)?"column":"row":"none",this.wrapper.toggleClass(s.editContainer,this.editor.isActive()).toggleClass(s.horizontalResize,"row"==o).toggleClass(s.verticalResize,"column"==o),h=t._grid,i=this.scroller.scrollTop,r=this.scroller.scrollLeft,i<0&&(i=0),r<0&&(r=0),u=this.panes.map(function(n){return n.render(r,i)}),c=n.dom.element("div",{style:{width:h._headerWidth+"px",height:h._headerHeight+"px"},className:f.classNames.topCorner}),u.push(c),t.resizeHandlePosition()&&t.resizeHintPosition()&&u.push(this.renderResizeHint()),this.tree.render(u),this.editor.isActive()?this.editor.toggleTooltip(this.activeCellRectangle()):t.selectionInProgress()||t.resizingInProgress()||t.isInEditMode()||this.renderClipboardContents()))},renderResizeHint:function(){var e,t,r=this._sheet,o=r.resizeHandlePosition(),f=o.col!==-(1/0);return e=f?{height:this.scroller.clientHeight+"px",width:u+"px",left:r.resizeHintPosition().x+"px",top:"0px"}:{height:u+"px",width:this.scroller.clientWidth+"px",top:r.resizeHintPosition().y+"px",left:"0px"},t=i.classNames,n.dom.element("div",{className:t.resizeHint+(f?"":" "+t.resizeHintVertical),style:e},[n.dom.element("div",{className:t.resizeHintHandle}),n.dom.element("div",{className:t.resizeHintMarker})])},renderClipboardContents:function(){var i,u,r,e,s,t=this._sheet,h=t._grid,n=t.select().toRangeRef(),f=this._workbook.clipboard().canCopy();return f.canCopy===!1&&f.multiSelection?(this.clipboardContents.render([]),void this.selectClipBoardContents()):(n=t.trim(n),i=new y,u=h.rangeDimensions(n),u.rows.forEach(function(n){i.addRow(n)}),u.columns.forEach(function(n){i.addColumn(n)}),r=t._getMergedCells(n),e=r.primary,s=r.secondary,t.forEach(n,function(t,r,u){var h,f,c=new o(t,r).print();s[c]||(h=g(i,t-n.topLeft.row,u),f=e[c],f&&(h.attr.colspan=f.width(),h.attr.rowspan=f.height()))}),this.clipboardContents.render([i.toDomTree(0,0,"kendo-clipboard-"+this._workbook.clipboard()._uid)]),void this.selectClipBoardContents())},_pane:function(n,t,r,u){var f=new i(this._sheet,this._sheet._grid.pane({row:n,column:t,rowCount:r,columnCount:u}));return f.refresh(this.scroller.clientWidth,this.scroller.clientHeight),f}}),e={cell:"k-spreadsheet-cell",vaxis:"k-spreadsheet-vaxis",haxis:"k-spreadsheet-haxis",vborder:"k-spreadsheet-vborder",hborder:"k-spreadsheet-hborder",rowHeader:"k-spreadsheet-row-header",columnHeader:"k-spreadsheet-column-header",pane:"k-spreadsheet-pane",data:"k-spreadsheet-data",mergedCell:"k-spreadsheet-merged-cell",mergedCellsWrapper:"k-merged-cells-wrapper",activeCell:"k-spreadsheet-active-cell",selection:"k-spreadsheet-selection",selectionWrapper:"k-selection-wrapper",autoFillWrapper:"k-auto-fill-wrapper",single:"k-single",top:"k-top",right:"k-right",bottom:"k-bottom",left:"k-left",resizeHandle:"k-resize-handle",columnResizeHandle:"k-column-resize-handle",rowResizeHandle:"k-row-resize-handle",resizeHint:"k-resize-hint",resizeHintHandle:"k-resize-hint-handle",resizeHintMarker:"k-resize-hint-marker",resizeHintVertical:"k-resize-hint-vertical",selectionHighlight:"k-spreadsheet-selection-highlight",series:["k-series-a","k-series-b","k-series-c","k-series-d","k-series-e","k-series-f"]},i=n.Class.extend({init:function(n,t){this._sheet=n,this._grid=t},refresh:function(n,t){this._grid.refresh(n,t)},isVisible:function(n,t,i){return this._grid.view(n,t).ref.intersects(i)},render:function(t,r){var e,c,l,a,v,h,s=i.classNames,f=this._sheet,u=this._grid,o=u.view(t,r);return this._currentView=o,this._currentRect=this._rectangle(o.ref),this._selectedHeaders=f.selectedHeaders(),e=[],e.push(this.renderData()),e.push(this.renderSelection()),e.push(this.renderAutoFill()),e.push(this.renderEditorSelection()),e.push(this.renderFilterHeaders()),u.hasRowHeader&&(c=n.dom.element("div",{className:s.rowHeader,style:{width:u.headerWidth+"px",top:o.rowOffset+"px"}}),e.push(c),f.forEach(o.ref.leftColumn(),function(t){if(!f.isHiddenRow(t)){var r=t+1,i=f.rowHeight(t);c.children.push(n.dom.element("div",{className:this.headerClassName(t,"row"),style:{width:u.headerWidth+"px",height:i+"px"}},[n.dom.element("div",{className:"k-vertical-align-center"},[n.dom.text(r+"")])]))}}.bind(this))),u.hasColumnHeader&&(l=n.dom.element("div",{className:s.columnHeader,style:{top:"0px",left:o.columnOffset+"px",width:this._currentRect.width+"px",height:u.headerHeight+"px"}}),e.push(l),a=0,f.forEach(o.ref.topRow(),function(t,i){if(!f.isHiddenColumn(i)){var e=n.spreadsheet.Ref.display(null,1/0,i),r=f.columnWidth(i);l.children.push(n.dom.element("div",{className:this.headerClassName(i,"col"),style:{position:"absolute",left:a+"px",width:r+"px",height:u.headerHeight+"px"}},[n.dom.element("div",{className:"k-vertical-align-center"},[n.dom.text(e+"")])])),a+=r}}.bind(this))),f.resizeHandlePosition()&&(u.hasColumnHeader||u.hasRowHeader)&&(v=f._grid.normalize(f.resizeHandlePosition()),o.ref.intersects(v)&&(f.resizeHintPosition()||e.push(this.renderResizeHandle()))),h=[s.pane],u.hasColumnHeader&&h.push(s.top),u.hasRowHeader&&h.push(s.left),n.dom.element("div",{style:u.style,className:h.join(" ")},e)},headerClassName:function(n,t){var u,f,i,r=this._selectedHeaders;return"row"===t?(u=r.rows[n],f=r.allRows):(u=r.cols[n],f=r.allCols),i=u||(r.all?"full":f?"partial":"none"),i&&(i="k-selection-"+i),i},renderData:function(){var r,f,u=this._sheet,s=this._currentView,t=n.dom.element("div",{className:i.classNames.data,style:{position:"relative",left:s.columnOffset+"px",top:s.rowOffset+"px"}}),l=this._currentRect,o=n.spreadsheet.draw.doLayout(u,s.ref,{forScreen:!0}),h=u._showGridLines;return h&&(r=null,o.xCoords.forEach(function(i){i!==r&&(r=i,t.children.push(n.dom.element("div",{className:e.vaxis,style:{left:i+"px",height:l.height+"px",borderColor:u.gridLinesColor()}})))}),r=null,o.yCoords.forEach(function(i){i!==r&&(r=i,t.children.push(n.dom.element("div",{className:e.haxis,style:{top:i+"px",width:l.width+"px",borderColor:u.gridLinesColor()}})))})),f=n.spreadsheet.draw.Borders(),o.cells.forEach(function(n){f.add(n),c(t.children,n,null,h)}),f.vert.forEach(function(i){i.forEach(function(i){if(!i.rendered){i.rendered=!0;var r={left:i.x+"px",top:i.top+"px",height:i.bottom-i.top+1+"px",borderWidth:i.size+"px",borderColor:i.color};1!=i.size&&(r.transform="translateX(-"+(i.size-1)/2+"px)"),t.children.push(n.dom.element("div",{className:e.vborder,style:r}))}})}),f.horiz.forEach(function(i){i.forEach(function(i){if(!i.rendered){i.rendered=!0;var r={top:i.y+"px",left:i.left+"px",width:i.right-i.left+"px",borderWidth:i.size+"px",borderColor:i.color};1!=i.size&&(r.transform="translateY(-"+(i.size-1)/2+"px)"),t.children.push(n.dom.element("div",{className:e.hborder,style:r}))}})}),t},renderResizeHandle:function(){var r,o=this._sheet,e=o.resizeHandlePosition(),f=this._rectangle(e),t=[i.classNames.resizeHandle];return e.col!==-(1/0)?(r={height:this._grid.headerHeight+"px",width:u+"px",left:f.right-u/2+"px",top:"0px"},t.push(s.horizontalResize)):(r={height:u+"px",width:this._grid.headerWidth+"px",top:f.bottom-u/2+"px",left:"0px"},t.push(s.verticalResize)),n.dom.element("div",{className:t.join(" "),style:r})},filterIconRect:function(t){var i=16,r=3;return new n.spreadsheet.Rectangle(t.right-i-r,t.top+r,i,i)},renderFilterHeaders:function(){function e(i){return n.dom.element("span",{className:t.icon+" "+i})}function o(t,r,u){var o,h={left:r.left+"px",top:r.top+"px"},s=i&&i.columns.some(function(n){return n.index===u}),f=t.filterButton;return s&&(f+=" "+t.filterButtonActive),o=n.dom.element("span",{className:f,style:h},[e(t.iconFilterDefault)])}var u=this._sheet,r=[],t=f.classNames,i=u.filter();return i&&this._addDiv(r,i.ref,t.filterRange),u.forEachFilterHeader(this._currentView.ref,function(n){var f=this._rectangle(n),e=this.filterIconRect(f),i=this._sheet.filterColumn(n),u=o(t,e,i);r.push(u)}.bind(this)),n.dom.element("div",{className:t.filterHeadersWrapper},r)},renderEditorSelection:function(){var r=i.classNames,u=this._sheet,t=[];return u._formulaSelections.forEach(function(i){var u=i.ref;u!==n.spreadsheet.NULLREF&&this._addDiv(t,u,r.selectionHighlight+" "+i.colorClass)}.bind(this)),n.dom.element("div",{className:r.selectionWrapper},t)},renderSelection:function(){var r=i.classNames,e=[],u=[r.activeCell],t=[r.selection],f=this._sheet,h=f.activeCell().toRangeRef(),s=this._activeFormulaColor(),o=f.select();return u=u.concat(s,this._directionClasses(h)),t=t.concat(s),f.singleCellSelection()&&u.push(r.single),1===o.size()&&t.push("k-single-selection"),this._sheet.autoFillPunch()&&t.push("k-dim-auto-fill-handle"),o.forEach(function(i){i!==n.spreadsheet.NULLREF&&this._addDiv(e,i,t.join(" "))}.bind(this)),this._addTable(e,h,u.join(" ")),n.dom.element("div",{className:r.selectionWrapper},e)},renderAutoFill:function(){var t,h,s,r,u,c,e,f=[];if(this._sheet.autoFillInProgress())if(t=this._sheet.autoFillRef(),h=this._sheet.autoFillPunch(),s=this._sheet._autoFillDirection,this._addDiv(f,t,"k-auto-fill"),h)this._addDiv(f,h,"k-auto-fill-punch");else if(void 0!==s){switch(s){case 0:r=t.bottomRight,u="k-auto-fill-br-hint";break;case 1:r=t.bottomRight,u="k-auto-fill-br-hint";break;case 2:r=new o(t.topLeft.row,t.bottomRight.col),u="k-auto-fill-tr-hint";break;case 3:r=new o(t.bottomRight.row,t.topLeft.col),u="k-auto-fill-bl-hint"}c=n.dom.element("span",{className:"k-tooltip"},[n.dom.text(this._sheet._autoFillHint)]),e=this._addDiv(f,r,u),e&&e.children.push(c)}return n.dom.element("div",{className:i.classNames.autoFillWrapper},f)},_addDiv:function(n,t,i){var r,u=this._currentView;return u.ref.intersects(t)&&(r=this._rectangle(t).resize(1,1).toDiv(i),n.push(r)),r},_addTable:function(t,i,r){var u,e,f=this,s=f._sheet,o=f._currentView;o.ref.intersects(i)&&(u=f._rectangle(i),e=f._sheet.activeCellCustomEditor(),s.forEach(i.collapse(),function(i,f,o){if(o.left=u.left,o.top=u.top,o.width=u.width,o.height=u.height,c(t,o,r,!0),e){var s=n.dom.element("div",{className:"k-button k-spreadsheet-editor-button",style:{left:o.left+o.width+"px",top:o.top+"px",height:o.height+"px"}});e.icon&&s.children.push(n.dom.element("span",{className:"k-icon "+e.icon})),t.push(s)}}))},_activeFormulaColor:function(){var n,t=[];return this._sheet.isInEditMode()&&(n=this._sheet._formulaSelections.filter(function(n){return n.active&&"ref"==n.type})[0],n&&t.push(n.colorClass)),t},_directionClasses:function(n){var t=[],u=i.classNames,r=this._currentView.ref;return n.move(0,-1).intersects(r)||t.push(u.left),n.move(-1,0).intersects(r)||t.push(u.top),n.move(0,1).intersects(r)||t.push(u.right),n.move(1,0).intersects(r)||t.push(u.bottom),t},_rectangle:function(n){return this._grid.boundingRectangle(n.toRangeRef()).offset(-this._currentView.mergedCellLeft,-this._currentView.mergedCellTop)}}),n.spreadsheet.View=f,n.spreadsheet.Pane=i,n.spreadsheet.drawCell=c,t.extend(!0,f,{classNames:s}),t.extend(!0,i,{classNames:e}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/customeditors.min",["kendo.core.min","kendo.popup.min","kendo.calendar.min","kendo.listview.min","spreadsheet/sheet.min"],n)}(function(){!function(n){"use strict";var t,i;n.support.browser.msie&&n.support.browser.version<9||(t={},i=n.spreadsheet.registerEditor=function(n,i){t[n]=i},n.spreadsheet.Sheet.prototype.activeCellCustomEditor=function(){var r,i,n,u=this.activeCell().first();if(this.range(u).enable())return r=this.validation(u),i=this._properties.get("editor",this._grid.cellRefIndex(u)),null!=i?n=t[i]:r&&r.showButton&&(i="_validation_"+r.dataType,n=t[i]),"function"==typeof n&&(n=t[i]=n()),n},i("_validation_date",function(){function u(){t||(t=$("<div>").kendoCalendar(),i=$("<div>").kendoPopup(),t.appendTo(i),t=t.getKendoCalendar(),i=i.getKendoPopup(),t.bind("change",function(){i.close();var u=t.value();r.range.format()||r.range.format("yyyy-mm-dd"),r.callback(n.spreadsheet.dateToNumber(u))})),i.setOptions({anchor:r.view.element.find(".k-spreadsheet-editor-button")})}function f(){var o,f,s,e;u(),o=r.range.value(),t.value(null!=o?n.spreadsheet.numberToDate(o):null),f=r.validation,f?(s=n.ui.Calendar.fn.options.min,e=n.ui.Calendar.fn.options.max,/^(?:greaterThan|between)/.test(f.comparerType)&&(s=n.spreadsheet.numberToDate(f.from.value)),"between"==f.comparerType&&(e=n.spreadsheet.numberToDate(f.to.value)),"lessThan"==f.comparerType&&(e=n.spreadsheet.numberToDate(f.from.value)),t.setOptions({disableDates:function(t){var r=f.from?0|f.from.value:0,i=f.to?0|f.to.value:0;return t=0|n.spreadsheet.dateToNumber(t),!n.spreadsheet.validation.validationComparers[f.comparerType](t,r,i)},min:s,max:e})):t.setOptions({disableDates:null,min:null,max:null}),i.open()}var r,t,i;return{edit:function(n){r=n,f()},icon:"k-i-calendar"}}),i("_validation_list",function(){function u(){t||(t=$("<ul class='k-list k-reset'/>").kendoStaticList({template:"#:value#",selectable:!0,autoBind:!1}),i=$("<div>").kendoPopup(),t.appendTo(i),i=i.getKendoPopup(),t=t.getKendoStaticList(),t.bind("change",function(){i.close();var n=t.value()[0];n&&r.callback(n.value)})),i.setOptions({anchor:r.view.element.find(".k-spreadsheet-editor-button")})}function f(){var o,e,f;u(),o=r.validation.from.value,e=[],o&&o.each(function(n){e.push({value:n})}),f=new n.data.DataSource({data:e}),t.setDataSource(f),f.read(),i.open()}var r,t,i;return{edit:function(n){r=n,f()},icon:"k-i-arrow-60-down"}}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/grid.min",["kendo.core.min","spreadsheet/references.min"],n)}(function(){!function(n){var t,i,f,r,e,u;n.support.browser.msie&&n.support.browser.version<9||(t=n.spreadsheet.CellRef,i=n.spreadsheet.RangeRef,f=n.spreadsheet.UnionRef,r=n.Class.extend({init:function(n,t,i,r){this.left=n,this.width=i,this.right=n+i,this.top=t,this.height=r,this.bottom=t+r},offset:function(n,t){return new r(this.left+n,this.top+t,this.width,this.height)},resize:function(n,t){return new r(this.left,this.top,this.width+n,this.height+t)},intersects:function(n,t){return this.left<n&&n<this.left+this.width&&this.top<t&&t<this.top+this.height},toDiv:function(t){return n.dom.element("div",{className:t,style:{width:this.width+"px",height:this.height+"px",top:this.top+"px",left:this.left+"px"}})}}),e=n.Class.extend({init:function(n,t,i,r,u,f){this.rowCount=i,this.columnCount=r,this._columns=t,this._rows=n,this._headerHeight=u,this._headerWidth=f},isAxis:function(n){var i,t;return n=n.toRangeRef(),i=n.topLeft,t=n.bottomRight,0===i.row&&t.row===this.rowCount-1||0===i.col&&t.col===this.columnCount-1},width:function(n,t){return this._columns.sum(n,t)},height:function(n,t){return this._rows.sum(n,t)},totalHeight:function(){return this._rows.total+this._headerHeight},totalWidth:function(){return this._columns.total+this._headerWidth},index:function(n,t){return t*this.rowCount+n},cellRef:function(n){return new t(n%this.rowCount,n/this.rowCount>>0)},rowRef:function(n){return new i(new t(n,0),new t(n,this.columnCount-1))},colRef:function(n){return new i(new t(0,n),new t(this.rowCount-1,n))},cellRefIndex:function(n){return this.index(n.row,n.col)},normalize:function(n){return n instanceof i?new i(this.normalize(n.topLeft),this.normalize(n.bottomRight)).setSheet(n.sheet,n.hasSheet()):n instanceof f?n.map(function(n){return this.normalize(n)},this):(n instanceof t&&(n=n.clone(),n.col=Math.max(0,Math.min(this.columnCount-1,n.col)),n.row=Math.max(0,Math.min(this.rowCount-1,n.row))),n)},rectangle:function(n){var t=this.normalize(n.topLeft),i=this.normalize(n.bottomRight);return new r(this.width(0,t.col-1),this.height(0,t.row-1),this.width(t.col,i.col),this.height(t.row,i.row))},pane:function(t){return new u(new n.spreadsheet.PaneAxis(this._rows,t.row,t.rowCount,this._headerHeight),new n.spreadsheet.PaneAxis(this._columns,t.column,t.columnCount,this._headerWidth),this)},rangeDimensions:function(n){return{rows:this._rows.values.iterator(n.topLeft.row,n.bottomRight.row),columns:this._columns.values.iterator(n.topLeft.col,n.bottomRight.col)}},forEach:function(n,i){for(var r,e=this.normalize(n.topLeft),f=this.normalize(n.bottomRight),u=e.col;u<=f.col;u++)for(r=e.row;r<=f.row;r++)i(new t(r,u))},trim:function(n,r){for(var a,c,f,l,e=n.topLeft,s=n.bottomRight,o=e.row,h=e.col,u=e.col;u<=s.col;u++)a=this.index(e.row,u),c=this.index(s.row,u),f=r.tree.intersecting(a,c),f.length&&(l=this.cellRef(f[f.length-1].end),o=Math.max(o,l.row),h=u);return new i(n.topLeft,new t(Math.min(o,n.bottomRight.row),h))}}),u=n.Class.extend({init:function(n,t,i){this.rows=n,this.columns=t,this._grid=i,this.headerHeight=n.headerSize,this.headerWidth=t.headerSize,this.hasRowHeader=t.hasHeader,this.hasColumnHeader=n.hasHeader},refresh:function(n,t){var r,i;this.columns.viewSize(n),this.rows.viewSize(t),r=this.columns.paneSegment(),i=this.rows.paneSegment(),this.left=r.offset,this.top=i.offset,this.right=r.offset+r.length,this.bottom=i.offset+i.length,this.style={top:i.offset+"px",left:r.offset+"px",height:i.length+"px",width:r.length+"px"}},view:function(n,r){var f=this.rows.visible(r),u=this.columns.visible(n);return{rows:f,columns:u,rowOffset:f.offset,columnOffset:u.offset,mergedCellLeft:u.start,mergedCellTop:f.start,ref:new i(new t(f.values.start,u.values.start),new t(f.values.end,u.values.end))}},contains:function(n){return this.rows.contains(n.topLeft.row,n.bottomRight.row)&&this.columns.contains(n.topLeft.col,n.bottomRight.col)},index:function(n,t){return this._grid.index(n,t)},boundingRectangle:function(n){return this._grid.rectangle(n)},cellRefIndex:function(n){return this._grid.cellRefIndex(n)},scrollBoundaries:function(n){var i=this.boundingRectangle(n),t={top:Math.max(0,i.top-this.top+(this.hasColumnHeader?0:this.headerHeight)),left:Math.max(0,i.left-this.left+(this.hasRowHeader?0:this.headerWidth)),right:i.right-this.columns._viewSize+this.headerWidth,bottom:i.bottom-this.rows._viewSize+this.headerHeight},u=this.columns.defaultValue/2,r=this.rows.defaultValue/2;return t.scrollTop=t.top-r,t.scrollBottom=t.bottom+r,t.scrollLeft=t.left-u,t.scrollRight=t.right+u,t}}),n.spreadsheet.Grid=e,n.spreadsheet.PaneGrid=u,n.spreadsheet.Rectangle=r)}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/axis.min",["kendo.core.min"],n)}(function(){!function(n){var i,t;n.support.browser.msie&&n.support.browser.version<9||(i=n.Class.extend({init:function(t,i){this._value=i,this._count=t,this.values=new n.spreadsheet.RangeList(0,t-1,i),this._hidden=new n.spreadsheet.RangeList(0,t-1,0),this.scrollBarSize=n.support.scrollbar(),this._refresh()},adjust:function(n,t){t<0?(this.values.copy(n-t,this._count-1,n),this._hidden.copy(n-t,this._count-1,n)):(this.values.copy(n,this._count,n+t),this._hidden.copy(n,this._count,n+t),this.values.value(n,n+t-1,this._value),this._hidden.value(n,n+t-1,0)),this._refresh()},toJSON:function(n,t){for(var e,r,f,u=[],o=this.values.iterator(0,this._count-1),i=0;i<this._count;i++)e=o.at(i),e!==this._value&&(r=t[i],void 0===r&&(r=u.length,f={index:i},f[n]=e,u.push(f),t[i]=r));return u},fromJSON:function(n,t){for(var u,r,i=0;i<t.length;i++)u=t[i][n],r=t[i].index,void 0===r&&(r=i),this.value(r,r,u)},hide:function(n){if(!this.hidden(n)){var t=this.value(n,n);this._hidden.value(n,n,t),this.value(n,n,0)}},hidden:function(n){return 0!==this._hidden.value(n,n)},includesHidden:function(n,t){return this._hidden.intersecting(n,t).length>1},nextVisible:function(n,t){var i,r=this._count-1;return n===r?t?n+1:n:(n+=1,i=this._hidden.intersecting(n,n)[0],0!==i.value?i.end===r?n-1:i.end+1:n)},nextPage:function(n,t){return this.index(this.sum(0,n-1)+t)},prevPage:function(n,t){return this.index(this.sum(0,n)-t)},firstVisible:function(){var n=this._hidden.first();return 0===n.value?0:n.end+1},lastVisible:function(){var n=this._hidden.last();return 0===n.value?this._count-1:n.start-1},prevVisible:function(n,t){if(0===n)return t?-1:0;n-=1;var i=this._hidden.intersecting(n,n)[0];return 0!==i.value?0===i.start?n+1:i.start-1:n},unhide:function(n){if(this.hidden(n)){var t=this._hidden.value(n,n);this._hidden.value(n,n,0),this.value(n,n,t)}},value:function(n,t,i){return void 0===i?this.values.iterator(n,t).at(0):(this.values.value(n,t,i),void this._refresh())},sum:function(n,t){for(var u=this.values.iterator(n,t),r=0,i=n;i<=t;i++)r+=u.at(i);return r},visible:function(n,t){var e,o,h,f,s,u,r=null,i=null,c=!1;return t>=this.total+this.scrollBarSize&&(c=!0),e=this._pixelValues.intersecting(n,t),r=e[0],i=e[e.length-1],r?(o=n-r.start,h=(o/r.value.value>>0)+r.value.start,f=o-(h-r.value.start)*r.value.value,s=t-i.start,u=(s/i.value.value>>0)+i.value.start,u>i.value.end&&(u=i.value.end),c&&(f+=i.value.value-(s-(u-i.value.start)*i.value.value)),f=Math.min(-f,0),{values:this.values.iterator(h,u),offset:f}):{values:this.values.iterator(0,0),offset:0}},index:function(n){for(var t=0,r=this.values.iterator(0,this._count-1),i=r.at(0);i<n&&t<this._count-1;)i+=r.at(++t);return t},indexVisible:function(n){var t=this.index(n);return this.hidden(t)&&(t=this.prevVisible(t)),t},_refresh:function(){var t=0;this._pixelValues=this.values.map(function(i){var r,u=t;return t+=(i.end-i.start+1)*i.value,r=t-1,new n.spreadsheet.ValueRange(u,r,i)}),this.total=t},getState:function(){return{values:this.values.getState(),hidden:this._hidden.getState()}},setState:function(n){this.values.setState(n.values),this._hidden.setState(n.hidden),this._refresh()}}),t=n.Class.extend({init:function(n,t,i,r){this._axis=n,this._start=t,this._count=i,this.hasHeader=0===t,this.headerSize=r,this.defaultValue=n._value,this.frozen=i>0},viewSize:function(n){this._viewSize=n},sum:function(n,t){return this._axis.sum(n,t-1)},start:function(){return this.sum(0,this._start)},size:function(){return this.sum(this._start,this._start+this._count)},index:function(n,t){return this._axis.index(n+(this.frozen?0:t)-this.headerSize)},indexVisible:function(n,t){return this._axis.indexVisible(n+(this.frozen?0:t)-this.headerSize)},paneSegment:function(){var n,t=this.start();return this.hasHeader||(t+=this.headerSize),this.frozen?(n=this.size(),this.hasHeader?n+=this.headerSize:n-=this.headerSize):n=this._viewSize-t,{offset:t,length:n}},visible:function(n){var r,t,i=this.start();return this.frozen?(r=this.size(),this.hasHeader||(r-=this.headerSize)):(r=this._viewSize-i-this.headerSize,i+=n),t=this._axis.visible(i,i+r-1),this.frozen&&(t.offset=0),t.start=i,this.hasHeader&&(t.offset+=this.headerSize,t.start-=this.headerSize),t},contains:function(n,t){return this.frozen?!(n>this._start+this._count)&&!(t<this._start):t>=this._start}}),n.spreadsheet.Axis=i,n.spreadsheet.PaneAxis=t)}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/filter.min",["kendo.core.min","kendo.data.min"],n)}(function(){!function(n){function t(n){var t=n.getMonth()+1;return t>=1&&t<=3?1:t>=4&&t<=6?2:t>=7&&t<=9?3:4}function r(t,i){if(t instanceof Date){var r=n.date.today();return r.setFullYear(r.getFullYear()+i),r.getFullYear()===t.getFullYear()}return!1}function f(t,i){if(t instanceof Date){var r=n.date.firstDayOfMonth(n.date.today());return r.setMonth(r.getMonth()+i,1),r.getTime()===n.date.firstDayOfMonth(t).getTime()}return!1}function u(t,i){var u,r;return i instanceof Date&&(u=n.date.dayOfWeek(n.date.getDate(t),1),r=n.date.dayOfWeek(n.date.getDate(i),1),u.getTime()===r.getTime())}if(!(n.support.browser.msie&&n.support.browser.version<9)){var i=n.spreadsheet.Filter=n.Class.extend({prepare:function(){},value:function(n){return n.value},matches:function(){throw Error("The 'matches' method is not implemented.");},toJSON:function(){throw Error("The 'toJSON' method is not implemented.");}});i.create=function(t){var r,i=t.filter;if(!i)throw Error("Filter type not specified.");if(r=n.spreadsheet[i.charAt(0).toUpperCase()+i.substring(1)+"Filter"],!r)throw Error("Filter type not recognized.");return new r(t)},n.spreadsheet.ValueFilter=i.extend({_values:[],_dates:[],_blanks:!1,init:function(n){void 0!==n.values&&(this._values=n.values),void 0!==n.blanks&&(this._blanks=n.blanks),void 0!==n.dates&&(this._dates=n.dates)},value:function(t){var r,i=t.value;return this._dates.length>0&&t.format&&"number"==typeof i&&(r=n.spreadsheet.formatting.type(i,t.format),"date"===r&&(i=n.spreadsheet.numberToDate(i))),i},matches:function(n){return null===n||void 0===n?this._blanks:n instanceof Date?this._dates.some(function(t){return!(t.year!==n.getFullYear()||void 0!==t.month&&t.month!==n.getMonth()||void 0!==t.day&&t.day!==n.getDate()||void 0!==t.hours&&t.hours!==n.getHours()||void 0!==t.minutes&&t.minutes!==n.getMinutes()||void 0!==t.seconds&&t.seconds!==n.getSeconds())}):this._values.indexOf(n)>=0},toJSON:function(){return{filter:"value",blanks:this._blanks,values:this._values.slice(0)}}}),n.spreadsheet.CustomFilter=i.extend({_logic:"and",init:function(t){if(void 0!==t.logic&&(this._logic=t.logic),void 0===t.criteria)throw Error("Must specify criteria.");this._criteria=t.criteria;var i=n.data.Query.filterExpr({logic:this._logic,filters:this._criteria}).expression;this._matches=Function("d","return "+i)},matches:function(n){return null!==n&&this._matches(n)},value:function(t){var i=t.value,u=this._criteria[0].value,f=u instanceof Date?"date":typeof u,r=typeof i;return t.format&&(r=n.spreadsheet.formatting.type(i,t.format)),r!=f?"string"==f&&(t.format&&(i=n.spreadsheet.formatting.text(i,t.format)),i+=""):"date"==r&&(i=n.spreadsheet.numberToDate(i)),i},toJSON:function(){return{filter:"custom",logic:this._logic,criteria:this._criteria}}}),n.spreadsheet.TopFilter=i.extend({init:function(n){this._type=n.type,this._value=n.value,this._values=[]},prepare:function(n){var t,i=n.map(this.value).sort().filter(function(n,t,i){return 0===t||n!==i[t-1]});i.sort("topNumber"===this._type||"topPercent"==this._type?function(n,t){return t-n}:function(n,t){return n-t}),t=this._value,"topPercent"!==this._type&&"bottomPercent"!==this._type||(t=i.length*t/100>>0),this._values=i.slice(0,t)},matches:function(n){return this._values.indexOf(n)>=0},toJSON:function(){return{filter:"top",type:this._type,value:this._value}}}),n.spreadsheet.DynamicFilter=i.extend({init:function(n){if(this._type=n.type,this._predicate=this[n.type],"function"!=typeof this._predicate)throw Error("DynamicFilter type '"+n.type+"' not recognized.");},value:function(t){var r,i=t.value;return t.format&&(r=n.spreadsheet.formatting.type(i,t.format),"date"===r&&(i=n.spreadsheet.numberToDate(i))),i},prepare:function(n){for(var r,u=0,i=0,t=0;t<n.length;t++)r=this.value(n[t]),"number"==typeof r&&(u+=r,i++);this._average=i>0?u/i:0},matches:function(n){return this._predicate(n)},aboveAverage:function(t){return t instanceof Date&&(t=n.spreadsheet.dateToNumber(t)),"number"==typeof t&&t>this._average},belowAverage:function(t){return t instanceof Date&&(t=n.spreadsheet.dateToNumber(t)),"number"==typeof t&&t<this._average},tomorrow:function(t){if(t instanceof Date){var i=n.date.addDays(n.date.today(),1);return n.date.getDate(t).getTime()===i.getTime()}return!1},today:function(t){return t instanceof Date&&n.date.isToday(t)},yesterday:function(t){if(t instanceof Date){var i=n.date.addDays(n.date.today(),-1);return n.date.getDate(t).getTime()===i.getTime()}return!1},nextWeek:function(t){return u(n.date.addDays(n.date.today(),7),t)},thisWeek:function(t){return u(n.date.today(),t)},lastWeek:function(t){return u(n.date.addDays(n.date.today(),-7),t)},nextMonth:function(n){return f(n,1)},thisMonth:function(n){return f(n,0)},lastMonth:function(n){return f(n,-1)},nextQuarter:function(i){var r,u;return i instanceof Date&&(r=n.date.today(),u=t(i)-t(r),1===u&&r.getFullYear()===i.getFullYear()||u==-3&&r.getFullYear()+1===i.getFullYear())},thisQuarter:function(i){var r,u;return i instanceof Date&&(r=n.date.today(),u=t(i)-t(r),0===u&&r.getFullYear()===i.getFullYear())},lastQuarter:function(i){var r,u;return i instanceof Date&&(r=n.date.today(),u=t(r)-t(i),1===u&&r.getFullYear()===i.getFullYear()||u==-3&&r.getFullYear()-1===i.getFullYear())},nextYear:function(n){return r(n,1)},thisYear:function(n){return r(n,0)},lastYear:function(n){return r(n,-1)},yearToDate:function(t){if(t instanceof Date){var i=n.date.today();return t.getFullYear()===i.getFullYear()&&t<=i}return!1},toJSON:function(){return{filter:"dynamic",type:this._type}}}),[1,2,3,4].forEach(function(i){n.spreadsheet.DynamicFilter.prototype["quarter"+i]=function(n){return n instanceof Date&&t(n)===i}}),n.cultures["en-US"].calendar.months.names.forEach(function(t,i){n.spreadsheet.DynamicFilter.prototype[t.toLowerCase()]=function(n){return n instanceof Date&&n.getMonth()===i}})}}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/sorter.min",["kendo.core.min"],n)}(function(){!function(n){if(!(n.support.browser.msie&&n.support.browser.version<9)){var t=n.Class.extend({init:function(n,t){this._grid=n,this._lists=t},indices:function(n,i,r,u){var f=t.ascendingComparer;return r===!1&&(f=t.descendingComparer),i.sortedIndices(this._grid.cellRefIndex(n.topLeft),this._grid.cellRefIndex(n.bottomRight),f,u)},sortBy:function(n,t,i,r,u){for(var o,h,f,s=this.indices(n.toColumn(t),i,r,u),e=n.topLeft.col;e<=n.bottomRight.col;e++)for(o=this._grid.index(n.topLeft.row,e),h=this._grid.index(n.bottomRight.row,e),f=0;f<this._lists.length;f++)o<this._lists[f].lastRangeStart()&&this._lists[f].sort(o,h,s);return s}});t.ascendingComparer=function(t,i){var u,r;if(null===t&&null===i)return 0;if(null===t)return 1;if(null===i)return-1;if(u=typeof t,r=typeof i,"number"===u)return"number"===r?t-i:-1;if("string"===u)switch(r){case"number":return 1;case"string":return t.localeCompare(i);default:return-1}if("boolean"===u)switch(r){case"number":return 1;case"string":return 1;case"boolean":return t-i;default:return-1}if(t instanceof n.spreadsheet.calc.runtime.CalcError)return i instanceof n.spreadsheet.calc.runtime.CalcError?0:1;throw Error("Cannot compare "+t+" and "+i);},t.descendingComparer=function(n,i){return null===n&&null===i?0:null===n?1:null===i?-1:t.ascendingComparer(i,n)},n.spreadsheet.Sorter=t}}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/numformat.min",["spreadsheet/calc.min","kendo.dom.min"],n)}(function(){"use strict";function u(n){function s(){var t=n.skip(h);if(t)return t[1].toLowerCase()}function l(){var i,t=n.skip(o);if(t&&(i=parseFloat(t[2]),!isNaN(i)))return{op:t[1],value:i}}function v(){for(var t,r=[],i=null;!n.eof()&&(t=c());)"date"==t.type?i&&/^(el)?time$/.test(i.type)&&"h"==i.part&&"m"==t.part&&t.format<3&&(t.type="time"):/^(el)?time$/.test(t.type)&&"s"==t.part&&i&&"date"==i.type&&"m"==i.part&&i.format<3&&(i.type="time"),/^(?:str|space|fill)$/.test(t.type)||(i=t),r.push(t);return r}function e(t){if("date"!=t.type||"m"==t.part&&t.format<3){var i=n.skip(/^\.(0+)/);i&&(t.fraction=i[1].length,"date"==t.type&&(t.type="time"))}return t}function c(){var r,t;if(t=n.skip(/^([#0?]+)(?:,([#0?]+))+/))return{type:"digit",sep:!0,format:t[1]+t[2],decimal:i};if(t=n.skip(/^[#0?]+/))return{type:"digit",sep:!1,format:t[0],decimal:i};if(t=n.skip(/^(e)([+-])/i))return{type:"exp",ch:t[1],sign:t[2]};if(t=n.skip(/^(d{1,4}|m{1,5}|yyyy|yy)/i))return t=t[1].toLowerCase(),e({type:"date",part:t.charAt(0),format:t.length});if(t=n.skip(/^(hh?|ss?)/i))return t=t[1].toLowerCase(),e({type:"time",part:t.charAt(0),format:t.length});if(t=n.skip(/^\[(hh?|mm?|ss?)\]/i))return t=t[1].toLowerCase(),e({type:"eltime",part:t.charAt(0),format:t.length});if(t=n.skip(/^(am\/pm|a\/p)/i))return t=t[1].split("/"),{type:"ampm",am:t[0],pm:t[1]};switch(r=n.next()){case";":return null;case"\\":return{type:"str",value:n.next()};case'"':return{type:"str",value:n.readEscaped(r)};case"@":return{type:"text"};case"_":return{type:"space",value:n.next()};case"*":return{type:"fill",value:n.next()};case".":return n.lookingAt(/^\s*[#0?]/)?(i=!0,{type:"dec"}):{type:"str",value:"."};case"%":return{type:"percent"};case",":return{type:"comma"}}return{type:"str",value:r}}function a(){i=!1;var n=s(),t=l();return!n&&t&&(n=s()),{color:n,cond:t,body:v()}}var t,f,i,u;for(n=r.InputStream(n),t=[],f=!1;!n.eof();)u=a(),t.push(u),u.cond&&(f=!0);return f||(1==t.length?t[0].cond="num":2==t.length?(t[0].cond={op:">=",value:0},t[1].cond={op:"<",value:0}):t.length>=3&&(t[0].cond={op:">",value:0},t[1].cond={op:"<",value:0},t[2].cond={op:"=",value:0},t.length>3&&(t[3].cond="text",t=t.slice(0,4)))),t}function a(t){function u(n){var t="";return n.color&&(t+="["+n.color+"]"),n.cond&&"text"!=n.cond&&"num"!=n.cond&&(t+="["+n.cond.op+n.cond.value+"]"),t+=n.body.map(r).join("")}function i(t,i){return i.fraction&&(t+="."+n("",i.fraction,"0")),t}function r(t){return"digit"==t.type?t.sep?t.format.charAt(0)+","+t.format.substr(1):t.format:"exp"==t.type?t.ch+t.sign:"date"==t.type||"time"==t.type?i(n("",t.format,t.part),t):"eltime"==t.type?i("["+n("",t.format,t.part)+"]",t):"ampm"==t.type?t.am+"/"+t.pm:"str"==t.type?JSON.stringify(t.value):"text"==t.type?"@":"space"==t.type?"_"+t.value:"fill"==t.type?"*"+t.value:"dec"==t.type?".":"percent"==t.type?"%":"comma"==t.type?",":void 0}return t.map(u).join(";")}function v(t,i){t.forEach(function(t){var e,o,f,r,s,u=i;if("text"!=t.cond){for(e=t.body,o=!1,f=e.length;0!==u&&--f>=0;)if(r=e[f],"digit"==r.type){if(r.decimal&&(o=!0,u>0?r.format+=n("",u,"0"):u<0&&(s=r.format.length,r.format=r.format.substr(0,s+u),u+=s-r.format.length),0===r.format.length))for(e.splice(f,1);--f>=0;){if(r=e[f],"digit"==r.type&&r.decimal){++f;break}if("dec"==r.type){e.splice(f,1);break}}if(u>0)break}!o&&u>0&&e.splice(f+1,0,{type:"dec"},{type:"digit",sep:!1,decimal:!0,format:n("",u,"0")})}})}function y(n){var t=0;return{next:function(){return n[t++]},eof:function(){return t>=n.length},ahead:function(i,r){if(t+i<=n.length){var u=r.apply(null,n.slice(t,t+i));return u&&(t+=i),u}},restart:function(){t=0}}}function c(n){function b(n,t){("digit"==n.type&&"comma"==t.type||"comma"==n.type&&n.hidden&&"comma"==t.type)&&(t.hidden=!0,l++)}var w,t,f=y(n.body),c=!1,s=!1,v=!1,h=0,l=0,i="",p=!1,a=0,e=[],o=[],u=n.cond,r="";for("text"==u?r="if (typeof value == 'string' || value instanceof kendo.spreadsheet.CalcError) { ":"num"==u?r="if (typeof value == 'number') { ":u&&(w="="==u.op?"==":u.op,r="if (typeof value == 'number' && value "+w+" "+u.value+") { ",i+="value = Math.abs(value); "),n.color&&(i+="result.color = "+JSON.stringify(n.color)+"; ");!f.eof();)f.ahead(2,b),t=f.next(),"percent"==t.type?h++:"digit"==t.type?t.decimal?(a+=t.format.length,o.push(t.format)):(e.push(t.format),t.sep&&(p=!0)):"time"==t.type?s=!0:"date"==t.type?c=!0:"ampm"==t.type&&(v=s=!0);for(h>0&&(i+="value *= "+Math.pow(100,h)+"; "),l>0&&(i+="value /= "+Math.pow(1e3,l)+"; "),e.length&&(i+="var intPart = runtime.formatInt(culture, value, "+JSON.stringify(e)+", "+a+", "+p+"); "),o.length&&(i+="var decPart = runtime.formatDec(value, "+JSON.stringify(o)+", "+a+"); "),(e.length||o.length)&&(i+="type = 'number'; "),c&&(i+="var date = runtime.unpackDate(value); "),s&&(i+="var time = runtime.unpackTime(value); "),(c||s)&&(i+="type = 'date'; "),(h>0||l>0||e.length||o.length||c||s)&&(r||(r="if (typeof value == 'number') { ")),f.restart();!f.eof();)t=f.next(),"dec"==t.type?i+="output += culture.numberFormat['.']; ":"comma"!=t.type||t.hidden?"percent"==t.type?(i+="type = 'percent'; ",i+="output += culture.numberFormat.percent.symbol; "):"str"==t.type?i+="output += "+JSON.stringify(t.value)+"; ":"text"==t.type?(i+="type = 'text'; ",i+="output += value; "):"space"==t.type?(i+="if (output) result.body.push(output); ",i+="output = ''; ",i+="result.body.push({ type: 'space', value: "+JSON.stringify(t.value)+" }); "):"fill"==t.type?i+="output += runtime.fill("+JSON.stringify(t.value)+"); ":"digit"==t.type?i+="output += "+(t.decimal?"decPart":"intPart")+".shift(); ":"date"==t.type?i+="output += runtime.date(culture, date, "+JSON.stringify(t.part)+", "+t.format+"); ":"time"==t.type?i+="output += runtime.time(time, "+JSON.stringify(t.part)+", "+t.format+", "+v+", "+t.fraction+"); ":"eltime"==t.type?i+="output += runtime.eltime(value, "+JSON.stringify(t.part)+", "+t.format+", "+t.fraction+"); ":"ampm"==t.type&&(i+="output += time.hours < 12 ? "+JSON.stringify(t.am)+" : "+JSON.stringify(t.pm)+"; "):i+="output += ','; ";return i+="if (output) result.body.push(output); ",i+="result.type = type; ",i+="return result; ",r&&(i=r+i+"}"),i}function t(n){var r,t,i=f[n];return i||(r=u(n),t=r.map(c),t.push(s),t=t.join("\n"),t="'use strict'; return function(value, culture){ if (!culture) culture = kendo.culture(); var output = '', type = null, result = { body: [] }; "+t+"; return result; };",i=f[n]=Function("runtime",t)(e)),i}function n(n,t,i){for(n+="";n.length<t;)n=i+n;return n}function l(n){for(var t,u=n.body,r="",i=0;i<u.length;++i)t=u[i],"string"==typeof t?r+=t:"space"==t.type&&(r+=" ");return r}var r,i,h,o,f,s,e;kendo.support.browser.msie&&kendo.support.browser.version<9||(r=kendo.spreadsheet.calc,i=kendo.dom,h=/^\[(black|green|white|blue|magenta|yellow|cyan|red)\]/i,o=/^\[(<=|>=|<>|<|>|=)(-?[0-9.]+)\]/,f=Object.create(null),s=c({cond:"text",body:[{type:"text"}]}),e={unpackDate:r.runtime.unpackDate,unpackTime:r.runtime.unpackTime,date:function(t,i,r,u){switch(r){case"d":switch(u){case 1:return i.date;case 2:return n(i.date,2,"0");case 3:return t.calendars.standard.days.namesAbbr[i.day];case 4:return t.calendars.standard.days.names[i.day]}break;case"m":switch(u){case 1:return i.month+1;case 2:return n(i.month+1,2,"0");case 3:return t.calendars.standard.months.namesAbbr[i.month];case 4:return t.calendars.standard.months.names[i.month];case 5:return t.calendars.standard.months.names[i.month].charAt(0)}break;case"y":switch(u){case 2:return i.year%100;case 4:return i.year}}return"##"},time:function(t,i,r,u,f){var o,e;switch(i){case"h":o=n(u?t.hours%12||12:t.hours,r,"0"),f&&(e=(t.minutes+(t.seconds+t.milliseconds/1e3)/60)/60);break;case"m":o=n(t.minutes,r,"0"),f&&(e=(t.seconds+t.milliseconds/1e3)/60);break;case"s":o=n(t.seconds,r,"0"),f&&(e=t.milliseconds/1e3)}return e&&(o+=e.toFixed(f).replace(/^0+/,"")),o},eltime:function(t,i,r,u){var f,e;switch(i){case"h":f=24*t;break;case"m":f=1440*t;break;case"s":f=86400*t}return u&&(e=f-(0|f)),f=n(0|f,r,"0"),e&&(f+=e.toFixed(u).replace(/^0+/,"")),f},fill:function(n){return n},formatInt:function(n,t,i,r,u){function o(t){u&&s&&s%3==0&&/^[0-9]$/.test(t)&&(f=n.numberFormat[","]+f),f=t+f,s++}var e,a,s,f,h,v,c,l;for(t=t.toFixed(r).replace(/\..*$/,""),r>0&&("0"===t?t="":"-0"===t&&(t="-")),e=t.length-1,a=[],s=0,h=i.length;--h>=0;){for(v=i[h],f="",c=v.length;--c>=0;)l=v.charAt(c),e<0?"0"==l?o("0"):"?"==l&&o(" "):o(t.charAt(e--));if(0===h)for(;e>=0;)o(t.charAt(e--));a.unshift(f)}return a},formatDec:function(n,t,i){var s,h,c,f,o,r,u,e;for(n=n.toFixed(i),s=n.indexOf("."),n=s>=0?n.substr(s+1).replace(/0+$/,""):"",h=0,c=[],f=0;f<t.length;++f){for(o=t[f],r="",u=0;u<o.length;++u)e=o.charAt(u),h<n.length?r+=n.charAt(h++):"0"==e?r+="0":"?"==e&&(r+=" ");c.push(r)}return c}},kendo.spreadsheet.formatting={compile:t,parse:u,format:function(n,r,u){var h,s,f,o=t(r)(n,u),e=i.element("span");for(e.__dataType=o.type,h=o.body,o.color&&(e.attr.style={color:o.color}),s=0;s<h.length;++s)f=h[s],"string"==typeof f?e.children.push(i.text(f)):"space"==f.type&&e.children.push(i.element("span",{style:{visibility:"hidden"}},[i.text(f.value)]));return e},text:function(n,i,r){var u=t(i)(n,r);return l(u)},textAndColor:function(n,i,r){var u=t(i)(n,r);return{text:l(u),color:u.color,type:u.type}},type:function(n,i){return t(i)(n).type},adjustDecimals:function(n,t){var i=u(n);return v(i,t),a(i)}})},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/runtime.functions.min",["spreadsheet/runtime.min","util/main.min"],n)}(function(){"use strict";function rt(n){return(Math.exp(n)+Math.exp(-n))/2}function ft(n){return(Math.exp(n)-Math.exp(-n))/2}function pt(n){return ft(n)/rt(n)}function ti(n,t){for(;t;){var i=n%t;n=t,t=i}return n}function ui(n,t){return Math.abs(n*t)/ti(n,t)}function et(n,t){for(var u,r,e,f=[],i=0,o=n[0];i<n.length;)f.push({matrix:n[i++],pred:h(n[i++])});for(u=0;u<o.height;++u)n:for(r=0;r<o.width;++r){for(i=0;i<f.length;++i)if(e=f[i].matrix.get(u,r),!f[i].pred(null==e||""===e?0:e))continue n;t(u,r)}}function k(n){return n.reduce(function(n,t){return n+t},0)/n.length}function p(n,t,i){return null==i&&(i=k(n)),n.reduce(function(n,t){return n+Math.pow(t-i,2)},0)/t}function ri(n,t){return Math.sqrt(p(n,t))}function w(n,i,r){var e=0,o=0,u=null,f=null,s=!1;return n.forEach(function(n){n<i?(e++,u=null==u?n:Math.max(u,n)):n>i?(o++,f=null==f?n:Math.min(f,n)):s=!0}),e||o?s?r?(e+1)/(n.length+1):e/(e+o):((f-i)*w(n,u,r)+(i-u)*w(n,f,r))/(f-u):new t("N/A")}function ni(n,t,i){for(var u=0,o=k(n),e=k(t),f=n.length,r=0;r<f;++r)u+=(n[r]-o)*(t[r]-e);return u/i}function kt(n,t){var r,i,u;return n.sort(f),r=n.length,i=0|t,u=t-i,0===i?n[0]:i>=r?n[r-1]:(--i,n[i]+u*(n[i+1]-n[i]))}function dt(n,t){var i=t*(n.length-1)+1;return kt(n,i)}function wt(n,t){var i=t*(n.length+1);return kt(n,i)}function ot(n,i,r){var u=[],o=1,e=2,s=4;return function f(i){if(i instanceof y)n.getRefCells(i,!0).forEach(function(n){var f,i=n.value;if(!(r&o&&n.hidden)){if(n.formula){if(f=n.formula.print(n.row,n.col),/^\s*(?:aggregate|subtotal)\s*\(/i.test(f)&&!(r&s))return;"value"in n.formula&&(i=n.formula.value)}r&e&&i instanceof t||("number"==typeof i||i instanceof t)&&u.push(i)}});else if(Array.isArray(i))for(var h=0;h<i.length;++h)f(i[h]);else i instanceof c?i.each(f):"number"==typeof i?u.push(i):i instanceof t&&!(r&e)&&u.push(i)}(i),u}function bt(n,t,i,r){var f,u;if(r){for(f=0,u=0;u<=n;++u)f+=s(t,u)*Math.pow(i,u)*Math.pow(1-i,t-u);return f}return s(t,n)*Math.pow(i,n)*Math.pow(1-i,t-n)}function gt(n){var t=r(l(n,0,1));return 4==t.day||3==t.day&&i.isLeapYear(n)?53:52}function nt(n,t,i){var f=r(n),u=r(t);return i?(31==f.date&&(f.date=30),31==u.date&&(u.date=30)):(1==f.month&&1==u.month&&f.date==a(f.year,1)&&u.date==a(u.year,1)&&(u.date=30),f.date==a(f.year,f.month)?(f.date=30,31==u.date&&(u.date=30)):30==f.date&&31==u.date&&(u.date=30)),360*(u.year-f.year)+30*(u.month-f.month)+(u.date-f.date)}function ii(n,t){this.link=n,this.text=t}function d(n){return"number"==typeof n||"boolean"==typeof n||null==n||""===n}function f(n,t){return n===t?0:n<t?-1:1}function st(n,t){return n===t?0:n<t?1:-1}var v,o,at,i,n,u,t,b,e,it,c,y,a,l,r,vt,tt,ct,ht,lt,g,s,ut,yt,h;kendo.support.browser.msie&&kendo.support.browser.version<9||(v=kendo.util,o=kendo.spreadsheet,at=o.calc,i=at.runtime,n=i.defineFunction,u=i.defineAlias,t=i.CalcError,b=o.RangeRef,e=o.CellRef,it=o.UnionRef,c=i.Matrix,y=o.Ref,a=i.daysInMonth,l=i.packDate,r=i.unpackDate,vt=i.daysInYear,["abs","cos","sin","acos","asin","tan","atan","exp","sqrt"].forEach(function(t){n(t,Math[t]).args([["*n","number"]])}),n("ln",Math.log).args([["*n","number"]]),n("log",function(n,t){return Math.log(n)/Math.log(t)}).args([["*num","number++"],["*base",["or","number++",["null",10]]],["?",["assert","$base != 1","DIV/0"]]]),n("log10",function(n){return Math.log(n)/Math.log(10)}).args([["*num","number++"]]),n("pi",function(){return Math.PI}).args([]),n("sqrtpi",function(n){return Math.sqrt(n*Math.PI)}).args([["*num","number+"]]),n("degrees",function(n){return 180*n/Math.PI%360}).args([["*radians","number"]]),n("radians",function(n){return Math.PI*n/180}).args([["*degrees","number"]]),n("cosh",rt).args([["*num","number"]]),n("acosh",function(n){return Math.log(n+Math.sqrt(n-1)*Math.sqrt(n+1))}).args([["*num","number"],["?",["assert","$num >= 1"]]]),n("sinh",ft).args([["*num","number"]]),n("asinh",function(n){return Math.log(n+Math.sqrt(n*n+1))}).args([["*num","number"]]),n("sec",function(n){return 1/Math.cos(n)}).args([["*num","number"]]),n("sech",function(n){return 1/rt(n)}).args([["*num","number"]]),n("csc",function(n){return 1/Math.sin(n)}).args([["*num","number"]]),n("csch",function(n){return 1/ft(n)}).args([["*num","number"]]),n("atan2",function(n,t){return Math.atan(t/n)}).args([["*x","divisor"],["*y","number"]]),n("tanh",pt).args([["*num","number"]]),n("atanh",function(n){return Math.log(Math.sqrt(1-n*n)/(1-n))}).args([["*num",["and","number",["(between)",-1,1]]]]),n("cot",function(n){return 1/Math.tan(n)}).args([["*num","divisor"]]),n("coth",function(n){return 1/pt(n)}).args([["*num","divisor"]]),n("acot",function(n){return Math.PI/2-Math.atan(n)}).args([["*num","number"]]),n("acoth",function(n){return Math.log((n+1)/(n-1))/2}).args([["*num","number"],["?",["or",["assert","$num < -1"],["assert","$num > 1"]]]]),n("power",function(n,t){return Math.pow(n,t)}).args([["*a","number"],["*b","number"]]),n("mod",function(n,t){return n%t}).args([["*a","number"],["*b","divisor"]]),n("quotient",function(n,t){return Math.floor(n/t)}).args([["*a","number"],["*b","divisor"]]),n("ceiling",function(n,t){return t?t*Math.ceil(n/t):0}).args([["*number","number"],["*significance","number"],["?",["assert","$significance >= 0 || $number < 0"]]]),n("ceiling.precise",function(n,t){return t=Math.abs(t),t?t*Math.ceil(n/t):0}).args([["*number","number"],["*significance",["or","number",["null",1]]]]),u("iso.ceiling","ceiling.precise"),n("ceiling.math",function(n,t,i){return t&&n?(n<0&&(!i&&t<0||i&&t>0)&&(t=-t),t?t*Math.ceil(n/t):0):0}).args([["*number","number"],["*significance",["or","number",["null","$number < 0 ? -1 : 1"]]],["*mode",["or","logical",["null",0]]]]),n("floor",function(n,t){return t?t*Math.floor(n/t):0}).args([["*number","number"],["*significance","number"],["?",["assert","$significance >= 0 || $number < 0"]]]),n("floor.precise",function(n,t){return t=Math.abs(t),t?t*Math.floor(n/t):0}).args([["*number","number"],["*significance",["or","number",["null",1]]]]),n("floor.math",function(n,t,i){return t&&n?(n<0&&(!i&&t<0||i&&t>0)&&(t=-t),t?t*Math.floor(n/t):0):0}).args([["*number","number"],["*significance",["or","number",["null","$number < 0 ? -1 : 1"]]],["*mode",["or","logical",["null",0]]]]),n("int",Math.floor).args([["*number","number"]]),n("mround",function(n,t){return t?t*Math.round(n/t):0}).args([["*number","number"],["*multiple","number"]]),n("round",function(n,t){var i=n<0?-1:1;return i<0&&(n=-n),t=Math.pow(10,t),n*=t,n=Math.round(n),i*n/t}).args([["*number","number"],["*digits","number"]]),n("roundup",function(n,t){return t=Math.pow(10,t),n*=t,n=n<0?Math.floor(n):Math.ceil(n),n/t}).args([["*number","number"],["*digits","number"]]),n("rounddown",function(n,t){return t=Math.pow(10,t),n*=t,n=n<0?Math.ceil(n):Math.floor(n),n/t}).args([["*number","number"],["*digits","number"]]),n("even",function(n){var t=n<0?Math.floor(n):Math.ceil(n);return t%2?t+(t<0?-1:1):t}).args([["*number","number"]]),n("odd",function(n){var t=n<0?Math.floor(n):Math.ceil(n);return t%2?t:t+(t<0?-1:1)}).args([["*number","number"]]),n("sign",function(n){return n<0?-1:n>0?1:0}).args([["*number","number"]]),n("gcd",function(n){for(var i=n[0],t=1;t<n.length;++t)i=ti(i,n[t]);return i}).args([["numbers",["collect","number"]]]),n("lcm",function(n){for(var i=n[0],t=1;t<n.length;++t)i=ui(i,n[t]);return i}).args([["numbers",["collect","number"]]]),n("sum",function(n){return n.reduce(function(n,t){return n+t},0)}).args([["numbers",["collect","number"]]]),n("product",function(n){return n.reduce(function(n,t){return n*t},1)}).args([["numbers",["collect","number"]]]),n("sumproduct",function(n,t){var i=0;return n.each(function(n,r,u){var f,e;if("number"==typeof n){for(f=0;f<t.length;++f){if(e=t[f].get(r,u),"number"!=typeof e)return;n*=e}i+=n}}),i}).args([["a1","matrix"],["+",["a2",["and","matrix",["assert","$a2.width == $a1.width"],["assert","$a2.height == $a1.height"]]]]]),n("sumsq",function(n){return n.reduce(function(n,t){return n+t*t},0)}).args([["numbers",["collect","number"]]]),n("sumx2my2",function(n,t){var i=0;return n.each(function(n,r,u){var f=t.get(r,u);"number"==typeof n&&"number"==typeof f&&(i+=n*n-f*f)}),i}).args([["a","matrix"],["b",["and","matrix",["assert","$b.width == $a.width"],["assert","$b.height == $a.height"]]]]),n("sumx2py2",function(n,t){var i=0;return n.each(function(n,r,u){var f=t.get(r,u);"number"==typeof n&&"number"==typeof f&&(i+=n*n+f*f)}),i}).args([["a","matrix"],["b",["and","matrix",["assert","$b.width == $a.width"],["assert","$b.height == $a.height"]]]]),n("sumxmy2",function(n,t){var i=0;return n.each(function(n,r,u){var f=t.get(r,u);"number"==typeof n&&"number"==typeof f&&(i+=(n-f)*(n-f))}),i}).args([["a","matrix"],["b",["and","matrix",["assert","$b.width == $a.width"],["assert","$b.height == $a.height"]]]]),n("seriessum",function(n,i,r,u){var f=0;return u.each(function(u){if("number"!=typeof u)throw new t("VALUE");f+=u*Math.pow(n,i),i+=r}),f}).args([["x","number"],["y","number"],["m","number"],["a","matrix"]]),n("min",function(n){return Math.min.apply(Math,n)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","N/A"]]]),n("max",function(n){return Math.max.apply(Math,n)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","N/A"]]]),n("counta",function(n){return n.length}).args([["values",["#collect","anyvalue"]]]),n("count",function(n){return n.length}).args([["numbers",["#collect","number"]]]),n("countunique",function(n){var i=0,t=[];return n.forEach(function(n){t.indexOf(n)<0&&(i++,t.push(n))}),i}).args([["values",["#collect","anyvalue"]]]),n("countblank",function(n){function i(n){null!=n&&""!==n||t++}function r(n){for(var t,r=0;r<n.length;++r)t=n[r],t instanceof c?t.each(i,!0):i(t)}var t=0;return r(n),t}).args([["+",["args",["or","matrix","anyvalue"]]]]),n("iseven",function(n){return n%2==0}).args([["*number","number"]]),n("isodd",function(n){return n%2!=0}).args([["*number","number"]]),n("n",function(n){return"boolean"==typeof n?n?1:0:"number"==typeof n?n:0}).args([["*value","anyvalue"]]),n("na",function(){return new t("N/A")}).args([]),tt=[["m1","matrix"],["c1","anyvalue"],[["m2","matrix"],["c2","anyvalue"]]],n("countifs",function(n,t,i){var r=0;return i.unshift(n,t),et(i,function(){r++}),r}).args(tt),ct=[["range","matrix"]].concat(tt),n("sumifs",function(n,t,i,r){r.unshift(n,d,t,i);var u=0;return et(r,function(t,i){var r=n.get(t,i);r&&(u+=r)}),u}).args(ct),n("averageifs",function(n,i,r,u){u.unshift(n,d,i,r);var e=0,f=0;return et(u,function(t,i){var r=n.get(t,i);null!=r&&""!==r||(r=0),e+=r,f++}),f?e/f:new t("DIV/0")}).args(ct),n("countif",function(n,t){t=h(t);var i=0;return n.each(function(n){t(n)&&i++}),i}).args([["range","matrix"],["*criteria","anyvalue"]]),ht=[["range","matrix"],["*criteria","anyvalue"],["sumRange",["or",["and","matrix",["assert","$sumRange.width == $range.width"],["assert","$sumRange.height == $range.height"]],["null","$range"]]]],n("sumif",function(n,t,i){var r=0;return t=h(t),n.each(function(n,u,f){if(t(n)){var e=i.get(u,f);d(e)&&(r+=e||0)}}),r}).args(ht),n("averageif",function(n,i,r){var f=0,u=0;return i=h(i),n.each(function(n,t,e){if(i(n)){var o=r.get(t,e);d(o)&&(f+=o||0,u++)}}),u?f/u:new t("DIV/0")}).args(ht),function(n){n("large",function(n,t){return n.sort(st)[t]}),n("small",function(n,t){return n.sort(f)[t]})}(function(i,r){n(i,function(n,i){var u=[],f=n.each(function(n){return n instanceof t?n:void("number"==typeof n&&u.push(n))});return f?f:i>u.length?new t("NUM"):r(u,i-1)}).args([["array","matrix"],["*nth","number++"]])}),n("stdev.s",function(n){return ri(n,n.length-1)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),n("stdev.p",function(n){return ri(n,n.length)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),n("var.s",function(n){return p(n,n.length-1)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),n("var.p",function(n){return p(n,n.length)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),n("median",function(n){var t=n.length;return n.sort(f),t%2?n[t>>1]:(n[t>>1]+n[t>>2])/2}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","N/A"]]]),n("mode.sngl",function(n){var s,i,o,r,u,e;for(n.sort(f),s=null,i=0,o=1,r=null,u=0;u<n.length;++u)e=n[u],e!=s?(i=1,s=e):i++,i>o&&(o=i,r=e);return null==r?new t("N/A"):r}).args([["numbers",["collect","number"]]]),n("mode.mult",function(n){var r,u=Object.create(null),t=2,i=[];return n.forEach(function(n){var r=u[n]||0;u[n]=++r,r==t?i.push(n):r>t&&(t=r,i=[n])}),r=new c(this),i.forEach(function(n,t){r.set(t,0,n)}),r}).args([["numbers",["collect","number"]]]),n("geomean",function(n){var r=n.length,i=n.reduce(function(n,i){if(i<0)throw new t("NUM");return n*i},1);return Math.pow(i,1/r)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","NUM"]]]),n("harmean",function(n){var r=n.length,i=n.reduce(function(n,i){if(!i)throw new t("DIV/0");return n+1/i},0);return r/i}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","NUM"]]]),n("trimmean",function(n,t){var i,e,r,u=n.length;for(n.sort(f),i=Math.floor(u*t),i%2&&--i,i/=2,e=0,r=i;r<u-i;++r)e+=n[r];return e/(u-2*i)}).args([["numbers",["collect","number",1]],["percent",["and","number",["[between)",0,1]]],["?",["assert","$numbers.length > 0","NUM"]]]),n("frequency",function(n,t){function e(t){for(var r=0;i<n.length&&n[i]>u&&n[i]<=t;)++r,++i;return r}var u,i,r;return n.sort(f),t.sort(f),u=-(1/0),i=0,r=new c(this),t.forEach(function(n,t){var i=e(n);u=n,r.set(t,0,i)}),r.set(r.height,0,n.length-i),r}).args([["data",["collect","number",1]],["bins",["collect","number",1]]]),n("rank.eq",function(n,i,r){i.sort(r?f:st);var u=i.indexOf(n);return u<0?new t("N/A"):u+1}).args([["value","number"],["numbers",["collect","number"]],["order",["or","logical",["null",!1]]]]),u("rank","rank.eq"),n("rank.avg",function(n,i,r){var e,u;if(i.sort(r?f:st),e=i.indexOf(n),e<0)return new t("N/A");for(u=e;i[u]==n;++u);return(e+u+1)/2}).args([["value","number"],["numbers",["collect","number"]],["order",["or","logical",["null",!1]]]]),n("kurt",function(n){var t=n.length,i=k(n),f=p(n,t-1,i),u=Math.sqrt(f),r=n.reduce(function(n,t){return n+Math.pow((t-i)/u,4)},0);return t*(t+1)/((t-1)*(t-2)*(t-3))*r-3*Math.pow(t-1,2)/((t-2)*(t-3))}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 4","NUM"]]]),lt=[["array",["collect","number",1]],["x","number"],["significance",["or",["null",3],"integer++"]],["?",["assert","$array.length > 0","NUM"]]],n("percentrank.inc",function(n,t,i){var r=w(n,t,0);return r=r.toFixed(i+1),parseFloat(r.substr(0,r.length-1))}).args(lt),n("percentrank.exc",function(n,t,i){var r=w(n,t,1);return r=r.toFixed(i+1),parseFloat(r.substr(0,r.length-1))}).args(lt),u("percentrank","percentrank.inc"),n("covariance.p",function(n,t){return ni(n,t,n.length)}).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array1.length == $array2.length","N/A"]],["?",["assert","$array1.length > 0","DIV/0"]]]),n("covariance.s",function(n,t){return ni(n,t,n.length-1)}).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array1.length == $array2.length","N/A"]],["?",["assert","$array1.length > 1","DIV/0"]]]),u("covar","covariance.p"),g=v.memoize(function(n){for(var t=2,i=1;t<=n;++t)i*=t;return i}),n("fact",g).args([["*n","integer+"]]),n("factdouble",function(n){for(var t=2+(1&n),i=1;t<=n;t+=2)i*=t;return i}).args([["*n","integer+"]]),n("multinomial",function(n){var r=1,i=0;return n.forEach(function(n){if(n<0)throw new t("NUM");i+=n,r*=g(n)}),g(i)/r}).args([["numbers",["collect","number"]]]),s=v.memoize(function(n,t){for(var f=t+1,i=1,u=1,r=1;i<=n-t;++f,++i)u*=f,r*=i;return u/r}),n("combin",s).args([["*n","integer++"],["*k",["and","integer",["[between]",0,"$n"]]]]),n("combina",function(n,t){return s(n+t-1,n-1)}).args([["*n","integer++"],["*k",["and","integer",["[between]",1,"$n"]]]]),n("average",function(n){var t=n.reduce(function(n,t){return n+t},0);return t/n.length}).args([["numbers",["collect",["and","number",["not","boolean"]]]],["?",["assert","$numbers.length > 0","DIV/0"]]]),n("averagea",function(n){var r=0,i=0;return n.forEach(function(n){"string"!=typeof n&&(r+=n),++i}),i?r/i:new t("DIV/0")}).args([["values",["collect","anyvalue"]]]),n("percentile.inc",dt).args([["numbers",["collect","number",1]],["p",["and","number",["[between]",0,1]]]]),n("percentile.exc",wt).args([["numbers",["collect","number",1]],["p",["and","number",["(between)",0,1]]]]),n("quartile.inc",function(n,t){return dt(n,t/4)}).args([["numbers",["collect","number",1]],["quarter",["values",0,1,2,3,4]]]),n("quartile.exc",function(n,t){return wt(n,t/4)}).args([["numbers",["collect","number",1]],["quarter",["values",0,1,2,3,4]]]),u("quartile","quartile.inc"),u("percentile","percentile.inc"),ut=["AVERAGE","COUNT","COUNTA","MAX","MIN","PRODUCT","STDEV.S","STDEV.P","SUM","VAR.S","VAR.P","MEDIAN","MODE.SNGL","LARGE","SMALL","PERCENTILE.INC","QUARTILE.INC","PERCENTILE.EXC","QUARTILE.EXC"],n("aggregate",function(n,i,r,u){var f=this;f.resolveCells(u,function(){var s,o;if(i>12){if(s=ot(f,u[0],r),o=u[1],o instanceof e&&(o=f.getRefData(o)),"number"!=typeof o)return n(new t("VALUE"))}else s=ot(f,u,r);f.func(ut[i-1],n,s)})}).argsAsync([["funcId",["values",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]],["options",["or",["null",0],["values",0,1,2,3,4,5,6,7]]],["args","rest"]]),n("subtotal",function(n,t){var r,i,u=this,f=t>100;for(f&&(t-=100),r=[],i=2;i<arguments.length;++i)r.push(arguments[i]);u.resolveCells(r,function(){var i=ot(u,r,f?1:0);u.func(ut[t-1],n,i)})}).argsAsync([["funcId",["values",1,2,3,4,5,6,7,8,9,10,11,101,102,103,104,105,106,107,108,109,110,111]],["+",["ref",["or","ref","#matrix"]]]]),n("avedev",function(n){var t=n.reduce(function(n,t){return n+t},0)/n.length;return n.reduce(function(n,i){return n+Math.abs(i-t)},0)/n.length}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),n("binom.dist",bt).args([["successes","integer+"],["trials",["and","integer",["assert","$trials >= $successes"]]],["probability",["and","number",["[between]",0,1]]],["cumulative","logical"]]),u("binomdist","binom.dist"),n("binom.inv",function(n,i,r){for(var u=0;u<=n;++u)if(bt(u,n,i,!0)>=r)return u;return new t("N/A")}).args([["trials","integer+"],["probability",["and","number",["[between]",0,1]]],["alpha",["and","number",["[between]",0,1]]]]),u("critbinom","binom.inv"),n("binom.dist.range",function(n,t,i,r){for(var f=0,u=i;u<=r;++u)f+=s(n,u)*Math.pow(t,u)*Math.pow(1-t,n-u);return f}).args([["trials","integer+"],["probability",["and","number",["[between]",0,1]]],["successes_min",["and","integer",["[between]",0,"$trials"]]],["successes_max",["or",["and","integer",["[between]","$successes_min","$trials"]],["null","$successes_min"]]]]),n("negbinom.dist",function(n,t,i,r){if(r){for(var u=0;n>=0;)u+=s(n+t-1,n)*Math.pow(i,t)*Math.pow(1-i,n),n--;return u}return s(n+t-1,n)*Math.pow(i,t)*Math.pow(1-i,n)}).args([["number_f","integer+"],["number_s","integer+"],["probability_s",["and","number",["[between]",0,1]]],["cumulative","logical"]]),u("negbinomdist","negbinom.dist"),n("address",function(n,t,i,r,u){var f=new e(n-1,t-1,i-1);return u&&f.setSheet(u,!0),r?f.print(0,0):f.print()}).args([["row","integer++"],["col","integer++"],["abs",["or",["null",1],["values",1,2,3,4]]],["a1",["or",["null",!0],"logical"]],["sheet",["or","null","string"]]]),n("areas",function(n){var t=0;return function i(n){n instanceof e||n instanceof b?t++:n instanceof it&&n.refs.forEach(i)}(n),t}).args([["ref","ref"]]),n("choose",function(n,i){return n>i.length?new t("N/A"):i[n-1]}).args([["*index","integer"],["+",["value","anything"]]]),n("column",function(n){return n?n instanceof e?n.col+1:this.asMatrix(n).mapCol(function(t){return t+n.topLeft.col+1}):this.formula.col+1}).args([["ref",["or","area","null"]]]),n("columns",function(n){return n instanceof y?n.width():n.width}).args([["ref",["or","area","#matrix"]]]),n("formulatext",function(n){var i=this.getRefCells(n)[0];return i.formula?i.formula.print(i.row,i.col):new t("N/A")}).args([["ref","ref"]]),n("hlookup",function(n,i,r,u){var f=null;return i.eachCol(function(t){var r=i.get(0,t);if(u){if(r>n)return!0;f=t}else if(r===n)return f=t,!0}),null==f?new t("N/A"):i.get(r-1,f)}).args([["value","anyvalue"],["range","matrix"],["row","integer++"],["approx",["or","logical",["null",!0]]]]),n("index",function(n,i,r,u,f){var s,l,h,o=this;if(i instanceof it&&(i=i.refs[f-1]),!r&&!u||!i)return n(new t("N/A"));if(i instanceof e&&(i=i.toRangeRef()),i instanceof b){if(r&&u)return u>i.width()||r>i.height()?n(new t("REF")):(s=i.toCell(r-1,u-1),void o.resolveCells([s],function(){n(o.getRefData(s))}));if(!r)return l=i.toColumn(u-1),void o.resolveCells([l],function(){n(o.asMatrix(l))});if(!u)return h=i.toRow(r-1),void o.resolveCells([h],function(){n(o.asMatrix(h))})}else if(i instanceof c){if(i.width>1&&i.height>1){if(r&&u)return n(i.get(r-1,u-1));if(!r)return n(i.mapRow(function(n){return i.get(n,u-1)}));if(!u)return n(i.mapCol(function(n){return i.get(r-1,n)}))}if(1==i.width)return n(i.get(r-1,0));if(1==i.height)return n(i.get(0,u-1))}else n(new t("REF"))}).argsAsync([["range",["or","ref","matrix"]],["row",["or","integer+","null"]],["col",["or","integer+","null"]],["areanum",["or","integer++",["null",1]]]]),n("indirect",function(n){var i,r;try{if(i=this.formula,r=at.parseFormula(i.sheet,i.row,i.col,n),!(r.ast instanceof y))throw 1;return r.ast.absolute(i.row,i.col)}catch(u){return new t("REF")}}).args([["thing","string"]]),n("match",function(n,i,r){var f,u=1;return 0===r?f=h(n):r===-1?f=h("<="+n):1===r&&(f=h(">="+n)),i.each(function(t){return null!=t&&f(t)?(0!==r&&n!=t&&--u,!0):void u++},!0)&&u>0?u:new t("N/A")}).args([["value","anyvalue"],["range","matrix"],["type",["or",["values",-1,0,1],["null",1]]]]),n("offset",function(n,i,r,u,f){var o=(n instanceof e?n:n.topLeft).clone();return o.row+=i,o.col+=r,o.row<0||o.col<0?new t("VALUE"):u>1||f>1?new b(o,new e(o.row+u-1,o.col+f-1)).setSheet(n.sheet,n.hasSheet()):o}).args([["ref","area"],["*rows","integer"],["*cols","integer"],["*height",["or","integer++",["null","$ref.height()"]]],["*width",["or","integer++",["null","$ref.width()"]]]]),n("row",function(n){return n?n instanceof e?n.row+1:this.asMatrix(n).mapRow(function(t){return t+n.topLeft.row+1}):this.formula.row+1}).args([["ref",["or","area","null"]]]),n("rows",function(n){return n instanceof y?n.height():n.height}).args([["ref",["or","area","#matrix"]]]),n("vlookup",function(n,i,r,u){var f=null;return"number"!=typeof n&&(u=!1),"string"==typeof n&&(n=n.toLowerCase()),i.eachRow(function(t){var r=i.get(t,0);if(u){if(r>n)return!0;f=t}else if("string"==typeof r&&(r=r.toLowerCase()),r===n)return f=t,!0}),null==f?new t("N/A"):i.get(f,r-1)}).args([["value","anyvalue"],["range","matrix"],["col","integer++"],["approx",["or","logical",["null",!0]]]]),n("date",function(n,t,i){return l(n,t-1,i)}).args([["*year","integer"],["*month","integer"],["*date","integer"]]),n("day",function(n){return r(n).date}).args([["*date","date"]]),n("month",function(n){return r(n).month+1}).args([["*date","date"]]),n("year",function(n){return r(n).year}).args([["*date","date"]]),n("weekday",function(n){return r(n).day+1}).args([["*date","date"]]),n("weeknum",function(n,t){var i,f=l(r(n).year,0,1),u=r(f);return 21==t?(i=3-(u.day+6)%7,i<0&&(i+=7),f+=i,u.date+=i,u.day=4,t=1):t=1==t?0:2==t?1:(t-10)%7,i=u.day-t,i<0&&(i+=7),f-=i,Math.ceil((n+1-f)/7)}).args([["*date","date"],["*type",["or",["null",1],["values",1,2,11,12,13,14,15,16,17,21]]]]),n("isoweeknum",function(n){var i=r(n),u=i.day||7,t=Math.floor((i.ord-u+10)/7);return t<1?gt(i.year-1):53==t&&t>gt(i.year)?1:t}).args([["*date","date"]]),n("now",function(){return i.dateToSerial(new Date)}).args([]),n("today",function(){return 0|i.dateToSerial(new Date)}).args([]),n("time",function(n,t,r){return i.packTime(n,t,r,0)}).args([["*hours","integer"],["*minutes","integer"],["*seconds","integer"]]),n("hour",function(n){return i.unpackTime(n).hours}).args([["*time","datetime"]]),n("minute",function(n){return i.unpackTime(n).minutes}).args([["*time","datetime"]]),n("second",function(n){return i.unpackTime(n).seconds}).args([["*time","datetime"]]),n("edate",function(n,t){var u=r(n),i=u.month+t,f=u.year+Math.floor(i/12);return i%=12,i<0&&(i+=12),u=Math.min(u.date,a(f,i)),l(f,i,u)}).args([["*start_date","date"],["*months","integer"]]),n("eomonth",function(n,t){var u=r(n),i=u.month+t,f=u.year+Math.floor(i/12);return i%=12,i<0&&(i+=12),u=a(f,i),l(f,i,u)}).args([["*start_date","date"],["*months","integer"]]),n("workday",function(n,t,i){var u,f=t>0?1:-1;for(t=Math.abs(t),u=r(n).day;t>0;)n+=f,u=(u+f)%7,u>0&&u<6&&i.indexOf(n)<0&&--t;return n}).args([["start_date","date"],["days","integer"],["holidays",["collect","date"]]]),n("networkdays",function(n,t,i){var e,f,u;for(n>t&&(e=n,n=t,t=e),f=0,u=r(n).day;n<=t;)u>0&&u<6&&i.indexOf(n)<0&&f++,n++,u=(u+1)%7;return f}).args([["start_date","date"],["end_date","date"],["holidays",["collect","date"]]]),n("days",function(n,t){return t-n}).args([["*start_date","date"],["*end_date","date"]]),i._days_360=nt,n("days360",nt).args([["*start_date","date"],["*end_date","date"],["*method",["or","logical",["null",!1]]]]),n("yearfrac",function(n,t,i){switch(i){case 0:return nt(n,t,!1)/360;case 1:return(t-n)/vt(r(n).year);case 2:return(t-n)/360;case 3:return(t-n)/365;case 4:return nt(n,t,!0)/360}}).args([["*start_date","date"],["*end_date","date"],["*method",["or",["null",0],["values",0,1,2,3,4]]]]),n("datevalue",function(n){var r=i.parseDate(n);return r?i.dateToSerial(r):new t("VALUE")}).args([["*text","string"]]),n("timevalue",function(n){var u,e,o,f,r=n.toLowerCase().match(/(\d+):(\d+)(:(\d+)(\.(\d+))?)?\s*(am?|pm?)?/);return r?(u=parseFloat(r[1]),e=parseFloat(r[2]),o=r[3]?parseFloat(r[4]):0,f=r[7],f&&(u>12||u<1)?new t("VALUE"):(/^p/.test(f)&&(u+=12),i.packTime(u,e,o,0))):new t("VALUE")}).args([["*text","string"]]),n("mdeterm",function(n){var i=n.each(function(n){if("number"!=typeof n)return new t("VALUE")},!0);return i||n.determinant()}).args([["m",["and","matrix",["assert","$m.width == $m.height"]]]]),n("transpose",function(n){return n.transpose()}).args([["range","matrix"]]),n("mmult",function(n,t){return n.multiply(t)}).args([["a","matrix"],["b",["and","matrix",["assert","$b.height == $a.width"]]]]),n("munit",function(n){return new c(this).unit(n)}).args([["n","integer+"]]),n("minverse",function(n){var i=n.each(function(n){if("number"!=typeof n)return new t("VALUE")},!0);return i||n.inverse()||new t("VALUE")}).args([["m",["and","matrix",["assert","$m.width == $m.height"]]]]),n("rand",function(){return Math.random()}).args([]),n("randbetween",function(n,t){return n+Math.floor((t-n+1)*Math.random())}).args([["min","integer"],["max",["and","integer",["assert","$max >= $min"]]]]),n("true",function(){return!0}).args([]),n("false",function(){return!0}).args([]),n("roman",function(n){return v.arabicToRoman(n).toUpperCase()}).args([["*number","integer"]]),n("arabic",function(n){var i=v.romanToArabic(n);return null==i?new t("VALUE"):i}).args([["*roman","string"]]),n("base",function(n,t,i){for(var r=n.toString(t).toUpperCase();r.length<i;)r="0"+r;return r}).args([["*number","integer"],["*radix",["and","integer",["[between]",2,36]]],["*minLen",["or","integer+",["null",0]]]]),n("decimal",function(n,i){var u,f,r;for(n=n.toUpperCase(),u=0,f=0;f<n.length;++f){if(r=n.charCodeAt(f),r>=48&&r<=57)r-=48;else{if(!(r>=65&&r<55+i))return new t("VALUE");r-=55}u=u*i+r}return u}).args([["*text","string"],["*radix",["and","integer",["[between]",2,36]]]]),n("char",function(n){return String.fromCharCode(n)}).args([["*code","integer+"]]),yt=/[\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,n("clean",function(n){return n.replace(yt,"")}).args([["*text","string"]]),n("code",function(n){return n.charAt(0)}).args([["*text","string"]]),u("unichar","char"),u("unicode","code"),n("concatenate",function(n){for(var i="",t=0;t<n.length;++t)i+=n[t];return i}).args([["+",["*text","string"]]]),n("dollar",function(n,t){for(var i="$#,##0.DECIMALS;($#,##0.DECIMALS)",r="";t-->0;)r+="0";return i=i.replace(/DECIMALS/g,r),o.formatting.text(n,i)}).args([["*number","number"],["*decimals",["or","integer++",["null",2]]]]),n("exact",function(n,t){return n===t}).args([["*text1","string"],["*text2","string"]]),n("find",function(n,i,r){var u=i.indexOf(n,r-1);return u<0?new t("VALUE"):u+1}).args([["*substring","string"],["*string","string"],["*start",["or","integer++",["null",1]]]]),n("fixed",function(n,t,i){for(var r=i?"0.DECIMALS":"#,##0.DECIMALS",u="";t-->0;)u+="0";return r=r.replace(/DECIMALS/g,u),o.formatting.text(n,r)}).args([["*number","number"],["*decimals",["or","integer++",["null",2]]],["*noCommas",["or","boolean",["null",!1]]]]),n("left",function(n,t){return n.substr(0,t)}).args([["*text","string"],["*length",["or","integer+",["null",1]]]]),n("right",function(n,t){return n.substr(-t)}).args([["*text","string"],["*length",["or","integer+",["null",1]]]]),n("len",function(n){return n.length}).args([["*text","string"]]),n("lower",function(n){return n.toLowerCase()}).args([["*text","string"]]),n("upper",function(n){return n.toUpperCase()}).args([["*text","string"]]),n("ltrim",function(n){return n.replace(/^\s+/,"")}).args([["*text","string"]]),n("rtrim",function(n){return n.replace(/\s+$/,"")}).args([["*text","string"]]),n("trim",function(n){return n.replace(/^\s+|\s+$/,"")}).args([["*text","string"]]),n("mid",function(n,t,i){return n.substr(t-1,i)}).args([["*text","string"],["*start","integer++"],["*length","integer+"]]),n("proper",function(n){return n.toLowerCase().replace(/\b./g,function(n){return n.toUpperCase()})}).args([["*text","string"]]),n("replace",function(n,t,i,r){return n.substr(0,--t)+r+n.substr(t+i)}).args([["*text","string"],["*start","integer++"],["*length","integer+"],["*newText","string"]]),n("rept",function(n,t){for(var i="";t-->0;)i+=n;return i}).args([["*text","string"],["*number","integer+"]]),n("search",function(n,i,r){var u=i.toLowerCase().indexOf(n.toLowerCase(),r-1);return u<0?new t("VALUE"):u+1}).args([["*substring","string"],["*string","string"],["*start",["or","integer++",["null",1]]]]),n("substitute",function(n,t,i,r){function f(){n=n.substring(0,u)+i+n.substring(u+t.length)}if(t===i)return n;for(var u=-1;(u=n.indexOf(t,u+1))>=0;)if(null==r)f();else if(0==--r){f();break}return n}).args([["*text","string"],["*oldText","string"],["*newText","string"],["*nth",["or","integer++","null"]]]),n("t",function(n){return"string"==typeof n?n:""}).args([["*value","anyvalue"]]),n("text",function(n,t){return o.formatting.text(n,t)}).args([["*value","anyvalue"],["*format","string"]]),n("value",function(n){return"number"==typeof n?n:"boolean"==typeof n?+n:(n=(n+"").replace(/[$€,]/g,""),n=parseFloat(n),isNaN(n)?new t("VALUE"):n)}).args([["*value","anyvalue"]]),ii.prototype.toString=function(){return this.text},n("hyperlink",function(n,t){return new ii(n,t)}).args([["*link","string"],["*text",["or","string",["null","$link"]]]]),n("iferror",function(n,i){return n instanceof t?i:n}).args([["*value","forced!"],["*value_if_error","anyvalue!"]]),h=function(){function t(n,t){if("string"==typeof t){var i=parseFloat(t);isNaN(i)||i!=t||(t=i)}return function(i){var r=t;return"string"==typeof i&&"string"==typeof r&&(i=i.toLowerCase(),r=r.toLowerCase()),n(i,r)}}function n(n){var t,i;return"string"==typeof n&&(n=n.toLowerCase()),/^[0-9.]+%$/.test(n)?(i=n.substr(0,n.length-1),t=parseFloat(i),isNaN(t)||t!=i||(n=t/100)):/^[0-9.]+$/.test(n)&&(t=parseFloat(n),isNaN(t)||t!=n||(n=t)),n}function u(t,i){return n(t)<n(i)}function o(t,i){return n(t)<=n(i)}function f(t,i){return n(t)>n(i)}function s(t,i){return n(t)>=n(i)}function e(n,t){return!i(n,t)}function i(t,i){return i instanceof RegExp?i.test(t):("string"!=typeof t&&"string"!=typeof i||(t+="",i+=""),n(t)==n(i))}var r=Object.create(null);return function(n){var h,c;return"function"==typeof n?n:(h=/^=(.*)$/.exec(n))?t(i,h[1]):(h=/^<>(.*)$/.exec(n))?t(e,h[1]):(h=/^<=(.*)$/.exec(n))?t(o,h[1]):(h=/^<(.*)$/.exec(n))?t(u,h[1]):(h=/^>=(.*)$/.exec(n))?t(s,h[1]):(h=/^>(.*)$/.exec(n))?t(f,h[1]):/[?*]/.exec(n)?(c=r[n],c||(c=n.replace(/(~\?|~\*|[\]({\+\.\|\^\$\\})\[]|[?*])/g,function(n){switch(n){case"~?":return"\\?";case"~*":return"\\*";case"?":return".";case"*":return".*";default:return"\\"+n}}),c=r[n]=RegExp("^"+c+"$","i")),t(i,c)):t(i,n)}}())},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/runtime.functions.2.min",["spreadsheet/runtime.min"],n)}(function(){"use strict";function l(n){var f,r,u,t;if(i(n)>=3.3)return 1-ii(n);for(f=n>0?1:-1,f==-1&&(n=-n),r=0,u=1,t=1;t<100;t++)r+=u,u*=2*n*n/(2*t+1);return 2*f/Math.sqrt(Math.PI)*n*Math.exp(-n*n)*r}function ii(n){var u,t,r;if(i(n)<3.3)return 1-l(n);for(u=1,n<0&&(u=-1,n=-n),t=n,r=8;r>=1;r-=.5)t=n+r/t;return t=1/(n+t),1==u?Math.exp(-n*n)/Math.sqrt(Math.PI)*t:2-Math.exp(-n*n)/Math.sqrt(Math.PI)*t}function h(n){var t,u=[1.0000000001900149,76.180091729471457,-86.505320329416776,24.014098240830911,-1.231739572450155,.001208650973866179,-5395239384953e-18],f=n,i=n+5.5,r=u[0];for(i-=(n+.5)*Math.log(i),t=1;t<=6;t++)f+=1,r+=u[t]/f;return-i+Math.log(Math.sqrt(2*Math.PI)*r/n)}function ct(n){if(n>0)return Math.exp(h(n));var i=Math.PI,t=-n;return-i/(t*ct(t)*Math.sin(i*t))}function ft(n,t){return h(n)+h(t)-h(n+t)}function hi(n,t){return Math.exp(ft(n,t))}function rr(n,t){return t<n+1?er(n,t):1-fr(n,t)}function er(n,t){for(var r=1/n,u=r,e=n,o=h(n),f=1;f<=a&&(e++,u*=t/e,r+=u,!(i(u)<i(r)*p));f++);return r*Math.exp(-t+n*Math.log(t)-o)}function fr(n,t){for(var c,l=r,f=l,u=0,s=1,o=t+1-n,v=h(n),e=1;e<=a&&(u=o+s*u,i(u)<r&&(u=r),f=o+s/f,i(f)<r&&(f=r),u=1/u,c=f*u,l*=c,!(i(c-1)<p));e++)o+=2,s=-e*(e-n);return l*Math.exp(-t-v+n*Math.log(t))}function g(n,t,i,r){return r?rr(t,n/i):Math.pow(n/i,t-1)*Math.exp(-n/i)/(i*ct(t))}function wt(n,t,r){var s,f,u,h,e,o;if(0===n)return 0;if(1==n)return 1/0;for(s=0,f=10,u=0,h=t*r,h>1&&(f*=h),e=0;e<a&&(u=.5*(s+f),o=g(u,t,r,!0),!(i(n-o)<1e-16));e++)o>n?f=u:s=u;return u}function d(n,t){return t?.5+.5*l(n/Math.sqrt(2)):Math.exp(-n*n/2)/Math.sqrt(2*Math.PI)}function rt(n){var t,r,f=[-39.696830286653757,220.9460984245205,-275.92851044696869,138.357751867269,-30.66479806614716,2.5066282774592392],e=[-54.476098798224058,161.58583685804089,-155.69897985988661,66.80131188771972,-13.280681552885721],i=[-.0077848940024302926,-.32239645804113648,-2.4007582771618381,-2.5497325393437338,4.3746641414649678,2.9381639826987831],u=[.0077846957090414622,.32246712907003983,2.445134137142996,3.7544086619074162],o=.02425,s=1-o;return n<o?(t=Math.sqrt(-2*Math.log(n)),(((((i[0]*t+i[1])*t+i[2])*t+i[3])*t+i[4])*t+i[5])/((((u[0]*t+u[1])*t+u[2])*t+u[3])*t+1)):s<n?(t=Math.sqrt(-2*Math.log(1-n)),-(((((i[0]*t+i[1])*t+i[2])*t+i[3])*t+i[4])*t+i[5])/((((u[0]*t+u[1])*t+u[2])*t+u[3])*t+1)):(t=n-.5,r=t*t,(((((f[0]*r+f[1])*r+f[2])*r+f[3])*r+f[4])*r+f[5])*t/(((((e[0]*r+e[1])*r+e[2])*r+e[3])*r+e[4])*r+1))}function ur(n,t,i,r){return r?d((n-t)/i,!0):Math.exp(-(n-t)*(n-t)/(2*i*i))/(i*Math.sqrt(2*Math.PI))}function ri(n,t,i){return t+i*rt(n)}function ou(n,t,i){return Math.exp((t-1)*Math.log(n)+(i-1)*Math.log(1-n)-ft(t,i))}function v(n,t,i){var r=Math.exp(t*Math.log(n)+i*Math.log(1-n)-ft(t,i));return n<(t+1)/(t+i+2)?r*ei(t,i,n)/t:1-r*ei(i,t,1-n)/i}function ei(n,t,u){var o,h,s,l,c,v=n+t,y=n+1,w=n-1,e=1,f=1-v*u/y;for(i(f)<r&&(f=r),f=1/f,c=f,o=1;o<=a&&(h=2*o,s=o*(t-o)*u/((w+h)*(n+h)),f=1+s*f,i(f)<r&&(f=r),e=1+s/e,i(e)<r&&(e=r),f=1/f,c*=f*e,s=-(n+o)*(v+o)*u/((n+h)*(y+h)),f=1+s*f,i(f)<r&&(f=r),e=1+s/e,i(e)<r&&(e=r),f=1/f,l=f*e,c*=l,!(i(l-1)<p));o++);return c}function fi(n,t,r){for(var e,o=0,s=1,u=0,f=0;f<a&&(u=.5*(o+s),e=v(u,t,r),!(i(n-e)<p));f++)e>n?s=u:o=u;return u}function su(n,t,i,r,u){return v((n-r)/(u-r),t,i)}function eu(n,t,i,r,u,f){return r?v((n-u)/(f-u),t,i):ou((n-u)/(f-u),t,i)/(f-u)}function ot(n,t,i,r,u){return r+(u-r)*fi(n,t,i)}function et(n,t,i){return g(n,t/2,2,i)}function gt(n,t){return 1-et(n,t,!0)}function dt(n,t){return wt(n,t/2,2)}function uu(n,t){return dt(1-n,t)}function fu(n,t){for(var i,f,u,s,h=n.length,e=n[0].length,o=0,r=0;r<h;r++)for(i=0;i<e;i++)f=t[r][i],u=n[r][i]-f,u*=u,o+=u/f;return s=(h-1)*(e-1),gt(o,s)}function au(n,t,i){return i?1-Math.exp(-t*n):t*Math.exp(-t*n)}function vu(n,t,i){var u,r;if(i)return 1-et(2*t,2*(n+1),!0);for(u=0,r=2;r<=n;r++)u+=Math.log(r);return Math.exp(n*Math.log(t)-t-u)}function nt(n,t,i,r){if(r)return v(t*n/(i+t*n),t/2,i/2);var u=t/i;return t/=2,i/=2,u/hi(t,i)*Math.pow(u*n,t-1)/Math.pow(1+u*n,t+i)}function lu(n,t,i){return 1-nt(n,t,i,!0)}function hu(n,t,i){return i/t*(1/ot(n,i/2,t/2,0,1)-1)}function cu(n,t,i){return i/t*(1/ot(1-n,i/2,t/2,0,1)-1)}function u(n){for(var r=0,i=n.length,t=0;t<i;t++)r+=n[t];return r/i}function b(n,t){for(var r,f=0,u=n.length,i=0;i<u;i++)r=n[i]-t,f+=r*r;return f/(u-1)}function kr(n,t){var f=n.length-1,e=t.length-1,i=b(n,u(n)),r=b(t,u(t));if(!i||!r)throw new c("DIV/0");return 2*nt(i/r,f,e,!0)}function dr(n){return.5*Math.log((1+n)/(1-n))}function br(n){var t=Math.exp(2*n);return(t-1)/(t+1)}function oi(n,t,i){return i?1-.5*v(t/(n*n+t),t/2,.5):1/(Math.sqrt(t)*hi(.5,t/2))*Math.pow(1+n*n/t,-(t+1)/2)}function w(n,t){return 1-oi(n,t,!0)}function k(n,t){return n<0&&(n=-n),2*w(n,t)}function it(n,t){var i=fi(2*Math.min(n,1-n),t/2,.5);return i=Math.sqrt(t*(1-i)/i),n>.5?i:-i}function pr(n,t){return it(1-n/2,t)}function wr(n,t,r,f){var o,s,a,it,c,y,nt,p,l,tt,rt,ft,ut,v,g,d,e=n.length,h=t.length;if(1==f){for(a=0,it=0,c=0;c<e;c++)y=n[c]-t[c],a+=y,it+=y*y;return nt=a/e,o=nt/Math.sqrt((it-a*nt)/(e*(e-1))),1==r?w(o,e-1):k(o,e-1)}return p=u(n),l=u(t),tt=b(n,p),rt=b(t,l),3==f?(ft=tt/e,ut=rt/h,v=ft+ut,g=ft/v,d=ut/v,s=1/(g*g/(e-1)+d*d/(h-1)),o=i(p-l)/Math.sqrt(v),1==r?w(o,s):k(o,s)):(s=e+h-2,o=i(p-l)*Math.sqrt(s*e*h/((e+h)*((e-1)*tt+(h-1)*rt))),1==r?w(o,s):k(o,s))}function iu(n,t,i){return-it(n/2,i-1)*t/Math.sqrt(i)}function ru(n,t,i){return-rt(n/2)*t/Math.sqrt(i)}function tu(n){return d(n,!0)-.5}function gr(n){return d(n)}function nu(n,t,i,r){if(r)return.5+.5*l((Math.log(n)-t)/(i*Math.sqrt(2)));var u=Math.log(n)-t;return Math.exp(-u*u/(2*i*i))/(n*i*Math.sqrt(2*Math.PI))}function of(n,t,i){return Math.exp(ri(n,t,i))}function sf(n,t,i,r){for(var e,f,s=n.length,o=0,u=0;u<s;u++){if(t[u]<=0||t[u]>1)throw new c("NUM");o+=t[u]}if(1!=o)throw new c("NUM");for(e=0,u=0;u<s;u++)f=n[u],f>=i&&f<=r&&(e+=t[u]);return e}function ef(n,t){for(var r,h=u(t),s=u(n),e=0,f=0,i=0,o=n.length;i<o;i++)r=t[i]-h,e+=r*(n[i]-s),f+=r*r;return e/f}function uf(n,t){for(var r,h=u(t),o=u(n),f=0,e=0,i=0,s=n.length;i<s;i++)r=t[i]-h,f+=r*(n[i]-o),e+=r*r;return o-f*h/e}function kt(n,t){for(var f,r,l=u(n),c=u(t),e=0,o=0,s=0,i=0,h=n.length;i<h;i++)f=n[i]-l,r=t[i]-c,e+=f*r,o+=f*f,s+=r*r;return e/Math.sqrt(o*s)}function ff(n,t){var i=kt(n,t);return i*i}function af(n,t){for(var f,r,h=t.length,l=u(t),c=u(n),o=0,e=0,s=0,i=0;i<h;i++)f=t[i]-l,r=n[i]-c,o+=r*r,e+=f*r,s+=f*f;return Math.sqrt((o-e*e/s)/(h-2))}function vf(n,t,i){for(var f,l,e,v,y=u(i),s=u(t),h=0,o=0,r=0,a=i.length;r<a;r++)f=i[r]-y,l=t[r]-s,h+=f*l,o+=f*f;if(0===o)throw new c("N/A");return e=h/o,v=s-e*y,v+e*n}function at(n){for(var r=n.height,i=0,t=0;t<r;t++)i+=n.data[t][0];return i/r}function ui(n,t){for(var r,f=n.height,u=0,i=0;i<f;i++)r=n.data[i][0]-t,u+=r*r;return u}function vt(n,t,i,r){var h,a,s,l,b,g,o,d,f,k,c,e,tt,v,nt,w,p,y,u=0;for(t||(t=n.map(function(){return++u})),i&&(t=t.clone(),t.eachRow(function(n){t.data[n].unshift(1)}),++t.width),h=t.transpose(),a=h.multiply(t).inverse().multiply(h).multiply(n),s=[],u=a.height-1;u>=0;u--)s.push(a.data[u][0]);if(i||s.push(0),!r)return this.asMatrix([s]);for(l=t.multiply(a),b=n.adds(l,!0),g=i?at(l):0,o=ui(l,g),d=i?at(b):0,f=ui(b,d),k=[],k.push(o,f),c=o/(o+f),e=n.height-t.width,tt=Math.sqrt(f/e),v=[],v.push(c,tt),nt=i?o/(t.width-1)/(f/e):c/t.width/((1-c)/e),w=[],w.push(nt,e),p=h.multiply(t).inverse(),y=[],u=p.height-1;u>=0;u--)y.push(Math.sqrt(p.data[u][u]*f/e));return this.asMatrix([s,y,v,w,k])}function lf(n,t,i,r){return vt.call(this,n.map(Math.log),t,i,r).map(Math.exp)}function si(n,t,i,r){var u,f,e=0;return t||(t=n.map(function(){return++e})),r&&(t=t.clone(),t.eachRow(function(n){t.data[n].unshift(1)}),++t.width),u=t.transpose(),f=u.multiply(t).inverse().multiply(u).multiply(n),i?r&&(i=i.clone(),i.eachRow(function(n){i.data[n].unshift(1)}),++i.width):i=t,i.multiply(f)}function hf(n,t,i,r){return si.call(this,n.map(Math.log),t,i,r).map(Math.exp)}function st(n,t,i,r){for(var o,s,h,u,l=i||20,a=r||1e-7,f=t,e=1;e<=l;e++)if(o=n(f),s=o[0],h=o[1],u=s/h,f-=u,Math.abs(u)<a)return f;return new c("NUM")}function bt(n,t,i,r,u){var f=Math.pow(1+n,t),e=n?(f-1)/n:t;return-(r*f+i*e*(1+n*u))}function cf(n,t,i,r,u){if(!n)return-r-i*t;var f=Math.pow(1+n,t);return-(r+i*(f-1)/n*(1+n*u))/f}function ht(n,t,i,r,u){if(!n)return-(r+i)/t;var f=Math.pow(1+n,t);return-n*(r+i*f)/((1+n*u)*(f-1))}function bu(n,t,i,r,u){if(!n)return-(r+i)/t;var f=t*(1+n*u);return Math.log((f-r*n)/(f+i*n))/Math.log(1+n)}function ku(n,t,i,r,u,f){function e(f){var o=Math.pow(1+f,n-1),e=o*(1+f);return[i*e+t*(1/f+u)*(e-1)+r,n*i*o+t*(-(e-1)/(f*f)+(1/f+u)*n*o)]}return st(e,f)}function tt(n,t,i,r,u,f){var o,e;return 1==f&&1==t?0:(o=ht(n,i,r,u,f),e=bt(n,t-1,o,r,f)*n,f?e/(1+n):e)}function wu(n,t,i,r,u,f){var e=ht(n,i,r,u,f);return e-tt(n,t,i,r,u,f)}function yu(n,t,i,r,u,f){var s,h,e,o,l,c;return 1==f&&(r--,u--),s=Math.pow(1+n,t),h=Math.pow(1+n,r-1),e=Math.pow(1+n,u),o=n*i*s/(s-1),l=h*i-(h-1)/n*o,c=e*i-(e-1)/n*o,c-l}function pu(n,t,i,r,u,f){for(var o=0,e=r;e<=u;e++)o+=tt(n,e,t,i,0,f);return o}function tf(n,t){for(var r=0,i=0,u=t.length;i<u;i++)r+=t[i]*Math.pow(1+n,-i-1);return r}function rf(n,t){function i(t){for(var u=0,r=0,i=0,f=n.length;i<f;i++)u+=n[i]*Math.pow(1+t,-i-1),r+=-i*n[i]*Math.pow(1+t,-i-2);return[u,r]}return st(i,t)}function nf(n,t){return Math.pow(1+n/t,t)-1}function du(n,t){return t*(Math.pow(n+1,1/t)-1)}function gu(n,t,i){for(var u=0,r=0,f=t.length;r<f;r++)u+=t[r]*Math.pow(1+n,(i[0]-i[r])/365);return u}function li(n,t,i){function r(i){for(var u,e=n[0],f=0,r=1,o=n.length;r<o;r++)u=(t[0]-t[r])/365,e+=n[r]*Math.pow(1+i,u),f+=u*n[r]*Math.pow(1+i,u-1);return[e,f]}return st(r,i)}function ki(n,t,i,r){var u=-r*n;return u*(1-t/i)}function yi(n,t,i,r,u){var e,o,f=1-Math.pow(t/n,1/i);if(f=Math.floor(1e3*f+.5)/1e3,e=n*f*u/12,1==r)return e;for(o=1;o<i;o++){if(o==r-1)return(n-e)*f;e+=(n-e)*f}return(n-e)*f*(12-u)/12}function ai(n,t,i,r,u){var o=u/i,e=-n*(Math.pow(1-o,r-1)-1),f=(n-e)*o;return f=Math.min(f,Math.max(0,n-e-t))}function bi(n,t,i){return(n-t)/i}function pi(n,t,i,r){return(n-t)*(i-r+1)*2/(i*(i+1))}function wi(n,t,i,r,u,f,e){function p(n,i){var f,u,r;return u=1==h?1==i?n:0:n*Math.pow(1-h,i-1),r=n*Math.pow(1-h,i),f=r<t?u-t:u-r,f<0?0:f}function y(n,i,r){for(var f,o,l=n-t,s=Math.ceil(r),e=0,c=0,h=!1,u=1;u<=s;u++)h?f=e:(o=p(n,u),e=l/(i-u+1),e>o?(f=e,h=!0):(f=o,l-=o)),u==s&&(f*=r+1-s),c+=f;return c}var o,s,a,w,h=f>=i?1:f/i,l=Math.floor(r),c=Math.ceil(u),v=0;if(e)for(o=l+1;o<=c;o++)s=p(n,o),o==l+1?s*=Math.min(u,l+1)-r:o==c&&(s*=u+1-c),v+=s;else a=i,r!=Math.floor(r)&&f>1&&r>=i/2&&(w=r-i/2,r=i/2,u-=w,a+=1),n-=y(n,a,r),v=y(n,i-r,u-r);return v}function ut(n,t){var r=f(n),i=r.month+t,u=r.year+Math.floor(i/12);return i%=12,i<0&&(i+=12),r=Math.min(r.date,ni(u,i)),ci(u,i,r)}function t(n,t,i){return 1==i||2==i||3==i?t-n:ti(n,t,i)}function e(n,t,i){var e,o,u,s=f(n),h=f(t),r=h.year-s.year;r>0&&(r=(r-1)*i),u=12/i;do r++,e=ut(t,-r*u);while(n<e);return r--,o=ut(t,-r*u),[e,o]}function di(n,t,i){var u,e,o,s=f(t),h=f(n),r=s.year-h.year;for(r>0&&(r=(r-1)*i),u=n,o=12/i;t>u;)e=u,r++,u=ut(n,r*o);return[e,u]}function vi(n,i,r,u){var f=e(n,i,r)[0];return t(f,n,u)}function hr(n,i,r,u){if(1==u){var f=e(n,i,r);return t(f[0],f[1],1)}return 3==u?365/r:360/r}function cr(n,i,r,u){var f=e(n,i,r)[1];return t(n,f,u)}function or(n,t,i){return e(n,t,i)[0]}function sr(n,t,i){return e(n,t,i)[1]}function vr(n,t,i){var u=f(n),r=f(t),e=12*(r.year-u.year)+r.month-u.month;return 1+(e*i/12|0)}function pt(n,t){return 3==t?365:1==t?y(n)?366:365:360}function yr(n,i,r,u,e){var o=pt(f(i).year,e);return r*u*t(n,i,e)/o}function lr(n,i,r,u,f,o,s,h){function b(n,t){return(t-n)*o/d|0}var c,l,a,k,p,v,w=0,y=f*u/o,d=s%2==0?360:365;return r<=i?(c=e(r,i,o),l=c[0],a=c[1],l<=n?y*t(n,r,s)/t(l,a,s):(c=e(n,l,o),k=c[0],p=c[1],v=b(p,r),y*(v+t(n,p,s)/t(k,p,s)+(r<a?t(l,r,s)/t(l,a,s):0)))):(c=di(i,r,o),l=c[0],a=c[1],v=b(i,r),w=a==r?y*v:y*(v+t(l,r,s)/t(l,a,s)),h?(c=e(n,i,o),l=c[0],a=c[1],v=b(n,i),w+=y*(v+t(n,a,s)/t(l,a,s))):w)}function ar(n,i,r,u,e){var o=e%2==0?360:y(f(n).year)?366:365;return(u-r)/u*o/t(n,i,e)}function tr(n,i,r,u,e){var o=e%2==0?360:y(f(n).year)?366:365;return(u-r)/r*o/t(n,i,e)}function ir(n,i,r,u,e){var o=e%2==0?360:y(f(n).year)?366:365;return r/(1-u*t(n,i,e)/o)}function gi(n,i,r,u,f,o,s){var l=1+((i-n)*o/(s%2==0?360:365)|0),p=e(n,i,o),y=p[0],b=p[1],w=t(y,n,s),k=t(n,b,s),a=t(y,b,s),c=100*r/o,h=u/o,v=k/a;return 1==l?(f+c)/(1+v*h)-w/a*c:f/Math.pow(1+h,l-1+v)+c*Math.pow(1+h,1-l-v)*(Math.pow(1+h,l)-1)/h-w/a*c}function nr(n,i,r,u,e){var s=t(n,i,e),o=pt(f(i).year,e);return u-r*u*s/o}var yt,lt,o,n,c,ci,f,y,ni,ti,s,a,p,r,i;kendo.support.browser.msie&&kendo.support.browser.version<9||(yt=kendo.spreadsheet,lt=yt.calc,o=lt.runtime,n=o.defineFunction,c=o.CalcError,ci=o.packDate,f=o.unpackDate,y=o.isLeapYear,ni=o.daysInMonth,ti=o._days_360,n("ERF",function(n,t){return null==t?l(n):l(t)-l(n)}).args([["lower_limit","number"],["upper_limit",["or","number","null"]]]),n("ERFC",ii).args([["x","number"]]),n("GAMMALN",h).args([["x","number++"]]),n("GAMMA",ct).args([["x","number"]]),n("GAMMA.DIST",g).args([["x","number+"],["alpha","number++"],["beta","number++"],["cumulative","logical"]]),n("GAMMA.INV",wt).args([["p",["and","number",["[between]",0,1]]],["alpha","number++"],["beta","number++"]]),n("NORM.S.DIST",d).args([["z","number"],["cumulative","logical"]]),n("NORM.S.INV",rt).args([["p",["and","number",["[between]",0,1]]]]),n("NORM.DIST",ur).args([["x","number"],["mean","number"],["stddev","number++"],["cumulative","logical"]]),n("NORM.INV",ri).args([["p",["and","number",["[between]",0,1]]],["mean","number"],["stddev","number++"]]),n("BETADIST",su).args([["x","number"],["alpha","number++"],["beta","number++"],["A",["or","number",["null",0]]],["B",["or","number",["null",1]]],["?",["assert","$x >= $A","NUM"]],["?",["assert","$x <= $B","NUM"]],["?",["assert","$A < $B","NUM"]]]),n("BETA.DIST",eu).args([["x","number"],["alpha","number++"],["beta","number++"],["cumulative","logical"],["A",["or","number",["null",0]]],["B",["or","number",["null",1]]],["?",["assert","$x >= $A","NUM"]],["?",["assert","$x <= $B","NUM"]],["?",["assert","$A < $B","NUM"]]]),n("BETA.INV",ot).args([["p",["and","number",["[between]",0,1]]],["alpha","number++"],["beta","number++"],["A",["or","number",["null",0]]],["B",["or","number",["null",1]]]]),n("CHISQ.DIST",et).args([["x","number+"],["deg_freedom","integer++"],["cumulative","logical"]]),n("CHISQ.DIST.RT",gt).args([["x","number+"],["deg_freedom","integer++"]]),n("CHISQ.INV",dt).args([["p",["and","number",["[between]",0,1]]],["deg_freedom","integer++"]]),n("CHISQ.INV.RT",uu).args([["p",["and","number",["[between]",0,1]]],["deg_freedom","integer++"]]),n("CHISQ.TEST",function(n,t){return fu(n.data,t.data)}).args([["actual_range","matrix"],["expected_range","matrix"],["?",["assert","$actual_range.width == $expected_range.width"]],["?",["assert","$actual_range.height == $expected_range.height"]]]),n("EXPON.DIST",au).args([["x","number+"],["lambda","number++"],["cumulative","logical"]]),n("POISSON.DIST",vu).args([["x","integer+"],["mean","number+"],["cumulative","logical"]]),n("F.DIST",nt).args([["x","number+"],["deg_freedom1","integer++"],["deg_freedom2","integer++"],["cumulative","logical"]]),n("F.DIST.RT",lu).args([["x","number+"],["deg_freedom1","integer++"],["deg_freedom2","integer++"]]),n("F.INV",cu).args([["p",["and","number",["[between]",0,1]]],["deg_freedom1","integer++"],["deg_freedom2","integer++"]]),n("F.INV.RT",hu).args([["p",["and","number",["[between]",0,1]]],["deg_freedom1","integer++"],["deg_freedom2","integer++"]]),n("F.TEST",kr).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array1.length >= 2","DIV/0"]],["?",["assert","$array2.length >= 2","DIV/0"]]]),n("FISHER",dr).args([["x",["and","number",["(between)",-1,1]]]]),n("FISHERINV",br).args([["y","number"]]),n("T.DIST",oi).args([["x","number"],["deg_freedom","integer++"],["cumulative","logical"]]),n("T.DIST.RT",w).args([["x","number"],["deg_freedom","integer++"]]),n("T.DIST.2T",k).args([["x","number+"],["deg_freedom","integer++"]]),n("T.INV",it).args([["p",["and","number",["(between]",0,1]]],["deg_freedom","integer++"]]),n("T.INV.2T",pr).args([["p",["and","number",["(between]",0,1]]],["deg_freedom","integer++"]]),n("T.TEST",wr).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["tails",["and","integer",["values",1,2]]],["type",["and","integer",["values",1,2,3]]],["?",["assert","$type != 1 || $array1.length == $array2.length","N/A"]],["?",["assert","$array1.length >= 2","DIV/0"]],["?",["assert","$array2.length >= 2","DIV/0"]]]),n("CONFIDENCE.T",iu).args([["alpha",["and","number",["(between)",0,1]]],["standard_dev","number++"],["size",["and","integer++",["assert","$size != 1","DIV/0"]]]]),n("CONFIDENCE.NORM",ru).args([["alpha",["and","number",["(between)",0,1]]],["standard_dev","number++"],["size",["and","integer++"]]]),n("GAUSS",tu).args([["z","number"]]),n("PHI",gr).args([["x","number"]]),n("LOGNORM.DIST",nu).args([["x","number++"],["mean","number"],["standard_dev","number++"],["cumulative","logical"]]),n("LOGNORM.INV",of).args([["probability",["and","number",["(between)",0,1]]],["mean","number"],["standard_dev","number++"]]),n("PROB",sf).args([["x_range",["collect","number",1]],["prob_range",["collect","number",1]],["lower_limit","number"],["upper_limit",["or","number",["null","$lower_limit"]]],["?",["assert","$prob_range.length == $x_range.length","N/A"]]]),n("SLOPE",ef).args([["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length > 0 && $known_y.length > 0","N/A"]]]),n("INTERCEPT",uf).args([["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length > 0 && $known_y.length > 0","N/A"]]]),n("PEARSON",kt).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array2.length == $array1.length","N/A"]],["?",["assert","$array2.length > 0 && $array1.length > 0","N/A"]]]),n("RSQ",ff).args([["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length > 0 && $known_y.length > 0","N/A"]],["?",["assert","$known_x.length != 1 && $known_y.length != 1","N/A"]]]),n("STEYX",af).args([["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length >= 3 && $known_y.length >= 3","DIV/0"]]]),n("FORECAST",vf).args([["x","number"],["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length > 0 && $known_y.length > 0","N/A"]]]),n("LINEST",vt).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]],["stats",["or","logical",["null",!1]]]]),n("LOGEST",lf).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]],["stats",["or","logical",["null",!1]]]]),n("TREND",si).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["new_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]]]),n("GROWTH",hf).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["new_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]]]),n("FV",bt).args([["rate","number"],["nper","number"],["pmt",["or","number",["null",0]]],["pv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["?",["assert","$pmt || $pv"]]]),n("PV",cf).args([["rate","number"],["nper","number"],["pmt",["or","number",["null",0]]],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["?",["assert","$pmt || $fv"]]]),n("PMT",ht).args([["rate","number"],["nper","number"],["pmt","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]]]),n("NPER",bu).args([["rate","number"],["pmt","number"],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]]]),n("RATE",ku).args([["nper","number"],["pmt",["or","number",["null",0]]],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["guess",["or","number++",["null",.01]]],["?",["assert","$pmt || $fv"]]]),n("IPMT",tt).args([["rate","number"],["per","number++"],["nper","number++"],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["?",["assert","$per >= 1 && $per <= $nper"]]]),n("PPMT",wu).args([["rate","number"],["per","number++"],["nper","number++"],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["?",["assert","$per >= 1 && $per <= $nper"]]]),n("CUMPRINC",yu).args([["rate","number++"],["nper","number++"],["pv","number++"],["start_period","number++"],["end_period","number++"],["type",["or",["values",0,1],["null",0]]],["?",["assert","$end_period >= $start_period","NUM"]]]),n("CUMIPMT",pu).args([["rate","number++"],["nper","number++"],["pv","number++"],["start_period","number++"],["end_period","number++"],["type",["or",["values",0,1],["null",0]]],["?",["assert","$end_period >= $start_period","NUM"]]]),n("NPV",tf).args([["rate","number"],["values",["collect","number"]],["?",["assert","$values.length > 0","N/A"]]]),n("IRR",rf).args([["values",["collect","number",1]],["guess",["or","number",["null",.1]]]]),n("EFFECT",nf).args([["nominal_rate","number++"],["npery","integer++"]]),n("NOMINAL",du).args([["effect_rate","number++"],["npery","integer++"]]),n("XNPV",gu).args([["rate","number"],["values",["collect","number",1]],["dates",["collect","date",1]],["?",["assert","$values.length == $dates.length","NUM"]]]),n("XIRR",li).args([["values",["collect","number",1]],["dates",["collect","date",1]],["guess",["or","number",["null",.1]]],["?",["assert","$values.length == $dates.length","NUM"]]]),n("ISPMT",ki).args([["rate","number"],["per","number++"],["nper","number++"],["pv","number"],["?",["assert","$per >= 1 && $per <= $nper"]]]),n("DB",yi).args([["cost","number"],["salvage","number"],["life","number++"],["period","number++"],["month",["or","number",["null",12]]]]),n("DDB",ai).args([["cost","number"],["salvage","number"],["life","number++"],["period","number++"],["factor",["or","number",["null",2]]]]),n("SLN",bi).args([["cost","number"],["salvage","number"],["life","number++"]]),n("SYD",pi).args([["cost","number"],["salvage","number"],["life","number++"],["per","number++"]]),n("VDB",wi).args([["cost","number+"],["salvage","number+"],["life","number++"],["start_period","number+"],["end_period","number+"],["factor",["or","number+",["null",2]]],["no_switch",["or","logical",["null",!1]]],["?",["assert","$end_period >= $start_period","NUM"]]]),s=[["settlement","date"],["maturity","date"],["frequency",["and","integer",["values",1,2,4]]],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]],n("COUPDAYBS",vi).args(s),n("COUPDAYS",hr).args(s),n("COUPDAYSNC",cr).args(s),n("COUPPCD",or).args(s),n("COUPNCD",sr).args(s),n("COUPNUM",vr).args(s),n("ACCRINTM",yr).args([["issue","date"],["settlement","date"],["rate","number++"],["par",["or",["null",1e3],"number++"]],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$issue < $settlement","NUM"]]]),n("ACCRINT",lr).args([["issue","date"],["first_interest","date"],["settlement","date"],["rate","number++"],["par",["or",["null",1e3],"number++"]],["frequency",["and","integer",["values",1,2,4]]],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["calc_method",["or","logical",["null",!0]]],["?",["assert","$issue < $settlement","NUM"]]]),n("DISC",ar).args([["settlement","date"],["maturity","date"],["pr","number++"],["redemption","number++"],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),n("INTRATE",tr).args([["settlement","date"],["maturity","date"],["investment","number++"],["redemption","number++"],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),n("RECEIVED",ir).args([["settlement","date"],["maturity","date"],["investment","number++"],["discount","number++"],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),n("PRICE",gi).args([["settlement","date"],["maturity","date"],["rate","number++"],["yld","number++"],["redemption","number++"],["frequency",["and","integer",["values",1,2,4]]],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),n("PRICEDISC",nr).args([["settlement","date"],["maturity","date"],["discount","number++"],["redemption","number++"],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),a=300,p=22204e-20,r=1e-30,i=Math.abs)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/borderpalette.min",["kendo.core.min","kendo.colorpicker.min","kendo.popup.min"],n)}(function(){!function(n){function u(n){return function(t){return t.preventDefault(),n.apply(this,arguments)}}var t,e,i,r,f;n.support.browser.msie&&n.support.browser.version<9||(t=n.jQuery,e=["allBorders","insideBorders","insideHorizontalBorders","insideVerticalBorders","outsideBorders","leftBorder","topBorder","rightBorder","bottomBorder","noBorders"],i=n.spreadsheet.messages.borderPalette={allBorders:"All borders",insideBorders:"Inside borders",insideHorizontalBorders:"Inside horizontal borders",insideVerticalBorders:"Inside vertical borders",outsideBorders:"Outside borders",leftBorder:"Left border",topBorder:"Top border",rightBorder:"Right border",bottomBorder:"Bottom border",noBorders:"No border",reset:"Reset color",customColor:"Custom color...",apply:"Apply",cancel:"Cancel"},r=n.ui.Widget.extend({init:function(t,i){n.ui.Widget.call(this,t,i),this.element=t,this.color=i.color,this._resetButton(),this._colorPalette(),this._customColorPalette(),this._customColorButton(),this.resetButton.on("click",u(this.resetColor.bind(this))),this.customColorButton.on("click",u(this.customColor.bind(this)))},options:{name:"ColorChooser"},events:["change"],destroy:function(){n.unbind(this.dialog.element.find(".k-action-buttons")),this.dialog.destroy(),this.colorPalette.destroy(),this.resetButton.off("click"),this.customColorButton.off("click")},value:function(n){return void 0===n?this.color:(this.color=n,this.customColorButton.find(".k-icon").css("background-color",this.color),this.colorPalette.value(null),this.flatColorPicker.value(this.color),void 0)},_change:function(n){this.color=n,this.trigger("change",{value:n})},_colorPalette:function(){var i=t("<div />",{"class":"k-spreadsheet-color-palette"}),n=this.colorPalette=t("<div />").kendoColorPalette({palette:["#ffffff","#000000","#d6ecff","#4e5b6f","#7fd13b","#ea157a","#feb80a","#00addc","#738ac8","#1ab39f","#f2f2f2","#7f7f7f","#a7d6ff","#d9dde4","#e5f5d7","#fad0e4","#fef0cd","#c5f2ff","#e2e7f4","#c9f7f1","#d8d8d8","#595959","#60b5ff","#b3bcca","#cbecb0","#f6a1c9","#fee29c","#8be6ff","#c7d0e9","#94efe3","#bfbfbf","#3f3f3f","#007dea","#8d9baf","#b2e389","#f272af","#fed46b","#51d9ff","#aab8de","#5fe7d5","#a5a5a5","#262626","#003e75","#3a4453","#5ea226","#af0f5b","#c58c00","#0081a5","#425ea9","#138677","#7f7f7f","#0c0c0c","#00192e","#272d37","#3f6c19","#750a3d","#835d00","#00566e","#2c3f71","#0c594f"],value:this.color,change:function(n){this.customColorButton.find(".k-icon").css("background-color","transparent"),this.flatColorPicker.value(null),this._change(n.value)}.bind(this)}).data("kendoColorPalette");i.append(n.wrapper).appendTo(this.element)},_customColorPalette:function(){var u,f,e=t("<div />",{"class":"k-spreadsheet-window",html:"<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>"+i.apply+"</button><button class='k-button' data-bind='click: close'>"+i.cancel+"</button></div>"}),r=this.dialog=e.appendTo(document.body).kendoWindow({animation:!1,scrollable:!1,resizable:!1,maximizable:!1,modal:!0,visible:!1,width:268,open:function(){this.center()}}).data("kendoWindow");r.one("activate",function(){this.element.find("[data-role=flatcolorpicker]").data("kendoFlatColorPicker")._hueSlider.resize()}),u=this.flatColorPicker=r.element.children().first().kendoFlatColorPicker().data("kendoFlatColorPicker"),f=n.observable({apply:function(){this.customColorButton.find(".k-icon").css("background-color",u.value()),this.colorPalette.value(null),this._change(u.value()),r.close()}.bind(this),close:function(){u.value(null),r.close()}}),n.bind(r.element.find(".k-action-buttons"),f)},_resetButton:function(){this.resetButton=t("<a class='k-button k-reset-color' href='#'><span class='k-icon k-i-reset-color'></span>"+i.reset+"</a>").appendTo(this.element)},_customColorButton:function(){this.customColorButton=t("<a class='k-button k-custom-color' href='#'><span class='k-icon'></span>"+i.customColor+"</a>").appendTo(this.element)},resetColor:function(){this.colorPalette.value(null),this.flatColorPicker.value(null),this._change(null)},customColor:function(){this.dialog.open()}}),f=n.ui.Widget.extend({init:function(t,i){n.ui.Widget.call(this,t,i),this.element=t,this.color="#000",this.element.addClass("k-spreadsheet-border-palette"),this._borderTypePalette(),this._borderColorPalette(),this.element.on("click",".k-spreadsheet-border-type-palette .k-button",u(this._click.bind(this)))},options:{name:"BorderPalette"},events:["change"],destroy:function(){this.colorChooser.destroy(),this.element.off("click")},_borderTypePalette:function(){var r=i,f=e.map(function(t){return'<a title="'+r[t]+'" aria-label="'+r[t]+'" href="#" data-border-type="'+t+'" class="k-button k-button-icon"><span class="k-icon k-i-'+n.toHyphens(t)+'"></span></a>'}).join(""),u=t("<div />",{"class":"k-spreadsheet-border-type-palette",html:f});u.appendTo(this.element)},_borderColorPalette:function(){var n=t("<div />",{"class":"k-spreadsheet-border-color-palette"});n.appendTo(this.element),this.colorChooser=new r(n,{color:this.color,change:this._colorChange.bind(this)})},_click:function(n){this.type=t(n.currentTarget).data("borderType"),this.trigger("change",{type:this.type,color:this.color})},_colorChange:function(n){this.color=n.value,this.type&&this.trigger("change",{type:this.type,color:this.color})}}),n.spreadsheet.ColorChooser=r,n.spreadsheet.BorderPalette=f)}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/toolbar.min",["kendo.toolbar.min","kendo.colorpicker.min","kendo.combobox.min","kendo.dropdownlist.min","kendo.popup.min","spreadsheet/borderpalette.min"],n)}(function(){!function(n){var i,h,t,ft,c,v,e,r,u,ot,st,a,s,et,ut,l,o,ht,vt,f,yt,at,ct,lt,w,b,k,y,p,tt,it,d,g,nt,rt;n.support.browser.msie&&n.support.browser.version<9||(i=n.jQuery,h=n.ui.ToolBar,t=n.spreadsheet.messages.toolbar={addColumnLeft:"Add column left",addColumnRight:"Add column right",addRowAbove:"Add row above",addRowBelow:"Add row below",alignment:"Alignment",alignmentButtons:{justtifyLeft:"Align left",justifyCenter:"Center",justifyRight:"Align right",justifyFull:"Justify",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom"},backgroundColor:"Background",bold:"Bold",borders:"Borders",colorPicker:{reset:"Reset color",customColor:"Custom color..."},copy:"Copy",cut:"Cut",deleteColumn:"Delete column",deleteRow:"Delete row",filter:"Filter",fontFamily:"Font",fontSize:"Font size",format:"Custom format...",formatTypes:{automatic:"Automatic",number:"Number",percent:"Percent",financial:"Financial",currency:"Currency",date:"Date",time:"Time",dateTime:"Date time",duration:"Duration",moreFormats:"More formats..."},formatDecreaseDecimal:"Decrease decimal",formatIncreaseDecimal:"Increase decimal",freeze:"Freeze panes",freezeButtons:{freezePanes:"Freeze panes",freezeRows:"Freeze rows",freezeColumns:"Freeze columns",unfreeze:"Unfreeze panes"},italic:"Italic",merge:"Merge cells",mergeButtons:{mergeCells:"Merge all",mergeHorizontally:"Merge horizontally",mergeVertically:"Merge vertically",unmerge:"Unmerge"},open:"Open...",paste:"Paste",quickAccess:{redo:"Redo",undo:"Undo"},exportAs:"Export...",toggleGridlines:"Toggle gridlines",sort:"Sort",sortAsc:"Sort ascending",sortDesc:"Sort descending",sortButtons:{sortSheetAsc:"Sort sheet A to Z",sortSheetDesc:"Sort sheet Z to A",sortRangeAsc:"Sort range A to Z",sortRangeDesc:"Sort range Z to A"},textColor:"Text Color",textWrap:"Wrap text",underline:"Underline",validation:"Data validation...",hyperlink:"Link"},ft={home:["open","exportAs",["cut","copy","paste"],["bold","italic","underline"],"hyperlink","backgroundColor","textColor","borders","fontSize","fontFamily","alignment","textWrap",["formatDecreaseDecimal","formatIncreaseDecimal"],"format","merge","freeze","filter","toggleGridlines"],insert:[["addColumnLeft","addColumnRight","addRowBelow","addRowAbove"],["deleteColumn","deleteRow"]],data:["sort","filter","validation"]},c={open:{type:"open",overflow:"never",iconClass:"file-excel"},exportAs:{type:"exportAsDialog",dialogName:"exportAs",overflow:"never",text:"",iconClass:"file-excel"},bold:{type:"button",command:"PropertyChangeCommand",property:"bold",value:!0,iconClass:"bold",togglable:!0},italic:{type:"button",command:"PropertyChangeCommand",property:"italic",value:!0,iconClass:"italic",togglable:!0},underline:{type:"button",command:"PropertyChangeCommand",property:"underline",value:!0,iconClass:"underline",togglable:!0},formatDecreaseDecimal:{type:"button",command:"AdjustDecimalsCommand",value:-1,iconClass:"decimal-decrease"},formatIncreaseDecimal:{type:"button",command:"AdjustDecimalsCommand",value:1,iconClass:"decimal-increase"},textWrap:{type:"button",command:"TextWrapCommand",property:"wrap",value:!0,iconClass:"text-wrap",togglable:!0},cut:{type:"button",command:"ToolbarCutCommand",iconClass:"cut"},copy:{type:"button",command:"ToolbarCopyCommand",iconClass:"copy"},paste:{type:"button",command:"ToolbarPasteCommand",iconClass:"paste"},separator:{type:"separator"},alignment:{type:"alignment",iconClass:"align-left"},backgroundColor:{type:"colorPicker",property:"background",iconClass:"paint"},textColor:{type:"colorPicker",property:"color",iconClass:"foreground-color"},fontFamily:{type:"fontFamily",property:"fontFamily",iconClass:"font-family"},fontSize:{type:"fontSize",property:"fontSize",iconClass:"font-size"},format:{type:"format",property:"format",iconClass:"custom-format"},filter:{type:"filter",property:"hasFilter",iconClass:"filter"},merge:{type:"merge",iconClass:"cells-merge"},freeze:{type:"freeze",iconClass:"pane-freeze"},borders:{type:"borders",iconClass:"borders-all"},formatCells:{type:"dialog",dialogName:"formatCells",overflow:"never"},hyperlink:{type:"dialog",dialogName:"hyperlink",iconClass:"link-horizontal",overflow:"never",text:""},toggleGridlines:{type:"button",command:"GridLinesChangeCommand",property:"gridLines",value:!0,iconClass:"border-no",togglable:!0},addColumnLeft:{type:"button",command:"AddColumnCommand",value:"left",iconClass:"table-column-insert-left"},addColumnRight:{type:"button",command:"AddColumnCommand",value:"right",iconClass:"table-column-insert-right"},addRowBelow:{type:"button",command:"AddRowCommand",value:"below",iconClass:"table-row-insert-below"},addRowAbove:{type:"button",command:"AddRowCommand",value:"above",iconClass:"table-row-insert-above"},deleteColumn:{type:"button",command:"DeleteColumnCommand",iconClass:"table-column-delete"},deleteRow:{type:"button",command:"DeleteRowCommand",iconClass:"table-row-delete"},sort:{type:"sort",iconClass:"sort-desc"},validation:{type:"dialog",dialogName:"validation",iconClass:"exception",overflow:"never"}},v=h.extend({init:function(n,t){t.items=this._expandTools(t.tools||v.prototype.options.tools[t.toolbarName]),h.fn.init.call(this,n,t);var i=this._click.bind(this);this.element.addClass("k-spreadsheet-toolbar"),this._addSeparators(this.element),this.bind({click:i,toggle:i})},_addSeparators:function(n){var t=n.children(".k-widget, a.k-button, .k-button-group");t.before("<span class='k-separator' />")},_expandTools:function(n){function r(n){var u=i.isPlainObject(n)?n:c[n]||{},f="k-icon k-i-"+u.iconClass,o=u.type,s={button:{showText:"overflow"},colorPicker:{toolIcon:f,spriteCssClass:f},borders:{spriteCssClass:f},alignment:{spriteCssClass:f},merge:{spriteCssClass:f},freeze:{spriteCssClass:f}},e=i.extend({name:u.name||n,text:t[u.name||n],icon:u.iconClass,attributes:{title:t[u.name||n],"aria-label":t[u.name||n]}},s[o],u);return"splitButton"==o&&(e.menuButtons=e.menuButtons.map(r)),e.attributes["data-tool"]=n,u.property&&(e.attributes["data-property"]=u.property),e}return n.reduce(function(n,t){return n.push(i.isArray(t)?{type:"buttonGroup",buttons:t.map(r)}:r.call(this,t)),n},[])},_click:function(n){var t,u=n.target.attr("data-tool"),i=c[u]||{},r=i.command;r&&(t={command:r,options:{property:i.property||null,value:i.value||null}},"boolean"==typeof t.options.value&&(t.options.value=!!n.checked||null),this.action(t))},events:["click","toggle","open","close","overflowOpen","overflowClose","action","dialog"],options:{name:"SpreadsheetToolBar",resizable:!0,tools:ft},action:function(n){this.trigger("action",n)},dialog:function(n){this.trigger("dialog",n)},refresh:function(t){function h(n,t){var i,u=n.toolbar,r=n.overflow,f=u&&u.options.togglable||r&&r.options.togglable;f&&(i=!1,"boolean"==typeof t?i=t:"string"==typeof t&&(i=u.options.value===t),u.toggle(i),r&&r.toggle(i))}function s(n,t){var r=n.toolbar,i=n.overflow;r&&r.update&&r.update(t),i&&i.update&&i.update(t)}for(var e,r,f,u=t,o=this._tools(),i=0;i<o.length;i++)e=o[i].property,r=o[i].tool,f=n.isFunction(u[e])?u[e]():u,"gridLines"==e&&(f=u.sheet().showGridLines()),"button"===r.type?h(r,f):s(r,f)},_tools:function(){return this.element.find("[data-property]").toArray().map(function(n){return n=i(n),{property:n.attr("data-property"),tool:this._getItem(n)}}.bind(this))},destroy:function(){this.element.find("[data-command],.k-button").each(function(){var t=i(this),n=t.data("instance");n&&n.destroy&&n.destroy()}),h.fn.destroy.call(this)}}),n.spreadsheet.ToolBar=v,e=n.toolbar.Item.extend({init:function(n,t){var r=i("<select />").attr("title",n.attributes.title).attr("aria-label",n.attributes.title).kendoDropDownList({height:"auto"}).data("kendoDropDownList");this.dropDownList=r,this.element=r.wrapper,this.options=n,this.toolbar=t,this.attributes(),this.addUidAttr(),this.addOverflowAttr(),r.bind("open",this._open.bind(this)),r.bind("change",this._change.bind(this)),this.element.width(n.width).attr({"data-command":"PropertyChangeCommand","data-property":n.property})},_open:function(){var t,r=this.dropDownList,i=r.list;i.css({whiteSpace:"nowrap",width:"auto"}),t=i.width(),t?t+=20:t=r._listWidth,i.css("width",t+n.support.scrollbar()),r._listWidth=t},_change:function(n){var r=n.sender,u=r.value(),t=r.dataItem(),i=t?t.popup:void 0;i?this.toolbar.dialog({name:i}):this.toolbar.action({command:"PropertyChangeCommand",options:{property:this.options.property,value:"null"==u?null:u}})},value:function(n){return void 0===n?this.dropDownList.value():void this.dropDownList.value(n)}}),r=n.toolbar.Item.extend({init:function(n,t){this.element=i("<a href='#' class='k-button k-button-icon'><span class='"+n.spriteCssClass+"'></span><span class='k-icon k-i-arrow-60-down'></span></a>"),this.element.on("click touchend",this.open.bind(this)).attr("data-command",n.command),this.options=n,this.toolbar=t,this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this._popup()},destroy:function(){this.popup.destroy()},open:function(n){n.preventDefault(),this.popup.toggle()},_popup:function(){var n=this.element;this.popup=i("<div class='k-spreadsheet-popup' />").appendTo(n).kendoPopup({anchor:n}).data("kendoPopup")}}),n.toolbar.registerComponent("dialog",n.toolbar.ToolBarButton.extend({init:function(t,i){n.toolbar.ToolBarButton.fn.init.call(this,t,i),this._dialogName=t.dialogName,this.element.bind("click touchend",this.open.bind(this)).data("instance",this)},open:function(){this.toolbar.dialog({name:this._dialogName})}})),n.toolbar.registerComponent("exportAsDialog",n.toolbar.Item.extend({init:function(n,t){this._dialogName=n.dialogName,this.toolbar=t,this._title=n.attributes.title,this.element=i("<button class='k-button k-button-icon'><span class='k-icon k-i-file-excel' /></button>").attr("title",this._title).attr("aria-label",this._title).data("instance",this),this.element.bind("click",this.open.bind(this)).data("instance",this)},open:function(){this.toolbar.dialog({name:this._dialogName})}})),u=n.toolbar.OverflowButton.extend({init:function(t,i){n.toolbar.OverflowButton.fn.init.call(this,t,i),this.element.on("click touchend",this._click.bind(this)),this.message=this.options.text;var r=this.element.data("button");this.element.data(this.options.type,r)},_click:i.noop}),ot=r.extend({init:function(t,i){r.fn.init.call(this,t,i),this.popup.element.addClass("k-spreadsheet-colorpicker"),this.colorChooser=new n.spreadsheet.ColorChooser(this.popup.element,{change:this._colorChange.bind(this)}),this.element.attr({"data-property":t.property}),this.element.data({type:"colorPicker",colorPicker:this,instance:this})},destroy:function(){this.colorChooser.destroy(),r.fn.destroy.call(this)},update:function(n){this.value(n)},value:function(n){this.colorChooser.value(n)},_colorChange:function(n){this.toolbar.action({command:"PropertyChangeCommand",options:{property:this.options.property,value:n.sender.value()}}),this.popup.close()}}),st=u.extend({init:function(n,t){n.iconName="text",u.fn.init.call(this,n,t)},_click:function(){this.toolbar.dialog({name:"colorPicker",options:{title:this.options.property,property:this.options.property}})}}),n.toolbar.registerComponent("colorPicker",ot,st),a=[8,9,10,11,12,13,14,16,18,20,22,24,26,28,36,48,72],s=12,et=n.toolbar.Item.extend({init:function(n,t){var r=i("<input />").attr("aria-label",n.attributes.title).kendoComboBox({change:this._valueChange.bind(this),clearButton:!1,dataSource:n.fontSizes||a,value:s}).data("kendoComboBox");this.comboBox=r,this.element=r.wrapper,this.options=n,this.toolbar=t,this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.element.width(n.width).attr({"data-command":"PropertyChangeCommand","data-property":n.property}),this.element.data({type:"fontSize",fontSize:this})},_valueChange:function(t){this.toolbar.action({command:"PropertyChangeCommand",options:{property:this.options.property,value:n.parseInt(t.sender.value())}})},update:function(t){this.value(n.parseInt(t)||s)},value:function(n){return void 0===n?this.comboBox.value():void this.comboBox.value(n)}}),ut=u.extend({_click:function(){this.toolbar.dialog({name:"fontSize",options:{sizes:a,defaultSize:s}})},update:function(n){this._value=n||s,this.element.find(".k-text").text(this.message+" ("+this._value+") ...")}}),n.toolbar.registerComponent("fontSize",et,ut),l=["Arial","Courier New","Georgia","Times New Roman","Trebuchet MS","Verdana"],o="Arial",ht=e.extend({init:function(n,t){e.fn.init.call(this,n,t);var i=this.dropDownList;i.setDataSource(n.fontFamilies||l),i.value(o),this.element.data({type:"fontFamily",fontFamily:this})},update:function(n){this.value(n||o)}}),vt=u.extend({_click:function(){this.toolbar.dialog({name:"fontFamily",options:{fonts:l,defaultFont:o}})},update:function(n){this._value=n||o,this.element.find(".k-text").text(this.message+" ("+this._value+") ...")}}),n.toolbar.registerComponent("fontFamily",ht,vt),f=n.spreadsheet.formats={automatic:null,number:"#,0.00",percent:"0.00%",financial:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',currency:"$#,##0.00;[Red]$#,##0.00",date:"m/d/yyyy",time:"h:mm:ss AM/PM",dateTime:"m/d/yyyy h:mm",duration:"[h]:mm:ss"},yt=e.extend({_revertTitle:function(n){n.sender.value(""),n.sender.wrapper.width("auto")},init:function(n,i){var r,u;e.fn.init.call(this,n,i),r=this.dropDownList,u="<span class='k-icon k-i-"+n.iconClass+"' style='line-height: 1em; width: 1.35em;'></span>",r.bind("change",this._revertTitle.bind(this)),r.bind("dataBound",this._revertTitle.bind(this)),r.setOptions({dataValueField:"format",dataTextField:"name",dataValuePrimitive:!0,valueTemplate:u,template:"# if (data.sample) { #<span class='k-spreadsheet-sample'>#: data.sample #</span># } ##: data.name #"}),r.text(u),r.setDataSource([{format:f.automatic,name:t.formatTypes.automatic},{format:f.number,name:t.formatTypes.number,sample:"1,499.99"},{format:f.percent,name:t.formatTypes.percent,sample:"14.50%"},{format:f.financial,name:t.formatTypes.financial,sample:"(1,000.12)"},{format:f.currency,name:t.formatTypes.currency,sample:"$1,499.99"},{format:f.date,name:t.formatTypes.date,sample:"4/21/2012"},{format:f.time,name:t.formatTypes.time,sample:"5:49:00 PM"},{format:f.dateTime,name:t.formatTypes.dateTime,sample:"4/21/2012 5:49:00"},{format:f.duration,name:t.formatTypes.duration,sample:"168:05:00"},{popup:"formatCells",name:t.formatTypes.moreFormats}]),this.element.data({type:"format",format:this})}}),at=u.extend({_click:function(){this.toolbar.dialog({name:"formatCells"})}}),n.toolbar.registerComponent("format",yt,at),ct=r.extend({init:function(n,t){r.fn.init.call(this,n,t),this._borderPalette(),this.element.data({type:"borders",instance:this})},destroy:function(){this.borderPalette.destroy(),r.fn.destroy.call(this)},_borderPalette:function(){var t=i("<div />").appendTo(this.popup.element);this.borderPalette=new n.spreadsheet.BorderPalette(t,{change:this._action.bind(this)})},_action:function(n){this.toolbar.action({command:"BorderChangeCommand",options:{border:n.type,style:{size:1,color:n.color}}})}}),lt=u.extend({_click:function(){this.toolbar.dialog({name:"borders"})}}),n.toolbar.registerComponent("borders",ct,lt),w=r.extend({init:function(n,t){r.fn.init.call(this,n,t),this.element.attr({"data-property":"alignment"}),this._commandPalette(),this.popup.element.on("click",".k-button",function(n){this._action(i(n.currentTarget))}.bind(this)),this.element.data({type:"alignment",alignment:this,instance:this})},buttons:[{property:"textAlign",value:"left",iconClass:"align-left",text:t.alignmentButtons.justtifyLeft},{property:"textAlign",value:"center",iconClass:"align-center",text:t.alignmentButtons.justifyCenter},{property:"textAlign",value:"right",iconClass:"align-right",text:t.alignmentButtons.justifyRight},{property:"textAlign",value:"justify",iconClass:"align-justify",text:t.alignmentButtons.justifyFull},{property:"verticalAlign",value:"top",iconClass:"align-top",text:t.alignmentButtons.alignTop},{property:"verticalAlign",value:"center",iconClass:"align-middle",text:t.alignmentButtons.alignMiddle},{property:"verticalAlign",value:"bottom",iconClass:"align-bottom",text:t.alignmentButtons.alignBottom}],destroy:function(){this.popup.element.off(),r.fn.destroy.call(this)},update:function(n){var i=n.textAlign(),r=n.verticalAlign(),t=this.popup.element;t.find(".k-button").removeClass("k-state-active"),i&&t.find("[data-property=textAlign][data-value="+i+"]").addClass("k-state-active"),r&&t.find("[data-property=verticalAlign][data-value="+r+"]").addClass("k-state-active")},_commandPalette:function(){var t=this.buttons,n=i("<div />").appendTo(this.popup.element);t.forEach(function(r,u){var f="<a title='"+r.text+"' data-property='"+r.property+"' data-value='"+r.value+"' class='k-button k-button-icon'><span class='k-icon k-i-"+r.iconClass+"'></span></a>";0!==u&&t[u-1].property!==r.property&&n.append(i("<span class='k-separator' />")),n.append(f)})},_action:function(n){var i=n.attr("data-property"),t=n.attr("data-value");this.toolbar.action({command:"PropertyChangeCommand",options:{property:i,value:t}})}}),b=u.extend({_click:function(){this.toolbar.dialog({name:"alignment"})}}),n.toolbar.registerComponent("alignment",w,b),k=r.extend({init:function(n,t){r.fn.init.call(this,n,t),this._commandPalette(),this.popup.element.on("click",".k-button",function(n){this._action(i(n.currentTarget))}.bind(this)),this.element.data({type:"merge",merge:this,instance:this})},buttons:[{value:"cells",iconClass:"cells-merge",text:t.mergeButtons.mergeCells},{value:"horizontally",iconClass:"cells-merge-horizontally",text:t.mergeButtons.mergeHorizontally},{value:"vertically",iconClass:"cells-merge-vertically",text:t.mergeButtons.mergeVertically},{value:"unmerge",iconClass:"table-unmerge",text:t.mergeButtons.unmerge}],destroy:function(){this.popup.element.off(),r.fn.destroy.call(this)},_commandPalette:function(){var n=i("<div />").appendTo(this.popup.element);this.buttons.forEach(function(t){var i="<a title='"+t.text+"' data-value='"+t.value+"' class='k-button k-button-icontext'><span class='k-icon k-i-"+t.iconClass+"'></span>"+t.text+"</a>";n.append(i)})},_action:function(n){var t=n.attr("data-value");this.toolbar.action({command:"MergeCellCommand",options:{value:t}})}}),y=u.extend({_click:function(){this.toolbar.dialog({name:"merge"})}}),n.toolbar.registerComponent("merge",k,y),p=r.extend({init:function(n,t){r.fn.init.call(this,n,t),this._commandPalette(),this.popup.element.on("click",".k-button",function(n){this._action(i(n.currentTarget))}.bind(this)),this.element.data({type:"freeze",freeze:this,instance:this})},buttons:[{value:"panes",iconClass:"pane-freeze",text:t.freezeButtons.freezePanes},{value:"rows",iconClass:"row-freeze",text:t.freezeButtons.freezeRows},{value:"columns",iconClass:"column-freeze",text:t.freezeButtons.freezeColumns},{value:"unfreeze",iconClass:"table-unmerge",text:t.freezeButtons.unfreeze}],destroy:function(){this.popup.element.off(),r.fn.destroy.call(this)},_commandPalette:function(){var n=i("<div />").appendTo(this.popup.element);this.buttons.forEach(function(t){var i="<a title='"+t.text+"' data-value='"+t.value+"' class='k-button k-button-icontext'><span class='k-icon k-i-"+t.iconClass+"'></span>"+t.text+"</a>";n.append(i)})},_action:function(n){var t=n.attr("data-value");this.toolbar.action({command:"FreezePanesCommand",options:{value:t}})}}),tt=u.extend({_click:function(){this.toolbar.dialog({name:"freeze"})}}),n.toolbar.registerComponent("freeze",p,tt),it=e.extend({_revertTitle:function(n){n.sender.value(""),n.sender.wrapper.width("auto")},init:function(n,i){e.fn.init.call(this,n,i);var r=this.dropDownList;r.bind("change",this._revertTitle.bind(this)),r.bind("dataBound",this._revertTitle.bind(this)),r.setOptions({valueTemplate:"<span class='k-icon k-i-"+n.iconClass+"' style='line-height: 1em; width: 1.35em;'></span>",template:"<span class='k-icon k-i-#= iconClass #' style='line-height: 1em; width: 1.35em;'></span>#=text#",dataTextField:"text",dataValueField:"value"}),r.setDataSource([{value:"asc",sheet:!1,text:t.sortButtons.sortRangeAsc,iconClass:"sort-asc"},{value:"desc",sheet:!1,text:t.sortButtons.sortRangeDesc,iconClass:"sort-desc"}]),r.select(0),this.element.data({type:"sort",sort:this})},_change:function(n){var i=n.sender,t=i.dataItem();t&&this.toolbar.action({command:"SortCommand",options:{value:t.value,sheet:t.sheet}})},value:i.noop}),d=u.extend({_click:function(){this.toolbar.dialog({name:"sort"})}}),n.toolbar.registerComponent("sort",it,d),g=n.toolbar.ToolBarButton.extend({init:function(t,i){t.showText="overflow",n.toolbar.ToolBarButton.fn.init.call(this,t,i),this.element.on("click",this._click.bind(this)),this.element.data({type:"filter",filter:this})},_click:function(){this.toolbar.action({command:"FilterCommand"})},update:function(n){this.toggle(n)}}),nt=u.extend({init:function(n,t){u.fn.init.call(this,n,t),this.element.data({type:"filter",filter:this})},_click:function(){this.toolbar.action({command:"FilterCommand"})},update:function(n){this.toggle(n)}}),n.toolbar.registerComponent("filter",g,nt),rt=n.toolbar.Item.extend({init:function(n,t){this.toolbar=t,this.element=i("<div class='k-button k-upload-button k-button-icon'><span class='k-icon k-i-folder-open' /></div>").data("instance",this),this._title=n.attributes.title,this._reset()},_reset:function(){this.element.remove("input"),i("<input type='file' autocomplete='off' accept='.xlsx'/>").attr("title",this._title).attr("aria-label",this._title).one("change",this._change.bind(this)).appendTo(this.element)},_change:function(n){this.toolbar.action({command:"OpenCommand",options:{file:n.target.files[0]}}),this._reset()}}),n.toolbar.registerComponent("open",rt),n.spreadsheet.TabStrip=n.ui.TabStrip.extend({init:function(t,r){n.ui.TabStrip.fn.init.call(this,t,r),t.addClass("k-spreadsheet-tabstrip"),this._quickAccessButtons(),this.toolbars={};var u=r.dataSource;this.contentElements.each(function(n,t){this._toolbar(i(t),u[n].id,r.toolbarOptions[u[n].id])}.bind(this)),this.one("activate",function(){this.toolbars[this.options.dataSource[0].id].resize()})},events:n.ui.TabStrip.fn.events.concat(["action","dialog"]),destroy:function(){this.quickAccessToolBar.off("click"),n.ui.TabStrip.fn.destroy.call(this);for(var t in this.toolbars)this.toolbars[t].destroy()},action:function(n){this.trigger("action",n)},dialog:function(n){this.trigger("dialog",n)},refreshTools:function(n){var i,t=this.toolbars;for(i in t)t.hasOwnProperty(i)&&t[i].refresh(n)},_quickAccessButtons:function(){var u=[{title:t.quickAccess.undo,iconClass:"undo",action:"undo"},{title:t.quickAccess.redo,iconClass:"redo",action:"redo"}],r=n.template("<a href='\\#' title='#= title #' data-action='#= action #' class='k-button k-button-icon' aria-label='#= title #'><span class='k-icon k-i-#=iconClass#'></span></a>");this.quickAccessToolBar=i("<div />",{"class":"k-spreadsheet-quick-access-toolbar",html:n.render(r,u)}).insertBefore(this.wrapper),this.quickAccessToolBar.on("click",".k-button",function(n){n.preventDefault();var t=i(n.currentTarget).attr("data-action");this.action({action:t})}.bind(this)),this.quickAccessAdjust()},quickAccessAdjust:function(){this.tabGroup.css("padding-left",n._outerWidth(this.quickAccessToolBar))},_toolbar:function(t,i,r){var f,u;this.toolbars[i]&&(this.toolbars[i].destroy(),t.children(".k-toolbar").remove()),r&&(f=t.html("<div />").children("div"),u={tools:"boolean"==typeof r?void 0:r,toolbarName:i,action:this.action.bind(this),dialog:this.dialog.bind(this)},this.toolbars[i]=new n.spreadsheet.ToolBar(f,u))}}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/dialogs.min",["kendo.core.min","kendo.binder.min","kendo.validator.min"],n)}(function(){!function(n){function l(t,i){return n.spreadsheet.formatting.text(t,i)}function it(n,t){for(var f=[],u=[],r=0;r<t.length;r++)i.inArray(t[r][n],u)==-1&&(f.push(t[r]),u.push(t[r][n]));return f}function u(t,i){n.spreadsheet.dialogs.register(t,f.extend({options:{messageId:i}}))}var i,h,r,c,t,e,s,f,rt,nt,tt,et,ot,o,ut,ft,g,p,v,y,a,k,d,w,b;n.support.browser.msie&&n.support.browser.version<9||(i=n.jQuery,h=n.data.ObservableObject,r=n.spreadsheet.messages.dialogs={apply:"Apply",save:"Save",cancel:"Cancel",remove:"Remove",retry:"Retry",revert:"Revert",okText:"OK",formatCellsDialog:{title:"Format",categories:{number:"Number",currency:"Currency",date:"Date"}},fontFamilyDialog:{title:"Font"},fontSizeDialog:{title:"Font size"},bordersDialog:{title:"Borders"},alignmentDialog:{title:"Alignment",buttons:{justtifyLeft:"Align left",justifyCenter:"Center",justifyRight:"Align right",justifyFull:"Justify",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom"}},mergeDialog:{title:"Merge cells",buttons:{mergeCells:"Merge all",mergeHorizontally:"Merge horizontally",mergeVertically:"Merge vertically",unmerge:"Unmerge"}},freezeDialog:{title:"Freeze panes",buttons:{freezePanes:"Freeze panes",freezeRows:"Freeze rows",freezeColumns:"Freeze columns",unfreeze:"Unfreeze panes"}},confirmationDialog:{text:"Are you sure you want to remove this sheet?",title:"Sheet remove"},validationDialog:{title:"Data Validation",hintMessage:"Please enter a valid {0} value {1}.",hintTitle:"Validation {0}",criteria:{any:"Any value",number:"Number",text:"Text",date:"Date",custom:"Custom Formula",list:"List"},comparers:{greaterThan:"greater than",lessThan:"less than",between:"between",notBetween:"not between",equalTo:"equal to",notEqualTo:"not equal to",greaterThanOrEqualTo:"greater than or equal to",lessThanOrEqualTo:"less than or equal to"},comparerMessages:{greaterThan:"greater than {0}",lessThan:"less than {0}",between:"between {0} and {1}",notBetween:"not between {0} and {1}",equalTo:"equal to {0}",notEqualTo:"not equal to {0}",greaterThanOrEqualTo:"greater than or equal to {0}",lessThanOrEqualTo:"less than or equal to {0}",custom:"that satisfies the formula: {0}"},labels:{criteria:"Criteria",comparer:"Comparer",min:"Min",max:"Max",value:"Value",start:"Start",end:"End",onInvalidData:"On invalid data",rejectInput:"Reject input",showWarning:"Show warning",showHint:"Show hint",hintTitle:"Hint title",hintMessage:"Hint message",ignoreBlank:"Ignore blank",showListButton:"Display button to show list",showCalendarButton:"Display button to show calendar"},placeholders:{typeTitle:"Type title",typeMessage:"Type message"}},exportAsDialog:{title:"Export...",labels:{scale:"Scale",fit:"Fit to page",fileName:"File name",saveAsType:"Save as type",exportArea:"Export",paperSize:"Paper size",margins:"Margins",orientation:"Orientation",print:"Print",guidelines:"Guidelines",center:"Center",horizontally:"Horizontally",vertically:"Vertically"}},modifyMergedDialog:{errorMessage:"Cannot change part of a merged cell."},rangeDisabledDialog:{errorMessage:"Destination range contains disabled cells."},incompatibleRangesDialog:{errorMessage:"Incompatible ranges"},noFillDirectionDialog:{errorMessage:"Cannot determine fill direction"},duplicateSheetNameDialog:{errorMessage:"Duplicate sheet name"},overflowDialog:{errorMessage:"Cannot paste, because the copy area and the paste area are not the same size and shape."},useKeyboardDialog:{title:"Copying and pasting",errorMessage:"These actions cannot be invoked through the menu. Please use the keyboard shortcuts instead:",labels:{forCopy:"for copy",forCut:"for cut",forPaste:"for paste"}},unsupportedSelectionDialog:{errorMessage:"That action cannot be performed on multiple selection."},linkDialog:{title:"Hyperlink",labels:{text:"Text",url:"Address",removeLink:"Remove link"}}},c={},n.spreadsheet.dialogs={register:function(n,t){c[n]=t},registered:function(n){return!!c[n]},create:function(n,t){var i=c[n];if(i)return new i(t)}},t=n.spreadsheet.SpreadsheetDialog=n.Observable.extend({init:function(t){n.Observable.fn.init.call(this,t),this.options=i.extend(!0,{},this.options,t),this.bind(this.events,t)},events:["close","activate"],options:{autoFocus:!0},dialog:function(){return this._dialog||(this._dialog=i("<div class='k-spreadsheet-window k-action-window k-popup-edit-form' />").addClass(this.options.className||"").append(n.template(this.options.template)({messages:n.spreadsheet.messages.dialogs||r,errors:this.options.errors})).appendTo(document.body).kendoWindow({autoFocus:this.options.autoFocus,scrollable:!1,resizable:!1,modal:!0,visible:!1,width:this.options.width||320,title:this.options.title,open:function(){this.center()},close:this._onDialogClose.bind(this),activate:this._onDialogActivate.bind(this),deactivate:this._onDialogDeactivate.bind(this)}).data("kendoWindow")),this._dialog},_onDialogClose:function(){this.trigger("close",{action:this._action})},_onDialogActivate:function(){this.trigger("activate")},_onDialogDeactivate:function(){this.trigger("deactivate"),this.destroy()},destroy:function(){this._dialog&&(this._dialog.destroy(),this._dialog=null)},open:function(){this.dialog().open()},apply:function(){this.close()},close:function(){this._action="close",this.dialog().close()}}),e=n.spreadsheet.FormatCellsViewModel=h.extend({init:function(n){h.fn.init.call(this,n),this.useCategory(this.category)},useCategory:function(n){var i=n&&n.type||"number",t="currency"==i;this.category=n,this.set("showCurrencyFilter",t&&this.currencies.length>1),t?this.currency(this.currencies[0]):this.set("formats",this.allFormats[i+"Formats"]),this.useFirstFormat()},useFirstFormat:function(){this.formats.length&&this.set("format",this.formats[0].value)},currency:function(n){var i,t;return void 0!==n&&(this._currency=n,i=n.value,t=[{currency:i,decimals:!0},{currency:i,decimals:!0,iso:!0},{currency:i,decimals:!1}],t=t.map(function(n){return n=e.convert.currency(n),{value:n,name:l(1e3,n)}}),this.set("formats",t),this.useFirstFormat()),this._currency||this.currencies[0]},categoryFilter:function(n){return void 0!==n&&this.useCategory(n),this.category},preview:function(){var n=this.get("format"),t=this.value||0;return n&&n.length?l(t,n):t}}),e.convert={currency:function(n){function r(n,t){return Array(t+1).join(n)}var i=n.currency,t=i.pattern[1];return n.decimals&&(t=t.replace(/n/g,"n"+i["."]+r("0",i.decimals))),t=n.iso?'"'+i.abbr+'" '+t.replace(/\s*\$\s*/g,""):t.replace(/\$/g,i.symbol),t=t.replace(/n/g,"?")},date:function(n){return/T|Z/.test(n)?"":n.toLowerCase().replace(/tt/g,"AM/PM").replace(/'/g,'"')}},s=t.extend({init:function(u){var f=n.spreadsheet.messages.dialogs.formatCellsDialog||r,e={title:f.title,categories:[{type:"number",name:f.categories.number},{type:"currency",name:f.categories.currency},{type:"date",name:f.categories.date}]};t.fn.init.call(this,i.extend(e,u)),this._generateFormats()},options:{className:"k-spreadsheet-format-cells",template:"<div class='k-edit-form-container'><div class='k-root-tabs' data-role='tabstrip' data-text-field='name' data-bind='source: categories, value: categoryFilter' data-animation='false' /><div class='k-spreadsheet-preview' data-bind='text: preview' /><script type='text/x-kendo-template' id='format-item-template'>\\#: data.name \\#<\/script><select data-role='dropdownlist' class='k-format-filter' data-text-field='description' data-value-field='value.name' data-bind='visible: showCurrencyFilter, value: currency, source: currencies' /><ul data-role='staticlist' tabindex='0' class='k-list k-reset' data-template='format-item-template' data-value-primitive='true' data-value-field='value' data-bind='source: formats, value: format' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div></div>"},_generateFormats:function(){var r,t=this.options;t.currencies||(t.currencies=s.currenciesFrom(n.cultures)),t.numberFormats||(t.numberFormats=[{value:"#.00%",name:"100.00%"},{value:"#%",name:"100%"},{value:"#.00",name:"1024.00"},{value:"#,###.00",name:"1,024.00"}]),t.dateFormats||(r=n.cultures.current.calendars.standard.patterns,t.dateFormats=it("value",i.map(r,function(n){if(n=e.convert.date(n))return{value:n,name:l(34567.7678,n)}})))},open:function(i){var u,o,r=this.options,s=i.value(),f=r.categories.slice(0);this.viewModel=new e({currencies:r.currencies.slice(0),allFormats:{numberFormats:r.numberFormats.slice(0),dateFormats:r.dateFormats.slice(0)},categories:f,format:i.format(),category:s instanceof Date?f[2]:f[0],apply:this.apply.bind(this),close:this.close.bind(this),value:s}),t.fn.open.call(this),u=this.dialog().element,n.bind(u,this.viewModel),o=u.find("select.k-format-filter").data("kendoDropDownList"),r.currencies.length>10&&o.setOptions({filter:"contains"}),u.find(n.roleSelector("staticlist")).parent().addClass("k-list-wrapper")},apply:function(){var n=this.viewModel.format;t.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:"format",value:n}})}}),s.currenciesFrom=function(t){return it("description",i.map(t,function(t,i){var r,u;if(/-/.test(i))return r=t.numberFormat.currency,u=n.format("{0} ({1}, {2})",r.name,r.abbr,r.symbol),{description:u,value:r}}))},n.spreadsheet.dialogs.register("formatCells",s),n.spreadsheet.dialogs.FormatCellsDialog=s,f=t.extend({options:{className:"k-spreadsheet-message",title:"",messageId:"",text:"",template:"<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: close'>#= messages.okText #</button></div>"},open:function(){var i,r;t.fn.open.call(this),i=this.options,r=i.text,i.messageId&&(r=n.getter(i.messageId,!0)(n.spreadsheet.messages.dialogs)),n.bind(this.dialog().element,{text:r,close:this.close.bind(this)})}}),n.spreadsheet.dialogs.register("message",f),rt=t.extend({init:function(u){var f=n.spreadsheet.messages.dialogs.confirmationDialog||r,e={title:f.title,text:f.text};t.fn.init.call(this,i.extend(e,u))},options:{className:"k-spreadsheet-message",messageId:"",template:"<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: confirm'>#= messages.okText #</button><button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>"},open:function(){var i,r;t.fn.open.call(this),i=this.options,r=i.text,i.messageId&&(r=n.getter(i.messageId,!0)(n.spreadsheet.messages.dialogs)),n.bind(this.dialog().element,{text:r,confirm:this.confirm.bind(this),cancel:this.close.bind(this)})},isConfirmed:function(){return this._confirmed},confirm:function(){this._confirmed=!0,this.close()}}),n.spreadsheet.dialogs.register("confirmation",rt),nt=t.extend({options:{className:"k-spreadsheet-message",title:"",messageId:"",text:"",template:"<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: retry'>#= messages.retry #</button><button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>"},open:function(){var i,r;t.fn.open.call(this),i=this.options,r=i.text,i.messageId&&(r=n.getter(i.messageId,!0)(n.spreadsheet.messages.dialogs)),n.bind(this.dialog().element,{text:r,retry:this.retry.bind(this),cancel:this.close.bind(this)})},retry:function(){this._retry=!0,this.close()}}),n.spreadsheet.dialogs.register("validationError",nt),tt=t.extend({init:function(u){var f=n.spreadsheet.messages.dialogs.fontFamilyDialog||r;t.fn.init.call(this,i.extend({title:f.title},u)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var r=this.dialog().element.find("ul"),i=this.options.fonts,t=this.options.defaultFont;this.list=new n.ui.StaticList(r,{dataSource:new n.data.DataSource({data:i}),template:"#: data #",value:t,change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(n){t.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:"fontFamily",value:n.sender.value()[0]}})}}),n.spreadsheet.dialogs.register("fontFamily",tt),et=t.extend({init:function(u){var f=n.spreadsheet.messages.dialogs.fontSizeDialog||r;t.fn.init.call(this,i.extend({title:f.title},u)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var r=this.dialog().element.find("ul"),i=this.options.sizes,t=this.options.defaultSize;this.list=new n.ui.StaticList(r,{dataSource:new n.data.DataSource({data:i}),template:"#: data #",value:t,change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(i){t.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:"fontSize",value:n.parseInt(i.sender.value()[0])}})}}),n.spreadsheet.dialogs.register("fontSize",et),ot=t.extend({init:function(u){var f=n.spreadsheet.messages.dialogs.bordersDialog||r;t.fn.init.call(this,i.extend({title:f.title},u)),this.element=this.dialog().element,this._borderPalette(),this.viewModel=n.observable({apply:this.apply.bind(this),close:this.close.bind(this)}),n.bind(this.element.find(".k-action-buttons"),this.viewModel)},options:{width:177,template:"<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"},apply:function(){t.fn.apply.call(this);var n=this.value();this.trigger("action",{command:"BorderChangeCommand",options:{border:n.type,style:{size:1,color:n.color}}})},_borderPalette:function(){var t=this.dialog().element.find("div:first");this.borderPalette=new n.spreadsheet.BorderPalette(t,{change:this.value.bind(this)})},value:function(n){return void 0===n?this._state:void(this._state=n)}}),n.spreadsheet.dialogs.register("borders",ot),o=t.extend({init:function(i){t.fn.init.call(this,i),this.element=this.dialog().element,this.property=i.property,this.options.title=i.title,this.viewModel=n.observable({apply:this.apply.bind(this),close:this.close.bind(this)}),n.bind(this.element.find(".k-action-buttons"),this.viewModel)},options:{template:"<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"},apply:function(){t.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:this.property,value:this.value()}})},value:function(n){return void 0===n?this._value:void(this._value=n.value)}}),ut=o.extend({init:function(n){n.width=177,o.fn.init.call(this,n),this._colorPalette()},_colorPalette:function(){var n=this.dialog().element.find("div:first");this.colorPalette=n.kendoColorPalette({palette:["#ffffff","#000000","#d6ecff","#4e5b6f","#7fd13b","#ea157a","#feb80a","#00addc","#738ac8","#1ab39f","#f2f2f2","#7f7f7f","#a7d6ff","#d9dde4","#e5f5d7","#fad0e4","#fef0cd","#c5f2ff","#e2e7f4","#c9f7f1","#d8d8d8","#595959","#60b5ff","#b3bcca","#cbecb0","#f6a1c9","#fee29c","#8be6ff","#c7d0e9","#94efe3","#bfbfbf","#3f3f3f","#007dea","#8d9baf","#b2e389","#f272af","#fed46b","#51d9ff","#aab8de","#5fe7d5","#a5a5a5","#262626","#003e75","#3a4453","#5ea226","#af0f5b","#c58c00","#0081a5","#425ea9","#138677","#7f7f7f","#0c0c0c","#00192e","#272d37","#3f6c19","#750a3d","#835d00","#00566e","#2c3f71","#0c594f"],change:this.value.bind(this)}).data("kendoColorPalette")}}),n.spreadsheet.dialogs.register("colorPicker",ut),ft=o.extend({init:function(n){n.width=268,o.fn.init.call(this,n),this.dialog().setOptions({animation:!1}),this.dialog().one("activate",this._colorPicker.bind(this))},_colorPicker:function(){var n=this.dialog().element.find("div:first");this.colorPicker=n.kendoFlatColorPicker({change:this.value.bind(this)}).data("kendoFlatColorPicker")}}),n.spreadsheet.dialogs.register("customColor",ft),g=t.extend({init:function(u){var f=n.spreadsheet.messages.dialogs.alignmentDialog||r,e={title:f.title,buttons:[{property:"textAlign",value:"left",iconClass:"align-left",text:f.buttons.justtifyLeft},{property:"textAlign",value:"center",iconClass:"align-center",text:f.buttons.justifyCenter},{property:"textAlign",value:"right",iconClass:"align-right",text:f.buttons.justifyRight},{property:"textAlign",value:"justify",iconClass:"align-justify",text:f.buttons.justifyFull},{property:"verticalAlign",value:"top",iconClass:"align-top",text:f.buttons.alignTop},{property:"verticalAlign",value:"center",iconClass:"align-middle",text:f.buttons.alignMiddle},{property:"verticalAlign",value:"bottom",iconClass:"align-bottom",text:f.buttons.alignBottom}]};t.fn.init.call(this,i.extend(e,u)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul");this.list=new n.ui.StaticList(t,{dataSource:new n.data.DataSource({data:this.options.buttons}),template:"<a title='#=text#' data-property='#=property#' data-value='#=value#'><span class='k-icon k-i-#=iconClass#'></span>#=text#</a>",change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(n){var i=n.sender.value()[0];t.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:i.property,value:i.value}})}}),n.spreadsheet.dialogs.register("alignment",g),p=t.extend({init:function(u){var f=n.spreadsheet.messages.dialogs.mergeDialog||r,e={title:f.title,buttons:[{value:"cells",iconClass:"cells-merge",text:f.buttons.mergeCells},{value:"horizontally",iconClass:"cells-merge-horizontally",text:f.buttons.mergeHorizontally},{value:"vertically",iconClass:"cells-merge-vertically",text:f.buttons.mergeVertically},{value:"unmerge",iconClass:"table-unmerge",text:f.buttons.unmerge}]};t.fn.init.call(this,i.extend(e,u)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul");this.list=new n.ui.StaticList(t,{dataSource:new n.data.DataSource({data:this.options.buttons}),template:"<a title='#=text#' data-value='#=value#'><span class='k-icon k-icon k-i-#=iconClass#'></span>#=text#</a>",change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(n){var i=n.sender.value()[0];t.fn.apply.call(this),this.trigger("action",{command:"MergeCellCommand",options:{value:i.value}})}}),n.spreadsheet.dialogs.register("merge",p),v=t.extend({init:function(u){var f=n.spreadsheet.messages.dialogs.freezeDialog||r,e={title:f.title,buttons:[{value:"panes",iconClass:"pane-freeze",text:f.buttons.freezePanes},{value:"rows",iconClass:"row-freeze",text:f.buttons.freezeRows},{value:"columns",iconClass:"column-freeze",text:f.buttons.freezeColumns},{value:"unfreeze",iconClass:"table-unmerge",text:f.buttons.unfreeze}]};t.fn.init.call(this,i.extend(e,u)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul");this.list=new n.ui.StaticList(t,{dataSource:new n.data.DataSource({data:this.options.buttons}),template:"<a title='#=text#' data-value='#=value#'><span class='k-icon k-icon k-i-#=iconClass#'></span>#=text#</a>",change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(n){var i=n.sender.value()[0];t.fn.apply.call(this),this.trigger("action",{command:"FreezePanesCommand",options:{value:i.value}})}}),n.spreadsheet.dialogs.register("freeze",v),y=n.spreadsheet.ValidationCellsViewModel=h.extend({init:function(n){h.fn.init.call(this,n),this.bind("change",function(n){"criterion"===n.field&&(this.reset(),"custom"!==this.criterion&&"list"!==this.criterion||this.setHintMessageTemplate()),"comparer"===n.field&&this.setHintMessageTemplate(),"hintMessage"!=n.field&&"hintTitle"!=n.field||this._mute||(this.shouldBuild=!1),"from"!=n.field&&"to"!=n.field&&"hintMessageTemplate"!=n.field&&"type"!=n.field||!this.shouldBuild||this.buildMessages()}.bind(this)),this.reset()},buildMessages:function(){this._mute=!0,this.set("hintTitle",this.hintTitleTemplate?n.format(this.hintTitleTemplate,this.type):""),this.set("hintMessage",this.hintMessageTemplate?n.format(this.hintMessageTemplate,this.from,this.to):""),this._mute=!1},reset:function(){this.setComparers(),this.set("comparer",this.comparers[0].type),this.set("from",null),this.set("to",null),this.set("useCustomMessages",!1),this.shouldBuild=!0,this.hintTitleTemplate=this.defaultHintTitle,this.buildMessages()},setComparers:function(){var r,n,t=this.defaultComparers,i=[];if("text"===this.criterion)for(r=["equalTo","notEqualTo"],n=0;n<t.length;n++)r[0]==t[n].type&&(i.push(t[n]),r.shift());else i=t.slice();this.set("comparers",i)},setHintMessageTemplate:function(){"custom"!==this.criterion&&"list"!==this.criterion?this.set("hintMessageTemplate",n.format(this.defaultHintMessage,this.criterion,this.comparerMessages[this.comparer])):(this.set("hintMessageTemplate",""),this.set("hintMessage",""))},isAny:function(){return"any"===this.get("criterion")},isNumber:function(){return"number"===this.get("criterion")},showToForNumber:function(){return this.showTo()&&this.isNumber()},showToForDate:function(){return this.showTo()&&this.isDate()},isText:function(){return"text"===this.get("criterion")},isDate:function(){return"date"===this.get("criterion")},isList:function(){return"list"===this.get("criterion")},isCustom:function(){return"custom"===this.get("criterion")},showRemove:function(){return this.get("hasValidation")},showTo:function(){return"between"==this.get("comparer")||"notBetween"==this.get("comparer")},update:function(n){this.set("hasValidation",!!n),n&&this.fromValidationObject(n)},fromValidationObject:function(n){this.set("criterion",n.dataType),this.set("comparer",n.comparerType),this.set("from",n.from),this.set("to",n.to),this.set("type",n.type),this.set("ignoreBlank",n.allowNulls),this.set("showButton",n.showButton),n.messageTemplate||n.titleTemplate?(this.hintMessageTemplate=n.messageTemplate,this.hintMessage=n.messageTemplate,this.hintTitleTemplate=n.titleTemplate,this.hintTitle=n.titleTemplate,this.useCustomMessages=!0,this.buildMessages()):this.useCustomMessages=!1},toValidationObject:function(){if("any"===this.criterion)return null;var n={type:this.type,dataType:this.criterion,comparerType:this.comparer,from:this.from,to:this.to,allowNulls:this.ignoreBlank,showButton:this.showButton};return this.useCustomMessages&&(n.messageTemplate=this.shouldBuild?this.hintMessageTemplate:this.hintMessage,n.titleTemplate=this.hintTitle),n}}),a=t.extend({init:function(u){var f=n.spreadsheet.messages.dialogs.validationDialog||r,e={title:f.title,hintMessage:f.hintMessage,hintTitle:f.hintTitle,criteria:[{type:"any",name:f.criteria.any},{type:"number",name:f.criteria.number},{type:"text",name:f.criteria.text},{type:"date",name:f.criteria.date},{type:"custom",name:f.criteria.custom},{type:"list",name:f.criteria.list}],comparers:[{type:"greaterThan",name:f.comparers.greaterThan},{type:"lessThan",name:f.comparers.lessThan},{type:"between",name:f.comparers.between},{type:"notBetween",name:f.comparers.notBetween},{type:"equalTo",name:f.comparers.equalTo},{type:"notEqualTo",name:f.comparers.notEqualTo},{type:"greaterThanOrEqualTo",name:f.comparers.greaterThanOrEqualTo},{type:"lessThanOrEqualTo",name:f.comparers.lessThanOrEqualTo}],comparerMessages:f.comparerMessages};t.fn.init.call(this,i.extend(e,u))},options:{width:450,criterion:"any",type:"reject",ignoreBlank:!0,showButton:!0,useCustomMessages:!1,errorTemplate:'<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-i-warning"> </span>#= message #<div class="k-callout k-callout-n"></div></div>',template:'<div class="k-edit-form-container"><div class="k-edit-label"><label>#: messages.validationDialog.labels.criteria #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" data-text-field="name" data-value-field="type" data-bind="value: criterion, source: criteria" /></div><div data-bind="visible: isNumber"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.min #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.min #" placeholder="e.g. 10" class="k-textbox" data-bind="value: from, enabled: isNumber" required="required" /></div><div data-bind="visible: showTo"><div class="k-edit-label"><label>#: messages.validationDialog.labels.max #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.max #" placeholder="e.g. 100" class="k-textbox" data-bind="value: to, enabled: showToForNumber" required="required" /></div></div></div><div data-bind="visible: isText"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isText" required="required" /></div></div><div data-bind="visible: isDate"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.start #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.start #" class="k-textbox" data-bind="value: from, enabled: isDate" required="required" /></div><div data-bind="visible: showTo"><div class="k-edit-label"><label>#: messages.validationDialog.labels.end #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.end #" class="k-textbox" data-bind="value: to, enabled: showToForDate" required="required" /></div></div></div><div data-bind="visible: isCustom"><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isCustom" required="required" /></div></div><div data-bind="visible: isList"><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isList" required="required" /></div></div><div data-bind="visible: isList"><div class="k-edit-field"><input type="checkbox" name="showButton" id="showButton" class="k-checkbox" data-bind="checked: showButton"/><label for="showButton" class="k-checkbox-label"> #: messages.validationDialog.labels.showListButton #</label></div></div><div data-bind="visible: isDate"><div class="k-edit-field"><input type="checkbox" name="showButton" id="showButton" class="k-checkbox" data-bind="checked: showButton"/><label for="showButton" class="k-checkbox-label"> #: messages.validationDialog.labels.showCalendarButton #</label></div></div><div data-bind="invisible: isAny"><div class="k-edit-field"><input type="checkbox" name="ignoreBlank" id="ignoreBlank" class="k-checkbox" data-bind="checked: ignoreBlank"/><label for="ignoreBlank" class="k-checkbox-label"> #: messages.validationDialog.labels.ignoreBlank #</label></div></div><div data-bind="invisible: isAny"><div class="k-action-buttons"></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.onInvalidData #:</label></div><div class="k-edit-field"><input type="radio" id="validationTypeReject" name="validationType" value="reject" data-bind="checked: type" class="k-radio" /><label for="validationTypeReject" class="k-radio-label">#: messages.validationDialog.labels.rejectInput #</label> <input type="radio" id="validationTypeWarning" name="validationType" value="warning" data-bind="checked: type" class="k-radio" /><label for="validationTypeWarning" class="k-radio-label">#: messages.validationDialog.labels.showWarning #</label></div></div><div data-bind="invisible: isAny" class="hint-wrapper"><div class="k-edit-field"><input type="checkbox" name="useCustomMessages" id="useCustomMessages" class="k-checkbox" data-bind="checked: useCustomMessages" /><label class="k-checkbox-label" for="useCustomMessages"> #: messages.validationDialog.labels.showHint #</label></div><div data-bind="visible: useCustomMessages"><div class="k-edit-label"><label>#: messages.validationDialog.labels.hintTitle #:</label></div><div class="k-edit-field"><input class="k-textbox" placeholder="#: messages.validationDialog.placeholders.typeTitle #" data-bind="value: hintTitle" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.hintMessage #:</label></div><div class="k-edit-field"><input class="k-textbox" placeholder="#: messages.validationDialog.placeholders.typeMessage #" data-bind="value: hintMessage" /></div></div></div><div class="k-action-buttons"><button class="k-button" data-bind="visible: showRemove, click: remove">#: messages.remove #</button><button class="k-button k-primary" data-bind="click: apply">#: messages.apply #</button><button class="k-button" data-bind="click: close">#: messages.cancel #</button></div></div>'},open:function(i){var u,r=this.options;this.viewModel=new y({type:r.type,defaultHintMessage:r.hintMessage,defaultHintTitle:r.hintTitle,defaultComparers:r.comparers.slice(0),comparerMessages:r.comparerMessages,criteria:r.criteria.slice(0),criterion:r.criterion,ignoreBlank:r.ignoreBlank,showButton:r.showButton,apply:this.apply.bind(this),close:this.close.bind(this),remove:this.remove.bind(this)}),this.viewModel.update(i.validation()),t.fn.open.call(this),u=this.dialog().element,this.validatable&&this.validatable.destroy(),n.bind(u,this.viewModel),this.validatable=new n.ui.Validator(u.find(".k-edit-form-container"),{validateOnBlur:!1,errorTemplate:this.options.errorTemplate||void 0})},apply:function(){this.validatable.validate()&&(t.fn.apply.call(this),this.trigger("action",{command:"EditValidationCommand",options:{value:this.viewModel.toValidationObject()}}))},remove:function(){this.viewModel.set("criterion","any"),this.apply()}}),n.spreadsheet.dialogs.register("validation",a),n.spreadsheet.dialogs.ValidationDialog=a,k=t.extend({init:function(u){var f,e=n.spreadsheet.messages.dialogs.exportAsDialog||r;t.fn.init.call(this,i.extend({title:e.title},u)),this.viewModel=n.observable({title:this.options.title,name:this.options.name,extension:this.options.extension,fileFormats:this.options.fileFormats,excel:u.excelExport,pdf:{proxyURL:u.pdfExport.proxyURL,forceProxy:u.pdfExport.forceProxy,title:u.pdfExport.title,author:u.pdfExport.author,subject:u.pdfExport.subject,keywords:u.pdfExport.keywords,creator:u.pdfExport.creator,date:u.pdfExport.date,fitWidth:this.options.pdf.fitWidth,area:this.options.pdf.area,areas:this.options.pdf.areas,paperSize:this.options.pdf.paperSize,paperSizes:this.options.pdf.paperSizes,margin:this.options.pdf.margin,margins:this.options.pdf.margins,landscape:this.options.pdf.landscape,guidelines:this.options.pdf.guidelines,hCenter:this.options.pdf.hCenter,vCenter:this.options.pdf.vCenter},apply:this.apply.bind(this),close:this.close.bind(this)}),f=this.dialog(),this.viewModel.bind("change",function(n){"extension"===n.field&&(this.set("showPdfOptions",".pdf"===this.extension),f.center())}),n.bind(f.element,this.viewModel)},options:{name:"Workbook",extension:".xlsx",fileFormats:[{description:"Excel Workbook (.xlsx)",extension:".xlsx"},{description:"Portable Document Format(.pdf)",extension:".pdf"}],pdf:{fitWidth:!0,area:"workbook",areas:[{area:"workbook",text:"Entire Workbook"},{area:"sheet",text:"Active Sheet"},{area:"selection",text:"Selection"}],paperSize:"a4",paperSizes:[{value:"a2",text:"A2 (420 mm × 594 mm)     "},{value:"a3",text:"A3 (297 mm x 420 mm)     "},{value:"a4",text:"A4 (210 mm x 297 mm)     "},{value:"a5",text:"A5 (148 mm x 210 mm)     "},{value:"b3",text:"B3 (353 mm × 500 mm)     "},{value:"b4",text:"B4 (250 mm x 353 mm)     "},{value:"b5",text:"B5 (176 mm x 250 mm)     "},{value:"folio",text:'Folio (8.5" x 13")       '},{value:"legal",text:'Legal (8.5" x 14")       '},{value:"letter",text:'Letter (8.5" x 11")      '},{value:"tabloid",text:'Tabloid (11" x 17")      '},{value:"executive",text:'Executive (7.25" x 10.5")'}],margin:{bottom:"0.75in",left:"0.7in",right:"0.7in",top:"0.75in"},margins:[{value:{bottom:"0.75in",left:"0.7in",right:"0.7in",top:"0.75in"},text:"Normal"},{value:{bottom:"0.75in",left:"0.25in",right:"0.25in",top:"0.75in"},text:"Narrow"},{value:{bottom:"1in",left:"1in",right:"1in",top:"1in"},text:"Wide"}],landscape:!0,guidelines:!0,hCenter:!0,vCenter:!0},width:520,template:"<div class='k-edit-label'><label>#: messages.exportAsDialog.labels.fileName #:</label></div><div class='k-edit-field'><input class='k-textbox' data-bind='value: name' /></div><div ><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.saveAsType #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='description' data-value-field='extension' data-bind='value: extension, source: fileFormats' /></div></div><div class='export-config' data-bind='visible: showPdfOptions'><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.exportArea #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='text' data-value-field='area' data-bind='value: pdf.area, source: pdf.areas' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.paperSize#:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='text' data-value-field='value' data-bind='value: pdf.paperSize, source: pdf.paperSizes' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.margins #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-value-primitive='true'data-text-field='text' data-value-field='value' data-bind='value: pdf.margin, source: pdf.margins' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.orientation #:</label></div><div class='k-edit-field'><input type='radio' id='k-orientation-portrait' name='orientation' data-type='boolean' data-bind='checked: pdf.landscape' value='false' /><label class='k-orientation-label k-orientation-portrait-label' for='k-orientation-portrait'></label><input type='radio' id='k-orientation-landscape' name='orientation' data-type='boolean' data-bind='checked: pdf.landscape' value='true' /><label class='k-orientation-label k-orientation-landscape-label' for='k-orientation-landscape'></label></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.print #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='guidelines' type='checkbox' data-bind='checked: pdf.guidelines'/><label class='k-checkbox-label' for='guidelines'>#: messages.exportAsDialog.labels.guidelines#</label></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.scale #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='fitWidth' type='checkbox' data-bind='checked: pdf.fitWidth'/><label class='k-checkbox-label' for='fitWidth'>#: messages.exportAsDialog.labels.fit #</label></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.center #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='hCenter' type='checkbox' data-bind='checked: pdf.hCenter'/><label class='k-checkbox-label' for='hCenter'>#: messages.exportAsDialog.labels.horizontally #</label><input class='k-checkbox' id='vCenter' type='checkbox' data-bind='checked: pdf.vCenter'/><label class='k-checkbox-label' for='vCenter'>#: messages.exportAsDialog.labels.vertically #</label></div><div class='k-page-orientation' data-bind='css: {k-page-landscape: pdf.landscape}'><div class='k-margins-horizontal'></div><div class='k-margins-vertical'></div></div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.save #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"},apply:function(){t.fn.apply.call(this),this.trigger("action",{command:"SaveAsCommand",options:this.viewModel})}}),n.spreadsheet.dialogs.register("exportAs",k),u("modifyMerged","modifyMergedDialog.errorMessage"),u("rangeDisabled","rangeDisabledDialog.errorMessage"),u("overflow","overflowDialog.errorMessage"),u("unsupportedSelection","unsupportedSelectionDialog.errorMessage"),u("incompatibleRanges","incompatibleRangesDialog.errorMessage"),u("noFillDirection","noFillDirectionDialog.errorMessage"),u("duplicateSheetName","duplicateSheetNameDialog.errorMessage"),d=f.extend({options:{width:640,title:"Errors in import",template:"<div class='k-spreadsheet-message-content k-spreadsheet-import-errors'><div class='k--header-message'>We encountered #= errors.length # errors while reading this file.  Please be aware that some formulas might be missing, or contain invalid results.</div><div class='k--errors'><table><thead><tr><th>Context</th><th>Error message</th></tr></thead># for (var i = 0; i < errors.length; ++i) { ## var err = errors[i]; #<tr><td>#: err.context #</td><td>#: err.error #</td></tr># } #</table></div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: close'>#: messages.okText #</button></div>"}}),n.spreadsheet.dialogs.register("importError",d),w=f.extend({init:function(u){var f=n.spreadsheet.messages.dialogs.useKeyboardDialog||r;t.fn.init.call(this,i.extend({title:f.title},u))},options:{template:"#: messages.useKeyboardDialog.errorMessage #<div>Ctrl+C #: messages.useKeyboardDialog.labels.forCopy #</div><div>Ctrl+X #: messages.useKeyboardDialog.labels.forCut #</div><div>Ctrl+V #: messages.useKeyboardDialog.labels.forPaste #</div><div class=\"k-action-buttons\"><button class='k-button k-primary' data-bind='click: close'>#= messages.okText #</button></div>"}}),n.spreadsheet.dialogs.register("useKeyboard",w),b=t.extend({options:{template:"<div class='k-edit-label'><label>#: messages.linkDialog.labels.url #:</label></div><div class='k-edit-field'><input class='k-textbox' data-bind='value: url' /></div><div class='k-action-buttons'><button style='float: left' class='k-button' data-bind='click: remove'>#= messages.linkDialog.labels.removeLink #</button><button class='k-button k-primary' data-bind='click: apply'>#= messages.okText #</button><button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>",title:r.linkDialog.title,autoFocus:!1},open:function(r){var e,u,f=this;t.fn.open.apply(f,arguments),e=f.dialog().element,u=n.observable({url:r.link(),apply:function(){/\S/.test(u.url)||(u.url=null),f.trigger("action",{command:"HyperlinkCommand",options:{link:u.url}}),f.close()},remove:function(){u.url=null,u.apply()},cancel:f.close.bind(f)}),n.bind(e,u),e.find("input").focus().on("keydown",function(n){13==n.keyCode?(u.url=i(this).val(),n.stopPropagation(),n.preventDefault(),u.apply()):27==n.keyCode&&(n.stopPropagation(),n.preventDefault(),u.cancel())})}}),n.spreadsheet.dialogs.register("hyperlink",b))}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/sheetbinder.min",["kendo.core.min","kendo.data.min","spreadsheet/sheet.min"],n)}(function(){!function(n){var i,t;n.support.browser.msie&&n.support.browser.version<9||(i=function(n){return n},t=n.Class.extend({init:function(n){this.options=$.extend({},this.options,n),this.columns=this._normalizeColumns(this.options.columns),this._sheet(),this._dataSource(),this._header(),this._boundRowsCount=0,this.dataSource.fetch()},_sheet:function(){this.sheet=this.options.sheet,this._sheetChangeHandler=this._sheetChange.bind(this),this._sheetDeleteRowHandler=this._sheetDeleteRow.bind(this),this._sheetInsertRowHandler=this._sheetInsertRow.bind(this),this.sheet.bind("change",this._sheetChangeHandler).bind("afterDeleteRow",this._sheetDeleteRowHandler).bind("afterInsertRow",this._sheetInsertRowHandler)},_sheetInsertRow:function(n){void 0!==n.index&&this.dataSource.insert(Math.max(n.index-1,0),{})},_sheetDeleteRow:function(n){var i,t;void 0!==n.index&&(i=this.dataSource,t=i.view()[n.index-1],t&&i.remove(t))},_header:function(){this.sheet.batch(function(){this.columns.forEach(function(n,t){this.sheet.range(0,t).value(n.title)}.bind(this))}.bind(this))},_sheetChange:function(t){var r,f,u,e,h,o,s;t.insertRow||t.deleteRow||t.recalc&&t.ref&&(r=this.dataSource,f=r.view(),u=this.columns,r.reader.model&&(e=r.reader.model.fields),!u.length&&f.length&&(u=Object.keys(f[0].toJSON())),h=u.map(function(t){var r=t.field;return r&&e&&e[r]&&"date"==e[r].type?n.spreadsheet.numberToDate:i}),this._skipRebind=!0,o=this.sheet._grid.normalize(t.ref),s=this.sheet.range(o).values(),o.forEach(function(n){var e,o,i,c,t;for(n=n.toRangeRef(),o=0,i=n.topLeft.row;i<=n.bottomRight.row;i++){for(e=f[i-1],e||(e=r.insert(i-1,{}),f=r.view()),c=0,t=n.topLeft.col;t<=n.bottomRight.col&&t<u.length;t++)e.set(u[t].field,h[t](s[o][c++]));o++}}),this._boundRowsCount=r.view().length,this._skipRebind=!1)},_normalizeColumns:function(n){return n.map(function(n){var t=n.field||n;return{field:t,title:n.title||t}})},_dataSource:function(){var i=this.options,t=i.dataSource;t=Array.isArray(t)?{data:t}:t,this.dataSource&&this._changeHandler?this.dataSource.unbind("change",this._changeHandler):this._changeHandler=this._change.bind(this),this.dataSource=n.data.DataSource.create(t).bind("change",this._changeHandler)},_change:function(){var t,i,r;this._skipRebind||(t=this.dataSource.view(),i=this.columns,!i.length&&t.length&&(this.columns=i=this._normalizeColumns(Object.keys(t[0].toJSON())),this._header()),r=i.map(function(t){return n.getter(t.field)}),this.sheet.batch(function(){for(var i,u,f=Math.max(t.length,this._boundRowsCount),n=0;n<f;n++)for(i=0;i<r.length;i++)u=t[n]?r[i](t[n]):null,this.sheet.range(n+1,i).value(u)}.bind(this)),this._boundRowsCount=t.length)},destroy:function(){this.dataSource.unbind("change",this._changeHandler),this.sheet.unbind("change",this._sheetChangeHandler).unbind("deleteRow",this._sheetDeleteRowHandler).unbind("insertRow",this._sheetInsertRowHandler)},options:{columns:[]}}),n.spreadsheet.SheetDataSourceBinder=t)}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/filtermenu.min",["kendo.core.min","kendo.popup.min","kendo.treeview.min","kendo.numerictextbox.min","kendo.datepicker.min","kendo.datetimepicker.min"],n)}(function(){!function(n){function v(n){for(var i={},r=[],t=0;t<n.length;t++)i[n[t].value]?!i[n[t].value].checked&&n[t].checked&&(i[n[t].value].checked=!0):(i[n[t].value]=n[t],r.push(n[t]));return r}function h(t,i){for(var r,c,u,o,e=!1,s=t instanceof n.data.HierarchicalDataSource&&t.data(),f=0;f<s.length;f++)r=s[f],c=(""+r.text).toLowerCase(),u=i===!0||""===i||c.indexOf(i)>=0,o=h(r.children,u||i),e=e||o||u,r.hidden=!u&&!o,r.checked=!r.hidden;return s&&t.filter({field:"hidden",operator:"neq",value:!0}),e}function c(t){for(var i,u=t instanceof n.data.HierarchicalDataSource&&t.data(),r=0;r<u.length;r++)i=u[r],i.checked=!1,i.hasChildren&&c(i.children)}function a(n){var t,i,u=f.operators,r=[];for(t in n)if(n.hasOwnProperty(t))for(i in n[t])n[t].hasOwnProperty(i)&&r.push({text:u[t][i],value:i,unique:t+"_"+i,type:t});return r}var i,u,r,l,f,o,s,e,t;n.support.browser.msie&&n.support.browser.version<9||(i=n.jQuery,u=n.ui.Widget,r={details:"k-details",button:"k-button",detailsSummary:"k-details-summary",detailsContent:"k-details-content",icon:"k-icon",iconCollapse:"k-i-arrow-45-down-right",iconExpand:"k-i-arrow-60-right",iconSearch:"k-i-zoom",textbox:"k-textbox",wrapper:"k-spreadsheet-filter-menu",filterByCondition:"k-spreadsheet-condition-filter",filterByValue:"k-spreadsheet-value-filter",valuesTreeViewWrapper:"k-spreadsheet-value-treeview-wrapper",actionButtons:"k-action-buttons"},l=u.extend({init:function(r,f){u.fn.init.call(this,r,f),this.element.addClass(t.classNames.details),this._summary=this.element.find("."+t.classNames.detailsSummary).on("click",this._toggle.bind(this));var e=f.expanded?t.classNames.iconCollapse:t.classNames.iconExpand;this._icon=i("<span />",{"class":t.classNames.icon+" "+e}).prependTo(this._summary),this._container=n.wrap(this._summary.next(),!0),f.expanded||this._container.hide()},options:{name:"Details"},events:["toggle"],visible:function(){return this.options.expanded},toggle:function(i){var r=n.fx(this._container).expand("vertical");r.stop()[i?"reverse":"play"](),this._icon.toggleClass(t.classNames.iconExpand,i).toggleClass(t.classNames.iconCollapse,!i),this.options.expanded=!i},_toggle:function(){var n=this.visible();this.toggle(n),this.trigger("toggle",{show:n})}}),f=n.spreadsheet.messages.filterMenu={sortAscending:"Sort range A to Z",sortDescending:"Sort range Z to A",filterByValue:"Filter by value",filterByCondition:"Filter by condition",apply:"Apply",search:"Search",addToCurrent:"Add to current selection",clear:"Clear",blanks:"(Blanks)",operatorNone:"None",and:"AND",or:"OR",operators:{string:{contains:"Text contains",doesnotcontain:"Text does not contain",startswith:"Text starts with",endswith:"Text ends with",matches:"Text matches",doesnotmatch:"Text does not match"},date:{eq:"Date is",neq:"Date is not",lt:"Date is before",gt:"Date is after"},number:{eq:"Is equal to",neq:"Is not equal to",gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than"}}},n.data.binders.spreadsheetFilterValue=n.data.Binder.extend({init:function(t,r,u){n.data.Binder.fn.init.call(this,t,r,u),this._change=i.proxy(this.change,this),i(this.element).on("change",this._change)},refresh:function(){var t=this,n=t.bindings.spreadsheetFilterValue.get();i(t.element).val(n instanceof Date?"":n)},change:function(){var n=this.element.value;this.bindings.spreadsheetFilterValue.set(n)}}),n.data.binders.widget.spreadsheetFilterValue=n.data.Binder.extend({init:function(t,r,u){n.data.Binder.fn.init.call(this,t.element[0],r,u),this.widget=t,this._change=i.proxy(this.change,this),this.widget.first("change",this._change)},refresh:function(){var r=this.bindings.spreadsheetFilterValue,n=r.get(),t=i(this.widget.element).data("filterType");this.widget.value("date"===t&&n instanceof Date||"number"===t&&!isNaN(n)?n:null)},change:function(){var t=this.widget.value(),n=this.bindings.spreadsheetFilterValue;n.set(t)}}),o={filterByValue:"<div class='"+r.detailsSummary+"'>#= messages.filterByValue #</div><div class='"+r.detailsContent+"'><div class='k-textbox k-space-right'><input placeholder='#= messages.search #' data-#=ns#bind='events: { input: filterValues }' /><span class='k-icon k-i-zoom' /></div><div data-#=ns#bind='visible: hasActiveSearch'><input class='k-checkbox' type='checkbox' data-#=ns#bind='checked: appendToSearch' id='_#=guid#' /><label class='k-checkbox-label' for='_#=guid#'>#= messages.addToCurrent #</label></div><div class='"+r.valuesTreeViewWrapper+"'><div data-#=ns#role='treeview' data-#=ns#checkboxes='{ checkChildren: true }' data-#=ns#bind='source: valuesDataSource, events: { check: valuesChange, select: valueSelect }' /></div></div>",filterByCondition:"<div class='"+r.detailsSummary+"'>#= messages.filterByCondition #</div><div class='"+r.detailsContent+'\'><div><select data-#=ns#role="dropdownlist"data-#=ns#bind="value: operator, source: operators, events: { change: operatorChange } "data-value-primitive="false"data-option-label="#=messages.operatorNone#"data-height="auto"data-text-field="text"data-value-field="unique"></select></div><div data-#=ns#bind="visible: isString"><input data-filter-type="string" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" class="k-textbox" /></div><div data-#=ns#bind="visible: isNumber"><input data-filter-type="number" data-#=ns#role="numerictextbox" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" /></div><div data-#=ns#bind="visible: isDate"><input data-filter-type="date" data-#=ns#role="datepicker" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" /></div></div>',menuItem:"<li data-command='#=command#' data-dir='#=dir#'><span class='k-icon k-i-#=iconClass#'></span>#=text#</li>",actionButtons:"<button data-#=ns#bind='click: apply' class='k-button k-primary'>#=messages.apply#</button><button data-#=ns#bind='click: clear' class='k-button'>#=messages.clear#</button>"},s=n.spreadsheet.FilterMenuViewModel=n.data.ObservableObject.extend({valuesChange:function(t){var u=t?t.sender.dataSource:this.valuesDataSource,o=function(n){return n.checked},f=function(t){return"date"===t.dataType?n.spreadsheet.dateToNumber(t.value):t.value},s=function(n,t,i){return i.lastIndexOf(n)===t},e=u.data(),i=e[0].children.data().toJSON(),r=i.filter(function(n){return"blank"===n.dataType});r=!!r.length&&r[0].checked,i=i.filter(o).map(f),this.appendToSearch&&this.valueFilter&&this.valueFilter.values.length&&(i=i.concat(this.valueFilter.values.toJSON()).sort().filter(s)),this.set("valueFilter",{values:i,blanks:r})},valueSelect:function(n){n.preventDefault();var t=n.sender.dataItem(n.node);t.set("checked",!t.checked)},hasActiveSearch:!1,appendToSearch:!1,filterValues:function(n){var r="string"==typeof n?n:i(n.target).val().toLowerCase(),t=this.valuesDataSource;this.set("hasActiveSearch",!!r),c(t),h(t,r)},reset:function(){this.set("customFilter",{logic:"and",criteria:[{operator:null,value:null}]}),this.set("valueFilter",{values:[]})},operatorChange:function(n){var t=n.sender.dataItem();this.set("operatorType",t.type),this.set("customFilter.criteria[0].operator",t.value)},isNone:function(){return void 0===this.get("operatorType")},isString:function(){return"string"===this.get("operatorType")},isNumber:function(){return"number"===this.get("operatorType")},isDate:function(){return"date"===this.get("operatorType")}}),e=n.spreadsheet.FilterMenuController={valuesTree:function(n,t){return[{text:"All",expanded:!0,checked:!0,items:this.values(n.resize({top:1}),t)}]},values:function(t,i){var r=[],o=f,e=t.column(i),u=t.sheet();return e.forEachCell(function(t,i,f){var e,s,h;u.isHiddenRow(t)||(e=f.value,s=f.dataType,h=f.text,s=void 0===e?"blank":f.format?n.spreadsheet.formatting.type(e,f.format):typeof e,h=null!==e&&f.format?n.spreadsheet.formatting.text(e,f.format):"blank"==s?o.blanks:e,"percent"===s&&(s="number"),"date"===s&&(e=n.spreadsheet.numberToDate(e)),r.push({dataType:s,value:e,text:h,checked:!0}))}),r=v(r),r.sort(function(n,t){return n.dataType===t.dataType?0:"blank"===n.dataType||"blank"===t.dataType?"blank"===n.dataType?-1:1:"number"===n.dataType||"number"===t.dataType?"number"===n.dataType?-1:1:"date"===n.dataType||"date"===t.dataType?"date"===n.dataType?-1:1:0}),r},filterType:function(n,t){var i,u,f,e=n.sheet(),r=this.filterForColumn(t,e);return r=r&&r.filter.toJSON(),r&&"custom"==r.filter&&(u=r.criteria[0].value,u instanceof Date?i="date":"string"==typeof u?i="string":"number"==typeof u&&(i="number")),i||(f=this.values(n.row(1),t)[0],i=f&&f.dataType,"blank"==i&&(i=null)),i},filterForColumn:function(n,t){var r,i=t.filter();return i&&(r=i.columns.filter(function(t){return t.index===n})[0]),r},filter:function(n,t){var i,e,u,r,f=this.filterForColumn(n,t);if(f)return i=f.filter.toJSON(),e=i.filter,delete i.filter,u={type:e,options:i},r=i.criteria,r&&r.length&&(u.operator=r[0].operator),u}},t=u.extend({init:function(n,i){u.call(this,n,i),this.element.addClass(t.classNames.wrapper),this.viewModel=new s({active:"value",operator:null,operators:a(this.options.operators),clear:this.clear.bind(this),apply:this.apply.bind(this)}),this._filterInit(),this._popup(),this._sort(),this._filterByCondition(),this._filterByValue(),this._actionButtons()},options:{name:"FilterMenu",column:0,range:null,operators:{string:{contains:"Text contains",doesnotcontain:"Text does not contain",startswith:"Text starts with",endswith:"Text ends with",matches:"Text matches",doesnotmatch:"Text does not match"},date:{eq:"Date is",neq:"Date is not",lt:"Date is before",gt:"Date is after"},number:{eq:"Is equal to",neq:"Is not equal to",gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than"}}},events:["action"],destroy:function(){u.fn.destroy.call(this),this.menu.destroy(),this.valuesTreeView.destroy(),this.popup.destroy()},openFor:function(n){this.popup.setOptions({anchor:n}),this.popup.open()},close:function(){this.popup.close()},clear:function(){this.action({command:"ClearFilterCommand",options:{column:this.options.column}}),this.viewModel.reset(),this.close()},apply:function(){var n,t,i;this._active(),n={operatingRange:this.options.range,column:this.options.column},"value"===this.viewModel.active?(this.viewModel.valuesChange({sender:this.valuesTreeView}),t=this.viewModel.valueFilter.toJSON(),(t.blanks||t.values&&t.values.length)&&(n.valueFilter=t)):"custom"===this.viewModel.active&&(i=this.viewModel.customFilter.toJSON(),i.criteria.length&&null!==i.criteria[0].value&&(n.customFilter=i)),(n.valueFilter||n.customFilter)&&this.action({command:"ApplyFilterCommand",options:n})},action:function(n){this.trigger("action",i.extend({},n))},_filterInit:function(){var t,r=this.options.column,i=this.options.range,u=i.sheet(),n=e.filter(r,u);n?(t=e.filterType(i,r),this.viewModel.set("active",n.type),this.viewModel.set(n.type+"Filter",n.options),"custom"==n.type&&(this.viewModel.set("operator",t+"_"+n.operator),this.viewModel.set("operatorType",t))):this.viewModel.reset()},_popup:function(){this.popup=this.element.kendoPopup({copyAnchorStyles:!1}).data("kendoPopup")},_sort:function(){var o=n.template(t.templates.menuItem),r=f,e=[{command:"sort",dir:"asc",text:r.sortAscending,iconClass:"sort-asc"},{command:"sort",dir:"desc",text:r.sortDescending,iconClass:"sort-desc"}],u=i("<ul />",{html:n.render(o,e)}).appendTo(this.element);this.menu=u.kendoMenu({orientation:"vertical",select:function(n){var u=i(n.item).data("dir"),t=this.options.range.resize({top:1}),r={value:u,sheet:!1,operatingRange:t,column:this.options.column};t.isSortable()?this.action({command:"SortCommand",options:r}):this.close()}.bind(this)}).data("kendoMenu")},_appendTemplate:function(t,r,u,e){var s=n.template(t),o=i("<div class='"+r+"'/>").html(s({messages:f,guid:n.guid(),ns:n.ns}));return this.element.append(o),u&&(u=new l(o,{expanded:e,toggle:this._detailToggle.bind(this)})),n.bind(o,this.viewModel),o},_detailToggle:function(n){this.element.find("[data-role=details]").not(n.sender.element).data("kendoDetails").toggle(!n.show)},_filterByCondition:function(){var n="custom"===this.viewModel.active;this._appendTemplate(t.templates.filterByCondition,t.classNames.filterByCondition,!0,n)},_filterByValue:function(){var i,u="value"===this.viewModel.active,r=this._appendTemplate(t.templates.filterByValue,t.classNames.filterByValue,!0,u);this.valuesTreeView=r.find("[data-role=treeview]").data("kendoTreeView"),i=e.valuesTree(this.options.range,this.options.column),this.viewModel.set("valuesDataSource",new n.data.HierarchicalDataSource({data:i}))},_actionButtons:function(){this._appendTemplate(t.templates.actionButtons,t.classNames.actionButtons,!1)},_active:function(){var n=this.element.find("[data-role=details]").filter(function(n,t){return i(t).data("kendoDetails").visible()});n.hasClass(t.classNames.filterByValue)?this.viewModel.set("active","value"):n.hasClass(t.classNames.filterByCondition)&&this.viewModel.set("active","custom")}}),n.spreadsheet.FilterMenu=t,i.extend(!0,t,{classNames:r,templates:o}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/editor.min",["kendo.core.min"],n)}(function(){!function(n){function i(n,t){return n&&(n.top!==t.top||n.left!==t.left)}if(!(n.support.browser.msie&&n.support.browser.version<9)){var t=n.Observable.extend({init:function(t){n.Observable.fn.init.call(this),this.view=t,this.formulaBar=t.formulaBar,this._active=!1,this.barInput=t.formulaBar.formulaInput,this.cellInput=t.formulaInput,this.barInput.syncWith(this.cellInput),this.cellInput.syncWith(this.barInput),this.barInput.bind("keyup",this._triggerUpdate.bind(this)),this.cellInput.bind("keyup",this._triggerUpdate.bind(this)),this.barInput.bind("blur",this._blur.bind(this)),this.cellInput.bind("blur",this._blur.bind(this))},events:["activate","deactivate","change","update"],_blur:function(){this.deactivate()},_triggerUpdate:function(){this.trigger("update",{value:this.value()})},activeEditor:function(){var t=null,i=n._activeElement();return this.barElement()[0]===i?t=this.barInput:this.cellElement()[0]===i&&(t=this.cellInput),t},activate:function(n){return this._active=!0,this._rect=n.rect,this.cellInput.position(n.rect),this.cellInput.resize(n.rect),this.cellInput.tooltip(n.tooltip),this.cellInput.activeCell=this.barInput.activeCell=n.range.topLeft,this.trigger("activate"),this},deactivate:function(){var n=this.cellInput;this._active&&(n.value()!=this._value&&this.trigger("change",{value:n.value()}),this._active=!1,this._rect=null,n.hide(),this.trigger("deactivate"))},enable:function(n){this.barInput.enable(n),this.cellInput.enable(n)},barElement:function(){return this.barInput.element},cellElement:function(){return this.cellInput.element},focus:function(n){n=n||"cell","cell"===n?(this.cellInput.element.focus(),this.cellInput.end()):this.barInput.element.focus()},isActive:function(){return this._active},isFiltered:function(){return this.barInput.popup.visible()||this.cellInput.popup.visible()},canInsertRef:function(n){var t=this.activeEditor();return t&&t.canInsertRef(n)},highlightedRefs:function(){var t=this.activeEditor(),n=[];return t&&(n=t.highlightedRefs()),n},scale:function(){this.cellInput.scale()},toggleTooltip:function(n){this.cellInput.toggleTooltip(i(this._rect,n))},value:function(n){return void 0===n?this.barInput.value():(null===n&&(n=""),this._value=n,this.barInput.value(n),void this.cellInput.value(n))},insertNewline:function(){this.activeEditor().insertNewline(),this.scale()},select:function(){this.activeEditor().select()}});n.spreadsheet.SheetEditor=t}}(kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/autofill.min",["spreadsheet/runtime.min","spreadsheet/range.min"],n)}(function(){"use strict";function s(n){for(var i,h,f,o,u=n.length,c=(u+1)/2,s=n.reduce(function(n,t){return n+t},0)/u,e=0,r=0,t=0;t<u;t++)i=t+1-c,h=n[t]-s,e+=i*h,r+=i*i;return r?(f=e/r,o=s-f*c,function(n){return o+f*(n+1)}):function(t){return n[t%n.length]}}function c(n){function f(n){for(var i=n[1]-n[0],t=2;t<n.length;++t)if(n[t]-n[t-1]!=i)return null;return i}function i(n){return n.map(function(n){return n.number})}var r=[],t=n.map(function(n){return n.formula||n.value});return p(t,function(u,e,o,c){var a,l,y,p,v;for("number"==o?(l=i(c),1==l.length&&(u>0||e<t.length||"date"==h(l[0],n[u].format))&&l.push(l[0]+1),a=s(l)):"string"==o||"formula"==o||"boolean"==o?a=function(n,i){return t[i]}:Array.isArray(o)?1==c.length?a=function(n){return o[(c[0].number+n)%o.length]}:(y=f(i(c)),a=null==y?function(n){return c[n%c.length].value}:function(n){var t=c[0].number+y*n;return o[t%o.length]}):"null"!=o?(l=i(c),1==l.length&&l.push(l[0]+1),l=s(l),a=function(n,i){return t[i].replace(/^(.*\D)\d+/,"$1"+l(n,i))}):a=function(){return null},p={f:a,begin:u,end:e,len:e-u},v=u;v<e;++v)r[v]=p}),function(i,f){var s=r[f],h=i/t.length|0,c=i%t.length,l=h*s.len+c-s.begin,o=s.f(l,f),e=a(n[f]);return delete e.enable,o instanceof u?e.formula=o:e.value=o,e}}function h(n,t){if(null!=t)return r.formatting.type(n,t)}function a(n){var t={};return Object.keys(n||{}).forEach(function(i){t[i]=n[i]}),t}function p(n,t){for(var f,u=null,r=0,e=[],i=0;i<n.length;++i)f=y(n[i]),e.push(f),null!=u&&f.type!==u.type&&(t(r,i,u.type,e.slice(r,i)),r=i),u=f;t(r,i,u.type,e.slice(r,i))}function y(n){var i,t;if("number"==typeof n)return{type:"number",number:n};if("string"==typeof n)return(i=l(n))?i:(t=/^(.*\D)(\d+)/.exec(n),t?(n=n.replace(/^(.*\D)\d+/,"$1-######"),{type:n,match:t,number:parseFloat(t[2])}):{type:"string"});if("boolean"==typeof n)return{type:"boolean"};if(null==n)return{type:"null"};if(n instanceof u)return{type:"formula"};throw window.console.error(n),Error("Cannot fill data");}function v(){var n=kendo.culture();return[n.calendars.standard.days.namesAbbr,n.calendars.standard.days.names,n.calendars.standard.months.namesAbbr,n.calendars.standard.months.names]}function l(n){for(var i,t,f,e=n.toLowerCase(),u=v(),r=0;r<u.length;++r)for(i=u[r],t=i.length;--t>=0;)if(f=i[t].toLowerCase(),f==e)return{type:i,number:t,value:n}}function f(n){for(var i,u=n.length,f=n[0].length,r=[],t=0;t<f;++t)for(r[t]=[],i=0;i<u;++i)r[t][i]=n[i][t];return r}var r,i,o,u,t,e,n;kendo.support.browser.msie&&kendo.support.browser.version<9||(r=kendo.spreadsheet,i=r.Range,o=r.calc.runtime,u=o.Formula,t="incompatibleRanges",e="noFillDirection",n=i.FillError=function(n){this.code=n},i.prototype._previewFillFrom=function(i,r){var o,u,y,w,h,p,v,a,l,nt,g,s,tt,k,b=this,d=b._sheet;if("string"==typeof i&&(i=d.range(i)),o=i._ref.toRangeRef(),u=b._ref.toRangeRef(),o.intersects(u)){if(o.eq(u))return null;if(u=u.clone(),o.topLeft.eq(u.topLeft))if(o.width()==u.width())u.topLeft.row+=o.height(),r=0;else{if(o.height()!=u.height())throw new n(t);u.topLeft.col+=o.width(),r=1}else{if(!o.bottomRight.eq(u.bottomRight))throw new n(t);if(o.width()==u.width())u.bottomRight.row-=o.height(),r=2;else{if(o.height()!=u.height())throw new n(t);u.bottomRight.col-=o.width(),r=3}}return d.range(u)._previewFillFrom(i,r)}if(null==r)if(o.topLeft.col==u.topLeft.col)r=o.topLeft.row<u.topLeft.row?0:2;else{if(o.topLeft.row!=u.topLeft.row)throw new n(e);r=o.topLeft.col<u.topLeft.col?1:3}if(y=1&r,w=2&r,y&&o.height()!=u.height()||!y&&o.width()!=u.width())throw new n(t);for(h=i._properties(),y?p=u.width():(h=f(h),p=u.height()),v=Array(h.length),a=0;a<h.length;++a)for(l=h[a],nt=c(l),g=v[a]=Array(p),s=0;s<p;++s)tt=w?-s-1:l.length+s,k=w?l.length-s%l.length-1:s%l.length,g[w?p-s-1:s]=nt(tt,k);return y||(v=f(v)),{props:v,direction:r,dest:b}},i.prototype.fillFrom=function(n,t){var i=this._previewFillFrom(n,t);return i.dest._properties(i.props),i.dest})},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/nameeditor.min",["kendo.core.min"],n)}(function(){!function(n){var t,r,i;n.support.browser.msie&&n.support.browser.version<9||(t=n.jQuery,r={input:"k-spreadsheet-name-editor",list:"k-spreadsheet-name-list"},i=n.ui.Widget.extend({init:function(i,u){var e,f,o;n.ui.Widget.call(this,i,u),i.addClass(r.input),e=u.messages.nameBox||"Name Box",f=new n.data.DataSource({transport:{read:function(t){var i=[];this._workbook.forEachName(function(t){!t.hidden&&t.value instanceof n.spreadsheet.Ref&&i.push({name:t.name})}),t.success(i)}.bind(this),cache:!1}}),o=t("<input />").attr("title",e).attr("aria-label",e),this.combo=o.appendTo(i).kendoComboBox({clearButton:!1,dataTextField:"name",dataValueField:"name",template:"#:data.name#<a class='k-button-delete' href='\\#'><span class='k-icon k-i-close'></span></a>",dataSource:f,autoBind:!1,ignoreCase:!0,change:this._on_listChange.bind(this),noDataTemplate:"<div></div>",open:function(){f.read()}}).getKendoComboBox(),this.combo.input.on("keydown",this._on_keyDown.bind(this)).on("focus",this._on_focus.bind(this)),this.combo.popup.element.addClass("k-spreadsheet-names-popup").on("mousemove",function(n){n.stopPropagation()}).on("click",".k-button-delete",function(n){n.preventDefault(),n.stopPropagation();var i=t(n.target).closest(".k-item");i=this.combo.dataItem(i),this._deleteItem(i.name)}.bind(this))},value:function(n){return void 0===n?this.combo.value():void this.combo.value(n)},_deleteItem:function(n){this.trigger("delete",{name:n})},_on_keyDown:function(n){switch(n.keyCode){case 27:this.combo.value(this._prevValue),this.trigger("cancel");break;case 13:this.trigger("enter")}},_on_focus:function(){this._prevValue=this.combo.value()},_on_listChange:function(){var n=this.combo.value();n&&this.trigger("select",{name:n})}}),n.spreadsheet.NameEditor=i)}(window.kendo)},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("spreadsheet/print.min",["kendo.pdf.min","spreadsheet/sheet.min","spreadsheet/range.min","spreadsheet/references.min","spreadsheet/numformat.min","util/text-metrics.min"],n)}(function(){"use strict";function h(n,t){var i=0,u=[],f=.2*t,r=t;return n.forEach(function(n){t&&i+n>r&&(r-i<f&&(i=t*Math.ceil(i/t)),r+=t*Math.ceil(n/t)),u.push(i),i+=n}),u.push(i),u}function v(n,t,i){var f,e,r,u,v,w,y,tt,o,nt,l,a,g,b,it=n._grid;return t=it.normalize(t),f=[],e=[],r=[],u=n._getMergedCells(t),v=-1,w=-1,n.forEach(t,function(o,h,c){var b,a,l,p=o-t.topLeft.row,y=h-t.topLeft.col,g=n.rowHeight(o),d=n.columnWidth(h);y||e.push(g),p||r.push(d),!n.isHiddenColumn(h)&&!n.isHiddenRow(o)&&g&&d&&(b=i.forScreen||k(c),(i.emptyCells||b)&&(a=new s(o,h).print(),u.secondary[a]||(b?(v=Math.max(v,p),w=Math.max(w,y)):c.empty=!0,c.row=p,c.col=y,l=u.primary[a],l?(delete u.primary[a],c.merged=!0,c.rowspan=l.height(),c.colspan=l.width(),i.forScreen&&(c.width=n._columns.sum(l.topLeft.col,l.bottomRight.col),c.height=n._rows.sum(l.topLeft.row,l.bottomRight.row))):(c.rowspan=1,c.colspan=1),f.push(c))))}),e=e.slice(0,v+1),r=r.slice(0,w+1),y=i.pageWidth,tt=i.pageHeight,o=1,i.fitWidth&&(nt=r.reduce(p,0),nt>y&&(o=y/nt,y/=o,tt/=o)),l=h(e,tt||0),a=h(r,y||0),g=0,b=0,f=f.filter(function(n){return(!n.empty||!(n.row>v||n.col>w))&&(n.left=a[n.col],n.top=l[n.row],n.merged?i.forScreen?(n.right=n.left+n.width,n.bottom=n.top+n.height):(n.right=c(a,n.col+n.colspan),n.bottom=c(l,n.row+n.rowspan),n.width=n.right-n.left,n.height=n.bottom-n.top):(n.width=r[n.col],n.height=e[n.row],n.bottom=n.top+n.height,n.right=n.left+n.width),g=Math.max(g,n.right),b=Math.max(b,n.bottom),!0)}),Object.keys(u.primary).forEach(function(i){var r=u.primary[i];n.forEach(r.topLeft.toRangeRef(),function(i,u,e){var s=i-t.topLeft.row,o=u-t.topLeft.col;e.merged=!0,e.colspan=r.height(),e.rowspan=r.width(),e.top=s<0?-n._rows.sum(i,i-s-1):l[s],e.left=o<0?-n._columns.sum(u,u-o-1):a[o],e.height=n._rows.sum(r.topLeft.row,r.bottomRight.row),e.width=n._columns.sum(r.topLeft.col,r.bottomRight.col),e.height>0&&e.width>0&&(e.right=e.left+e.width,e.bottom=e.top+e.height,f.push(e))})}),{width:g,height:b,cells:f.sort(d),scale:o,xCoords:a,yCoords:l}}function l(n,t){return n.size===t.size&&n.color===t.color}function p(n,t){return n+t}function c(n,t){return t<n.length?n[t]:n[n.length-1]}function k(n){return null!=n.value||n.merged||null!=n.background||null!=n.borderTop||null!=n.borderRight||null!=n.borderBottom||null!=n.borderLeft||null!=n.validation&&!n.validation.value}function d(n,t){return n.top<t.top?-1:n.top==t.top?n.left<t.left?-1:n.left==t.left?0:1:1}function a(n,i,f){function l(o,s){var nt,l,d,a,k,g,y=s*h,tt=y+h,v=o*c,it=v+c,p=0,b=0,rt=n.cells.filter(function(n){return!(n.right<=y||n.left>=tt||n.bottom<=v||n.top>=it)&&(p=Math.max(n.bottom,p),b=Math.max(n.right,b),!0)});rt.length>0&&(nt=new t.Group,i.append(nt),nt.clip(t.Path.fromRect(new r.Rect([0,0],[f.pageWidth,f.pageHeight]))),l=new t.Group,nt.append(l),d=r.Matrix.scale(n.scale,n.scale).multiplyCopy(r.Matrix.translate(-y,-v)),(f.hCenter||f.vCenter)&&(d=d.multiplyCopy(r.Matrix.translate(f.hCenter?(tt-b)/2:0,f.vCenter?(it-p)/2:0))),l.transform(d),f.guidelines&&(a=null,n.xCoords.forEach(function(n){n=Math.min(n,b),n!==a&&n>=y&&n<=tt&&(a=n,l.append((new t.Path).moveTo(n,v).lineTo(n,p).close().stroke("#aaa",u)))}),a=null,n.yCoords.forEach(function(n){n=Math.min(n,p),n!==a&&n>=v&&n<=it&&(a=n,l.append((new t.Path).moveTo(y,n).lineTo(b,n).close().stroke("#aaa",u)))})),k=e(),rt.forEach(function(n){w(n,l,f),k.add(n)}),g=new t.Group,k.vert.forEach(function(n){n.forEach(function(n){n.rendered||(n.rendered=!0,g.append((new t.Path).moveTo(n.x,n.top).lineTo(n.x,n.bottom).close().stroke(n.color,n.size)))})}),k.horiz.forEach(function(n){n.forEach(function(n){n.rendered||(n.rendered=!0,g.append((new t.Path).moveTo(n.left,n.y).lineTo(n.right,n.y).close().stroke(n.color,n.size)))})}),l.append(g))}for(var o,a=Math.ceil(n.width/f.pageWidth),v=Math.ceil(n.height/f.pageHeight),h=f.pageWidth/n.scale,c=f.pageHeight/n.scale,s=0;s<a;++s)for(o=0;o<v;++o)l(o,s)}function w(n,i,f){var l,s,e,v,c,h,a=new t.Group;if(i.append(a),l=new r.Rect([n.left,n.top],[n.width,n.height]),(n.background||n.merged)&&(s=l,f.guidelines&&(s=l.clone(),s.origin.x+=u/2,s.origin.y+=u/2,s.size.width-=u,s.size.height-=u),a.append(new t.Rect(s).fill(n.background||"#fff").stroke(null))),e=n.value,null!=e){if(v="number"==typeof e?"number":null,c=new t.Group,c.clip(t.Path.fromRect(l)),a.append(c),n.format?(h=o.textAndColor(e,n.format),e=h.text,h.type&&(v=h.type)):e+="",!n.textAlign)switch(v){case"number":case"date":case"percent":n.textAlign="right";break;case"boolean":n.textAlign="center"}y(e,h&&h.color||n.color||"#000",n,c)}}function y(t,i,u,f){var e,o;switch(n||(n=document.createElement("div"),n.style.position="absolute",n.style.left="-10000px",n.style.top="-10000px",n.style.overflow="hidden",n.style.boxSizing="border-box",n.style.padding="2px 4px",n.style.lineHeight="normal",document.body.appendChild(n)),n.style.color=i,n.style.font=b(u),n.style.width=u.width+"px",n.style.textAlign=u.textAlign||"left",n.style.textDecoration=u.underline?"underline":"none",u.wrap?(n.style.whiteSpace="pre-wrap",n.style.overflowWrap=n.style.wordWrap="break-word"):(n.style.whiteSpace="pre",n.style.overflowWrap=n.style.wordWrap="normal"),n.firstChild&&n.removeChild(n.firstChild),n.appendChild(document.createTextNode(t)),e=0,u.verticalAlign){case"center":e=u.height-n.offsetHeight>>1;break;case void 0:case null:case"bottom":e=u.height-n.offsetHeight}e<0&&(e=0),o=kendo.drawing.drawDOM.drawText(n),o.transform(r.Matrix.translate(1e4+u.left,1e4+u.top+e)),f.append(o)}function b(n){var t=[];return n.italic&&t.push("italic"),n.bold&&t.push("bold"),t.push((n.fontSize||12)+"px"),t.push(n.fontFamily||"Arial"),t.join(" ")}function f(n,r,u,f){var o,e,h,s,c;null==u&&null==f&&(f=r,u={},r=i.SHEETREF),null==f&&(f=u,r instanceof i.Range||r instanceof i.Ref||"string"==typeof r?u={}:(u=r,r=i.SHEETREF)),u=kendo.jQuery.extend({paperSize:"A4",landscape:!0,margin:"1cm",guidelines:!0,emptyCells:!0,fitWidth:!1,center:!1},u),o=new t.Group,e=kendo.pdf.getPaperOptions(u),o.options.set("pdf",{author:u.author,creator:u.creator,date:u.date,keywords:u.keywords,margin:e.margin,multiPage:!0,paperSize:e.paperSize,subject:u.subject,title:u.title}),h=e.paperSize[0],s=e.paperSize[1],e.margin&&(h-=e.margin.left+e.margin.right+1,s-=e.margin.top+e.margin.bottom+1),u.pageWidth=h,u.pageHeight=s,c=v(n,n._ref(r),u),a(c,o,u),f(o)}function e(){function u(n){n.borderLeft&&r(n.row,n.col,n.borderLeft,n.left,n.top,n.bottom),n.borderRight&&r(n.row,n.col+n.colspan,n.borderRight,n.right,n.top,n.bottom),n.borderTop&&i(n.row,n.col,n.borderTop,n.top,n.left,n.right),n.borderBottom&&i(n.row+n.rowspan,n.col,n.borderBottom,n.bottom,n.left,n.right)}function r(n,i,r,u,f,e){var s=t[i]||(t[i]=[]),o=n>0&&s[n-1];o&&l(o,r)?(s[n]=o,o.bottom=e):s[n]={size:r.size,color:r.color,x:u,top:f,bottom:e}}function i(t,i,r,u,f,e){var s=n[t]||(n[t]=[]),o=i>0&&s[i-1];o&&l(o,r)?(s[i]=o,o.right=e):s[i]={size:r.size,color:r.color,y:u,left:f,right:e}}var n=[],t=[];return{add:u,horiz:n,vert:t}}var i,s,t,o,r,u,n;kendo.support.browser.msie&&kendo.support.browser.version<9||(i=kendo.spreadsheet,s=i.CellRef,t=kendo.drawing,o=i.formatting,r=kendo.geometry,u=.8,i.Sheet.prototype.draw=function(n,t,i){var r=this;r._workbook?r.recalc(r._workbook._context,function(){f(r,n,t,i)}):f(r,n,t,i)},i.draw={Borders:e,doLayout:v,drawLayout:a})},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.spreadsheet.min",["util/undoredostack.min","util/text-metrics.min","util/parse-xml.min","kendo.excel.min","kendo.progressbar.min","kendo.pdf.min","spreadsheet/commands.min","spreadsheet/formulabar.min","spreadsheet/formulainput.min","spreadsheet/eventlistener.min","spreadsheet/rangelist.min","spreadsheet/propertybag.min","spreadsheet/references.min","spreadsheet/navigator.min","spreadsheet/axismanager.min","spreadsheet/clipboard.min","spreadsheet/range.min","spreadsheet/sheet.min","spreadsheet/sheetsbar.min","spreadsheet/excel-reader.min","spreadsheet/workbook.min","spreadsheet/formulacontext.min","spreadsheet/controller.min","spreadsheet/view.min","spreadsheet/customeditors.min","spreadsheet/grid.min","spreadsheet/axis.min","spreadsheet/filter.min","spreadsheet/sorter.min","spreadsheet/runtime.min","spreadsheet/calc.min","spreadsheet/numformat.min","spreadsheet/runtime.functions.min","spreadsheet/runtime.functions.2.min","spreadsheet/toolbar.min","spreadsheet/dialogs.min","spreadsheet/sheetbinder.min","spreadsheet/filtermenu.min","spreadsheet/editor.min","spreadsheet/autofill.min","spreadsheet/nameeditor.min","spreadsheet/print.min"],n)}(function(){return function(n,t){var i,h,e,s,c,u,f,o,r;n.support.browser.msie&&n.support.browser.version<9||(i=n.jQuery,h=n.ui.Widget,e=n.spreadsheet.Workbook,s=n.spreadsheet.Controller,c=n.spreadsheet.View,u=".kendoSpreadsheet",f={recalc:!0,selection:!0,activeCell:!0,layout:!0,sheetSelection:!0,resize:!0,editorChange:!1,editorClose:!1},o={wrapper:"k-widget k-spreadsheet"},r=n.ui.Widget.extend({init:function(n,t){h.fn.init.call(this,n,t),this.element.addClass(r.classNames.wrapper),this._view=new c(this.element,{messages:this.options.messages.view,toolbar:this.options.toolbar,sheetsbar:this.options.sheetsbar}),this._workbook=new e(this.options,this._view),this._controller=new s(this._view,this._workbook),this._autoRefresh=!0,this._bindWorkbookEvents(),this._view.workbook(this._workbook),this.refresh(),this._resizeHandler=function(){this.resize()}.bind(this),i(window).on("resize"+u,this._resizeHandler)},_resize:function(){this.refresh({layout:!0})},_workbookChange:function(t){if(this._autoRefresh&&this.refresh(t),t.recalc&&t.ref){var i=t.range||new n.spreadsheet.Range(t.ref,this.activeSheet());this.trigger("change",{range:i})}},_workbookCut:function(n){this.trigger("cut",n)},_workbookCopy:function(n){this.trigger("copy",n)},_workbookPaste:function(n){this.trigger("paste",n)},activeSheet:function(n){return this._workbook.activeSheet(n)},moveSheetToIndex:function(n,t){return this._workbook.moveSheetToIndex(n,t)},insertSheet:function(n){return this._workbook.insertSheet(n)},sheets:function(){return this._workbook.sheets()},removeSheet:function(n){return this._workbook.removeSheet(n)},sheetByName:function(n){return this._workbook.sheetByName(n)},sheetIndex:function(n){return this._workbook.sheetIndex(n)},sheetByIndex:function(n){return this._workbook.sheetByIndex(n)},renameSheet:function(n,t){return this._workbook.renameSheet(n,t)},refresh:function(n){return n||(n=f),n.editorClose||(this._view.sheet(this._workbook.activeSheet()),this._controller.sheet(this._workbook.activeSheet()),this._workbook.refresh(n)),n.editorChange||(this._view.refresh(n),this._controller.refresh(),this._view.render(),this.trigger("render")),this},openDialog:function(n,t){return this._view.openDialog(n,t)},autoRefresh:function(n){return n!==t?(this._autoRefresh=n,n===!0&&this.refresh(),this):this._autoRefresh},toJSON:function(){return this._workbook.toJSON()},fromJSON:function(n){n.sheets?(this._workbook.destroy(),this._workbook=new e(i.extend({},this.options,n)),this._bindWorkbookEvents(),this._view.workbook(this._workbook),this._controller.workbook(this._workbook),this.activeSheet(this.activeSheet())):this.refresh()},fromFile:function(n,t){return this._workbook.fromFile(n,t)},saveAsPDF:function(n){this._workbook.saveAsPDF(i.extend({},this.options.pdf,n,{workbook:this._workbook}))},saveAsExcel:function(n){this._workbook.saveAsExcel(n)},draw:function(n,t){this._workbook.draw(n,t)},_workbookExcelExport:function(n){this.trigger("excelExport",n)&&n.preventDefault()},_workbookExcelImport:function(n){this.trigger("excelImport",n)?n.preventDefault():this._initProgress(n.promise)},_initProgress:function(t){var r=i("<div class='k-loading-mask' style='width: 100%; height: 100%; top: 0;'><div class='k-loading-color'/></div>").appendTo(this.element),u=i("<div class='k-loading-progress'>").appendTo(r).kendoProgressBar({type:"chunk",chunkCount:10,min:0,max:1,value:0}).data("kendoProgressBar");t.progress(function(n){u.value(n.progress)}).always(function(){n.destroy(r),r.remove()})},_workbookPdfExport:function(n){this.trigger("pdfExport",n)&&n.preventDefault()},_workbookInsertSheet:function(n){this.trigger("insertSheet",n)&&n.preventDefault()},_workbookRemoveSheet:function(n){this.trigger("removeSheet",n)&&n.preventDefault()},_workbookSelectSheet:function(n){this.trigger("selectSheet",n)&&n.preventDefault()},_workbookRenameSheet:function(n){this.trigger("renameSheet",n)&&n.preventDefault()},_workbookInsertRow:function(n){this.trigger("insertRow",n)&&n.preventDefault()},_workbookInsertColumn:function(n){this.trigger("insertColumn",n)&&n.preventDefault()},_workbookDeleteRow:function(n){this.trigger("deleteRow",n)&&n.preventDefault()},_workbookDeleteColumn:function(n){this.trigger("deleteColumn",n)&&n.preventDefault()},_workbookHideRow:function(n){this.trigger("hideRow",n)&&n.preventDefault()},_workbookHideColumn:function(n){this.trigger("hideColumn",n)&&n.preventDefault()},_workbookUnhideRow:function(n){this.trigger("unhideRow",n)&&n.preventDefault()},_workbookUnhideColumn:function(n){this.trigger("unhideColumn",n)&&n.preventDefault()},_workbookSelect:function(n){this.trigger("select",n)},_workbookChangeFormat:function(n){this.trigger("changeFormat",n)},_bindWorkbookEvents:function(){this._workbook.bind("cut",this._workbookCut.bind(this)),this._workbook.bind("copy",this._workbookCopy.bind(this)),this._workbook.bind("paste",this._workbookPaste.bind(this)),this._workbook.bind("change",this._workbookChange.bind(this)),this._workbook.bind("excelExport",this._workbookExcelExport.bind(this)),this._workbook.bind("excelImport",this._workbookExcelImport.bind(this)),this._workbook.bind("pdfExport",this._workbookPdfExport.bind(this)),this._workbook.bind("insertSheet",this._workbookInsertSheet.bind(this)),this._workbook.bind("removeSheet",this._workbookRemoveSheet.bind(this)),this._workbook.bind("selectSheet",this._workbookSelectSheet.bind(this)),this._workbook.bind("renameSheet",this._workbookRenameSheet.bind(this)),this._workbook.bind("insertRow",this._workbookInsertRow.bind(this)),this._workbook.bind("insertColumn",this._workbookInsertColumn.bind(this)),this._workbook.bind("deleteRow",this._workbookDeleteRow.bind(this)),this._workbook.bind("deleteColumn",this._workbookDeleteColumn.bind(this)),this._workbook.bind("hideRow",this._workbookHideRow.bind(this)),this._workbook.bind("hideColumn",this._workbookHideColumn.bind(this)),this._workbook.bind("unhideRow",this._workbookUnhideRow.bind(this)),this._workbook.bind("unhideColumn",this._workbookUnhideColumn.bind(this)),this._workbook.bind("select",this._workbookSelect.bind(this)),this._workbook.bind("changeFormat",this._workbookChangeFormat.bind(this))},destroy:function(){n.ui.Widget.fn.destroy.call(this),this._workbook.destroy(),this._controller.destroy(),this._view.destroy(),this._resizeHandler&&i(window).off("resize"+u,this._resizeHandler)},options:{name:"Spreadsheet",toolbar:!0,sheetsbar:!0,rows:200,columns:50,rowHeight:20,columnWidth:64,headerHeight:20,headerWidth:32,excel:{proxyURL:"",fileName:"Workbook.xlsx"},messages:{},pdf:{area:"workbook",fileName:"Workbook.pdf",proxyURL:"",paperSize:"a4",landscape:!0,margin:null,title:null,author:null,subject:null,keywords:null,creator:"Kendo UI PDF Generator v."+n.version,date:null},defaultCellStyle:{fontFamily:"Arial",fontSize:"12"}},defineName:function(n,t,i){return this._workbook.defineName(n,t,i)},undefineName:function(n){return this._workbook.undefineName(n)},nameValue:function(n){return this._workbook.nameValue(n)},forEachName:function(n){return this._workbook.forEachName(n)},cellContextMenu:function(){return this._view.cellContextMenu},rowHeaderContextMenu:function(){return this._view.rowHeaderContextMenu},colHeaderContextMenu:function(){return this._view.colHeaderContextMenu},events:["cut","copy","paste","pdfExport","excelExport","excelImport","change","render","removeSheet","selectSheet","renameSheet","insertRow","insertColumn","deleteRow","insertSheet","deleteColumn","hideRow","hideColumn","unhideRow","unhideColumn","select","changeFormat"]}),n.spreadsheet.ALL_REASONS=f,n.ui.plugin(r),i.extend(!0,r,{classNames:o}))}(window.kendo),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.pivot.configurator.min",["kendo.dom.min"],n)}(function(){return function(n){function l(n){for(var i,t=0,r=n.length;t<r;t++)if(2==n[t].type){i=!0;break}i&&n.splice(t+1,0,{caption:"KPIs",defaultHierarchy:"[KPIs]",name:"KPIs",uniqueName:"[KPIs]"})}function s(n){return{name:n.uniqueName,type:n.type}}function v(n){for(var t=0,i=n.length;t<i;t++)n[t].uniqueName=n[t].name,n[t].type="kpi";return n}function h(t){var i=n(t).closest(".k-pivot-setting");return i.length?i.data("kendoPivotSettingTarget"):null}function r(n,t,i){return{hierarchyUniqueName:n,uniqueName:t,caption:t,measure:t,name:t,type:i,kpi:!0}}function c(n){var t=n.name;return[r(t,n.value,"value"),r(t,n.goal,"goal"),r(t,n.status,"status"),r(t,n.trend,"trend")]}var i=window.kendo,o=i.ui,e=o.Widget,u=".kendoPivotConfigurator",y="mouseenter"+u+" mouseleave"+u,f=i.template('<p class="k-reset"><span class="k-icon #=icon#"></span>${name}</p><div class="k-list-container k-reset"/>'),a=e.extend({init:function(n,t){e.fn.init.call(this,n,t),this.element.addClass("k-widget k-fieldselector k-alt k-edit-form-container"),this._dataSource(),this._layout(),this.refresh(),i.notify(this)},events:[],options:{name:"PivotConfigurator",filterable:!1,sortable:!1,messages:{measures:"Drop Data Fields Here",columns:"Drop Column Fields Here",rows:"Drop Rows Fields Here",measuresLabel:"Measures",columnsLabel:"Columns",rowsLabel:"Rows",fieldsLabel:"Fields"}},_dataSource:function(){var t=this;t.dataSource&&t._refreshHandler?t.dataSource.unbind("change",t._refreshHandler).unbind("error",t._errorHandler).unbind("progress",t._progressHandler):(t._errorHandler=n.proxy(t._error,t),t._refreshHandler=n.proxy(t.refresh,t),t._progressHandler=n.proxy(t._requestStart,t)),t.dataSource=i.data.PivotDataSource.create(t.options.dataSource),t.dataSource.bind("change",t._refreshHandler).bind("error",t._errorHandler).bind("progress",t._progressHandler)},setDataSource:function(n){this.options.dataSource=n,this._dataSource(),this.measures&&this.measures.setDataSource(n),this.rows&&this.rows.setDataSource(n),this.columns&&this.columns.setDataSource(n),this.refresh()},_treeViewDataSource:function(){var t=this;return i.data.HierarchicalDataSource.create({schema:{model:{id:"uniqueName",hasChildren:function(n){return!("hierarchyUniqueName"in n||"aggregator"in n)}}},transport:{read:function(i){var u,r,f;n.isEmptyObject(i.data)?(u=t.dataSource.schemaDimensions(),u.done(function(n){t.dataSource.cubeBuilder||l(n),i.success(n)}).fail(i.error)):(r=t.treeView.dataSource.get(i.data.uniqueName),"[KPIs]"===r.uniqueName?(f=!0,u=t.dataSource.schemaKPIs(),u.done(function(n){i.success(v(n))}).fail(i.error)):"kpi"==r.type&&(f=!0,i.success(c(r))),f||(u=2==r.type?t.dataSource.schemaMeasures():r.dimensionUniqueName?t.dataSource.schemaLevels(i.data.uniqueName):t.dataSource.schemaHierarchies(i.data.uniqueName),u.done(i.success).fail(i.error)))}}})},_progress:function(n){i.ui.progress(this.element,n)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_layout:function(){this.form=n('<div class="k-columns k-state-default k-floatwrap"/>').appendTo(this.element),this._fields(),this._targets()},_fields:function(){var i=n('<div class="k-state-default"><p class="k-reset"><span class="k-icon k-i-group"></span>'+this.options.messages.fieldsLabel+"</p></div>").appendTo(this.form),t='# if (item.type == 2 || item.uniqueName == "[KPIs]") { #<span class="k-icon k-i-#= (item.type == 2 ? "sum" : "kpi") #"></span># } else if (item.type && item.type !== "kpi") { #<span class="k-icon k-i-arrows-dimensions"></span># } ##: item.caption || item.name #';this.treeView=n("<div/>").appendTo(i).kendoTreeView({template:t,dataTextField:"caption",dragAndDrop:!0,autoBind:!1,dataSource:this._treeViewDataSource(),dragstart:function(n){var t=this.dataItem(n.sourceNode);(t.hasChildren||t.aggregator||t.measure)&&2!=t.type&&"[KPIs]"!==t.uniqueName||n.preventDefault()},drag:function(n){var i="k-i-cancel",t=h(n.dropTarget);t&&t.validate(this.dataItem(n.sourceNode))&&(i="k-i-plus"),n.setStatusClass(i)},drop:function(n){var u,t,r,e,f,i;if(n.preventDefault(),u=h(n.dropTarget),t=this.dataItem(n.sourceNode),u&&u.validate(t)){if(i=t.defaultHierarchy||t.uniqueName,"kpi"===t.type)for(f=c(t),e=f.length,i=[],r=0;r<e;r++)i.push(s(f[r]));else t.kpi&&(i=[s(t)]);u.add(i)}}}).data("kendoTreeView")},_createTarget:function(t,r){var f='<li class="k-item k-header" data-'+i.ns+'name="${data.name}">${data.name}',e=r.sortable,u="";return e&&(u+="#if (data.sortIcon) {#",u+='<span class="k-icon ${data.sortIcon}-sm"></span>',u+="#}#"),(r.filterable||e)&&(u+='<span class="k-icon k-i-more-vertical k-setting-fieldmenu"></span>'),u+='<span class="k-icon k-i-close k-setting-delete"></span>',f+='<span class="k-field-actions">'+u+"</span></li>",new i.ui.PivotSettingTarget(t,n.extend({dataSource:this.dataSource,hint:function(t){var i=n('<div class="k-fieldselector"><ul class="k-list k-reset"></ul></div>');return i.find(".k-list").append(t.clone()),i},template:f,emptyTemplate:'<li class="k-item k-empty">${data}</li>'},r))},_targets:function(){var i=n('<div class="k-state-default"/>').appendTo(this.form),s=n(f({name:this.options.messages.columnsLabel,icon:"k-i-columns"})).appendTo(i),u=n('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(s.last()),o=n(f({name:this.options.messages.rowsLabel,icon:"k-i-rows"})).appendTo(i),r=n('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(o.last()),h=n(f({name:this.options.messages.measuresLabel,icon:"k-i-sum"})).appendTo(i),e=n('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(h.last()),t=this.options;this.columns=this._createTarget(u,{filterable:t.filterable,sortable:t.sortable,connectWith:r,messages:{empty:t.messages.columns,fieldMenu:t.messages.fieldMenu}}),this.rows=this._createTarget(r,{filterable:t.filterable,sortable:t.sortable,setting:"rows",connectWith:u,messages:{empty:this.options.messages.rows,fieldMenu:this.options.messages.fieldMenu}}),this.measures=this._createTarget(e,{setting:"measures",messages:{empty:t.messages.measures}}),u.add(r).add(e).on(y,".k-item:not(.k-empty)",this._toggleHover)},_toggleHover:function(t){n(t.currentTarget).toggleClass("k-state-hover","mouseenter"===t.type)},_resize:function(){var f,r,t=this.element,n=this.options.height,u=i._outerHeight;n&&(t.height(n),t.is(":visible")&&(r=t.children(".k-columns").children("div.k-state-default"),n=t.innerHeight(),f=(u(t)-n)/2,n=n-(u(r,!0)-r.height())-f,r.height(n)))},refresh:function(){var n=this.dataSource;(n.cubeBuilder||this._cube!==n.cube()||this._catalog!==n.catalog())&&this.treeView.dataSource.fetch(),this._catalog=this.dataSource.catalog(),this._cube=this.dataSource.cube(),this._resize(),this._progress(!1)},destroy:function(){e.fn.destroy.call(this),this.dataSource.unbind("change",this._refreshHandler),this.form.find(".k-list").off(u),this.rows.destroy(),this.columns.destroy(),this.measures.destroy(),this.treeView.destroy(),this.element=null,this._refreshHandler=null}});o.plugin(a)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.angular.min",["kendo.core.min"],n)}(function(){return function(n,t,i){"use strict";function et(n){var t=s;try{return s=function(n){return n()},n()}finally{s=t}}function u(t,r,u,f,e,o){function w(){var v,i,y,c,o,s,h;return u.kRebind&&(v=n(n(r)[0].cloneNode(!0))),p=it(t,r,u,f,a).options,r.is("select")&&!function(t){if(t.length>0){var i=n(t[0]);!/\S/.test(i.text())&&/^\?/.test(i.val())&&i.remove()}}(r[0].options),i=a.call(r,l=p).data(f),yt(i,t,u,f,e),t.$emit("kendoWidgetCreated",i),y=ht(t,i),u.kRebind&&lt(i,t,r,v,u.kRebind,y,u),u.kNgDisabled&&(c=u.kNgDisabled,o=t.$eval(c),o&&i.enable(!o),ft(i,t,r,c)),u.kNgReadonly&&(s=u.kNgReadonly,h=t.$eval(s),h&&i.readonly(h),ot(i,t,r,s)),u.kNgModel&&bt(i,t,u.kNgModel),b&&pt(i,t,r,b,nt),i&&st(i,r),i}var c,tt,b,nt,a,h,p,y,v,rt,ut,d,g,k;if(!(r instanceof jQuery))throw Error("The Kendo UI directives require jQuery to be available before AngularJS. Please include jquery before angular in the document.");if(c=u.kNgDelay,tt=t.$eval(c),o=o||[],b=o[0],nt=o[1],a=n(r)[f],!a)return window.console.error("Could not find: "+f),null;if(h=it(t,r,u,f,a),p=h.options,h.unresolved.length){for(y=[],v=0,rt=h.unresolved.length;v<rt;v++)ut=h.unresolved[v],d=n.Deferred(function(n){var r=t.$watch(ut.path,function(t){t!==i&&(r(),n.resolve())})}).promise(),y.push(d);return n.when.apply(null,y).then(w),i}return c&&!tt?(g=t.$root||t,k=function(){var n=t.$watch(c,function(t){t!==i&&(n(),r.removeAttr(u.$attr.kNgDelay),c=null,s(w))})},/^\$(digest|apply)$/.test(g.$$phase)?k():t.$apply(k),i):w()}function it(r,u,f,e,o){function a(n,u){var f=t.copy(r.$eval(u));f===i?c.push({option:n,path:u}):s[n]=f}var s,v,w,h,d=e.replace(/^kendo/,""),c=[],l=f.kOptions||f.options,y=r.$eval(l);return l&&y===i&&c.push({option:"options",path:l}),s=t.extend({},f.defaultOptions,y),v=o.widget.prototype.options,w=o.widget.prototype.events,n.each(f,function(n,t){var u,f,i,r;"source"!==n&&"kDataSource"!==n&&"kScopeField"!==n&&"scopeField"!==n&&(u="data"+n.charAt(0).toUpperCase()+n.slice(1),0===n.indexOf("on")&&(f=n.replace(/^on./,function(n){return n.charAt(2).toLowerCase()}),w.indexOf(f)>-1&&(s[f]=t)),v.hasOwnProperty(u)?a(u,t):v.hasOwnProperty(n)&&!p[n]?a(n,t):b[n]||(i=n.match(/^k(On)?([A-Z].*)/),i&&(r=i[2].charAt(0).toLowerCase()+i[2].slice(1),i[1]&&"kOnLabel"!=n?s[r]=t:("kOnLabel"==n&&(r="onLabel"),a(r,t)))))}),h=f.kDataSource||f.source,h&&(s.dataSource=k(r,u,d,h)),s.$angular=[r],{options:s,unresolved:c}}function ft(n,t,r,u){return kendo.ui.PanelBar&&n instanceof kendo.ui.PanelBar||kendo.ui.Menu&&n instanceof kendo.ui.Menu?(h.warn("k-ng-disabled specified on a widget that does not have the enable() method: "+n.options.name),i):(t.$watch(u,function(t,i){t!=i&&n.enable(!t)}),i)}function ot(n,t,r,u){return"function"!=typeof n.readonly?(h.warn("k-ng-readonly specified on a widget that does not have the readonly() method: "+n.options.name),i):(t.$watch(u,function(t,i){t!=i&&n.readonly(t)}),i)}function yt(n,t,i,r,u){if(i[u]){var f=o(i[u]).assign;if(!f)throw Error(u+" attribute used but expression in it is not assignable: "+i[r]);f(t,n)}}function vt(n){return/checkbox|radio/i.test(n.attr("type"))?n.prop("checked"):n.val()}function d(n){return tt.test(n[0].tagName)}function pt(n,t,r,u,f){var l,s,c,h,o;n.value&&(s=!1,l=d(r)?function(){return vt(r)}:function(){return n.value()},c=function(){var r=u.$viewValue;r===i&&(r=u.$modelValue),r===i&&(r=null),s=!0,setTimeout(function(){if(s=!1,n){var i=t[n.element.attr("k-ng-model")];i&&(r=i),n.options.autoBind!==!1||n.listView.bound()?n.value(r):r&&n.value(r)}},0)},u.$render=c,setTimeout(function(){u.$render!==c&&(u.$render=c)()}),d(r)&&r.on("change",function(){s=!0}),h=function(n){return function(){var i;s&&!r.is("select")||(n&&f&&(i=f.$pristine),u.$setViewValue(l()),n&&(u.$setPristine(),i&&f.$setPristine()),e(t))}},n.first("change",h(!1)),n.first("spin",h(!1)),kendo.ui.AutoComplete&&n instanceof kendo.ui.AutoComplete||n.first("dataBound",h(!0)),o=l(),isNaN(u.$viewValue)||o==u.$viewValue||(u.$isEmpty(u.$viewValue)?null!=o&&""!==o&&o!=u.$viewValue&&u.$setViewValue(o):n.value(u.$viewValue)),u.$setPristine())}function bt(t,r,u){var b,l,f,w,c,p,s,a,v,y;return"function"!=typeof t.value?(h.warn("k-ng-model specified on a widget that does not have the value() method: "+t.options.name),i):(b=n(t.element).parents("form"),l=kendo.getter(b.attr("name"),!0)(r),f=o(u),w=f.assign,c=!1,p=kendo.ui.MultiSelect&&t instanceof kendo.ui.MultiSelect,s=function(n){return n&&p?n.length:0},a=s(f(r)),t.$angular_setLogicValue(f(r)),v=function(n,r){n===i&&(n=null),c||n==r&&s(n)==a||(a=s(n),t.$angular_setLogicValue(n))},p?r.$watchCollection(u,v):r.$watch(u,v),y=function(){c=!0,l&&l.$pristine&&l.$setDirty(),e(r,function(){w(r,t.$angular_getLogicValue()),a=s(f(r))}),c=!1},t.first("change",y),t.first("spin",y),i)}function ht(n,t){var i=n.$on("$destroy",function(){i(),t&&(kendo.destroy(t.element),t=null)});return i}function st(t,i){function f(){u.disconnect()}function e(){u.observe(n(i)[0],{attributes:!0})}var r,u;window.MutationObserver&&t.wrapper&&(r=[].slice.call(n(i)[0].classList),u=new MutationObserver(function(i){f(),t&&(i.forEach(function(i){var u,f=n(t.wrapper)[0];switch(i.attributeName){case"class":u=[].slice.call(i.target.classList),u.forEach(function(n){r.indexOf(n)<0&&(f.classList.add(n),kendo.ui.ComboBox&&t instanceof kendo.ui.ComboBox&&t.input[0].classList.add(n))}),r.forEach(function(n){u.indexOf(n)<0&&(f.classList.remove(n),kendo.ui.ComboBox&&t instanceof kendo.ui.ComboBox&&t.input[0].classList.remove(n))}),r=u;break;case"disabled":"function"!=typeof t.enable||t.element.attr("readonly")||t.enable(!n(i.target).attr("disabled"));break;case"readonly":"function"!=typeof t.readonly||t.element.attr("disabled")||t.readonly(!!n(i.target).attr("readonly"))}}),e())}),e(),t.first("destroy",f))}function lt(t,i,r,u,f,o,s){var h=i.$watch(f,function(f,e){var a,l,c,p,y;t._muteRebind||f===e||(h(),s._cleanUp&&s._cleanUp(),a=v[t.options.name],a&&a.forEach(function(t){var r=i.$eval(s["k"+t]);r&&u.append(n(r).attr(kendo.toHyphens("k"+t),""))}),l=n(t.wrapper)[0],c=n(t.element)[0],p="Upload"===t.options.name,p&&(r=n(c)),y=r.injector().get("$compile"),t._destroy(),o&&o(),t=null,c&&(l&&l.parentNode.replaceChild(c,l),n(r).replaceWith(u)),y(u)(i))},!0);e(i)}function nt(n,t){return function(i,r){return n.call(t,i,r)}}function at(n,t){this[n]=kendo.stringify(t)}function ct(n,i){function s(n,t){f.directive(n,["directiveFactory",function(i){return i.create(t,n)}])}var o,u,h,e,r=i?"Mobile":"";r+=n.fn.options.name,o=r,u="kendo"+r.charAt(0)+r.substr(1).toLowerCase(),r="kendo"+r,h=r.replace(/([A-Z])/g,"-$1"),rt.indexOf(r.replace("kendo",""))==-1&&(e=r===u?[r]:[r,u],t.forEach(e,function(n){f.directive(n,function(){return{restrict:"E",replace:!0,template:function(n,t){var r=g[o]||"div",i=t.kScopeField||t.scopeField;return"<"+r+" "+h+(i?'="'+i+'"':"")+">"+n.html()+"</"+r+">"}}})})),y.indexOf(r.replace("kendo",""))>-1||(s(r,r),u!=r&&s(u,r))}function ut(t){return t=n(t),kendo.widgetInstance(t,kendo.ui)||kendo.widgetInstance(t,kendo.mobile.ui)||kendo.widgetInstance(t,kendo.dataviz.ui)}function e(n,t){var i=n.$root||n,r=/^\$(digest|apply)$/.test(i.$$phase);t?r?t():i.$apply(t):r||i.$digest()}function wt(t,i){t.$destroy(),i&&n(i).removeData("$scope").removeData("$$kendoScope").removeData("$isolateScope").removeData("$isolateScopeNoTemplate").removeClass("ng-scope")}function r(i,u,f){var o,e,s;if(n.isArray(i))return t.forEach(i,function(n){r(n,u,f)});if("string"==typeof i){for(o=i.split("."),e=kendo;e&&o.length>0;)e=e[o.shift()];if(!e)return c.push([i,u,f]),!1;i=e.prototype}return s=i[u],i[u]=function(){var t=this,n=arguments;return f.apply({self:t,next:function(){return s.apply(t,arguments.length>0?arguments:n)}},n)},!0}var f,a,o,s,w,h,l,k,b,p,tt,g,rt,y,c,v;t&&t.injector&&(f=t.module("kendo.directives",[]),a=t.injector(["ng"]),o=a.get("$parse"),s=a.get("$timeout"),h=a.get("$log"),k=function(){var t={TreeList:"TreeListDataSource",TreeView:"HierarchicalDataSource",Scheduler:"SchedulerDataSource",PivotGrid:"PivotDataSource",PivotConfigurator:"PivotDataSource",PanelBar:"HierarchicalDataSource",Menu:"$PLAIN",ContextMenu:"$PLAIN"},n=function(n,t){return"$PLAIN"==t?n:kendo.data[t].create(n)};return function(i,r,u,f){var o=t[u]||"DataSource",e=i.$eval(f),s=n(e,o);return i.$watch(f,function(t){var u,i=ut(r);i&&"function"==typeof i.setDataSource&&t!==e&&(u=n(t,o),i.setDataSource(u),e=t)}),s}}(),b={kDataSource:!0,kOptions:!0,kRebind:!0,kNgModel:!0,kNgDelay:!0},p={name:!0,title:!0,style:!0},tt=/^(input|select|textarea)$/i,f.factory("directiveFactory",["$compile",function(t){var i,f,r=!1;return w=t,f=function(t,f){return{restrict:"AC",require:["?ngModel","^?form"],scope:!1,controller:["$scope","$attrs","$element",function(n,t){this.template=nt(at,t),t._cleanUp=nt(function(){this.template=null,t._cleanUp=null},this)}],link:function(e,o,s,h){var a,l=n(o),c=t.replace(/([A-Z])/g,"-$1");l.attr(c,l.attr("data-"+c)),l[0].removeAttribute("data-"+c),a=u(e,o,s,t,f,h),a&&(i&&clearTimeout(i),i=setTimeout(function(){e.$emit("kendoRendered"),r||(r=!0,n("form").each(function(){var t=n(this).controller("form");t&&t.$setPristine()}))}))}}},{create:f}}]),g={Editor:"textarea",NumericTextBox:"input",DatePicker:"input",DateTimePicker:"input",TimePicker:"input",AutoComplete:"input",ColorPicker:"input",MaskedTextBox:"input",MultiSelect:"input",Upload:"input",Validator:"form",Button:"button",MobileButton:"a",MobileBackButton:"a",MobileDetailButton:"a",ListView:"ul",MobileListView:"ul",PanelBar:"ul",TreeView:"ul",Menu:"ul",ContextMenu:"ul",ActionSheet:"ul"},rt=["MobileView","MobileDrawer","MobileLayout","MobileSplitView","MobilePane","MobileModalView"],y=["MobileApplication","MobileView","MobileModalView","MobileLayout","MobileActionSheet","MobileDrawer","MobileSplitView","MobilePane","MobileScrollView","MobilePopOver"],t.forEach(["MobileNavBar","MobileButton","MobileBackButton","MobileDetailButton","MobileTabStrip","MobileScrollView","MobileScroller"],function(n){y.push(n),n="kendo"+n,f.directive(n,function(){return{restrict:"A",link:function(t,i,r){u(t,i,r,n,n)}}})}),c=[],kendo.onWidgetRegistered(function(t){c=n.grep(c,function(n){return!r.apply(null,n)}),ct(t.widget,"Mobile"==t.prefix)}),r(["ui.Widget","mobile.ui.Widget"],"angular",function(r,u){var f,o=this.self;return"init"==r?(!u&&l&&(u=l),l=null,u&&u.$angular&&(o.$angular_scope=u.$angular[0],o.$angular_init(o.element,u)),i):(f=o.$angular_scope,f&&et(function(){var c,a,s=u(),h=s.elements,l=s.data;if(h.length>0)switch(r){case"cleanup":t.forEach(h,function(t){var i=n(t).data("$$kendoScope");i&&i!==f&&i.$$kendoScope&&wt(i,t)});break;case"compile":c=o.element.injector(),a=c?c.get("$compile"):w,t.forEach(h,function(t,r){var u,e;s.scopeFrom?u=s.scopeFrom:(e=l&&l[r],e!==i?(u=n.extend(f.$new(),e),u.$$kendoScope=!0):u=f),n(t).data("$$kendoScope",u),a(t)(u)}),e(f)}}),i)}),r("ui.Widget","$angular_getLogicValue",function(){return this.self.value()}),r("ui.Widget","$angular_setLogicValue",function(n){this.self.value(n)}),r("ui.Select","$angular_getLogicValue",function(){var n=this.self.dataItem(),t=this.self.options.dataValueField;return n?this.self.options.valuePrimitive?t?n[t]:n:n.toJSON():null}),r("ui.Select","$angular_setLogicValue",function(n){var r=this.self,t=r.options,f=t.dataValueField,u=t.text||"";n===i&&(n=""),f&&!t.valuePrimitive&&n&&(u=n[t.dataTextField]||"",n=n[f||t.dataTextField]),r.options.autoBind!==!1||r.listView.bound()?r.value(n):!u&&n&&t.valuePrimitive?r.value(n):r._preselect(n,u)}),r("ui.MultiSelect","$angular_getLogicValue",function(){var t=this.self.dataItems().slice(0),i=this.self.options.dataValueField;return i&&this.self.options.valuePrimitive&&(t=n.map(t,function(n){return n[i]})),t}),r("ui.MultiSelect","$angular_setLogicValue",function(t){var r,i,u,f;null==t&&(t=[]),r=this.self,i=r.options,u=i.dataValueField,f=t,u&&!i.valuePrimitive&&(t=n.map(t,function(n){return n[u]})),i.autoBind!==!1||i.valuePrimitive||r.listView.bound()?r.value(t):r._preselect(f,t)}),r("ui.AutoComplete","$angular_getLogicValue",function(){for(var i,u,n,t=this.self.options,s=this.self.value().split(t.separator),h=t.valuePrimitive,f=this.self.listView.selectedDataItems(),e=[],r=0,o=f.length;r<o;r++)for(i=f[r],u=t.dataTextField?i[t.dataTextField]:i,n=0;n<s.length;n++)if(u===s[n]){e.push(h?u:i.toJSON());break}return e}),r("ui.AutoComplete","$angular_setLogicValue",function(t){null==t&&(t=[]);var u=this.self,r=u.options.dataTextField;r&&!u.options.valuePrimitive&&(t=t.length!==i?n.map(t,function(n){return n[r]}):t[r]),u.value(t)}),r("ui.Widget","$angular_init",function(t,i){var o,e,r,u,f=this.self;if(i&&!n.isArray(i))for(o=f.$angular_scope,e=f.events.length;--e>=0;)r=f.events[e],u=i[r],u&&"string"==typeof u&&(i[r]=f.$angular_makeEventHandler(r,o,u))}),r("ui.Widget","$angular_makeEventHandler",function(n,t,i){return i=o(i),function(n){e(t,function(){i(t,{kendoEvent:n})})}}),r(["ui.Grid","ui.ListView","ui.TreeView","ui.PanelBar"],"$angular_makeEventHandler",function(n,i,r){return"change"!=n?this.next():(r=o(r),function(n){var v,y,f,s,a,l,o,p,h,w=n.sender,c=w.options,u={kendoEvent:n};for(t.isString(c.selectable)&&(v=c.selectable.indexOf("cell")!==-1,y=c.selectable.indexOf("multiple")!==-1),f=u.selected=this.select(),s=u.data=[],a=u.columns=[],o=0;o<f.length;o++)p=v?f[o].parentNode:f[o],h=w.dataItem(p),v?(t.element.inArray(h,s)<0&&s.push(h),l=t.element(f[o]).index(),t.element.inArray(l,a)<0&&a.push(l)):s.push(h);y||(u.dataItem=u.data=s[0],u.angularDataItem=kendo.proxyModelSetters(u.dataItem),u.selected=f[0]),e(i,function(){r(i,u)})})}),r("ui.Grid","$angular_init",function(r,u){if(this.next(),u.columns){var f=n.extend({},kendo.Template,u.templateSettings);t.forEach(u.columns,function(n){!n.field||n.template||n.format||n.values||n.encoded!==i&&!n.encoded||(n.template="<span ng-bind='"+kendo.expr(n.field,"dataItem")+"'>#: "+kendo.expr(n.field,f.paramName)+"#</span>")})}}),r("mobile.ui.ButtonGroup","value",function(n){var t=this.self;return null!=n&&(t.select(t.element.children("li.km-button").eq(n)),t.trigger("change"),t.trigger("select",{index:t.selectedIndex})),t.selectedIndex}),r("mobile.ui.ButtonGroup","_select",function(){this.next(),this.self.trigger("change")}),f.directive("kendoMobileApplication",function(){return{terminal:!0,link:function(n,t,i){u(n,t,i,"kendoMobileApplication","kendoMobileApplication")}}}).directive("kendoMobileView",function(){return{scope:!0,link:{pre:function(n,t,i){i.defaultOptions=n.viewOptions,i._instance=u(n,t,i,"kendoMobileView","kendoMobileView")},post:function(n,t,i){i._instance._layout(),i._instance._scroller()}}}}).directive("kendoMobileDrawer",function(){return{scope:!0,link:{pre:function(n,t,i){i.defaultOptions=n.viewOptions,i._instance=u(n,t,i,"kendoMobileDrawer","kendoMobileDrawer")},post:function(n,t,i){i._instance._layout(),i._instance._scroller()}}}}).directive("kendoMobileModalView",function(){return{scope:!0,link:{pre:function(n,t,i){i.defaultOptions=n.viewOptions,i._instance=u(n,t,i,"kendoMobileModalView","kendoMobileModalView")},post:function(n,t,i){i._instance._layout(),i._instance._scroller()}}}}).directive("kendoMobileSplitView",function(){return{terminal:!0,link:{pre:function(n,t,i){i.defaultOptions=n.viewOptions,i._instance=u(n,t,i,"kendoMobileSplitView","kendoMobileSplitView")},post:function(n,t,i){i._instance._layout()}}}}).directive("kendoMobilePane",function(){return{terminal:!0,link:{pre:function(n,t,i){i.defaultOptions=n.viewOptions,u(n,t,i,"kendoMobilePane","kendoMobilePane")}}}}).directive("kendoMobileLayout",function(){return{link:{pre:function(n,t,i){u(n,t,i,"kendoMobileLayout","kendoMobileLayout")}}}}).directive("kendoMobileActionSheet",function(){return{restrict:"A",link:function(t,i,r){i.find("a[k-action]").each(function(){n(this).attr("data-"+kendo.ns+"action",n(this).attr("k-action"))}),u(t,i,r,"kendoMobileActionSheet","kendoMobileActionSheet")}}}).directive("kendoMobilePopOver",function(){return{terminal:!0,link:{pre:function(n,t,i){i.defaultOptions=n.viewOptions,u(n,t,i,"kendoMobilePopOver","kendoMobilePopOver")}}}}).directive("kendoViewTitle",function(){return{restrict:"E",replace:!0,template:function(n){return"<span data-"+kendo.ns+"role='view-title'>"+n.html()+"</span>"}}}).directive("kendoMobileHeader",function(){return{restrict:"E",link:function(n,t){t.addClass("km-header").attr("data-role","header")}}}).directive("kendoMobileFooter",function(){return{restrict:"E",link:function(n,t){t.addClass("km-footer").attr("data-role","footer")}}}).directive("kendoMobileScrollViewPage",function(){return{restrict:"E",replace:!0,template:function(n){return"<div data-"+kendo.ns+"role='page'>"+n.html()+"</div>"}}}),t.forEach(["align","icon","rel","transition","actionsheetContext"],function(n){var t="k"+n.slice(0,1).toUpperCase()+n.slice(1);f.directive(t,function(){return{restrict:"A",priority:2,link:function(i,r,u){r.attr(kendo.attr(kendo.toHyphens(n)),i.$eval(u[t]))}}})}),v={TreeMap:["Template"],MobileListView:["HeaderTemplate","Template"],MobileScrollView:["EmptyTemplate","Template"],Grid:["AltRowTemplate","DetailTemplate","RowTemplate"],ListView:["EditTemplate","Template","AltTemplate"],Pager:["SelectTemplate","LinkTemplate"],PivotGrid:["ColumnHeaderTemplate","DataCellTemplate","RowHeaderTemplate"],Scheduler:["AllDayEventTemplate","DateHeaderTemplate","EventTemplate","MajorTimeHeaderTemplate","MinorTimeHeaderTemplate"],PanelBar:["Template"],TreeView:["Template"],Validator:["ErrorTemplate"]},function(){var n={};t.forEach(v,function(i,r){t.forEach(i,function(t){n[t]||(n[t]=[]),n[t].push("?^^kendo"+r)})}),t.forEach(n,function(n,t){var i="k"+t,r=kendo.toHyphens(i);f.directive(i,function(){return{restrict:"A",require:n,terminal:!0,compile:function(t,u){if(""===u[i]){t.removeAttr(r);var f=t[0].outerHTML;return function(t,u,e,o){for(var s;!s&&o.length;)s=o.shift();s?(s.template(i,f),u.remove()):h.warn(r+" without a matching parent widget found. It can be one of the following: "+n.join(", "))}}}}})})}())}(window.kendo.jQuery,window.angular),window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){t("kendo.web.min",["kendo.core.min","kendo.router.min","kendo.view.min","kendo.fx.min","kendo.dom.min","kendo.data.odata.min","kendo.data.xml.min","kendo.data.min","kendo.ooxml.min","kendo.excel.min","kendo.data.signalr.min","kendo.binder.min","kendo.drawing.min","kendo.validator.min","kendo.userevents.min","kendo.draganddrop.min","kendo.mobile.scroller.min","kendo.groupable.min","kendo.reorderable.min","kendo.resizable.min","kendo.sortable.min","kendo.selectable.min","kendo.button.min","kendo.pager.min","kendo.popup.min","kendo.notification.min","kendo.tooltip.min","kendo.list.min","kendo.calendar.min","kendo.datepicker.min","kendo.dateinput.min","kendo.autocomplete.min","kendo.dropdownlist.min","kendo.combobox.min","kendo.multiselect.min","kendo.colorpicker.min","kendo.columnmenu.min","kendo.columnsorter.min","kendo.grid.min","kendo.listview.min","kendo.listbox.min","kendo.filebrowser.min","kendo.imagebrowser.min","kendo.editor.min","kendo.numerictextbox.min","kendo.maskedtextbox.min","kendo.mediaplayer.min","kendo.menu.min","kendo.editable.min","kendo.pivot.fieldmenu.min","kendo.filtercell.min","kendo.panelbar.min","kendo.progressbar.min","kendo.responsivepanel.min","kendo.tabstrip.min","kendo.timepicker.min","kendo.toolbar.min","kendo.datetimepicker.min","kendo.treeview.draganddrop.min","kendo.treeview.min","kendo.slider.min","kendo.splitter.min","kendo.upload.min","kendo.dialog.min","kendo.window.min","kendo.virtuallist.min","kendo.scheduler.view.min","kendo.scheduler.dayview.min","kendo.scheduler.agendaview.min","kendo.scheduler.monthview.min","kendo.scheduler.recurrence.min","kendo.scheduler.min","kendo.gantt.list.min","kendo.gantt.timeline.min","kendo.gantt.min","kendo.treelist.min","kendo.pivotgrid.min","kendo.spreadsheet.min","kendo.pivot.configurator.min","kendo.angular.min"],n)}(function(){"bundle all";return window.kendo},"function"==typeof define&&define.amd?define:function(n,t,i){(i||t)()}),function(n,t){function h(n){return/[A-Z]/.test(n)}function s(n){return/[a-z]/.test(n)}function r(n){return/[0-9]/.test(n)}function i(n){return/[^a-zA-Z0-9]/.test(n)}function f(n){return n.length>=e}function u(n){return h(n)&&s(n)&&i(n)&&r(n)&&f(n)}var o=t,e=8;(function(){function c(n){var t=this;t.input=o(n),t.widgets=[];t.input.on("input",function(){t._refreshWidgets()})}var t=c.prototype;t._setValidationInfo=function(n,t){var r=this,i=n.find("[data-asc-role='icon']");t?(n.removeClass("password-invalid"),n.addClass("password-valid"),i.removeClass("fa-times"),i.addClass("fa fa-check")):(n.removeClass("password-valid"),n.addClass("password-invalid"),i.removeClass("fa-check"),i.addClass("fa fa-times"))},t._refreshWidgets=function(){for(var n=this,u=n.input.val(),t,e=0;e<n.widgets.length;e++)t=n.widgets[e],n._setValidationInfo(t.find("[data-asc-role='password-valid-length']"),f(u)),n._setValidationInfo(t.find("[data-asc-role='password-valid-case']"),h(u)&&s(u)),n._setValidationInfo(t.find("[data-asc-role='password-valid-number']"),r(u)),n._setValidationInfo(t.find("[data-asc-role='password-valid-symbol']"),i(u))},t.isValid=function(){var n=this;return u(n.input.val())},t.defaultTemplate="<div><p data-asc-role='password-valid-length'><i data-asc-role='icon'></i> Password must be at least "+e+" characters long</p><p data-asc-role='password-valid-case'><i data-asc-role='icon'></i> Password must have at least one upper and lower case letter</p><p data-asc-role='password-valid-number'><i data-asc-role='icon'></i> Password must have at least one number</p><p data-asc-role='password-valid-symbol'><i data-asc-role='icon'></i> Password must have at least one symbol (eg $ @ or #) </p></div>",t.buildValidationInfo=function(n,t){var i=this;t=o(t||i.defaultTemplate),i.widgets.push(t),i._refreshWidgets(),n.append(t)},n.passwordValidator=function(n){return new c(n)}})(),n.isValidPassword=u}(window.UTILS=window.UTILS||{},jQuery);var refreshCallbackFunctionDict={},notification,notificationError;$(".nav-tabs").click(function(n){if(n.target.text==="Custom Details"&&$(".box_no_top_border").attr("data-asc-role")!=="details-section"){var t=$(n.target).attr("data-href");$.ajax({url:t,success:function(n){$("#renderPartialViews").html(n)}})}}),function(){function n(n){function r(){return["An unknown error occurred"]}var i,t;if(!n)return r();if(typeof n=="string")return[n];if(n.message&&typeof n.message=="string")return[n.message];if(n.constructor===Array){for(i=[],t=0;t<n.length;t++)n[t]&&(typeof n[t]=="string"?i.push(n[t]):n[t].message&&typeof n[t].message=="string"&&i.push(n[t].message));if(i.length)return i}return r()}setupAscCheckbox(),window.WindowErrorHandler=function(t,i){var u=n(t),r=u[0];i&&(r=i+" \n"),ShowAlert(r)},window.LogErrorHandler=function(t,i){var e=window.console,f,r,u;if(e)for(f=n(t),r=0;r<f.length;r++)u=f[r],i&&(u=i+": "+u),e.error(u)},Date.prototype.addMinutes=function(n){return this.setTime(this.getTime()+n*6e4),this},Date.prototype.addHours=function(n){return this.setTime(this.getTime()+n*36e5),this}}(),function(n,t,i){var r=t,u=this;(function(){function t(n,t,i){this.checkedState=n,this.kendoGrid=t,this.gridData=i}u.ascGrid=function(n,i,r){return new t(n,i,r)};var n=t.prototype;n.checkSchemaIdIsSet=function(){if(!this.kendoGrid.dataSource.options.schema.model.id)throw"The id must be set in the datasource schema for persistent checks";},n.isChecked=function(n){return this.gridData.persistCheck&&this.checkSchemaIdIsSet(),n._checked||this.gridData.persistCheck&&this.checkedState[n.id]},n.setCheckState=function(n,t){this.gridData.persistCheck?(this.checkSchemaIdIsSet(),this.checkedState[n.id]=t):n._checked=t},n.checkItem=function(n){this.setStateMulti([n],!0)&&this.setupCheckBoxes()},n.checkItems=function(n){this.setStateMulti(n,!0)&&this.setupCheckBoxes()},n.uncheckItem=function(n){this.setStateMulti([n],!1)&&this.setupCheckBoxes()},n.uncheckItems=function(n){this.setStateMulti(n,!1)&&this.setupCheckBoxes()},n.setStateMulti=function(n,t){var u,i;if(this.gridData.beforeCheckStateChange&&(i=r.Event("beforecheckstatechange",{dataItems:n,checked:t}),this.gridData.beforeCheckStateChange.call(this,i),i.isDefaultPrevented()))return!1;for(u=0;u<n.length;u++)this.setCheckState(n[u],t);return this.gridData.afterCheckStateChange&&(i=r.Event("aftercheckstatechange",{dataItems:n,checked:t}),this.gridData.afterCheckStateChange.call(this,i),i.isDefaultPrevented())?!1:!0},n.checkAllItems=function(n){var t=this.getGridData(n,!0);this.setStateMulti(t,!0)&&this.setupCheckBoxes()},n.uncheckAllItems=function(n){var t=this.getGridData(n,!0);this.setStateMulti(t,!1)&&this.setupCheckBoxes()},n.checkAllItemsInGrid=function(){var t=this.getGridData(!1,!1);this.setStateMulti(t,!0)&&this.setupCheckBoxes()},n.uncheckAllItemsInGrid=function(){var t=this.getGridData(!1,!1);this.setStateMulti(t,!1)&&this.setupCheckBoxes()},n.getRowFromCheckBox=function(n){return r(n).closest("tr[data-uid]")},n.getDataItemFromCheckBox=function(n){if(!this.kendoGrid.element){var t=r(this.kendoGrid.options.gridToggleCheckAllSelector).closest('[data-role="grid"]');return r(t).data("kendoGrid").dataItem(this.getRowFromCheckBox(n))}return this.kendoGrid.dataItem(this.getRowFromCheckBox(n))},n.getFilteredData=function(){var n=this.kendoGrid.dataSource;return new i.data.Query(n.data()).filter(n.filter()).data},n.getGridData=function(n,t){return(n===null||n===void 0)&&(n=!0),(t===null||t===void 0)&&(t=!1),t?this.kendoGrid.dataSource.view():n?this.getFilteredData():this.kendoGrid.dataSource.data()},n.getSelectedItems=function(n,t){var r,u,i;for(t=t===null||t===undefined?!1:!0,r=this.getGridData(n,t),u=[],i=0;i<r.length;i++)this.isChecked(r[i])===!0&&u.push(r[i]);return u},n.setupCheckBoxes=function(){var n=this,t=n.kendoGrid.element,f,i,u;t||(f=r(n.kendoGrid.options.gridToggleCheckAllSelector).closest('[data-role="grid"]'),t=r(f).data("kendoGrid").element),t.find(n.gridData.gridToggleCheckItemSelector).each(function(){var t=n.getDataItemFromCheckBox(this);this.checked=n.isChecked(t)?!0:!1}),i=n.getSelectedItems(!0,!0).length,u=n.getGridData(!0,!0).length,t.find(n.gridData.gridToggleCheckAllSelector).each(function(){i===0?(r(this).prop("indeterminate",!1),this.checked=!1):i<u?(this.checked=!1,r(this).prop("indeterminate",!0)):(r(this).prop("indeterminate",!1),this.checked=!0)})},n.toggleCheckItem=function(n){var t=this.getDataItemFromCheckBox(n);n.checked?this.checkItem(t):this.uncheckItem(t)},n.toggleCheckAllItems=function(n){n.checked?this.checkAllItems():this.uncheckAllItems()}})(),t.fn.extend({ascWindow:function(n){function f(){if(n){var i=this,t=this.wrapper;r=n.ignore?null:!1,t.data("result",r);t.find("[data-asc-command='confirm']").on("click",function(){t.data("result",!0),i.close()});t.find("[data-asc-command='cancel']").on("click",function(){t.data("result",!1),i.close()})}}var r=null,e=this,o={deactivate:function(){var t=this,u=this.wrapper,i=u.data("result");n.ignore&&i===null?n.ignore.call(t):i&&n.confirm?n.confirm.call(t):!i&&n.cancel&&n.cancel.call(t),u.data("result",r),n.deactivate&&n.deactivate.call(t)},refresh:function(){var t=this;f.call(t),n.refresh&&n.refresh.call(t)}},i={},u;return t.extend(i,n),delete i.confirm,delete i.cancel,delete i.ignore,t.extend(i,o),u=e.kendoWindow(i),f.call(u.data("kendoWindow")),u},ascGrid:function(n){var c={},f={},s,o;t.extend(f,n),(f.useFilterContext===null||f.useFilterContext===void 0)&&(f.useFilterContext=!0),f.gridToggleCheckItemSelector||(f.gridToggleCheckItemSelector="[data-asc-role='gridToggleCheckItem']"),f.gridToggleCheckAllSelector||(f.gridToggleCheckAllSelector="[data-asc-role='gridToggleCheckAll']"),s={dataBound:function(){var n=this;u.ascGrid(c,n,f).setupCheckBoxes(),f.dataBound&&f.dataBound.call(n)}},o={},t.extend(o,f),delete o.persistCheck,t.extend(o,s);var e=this.kendoGrid(o),h=e.data("kendoGrid"),i=u.ascGrid(c,h,f);e.on("change",f.gridToggleCheckItemSelector,function(){i.toggleCheckItem(this)});e.on("change",f.gridToggleCheckAllSelector,function(){i.toggleCheckAllItems(this)});if(f.tabCells)e.on("keydown",function(n){var e=r(this).data("kendoGrid"),u,o,t,s;if((n.which===9||n.which===13)&&(u=e.table.find(">tbody>tr>td[data-role='editable']").first(),u.length)){n.preventDefault();var f=e.table.find(">tbody>tr:not(.k-detail-row)"),h=u.closest(f),i=h.children(),c=i.index(u)+(n.shiftKey?-1:1),l=i.eq(c);if(l.length&&c!==0)u.find("input").trigger("blur"),e.editCell(l);else{if(o=f.index(h),o<0)return;if(t=o+(n.shiftKey?-1:1),t>f.length-1?t=0:t<0&&(t=f.length-1),t<0)return;s=f.eq(t),u.find("input").trigger("blur"),i=s.children(),e.editCell(n.shiftKey?i.eq(i.length-1):i.eq(1))}}});return e.data("ascGrid",{kendoGrid:h,checkItem:i.checkItem.bind(i),checkItems:i.checkItems.bind(i),checkAllItems:i.checkAllItems.bind(i),uncheckItem:i.uncheckItem.bind(i),uncheckItems:i.uncheckItems.bind(i),uncheckAllItems:i.uncheckAllItems.bind(i),checkAllItemsInGrid:i.checkAllItemsInGrid.bind(i),uncheckAllItemsInGrid:i.uncheckAllItemsInGrid.bind(i),isChecked:i.isChecked.bind(i),getSelectedItems:i.getSelectedItems.bind(i)}),e},ascMultiSelect:function(n){function v(n){return new i.data.DataSource({data:n,schema:{model:{id:"value"}}})}function k(n){return{text:n.text,value:n.value,displayOrder:n.displayOrder}}function y(){for(var i=[],r=f(),t,n=0;n<r.length;n++)t=u.dataSource.get(r[n]),i.push({text:t.text,value:t.value,displayOrder:t.displayOrder});return i}function p(n){for(var r=v(n),i=[],t=0;t<n.length;t++)i.push(k(n[t]));u.setDataSource(r),f(i)}var a={},c,e,s,u,f,o;if(t.extend(a,n),c={},n.freeTextMode&&(c={dataSource:v(),dataTextField:"text",dataValueField:"value",open:function(n){n.preventDefault()}},e=n.freeTextMode.freeTextModeKeyCodes===null||n.freeTextModeKeyCodes===void 0?[13]:n.freeTextModeKeyCodes),s={},t.extend(s,a),delete s.freeTextMode,t.extend(s,c),u=this.kendoMultiSelect(s).data("kendoMultiSelect"),f=u.value,n.freeTextMode){o=!1,f=function(n){var t=u.value(n);return n!==void 0&&h(),t};function b(){for(var r=u.tagList.find("li"),i,t,n=0;n<r.length;n++)i=f()[n],t=u.dataSource.get(i),r.eq(n).attr("data-asc-uid",t.uid)}function h(){var n=u.value();n.sort(function(n,t){return u.dataSource.get(n).displayOrder-u.dataSource.get(t).displayOrder}),u.value(n.slice()),b()}function l(){u.input.val(null)}function w(){for(var r=u.tagList.find("li"),i,t,n=0;n<r.length;n++)i=r.eq(n).attr("data-asc-uid"),t=u.dataSource.getByUid(i),t.set("displayOrder",n);h()}u.input.on("keypress.ascKendoExtensions",function(n){for(var s,o,r,t=0;t<e.length;t++)if(n.which===e[t]){s=u.input.val(),s&&(o=i.guid(),u.dataSource.add({text:s,value:o}),r=f(),r.push(o),f(r)),l();return}});if(n.freeTextMode.sortable&&u.tagList.kendoSortable({start:function(n){(!r(document).find(n.item).length||o)&&n.preventDefault()},change:function(){w()},hint:n.freeTextMode.sortable.hint,placeholder:n.freeTextMode.sortable.placeholder}).data("kendoSortable"),n.freeTextMode.addOnFocusOut){u.input.off("focusout");u.input.on("focusout.ascKendoExtensions",function(){var n=t.Event("keypress");n.which=e[0],u.input.trigger(n)})}if(n.freeTextMode.editable)u.element.parent().on("click.ascKendoExtensions","li.k-button",function(t){function v(){c.set("text",i.val())}function a(){o=!1,h()}var s,c,f,i;if(r(this).children().eq(1).children().first()[0]!==t.target&&r(this).children().eq(1)[0]!==t.target&&r(this).find("input")[0]!==t.target){o&&(t.stopPropagation(),t.stopImmediatePropagation()),o=!0,s=r(this).attr("data-asc-uid"),l(),c=u.dataSource.getByUid(s),f=u.tagList.find("li[data-asc-uid='"+s+"']"),f.html("<input class='asc-edit-select-item' type='text' value='"+c.text+"'/>"),i=f.find("input");i.on("mousedown.ascKendoExtensions",function(n){n.stopPropagation()});i.on("keypress.ascKendoExtensions",function(n){for(var t=0;t<e.length;t++)if(n.which===e[t]){i.trigger("focusout.ascKendoExtensions");return}});i.on("focusout.ascKendoExtensions",function(){o&&(n.freeTextMode.addOnFocusOut&&i.val()&&v(),a())});i.focus()}})}return u.element.data("ascMultiSelect",{getFreetextItems:y.bind(u),setFreetextItems:p.bind(u),value:f.bind(u),kendoWidget:u}),u.element},ascDropDownList:function(n){function l(n,t,i,r){var f,u;for(r=r||function(n){return n},f=n.data(),u=0;u<f.length;u++)if(r(f[u][i])===t)return f[u];return!1}function v(t,i){return l(t,i,n.dataValueField,function(n){return String(n)})}function a(n){for(var i=n.data(),r=[],t=0;t<i.length;t++)i[t]._invalid&&r.push(i[t]);for(t=0;t<r.length;t++)n.remove(r[t])}var i={},u,s,c,o,f;t.extend(i,n),n.prepend&&(u={},u[n.dataTextField]=n.prepend.text,u[n.dataValueField]=n.prepend.value,u._prepended=!0),s=this.val(),c=!0;var p=n.valueTemplate,h=n.invalidValueTemplate,y={dataBound:function(){var t=this,a=c,r,o,e,f;if(c=!1,r=s,s=null,u&&!l(t.dataSource,!0,"_prepended")&&(t.dataSource.insert(0,u),a&&!r&&(t.value(u[n.dataValueField]),t.trigger("change"))),a&&r&&h&&!v(t.dataSource,r)){for(o=!0,e=0;e<(n.treatAsUnset||[]).length;e++)r===n.treatAsUnset[e]&&(o=!1);o&&(f={},f[n.dataTextField]="",f[n.dataValueField]=r,f._invalid=!0,t.dataSource.add(f),t.value(r),t.trigger("change"))}i.dataBound&&i.dataBound.call(t)},open:function(){for(var t=this,u=t.dataSource.data(),n=0;n<u.length;n++)u[n]._invalid&&r(t.items()[n]).hide();i.open&&i.dataBound.call(open)},change:function(){var n=this,r=n.select(),t;r<n.options.index||(t=n.dataItem(),t&&t._invalid&&h?n.setOptions({valueTemplate:h}):n.setOptions({valueTemplate:p||null}),n.select(-1),n.select(r),i.change&&i.dataBound.call(change))}},e={};return t.extend(e,i),delete e.prepend,delete e.invalidValueTemplate,t.extend(e,y),o=this.kendoDropDownList(e),f=o.data("kendoDropDownList"),f.trigger("change"),o.data("ascDropDownList",{kendoDropDownList:f,cleanup:a.bind(f,f.dataSource)}),o}})}(window,jQuery,kendo)