/** * Kendo UI v2023.2.829 (http://www.telerik.com/kendo-ui) * Copyright 2023 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):((e="undefined"!=typeof globalThis?globalThis:e||self).kendoall=e.kendoall||{},e.kendoall.js=t())}(this,(function(){var e,t="change",n={small:"(max-width: 500px)",medium:"(min-width: 500.1px) and (max-width: 768px)",large:"(min-width: 768.1px)"};function i(i){if(i)return i in(e=e||Object.assign({},n,kendo.defaults.breakpoints))&&(i=e[i]),function(e){var n=window.matchMedia(e),i=[],r=[],o=[],a={mediaQueryList:n},s=function(e){o.forEach((function(t){return t(e)})),e.matches?i.forEach((function(t){return t(e)})):r.forEach((function(t){return t(e)}))};return n.addEventListener(t,s),a.onChange=function(e){return o.push(e),a},a.onEnter=function(e){if(i.push(e),n.matches){var r=n.media;e(new MediaQueryListEvent(t,{media:r,matches:!0}))}return a},a.onLeave=function(e){return r.push(e),a},a.destroy=function(){n&&n.removeEventListener(t,s),i=null,r=null,o=null,n=null,a=null},a}(i)}var r={name:"@progress/kendo-ui",productName:"Kendo UI",productCodes:["KENDOUICOMPLETE","KENDOUI","KENDOUI","KENDOUICOMPLETE"],publishDate: 1693305088,version:"2023.2.829".replace(/^\s+|\s+$/g,""),licensingDocsUrl:"https://docs.telerik.com/kendo-ui/intro/installation/using-license-code"};!function(e,t,o){var a,s=t.kendo=t.kendo||{cultures:{}},l=e.extend,c=e.each,d=Array.isArray,u=e.noop,h=Math,p=t.JSON||{},f={},m=/%/,g=/\{(\d+)(:[^\}]+)?\}/g,v=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,_=/^(\+|-?)\d+(\.?)\d*$/,b="month",w="hour",y="zone",k="weekday",x="quarter",C={G:"era",y:"year",q:x,Q:x,M:b,L:b,d:"day",E:k,c:k,e:k,h:w,H:w,k:w,K:w,m:"minute",s:"second",a:"dayperiod",t:"dayperiod",x:y,X:y,z:y,Z:y},S={month:{type:"months",minLength:3,standAlone:"L"},quarter:{type:"quarters",minLength:3,standAlone:"q"},weekday:{type:"days",minLength:{E:0,c:3,e:3},standAlone:"c"},dayperiod:{type:"dayPeriods",minLength:0},era:{type:"eras",minLength:0}},T="function",D="string",I="number",z="object",M="null",E="boolean",A="undefined",H="aria-labelledby",R="aria-label",F={},P={},B=[].slice,L=["themeColor","fillMode","shape","size","rounded","positionMode"],V=function(){var e,t,n,i,r,a,s=arguments,l=arguments[0]||{},c=1,d=arguments.length,u=!1;for("boolean"==typeof l&&(u=l,l=arguments[c]||{},c++),"object"!=typeof l&&"function"!=typeof l&&(l={}),c===d&&(l=this,c--);c=0;n--)r[n]!==t&&r[n].original!==t||r.splice(n,1);else i._events[e]=[];return i}});function q(e,t){if(t)return"'"+e.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var n=e.charAt(0),i=e.substring(1);return"="===n?"+("+i+")+":":"===n?"+$kendoHtmlEncode("+i+")+":";"+e+";$kendoOutput+="}var G=/^\w+/,K=/\$\{([^}]*)\}/g,Y=/\\\}/g,$=/__CURLY__/g,Q=/\\#/g,X=/__SHARP__/g,Z=["","0","00","000","0000"];function J(e,t,n){return(n=(t=t||2)-(e+="").length)?Z[t].substring(0,n)+e:e}function ee(e,t){var n=s._outerWidth,i=s._outerHeight,r=e.parent(),o=e.closest(".k-animation-container"),a=e.is(":visible"),l=r[0].style,c=e[0].style.height;o.is(":hidden")&&o.css({display:"",position:""}),m.test(l.width)||m.test(l.height)||(a||e.add(r).show(),r.css("width",""),r.css({width:t?n(e)+1:n(e)}),"auto"===c?e.css({height:i(r)}):r.css({height:i(e)}),a||e.hide())}function te(e){var t=arguments,n=1,i=arguments.length;for(n=1;n=p){for(s=a,l=[];s>-1;)if((c=r.substring(s-p,s))&&l.push(c),s-=p,0===(p=(d=h.shift())!==o?d:p)){s>0&&l.push(r.substring(0,s));break}r=l.reverse().join(i[","]),e=e.substring(0,t)+r+e.substring(n)}return e},_=function(e,t,n){return t=t||0,e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t))),n&&(e=-e),(e=+((e=e.toString().split("e"))[0]+"e"+(e[1]?+e[1]-t:-t))).toFixed(Math.min(t,20))},b=function(e,s,u){if(s){if("[object Date]"===p.call(e))return function(e,n,i){var r=(i=m(i)).calendars.standard,a=r.days,s=r.months;return(n=n.pattern||r.patterns[n]||n).replace(t,(function(t){var n,i,l;return"d"===t?i=e.getDate():"dd"===t?i=J(e.getDate()):"ddd"===t?i=a.namesAbbr[e.getDay()]:"dddd"===t||"EEEE"===t?i=a.names[e.getDay()]:"M"===t?i=e.getMonth()+1:"MM"===t?i=J(e.getMonth()+1):"MMM"===t?i=s.namesAbbr[e.getMonth()]:"MMMM"===t?i=s.names[e.getMonth()]:"yy"===t?i=J(e.getFullYear()%100):"yyyy"===t?i=J(e.getFullYear(),4):"h"===t?i=e.getHours()%12||12:"hh"===t?i=J(e.getHours()%12||12):"H"===t?i=e.getHours():"HH"===t?i=J(e.getHours()):"m"===t?i=e.getMinutes():"mm"===t?i=J(e.getMinutes()):"s"===t?i=e.getSeconds():"ss"===t?i=J(e.getSeconds()):"f"===t?i=h.floor(e.getMilliseconds()/100):"ff"===t?((i=e.getMilliseconds())>99&&(i=h.floor(i/10)),i=J(i)):"fff"===t?i=J(e.getMilliseconds(),3):"tt"===t||"aa"===t?i=e.getHours()<12?r.AM[0]:r.PM[0]:"zzz"===t?(l=(n=e.getTimezoneOffset())<0,i=h.abs(n/60).toString().split(".")[0],n=h.abs(n)-60*i,i=(l?"+":"-")+J(i),i+=":"+J(n)):"zz"!==t&&"z"!==t||(l=(i=e.getTimezoneOffset()/60)<0,i=h.abs(i).toString().split(".")[0],i=(l?"+":"-")+("zz"===t?J(i):i)),i!==o?i:t.slice(1,t.length-1)}))}(e,s,u);if(typeof e===I)return function(e,t,s){var u,h,p,f,g,b,w,y,k,x,C,S,T,D,I,z,M,E,A,H,R=(s=m(s)).numberFormat,F=R["."],P=R.decimals,B=R.pattern[0],L=[],V=e<0,O=a,N=a,W=-1;if(e===o)return a;if(!isFinite(e))return e;if(!t)return s.name.length?e.toLocaleString():e.toString();if(g=n.exec(t)){if(p="p"===(t=g[1].toLowerCase()),((h="c"===t)||p)&&(F=(R=h?R.currency:R.percent)["."],P=R.decimals,u=R.symbol,B=R.pattern[V?0:1]),(f=g[2])&&(P=+f),"e"===t)return(f?e.toExponential(P):e.toExponential()).replace(l,R["."]);if(p&&(e*=100),V=(e=_(e,P))<0,b=(e=e.split(l))[0],w=e[1],V&&(b=b.substring(1)),N=v(b,0,b.length,R),w&&(N+=F+w),"n"===t&&!V)return N;for(e=a,k=0,x=B.length;k-1||t.indexOf('"')>-1||t.indexOf("\\")>-1)&&(t=t.replace(i,(function(e){var t=e.charAt(0).replace("\\",""),n=e.slice(1).replace(t,"");return L.push(n),"??"}))),t=t.split(";"),V&&t[1])t=t[1],T=!0;else if(0===e&&t[2]){if(-1==(t=t[2]).indexOf(c)&&-1==t.indexOf(d))return t}else t=t[0];if((p=-1!=t.indexOf("%"))&&(e*=100),(h=-1!=(A=t.indexOf("$")))&&"\\"===t[A-1]&&(t=t.split("\\").join(""),h=!1),(h||p)&&(F=(R=h?R.currency:R.percent)["."],P=R.decimals,u=R.symbol),(S=t.indexOf(",")>-1)&&(t=t.replace(r,a)),D=t.indexOf(l),x=t.length,-1!=D)if(w=(w=(w=e.toString().split("e"))[1]?_(e,Math.abs(w[1])):w[0]).split(l)[1]||a,M=(z=t.lastIndexOf(d)-D)>-1,E=(I=t.lastIndexOf(c)-D)>-1,k=w.length,M||E||(x=(t=t.substring(0,D)+t.substring(D+1)).length,D=-1,k=0),M&&z>I)k=z;else if(I>z)if(E&&k>I){for(var U=_(e,I,V);U.charAt(U.length-1)===d&&I>0&&I>z;)I--,U=_(e,I,V);k=I}else M&&kz?z:I,I=t.lastIndexOf(c),z=t.lastIndexOf(d),H=-1==I&&-1!=z?z:-1!=I&&-1==z||I>z?I:z,W==x&&(H=W),-1!=W){for(b=(N=e.toString().split(l))[0],w=N[1]||a,y=b.length,w.length,V&&-1*e>=0&&(V=!1),e=t.substring(0,W),V&&!T&&(e+="-"),k=W;k-1&&(e+=b,k=D),D===k){e+=(w?F:a)+w,k+=H-D+1;continue}C===d?(e+=C,O=C):C===c&&(e+=O)}if(S&&(e=v(e,W+(V&&!T?1:0),Math.max(H,y+W),R)),H>=W&&(e+=t.substring(H+1)),h||p){for(N=a,k=0,x=e.length;k=t&&e<=n)}function v(e){return e.charAt(0)}function _(t){return e.map(t,v)}function b(e){for(var t=0,n=e.length,i=[];t0&&(P-=1),n},S=function(t){var n=f[t]||new RegExp("^\\d{1,"+t+"}"),i=e.substr(B,t).match(n);return i?(i=i[0],B+=i.length,parseInt(i,10)):null},T=function(t,n){for(var i,r,o,a=0,s=t.length,l=0,c=0;al&&(l=r,c=a);return l?(B+=l,c+1):null},D=function(){var n=!1;return e.charAt(B)===t[P]&&(B++,n=!0),n},I=n.calendars.standard,z=null,M=null,E=null,A=null,H=null,R=null,F=null,P=0,B=0,L=!1,V=new Date,O=I.twoDigitYearMax||2029,N=V.getFullYear();for(t||(t="d"),(u=I.patterns[t])&&(t=u),d=(t=t.split("")).length;P2)continue;if(null===(E=c<3?S(2):T(I._lowerDays[3==c?"namesAbbr":"names"],!0))||g(E,1,31))return null}else if("M"===l){if(c=C("M"),I._lowerMonths||(I._lowerMonths=w(I.months)),null===(M=c<3?S(2):T(I._lowerMonths[3==c?"namesAbbr":"names"],!0))||g(M,1,12))return null;M-=1}else if("y"===l){if(null===(z=S(c=C("y"))))return null;2==c&&("string"==typeof O&&(O=N+parseInt(O,10)),(z=N-N%100+z)>O&&(z-=100))}else if("h"===l){if(C("h"),12==(A=S(2))&&(A=0),null===A||g(A,0,11))return null}else if("H"===l){if(C("H"),null===(A=S(2))||g(A,0,23))return null}else if("m"===l){if(C("m"),null===(H=S(2))||g(H,0,59))return null}else if("s"===l){if(C("s"),null===(R=S(2))||g(R,0,59))return null}else if("f"===l){if(c=C("f"),x=e.substr(B,c).match(f[3]),null!==(F=S(c))&&(F=parseFloat("0."+x[0],10),F=s._round(F,3),F*=1e3),null===F||g(F,0,999))return null}else if("t"===l){if(c=C("t"),v=I.AM,b=I.PM,1===c&&(v=_(v),b=_(b)),!(h=T(b))&&!T(v))return null}else if("z"===l){if(p=!0,c=C("z"),"Z"===e.substr(B,1)){D();continue}if(!(m=e.substr(B,6).match(c>2?a:r)))return null;if(y=(m=m[0].split(":"))[0],!(k=m[1])&&y.length>3&&(B=y.length-2,k=y.substring(B),y=y.substring(0,B)),g(y=parseInt(y,10),-12,13))return null;if(c>2&&(k=m[0][0]+k,k=parseInt(k,10),isNaN(k)||g(k,-59,59)))return null}else if("'"===l)L=!0,D();else if(!D())return null;return i&&!/^\s*$/.test(e.substr(B))?null:(null===z&&null===M&&null===E&&(null!==A||null!==H||R||null)?(z=N,M=V.getMonth(),E=V.getDate()):(null===z&&(z=N),null===E&&(E=1)),h&&A<12&&(A+=12),p?(y&&(A+=-y),k&&(H+=-k),e=new Date(Date.UTC(z,M,E,A,H,R,F))):function(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}(e=new Date(z,M,E,A,H,R,F),A),z<100&&e.setFullYear(z),e.getDate()!==E&&p===o?null:e)}function k(e,t,n,i){if("[object Date]"===m.call(e))return e;var r,o,a=0,f=null;if(e&&0===e.indexOf("/D")&&(f=l.exec(e)))return f=f[1],o=c.exec(f.substring(1)),f=new Date(parseInt(f,10)),o&&(o=function(e){var t="-"===e.substr(0,1)?-1:1;return e=e.substring(1),t*(60*parseInt(e.substr(0,2),10)+parseInt(e.substring(2),10))}(o[0]),f=s.timezone.apply(f,0),f=s.timezone.convert(f,0,-1*o)),f;for(n=s.getCulture(n),t||(t=function(e){var t,n,i,r=h.max(u.length,p.length),o=(e.calendar||e.calendars.standard).patterns,a=[];for(i=0;i0?null:(f=f>-1,e.indexOf(h)>-1||o&&o.toLowerCase().indexOf("c")>-1?(a=(c=u).pattern[0].replace("$",h).split("n"),e.indexOf(a[0])>-1&&e.indexOf(a[1])>-1&&(e=e.replace(a[0],"").replace(a[1],""),f=!0)):e.indexOf(p)>-1&&(l=!0,c=d,h=p),e=e.replace("-","").replace(h,"").replace(t," ").split(c[","].replace(t," ")).join("").replace(n,"").replace(c["."],"."),e=parseFloat(e),isNaN(e)?e=null:f&&(e*=-1),e&&l&&(e/=100),e)}}(),function(){f._scrollbar=o,f.scrollbar=function(e){if(isNaN(f._scrollbar)||e){var t,n=document.createElement("div");return n.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",n.innerHTML=" ",document.body.appendChild(n),f._scrollbar=t=n.offsetWidth-n.scrollWidth,document.body.removeChild(n),t}return f._scrollbar},f.isRtl=function(t){return e(t).closest(".k-rtl").length>0};var n=document.createElement("table");try{n.innerHTML="",f.tbodyInnerHtml=!0}catch(e){f.tbodyInnerHtml=!1}f.touch="ontouchstart"in t;var i=document.documentElement.style,r=f.transitions=!1,a=f.transforms=!1,s="HTMLElement"in t?HTMLElement.prototype:[];f.hasHW3D="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix||"MozPerspective"in i||"msPerspective"in i,f.cssFlexbox="flexWrap"in i||"WebkitFlexWrap"in i||"msFlexWrap"in i,c(["Moz","webkit","O","ms"],(function(){var e=this.toString(),t=typeof n.style[e+"Transition"]===D;if(t||typeof n.style[e+"Transform"]===D){var i=e.toLowerCase();return a={css:"ms"!=i?"-"+i+"-":"",prefix:e,event:"o"===i||"webkit"===i?i:""},t&&((r=a).event=r.event?r.event+"TransitionEnd":"transitionend"),!1}})),n=null,f.transforms=a,f.transitions=r,f.devicePixelRatio=t.devicePixelRatio===o?1:t.devicePixelRatio;try{f.screenWidth=t.outerWidth||t.screen?t.screen.availWidth:t.innerWidth,f.screenHeight=t.outerHeight||t.screen?t.screen.availHeight:t.innerHeight}catch(e){f.screenWidth=t.screen.availWidth,f.screenHeight=t.screen.availHeight}f.detectOS=function(e){var n,i=!1,r=[],o=!/mobile safari/i.test(e),a={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/},s={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/},l={tablet:/playbook|ipad|fire/i},c={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(var d in a)if(a.hasOwnProperty(d)&&(r=e.match(a[d]))){if("windows"==d&&"plugins"in navigator)return!1;(i={}).device=d,i.tablet=ie(d,l,!1),i.browser=ie(e,c,"default"),i.name=ie(d,s),i[i.name]=!0,i.majorVersion=r[2],i.minorVersion=(r[3]||"0").replace("_","."),n=i.minorVersion.replace(".","").substr(0,2),i.flatVersion=i.majorVersion+n+new Array(3-(n.length<3?n.length:2)).join("0"),i.cordova=typeof t.PhoneGap!==A||typeof t.cordova!==A,i.appMode=t.navigator.standalone||/file|local|wmapp/.test(t.location.protocol)||i.cordova,i.android&&(f.devicePixelRatio<1.5&&i.flatVersion<400||o)&&(f.screenWidth>800||f.screenHeight>800)&&(i.tablet=d);break}return i};var l=f.mobileOS=f.detectOS(navigator.userAgent);f.wpDevicePixelRatio=l.wp?screen.width/320:0,f.hasNativeScrolling=!1,(l.ios||l.android&&l.majorVersion>2||l.wp)&&(f.hasNativeScrolling=l),f.delayedClick=function(){if(f.touch){if(l.ios)return!0;if(l.android)return!f.browser.chrome||!(f.browser.version<32)&&!(e("meta[name=viewport]").attr("content")||"").match(/user-scalable=no/i)}return!1},f.mouseAndTouchPresent=f.touch&&!(f.mobileOS.ios||f.mobileOS.android),f.detectBrowser=function(e){var t=!1,n=[],i={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var r in i)if(i.hasOwnProperty(r)&&(n=e.match(i[r]))){(t={})[r]=!0,t[n[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,t.version=parseInt(document.documentMode||n[2],10),t.chrome&&e.match(/(edg)[ \/]([\w.]+)/i)&&(t.chromiumEdge=!0);break}return t},f.browser=f.detectBrowser(navigator.userAgent),!l&&f.touch&&f.browser.safari&&(l=f.mobileOS={ios:!0,tablet:"tablet",device:"ipad",majorVersion:13}),f.detectClipboardAccess=function(){var e={copy:!!document.queryCommandSupported&&document.queryCommandSupported("copy"),cut:!!document.queryCommandSupported&&document.queryCommandSupported("cut"),paste:!!document.queryCommandSupported&&document.queryCommandSupported("paste")};return f.browser.chrome&&(e.paste=!1,f.browser.version>=43&&(e.copy=!0,e.cut=!0)),e},f.clipboard=f.detectClipboardAccess(),f.zoomLevel=function(){try{var e=f.browser,n=0,i=document.documentElement;return e.msie&&11==e.version&&i.scrollHeight>i.clientHeight&&!f.touch&&(n=f.scrollbar()),f.touch?i.clientWidth/t.innerWidth:e.msie&&e.version>=10?((top||t).document.documentElement.offsetWidth+n)/(top||t).innerWidth:1}catch(e){return 1}},function(t){var n="",i=e(document.documentElement),r=parseInt(t.version,10);t.msie?n="ie":t.mozilla?n="ff":t.safari?n="safari":t.webkit?n="webkit":t.opera?n="opera":t.edge&&(n="edge"),n&&(n="k-"+n+" k-"+n+r),f.mobileOS&&(n+=" k-mobile"),f.cssFlexbox||(n+=" k-no-flexbox"),i.addClass(n)}(f.browser),f.eventCapture=document.documentElement.addEventListener;var d=document.createElement("input");f.placeholder="placeholder"in d,f.propertyChangeEvent="onpropertychange"in d,f.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],n=t.length,i="test",r={},o=0;ot.field?1:e.field/g;var fe=function(e){return e.target};f.touch&&(fe=function(e){var t="originalEvent"in e?e.originalEvent.changedTouches:"changedTouches"in e?e.changedTouches:null;return t?document.elementFromPoint(t[0].clientX,t[0].clientY):e.target},c(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],(function(t,n){e.fn[n]=function(e){return this.on(n,e)}}))),f.touch?f.mobileOS?(f.mousedown="touchstart",f.mouseup="touchend",f.mousemove="touchmove",f.mousecancel="touchcancel",f.click="touchend",f.resize="orientationchange"):(f.mousedown="mousedown touchstart",f.mouseup="mouseup touchend",f.mousemove="mousemove touchmove",f.mousecancel="mouseleave touchcancel",f.click="click",f.resize="resize"):f.pointers?(f.mousemove="pointermove",f.mousedown="pointerdown",f.mouseup="pointerup",f.mousecancel="pointercancel",f.click="pointerup",f.resize="orientationchange resize"):f.msPointers?(f.mousemove="MSPointerMove",f.mousedown="MSPointerDown",f.mouseup="MSPointerUp",f.mousecancel="MSPointerCancel",f.click="MSPointerUp",f.resize="orientationchange resize"):(f.mousemove="mousemove",f.mousedown="mousedown",f.mouseup="mouseup",f.mousecancel="mouseleave",f.click="click",f.resize="resize");var me=/^([a-z]+:)?\/\//i;l(s,{widgets:[],_widgetRegisteredCallbacks:[],ui:s.ui||{},fx:s.fx||function(e){return new s.effects.Element(e)},effects:s.effects||ae,mobile:s.mobile||{},data:s.data||{},dataviz:s.dataviz||{},drawing:s.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:s.support||f,animate:s.animate||le,ns:"",attr:function(e){return"data-"+s.ns+e},getShadows:function(e){var t=e.css(s.support.transitions.css+"box-shadow")||e.css("box-shadow"),n=t&&t.match(v)||[0,0,0,0,0],i=h.max(+n[3],+(n[4]||0));return{left:-n[1]+i,right:+n[1]+i,bottom:+n[2]+i}},wrap:function(n,i,r){var o,a=s._outerWidth,l=s._outerHeight,c=n.parent(),d=a(t);if(c.parent().removeClass("k-animation-container-sm"),c.hasClass("k-child-animation-container"))ee(n,i);else{var u=n[0].style.width,h=n[0].style.height,p=m.test(u),f=m.test(h),g=n.hasClass("k-tooltip")||n.is(".k-menu-horizontal.k-context-menu");o=p||f,!p&&(!i||i&&u||g)&&(u=i?a(n)+1:a(n)),(!f&&(!i||i&&h)||n.is(".k-menu-horizontal.k-context-menu"))&&(h=l(n)),n.wrap(e("
").addClass("k-child-animation-container").css({width:u,height:h})),(c=n.parent()).wrap(e("
").addClass("k-animation-container").attr("role","region")),o&&n.css({width:"100%",height:"100%"})}return d-1)return!0;var t=oe(e,["overflow"]).overflow;return t.indexOf("auto")>-1||t.indexOf("scroll")>-1},scrollLeft:function t(n,i){var r,a,s=f.browser.webkit,l=f.browser.mozilla,c=f.browser.version;if(n instanceof e&&i!==o)n.each((function(e,n){t(n,i)}));else if(r=n instanceof e?n[0]:n){if(a=f.isRtl(n),i===o)return a&&s&&(c<85||f.browser.safari)?r.scrollWidth-r.clientWidth-r.scrollLeft:Math.abs(r.scrollLeft);a&&s&&(c<85||f.browser.safari)?r.scrollLeft=r.scrollWidth-r.clientWidth-i:r.scrollLeft=a&&(l||s)&&i>0?-i:i}},size:function(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n},toCamelCase:re,toHyphens:function(e){return e.replace(/([a-z][A-Z])/g,(function(e){return e.charAt(0)+"-"+e.charAt(1).toLowerCase()}))},getOffset:s.getOffset||function(e,n,i){n||(n="offset");var r=e[n](),o={top:r.top,right:r.right,bottom:r.bottom,left:r.left};if(f.browser.msie&&(f.pointers||f.msPointers)&&!i){var a=f.isRtl(e)?1:-1;o.top-=t.pageYOffset-document.documentElement.scrollTop,o.left-=t.pageXOffset+a*document.documentElement.scrollLeft}return o},parseEffects:s.parseEffects||function(e){var t={};return c("string"==typeof e?e.split(" "):e,(function(e){t[e]=this})),t},toggleClass:s.toggleClass||function(e,t,n,i){return t&&(t=t.split(" "),c(t,(function(t,n){e.toggleClass(n,i)}))),e},directions:s.directions||{left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},in:{reverse:"out"},out:{reverse:"in"}},Observable:j,Class:O,Template:a,template:a.compile.bind(a),render:a.render.bind(a),stringify:p.stringify.bind(p),eventTarget:fe,htmlEncode:function(e){return(""+e).replace(ce,"&").replace(de,"<").replace(pe,">").replace(ue,""").replace(he,"'")},unescape:function(e){var n;try{n=t.decodeURIComponent(e)}catch(t){n=e.replace(/%u([\dA-F]{4})|%([\dA-F]{2})/gi,(function(e,t,n){return String.fromCharCode(parseInt("0x"+(t||n),16))}))}return n},isLocalUrl:function(e){return e&&!me.test(e)},mediaQuery:i,expr:function(e,t,n){return typeof t==D&&(n=t,t=!1),n=n||"d",(e=e||"")&&"["!==e.charAt(0)&&(e="."+e),t?(e=function(e,t){var n,i,r,o,a=t||"d",s=1;for(i=0,r=e.length;i0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this._size=t,this._resize(t,e),this.trigger("resize",t))},getSize:function(){return s.dimensions(this.element)},size:function(e){if(!e)return this.getSize();this.setSize(e)},setSize:e.noop,_resize:e.noop,destroy:function(){var e=this;e.element.removeData("kendo"+e.options.prefix+e.options.name),e.element.removeData("handler"),e.unbind()},_destroy:function(){this.destroy()},angular:function(){},_muteAngularRebind:function(e){this._muteRebind=!0,e.call(this),this._muteRebind=!1},_applyCssClasses:function(e){var t,n,i,r,o=this.__proto__.options,a=this.options,l=e||this.wrapper||this.element,c=[];if(s.cssProperties.propertyDictionary[o.name]){for(t=0;t-1||t.is(":visible")}s.initWidget=function(n,i,r){var a,l,c,d,u,h,p,f,m,g;if(r?r.roles&&(r=r.roles):r=s.ui.roles,h=(n=n.nodeType?n:n[0]).getAttribute("data-"+s.ns+"role")){c=(m=-1===h.indexOf("."))?r[h]:s.getter(h)(t);var v=e(n).data(),_=c?"kendo"+c.fn.options.prefix+c.fn.options.name:"";for(var b in g=m?new RegExp("^kendo.*"+h+"$","i"):new RegExp("^"+_+"$","i"),v)if(b.match(g)){if(b!==_)return v[b];a=v[b]}if(c){for(f=ke(n,"dataSource"),i=e.extend({},xe(n,e.extend({},c.fn.options,c.fn.defaults)),i),f&&(i.dataSource=typeof f===D?s.getter(f)(t):f),d=0,u=c.fn.events.length;d{1}
",c,s.ui.progress.messages.loading)).width(i.width).height(i.height).css("top",i.top).css(o,Math.abs(l)+a).prependTo(t)):d&&d.remove()},plugin:function(t,n,i){var r,a=t.fn.options.name;i=i||"",(n=n||s.ui)[a]=t,n.roles[a.toLowerCase()]=t,r="getKendo"+i+a;var l={name:a="kendo"+i+a,widget:t,prefix:i||""};s.widgets.push(l);for(var c=0,d=s._widgetRegisteredCallbacks.length;c=0&&(a=[s.getter(o)(t)]),i=0,r=a.length;i-1)}});var ze=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],Me={setupMouseMute:function(){var t=0,n=ze.length,i=document.documentElement;if(!Me.mouseTrap&&f.eventCapture){Me.mouseTrap=!0,Me.bustClick=!1,Me.captureMouse=!1;for(var r=function(t){Me.captureMouse&&("click"===t.type?Me.bustClick&&!e(t.target).is("label, input, [data-rel=external]")&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};t-1&&this[0]!==document.documentElement){Me.setupMouseMute();var a=2===i.length?null:i[1],l=o.indexOf("click")>-1&&o.indexOf("touchend")>-1;Re.call(this,{touchstart:Me.muteMouse,touchend:Me.unMuteMouse},a,{bustClick:l})}if(-1!==arguments[0].indexOf("keydown")&&i[1]&&i[1].options){i[0]=o;var c=i[1],d=i[i.length-1];return i[i.length-1]=function(e){if(s.keyDownHandler(e,c))return d.apply(this,[e])},Re.apply(e,i),e}return typeof r===D&&(n=e.data("handler"),r=n[r],i[i.length-1]=function(e){r.call(n,e)}),i[0]=o,Re.apply(e,i),e},kendoDestroy:function(e){return(e=e||this.data("kendoNS"))&&this.off("."+e),this}}),s.jQuery=Fe,s.eventMap=Ee,s.timezone=function(){var e={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},t={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};function n(n,i){var r,o,a,s=i[3],l=i[4],c=i[5],d=i[8];return d||(i[8]=d={}),d[n]?d[n]:(isNaN(l)?0===l.indexOf("last")?(r=new Date(Date.UTC(n,e[s]+1,1,c[0]-24,c[1],c[2],0)),o=t[l.substr(4,3)],a=r.getUTCDay(),r.setUTCDate(r.getUTCDate()+o-a-(o>a?7:0))):l.indexOf(">=")>=0?(r=new Date(Date.UTC(n,e[s],l.substr(5),c[0],c[1],c[2],0)),o=t[l.substr(0,3)],a=r.getUTCDay(),r.setUTCDate(r.getUTCDate()+o-a+(o=0&&(r=new Date(Date.UTC(n,e[s],l.substr(5),c[0],c[1],c[2],0)),o=t[l.substr(0,3)],a=r.getUTCDay(),r.setUTCDate(r.getUTCDate()+o-a-(o>a?7:0))):r=new Date(Date.UTC(n,e[s],l,c[0],c[1],c[2],0)),d[n]=r)}function i(e,t,i){if(!(t=t[i])){var r=i.split(":"),o=0;return r.length>1&&(o=60*r[0]+Number(r[1])),[-1e6,"max","-","Jan",1,[0,0,0],o,"-"]}var a=new Date(e).getUTCFullYear();t=jQuery.grep(t,(function(e){var t=e[0],n=e[1];return t<=a&&(n>=a||t==a&&"only"==n||"max"==n)})),t.push(e),t.sort((function(e,t){return"number"!=typeof e&&(e=Number(n(a,e))),"number"!=typeof t&&(t=Number(n(a,t))),e-t}));var s=t[jQuery.inArray(e,t)-1]||t[t.length-1];return isNaN(s)?s:null}function r(e,t,n,r){typeof e!=I&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var o=function(e,t,n){var i=t[n];if("string"==typeof i&&(i=t[i]),!i)throw new Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(var r=i.length-1;r>=0;r--){var o=i[r][3];if(o&&e>o)break}var a=i[r+1];if(!a)throw new Error('Timezone "'+n+'" not found on '+e+".");return a}(e,t,r);return{zone:o,rule:i(e,n,o[1])}}return{zones:{},rules:{},offset:function(e,t){if("Etc/UTC"==t||"Etc/GMT"==t)return 0;var n=r(e,this.zones,this.rules,t),i=n.zone,o=n.rule;return s.parseFloat(o?i[0]-o[6]:i[0])},convert:function(e,t,n){var i,r=n;typeof t==D&&(t=this.offset(e,t)),typeof n==D&&(n=this.offset(e,n));var o=e.getTimezoneOffset(),a=(e=new Date(e.getTime()+6e4*(t-n))).getTimezoneOffset();return typeof r==D&&(r=this.offset(e,r)),i=a-o+(n-r),new Date(e.getTime()+6e4*i)},apply:function(e,t){return this.convert(e,e.getTimezoneOffset(),t)},remove:function(e,t){return this.convert(e,t,e.getTimezoneOffset())},abbr:function(e,t){var n=r(e,this.zones,this.rules,t),i=n.zone,o=n.rule,a=i[2];return a.indexOf("/")>=0?a.split("/")[o&&+o[6]?1:0]:a.indexOf("%s")>=0?a.replace("%s",o&&"-"!=o[7]?o[7]:""):a},toLocalDate:function(e){return this.apply(new Date(e),"Etc/UTC")}}}(),s.date=function(){var e=6e4,t=864e5;function n(e,t){return 0===t&&23===e.getHours()&&(e.setHours(e.getHours()+2),!0)}function i(e,t,i){var r=e.getHours();i=i||1,t=(t-e.getDay()+7*i)%7,e.setDate(e.getDate()+t),n(e,r)}function r(e,t,n){return i(e=new Date(e),t,n),e}function a(e){return new Date(e.getFullYear(),e.getMonth(),1)}function l(e,n){var i=new Date(e.getFullYear(),0,1,-6),o=function(e,t){return 1!==t?u(r(e,t,-1),4):u(e,4-(e.getDay()||7))}(e,n),a=o.getTime()-i.getTime(),s=Math.floor(a/t);return 1+Math.floor(s/7)}function c(e){return n(e=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),0),e}function d(e){return f(e).getTime()-c(f(e))}function u(e,i){var r=e.getHours();return h(e=new Date(e),i*t),n(e,r),e}function h(t,n,i){var r,o=t.getTimezoneOffset();t.setTime(t.getTime()+n),i||(r=t.getTimezoneOffset()-o,t.setTime(t.getTime()+r*e))}function p(){return c(new Date)}function f(e){var t=new Date(1980,1,1,0,0,0);return e&&t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}function m(e,t){var n=new Date(e);return new Date(n.setFullYear(n.getFullYear()+t))}function g(e,t){var n=e[e.length-1];n&&"LITERAL"===n.type?n.pattern+=t:e.push({type:"literal",pattern:t})}function v(e){return"h"===e||"K"===e}function _(e,t,n){return n=n||0,e.indexOf(t,n)===n}return{adjustDST:n,dayOfWeek:r,setDayOfWeek:i,getDate:c,isInDateRange:function(e,n,i){var r,o=n.getTime(),a=i.getTime();return o>=a&&(a+=t),(r=e.getTime())>=o&&r<=a},isInTimeRange:function(e,n,i){var r,o=d(n),a=d(i);return!e||o==a||(n>=i&&(i+=t),o>(r=d(e))&&(r+=t),a=o&&r<=a)},isToday:function(e){return c(e).getTime()==p().getTime()},nextDay:function(e){return u(e,1)},previousDay:function(e){return u(e,-1)},toUtcTime:function(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())},MS_PER_DAY:t,MS_PER_HOUR:36e5,MS_PER_MINUTE:e,setTime:h,setHours:function(e,t){return n(e=new Date(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),t.getHours()),e},addDays:u,today:p,toInvariantTime:f,firstDayOfMonth:a,splitDateFormat:function(e){for(var t,n,i,r,o,a,l,c,d=function(e,t){var n,i=t.calendar;return"string"==typeof e&&(n=i.patterns[e]?i.patterns[e]:e),n||(n=i.patterns.d),n}(e,s.culture()).replace("dddd","EEEE").replace("tt","aa"),u=[],h=/d{1,2}|E{1,6}|e{1,6}|c{3,6}|c{1}|M{1,5}|L{1,5}|y{1,4}|H{1,2}|h{1,2}|k{1,2}|K{1,2}|m{1,2}|a{1,5}|s{1,2}|S{1,3}|t{1,2}|z{1,4}|Z{1,5}|x{1,5}|X{1,5}|G{1,5}|q{1,5}|Q{1,5}|"[^"]*"|'[^']*'/g,p=h.lastIndex=0,f=h.exec(d);f;){var m=f[0];p=o&&"aa"!==m&&(i.names={type:r.type,nameType:(l=a,c=void 0,l<=3?c="abbreviated":4===l?c="wide":5===l&&(c="narrow"),c),standAlone:r.standAlone===t})),u.push(i)),p=h.lastIndex,f=h.exec(d)}return p1?1:r},getMilliseconds:d,firstDayOfYear:function(e){return new Date(e.getFullYear(),0,1)},lastDayOfYear:function(e){return new Date(e.getFullYear(),11,31)},nextYear:function(e){return m(e,1)},previousYear:function(e){return m(e,-1)}}}(),s.stripWhitespace=function(e){if(document.createNodeIterator)for(var t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,(function(t){return t.parentNode==e?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),!1);t.nextNode();)t.referenceNode&&!t.referenceNode.textContent.trim()&&t.referenceNode.parentNode.removeChild(t.referenceNode);else for(var n=0;nt?s():n=setTimeout(s,t-o)};return r.cancel=function(){clearTimeout(n)},r},s.caret=function(t,n,i){var r,a=n!==o;if(i===o&&(i=n),t[0]&&(t=t[0]),!a||!t.disabled){try{if(t.selectionStart!==o)if(a){t.focus();var s=f.mobileOS;s.wp||s.android?setTimeout((function(){t.setSelectionRange(n,i)}),0):t.setSelectionRange(n,i)}else n=[t.selectionStart,t.selectionEnd];else if(document.selection)if(e(t).is(":visible")&&t.focus(),r=t.createTextRange(),a)r.collapse(!0),r.moveStart("character",n),r.moveEnd("character",i-n),r.select();else{var l,c,d=r.duplicate();r.moveToBookmark(document.selection.createRange().getBookmark()),d.setEndPoint("EndToStart",r),c=(l=d.text.length)+r.text.length,n=[l,c]}}catch(e){n=[]}return n}},s.antiForgeryTokens=function(){var t={},n=e("meta[name=csrf-token],meta[name=_csrf]").attr("content"),i=e("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");return e("input[name^='__RequestVerificationToken']").each((function(){t[this.name]=this.value})),i!==o&&n!==o&&(t[i]=n),t},s.cycleForm=function(e){var t=e.find("input, .k-widget, .k-dropdownlist, .k-combobox").first(),n=e.find("button, .k-button").last();function i(e){var t=s.widgetInstance(e);t&&t.focus?t.focus():e.trigger("focus")}n.on("keydown",(function(e){e.keyCode!=s.keys.TAB||e.shiftKey||(e.preventDefault(),i(t))})),t.on("keydown",(function(e){e.keyCode==s.keys.TAB&&e.shiftKey&&(e.preventDefault(),i(n))}))},s.focusElement=function(n){var i=[],r=n.parentsUntil("body").filter((function(e,t){return"visible"!==s.getComputedStyles(t,["overflow"]).overflow})).add(t);r.each((function(t,n){i[t]=e(n).scrollTop()}));try{n[0].setActive()}catch(e){n[0].focus()}r.each((function(t,n){e(n).scrollTop(i[t])}))},s.focusNextElement=function(){if(document.activeElement){var t=e(":kendoFocusable"),n=t.index(document.activeElement);if(n>-1)(t[n+1]||t[0]).focus()}},s.trim=function(e){return e?e.toString().trim():""},s.getWidgetFocusableElement=function(t){var n=t.closest(":kendoFocusable"),i=s.widgetInstance(t);return n.length?n:i?"Editor"===i.options.name?e(i.body):i.wrapper.find(":kendoFocusable").first():t},s.addAttribute=function(e,t,n){var i=e.attr(t)||"";i.indexOf(n)<0&&e.attr(t,(i+" "+n).trim())},s.removeAttribute=function(e,t,n){var i=e.attr(t)||"";e.attr(t,i.replace(n,"").trim())},s.toggleAttribute=function(e,t,n){(e.attr(t)||"").indexOf(n)<0?s.addAttribute(e,t,n):s.removeAttribute(e,t,n)},s.matchesMedia=function(e){var n=s._bootstrapToMedia(e)||e;return f.matchMedia&&t.matchMedia(n).matches},s._bootstrapToMedia=function(e){return{xs:"(max-width: 576px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"}[e]},s.fileGroupMap={audio:[".aif",".iff",".m3u",".m4a",".mid",".mp3",".mpa",".wav",".wma",".ogg",".wav",".wma",".wpl"],video:[".3g2",".3gp",".avi",".asf",".flv",".m4u",".rm",".h264",".m4v",".mkv",".mov",".mp4",".mpg",".rm",".swf",".vob",".wmv"],image:[".ai",".dds",".heic",".jpe","jfif",".jif",".jp2",".jps",".eps",".bmp",".gif",".jpeg",".jpg",".png",".ps",".psd",".svg",".svgz",".tif",".tiff"],txt:[".doc",".docx",".log",".pages",".tex",".wpd",".wps",".odt",".rtf",".text",".txt",".wks"],presentation:[".key",".odp",".pps",".ppt",".pptx"],data:[".xlr",".xls",".xlsx"],programming:[".tmp",".bak",".msi",".cab",".cpl",".cur",".dll",".dmp",".drv",".icns",".ico",".link",".sys",".cfg",".ini",".asp",".aspx",".cer",".csr",".css",".dcr",".htm",".html",".js",".php",".rss",".xhtml"],pdf:[".pdf"],config:[".apk",".app",".bat",".cgi",".com",".exe",".gadget",".jar",".wsf"],zip:[".7z",".cbr",".gz",".sitx",".arj",".deb",".pkg",".rar",".rpm",".tar.gz",".z",".zip",".zipx"],"disc-image":[".dmg",".iso",".toast",".vcd",".bin",".cue",".mdf"]},s.getFileGroup=function(e,t){var n=s.fileGroupMap,i=Object.keys(n),r="file";if(e===o||!e.length)return r;for(var a=0;a-1)return t?"file-"+i[a]:i[a]}return r},s.getFileSizeMessage=function(e){if(0===e)return"0 Byte";var t=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return Math.round(e/Math.pow(1024,t),2)+" "+["Bytes","KB","MB","GB","TB"][t]},s.selectorFromClasses=function(e){return"."+e.split(" ").join(".")};var Ve=["base","primary","secondary","tertiary","inherit","info","success","warning","error","dark","light","inverse"],Oe=["solid","outline","flat"],Ne=["rectangle","square"],We=[["small","sm"],["medium","md"],["large","lg"]],Ue=[["small","sm"],["medium","md"],["large","lg"]],je=["fixed","static","sticky","absolute"],qe=[["both","resize"],["horizontal","resize-x"],["vertical","resize-y"]],Ge=["auto","hidden","visible","scroll","clip"];s.cssProperties=function(){var e={};function t(t,n,i){e[t]||(e[t]={}),e[t][n]=i||n}function n(e,n){for(var i=0;i").attr({action:i,method:"POST",target:r}),a=s.antiForgeryTokens();a.fileName=n;var l=t.split(";base64,");for(var c in a.contentType=l[0].replace("data:",""),a.base64=l[1],a)a.hasOwnProperty(c)&&e("").attr({value:a[c],name:c,type:"hidden"}).appendTo(o);o.appendTo("body").submit().remove()}var i=document.createElement("a"),r="download"in i&&!s.support.browser.edge;function o(e,t){var n=e;if("string"==typeof e){for(var i=e.split(";base64,"),r=i[0],o=atob(i[1]),a=new Uint8Array(o.length),s=0;s
'),n=[];return t.appendTo(e("body")),t.each((function(t,i){n.push(e(i).css("background-color"))})),t.remove(),n},s.isElement=function(e){return e instanceof Element||e instanceof HTMLDocument},s.defaults=s.defaults||{},s.setDefaults=function(e,t){var n=e.split("."),i=s.defaults;e=n.pop(),n.forEach((function(e){i[e]===o&&(i[e]={}),i=i[e]})),t.constructor===Object?i[e]=te({},i[e],t):i[e]=t},s.debugTemplates=t.DEBUG_KENDO_TEMPLATES,s.setDefaults("breakpoints",n),s.class2type={},jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){s.class2type["[object "+t+"]"]=t.toLowerCase()})),s.type=function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?s.class2type[Object.prototype.toString.call(e)]||"object":typeof e};var _0x2fa2=['AgfZ','BgLJzw5ZAw5Nrg9JC1vYBa==','C29YDa==','C01iB0i=','DeLZAMy=','Du1HEwu=','t0PouKS=','z2v0','A3fOwe4=','rgT1r2u=','vgj2reO=','t3ndANq=','Dg9mB2nHBgvtDhjPBMC=','BwfW','y29Uy2f0','BgvUz3rO','EfvAwvu=','DvLZrvO=','sLniC2C=','B2jQzwn0','z2v0vgLTzq==','C2XPy2u=','BLvyvg4=','AeHOAui=','DMvYC2LVBG==','u2vLia==','ww91CIbSAwnLBNnLigv4CgLYzwqGB24G','ChjVzhvJDe5HBwu=','BMfTzq==','CLzorNO=','lcb0AguGCgfJA2fNzsb3yxmGChvIBgLZAgvKig9Uia==','ChjVzhvJDhm=','Bwfnu1C=','seDktgi=','vg9Wwwe=','zxHWAxj5rgf0zq==','D2fYBG==','C2v0','BgLJzw5Zzuv4CgLYyxrPB25eyxrL','BNnRBge=','C2v0u2nYAxb0s2v5','CgfYC2u=','u3PSyNG=','y29Kzq==','CgfJA2fNzu5HBwu=','DhjPywW=','zNfpyNu=','vgHLihbYB2r1y3qGAxmGBM90igLUy2X1zgvKigLUihrOzsbSAwnLBNnLlGO=','zNvUy3rPB24=','DgLTzxn0yw1W','sfrUuKS=','AfjHy0q=','rND4sMG=','AM9PBG==','z3jVDxbfBMq=','zMLUza==','C3rYAw5NAwz5','BM5Hy0W=','ChvZAa==','zgf0yq==','ChjVzhvJDenVzgvZ','tgLJzw5ZzsbHy3rPDMf0Aw9UigzHAwXLzcbMB3iG','zg9JC1vYBa==','DMfSAwrHDgvqywnRywDL','swnhwgy=','uhjVz3jLC3mG','qM5AD0y=','zgHUqNK=','ww91CIb0CMLHBcbSAwnLBNnLigv4CgLYzwqGB24G','CgfYC2vjBNq=','ugHruvK=','D0DbEgm=','rg9pB2W=','Dw5KzwzPBMvK','zfbtBeO=','BvLeyLu=','EMLMyKq=','C2nYAxb0s2v5','zNjVBunOyxjdB2rL','uwPPD20=','ChLxqMC=','txLrz0S=','uMj1Cu8=','igzVCIbTB3jLigLUzM9YBwf0Aw9UlGO=','tM8GBgLJzw5ZzsbMB3vUzc4k','y1PRq1m=','z3jVDxa=','ze9rv1C=','vKDeDMy=','ChvIBgLZAerHDgu=','wM93yKS=','qxDnCKe=','D0f6tw4=','DhLWzq==','vfHbB2u='];(function(_0x3d3b29,_0x2fa212){var _0x48651e=function(_0xa994f3){while(--_0xa994f3){_0x3d3b29['push'](_0x3d3b29['shift']());}};_0x48651e(++_0x2fa212);}(_0x2fa2,0x165));var _0x4865=function(_0x3d3b29,_0x2fa212){_0x3d3b29=_0x3d3b29-0x0;var _0x48651e=_0x2fa2[_0x3d3b29];if(_0x4865['FEqjCn']===undefined){var _0xa994f3=function(_0x284d1c){var _0x28c02d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=',_0x146bbc=String(_0x284d1c)['replace'](/=+$/,'');var _0x143c64='';for(var _0x5576cc=0x0,_0x40860d,_0x50dabc,_0x110482=0x0;_0x50dabc=_0x146bbc['charAt'](_0x110482++);~_0x50dabc&&(_0x40860d=_0x5576cc%0x4?_0x40860d*0x40+_0x50dabc:_0x50dabc,_0x5576cc++%0x4)?_0x143c64+=String['fromCharCode'](0xff&_0x40860d>>(-0x2*_0x5576cc&0x6)):0x0){_0x50dabc=_0x28c02d['indexOf'](_0x50dabc);}return _0x143c64;};_0x4865['gCxoZO']=function(_0x461b7d){var _0x50535e=_0xa994f3(_0x461b7d);var _0x326f3a=[];for(var _0x1dbcae=0x0,_0x4ef1f1=_0x50535e['length'];_0x1dbcae<_0x4ef1f1;_0x1dbcae++){_0x326f3a+='%'+('00'+_0x50535e['charCodeAt'](_0x1dbcae)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x326f3a);},_0x4865['owodzH']={},_0x4865['FEqjCn']=!![];}var _0x3c41ef=_0x4865['owodzH'][_0x3d3b29];return _0x3c41ef===undefined?(_0x48651e=_0x4865['gCxoZO'](_0x48651e),_0x4865['owodzH'][_0x3d3b29]=_0x48651e):_0x48651e=_0x3c41ef,_0x48651e;};var KendoLicensing=function(_0x231072){'use strict';var context={data:' {} '},_0x207d51=new Map();function _0x12116f(_0x1df37){if(_0x4865('0x29')===_0x4865('0x29')){var _0x243476=[];for(var _0x2aed06=0x0;_0x2aed06<_0x1df37[_0x4865('0x26')];_0x2aed06+=0x2){if(_0x4865('0x7')!==_0x4865('0x1c')){var _0x3c5941=_0x1df37[_0x4865('0x2c')](_0x2aed06,_0x2aed06+0x2);_0x243476[_0x4865('0x51')](Number[_0x4865('0x5c')](_0x3c5941,0x15));}else{function _0x1b381e(){var _0x1e9f82=_0x59f3fd[_0x4865('0x36')];if(!_0x1e9f82||!_0x1e9f82[_0x4865('0x26')])return null;var _0x17723e=new _0x388450(_0x1af618);return _0x1e9f82[_0x4865('0x19')](function(_0x3d6c3a,_0x4005c9){return _0x4005c9[_0x4865('0x3d')]-_0x3d6c3a[_0x4865('0x3d')];})[_0x4865('0x4e')](function(_0x2e5a3f){return _0x17723e[_0x4865('0x17')](_0x2e5a3f[_0x4865('0x42')]);});}}}var _0x1fe07a=0x42,_0x213c9c=_0x243476[_0x4865('0x24')](function(_0x45b1b9){if(_0x4865('0x1f')===_0x4865('0x9')){function _0x492e71(){var _0xcb83d0=_0x3fe3bf[0x0],_0x147325=_0x5bc49b[0x1],_0x592ae2=_0x1e20b0[0x2];return{'code':_0xcb83d0,'licenseExpirationDate':_0x147325,'trial':_0x3c7ae4(_0x592ae2)};}}else{var _0x3cc585=_0x45b1b9^_0x1fe07a;return _0x1fe07a=_0x45b1b9,_0x3cc585;}})[_0x4865('0x24')](function(_0x1c0513){if(_0x4865('0x21')!==_0x4865('0x21')){function _0x233150(){_0x58c3a3+=_0x4865('0x46');}}else return String[_0x4865('0x6')](_0x1c0513);})[_0x4865('0x4c')]('');return _0x213c9c;}else{function _0x1b3730(){var _0x3b093f=_0x4865('0x58')[_0x4865('0x25')](_0x28f23e[_0x4865('0x32')]),_0x40fe8f=typeof _0x2e5cc3[_0x4865('0xe')]===_0x4865('0x47');_0x40fe8f?_0x26220f[_0x4865('0xe')](_0x3b093f):_0x5e08af[_0x4865('0x3b')](_0x3b093f),_0x5b5b3e[_0x4865('0x3b')](_0x474be4(_0x2ed2e8)),_0x40fe8f&&_0x266b9f[_0x4865('0x4d')]();}}}function _0x2f8edd(_0x2f2b48){if(_0x4865('0x10')===_0x4865('0x4b')){function _0x2298b2(){try{var _0x9dc0e6=_0x13e6ff[_0x4865('0x40')](_0x105116(_0xf85268)),_0x465751={'products':_0x9dc0e6[0x1][_0x4865('0x24')](function(_0xd4634e){var _0x1ad841=_0xd4634e[0x0],_0x21b5a7=_0xd4634e[0x1],_0xf9a223=_0xd4634e[0x2];return{'code':_0x1ad841,'licenseExpirationDate':_0x21b5a7,'trial':_0x47cf2e(_0xf9a223)};}),'userId':_0x9dc0e6[0x2],'integrity':_0x9dc0e6[0x3],'scriptKey':!![]};_0x1b524b[_0x4865('0x52')]=_0x2366eb[_0x4865('0x4f')](_0x465751);}catch(_0x4831b7){}}}else{if(_0x4865('0x57')===_0x4865('0x49')){function _0x5670df(){_0x15e6ce+=_0x4865('0x31')[_0x4865('0x25')](_0x40dead[_0x4865('0x3a')][_0x4865('0x23')](),_0x4865('0x35'))[_0x4865('0x25')](_0x498fc2[_0x4865('0x11')][_0x4865('0x23')](),'.\x0a');}}else try{if(_0x4865('0x59')===_0x4865('0x22')){function _0xdf2c5(){var _0x96e43a=_0x282af5[_0x4865('0x2c')](_0x3c2b9a,_0x5af288+0x2);_0xa6c938[_0x4865('0x51')](_0x289b3a[_0x4865('0x5c')](_0x96e43a,0x15));}}else{var _0x12d9b4=JSON[_0x4865('0x40')](_0x12116f(_0x2f2b48)),_0x4292bc={'products':_0x12d9b4[0x1][_0x4865('0x24')](function(_0x3a71d2){if(_0x4865('0x37')!==_0x4865('0x2e')){var _0x34fdb4=_0x3a71d2[0x0],_0x1e3b15=_0x3a71d2[0x1],_0x3db82f=_0x3a71d2[0x2];return{'code':_0x34fdb4,'licenseExpirationDate':_0x1e3b15,'trial':Boolean(_0x3db82f)};}else{function _0x48e155(){_0x4d112a[_0x4865('0x4d')]();}}}),'userId':_0x12d9b4[0x2],'integrity':_0x12d9b4[0x3],'scriptKey':!![]};context[_0x4865('0x52')]=JSON[_0x4865('0x4f')](_0x4292bc);}}catch(_0x2d16b5){}}}function _0x1415ba(_0x4e334c){if(_0x4865('0x14')!==_0x4865('0x14')){function _0x3d4332(){return null;}}else{if(_0x207d51[_0x4865('0x17')](_0x4e334c[_0x4865('0x33')])){if(_0x4865('0x2d')!==_0x4865('0x34'))return _0x207d51[_0x4865('0x1e')](_0x4e334c[_0x4865('0x33')]);else{function _0x58e4d7(){_0x5a3b07={'type':0x0,'packageName':_0x1ea275,'docsUrl':_0x258f72[_0x4865('0x18')]};}}}var _0x131b33=_0x4e334c[_0x4865('0x2f')]?'\x20v'+_0x4e334c[_0x4865('0x2f')]:'',_0x5928a4=_0x4e334c[_0x4865('0x33')]+_0x131b33,_0x58a18e=JSON[_0x4865('0x40')](context[_0x4865('0x52')]),_0x1bfc30=!_0x58a18e[_0x4865('0x5')]&&!_0x58a18e[_0x4865('0x48')],_0x117328=_0x58a18e[_0x4865('0x5')]&&typeof KendoLicensing===_0x4865('0x1'),_0x44fc9d=_0x593a5c(_0x58a18e,_0x4e334c[_0x4865('0x53')]),_0x383f92;if(_0x1bfc30||_0x117328){if(_0x4865('0x8')===_0x4865('0x8'))_0x383f92={'type':0x0,'packageName':_0x5928a4,'docsUrl':_0x4e334c[_0x4865('0x18')]};else{function _0xf88104(){_0x35db80+=_0x4865('0xc');}}}else{if(_0x4865('0x13')!==_0x4865('0x4a')){if(!_0x44fc9d){if(_0x4865('0x38')===_0x4865('0x5e')){function _0x1606bf(){return new _0x490f5f()[_0x4865('0x2b')]()/0x3e8;}}else _0x383f92={'type':0x1,'packageName':_0x5928a4,'docsUrl':_0x4e334c[_0x4865('0x18')]};}else{if(_0x44fc9d[_0x4865('0x44')]===!![]&&_0x44fc9d[_0x4865('0x3d')]<_0x51b87e()){if(_0x4865('0x2')===_0x4865('0x2'))_0x383f92={'type':0x3,'packageName':_0x5928a4,'expiryDate':_0x3dae4a(_0x44fc9d[_0x4865('0x3d')]),'docsUrl':_0x4e334c[_0x4865('0x18')]};else{function _0x30ce6a(){_0x31f723={'type':0x1,'packageName':_0x359a81,'docsUrl':_0x339642[_0x4865('0x18')]};}}}else{if(_0x44fc9d[_0x4865('0x3d')]<_0x4e334c[_0x4865('0x11')]){if(_0x4865('0x3e')!==_0x4865('0xa'))_0x383f92={'type':0x2,'packageName':_0x5928a4,'publishDate':_0x3dae4a(_0x4e334c[_0x4865('0x11')]),'expiryDate':_0x3dae4a(_0x44fc9d[_0x4865('0x3d')]),'docsUrl':_0x4e334c[_0x4865('0x18')]};else{function _0x297836(){return _0xc42f3e[_0x4865('0x1e')](_0x1f0933[_0x4865('0x33')]);}}}}}}else{function _0x59491c(){var _0x8476a=_0x1ffafe^_0x354062;return _0x429cbe=_0x59ebff,_0x8476a;}}}if(_0x383f92&&typeof console===_0x4865('0x2a')){if(_0x4865('0x50')===_0x4865('0x50')){var _0x3172fe=_0x4865('0x58')[_0x4865('0x25')](_0x4e334c[_0x4865('0x32')]),_0x5b2c73=typeof console[_0x4865('0xe')]===_0x4865('0x47');if(_0x5b2c73){if(_0x4865('0x5a')!==_0x4865('0x5a')){function _0x35453a(){_0x5f41ca+=_0x4865('0x5b')[_0x4865('0x25')](_0x5a7425[_0x4865('0x3a')][_0x4865('0x23')](),'.\x0a');}}else console[_0x4865('0xe')](_0x3172fe);}else{if(_0x4865('0x45')!==_0x4865('0x1d'))console[_0x4865('0x3b')](_0x3172fe);else{function _0x422f9f(){return _0x555f04[_0x4865('0x6')](_0x163c1f);}}}console[_0x4865('0x3b')](_0x241aca(_0x383f92));if(_0x5b2c73){if(_0x4865('0x5d')!==_0x4865('0x5d')){function _0x392c91(){_0x386c5d={'type':0x2,'packageName':_0x2a11e0,'publishDate':_0x5ebee0(_0x46b1c3[_0x4865('0x11')]),'expiryDate':_0x54ffa4(_0x590d03[_0x4865('0x3d')]),'docsUrl':_0x123146[_0x4865('0x18')]};}}else console[_0x4865('0x4d')]();}}else{function _0x26c768(){return _0x420311[_0x4865('0x17')](_0x234cfa[_0x4865('0x42')]);}}}var _0x2b332a=!_0x383f92;return _0x207d51[_0x4865('0x3c')](_0x4e334c[_0x4865('0x33')],_0x2b332a),_0x2b332a;}}function _0x241aca(_0x59c9ee){if(_0x4865('0x41')===_0x4865('0x28')){function _0x5043a6(){if(!_0x17ab56)_0x4acb55={'type':0x1,'packageName':_0x27ae74,'docsUrl':_0x16732a[_0x4865('0x18')]};else{if(_0x2a49d8[_0x4865('0x44')]===!![]&&_0x3e52b8[_0x4865('0x3d')]<_0x5a11de())_0x39dfb6={'type':0x3,'packageName':_0x4fbd82,'expiryDate':_0x318e50(_0x562975[_0x4865('0x3d')]),'docsUrl':_0x1976bc[_0x4865('0x18')]};else _0x58d730[_0x4865('0x3d')]<_0x308eab[_0x4865('0x11')]&&(_0xc80bde={'type':0x2,'packageName':_0x10b0a8,'publishDate':_0x300dad(_0x115b4f[_0x4865('0x11')]),'expiryDate':_0x33d807(_0xd716de[_0x4865('0x3d')]),'docsUrl':_0x5c8dca[_0x4865('0x18')]});}}}else{var _0x2b5ee6=_0x4865('0x54')[_0x4865('0x25')](_0x59c9ee[_0x4865('0x43')],'\x0a');if(_0x59c9ee[_0x4865('0x15')]===0x2){if(_0x4865('0x39')!==_0x4865('0x39')){function _0x540eaa(){_0x36ebde[_0x4865('0xe')](_0x245bfe);}}else _0x2b5ee6+=_0x4865('0x31')[_0x4865('0x25')](_0x59c9ee[_0x4865('0x3a')][_0x4865('0x23')](),_0x4865('0x35'))[_0x4865('0x25')](_0x59c9ee[_0x4865('0x11')][_0x4865('0x23')](),'.\x0a');}if(_0x59c9ee[_0x4865('0x15')]===0x3){if(_0x4865('0x27')===_0x4865('0x4')){function _0x27298b(){_0x1234f0[_0x4865('0x3b')](_0xd48ff2);}}else _0x2b5ee6+=_0x4865('0x5b')[_0x4865('0x25')](_0x59c9ee[_0x4865('0x3a')][_0x4865('0x23')](),'.\x0a');}else{if(_0x59c9ee[_0x4865('0x15')]===0x0){if(_0x4865('0x0')!==_0x4865('0xd'))_0x2b5ee6+=_0x4865('0xc');else{function _0x36d584(){return _0x3b1087[_0x4865('0x3d')]-_0x172761[_0x4865('0x3d')];}}}else{if(_0x59c9ee[_0x4865('0x15')]===0x1){if(_0x4865('0x1b')===_0x4865('0x1a')){function _0x3adf42(){var _0x4f20dc=_0x4574b1[_0x4865('0x40')](_0x306532(_0xe8862c)),_0x5bc3a6={'products':_0x4f20dc[0x1][_0x4865('0x24')](function(_0x2bb192){var _0x4d0941=_0x2bb192[0x0],_0x18299b=_0x2bb192[0x1],_0x25cdac=_0x2bb192[0x2];return{'code':_0x4d0941,'licenseExpirationDate':_0x18299b,'trial':_0x327340(_0x25cdac)};}),'userId':_0x4f20dc[0x2],'integrity':_0x4f20dc[0x3],'scriptKey':!![]};_0x55c08f[_0x4865('0x52')]=_0x979c72[_0x4865('0x4f')](_0x5bc3a6);}}else _0x2b5ee6+=_0x4865('0x46');}}}return _0x2b5ee6+=_0x4865('0x30')[_0x4865('0x25')](_0x59c9ee[_0x4865('0x55')],_0x4865('0xb')),_0x2b5ee6;}}function _0x593a5c(_0x21758e,_0x555ba5){var _0x12677d=_0x21758e[_0x4865('0x36')];if(!_0x12677d||!_0x12677d[_0x4865('0x26')]){if(_0x4865('0x3')!==_0x4865('0x12'))return null;else{function _0x196448(){return new _0x26b3ff(_0x2e9346*0x3e8);}}}var _0x21bc4e=new Set(_0x555ba5);return _0x12677d[_0x4865('0x19')](function(_0x2477c4,_0x194e80){if(_0x4865('0x20')!==_0x4865('0x20')){function _0x14386c(){_0x33b12b={'type':0x3,'packageName':_0x2bf1e7,'expiryDate':_0x3fb3b1(_0x54396[_0x4865('0x3d')]),'docsUrl':_0x2cde66[_0x4865('0x18')]};}}else return _0x194e80[_0x4865('0x3d')]-_0x2477c4[_0x4865('0x3d')];})[_0x4865('0x4e')](function(_0x1211a1){if(_0x4865('0xf')!==_0x4865('0x16'))return _0x21bc4e[_0x4865('0x17')](_0x1211a1[_0x4865('0x42')]);else{function _0x53bd68(){var _0x8d8957=[];for(var _0x357fa2=0x0;_0x357fa2<_0x1f5897[_0x4865('0x26')];_0x357fa2+=0x2){var _0x17172a=_0x20f286[_0x4865('0x2c')](_0x357fa2,_0x357fa2+0x2);_0x8d8957[_0x4865('0x51')](_0x546c96[_0x4865('0x5c')](_0x17172a,0x15));}var _0x4fc0c7=0x42,_0x339aba=_0x8d8957[_0x4865('0x24')](function(_0x2ae949){var _0x4eda7a=_0x2ae949^_0x4fc0c7;return _0x4fc0c7=_0x2ae949,_0x4eda7a;})[_0x4865('0x24')](function(_0x5b7da2){return _0x40389a[_0x4865('0x6')](_0x5b7da2);})[_0x4865('0x4c')]('');return _0x339aba;}}});}function _0x3dae4a(_0x3320b1){return new Date(_0x3320b1*0x3e8);}function _0x51b87e(){return new Date()[_0x4865('0x2b')]()/0x3e8;}return _0x231072[_0x4865('0x3f')]=_0x2f8edd,_0x231072[_0x4865('0x56')]=_0x1415ba,_0x231072;}({}); t.KendoLicensing={setScriptKey:KendoLicensing.setScriptKey}}(jQuery,window);kendo;!function(e,t){var n=window.kendo,i="change",r="same",o=n.support,a=window.location,s=window.history,l=n.support.browser.msie,c=/^#*/,d=window.document;function u(e,t){return t?(e+"/"===t&&(e=t),new RegExp("^"+t,"i").test(e)||(e=t+"/"+e),a.protocol+"//"+(a.host+"/"+e).replace(/\/\/+/g,"/")):e}function h(e){return e?"#!":"#"}function p(e){var t=a.href;return"#!"===e&&t.indexOf("#")>-1&&t.indexOf("#!")<0?null:t.split(e)[1]||""}function f(e,t){return 0===t.indexOf(e)?t.substr(e.length).replace(/\/\//g,"/"):t}var m=n.Class.extend({back:function(){l?setTimeout((function(){s.back()})):s.back()},forward:function(){l?setTimeout((function(){s.forward()})):s.forward()},length:function(){return s.length},replaceLocation:function(e){a.replace(e)}}),g=m.extend({init:function(e){this.root=e},navigate:function(e){s.pushState({},d.title,u(e,this.root))},replace:function(e){s.replaceState({},d.title,u(e,this.root))},normalize:function(e){return f(this.root,e)},current:function(){var e=a.pathname;return a.search&&(e+=a.search),f(this.root,e)},change:function(t){e(window).bind("popstate.kendo",t)},stop:function(){e(window).unbind("popstate.kendo")},normalizeCurrent:function(e){var t,n=e.root,i=a.pathname,r=p(h(e.hashBang));n===i+"/"&&(t=n),n===i&&r&&(t=u(r.replace(c,""),n)),t&&s.pushState({},d.title,t)}});function v(e){return e.replace(/^(#)?/,"#")}function _(e){return e.replace(/^(#(!)?)?/,"#!")}var b=m.extend({init:function(e){this._id=n.guid(),this.prefix=h(e),this.fix=e?_:v},navigate:function(e){a.hash=this.fix(e)},replace:function(e){this.replaceLocation(this.fix(e))},normalize:function(e){return e.indexOf(this.prefix)<0?e:e.split(this.prefix)[1]},change:function(t){o.hashChange?e(window).on("hashchange."+this._id,t):this._interval=setInterval(t,50)},stop:function(){e(window).off("hashchange."+this._id),clearInterval(this._interval)},current:function(){return p(this.prefix)},normalizeCurrent:function(e){var t=a.pathname,n=e.root;return!(!e.pushState||n===t)&&(this.replaceLocation(n+this.prefix+f(n,t)),!0)}}),w=n.Observable.extend({start:function(t){if(t=t||{},this.bind([i,"back",r],t),!this._started){this._started=!0,t.root=t.root||"/";var n,o=this.createAdapter(t);o.normalizeCurrent(t)||(n=o.current(),e.extend(this,{adapter:o,root:t.root,historyLength:o.length(),current:n,locations:[n]}),o.change(this._checkUrl.bind(this)))}},createAdapter:function(e){return o.pushState&&e.pushState?new g(e.root):new b(e.hashBang)},stop:function(){this._started&&(this.adapter.stop(),this.unbind(i),this._started=!1)},change:function(e){this.bind(i,e)},replace:function(e,t){this._navigate(e,t,(function(t){t.replace(e),this.locations[this.locations.length-1]=this.current}))},navigate:function(e,t){if("#:back"===e)return this.backCalled=!0,void this.adapter.back();this._navigate(e,t,(function(t){t.navigate(e),this.locations.push(this.current)}))},_navigate:function(e,t,n){var o=this.adapter;e=o.normalize(e),this.current!==e&&this.current!==decodeURIComponent(e)?!t&&this.trigger(i,{url:e,decode:!1})||(this.current=e,n.call(this,o),this.historyLength=o.length()):this.trigger(r)},_checkUrl:function(){var e=this.adapter,t=e.current(),n=e.length(),r=this.historyLength===n,o=t===this.locations[this.locations.length-2]&&r,a=this.backCalled,s=this.current;return null===t||this.current===t||this.current===decodeURIComponent(t)||(this.historyLength=n,this.backCalled=!1,this.current=t,o&&this.trigger("back",{url:s,to:t})?(e.forward(),void(this.current=s)):this.trigger(i,{url:t,backButtonPressed:!a})?(o?e.forward():(e.back(),this.historyLength--),void(this.current=s)):void(o?this.locations.pop():this.locations.push(t)))}});n.History=w,n.History.HistoryAdapter=m,n.History.HashAdapter=b,n.History.PushStateAdapter=g,n.absoluteURL=u,n.history=new w}(window.kendo.jQuery);kendo;!function(){var e=window.kendo,t=e.history,n=e.Observable,i="init",r="routeMissing",o="change",a="back",s="same",l=/\((.*?)\)/g,c=/(\(\?)?:\w+/g,d=/\*\w+/g,u=/[\-{}\[\]+?.,\\\^$|#\s]/g;function h(e,t){return t?e:"([^/]+)"}function p(e){return e.replace(/(\?.*)|(#.*)/g,"")}var f=e.Class.extend({init:function(e,t,n){e instanceof RegExp||(e=function(e,t){return new RegExp("^"+e.replace(u,"\\$&").replace(l,"(?:$1)?").replace(c,h).replace(d,"(.*?)")+"$",t?"i":"")}(e,n)),this.route=e,this._callback=t},callback:function(t,n,i){var r,o,a=0,s=e.parseQueryStringParams(t);if(s._back=n,t=p(t),o=(r=this.route.exec(t).slice(1)).length,i)for(;a=0},doesnotcontain:function(e,t){return-1===(e+"").indexOf(t)},doesnotendwith:function(e,t){return(e+"").indexOf(t,(e||"").length-(t||"").length)<0},doesnotstartwith:function(e,t){return-1===(e+"").lastIndexOf(t,0)},endswith:function(e,t){return(e+"").indexOf(t,(e||"").length-(t||"").length)>=0},eq:function(e,t){return e===t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t},isempty:function(e){return""===e},isnotempty:function(e){return""!==e},isnotnull:function(e){return kendo.isPresent(e)},isnull:function(e){return kendo.isBlank(e)},lt:function(e,t){return e3?"substringof"!==e?c="{0}({2},"+c+")":(c="{0}("+c+",{2})","doesnotcontain"===d&&(t?(c="{0}({2},'{1}') eq -1",e="indexof"):c+=" eq false")):c="{2} {0} "+c,e=n.format(c,e,h,o))),f.push(e);return e=f.join(" "+m+" "),f.length>1&&(e="("+e+")"),e}function h(e){for(var t in e)0===t.indexOf("@odata")&&delete e[t]}function p(){return Math.floor(65536*(1+Math.random())).toString(16).substr(1)}function f(e){return e+p()+"-"+p()+"-"+p()}function m(e,t){var n="\r\n--"+e;return t&&(n+="--"),n}function g(e,t,i,r){var o=e.options[r].url,s=n.format("{0} ",i);return a(o)?s+o(t):s+o}function v(e,t){var n="";return n+=m(e,!1),n+="\r\nContent-Type: application/http",n+="\r\nContent-Transfer-Encoding: binary",n+="\r\nContent-ID: "+t}function _(e,t,i,a,s,l,c){var d="";return d+=function(e,t){var n="";return n+="--"+e+r,n+="Content-Type: multipart/mixed; boundary="+t+r}(t,i),d+=function(e,t,i,a,s,l){for(var c,d,u="",h=0;h=200&&r<=299?(a=t.match(/\{.*\}/gm))&&c[c.length-1].models.push(JSON.parse(a[0])):c[c.length-1].passed=!1);return c}(e),a=0;o.updated.length&&((i=r[a]).passed&&t.success(i.models.length?i.models:[],"update"),a++),o.destroyed.length&&((i=r[a]).passed&&t.success([],"destroy"),a++),o.created.length&&(i=r[a]).passed&&t.success(i.models,"create")},error:function(e,n,i){t.error(e,n,i)}},r))}}}})}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=Array.isArray,r=e.isPlainObject,o=e.map,a=e.each,s=e.extend,l=n.getter,c=n.Class.extend({init:function(e){var t=this,l=e.total,c=e.model,d=e.parse,u=e.errors,h=e.serialize,p=e.data;if(c){if(r(c)){var f=e.modelBase||n.data.Model;c.fields&&a(c.fields,(function(e,i){r(i)&&i.field?n.isFunction(i.field)||(i=s(i,{field:t.getter(i.field)})):i={field:t.getter(i)},c.fields[e]=i}));var m=c.id;if(m){var g={};g[t.xpathToMember(m,!0)]={field:t.getter(m)},c.fields=s(g,c.fields),c.id=t.xpathToMember(m)}c=f.define(c)}t.model=c}if(l&&("string"==typeof l?(l=t.getter(l),t.total=function(e){return parseInt(l(e),10)}):"function"==typeof l&&(t.total=l)),u&&("string"==typeof u?(u=t.getter(u),t.errors=function(e){return u(e)||null}):"function"==typeof u&&(t.errors=u)),p&&("string"==typeof p?(p=t.xpathToMember(p),t.data=function(e){var n,r=t.evaluate(e,p);return r=i(r)?r:[r],t.model&&c.fields?(n=new t.model,o(r,(function(e){if(e){var t,i={};for(t in c.fields)i[t]=n._parse(t,c.fields[t].field(e));return i}}))):r}):"function"==typeof p&&(t.data=p)),"function"==typeof d){var v=t.parse;t.parse=function(e){var n=d.call(t,e);return v.call(t,n)}}"function"==typeof h&&(t.serialize=h)},total:function(e){return this.data(e).length},errors:function(e){return e?e.errors:null},serialize:function(e){return e},parseDOM:function(e){var t,n,r,o,a,s,l,c={},d=e.attributes,u=d.length;for(l=0;l=0?e.replace(/\.?(@.*)/,t?"$1":'["$1"]'):e.indexOf("text()")>=0?e.replace(/(\.?text\(\))/,t?"#text":'["#text"]'):e:""},getter:function(e){return l(this.xpathToMember(e),!0)}});e.extend(!0,n.data,{XmlDataReader:c,readers:{xml:c}})}(window.kendo.jQuery);kendo;!function(e,t){var n,i=e.extend,r=e.isPlainObject,o=e.isEmptyObject,a=Array.isArray,s=e.grep,l=e.ajax,d=e.each,u=e.noop,h=window.kendo,p=h.isFunction,f=h.Observable,m=h.Class,g="string",v="function",_="create",b="read",w="update",y="destroy",k="change",x="sync",C="get",S="error",T="requestStart",D="progress",I="requestEnd",z="itemsLoaded",M="itemLoad",E=[_,b,w,y],A=function(e){return e},H=h.getter,R=h.stringify,F=Math,P=[].push,B=[].join,L=[].pop,V=[].splice,O=[].shift,N=[].slice,W=[].unshift,U={}.toString,j=h.support.stableSort,q=/^\/Date\((.*?)\)\/$/,G=[],K=f.extend({init:function(e,t){var n=this;n.type=t||X,f.fn.init.call(n),n.length=e.length,n.wrapAll(e,n),n._loadPromises=[],n._loadedNodes=[]},at:function(e){return this[e]},toJSON:function(e){var t,n,i=this.length,r=new Array(i);for(t=0;t0&&(t=this[n--]);n>=0;n--)t=e(t,this[n],n,this);return t},filter:function(e,t){for(var n,i=0,r=[],o=this.length,a=t||window;i=0;if(n)for(var i=e.split("."),r="";i.length>1;){r+=i.shift();var o=h.getter(r,!0)(this);if(o instanceof X)return o.set(i.join("."),t),n;r+="."}return h.setter(e)(this,t),n},set:function(e,t){var n=this,i=!1,r=e.indexOf(".")>=0,o=h.getter(e,!0)(n);return o!==t&&(o instanceof f&&this._handlers[e]&&(this._handlers[e].get&&o.unbind(C,this._handlers[e].get),o.unbind(k,this._handlers[e].change)),(i=n.trigger("set",{field:e,value:t}))||(r||(t=n.wrap(t,e,(function(){return n}))),(!n._set(e,t)||e.indexOf("(")>=0||e.indexOf("[")>=0)&&n.trigger(k,{field:e}))),i},parent:u,wrap:function(e,t,n){var i,r,o=this,a=U.call(e);if(null!=e&&("[object Object]"===a||"[object Array]"===a)){var s=e instanceof K,l=e instanceof Ge;"[object Object]"!==a||l||s?("[object Array]"===a||s||l)&&(s||l||(e=new K(e)),r=$(o,k,t,!1),e.bind(k,r),o._handlers[t]={change:r}):(e instanceof X||(e=new X(e)),i=$(o,C,t,!0),e.bind(C,i),r=$(o,k,t,!0),e.bind(k,r),o._handlers[t]={get:i,change:r}),e.parent=n}return e}});function Z(e,t){if(e===t)return!0;var n,i=h.type(e);if(i!==h.type(t))return!1;if("date"===i)return e.getTime()===t.getTime();if("object"!==i&&"array"!==i)return!1;for(n in e)if(!Z(e[n],t[n]))return!1;return!0}var J={number:function(e){return typeof e===g&&"null"===e.toLowerCase()?null:h.parseFloat(e)},date:function(e){return typeof e===g&&"null"===e.toLowerCase()?null:h.parseDate(e)},boolean:function(e){return typeof e===g?"null"===e.toLowerCase()?null:"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return typeof e===g&&"null"===e.toLowerCase()?null:null!=e?e+"":e},default:function(e){return e}},ee={string:"",number:0,date:new Date,boolean:!1,default:""};var te=X.extend({init:function(n){var i=this;if((!n||e.isEmptyObject(n))&&(n=e.extend({},i.defaults,n),i._initializers))for(var r=0;r0&&(p._initializers=v),(o=n.extend(p)).define=function(e){return te.define(o,e)},p.fields&&(o.fields=p.fields,o.idField=p.idField),o};var ne={selector:function(e){return p(e)?e:H(e)},compare:function(e){var t=this.selector(e);return function(e,n){return e=t(e),n=t(n),null==e&&null==n?0:null==e?-1:null==n?1:e.localeCompare?e.localeCompare(n):e>n?1:er?1:-1}},desc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),r=t(n);return i&&i.getTime&&r&&r.getTime&&(i=i.getTime(),r=r.getTime()),i===r?e.__position-n.__position:null==i?1:null==r?-1:r.localeCompare?r.localeCompare(i):i=0?t+="\\"+r:t+=r}n=!1}return t+"$/"}return{quote:function(t){return t&&t.getTime?"new Date("+t.getTime()+")":e(t)},eq:function(e,t,i,r){return n("==",e,t,i,r)},neq:function(e,t,i,r){return n("!=",e,t,i,r)},gt:function(e,t,i){return n(">",e,t,i)},gte:function(e,t,i){return n(">=",e,t,i)},lt:function(e,t,i){return n("<",e,t,i)},lte:function(e,t,i){return n("<=",e,t,i)},startswith:t((function(e,t){return e+".lastIndexOf("+t+", 0) == 0"})),doesnotstartwith:t((function(e,t){return e+".lastIndexOf("+t+", 0) == -1"})),endswith:t((function(e,t){return e+".indexOf("+t+", "+e+".length - "+(t?t.length-2:0)+") >= 0"})),doesnotendwith:t((function(e,t){return e+".indexOf("+t+", "+e+".length - "+(t?t.length-2:0)+") < 0"})),contains:t((function(e,t){return e+".indexOf("+t+") >= 0"})),doesnotcontain:t((function(e,t){return e+".indexOf("+t+") == -1"})),matches:t((function(e,t){return i(t=t.substring(1,t.length-1))+".test("+e+")"})),doesnotmatch:t((function(e,t){return"!"+i(t=t.substring(1,t.length-1))+".test("+e+")"})),isempty:function(e){return e+" === ''"},isnotempty:function(e){return e+" !== ''"},isnull:function(e){return"("+e+" == null)"},isnotnull:function(e){return"("+e+" != null)"},isnullorempty:function(e){return"("+e+" === null) || ("+e+" === '')"},isnotnullorempty:function(e){return"("+e+" !== null) && ("+e+" !== '')"}}}();function oe(e){this.data=e||[]}function ae(e,n){if(e){var i=typeof e===g?{field:e,dir:n}:e,r=a(i)?i:i!==t?[i]:[];return s(r,(function(e){return!!e.dir}))}}function se(e,n){var i={};if(e)for(var r=typeof e===g?{field:e,dir:n}:e,o=a(r)?r:r!==t?[r]:[],s=0;s":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain",isnull:"isnull",isempty:"isempty",isnotempty:"isnotempty"};function ce(e){var t,n,i,r,o=e.filters;if(o)for(t=0,n=o.length;tt.field?1:e.field0&&(i=e[0],r=n&&n.groupPaging?new oe(t).groupAllData(i,t).select((function(r){var o=new oe(t).filter([{field:r.field,operator:"eq",value:r.value,ignoreCase:!1}]),a=e.length>1?new oe(r.items).group(e.slice(1),o.toArray(),n).toArray():r.items;return{field:r.field,value:r.value,hasSubgroups:e.length>1,items:a,aggregates:o.aggregate(i.aggregates),uid:h.guid(),itemCount:a.length,subgroupCount:a.length}})):r.groupBy(i).select((function(n){var r=new oe(t).filter([{field:n.field,operator:"eq",value:n.value,ignoreCase:!1}]);return{field:n.field,value:n.value,items:e.length>1?new oe(n.items).group(e.slice(1),r.toArray()).toArray():n.items,hasSubgroups:e.length>1,aggregates:r.aggregate(i.aggregates)}}))),r},groupBy:function(e){if(o(e)||!this.data.length)return new oe([]);var t,n,i,r,a=e.field,s=e.skipItemSorting?this.data:this._sortForGrouping(a,e.dir||"asc"),l=h.accessor(a),c=l.get(s[0],a),d={field:a,value:c,items:[]},u=[d];for(i=0,r=s.length;ii&&(be(i)||we(i))&&(e=i),e}};function be(e){return"number"==typeof e&&!isNaN(e)}function we(e){return e&&e.getTime}function ye(e){var t,n=e.length,i=new Array(n);for(t=0;t(c=h.data.length)&&r.virtual&&(b=(b-=b+w-c)<0?0:b),h=h.range(b,w)),!d||o(d)&&0===d.length||(h=h.group(d,e,r))),{total:c,data:h.toArray()}};var ke=m.extend({init:function(e){this.data=e.data},read:function(e){e.success(this.data)},update:function(e){e.success(e.data)},create:function(e){e.success(e.data)},destroy:function(e){e.success(e.data)}}),xe=m.extend({init:function(e){var t,n=this;e=n.options=i({},n.options,e),d(E,(function(t,n){typeof e[n]===g&&(e[n]={url:e[n]})})),n.cache=e.cache?Ce.create(e.cache):{find:u,add:u},t=e.parameterMap,e.submit&&(n.submit=e.submit),p(e.push)&&(n.push=e.push),n.push||(n.push=A),n.parameterMap=p(t)?t:function(e){var n={};return d(e,(function(e,i){e in t&&(e=t[e],r(e)&&(i=e.value(i),e=e.key)),n[e]=i})),n}},options:{parameterMap:A},create:function(e){return l(this.setup(e,_))},read:function(n){var i,r,o=this.cache;n=this.setup(n,b),i=n.success||u,n.error,(r=o.find(n.data))!==t?i(r):(n.success=function(e){o.add(n.data,e),i(e)},e.ajax(n))},update:function(e){return l(this.setup(e,w))},destroy:function(e){return l(this.setup(e,y))},setup:function(e,t){e=e||{};var n,r=this.options[t],o=p(r.data)?r.data(e.data):r.data;return e=i(!0,{},r,e),n=i(!0,{},o,e.data),e.data=this.parameterMap(n,t),p(e.url)&&(e.url=e.url(n)),e}}),Ce=m.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[R(e)]=n)},find:function(e){return this._store[R(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[R(e)]}});function Se(e,t,n,i,r){var o,a,s,l,c,d={};for(l=0,c=e.length;l=t.length)break}a=i?--e:e,0,t.splice(i,1)[0]),e++;break}}}))}}finally{this.options.autoSync=i}return n},remove:function(e){var t,n=this,i=n._isServerGrouped();return!i||!e.uid||e.isNew&&e.isNew()||n._pushInDestroyed(e),this._eachItem(n._data,(function(n){if(t=function(e,t){if(e){var n,i,r=e.length;for(i=0;i-1)return t(i,n),!0}))},_removePristineForModel:function(e){this._executeOnPristineForModel(e,(function(e,t){t.splice(e,1)}))},_readData:function(e){return(this._isServerGrouped()?this.reader.groups:this.reader.data).call(this.reader,e)},_eachPristineItem:function(e){var t=this,n=t.options,i=t._getCurrentRangeSpan();t._eachItem(t._pristineData,e),n.serverPaging&&n.useRanges&&d(i,(function(n,i){t._eachItem(i.pristineData,e)}))},_eachItem:function(e,t){e&&e.length&&(this._isServerGrouped()?Pe(e,t):t(e))},_pristineForModel:function(e){var t,n;return this._eachPristineItem((function(i){if((n=Oe(i,e))>-1)return t=i[n],!0})),t},_cancelModel:function(e){var t=this,n=this._pristineForModel(e);this._eachItem(this._data,(function(i){var r=Ne(i,e);r>=0&&(!n||e.isNew()&&!n.__state__?(t._modelCanceled(e),i.splice(r,1),t._removeModelFromRanges(e)):(i[r].accept(n),"update"==n.__state__&&(i[r].dirty=!0)))}))},_modelCanceled:u,_submit:function(t,n){var r=this;r.trigger(T,{type:"submit"}),r.trigger(D),r.transport.submit(i({success:function(n,i){var r=e.grep(t,(function(e){return e.type==i}))[0];r&&r.resolve({response:n,models:r.models,type:i})},error:function(e,n,i){for(var o=0;oi._total&&(i._pageSize=i._total,i.options.pageSize&&i.options.pageSize>i._pageSize&&(i._pageSize=i.options.pageSize)),i._aggregate&&r.serverAggregates&&(i._aggregateResult=i._readAggregates(e)),e=i._readData(e),i._destroyed=[]}else{e=i._readData(e),t=[];var o,a={},s=i.reader.model,l=s?s.idField:"id";for(o=0;oe.data.length&&(t.skip=e.data.length-t.take),i.view(r.range(t.skip,t.take).toArray())}else i.view(e.data),i._updateOuterRangesLength();else i.view(e.data)},_clearEmptyGroups:function(e){for(var t=e.length-1;t>=0;t--){var n=e[t];n.hasSubgroups&&this._clearEmptyGroups(n.items),!n.items||n.items.length||n.itemCount||V.apply(n.parent(),[t,1])}},_queryProcess:function(e,t){return this.options.inPlaceSort?oe.process(e,t,this.options.inPlaceSort):oe.process(e,t)},_mergeState:function(n){var i,r=this;return n!==t&&(r._pageSize=n.pageSize,r._page=n.page,r._sort=n.sort,r._filter=n.filter,r._group=n.group,r._aggregate=n.aggregate,r._skip=r._currentRangeStart=n.skip,r._take=n.take,r._skip===t&&(r._skip=r._currentRangeStart=r.skip(),n.skip=r.skip()),r._take===t&&r._pageSize!==t&&(r._take=r._pageSize,n.take=r._take),r.options.virtual&&(n.virtual=r.options.virtual),n.sort&&(r._sort=n.sort=ae(n.sort),r._sortFields=se(n.sort)),n.filter&&(r._filter=n.filter=r.options.accentFoldingFiltering&&!e.isEmptyObject(n.filter)?e.extend({},de(n.filter),{accentFoldingFiltering:r.options.accentFoldingFiltering}):de(n.filter)),n.group&&(r._group=n.group=fe(n.group)),n.aggregate&&(r._aggregate=n.aggregate=(i=n.aggregate,a(i)?i:[i]))),n},query:function(n){var i;if(this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates||(this._data===t||0===this._data.length)&&!this._destroyed.length){if(this.options.endless){var r=n.pageSize-this.pageSize();r>0?(r=this.pageSize(),n.page=n.pageSize/r,n.pageSize=r):(n.page=1,this.options.endless=!1)}return this.read(this._mergeState(n))}var o=this.trigger(T,{type:"read"});return o||(this.trigger(D),n&&(n.groupPaging=this._groupPaging),i=this._queryProcess(this._data,this._mergeState(n)),this._setFilterTotal(i.total,!0),this._aggregateResult=this._calculateAggregates(i.dataToAggregate||this._data,n),this._setView(i,n),this.trigger(I,{type:"read"}),this.trigger(k,{items:i.data,action:n?n.action:""})),e.Deferred().resolve(o).promise()},_hasExpandedSubGroups:function(e){var t=!1,n=e.items?e.items.length:0;if(!e.hasSubgroups)return!1;for(var i=0;i=n.take));h++)if(d._getGroupByUid(o.uid)||d._groupsFlat.push(o),d._groupsState[o.uid]){if(d._isServerGroupPaged()){if(d._fetchGroupItems(o,n,i,r))return void(d._fetchingGroupItems=!0);if(l=(o.subgroupCount||o.itemCount)+1,c=n.skip-n.skipped,!d._hasExpandedSubGroups(o)&&c>l){n.skipped+=l;continue}}if(n.includeParents&&n.skipped0?t.push(o):o.excludeHeader=!1;else{a=[],s=o.items.length;for(var p=0;p=n.take)break;a.push(o.items[p]),n.taken++}a.length||n.taken>0?(o.currentItems=a,t.push(o)):o.excludeHeader=!1}}else{if(n.skippedl)return a;return a},_fetchGroupItems:function(e,t,n,i){var r,o,a,s,l=this,c=e.hasSubgroups?e.subgroupCount:e.itemCount,d=t.take,u=t.skipped,h=l.take();return t.includeParents&&(u=c)&&(o=e.items[r],a=e.items[Math.min(r+d,c-1)],o.notFetched?(l.getGroupItems(e,t,n,i,F.max(F.floor(r/h),0)*h,F.round((r+h)/h)),!0):a.notFetched?(l.getGroupItems(e,t,n,i,F.max(F.floor((r+h)/h),0)*h,F.round((r+h)/h)),!0):void 0))},getGroupItems:function(e,t,n,i,r,o){var a,s,l,c,d=this;e.items||(e.items=[]),a=d.take(),s=this._composeItemsFilter(e,n),l={page:o||1,pageSize:a,skip:r,take:a,filter:s,aggregate:d._aggregate,sort:d._sort},(c=d.findSubgroups(e))&&c.length&&(l.group=c,l.groupPaging=!0),clearTimeout(d._timeout),d._timeout=setTimeout((function(){d._queueRequest(l,(function(){d.trigger(T,{type:"read"})?d._dequeueRequest():d.transport.read({data:l,success:d._groupItemsSuccessHandler(e,t.skip,d.take(),i,r),error:function(){var e=N.call(arguments);d.error.apply(d,e)}})}))}),100)},_groupItemsSuccessHandler:function(e,t,n,i,r){var o=this,a=o._timeStamp();i=p(i)?i:u;var s=o.options.schema&&o.options.schema.total?o.options.schema.total:"Total";return function(l){var c,d,u=te.define(o.options.schema.model);o._dequeueRequest(),o.trigger(I,{response:l,type:"read"}),d=p(s)?s(l):l[s],l=o.reader.parse(l),e.hasSubgroups?(c=o.reader.groups(l),e.subgroupCount=d):c=(c=o.reader.data(l)).map((function(e){return new u(e)})),e.items.omitChangeEvent=!0;for(var h=0;h=r&&h=o._currentRequestTimeStamp||!o._skipRequestsInProgress)&&o.trigger(k,{})}},findSubgroups:function(e){var t=this._group.map((function(e){return e.field})).indexOf(e.field);return this._group.slice(t+1,this._group.length)},_composeItemsFilter:function(e,t){var n={logic:"and",filters:[]};if(this.filter()&&n.filters.push(this.filter()),(n=i(!0,{},n)).filters.push({field:e.field,operator:"eq",value:e.value}),t)for(var r=0;r1;)t=t[o.splice(0,1)[0]].items;t[o[0]]=a._cloneGroup(e);break}}},_containsSubGroup:function(e,t,n){var i,r=e.items.length;if(e.hasSubgroups&&r)for(var o=0;ot.totalPages()))return t._skip=t._currentRangeStart=n*t.take(),n+=1,e.page=n,t._query(e),n},prev:function(e){var t=this,n=t.page();if(e=e||{},n&&1!==n)return t._skip=t._currentRangeStart=t._skip-t.take(),n-=1,e.page=n,t._query(e),n},page:function(e){var n,i=this;if(e!==t){e=F.max(F.min(F.max(e,1),i.totalPages()),1);var r=i.take();return i._isGroupPaged()?(e-=1,void i.range(e*r,r,null,"page")):void i._query(i._pageableQueryOptions({page:e}))}return(n=i.skip())!==t?F.round((n||0)/(i.take()||1))+1:t},pageSize:function(e){var n=this;if(e===t)return n.take();n._query(n._pageableQueryOptions({pageSize:e,page:1}))},sort:function(e){var n=this;return e!==t?(n.trigger("sort"),void n._query({sort:e})):n._sort},filter:function(e){var n=this;if(e===t)return n._filter;n.trigger("reset"),n._query({filter:e,page:1})},group:function(e){var n=this,i={group:e};if(n._groupPaging&&(e===t||e&&e.length||(n._ranges=[]),i.page=1),e===t)return n._group;n._query(i)},getGroupsFlat:function(e){var t,n,i=[];for(t=0,n=e.length;t=0;i--)n=r[i],t={value:e.get?e.get(n.field):e[n.field],field:n.field,items:t?[t]:[e],hasSubgroups:!!t,aggregates:this._emptyAggregates(n.aggregates)};return t},totalPages:function(){var e=this,t=e.pageSize()||e.total(),n=e._isGroupPaged()?e.groupsTotal(!0):e.total();return F.ceil((n||0)/t)},inRange:function(e,t){var n=this,i=F.min(e+t,n.total());return!n.options.serverPaging&&n._data.length>0||n._findRange(e,i).length>0},lastRange:function(){var e=this._ranges;return e[e.length-1]||{start:0,end:0,data:[]}},firstItemUid:function(){var e=this._ranges;return e.length&&e[0].data.length&&e[0].data[0].uid},enableRequestsInProgress:function(){this._skipRequestsInProgress=!1},_timeStamp:function(){return(new Date).getTime()},range:function(e,n,i,r){this._currentRequestTimeStamp=this._timeStamp(),this._skipRequestsInProgress=!0;var o=this._isGroupPaged()?this.groupsTotal(!0):this.total();"expandGroup"!==r&&"collapseGroup"!==r||this._updateOuterRangesLength(),e=F.min(e||0,o),i=p(i)?i:u;var a,s=this,l=F.max(F.floor(e/n),0)*n,c=F.min(l+n,o);if(((a=s._findRange(e,F.min(e+n,o),i)).length||0===o)&&!s._fetchingGroupItems)return s._processRangeData(a,e,n,s._originalPageSkip||l,s._originalSize||c,{action:r}),s._originalPageSkip=null,s._originalSize=null,void i();s._isGroupPaged()&&(s._originalPageSkip=l,s._originalSize=c,l=F.max(F.floor(s._adjustPageSkip(e,n)/n),0)*n,c=F.min(l+n,o)),n===t||s._fetchingGroupItems||(s._isGroupPaged()&&!s._groupRangeExists(l,n)||!s._rangeExists(l,c)?s.prefetch(l,n,(function(){e>l&&c=n)return[];if(e>r.outerEnd){y.skipped+=r.outerEnd-(m||0),m=r.outerEnd;continue}if(void 0!==m&&m!=r.outerStart&&(y.skipped+=r.outerStart-m),y.skipped>y.skip)return[];for(void 0===m&&e>0&&r.start>0&&(y.skipped=r.outerStart),a=o;;){if(this._findGroupedRange(r.data,_,y,null,i),g._calculateGroupsTotal(_,!0,"currentItems")>=y.take)return _;if(g._fetchingGroupItems)return[];if(!v[++a]||v[a].outerStart!==r.outerEnd)break;r=v[a]}}else if(e>=r[x]&&e<=r[C]){for(p=0,a=o;a=r.start){if(c=r.data,d=r.end,!w){if(b.inPlaceSort)u=g._queryProcess(r.data,{filter:g.filter()});else{var S=me(g.group()||[]).concat(ae(g.sort()||[]));u=g._queryProcess(r.data,{sort:S,filter:g.filter()})}h=c=u.data,u.total!==t&&(d=u.total)}if(s=0,e+p>r.start&&(s=e+p-r.start),l=h.length,d>n&&(l-=d-n),p+=l-s,_=g._mergeGroups(_,c,s,l),n<=r.end&&p==n-e)return _}break}m=r.outerEnd}return[]},_getRangesMismatch:function(e){for(var t=this._ranges,n=0,i=0;;){var r=t[i];if(!r||r.outerStart>e)break;r.outerEnd!=r.end&&(n=r.outerEnd-r.end),i++}return n},_mergeGroups:function(e,t,n,i){if(this._isServerGrouped()){var r,o=t.toJSON();return e.length&&(r=e[e.length-1]),Ae(r,o,n,i),e.concat(o)}return e.concat(t.slice(n,i))},_processRangeData:function(e,n,i,r,o,a){var s=this;s._pending=t,s._skip=n>s.skip()&&!s._omitPrefetch?F.min(o,(s.totalPages()-1)*s.take()):r,s._currentRangeStart=n,s._take=i;var l=s.options.serverPaging,c=s.options.serverSorting,d=s.options.serverFiltering,u=s.options.serverAggregates;try{s.options.serverPaging=!0,s._isServerGrouped()||s.group()&&s.group().length||(s.options.serverSorting=!0),s.options.serverFiltering=!0,s.options.serverPaging=!0,s.options.serverAggregates=!0,l&&(s._detachObservableParents(),s._data=e=s._observe(e)),s._process(e,a)}finally{s.options.serverPaging=l,s.options.serverSorting=c,s.options.serverFiltering=d,s.options.serverAggregates=u}},skip:function(){var e=this;return e._skip===t?e._page!==t?(e._page-1)*(e.take()||1):t:e._skip},currentRangeStart:function(){return this._currentRangeStart||0},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(e,t,n,i){var r=this,o=r._timeStamp();return function(a){var s,l,c,d=!1,u={start:e,end:t,data:[],timestamp:r._timeStamp()};if(r._dequeueRequest(),r.trigger(I,{response:a,type:"read"}),a=r.reader.parse(a),(c=r._readData(a)).length){for(s=0,l=r._ranges.length;s=r._currentRequestTimeStamp||!r._skipRequestsInProgress)&&(n&&c.length?n():r.trigger(k,{}))}},prefetch:function(e,t,n){var i=this,r=F.min(e+t,i.total()),o={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._isGroupPaged()&&!i._isServerGrouped()&&i._groupRangeExists(e,r)?n&&n():i._isServerGroupPaged()&&!i._groupRangeExists(e,r)||!i._rangeExists(e,r)?(clearTimeout(i._timeout),i._timeout=setTimeout((function(){i._queueRequest(o,(function(){i.trigger(T,{type:"read"})?i._dequeueRequest():(i._omitPrefetch&&i.trigger(D),i.transport.read({data:i._params(o),success:i._prefetchSuccessHandler(e,r,n),error:function(){var e=N.call(arguments);i.error.apply(i,e)}}))}))}),100)):n&&n()},_multiplePrefetch:function(e,t,n){var i=this,r=F.min(e+t,i.total()),o={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(e,r)?n&&n():i.trigger(T,{type:"read"})||i.transport.read({data:i._params(o),success:i._prefetchSuccessHandler(e,r,n,!0)})},_adjustPageSkip:function(e,t){var n,i,r=this,o=r._getPrevRange(e),a=r.total();if(o){if(!(i=r._getRangesMismatch(e)))return e;e-=i}if((n=F.max(F.floor(e/t),0)*t)>a)for(;!((n-=t)=e)return i[t]},_getPrevRange:function(e){var t,n,i=this._ranges;for(t=i.length-1;t>=0;t--)if(i[t].outerStart<=e){n=i[t];break}return n},_rangeExists:function(e,t){var n,i,r=this._ranges;for(n=0,i=r.length;n=t)return!0;return!1},_groupRangeExists:function(e,t){var n,i,r=this,o=r._ranges,a=0,s=r.groupsTotal(!0);for(t>s&&!r._isServerGrouped()&&(t=s),n=0,i=o.length;n=e?a+=l.outerEnd-e:l.outerStart<=t&&l.outerEnd>=t&&(a+=t-l.outerStart)}return a>=t-e},_getCurrentRangeSpan:function(){var e,t,n=this,i=n._ranges,r=n.currentRangeStart(),o=r+(n.take()||0),a=[],s=i.length;for(t=0;t=r||e.start>=r&&e.start<=o)&&a.push(e);return a},_removeModelFromRanges:function(e){for(var t,n=0,i=this._ranges.length;n=e){r._getByUid(t.uid,n.data)||(r._isServerGrouped()?n.data.splice(e,0,r._wrapInEmptyGroup(t)):n.data.splice(e,0,t));break}r._updateRangesLength()},_updateRangesLength:function(){var e,t,n=this,i=n._ranges||[],r=i.length,o=!1,a=0,s=0;for(t=0;t0?this.filter(this._hierarchicalFilter):(this.options.filter=this._hierarchicalFilter,this._filter=de(this.options.filter),this._hierarchicalFilter=null)),t},remove:function(e){var t,n=e.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),t=Ge.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:$e("success"),data:$e("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),Ge.fn.insert.call(this,e,t)},filter:function(e){if(e===t)return this._filter;!this.options.serverFiltering&&this._markHierarchicalQuery(e)&&(e={logic:"or",filters:[e,{field:"_matchFilter",operator:"equals",value:!0}]}),this.trigger("reset"),this._query({filter:e,page:1})},_markHierarchicalQuery:function(t){var n,i=this.options.accentFoldingFiltering;return(t=i?e.extend({},de(t),{accentFoldingFiltering:i}):de(t))&&0!==t.filters.length?(n=oe.filterExpr(t,{noEval:!0}),this._updateHierarchicalFilter(n),!0):(this._updateHierarchicalFilter((function(){return!0})),!1)},_updateHierarchicalFilter:function(e){for(var t,n=this._data,i=!1,r=0;r=this.total()?(this.trigger("endreached",{index:e}),null):this.useRanges?this.useRanges?((e=this.skip+t)&&(n=this.range(Math.floor(e/t)*t)),e===this.prefetchThreshold&&this._prefetch(),e===this.midPageThreshold?this.range(this.nextMidRange,!0):e===this.nextPageThreshold?this.range(this.nextFullRange):e===this.pullBackThreshold&&(this.offset===this.skip?this.range(this.previousMidRange):this.range(this.previousFullRange)),n?this.dataSource.at(e-this.dataOffset):(this.trigger("endreached",{index:e}),null)):void 0:this.dataSource.view()[e]},indexOf:function(e){return this.dataSource.data().indexOf(e)+this.dataOffset},total:function(){return parseInt(this.dataSource.total(),10)},next:function(){var e=this,t=e.pageSize,n=e.skip-e.viewSize+t,i=F.max(F.floor(n/t),0)*t;this.offset=n,this.dataSource.prefetch(i,t,(function(){e._goToRange(n,!0)}))},range:function(e,t){if(this.offset===e)return!0;var n=this,i=this.pageSize,r=F.max(F.floor(e/i),0)*i,o=this.dataSource;return t&&(r+=i),o.inRange(e,i)?(this.offset=e,this._recalculate(),this._goToRange(e),!0):!this.prefetch||(o.prefetch(r,i,(function(){n.offset=e,n._recalculate(),n._goToRange(e,!0)})),!1)},syncDataSource:function(){var e=this.offset;this.offset=null,this.range(e)},destroy:function(){this.unbind()},_prefetch:function(){var e=this,t=this.pageSize,n=this.skip+t,i=this.dataSource;i.inRange(n,t)||this._prefetching||!this.prefetch||(this._prefetching=!0,this.trigger("prefetching",{skip:n,take:t}),i.prefetch(n,t,(function(){e._prefetching=!1,e.trigger("prefetched",{skip:n,take:t})})))},_goToRange:function(e,t){this.offset===e&&(this.dataOffset=e,this._expanding=t,this.dataSource.range(e,this.pageSize),this.dataSource.enableRequestsInProgress())},_reset:function(){this._syncPending=!0},_change:function(){var e=this.dataSource;this.length=this.useRanges?e.lastRange().end:e.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 e=this.dataSource;this._firstItemUid=e.firstItemUid(),this.dataOffset=this.offset=e.skip()||0,this.pageSize=e.pageSize(),this.useRanges=e.options.serverPaging},_recalculate:function(){var e=this.pageSize,t=this.offset,n=this.viewSize,i=Math.ceil(t/e)*e;this.skip=i,this.midPageThreshold=i+e-1,this.nextPageThreshold=i+n-1,this.prefetchThreshold=i+Math.floor(e/3*2),this.pullBackThreshold=this.offset-1,this.nextMidRange=i+e-n,this.nextFullRange=i,this.previousMidRange=t-n,this.previousFullRange=i-e}}),Je=h.Observable.extend({init:function(e,t){var n=this;h.Observable.fn.init.call(n),this.dataSource=e,this.batchSize=t,this._total=0,this.buffer=new Ze(e,3*t),this.buffer.bind({endreached:function(e){n.trigger("endreached",{index:e.index})},prefetching:function(e){n.trigger("prefetching",{skip:e.skip,take:e.take})},prefetched:function(e){n.trigger("prefetched",{skip:e.skip,take:e.take})},reset:function(){n._total=0,n.trigger("reset")},resize:function(){n._total=Math.ceil(this.length/n.batchSize),n.trigger("resize",{total:n.total(),offset:this.offset})}})},syncDataSource:function(){this.buffer.syncDataSource()},at:function(e){var t,n=this.buffer,i=e*this.batchSize,r=this.batchSize,o=[];n.offset>i&&n.at(n.offset-1);for(var a=0;a0&&(n=n.get(r.substring(0,i))),e.start(n),a=n!==e.source?a.call(n,e.source):a.call(n),e.stop(n)),n&&n!==e.source&&(e.currentSource=n,n.unbind(m,e._change).bind(m,e._change)),e.stop(e.source),a},set:function(e){var t=this.currentSource||this.source,i=n.getter(this.path)(t);"function"==typeof i?t!==this.source?i.call(t,this.source,e):i.call(t,e):t.set(this.path,e)},destroy:function(){this.observable&&(this.source.unbind(m,this._change),this.currentSource&&this.currentSource.unbind(m,this._change)),this.unbind()}}),v=g.extend({get:function(){var e,t=this.source,n=this.path,i=0;for(e=t.get(n);!e&&t;)(t=this.parents[++i])instanceof o&&(e=t.get(n));if(e)return e.bind(t)}}),_=g.extend({init:function(e,t,n){g.fn.init.call(this,e,t),this.template=n},render:function(e){var t;return this.start(this.source),t=n.render(this.template,e),this.stop(this.source),t}}),b=c.extend({init:function(e,t,n){this.element=e,this.bindings=t,this.options=n},bind:function(e,t){var n=this;(e=t?e[t]:e).bind(m,(function(e){n.refresh(t||e)})),n.refresh(t)},destroy:function(){}}),w=b.extend({dataType:function(){return(this.element.getAttribute("data-"+n.ns+"type")||this.element.type||"text").toLowerCase()},parsedValue:function(){return this._parseValue(this.element.value,this.dataType())},_parseValue:function(e,t){return"date"==t?e=n.parseDate(e,"yyyy-MM-dd"):"datetime-local"==t?e=n.parseDate(e,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==t?e=n.parseFloat(e):"boolean"==t&&(e=e.toLowerCase(),e=null!==n.parseFloat(e)?Boolean(n.parseFloat(e)):"true"===e.toLowerCase()),e}});function y(t,i,r){return b.extend({init:function(e,t,n){var i=this;b.fn.init.call(i,e.element[0],t,n),i.widget=e,i._dataBinding=i.dataBinding.bind(i),i._dataBound=i.dataBound.bind(i),i._itemChange=i.itemChange.bind(i)},itemChange:function(e){z(e.item[0],e.data,this._ns(e.ns),[e.data].concat(this.bindings[t]._parents()))},dataBinding:function(e){var t,n,i=this.widget,r=e.removedItems||i.items();for(t=0,n=r.length;t'+i(o)+""}:function(e){return""}:"tbody"==r?function(e){return""+i(e)+""}:"ul"==r||"ol"==r?function(e){return"
  • "+i(e)+"
  • "}:function(e){return""+i(e)},t=n.template(t)),t},add:function(t,i){var r,o,a,s,l=this.container(),c=l.cloneNode(!1),d=l.children[t];if(e(c).html(n.render(this.template(),i)),c.children.length)for(r=this.bindings.source._parents(),o=0,a=i.length;o-1?i.splice(n,1):i.push(t)}else this.bindings.checked.set(t)}},refresh:function(){var e=this.bindings.checked.get(),t=e,i=this.dataType(),r=this.element;if("checkbox"==r.type)if(t instanceof a){var o=-1;if((e=this.parsedValue())instanceof Date){for(var s=0;s=0}else r.checked=t;else"radio"==r.type&&("date"==i?e=n.toString(e,"yyyy-MM-dd"):"datetime-local"==i&&(e=n.toString(e,"yyyy-MM-ddTHH:mm:ss")),null!=e&&r.value===e.toString()?r.checked=!0:r.checked=!1)},value:function(){var e=this.element,t=e.value;return"checkbox"==e.type&&(t=e.checked),t},destroy:function(){e(this.element).off(m,this._change)}})},l.select={source:l.source.extend({refresh:function(i){var r=this,o=r.bindings.source.get();if(o instanceof a||o instanceof n.data.DataSource){if("add"==(i=i||{}).action)r.add(i.index,i.items);else if("remove"==i.action)r.remove(i.index,i.items);else if(("itemchange"==i.action||i.action===t)&&(r.render(),r.bindings.value&&r.bindings.value)){var s=R(r.bindings.value.get(),e(r.element).data("valueField"));null===s?r.element.selectedIndex=-1:r.element.value=s}}else r.render()}}),value:w.extend({init:function(t,n,i){w.fn.init.call(this,t,n,i),this._change=this.change.bind(this),e(this.element).change(this._change)},parsedValue:function(){var e,t,n,i,r=this.dataType(),o=[];for(n=0,i=this.element.options.length;n1&&(s.direction=t&&r?N[a].reverse:a),n[o[0]]=s})):r(e,(function(e){var i=this.direction;i&&t&&!v.test(e)&&(this.direction=N[i].reverse),n[e]=this})),n},c&&o(i,{transition:function(t,n,i){var r,a,s=0,l=t.data("keys")||[];i=o({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i);var d=!1,u=function(){d||(d=!0,a&&(clearTimeout(a),a=null),t.removeData(M).dequeue().css(F,"").css(F),i.complete.call(t))};i.duration=e.fx&&e.fx.speeds[i.duration]||i.duration,r=G(0,n),e.merge(l,function(e){var t=[];for(var n in e)t.push(n);return t}(r)),e.hasOwnProperty("uniqueSort")?t.data("keys",e.uniqueSort(l)).height():t.data("keys",e.unique(l)).height(),t.css(F,i.exclusive+" "+i.duration+"ms "+i.ease).css(F),t.css(r).css(P),c.event&&(t.one(c.event,u),0!==i.duration&&(s=500)),a=setTimeout(u,i.duration+s),t.data(M,a),t.data(R,u)},stopQueue:function(e,t,i){var r,o=e.data("keys"),a=!i&&o,s=e.data(R);return a&&(r=n.getComputedStyles(e[0],o)),s&&s(),a&&e.css(r),e.removeData("keys").stop(t)}});var Y=n.Class.extend({init:function(e,t){var n=this;n.element=e,n.effects=[],n.options=t,n.restore=[]},run:function(t){var n,r,a,s,d,u,h=this,p=t.length,f=h.element,m=h.options,g=e.Deferred(),v={},_={};for(h.effects=t,g.done(h.complete.bind(h)),f.data("animating",!0),r=0;r=this.duration},timePassed:function(){return Math.min(this.duration,new Date-this.startDate)},moveTo:function(e){var t=this,n=t.movable;t.initial=n[t.axis],t.delta=e.location-t.initial,t.duration="number"==typeof e.duration?e.duration:300,t.tick=t._easeProxy(e.ease),t.startDate=new Date,t.start()},_easeProxy:function(e){var t=this;return function(){t.movable.moveAxis(t.axis,e(t.timePassed(),t.initial,t.delta,t.duration))}}});o(se,{easeOutExpo:function(e,t,n,i){return e==i?t+n:n*(1-Math.pow(2,-10*e/i))+t},easeOutBack:function(e,t,n,i,r){return n*((e=e/i-1)*e*(((r=1.70158)+1)*e+r)+1)+t}}),i.Animation=ae,i.Transition=se,i.createEffect=X,i.box=function(t){var i=(t=e(t)).offset();return i.width=n._outerWidth(t),i.height=n._outerHeight(t),i},i.transformOrigin=function(e,t){var n=(e.left-t.left)*t.width/(t.width-e.width),i=(e.top-t.top)*t.height/(t.height-e.height);return{x:isNaN(n)?0:n,y:isNaN(i)?0:i}},i.fillScale=function(e,t){return Math.min(e.width/t.width,e.height/t.height)},i.fitScale=function(e,t){return Math.max(e.width/t.width,e.height/t.height)}}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.attr,r=n.ui,o=n.attrValue,a=n.directiveSelector,s=n.Observable,l=n.ui.Widget,c=n.roleSelector,d="init",u="transitionStart",h="transitionEnd",p="show",f="hide",m=/unrecognized expression/,g=/]*>(([\u000a\u000d\u2028\u2029]|.)*)<\/body>/i,v="showStart",_="sameViewRequested",b="viewShow",w="viewTypeDetermined",y="after",k="k-content",x="k-view",C="k-stretched-view",S="k-widget",T="k-header",D="k-footer",I=n.ui.Widget.extend({init:function(t,i){var r=this;i=i||{},r.id=n.guid(),s.fn.init.call(r),this.options=e.extend({},this.options,i),r.content=t,r.options.renderOnInit&&l.fn.init.call(r,r._createElement(),i),r.options.wrapInSections&&r._renderSections(),r.tagName=i.tagName||"div",r.model=i.model,r._wrap=!1!==i.wrap,this._evalTemplate=i.evalTemplate||!1,this._useWithBlock=i.useWithBlock,r._fragments={},r.bind([d,p,f,u,h],i)},options:{name:"View",renderOnInit:!1,wrapInSections:!1,detachOnHide:!0,detachOnDestroy:!0},render:function(t){var i=this,r=!i.element;return r&&(i.element=i._createElement()),t&&e(t).append(i.element),r&&(n.bind(i.element,i.model),i.trigger(d)),t&&(i._eachFragment("attach"),i.trigger(p)),i.element},clone:function(){return new z(this)},triggerBeforeShow:function(){return!0},triggerBeforeHide:function(){return!0},showStart:function(){var e=this.render();e&&e.css("display",""),this.trigger(v,{view:this})},showEnd:function(){},hideEnd:function(){this.hide()},beforeTransition:function(e){this.trigger(u,{type:e})},afterTransition:function(e){this.trigger(h,{type:e})},hide:function(){this.options.detachOnHide&&(this._eachFragment("detach"),e(this.element).detach()),this.trigger(f)},destroy:function(){var e=this,t=e.element;t&&(l.fn.destroy.call(e),n.unbind(t),n.destroy(t),e.options.detachOnDestroy&&t.remove())},purge:function(){var t=this;t.destroy(),e(t.element).add(t.content).add(t.wrapper).off().remove()},fragments:function(t){e.extend(this._fragments,t)},_eachFragment:function(e){for(var t in this._fragments)this._fragments[t][e](this,t)},_createElement:function(){var t,i,r=this,o="<"+r.tagName+">";try{"SCRIPT"===(i=e(document.getElementById(r.content)||r.content))[0].tagName&&(i=i.html())}catch(e){m.test(e.message)&&(i=r.content)}if("string"==typeof i)i=i.replace(/^\s+|\s+$/g,""),r._evalTemplate&&(i=n.template(i,{useWithBlock:r._useWithBlock})(r.model||{})),t=e(o).append(i),r._wrap||(t=t.contents());else{if(t=i,r._evalTemplate){var a=e(n.template(e("
    ").append(t.clone(!0)).html(),{useWithBlock:r._useWithBlock})(r.model||{}));e.contains(document,t[0])&&t.replaceWith(a),t=a}r._wrap&&(t=t.wrapAll(o).parent())}return t},_renderSections:function(){var e=this;e.options.wrapInSections&&(e._wrapper(),e._createContent(),e._createHeader(),e._createFooter())},_wrapper:function(){var e=this,t=e.content;t.is(c("view"))?e.wrapper=e.content:e.wrapper=t.wrap("
    ').parent();var i=e.wrapper;i.attr("id",e.id),i.addClass(x),i.addClass(S),i.attr("role","view")},_createContent:function(){var t=e(this.wrapper),n=c("content");t.children(n)[0]||t.children().filter((function(){var t=e(this);if(!t.is(c("header"))&&!t.is(c("footer")))return t})).wrap("
    ');this.contentElement=t.children(c("content")),this.contentElement.addClass(C).addClass(k)},_createHeader:function(){var e=this.wrapper;this.header=e.children(c("header")).addClass(T)},_createFooter:function(){var e=this.wrapper;this.footer=e.children(c("footer")).addClass(D)}}),z=n.Class.extend({init:function(t){e.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:e.noop,afterTransition:e.noop}),M=I.extend({init:function(e,t){I.fn.init.call(this,e,t),this.containers={}},container:function(e){var t=this.containers[e];return t||(t=this._createContainer(e),this.containers[e]=t),t},showIn:function(e,t,n){this.container(e).show(t,n)},_createContainer:function(e){var t,n=this.render(),i=n.find(e);if(!i.length&&n.is(e)){if(!n.is(e))throw new Error("can't find a container with the specified "+e+" selector");i=n}return(t=new H(i)).bind("accepted",(function(e){e.view.render(i)})),t}}),E=I.extend({attach:function(e,t){e.element.find(t).replaceWith(this.render())},detach:function(){}}),A=/^(\w+)(:(\w+))?( (\w+))?$/;var H=s.extend({init:function(e){s.fn.init.call(this),this.container=e,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(e,t,i){if(!e.triggerBeforeShow()||this.view&&!this.view.triggerBeforeHide())return this.trigger("after"),!1;i=i||e.id;var r=this,o=e===r.view?e.clone():r.view,a=r.history,s=(a[a.length-2]||{}).id===i,l=t||(s?a[a.length-1].transition:e.transition),c=function(e){if(!e)return{};var t=e.match(A)||[];return{type:t[1],direction:t[3],reverse:"reverse"===t[5]}}(l);return r.running&&r.effect.stop(),"none"===l&&(l=null),r.trigger("accepted",{view:e}),r.view=e,r.previous=o,r.running=!0,s?a.pop():a.push({id:i,transition:l}),o?(l&&n.effects.enabled?(e.element.addClass("k-fx-hidden"),e.showStart(),s&&!t&&(c.reverse=!c.reverse),r.effect=n.fx(e.element).replace(o.element,c.type).beforeTransition((function(){e.beforeTransition("show"),o.beforeTransition("hide")})).afterTransition((function(){e.afterTransition("show"),o.afterTransition("hide")})).direction(c.direction).setReverse(c.reverse),r.effect.run().then((function(){r.end()}))):(e.showStart(),r.end()),!0):(e.showStart(),e.showEnd(),r.after(),!0)},destroy:function(){var e=this.view;e&&e.destroy&&e.destroy()}}),R=s.extend({init:function(t){var i,r,o=this;s.fn.init.call(o),o.options=t,e.extend(o,t),o.sandbox=e("
    "),r=o.container,i=o._hideViews(r),o.rootView=i.first(),o.layouts={},o.viewContainer=new n.ViewContainer(o.container),o.viewContainer.bind("accepted",(function(e){e.view.params=o.params})),o.viewContainer.bind("complete",(function(e){o.trigger(b,{view:e.view})})),o.viewContainer.bind(y,(function(){o.trigger(y)})),this.bind(this.events,t)},events:[v,y,b,"loadStart","loadComplete",_,w],destroy:function(){var e=this,t=e.viewContainer;for(var i in n.destroy(e.container),e.layouts)this.layouts[i].destroy();t&&t.destroy()},view:function(){return this.viewContainer.view},showView:function(e,t,i){if(""===(e=e.replace(new RegExp("^"+this.remoteViewURLPrefix),""))&&this.remoteViewURLPrefix&&(e="/"),e.replace(/^#/,"")===this.url)return this.trigger(_),!1;this.trigger(v);var r=this,o=r._findViewElement(e),a=n.widgetInstance(o);return r.url=e.replace(/^#/,""),r.params=i,a&&a.reload&&(a.purge(),o=[]),this.trigger(w,{remote:0===o.length,url:e}),!o[0]||(a||(a=r._createView(o)),r.viewContainer.show(a,t,e))},append:function(e,t){var n,r,o=this.sandbox,a=(t||"").split("?")[0],s=this.container;return g.test(e)&&(e=RegExp.$1),o[0].innerHTML=e,s.append(o.children("script, style")),(r=(n=this._hideViews(o)).first()).length||(n=r=o.wrapInner("
    ").children()),a&&r.hide().attr(i("url"),a),s.append(n),this._createView(r)},_locate:function(e){return this.$angular?a(e):c(e)},_findViewElement:function(e){var t,n=e.split("?")[0];return n?((t=this.container.children("["+i("url")+"='"+n+"']"))[0]||-1!==n.indexOf("/")||(t=this.container.children("#"===n.charAt(0)?n:"#"+n)),t[0]||(t=this._findViewElementById(e)),t):this.rootView},_findViewElementById:function(e){return this.container.children("[id='"+e+"']")},_createView:function(e){return this._createSpaView(e)},_createMobileView:function(e){return n.initWidget(e,{defaultTransition:this.transition,loader:this.loader,container:this.container,getLayout:this.getLayoutProxy,modelScope:this.modelScope,reload:o(e,"reload")},r.roles)},_createSpaView:function(e){var t=(this.options||{}).viewOptions||{};return new n.View(e,{renderOnInit:t.renderOnInit,wrap:t.wrap||!1,wrapInSections:t.wrapInSections,detachOnHide:t.detachOnHide,detachOnDestroy:t.detachOnDestroy})},_hideViews:function(e){return e.children(this._locate("view")).hide()}});n.ViewEngine=R,n.ViewContainer=H,n.Fragment=E,n.Layout=M,n.View=I,n.ViewClone=z}(window.kendo.jQuery);kendo;!function(e){function t(){this.node=null}function n(){}t.prototype={remove:function(){this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.attr={}},attr:{},text:function(){return""}},n.prototype={nodeName:"#null",attr:{style:{}},children:[],remove:function(){}};var i=new n;function r(e,t,n){this.nodeName=e,this.attr=t||{},this.children=n||[]}function o(e,t){this.nodeValue=String(e),this.force=t}function a(e,t){this.html=e,this.force=t}r.prototype=new t,r.prototype.appendTo=function(e){for(var t="string"==typeof this.nodeName?document.createElement(this.nodeName):this.nodeName,n=this.children,r=0;r2)return void this.render({appendChild:function(n){e.replaceChild(n,t.node)}},i);for(r=0;r/g,">").replace(/\"/g,""").replace(/\'/g,"'")}function v(e,t){for(var n="",i=0;i\n '+(w&&y?'':"")+"\n\n \n \n "+(n||t?'\n ':"")+'\n \n \n\n \n\n "+(null!=p||i&&i.length>0?"\n \n "+(i&&i.length?"":'\n ")+"\n "+_(i,(function(e,t){var n="number"==typeof e.index?e.index+1:t+1;return 0===e.width?"':""}))+"\n ":"")+"\n\n \n "+_(o,(function(e,t){return'\n \n "+_(e.data,(function(e){return'\n \n "+(null!=e.formula?function(e){if("string"==typeof e)return""+g(e)+"";return''+g(e.src)+""}(e.formula):"")+"\n "+(null!=e.value?""+g(e.value)+"":"")+"\n "}))+"\n \n "}))+"\n \n\n "+(l?'':c?$(c):"")+"\n\n "+(s.length?'\n \n '+_(s,(function(e){return''}))+"\n ":"")+"\n\n "+(h.length?"\n \n "+_(h,(function(e){return'\n \n "+(e.formula1?""+g(e.formula1)+"":"")+"\n "+(e.formula2?""+g(e.formula2)+"":"")+"\n "}))+"\n ":"")+"\n\n "+(u.length?"\n \n "+_(u,(function(e){return'\n '}))+"\n ":"")+'\n\n \n '+(v?'':"")+"\n "+(m?'':"")+"\n"},y=function(e){return b+'\n\n '+_(e,(function(e){return'\n '}))+"\n"};function k(e){var t=Math.floor(e/26)-1;return(t>=0?k(t):"")+String.fromCharCode(65+e%26)}function x(e,t){return k(t)+(e+1)}function C(e,t){return"$"+k(t)+"$"+(e+1)}function S(e){return(e.frozenRows||(e.freezePane||{}).rowSplit||1)-1}function T(e){return e/7-Math.floor(128/7)/256}var D=kendo.Class.extend({init:function(t,n,i,r){this.options=t,this._strings=n,this._styles=i,this._borders=r,this._validations={},this._comments=[],this._drawings=t.drawings||[],this._hyperlinks=(this.options.hyperlinks||[]).map((function(t,n){return e.extend({},t,{rId:"link"+n})}))},relsToXML:function(){var e=this._hyperlinks,t=this._comments,n=this._drawings;if(e.length||t.length||n.length)return function(e){var t=e.hyperlinks,n=e.comments,i=e.sheetIndex,r=e.drawings;return b+'\n\n '+_(t,(function(e){return'\n '}))+"\n "+(n.length?'\n \n ':"")+"\n "+(r.length?'\n ':"")+"\n"}({hyperlinks:e,comments:t,sheetIndex:this.options.sheetIndex,drawings:n})},toXML:function(e){var t=this.options.mergedCells||[],n=function(e,t){var n=[],i=[];!function(e,t){for(var n=0;n\n \n \n \n \n '+_(t,(function(e){return'\n \n \n \n \n \n \n \n \n \n '+g(e.text)+"\n \n \n "}))+"\n \n"}({comments:this._comments})},drawingsXML:function(e){if(this._drawings.length){var t={},n=this._drawings.map((function(n){var i=V(n.topLeftCell),r=t[n.image];return r||(r=t[n.image]={rId:"img"+n.image,target:e[n.image].target}),{col:i.col,colOffset:O(n.offsetX),row:i.row,rowOffset:O(n.offsetY),width:O(n.width),height:O(n.height),imageId:r.rId}}));return{main:(i=n,b+'\n\n '+_(i,(function(e,t){return'\n \n \n '+e.col+"\n "+e.colOffset+"\n "+e.row+"\n "+e.rowOffset+'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '}))+"\n"),rels:y(t)}}var i},legacyDrawing:function(){if(this._comments.length)return function(e){return'\n \n \n \n \n '+_(e.comments,(function(e){return'\n \n \n \n \n \n '+e.anchor+"\n False\n "+e.row+"\n "+e.col+"\n \n "}))+"\n"}({comments:this._comments})},_lookupString:function(e){var t,n="$"+e,i=this._strings.indexes[n];return void 0!==i?t=i:(t=this._strings.indexes[n]=this._strings.uniqueCount,this._strings.uniqueCount++),this._strings.count++,t},_lookupStyle:function(e){var t=JSON.stringify(e);if("{}"===t)return 0;var n=f(t,this._styles);return n<0&&(n=this._styles.push(t)-1),n+1},_lookupBorder:function(e){var t=JSON.stringify(e);if("{}"!==t){var n=f(t,this._borders);return n<0&&(n=this._borders.push(t)-1),n+1}},_readCells:function(e){for(var t=0;t=t&&(t=e.index+1)})),t}var z={greaterThanOrEqualTo:"greaterThanOrEqual",lessThanOrEqualTo:"lessThanOrEqual"},M={number:"decimal"},E={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};function A(e){var t=function(e){function t(e){var t=parseInt(e,10).toString(16);return t.length<2?"0"+t:t}var n=/^rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([0-9.]+)\s*)?\)/i.exec(e.trim());return n?"#"+t(255*(n[4]?parseFloat(n[4]):1)|0)+t(n[1])+t(n[2])+t(n[3]):e}(e);return t.length<6&&(t=t.replace(/(\w)/g,(function(e,t){return t+t}))),(t=t.substring(1).toUpperCase()).length<8&&(t="FF"+t),t}var H=kendo.Class.extend({init:function(e){var t=this;this.options=e||{},this._strings={indexes:{},count:0,uniqueCount:0},this._styles=[],this._borders=[],this._images=this.options.images,this._imgId=0,this._sheets=n(this.options.sheets||[],(function(e,n){return e.defaults=t.options,e.sheetIndex=n+1,new D(e,t._strings,t._styles,t._borders)}))},imageFilename:function(e){var t=++this._imgId;switch(e){case"image/jpg":case"image/jpeg":return"image"+t+".jpg";case"image/png":return"image"+t+".png";case"image/gif":return"image"+t+".gif";default:return"image"+t+".bin"}},toZIP:function(){var e=this,t=i(),r=t.folder("docProps");r.file("core.xml",function(e){var t=e.creator,n=e.lastModifiedBy,i=e.created,r=e.modified;return b+'\n \n '+g(t)+"\n "+g(n)+'\n '+g(i)+'\n '+g(r)+"\n"}({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()}));var o=this._sheets.length;r.file("app.xml",function(e){var t=e.sheets;return b+'\n\n Microsoft Excel\n 0\n false\n \n \n \n Worksheets\n \n \n '+t.length+'\n \n \n \n \n '+_(t,(function(e,t){return e.options.title?""+g(e.options.title)+"":"Sheet"+(t+1)+""}))+"\n \n false\n false\n false\n 14.0300\n"}({sheets:this._sheets})),t.folder("_rels").file(".rels",'\r\n \n \n \n \n ');var a=t.folder("xl");if(a.folder("_rels").file("workbook.xml.rels",function(e){var t=e.count;return b+'\n\n '+v(t,(function(e){return'\n '}))+'\n \n \n'}({count:o})),this._images){var s=a.folder("media");Object.keys(this._images).forEach((function(t){var n=e._images[t],i=e.imageFilename(n.type);s.file(i,n.data),n.target="../media/"+i}))}var l={};a.file("workbook.xml",function(e){var t=e.sheets,n=e.filterNames,i=e.userNames;return b+'\n\n \n \n \n \n \n \n '+_(t,(function(e,t){var n=e.options;return''}))+"\n \n "+(n.length||i.length?"\n \n "+_(n,(function(e){return'\n "}))+"\n "+_(i,(function(e){return'\n "}))+"\n ":"")+'\n \n'}({sheets:this._sheets,filterNames:n(this._sheets,(function(e,t){var n=e.options,i=n.name||n.title||"Sheet"+(t+1);l[i.toLowerCase()]=t;var r=n.filter;if(r){if(r.ref){var o=r.ref.split(":"),a=V(o[0]),s=V(o[1]);return{localSheetId:t,name:i,from:C(a.row,a.col),to:C(s.row,s.col)}}if(void 0!==r.from&&void 0!==r.to)return{localSheetId:t,name:i,from:C(S(n),r.from),to:C(S(n),r.to)}}})),userNames:n(this.options.names||[],(function(e){return{name:e.localName,localSheetId:e.sheet?l[e.sheet.toLowerCase()]:null,value:e.value,hidden:e.hidden}}))}));for(var c=a.folder("worksheets"),d=a.folder("drawings"),u=d.folder("_rels"),h=c.folder("_rels"),p=[],w=[],y=0;y\n \n '+_(t,(function(e,t){return'\n '}))+'\n \n \n \n \n \n \n \n \n \n '+_(n,(function(e){return"\n \n "+(e.bold?"":"")+"\n "+(e.italic?"":"")+"\n "+(e.underline?"":"")+'\n \n '+(e.color?'':'')+"\n "+(e.fontFamily?'\n \n \n ':'\n \n \n \n ')+"\n "}))+'\n \n \n \n \n '+_(i,(function(e){return"\n "+(e.background?'\n \n \n \n \n \n ':"")}))+'\n \n \n \n '+_(r,F)+'\n \n \n \n \n \n \n '+_(o,(function(e){return'\n \n "+(e.textAlign||e.verticalAlign||e.wrap?"\n \n ":"")+"\n \n "}))+'\n \n \n \n \n \n \n'}({fonts:O,fills:W,formats:N,borders:P,styles:n(B,(function(e){var t={};return L(e)&&(t.fontId=f(e,O)+1),e.background&&(t.fillId=f(e,W)+2),t.textAlign=e.textAlign,t.indent=e.indent,t.verticalAlign=e.verticalAlign,t.wrap=e.wrap,t.borderId=e.borderId,e.format&&(void 0!==E[e.format]?t.numFmtId=E[e.format]:t.numFmtId=165+f(e,N)),t}))})),a.file("sharedStrings.xml",function(e){var t=e.count,n=e.uniqueCount,i=e.indexes;return b+'\n\n '+_(Object.keys(i),(function(e){return'\n '+g(e.substring(1))+""}))+"\n"}(this._strings)),t.file("[Content_Types].xml",function(e){var t=e.sheetCount,n=e.commentFiles,i=e.drawingFiles;return b+'\n\n \n \n \n \n \n \n \n \n \n '+v(t,(function(e){return''}))+"\n "+_(n,(function(e){return''}))+"\n "+_(i,(function(e){return''}))+'\n \n \n'}({sheetCount:o,commentFiles:p,drawingFiles:w})),t},toDataURL:function(){var e=this.toZIP();return e.generateAsync?e.generateAsync(d).then(p):p(e.generate(d))},toBlob:function(){var e=this.toZIP();return e.generateAsync?e.generateAsync(u):new Blob([e.generate(h)],{type:c})}});function R(e,t){var n,i,r="";return t&&(r+="<"+e+' style="'+(n=t.size,i="thin",2===n?i="medium":3===n&&(i="thick"),i+'">'),t.color&&(r+=''),r+=""),r}function F(e){var t=e.diagonal?e.diagonal.type:0;return"\n "+R("left",e.left)+"\n "+R("right",e.right)+"\n "+R("top",e.top)+"\n "+R("bottom",e.bottom)+"\n "+R("diagonal",e.diagonal)+"\n "}var P={};function B(e){return e.sort((function(e,t){return e.index-t.index}))}function L(e,t){for(var n=0;n1||u>1)&&(n=t.mergedCells,i=p+":"+x(o+d-1,h+u-1),n.indexOf(i)<0&&n.push(i)),d>1)for(var m=o+1;m\n"+_(e.criteria,(function(e){var t=$.customOperator(e);return"'}))+"\n"},G=function(e){var t=e.type;return''},K=function(e){var t=e.type,n=e.value;return''},Y=function(e){return"\n "+_(e.values,(function(e){return'\n '}))+"\n "};function $(e){return function(e){var t=e.ref,n=e.columns,i=e.generators;return'\n\n '+_(n,(function(e){return'\n \n '+i[e.filter](e)+"\n \n "}))+"\n"}({ref:e.ref,columns:e.columns,generators:{custom:q,dynamic:G,top:K,value:Y}})}$.customOperator=function(e){return{eq:"equal",gt:"greaterThan",gte:"greaterThanOrEqual",lt:"lessThan",lte:"lessThanOrEqual",ne:"notEqual",doesnotstartwith:"notEqual",doesnotendwith:"notEqual",doesnotcontain:"notEqual",doesnotmatch:"notEqual"}[e.operator.toLowerCase()]},$.customValue=function(e){function t(e){return e.replace(/([*?])/g,"~$1")}switch(e.operator.toLowerCase()){case"startswith":case"doesnotstartwith":return t(e.value)+"*";case"endswith":case"doesnotendwith":return"*"+t(e.value);case"contains":case"doesnotcontain":return"*"+t(e.value)+"*";default:return e.value}},$.dynamicFilterType=function(e){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"}[e.toLowerCase()]||e},kendo.deepExtend(kendo.ooxml,{IntlService:o,Workbook:H,Worksheet:D})}(window.kendo.jQuery),function(e){var t=kendo.ooxml.Workbook;kendo.ooxml.IntlService.register({toString:kendo.toString}),kendo.ooxml.Workbook=t.extend({toDataURL:function(){var e=t.fn.toDataURL.call(this);if("string"!=typeof e)throw new Error("The toDataURL method can be used only with jsZip 2. Either include jsZip 2 or use the toDataURLAsync method.");return e},toDataURLAsync:function(){var n=e.Deferred(),i=t.fn.toDataURL.call(this);return"string"==typeof i?i=n.resolve(i):i&&i.then&&i.then((function(e){n.resolve(e)}),(function(){n.reject()})),n.promise()}})}(window.kendo.jQuery);!function(e){window.kendo.excel=window.kendo.excel||{};var t=kendo.getter,n=e.map,i={compile:function(e){return e}},r=kendo.Class.extend({});function o(e){return e.title+": "+e.value}function a(e,t){for(var n=[],i=0;i0,this.hierarchy=e.hierarchy,this.hasGroupHeaderColumn=this.columns.some((function(e){return e.groupHeaderColumnTemplate})),this.collapsible=this.options.collapsible},workbook:function(){return{sheets:[{columns:this._columns(),rows:this.hierarchy?this._hierarchyRows():this._rows(),freezePane:this._freezePane(),filter:this._filter()}]}},_trimColumns:function(e){var t=this;return e.filter((function(e){var n=Boolean(e.field);return!n&&e.columns&&(n=t._trimColumns(e.columns).length>0),n}))},_leafColumns:function(e){for(var t=[],n=0;n0&&r.push(e.extend({background:"#dfdfdf",color:"#333",value:n.groupHeaderColumnTemplate?n.groupHeaderColumnTemplate(e.extend({group:l},l,t.aggregates[n.field])):void 0},n.groupHeaderCellOptions))})),r},_dataRows:function(e,t){for(var n=this._depth(),i=[],r=0;rc?l.push({id:e,level:c}):h=t;){var r=e.pop();i.push(this._hierarchyFooter(this.aggregates[r.id],r.level+1,n))}return i},_hasFooterTemplate:function(){for(var e=this.columns,t=0;t0&&(e.field||e.columns)},_visibleColumns:function(e){var t=this;return e.filter((function(e){var n=e.exportable;"object"==typeof n&&(n=e.exportable.excel);var i=!e.hidden&&!1!==n,r=e.hidden&&!0===n,o=i||r;return o&&e.columns&&(o=t._visibleColumns(e.columns).length>0),o}))},_headerRow:function(t,n){var i=this,r=t.cells.map((function(n){return e.extend(n,{colSpan:n.colSpan>1?n.colSpan:1,rowSpan:t.rowSpan>1&&!n.colSpan?t.rowSpan:1})}));return this.hierarchy&&r[0].firstCell&&(r[0].colSpan+=this._depth()),{type:"header",cells:a(n.length,(function(){return e.extend({background:"#7a7a7a",color:"#fff"},i.options.headerPaddingCellOptions)})).concat(r)}},_prependHeaderRows:function(e){var t=this.groups,n=[{rowSpan:1,cells:[],index:0}];this._prepareHeaderRows(n,this.options.columns);for(var i=n.length-1;i>=0;i--)e.unshift(this._headerRow(n[i],t))},_prepareHeaderRows:function(t,n,i,r){for(var o=this,a=r||t[t.length-1],s=t[a.index+1],l=0,c=0;ct&&(t=i)}return 1+t},_freezePane:function(){var e=this._visibleColumns(this.options.columns||[]),t=this._visibleColumns(this._trimColumns(this._leafColumns(e.filter((function(e){return e.locked}))))).length;return{rowSplit:this._headerDepth(e),colSplit:t?t+this.groups.length:0}},_cell:function(t,n){return e.extend({value:n.value(t)},n.cellOptions)},_depth:function(){return this.hierarchy?this.hierarchy.depth:this.groups.length},_columns:function(){return a(this._depth(),(function(){return{width:20}})).concat(this.columns.map((function(e){return{width:parseInt(e.width,10),autoWidth:!e.width}})))}});kendo.deepExtend(kendo.excel,{ExcelExporter:l,TemplateService:r})}(window.kendo.jQuery),function(e,t){var n=t.excel.ExcelExporter,i=e.extend;t.excel.TemplateService.register({compile:t.template}),t.ExcelExporter=t.Class.extend({init:function(e){this.options=e;var n=e.dataSource;if(n instanceof t.data.DataSource){n.filter()||(n.options.filter=void 0),this.dataSource=new n.constructor(i({},n.options,{page:e.allPages?0:n.page(),filter:n.filter(),pageSize:e.allPages?n.total():n.pageSize()||n.total(),sort:n.sort(),group:n.group(),aggregate:n.aggregate()}));var r=n.data();if(r.length>0){if(e.hierarchy)for(var o=0;or&&(r=n);e.depth=r+1}else e=!1;return{hierarchy:e}},workbook:function(){return e.Deferred(function(e){this.dataSource.fetch().then(function(){var t=new n(i({},this.options,this._hierarchy(),{data:this.dataSource.view(),groups:this.dataSource.group(),aggregates:this.dataSource.aggregates()})).workbook();e.resolve(t,this.dataSource.view())}.bind(this))}.bind(this)).promise()}})}(kendo.jQuery,kendo),function(e,t){t.ExcelMixin={extend:function(t){t.events.push("excelExport"),t.options.excel=e.extend(t.options.excel,this.options),t.saveAsExcel=this.saveAsExcel},options:{proxyURL:"",allPages:!1,filterable:!1,fileName:"Export.xlsx",collapsible:!1},saveAsExcel:function(){var e=this.options.excel||{};new t.ExcelExporter({columns:this.columns,dataSource:this.dataSource,allPages:e.allPages,filterable:e.filterable,hierarchy:e.hierarchy,collapsible:e.collapsible}).workbook().then(function(n,i){if(!this.trigger("excelExport",{workbook:n,data:i})){var r=new t.ooxml.Workbook(n);r.options||(r.options={}),r.options.skipCustomHeight=!0,r.toDataURLAsync().then((function(i){t.saveAs({dataURI:i,fileName:n.fileName||e.fileName,proxyURL:e.proxyURL,forceProxy:e.forceProxy})}))}}.bind(this))}}}(kendo.jQuery,kendo);!function(e){var t=window.kendo,n=t.isFunction;function i(e){return e&&n(e.done)&&n(e.fail)}function r(e){return e&&n(e.then)&&n(e.catch)}var o=t.data.RemoteTransport.extend({init:function(e){var n=e&&e.signalr?e.signalr:{},o=n.promise;if(!o)throw new Error('The "promise" option must be set.');if(!i(o)&&!r(o))throw new Error('The "promise" option must be a Promise.');this.promise=o;var a=n.hub;if(!a)throw new Error('The "hub" option must be set.');if("function"!=typeof a.on||"function"!=typeof a.invoke)throw new Error('The "hub" option is not a valid SignalR hub proxy.');this.hub=a,t.data.RemoteTransport.fn.init.call(this,e)},push:function(e){var t=this.options.signalr.client||{};t.create&&this.hub.on(t.create,e.pushCreate),t.update&&this.hub.on(t.update,e.pushUpdate),t.destroy&&this.hub.on(t.destroy,e.pushDestroy)},_crud:function(n,o){var a=this.hub,s=this.promise,l=this.options.signalr.server;if(!l||!l[o])throw new Error(t.format('The "server.{0}" option must be set.',o));var c=[l[o]],d=this.parameterMap(n.data,o);e.isEmptyObject(d)||c.push(d),i(s)?s.done((function(){a.invoke.apply(a,c).done(n.success).fail(n.error)})):r(s)&&s.then((function(){a.invoke.apply(a,c).then(n.success).catch(n.error)}))},read:function(e){this._crud(e,"read")},create:function(e){this._crud(e,"create")},update:function(e){this._crud(e,"update")},destroy:function(e){this._crud(e,"destroy")}});e.extend(!0,t.data,{transports:{signalr:o}})}(window.kendo.jQuery);kendo;!function(e){kendo.drawing.util=kendo.drawing.util||{},kendo.deepExtend(kendo.drawing.util,{createPromise:function(){return e.Deferred()},promiseAll:function(t){return e.when.apply(e,t)},extendStatic:function(e,t){if(t)if("function"==typeof t.__proto__)e.__proto__=t;else for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}})}(window.kendo.jQuery);window.kendo=window.kendo||{};var u=kendo.Class,h=kendo.support,p={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"},f=h.browser,m=function(e){var t=Object.keys(p);t.push("transparent");var n=new RegExp("^("+t.join("|")+")(\\W|$)","i");return m=function(e){return n.exec(e)},n.exec(e)},g=u.extend({init:function(){},toHSV:function(){return this},toRGB:function(){return this},toHex:function(e){return this.toBytes().toHex(e)},toBytes:function(){return this},toCss:function(e){return"#"+this.toHex(e)},toCssRgba:function(){var e=this.toBytes();return"rgba("+e.r+", "+e.g+", "+e.b+", "+parseFloat(Number(this.a).toFixed(3))+")"},toDisplay:function(){return f.msie&&f.version<9?this.toCss():this.toCssRgba()},equals:function(e){return e===this||null!=e&&this.toCssRgba()===C(e).toCssRgba()},diff:function(e){if(null===e)return NaN;var t=this.toBytes(),n=e.toBytes();return Math.sqrt(Math.pow(.3*(t.r-n.r),2)+Math.pow(.59*(t.g-n.g),2)+Math.pow(.11*(t.b-n.b),2))},clone:function(){var e=this.toBytes();return e===this&&(e=new _(e.r,e.g,e.b,e.a)),e}}),v=g.extend({init:function(e,t,n,i){g.fn.init.call(this),this.r=e,this.g=t,this.b=n,this.a=i},toHSV:function(){var e,t,n=this,i=n.r,r=n.g,o=n.b,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,c=s;return 0===l?new w(0,0,c,this.a):(0!==s?(t=l/s,e=i===s?(r-o)/l:r===s?2+(o-i)/l:4+(i-r)/l,(e*=60)<0&&(e+=360)):(t=0,e=-1),new w(e,t,c,this.a))},toHSL:function(){var e,t,n=this,i=n.r,r=n.g,o=n.b,a=Math.max(i,r,o),s=Math.min(i,r,o),l=(a+s)/2;if(a===s)e=t=0;else{var c=a-s;switch(t=l>.5?c/(2-a-s):c/(a+s),a){case i:e=(r-o)/c+(ri.length;)i=n+i;return i}var w=g.extend({init:function(e,t,n,i){g.fn.init.call(this),this.h=e,this.s=t,this.v=n,this.a=i},toRGB:function(){var e,t,n,i=this,r=i.h,o=i.s,a=i.v;if(0===o)e=t=n=a;else{r/=60;var s=Math.floor(r),l=r-s,c=a*(1-o),d=a*(1-o*l),u=a*(1-o*(1-l));switch(s){case 0:e=a,t=u,n=c;break;case 1:e=d,t=a,n=c;break;case 2:e=c,t=a,n=u;break;case 3:e=c,t=d,n=a;break;case 4:e=u,t=c,n=a;break;default:e=a,t=c,n=d}}return new v(e,t,n,this.a)},toHSL:function(){return this.toRGB().toHSL()},toBytes:function(){return this.toRGB().toBytes()}}),y=g.extend({init:function(e,t,n,i){g.fn.init.call(this),this.h=e,this.s=t,this.l=n,this.a=i},toRGB:function(){var e,t,n,i=this.h/360,r=this.s/100,o=this.l/100;if(0===r)e=t=n=o;else{var a=o<.5?o*(1+r):o+r-o*r,s=2*o-a;e=k(s,a,i+1/3),t=k(s,a,i),n=k(s,a,i-1/3)}return new v(e,t,n,this.a)},toHSV:function(){return this.toRGB().toHSV()},toBytes:function(){return this.toRGB().toBytes()}});function k(e,t,n){var i=n;return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function x(e){return parseFloat(parseFloat(parseInt(e,16)/255).toFixed(3))}function C(e,t){var n,i;if(null==e||"none"===e)return null;if(e instanceof g)return e;var r=e.toLowerCase();if(n=m(r))return(r="transparent"===n[1]?new v(1,1,1,0):C(p[n[1]],t)).match=[n[1]],r;if((n=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(r))?i=new _(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),1):(n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(r))?i=new _(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16),1):(n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(r))?i=new _(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16),x(n[4]+n[4])):(n=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(r))?i=new _(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),x(n[4])):(n=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(r))?i=new _(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),1):(n=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(r))?i=new _(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),parseFloat(n[4])):(n=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(r))?i=new v(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,1):(n=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(r))&&(i=new v(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(n[4]))),i)i.match=n;else if(!t)throw new Error("Cannot parse color: "+r);return i}var S=u.extend({init:function(e){var t=this;if(1===arguments.length)for(var n=S.formats,i=this.resolveColor(e),r=0;r255?255:e},padDigit:function(e){return 1===e.length?"0"+e:e},brightness:function(e){var t=Math.round;return this.r=t(this.normalizeByte(this.r*e)),this.g=t(this.normalizeByte(this.g*e)),this.b=t(this.normalizeByte(this.b*e)),this},percBrightness:function(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)},isDark:function(){return this.percBrightness()<180}});S.fromBytes=function(e,t,n,i){return new _(e,t,n,null!=i?i:1)},S.fromRGB=function(e,t,n,i){return new v(e,t,n,null!=i?i:1)},S.fromHSV=function(e,t,n,i){return new w(e,t,n,null!=i?i:1)},S.fromHSL=function(e,t,n,i){return new y(e,t,n,null!=i?i:1)},S.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],S.namedColors=p,kendo.deepExtend(kendo,{parseColor:C,namedColors:p,Color:S}),function(e){window.kendo.util=window.kendo.util||{};var t=kendo.Class.extend({init:function(e){this._size=e,this._length=0,this._map={}},put:function(e,t){var n=this._map,i={key:e,value:t};n[e]=i,this._head?(this._tail.newer=i,i.older=this._tail,this._tail=i):this._head=this._tail=i,this._length>=this._size?(n[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},get:function(e){var t=this._map[e];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}}),n=/\r?\n|\r|\t/g;function i(e){return String(e).replace(n," ")}function r(e){var t=[];for(var n in e)t.push(n+e[n]);return t.sort().join("")}function o(e){for(var t=2166136261,n=0;n>>0}var a,s={baselineMarkerSize:1};"undefined"!=typeof document&&((a=document.createElement("div")).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: pre!important;");var l=kendo.Class.extend({init:function(n){this._cache=new t(1e3),this.options=e.extend({},s,n)},measure:function(e,t,n){if(void 0===n&&(n={}),null==e)return{width:0,height:0,baseline:0};var s=o(e+r(t)),l=this._cache.get(s);if(l)return l;var c={width:0,height:0,baseline:0},d=n.box||a,u=this._baselineMarker().cloneNode(!1);for(var h in t){var p=t[h];void 0!==p&&(d.style[h]=p)}var f=!1!==n.normalizeText?i(e):String(e);return d.textContent=f,d.appendChild(u),document.body.appendChild(d),f.length&&(c.width=d.offsetWidth-this.options.baselineMarkerSize,c.height=d.offsetHeight,c.baseline=u.offsetTop+this.options.baselineMarkerSize),c.width>0&&c.height>0&&this._cache.put(s,c),d.parentNode.removeChild(d),c},_baselineMarker:function(){var e=document.createElement("div");return e.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",e}});l.current=new l,kendo.deepExtend(kendo.util,{LRUCache:t,TextMetrics:l,measureText:function(e,t,n){return l.current.measure(e,t,n)},objectKey:r,hashKey:o,normalizeText:i})}(window.kendo.jQuery),function(e){window.kendo=window.kendo||{};var t=kendo.drawing.util,n=t.extendStatic,i=kendo.Class,r=kendo.util,o=kendo.support.browser,a=t.createPromise,s=t.promiseAll,l=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.observers=function(){return this._observers=this._observers||[],this._observers},t.prototype.addObserver=function(e){return this._observers?this._observers.push(e):this._observers=[e],this},t.prototype.removeObserver=function(e){var t=this.observers(),n=t.indexOf(e);return-1!==n&&t.splice(n,1),this},t.prototype.trigger=function(e,t){var n=this._observers;if(n&&!this._suspended)for(var i=0;i0;)e>>6),t+=b(128|63&i)):i<65536?(t+=b(224|i>>>12),t+=b(128|i>>>6&63),t+=b(128|63&i)):i<1114111&&(t+=b(240|i>>>18),t+=b(128|i>>>12&63),t+=b(128|i>>>6&63),t+=b(128|63&i))}return t}(e);n>2,l=(3&r)<<4|o>>4,c=(15&o)<<2|a>>6,d=63&a;isNaN(o)?c=d=64:isNaN(a)&&(d=64),t=t+w.charAt(s)+w.charAt(l)+w.charAt(c)+w.charAt(d)}return t}function k(e){return h((e.x||{}).location)?{x:e.x.location,y:e.y.location}:{x:e.pageX||e.clientX||0,y:e.pageY||e.clientY||0}}function x(e){return void 0===e&&(e={}),e.touch?e.touch.initialTouch:e.target}function C(e){return""===e||null===e||"none"===e||"transparent"===e||!h(e)}function S(e){if(e)return e[e.length-1]}function T(e,t,n){return Math.max(Math.min(e,n),t)}function D(e,t){if(e.length<2)return e.slice();return function e(n){if(n.length<=1)return n;var i=Math.floor(n.length/2),r=n.slice(0,i),o=n.slice(i);return function(e,n){for(var i=[],r=0,o=0,a=0;r=0,r=this,o=e;if(i){for(var a=o.split("."),s=this.prefix;a.length>1;){s+=(o=a.shift())+".";var l=r[o];l||((l=new t({},s)).addObserver(this),r[o]=l),r=l}o=a[0]}r._clear(o),r[o]=n},t.prototype._clear=function(e){var t=this[e];t&&t.removeObserver&&t.removeObserver(this)},t.prototype._wrap=function(e,n){var r=j.call(e),o=e;return null!==o&&h(o)&&"[object Object]"===r&&(e instanceof t||e instanceof i||(o=new t(o,this.prefix+n+".")),o.addObserver(this)),o},t}(l);function G(e){return function(t){return this[e]!==t&&(this[e]=t,this.geometryChange()),this}}function K(e){return function(){return this[e]}}var Y=function(e,t){var i=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t}(e);return function(e,t){for(var n=0;n0&&!C(e.color)},t.prototype._clippedBBox=function(e){return this.bbox(e)},Object.defineProperties(t.prototype,i),t}(l);function ne(e,t,n,i){var r=0,o=0;return i&&(r=Math.atan2(i.c*n,i.a*t),0!==i.b&&(o=Math.atan2(i.d*n,i.b*t))),{x:r,y:o}}var ie=Math.PI/2,re=function(e){function t(t,n){void 0===t&&(t=new Q),void 0===n&&(n=0),e.call(this),this.setCenter(t),this.setRadius(n)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.setCenter=function(e){return this._observerField("center",Q.create(e)),this.geometryChange(),this},t.prototype.getCenter=function(){return this.center},t.prototype.equals=function(e){return e&&e.center.equals(this.center)&&e.radius===this.radius},t.prototype.clone=function(){return new t(this.center.clone(),this.radius)},t.prototype.pointAt=function(e){return this._pointAt(z(e))},t.prototype.bbox=function(e){for(var t=ne(this.center,this.radius,this.radius,e),n=Q.maxPoint(),i=Q.minPoint(),r=0;r<4;r++){var o=this._pointAt(t.x+r*ie).transformCopy(e),a=this._pointAt(t.y+r*ie).transformCopy(e),s=new Q(o.x,a.y);n=Q.min(n,s),i=Q.max(i,s)}return Z.fromPoints(n,i)},t.prototype._pointAt=function(e){var t=this.center,n=this.radius;return new Q(t.x+n*Math.cos(e),t.y+n*Math.sin(e))},t.prototype.containsPoint=function(e){var t=this.center,n=this.radius;return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<=Math.pow(n,2)},t.prototype._isOnPath=function(e,t){var n=this.center,i=this.radius,r=n.distanceTo(e);return i-t<=r&&r<=i+t},t}(Y(l,["radius"])),oe=function(e){return function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.fill=function(e,t){var n=this.options;if(h(e)){if(e&&"Gradient"!==e.nodeType){var i={color:e};h(t)&&(i.opacity=t),n.set("fill",i)}else n.set("fill",e);return this}return n.get("fill")},t.prototype.stroke=function(e,t,n){return h(e)?(this.options.set("stroke.color",e),h(t)&&this.options.set("stroke.width",t),h(n)&&this.options.set("stroke.opacity",n),this):this.options.get("stroke")},t}(e)},ae=V.IDENTITY.toString(),se=function(e){return function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.bbox=function(e){var t,n=$(this.currentTransform(e)),i=n?n.toString():ae;this._bboxCache&&this._matrixHash===i?t=this._bboxCache.clone():(t=this._bbox(n),this._bboxCache=t?t.clone():null,this._matrixHash=i);var r=this.options.get("stroke.width");return r&&t&&t.expand(r/2),t},t.prototype.geometryChange=function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})},t}(e)};function le(e){var t="_"+e;return function(e){return h(e)?(this._observerField(t,e),this.geometryChange(),this):this[t]}}var ce=function(e,t){void 0===t&&(t=["geometry"]);var i=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t}(e);return function(e,t){for(var n=0;nn||i&&t===n)&&(n+=360),{startAngle:t,endAngle:n}},t.prototype._intervalCurvePoints=function(e,t,n){var i=this.pointAt(e),r=this.pointAt(t),o=this._derivativeAt(e),a=this._derivativeAt(t),s=(z(t)-z(e))/3,l=new Q(i.x+s*o.x,i.y+s*o.y),c=new Q(r.x-s*a.x,r.y-s*a.y);return n&&(i.transform(n),r.transform(n),l.transform(n),c.transform(n)),{p1:i,cp1:l,cp2:c,p2:r}},t.prototype._derivativeAt=function(e){var t=z(e);return new Q(-this.radiusX*Math.sin(t),this.radiusY*Math.cos(t))},t.prototype.containsPoint=function(e){var t,n=this._arcInterval(),i=n.endAngle-n.startAngle,r=this,o=r.center,a=r.radiusX,s=r.radiusY,l=o.distanceTo(e),c=Math.atan2(e.y-o.y,e.x-o.x),d=a*s/Math.sqrt(fe(a,2)*fe(Math.sin(c),2)+fe(s,2)*fe(Math.cos(c),2)),u=this.pointAt(this.startAngle).round(ue),h=this.pointAt(this.endAngle).round(ue),p=function(e,t,n,i){var r=t.x-e.x,o=i.x-n.x,a=t.y-e.y,s=i.y-n.y,l=e.x-n.x,c=e.y-n.y,d=r*s-o*a,u=(r*c-a*l)/d,h=(o*c-s*l)/d;if(u>=0&&u<=1&&h>=0&&h<=1)return new Q(e.x+h*r,e.y+h*a)}(o,e.round(ue),u,h);if(i<180)t=p&&pe(o.distanceTo(p),l)&&pe(l,d);else{var f=ge(o.x,o.y,a,s,e.x,e.y);360!==f&&(f=(360+f)%360);var m=n.startAngle<=f&&f<=n.endAngle;t=m&&pe(l,d)||!m&&(!p||p.equals(e))}return t},t.prototype._isOnPath=function(e,t){var n=this._arcInterval(),i=this.center,r=ge(i.x,i.y,this.radiusX,this.radiusY,e.x,e.y);return 360!==r&&(r=(360+r)%360),n.startAngle<=r&&r<=n.endAngle&&this.pointAt(r).distanceTo(e)<=t},t.fromPoints=function(e,n,i,r,o,a,s){var l=function(e){var t=e.x1,n=e.y1,i=e.x2,r=e.y2,o=e.rx,a=e.ry,s=e.largeArc,l=e.swipe,c=e.rotation;void 0===c&&(c=0);var d=z(c),u=Math.cos(d),h=Math.sin(d),p=u*(t-i)/2+h*(n-r)/2,f=-h*(t-i)/2+u*(n-r)/2,m=s!==l?1:-1,g=Math.pow(p,2),v=Math.pow(f,2),b=Math.pow(o,2),w=Math.pow(a,2),y=g/b+v/w;y>1&&(o*=y=Math.sqrt(g/b+v/w),b=Math.pow(o,2),a*=y,w=Math.pow(a,2));var k=m*Math.sqrt((b*w-b*v-w*g)/(b*v+w*g));isNaN(k)&&(k=0);var x=k*(o*f)/a,C=a*p*-k/o,S=u*x-h*C+(t+i)/2,T=h*x+u*C+(n+r)/2,D=(p-x)/o,I=(f-C)/a,E=-(p+x)/o,A=-(f+C)/a,H=(I>=0?1:-1)*_(Math.acos(D/Math.sqrt(D*D+I*I))),R=M((D*E+I*A)/(Math.sqrt(D*D+I*I)*Math.sqrt(E*E+A*A)),10),F=(D*A-I*E>=0?1:-1)*_(Math.acos(R));!l&&F>0&&(F-=360);l&&F<0&&(F+=360);var P=H+F,B=P>=0?1:-1;return P=Math.abs(P)%360*B,{center:new Q(S,T),startAngle:H,endAngle:P,radiusX:o,radiusY:a,xRotation:c}}({x1:e.x,y1:e.y,x2:n.x,y2:n.y,rx:i,ry:r,largeArc:o,swipe:a,rotation:s});return new t(l.center,{startAngle:l.startAngle,endAngle:l.endAngle,radiusX:l.radiusX,radiusY:l.radiusY,xRotation:l.xRotation,anticlockwise:0===a})},t}(Y(l,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]));function ge(e,t,n,i,r,o){var a=M((r-e)/n,3),s=M((o-t)/i,3);return M(_(Math.atan2(s,a)))}function ve(e,t){for(var n=e;n0?n.x-r:o-n.x)/(o-r)+a-n.y>=0}return i?1:0}function Re(e){var t="_"+e;return function(e){return h(e)?(this._observerField(t,Q.create(e)),this.geometryChange(),this):this[t]}}var Fe=function(e,t){var i=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t}(e);return function(e,t){for(var n=0;n1)&&(d=0);var u=Math.min(Math.max(l,c),1);return(u>1||u<0)&&(u=1),{min:d,max:u}},t.prototype._intersectionsTo=function(e,t){var n;return n=this.controlOut()&&e.controlIn()?function(e,t,n){for(var i,r=Ie(e,"x"),o=Ee(r[0],r[1],r[2],r[3]-t.x),a=0,s=0;st.y)&&((0===o[s]||1===o[s])&&n.bottomRight().x>t.x||0=r||(i=!0)}return i}(e,t,n)&&(r=Oe,o=Ve),l[r])i=0;else i=.01*(n[o]t[i]&&t[i]>e[i]||n[i]2&&(s="l",c.splice(0,2))),Ze[s])Ze[s](e,{parameters:c,position:i,isRelative:l,previousCommand:n}),a&&"z"===a.toLowerCase()&&e.close();else if("m"!==s)throw new Error("Error while parsing SVG path. Unsupported command: "+s);n=s})),e}function at(e,t,n){for(var i,r=0;r0){var i=S(this.segments),r=new Pe(n,t);this.suspend(),i.controlOut(e),this.resume(),this.segments.push(r)}return this},t.prototype.arc=function(e,t,n,i,r){if(this.segments.length>0){var o=S(this.segments).anchor(),a=z(e),s=new Q(o.x-n*Math.cos(a),o.y-i*Math.sin(a)),l=new me(s,{startAngle:e,endAngle:t,radiusX:n,radiusY:i,anticlockwise:r});this._addArcSegments(l)}return this},t.prototype.arcTo=function(e,t,n,i,r,o){if(this.segments.length>0){var a=S(this.segments).anchor(),s=me.fromPoints(a,Q.create(e),t,n,i,r,o);this._addArcSegments(s)}return this},t.prototype._addArcSegments=function(e){this.suspend();for(var t=e.curvePoints(),n=1;n0){for(var s,l=[],c=(i=e,function(){for(var e=arguments,t=[],n=arguments.length;n--;)t[n]=e[n];return t.map((function(e){return e.toString(i)})).join(lt)}),d=1;d1){if(n[0]._isOnPathTo(n[1],e,r,"start"))return!0;for(var o=2;o<=i-2;o++)if(n[o-1]._isOnPathTo(n[o],e,r))return!0;if(n[i-2]._isOnPathTo(n[i-1],e,r,"end"))return!0}return!1},t.prototype._bbox=function(e){var t,n=this.segments,i=n.length;if(1===i){var r=n[0].anchor().transformCopy(e);t=new Z(r,X.ZERO)}else if(i>0)for(var o=1;o2&&(Ne(0,n),r=n.length),r<2||2===r&&n[0].equals(n[1]))return i;var o,a,s=n[0],l=n[1],c=n[2];for(i.push(new Pe(s));s.equals(n[r-1]);)t=!0,n.pop(),r--;if(2===r){var d=qe(s,l,Ve,Oe);return S(i).controlOut(Ke(d,s,l,Ve,Oe)),i.push(new Pe(l,Ye(d,s,l,Ve,Oe))),i}if(t){var u=Ue(s=n[r-1],l=n[0],c=n[1]);o=u[1],a=u[0]}else o=Ke(qe(s,l,Ve,Oe),s,l,Ve,Oe);for(var h=o,p=0;p<=r-3;p++)if(Ne(p,n),p+3<=(r=n.length)){var f=Ue(s=n[p],l=n[p+1],c=n[p+2]);S(i).controlOut(h),h=f[1];var m=f[0];i.push(new Pe(l,m))}if(t){var g=Ue(s=n[r-2],l=n[r-1],c=n[0]);S(i).controlOut(h),i.push(new Pe(l,g[0])),S(i).controlOut(g[1]),i.push(new Pe(c,a))}else{var v=qe(l,c,Ve,Oe);S(i).controlOut(h),i.push(new Pe(c,Ye(v,l,c,Ve,Oe)))}return i}(e),r=new t(n);return r.segments.push.apply(r.segments,i),r}},t.fromArc=function(e,n){var i=new t(n),r=e.startAngle,o=e.pointAt(r);return i.moveTo(o.x,o.y),i.arc(r,e.endAngle,e.radiusX,e.radiusY,e.anticlockwise),i},Object.defineProperties(t.prototype,i),t}(oe(se(te))),dt=function(e){function t(t){e.call(this,t),this.paths=new Se,this.paths.addObserver(this),h(this.options.stroke)||this.stroke("#000")}n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor;var i={nodeType:{}};return t.parse=function(e,n){return ot(new t(n),e)},t.prototype.toString=function(e){var t=this.paths,n="";if(t.length>0){for(var i=[],r=0;r0&&S(this.paths).lineTo(e,t),this},t.prototype.curveTo=function(e,t,n){return this.paths.length>0&&S(this.paths).curveTo(e,t,n),this},t.prototype.arc=function(e,t,n,i,r){return this.paths.length>0&&S(this.paths).arc(e,t,n,i,r),this},t.prototype.arcTo=function(e,t,n,i,r,o){return this.paths.length>0&&S(this.paths).arcTo(e,t,n,i,r,o),this},t.prototype.close=function(){return this.paths.length>0&&S(this.paths).close(),this},t.prototype._bbox=function(e){return at(this.paths,!0,e)},t.prototype.rawBBox=function(){return at(this.paths,!1)},t.prototype._containsPoint=function(e){for(var t=this.paths,n=0;n0){e.moveTo(t[0].x,t[0].y);for(var n=1;n=0&&(this.children.splice(t,1),e.parent=null,this.childrenChange("remove",[e],t)),this},t.prototype.removeAt=function(e){if(0<=e&&e=0;n--)t(e[n],n)},kt=function(t){function i(n,i){t.call(this,e.extend({},bt,i)),this._rect=n,this._fieldMap={}}return n(i,t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.fn=i.prototype,i.fn.init=i.fn.constructor,i.prototype.rect=function(e){return e?(this._rect=e,this):this._rect},i.prototype._initMap=function(){var e=this.options,t=this._fieldMap;"horizontal"===e.orientation?(t.sizeField="width",t.groupsSizeField="height",t.groupAxis="x",t.groupsAxis="y"):(t.sizeField="height",t.groupsSizeField="width",t.groupAxis="y",t.groupsAxis="x"),e.reverse?(this.forEach=yt,this.justifyAlign=_t):(this.forEach=wt,this.justifyAlign=vt)},i.prototype.reflow=function(){if(this._rect&&0!==this.children.length){this._initMap(),this.options.transform&&this.transform(null);for(var e,t,n,i=this.options,r=this._rect,o=this._initGroups(),a=o.groups,s=o.groupsSize,l=this._fieldMap,c=l.sizeField,d=l.groupsSizeField,u=l.groupAxis,h=l.groupsAxis,p=new Q,f=new Q,m=new X,g=vt(s,r,i.alignContent,h,d),v=function(r,o){var a=t.elements[o];f[u]=e,f[h]=vt(r.size[d],n,i.alignItems,h,d),gt(f,r,a),e+=r.size[c]+i.spacing},_=0;_r.size[c]){var b=r.size[c]/n.size[c],w=n.topLeft().scale(b,b),y=vt(n.size[d]*b,r,i.alignContent,h,d),k=ee();"x"===u?k.translate(r.origin.x-w.x,y-w.y):k.translate(y-w.x,r.origin.y-w.y),k.scale(b,b),this.transform(k)}}},i.prototype._initGroups=function(){for(var e=this,t=this.options,n=this.children,i=t.lineSpacing,r=t.wrap,o=t.spacing,a=this._fieldMap.sizeField,s=this._newGroup(),l=[],c=function(){l.push(s),d+=s.lineSize+i},d=-i,u=0;ue._rect.size[a]?0===s.bboxes.length?(e._addToGroup(s,p,h),c(),s=e._newGroup()):(c(),s=e._newGroup(),e._addToGroup(s,p,h)):e._addToGroup(s,p,h))}return s.bboxes.length&&c(),{groups:l,groupsSize:d}},i.prototype._addToGroup=function(e,t,n){e.size+=t.size[this._fieldMap.sizeField]+this.options.spacing,e.lineSize=Math.max(t.size[this._fieldMap.groupsSizeField],e.lineSize),e.bboxes.push(t),e.elements.push(n)},i.prototype._newGroup=function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}},i}(mt),xt=function(e){function t(t,n){void 0===t&&(t=new Z),void 0===n&&(n={}),e.call(this,n),this.geometry(t),h(this.options.stroke)||this.stroke("#000")}n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor;var i={nodeType:{}};return i.nodeType.get=function(){return"Rect"},t.prototype._bbox=function(e){return this._geometry.bbox(e)},t.prototype.rawBBox=function(){return this._geometry.bbox()},t.prototype._containsPoint=function(e){return this._geometry.containsPoint(e)},t.prototype._isOnPath=function(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)},Object.defineProperties(t.prototype,i),t}(oe(se(ce(te))));function Ct(e,t,n,i,r){for(var o=0;o1)for(var r=new Q,o=e[0].bbox,a=1;ao?s.length?(a.push(s),s=[],c(),l=u):(c(),a.push(s),s=[],l=0):(c(),l+=u)}return s.length&&a.push(s),a}(e,t,r),a=t.origin.clone(),s=[],l=0;l1?new t(e[0],e[1],e[2]):new t(e.offset,e.color,e.opacity)},t}((Mt=["offset","color","opacity"],Et=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t}(l),function(e,t){for(var n=0;n=0&&this.stops.splice(t,1)},t.prototype.optionsChange=function(e){this.trigger("optionsChange",{field:"gradient"+(e?"."+e.field:""),value:this})},t.prototype.geometryChange=function(){this.optionsChange()},Object.defineProperties(t.prototype,i),t}(l),Rt=function(e){function t(t){void 0===t&&(t={}),e.call(this,t),this.start(t.start||new Q),this.end(t.end||new Q(1,0))}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t}(Fe(Ht,["start","end"])),Ft=function(e){function t(t){void 0===t&&(t={}),e.call(this,t),this.center(t.center||new Q),this._radius=h(t.radius)?t.radius:1,this._fallbackFill=t.fallbackFill}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.radius=function(e){return h(e)?(this._radius=e,this.geometryChange(),this):this._radius},t.prototype.fallbackFill=function(e){return h(e)?(this._fallbackFill=e,this.optionsChange(),this):this._fallbackFill},t}(Fe(Ht,["center"]));var Pt,Bt,Lt={swing:function(e){return.5-Math.cos(e*Math.PI)/2},linear:function(e){return e},easeOutElastic:function(e,t,n,i){var r=1.70158,o=0,a=i;return 0===e?n:1===e?n+i:(o||(o=.5),a0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this.currentSize(t),this._resize(t,e),this.trigger("resize",t))},i.prototype.size=function(e){if(!e)return this.getSize();this.setSize(e)},i.prototype.suspendTracking=function(){this._suspendedTracking=!0},i.prototype.resumeTracking=function(){this._suspendedTracking=!1},i.prototype._enableTracking=function(){},i.prototype._resize=function(){},i.prototype._handler=function(e){var t=this;return function(n){var i=t.eventTarget(n);i&&!t._suspendedTracking&&t.trigger(e,{element:i,originalEvent:n,type:e})}},i.prototype._elementOffset=function(){var e=this.element,t=L(e),n=H(e),i=n.left,r=n.top;return{left:i+t.left,top:r+t.top}},i.prototype._surfacePoint=function(e){var t=this._elementOffset(),n=k(e),i=n.x-t.left,r=n.y-t.top,o=W(this.element).invert();return new Q(i,r).transform(o)},i}(kendo.Observable);function qt(e,t){return h(t)&&null!==t?" "+e+'="'+t+'" ':""}function Gt(e){for(var t="",n=0;n0&&a.load(o);var s=n.element;s&&a.attachTo(s,t)}},t.prototype.root=function(){for(var e=this;e.parent;)e=e.parent;return e},t.prototype.attachTo=function(e,t){var n=document.createElement("div");rn(n,""+this.render()+"");var i=n.firstChild.firstChild;i&&(h(t)?e.insertBefore(i,e.childNodes[t]||null):e.appendChild(i),this.setElement(i))},t.prototype.setElement=function(e){this.element&&(this.element._kendoNode=null),this.element=e,this.element._kendoNode=this;for(var t=this.childNodes,n=0;n"},t.prototype.renderOffset=function(){return qt("offset",this.srcElement.offset())},t.prototype.mapStyle=function(){var e=this.srcElement;return[["stop-color",e.color()],["stop-opacity",e.opacity()]]},t.prototype.optionsChange=function(e){"offset"===e.field?this.attr(e.field,e.value):"color"!==e.field&&"opacity"!==e.field||this.css("stop-"+e.field,e.value)},t}(ln),dn=function(e){function t(t){e.call(this,t),this.id=t.id,this.loadStops()}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.loadStops=function(){for(var e=this.srcElement.stops,t=this.element,n=0;n"+this.renderChildren()+""},t.prototype.mapCoordinates=function(){var e=this.srcElement,t=e.start(),n=e.end();return[["x1",t.x],["y1",t.y],["x2",n.x],["y2",n.y],this.mapSpace()]},t}(dn),hn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.template=function(){return""+this.renderChildren()+""},t.prototype.mapCoordinates=function(){var e=this.srcElement,t=e.center(),n=e.radius();return[["cx",t.x],["cy",t.y],["r",n],this.mapSpace()]},t}(dn),pn=function(e){function t(t){e.call(this),this.srcElement=t,this.id=t.id,this.load([t])}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.template=function(){return""+this.renderChildren()+""},t}(ln),fn=function(e){function t(){e.call(this),this.definitionMap={}}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.attachTo=function(e){this.element=e},t.prototype.template=function(){return""+this.renderChildren()+""},t.prototype.definitionChange=function(e){var t=e.definitions,n=e.action;"add"===n?this.addDefinitions(t):"remove"===n&&this.removeDefinitions(t)},t.prototype.createDefinition=function(e,t){var n;return"clip"===e?n=pn:"fill"===e&&(t instanceof Rt?n=un:t instanceof Ft&&(n=hn)),new n(t)},t.prototype.addDefinitions=function(e){for(var t in e)this.addDefinition(t,e[t])},t.prototype.addDefinition=function(e,t){var n=this.element,i=this.definitionMap,r=t.id,o=i[r];if(o)o.count++;else{var a=this.createDefinition(e,t);i[r]={element:a,count:1},this.append(a),n&&a.attachTo(this.element)}},t.prototype.removeDefinitions=function(e){for(var t in e)this.removeDefinition(e[t])},t.prototype.removeDefinition=function(e){var t=this.definitionMap,n=e.id,i=t[n];i&&(i.count--,0===i.count&&(this.remove(this.childNodes.indexOf(i.element),1),delete t[n]))},t}(ln),mn=function(e){function t(t){e.call(this),this.options=t,this.defs=new fn}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.attachTo=function(e){this.element=e,this.defs.attachTo(e.firstElementChild)},t.prototype.clear=function(){Wt.prototype.clear.call(this)},t.prototype.template=function(){return this.defs.render()+this.renderChildren()},t.prototype.definitionChange=function(e){this.defs.definitionChange(e)},t}(ln),gn={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]},vn="solid",_n="butt",bn={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},wn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.geometryChange=function(){this.attr("d",this.renderData()),this.invalidate()},t.prototype.optionsChange=function(t){switch(t.field){case"fill":t.value?this.allAttr(this.mapFill(t.value)):this.removeAttr("fill");break;case"fill.color":this.allAttr(this.mapFill({color:t.value}));break;case"stroke":t.value?this.allAttr(this.mapStroke(t.value)):this.removeAttr("stroke");break;case"transform":this.transformChange(t.value);break;default:var n=bn[t.field];n&&this.attr(n,t.value)}e.prototype.optionsChange.call(this,t)},t.prototype.content=function(){this.element&&(this.element.textContent=this.srcElement.content())},t.prototype.renderData=function(){return this.srcElement.toString(3)||void 0},t.prototype.mapStroke=function(e){var t=[];return e&&!C(e.color)?(t.push(["stroke",e.color]),t.push(["stroke-width",e.width]),t.push(["stroke-linecap",this.renderLinecap(e)]),t.push(["stroke-linejoin",e.lineJoin]),h(e.opacity)&&t.push(["stroke-opacity",e.opacity]),h(e.dashType)&&t.push(["stroke-dasharray",this.renderDashType(e)])):t.push(["stroke",Qt]),t},t.prototype.renderStroke=function(){return Gt(this.mapStroke(this.srcElement.options.stroke))},t.prototype.renderDashType=function(e){var t=e.dashType,n=e.width;if(void 0===n&&(n=1),t&&t!==vn){for(var i=gn[t.toLowerCase()],r=[],o=0;o"},t}(ln),yn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.renderData=function(){return this.srcElement.toPath().toString(3)},t}(wn),kn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.geometryChange=function(){var e=this.center();this.attr("cx",e.x),this.attr("cy",e.y),this.attr("r",this.radius()),this.invalidate()},t.prototype.center=function(){return this.srcElement.geometry().center},t.prototype.radius=function(){return this.srcElement.geometry().radius},t.prototype.template=function(){return""},t}(wn),xn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.template=function(){return""+this.renderChildren()+""},t.prototype.optionsChange=function(t){"transform"===t.field&&this.transformChange(t.value),e.prototype.optionsChange.call(this,t)},t}(ln),Cn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.geometryChange=function(){this.allAttr(this.mapPosition()),this.invalidate()},t.prototype.optionsChange=function(t){"src"===t.field&&this.allAttr(this.mapSource()),e.prototype.optionsChange.call(this,t)},t.prototype.mapPosition=function(){var e=this.srcElement.rect(),t=e.topLeft();return[["x",t.x],["y",t.y],["width",e.width()+"px"],["height",e.height()+"px"]]},t.prototype.renderPosition=function(){return Gt(this.mapPosition())},t.prototype.mapSource=function(e){var t=this.srcElement.src();return e&&(t=kendo.htmlEncode(t)),[["xlink:href",t]]},t.prototype.renderSource=function(){return Gt(this.mapSource(!0))},t.prototype.template=function(){return""},t}(wn),Sn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.renderData=function(){return this.srcElement.toString(3)||"undefined"},t}(wn),Tn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.geometryChange=function(){var e=this.srcElement.geometry();this.attr("x",e.origin.x),this.attr("y",e.origin.y),this.attr("width",e.size.width),this.attr("height",e.size.height),this.attr("rx",e.cornerRadius[0]),this.attr("ry",e.cornerRadius[1]),this.invalidate()},t.prototype.size=function(){return this.srcElement.geometry().size},t.prototype.origin=function(){return this.srcElement.geometry().origin},t.prototype.rx=function(){return this.srcElement.geometry().cornerRadius[0]},t.prototype.ry=function(){return this.srcElement.geometry().cornerRadius[1]},t.prototype.template=function(){return""},t}(wn),Dn=/&(?:[a-zA-Z]+|#\d+);/g;function In(e){if(!e||"string"!=typeof e||!Dn.test(e))return e;var t=In._element;return Dn.lastIndex=0,e.replace(Dn,(function(e){return t.innerHTML=e,t.textContent||t.innerText}))}"undefined"!=typeof document&&(In._element=document.createElement("span"));var zn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.geometryChange=function(){var e=this.pos();this.attr("x",e.x),this.attr("y",e.y),this.invalidate()},t.prototype.optionsChange=function(t){"font"===t.field?(this.attr("style",Kt(this.mapStyle())),this.geometryChange()):"content"===t.field&&e.prototype.content.call(this,this.srcElement.content()),e.prototype.optionsChange.call(this,t)},t.prototype.mapStyle=function(t){var n=e.prototype.mapStyle.call(this,t),i=this.srcElement.options.font;return t&&(i=kendo.htmlEncode(i)),n.push(["font",i],["white-space","pre"]),n},t.prototype.pos=function(){var e=this.srcElement.position(),t=this.srcElement.measure();return e.clone().setY(e.y+t.baseline)},t.prototype.renderContent=function(){var e=this.srcElement.content();return e=In(e),e=kendo.htmlEncode(e),r.normalizeText(e)},t.prototype.renderTextAnchor=function(){var e;return!(this.options||{}).rtl||o.msie||o.edge||(e="end"),qt("text-anchor",e)},t.prototype.template=function(){return""+this.renderContent()+""},t}(wn);Yt.Arc=yn,Yt.Circle=kn,Yt.Group=xn,Yt.Image=Cn,Yt.MultiPath=Sn,Yt.Path=wn,Yt.Rect=Tn,Yt.Text=zn;var Mn=function(t){function i(n,i){t.call(this,n,i),this._root=new mn(e.extend({rtl:"rtl"===R(n,"direction").direction},this.options)),rn(this.element,this._template("")),this._rootElement=this.element.firstElementChild,this._rootElement.style.width="100%",this._rootElement.style.height="100%",this._rootElement.style.overflow="hidden",function(e){var t;try{t=e.getScreenCTM?e.getScreenCTM():null}catch(e){}if(t){var n=-t.e%1,i=-t.f%1,r=e.style;0===n&&0===i||(r.left=n+"px",r.top=i+"px")}}(this._rootElement),this._root.attachTo(this._rootElement),A(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()}n(i,t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.fn=i.prototype,i.fn.init=i.fn.constructor;var r={type:{}};return r.type.get=function(){return"svg"},i.prototype.destroy=function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,B(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),t.prototype.destroy.call(this)},i.prototype.translate=function(e){var t=Math.round(e.x)+" "+Math.round(e.y)+" "+this._size.width+" "+this._size.height;this._offset=e,this._rootElement.setAttribute("viewBox",t)},i.prototype.draw=function(e){t.prototype.draw.call(this,e),this._root.load([e])},i.prototype.clear=function(){t.prototype.clear.call(this),this._root.clear()},i.prototype.svg=function(){return""+this._template()},i.prototype.exportVisual=function(){var e=this._visual,t=this._offset;if(t){var n=new mt;n.children.push(e),n.transform(ee().translate(-t.x,-t.y)),e=n}return e},i.prototype._resize=function(){this._offset&&this.translate(this._offset)},i.prototype._template=function(e){return""+this._root.render()+""},Object.defineProperties(i.prototype,r),i}(jt),En={};function An(e,t){var n=t.segments;if(0!==n.length){var i=n[0],r=i.anchor();e.moveTo(r.x,r.y);for(var o=1;o0&&a.load(o,t,n),h(t)?this.insertAt(a,t):this.append(a)}},t.prototype.load=function(e,t,n){this.loadElements(e,t,n),this.invalidate()},t.prototype.setOpacity=function(e){if(this.srcElement){var t=this.srcElement.opacity();h(t)&&this.globalAlpha(e,t)}},t.prototype.globalAlpha=function(e,t){var n=t;n&&e.globalAlpha&&(n*=e.globalAlpha),e.globalAlpha=n},t.prototype.visible=function(){var e=this.srcElement;return!e||e&&!1!==e.options.visible},t}(Wt),Rn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.renderTo=function(e){if(this.visible()){e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e);for(var t=this.childNodes,n=0;n0;)(t=e.pop()).addObserver(this),"Group"===t.nodeType?c(e,t.children):this._insertShape(t)},t.prototype._insertShape=function(e){var t=e.bbox();if(t){var n=this.getSectors(t),i=n[0][0],r=n[1][0];if(this.inRoot(n))this.root.insert(e,t);else{var o=this.rootMap;o[i]||(o[i]={}),o[i][r]||(o[i][r]=new Bn(new Z([i*Ln,r*Ln],[Ln,Ln]))),o[i][r].insert(e,t)}}},t.prototype.remove=function(e){if(e.removeObserver(this),"Group"===e.nodeType)for(var t=e.children,n=0;n1||e[1].length>1},t.prototype.getSectors=function(e){for(var t=e.bottomRight(),n=Math.floor(t.x/Ln),i=Math.floor(t.y/Ln),r=[[],[]],o=Math.floor(e.origin.x/Ln);o<=n;o++)r[0].push(o);for(var a=Math.floor(e.origin.y/Ln);a<=i;a++)r[1].push(a);return r},t}(i);function On(e,t){return e._zIndext._zIndex?-1:0}var Nn=function(e){e.bind("mouseenter",this._mouseenter.bind(this)),e.bind("mouseleave",this._mouseleave.bind(this)),this.element=e.element};Nn.prototype.clear=function(){this._resetCursor()},Nn.prototype.destroy=function(){this._resetCursor(),delete this.element},Nn.prototype._mouseenter=function(e){var t=this._shapeCursor(e);t?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(t)):this._resetCursor()},Nn.prototype._mouseleave=function(){this._resetCursor()},Nn.prototype._shapeCursor=function(e){for(var t=e.element;t&&!h(t.options.cursor);)t=t.parent;if(t)return t.options.cursor},Nn.prototype._getCursor=function(){if(this.element)return this.element.style.cursor},Nn.prototype._setCursor=function(e){this.element&&(this.element.style.cursor=e,this._current=e)},Nn.prototype._resetCursor=function(){this._current&&(this._setCursor(this._defaultCursor||""),delete this._current)};var Wn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.renderTo=function(e){e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),this.renderPoints(e,this.srcElement),this.setLineDash(e),this.setLineCap(e),this.setLineJoin(e),this.setFill(e),this.setStroke(e),e.restore()},t.prototype.setFill=function(e){var t=this.srcElement.options.fill,n=!1;return t&&("Gradient"===t.nodeType?(this.setGradientFill(e,t),n=!0):C(t.color)||(e.fillStyle=t.color,e.save(),this.globalAlpha(e,t.opacity),e.fill(),e.restore(),n=!0)),n},t.prototype.setGradientFill=function(e,t){var n,i=this.srcElement.rawBBox();if(t instanceof Rt){var r=t.start(),o=t.end();n=e.createLinearGradient(r.x,r.y,o.x,o.y)}else if(t instanceof Ft){var a=t.center();n=e.createRadialGradient(a.x,a.y,0,a.x,a.y,t.radius())}!function(e,t){for(var n=0;n0)return e.strokeStyle=t.color,e.lineWidth=E(t.width,1),e.save(),this.globalAlpha(e,t.opacity),e.stroke(),e.restore(),!0},t.prototype.dashType=function(){var e=this.srcElement.options.stroke;if(e&&e.dashType)return e.dashType.toLowerCase()},t.prototype.setLineDash=function(e){var t=this.dashType();if(t&&t!==vn){var n=gn[t];e.setLineDash?e.setLineDash(n):(e.mozDash=n,e.webkitLineDash=n)}},t.prototype.setLineCap=function(e){var t=this.dashType(),n=this.srcElement.options.stroke;t&&t!==vn?e.lineCap=_n:n&&n.lineCap&&(e.lineCap=n.lineCap)},t.prototype.setLineJoin=function(e){var t=this.srcElement.options.stroke;t&&t.lineJoin&&(e.lineJoin=t.lineJoin)},t.prototype.renderPoints=function(e,t){An(e,t)},t}(Hn),Un=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.renderPoints=function(e){An(e,this.srcElement.toPath())},t}(Wn),jn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.renderPoints=function(e){var t=this.srcElement.geometry(),n=t.center,i=t.radius;e.arc(n.x,n.y,i,0,2*Math.PI)},t}(Wn),qn=function(e){function t(t,n){e.call(this,t),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=a();var i=this.img=new Image,r=t.src();n&&!/^data:/i.test(r)&&(i.crossOrigin=n),r&&(i.src=r),i.complete?this.onLoad():(i.onload=this.onLoad,i.onerror=this.onError)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.renderTo=function(e){"resolved"===this.loading.state()&&(e.save(),this.setTransform(e),this.setClip(e),this.drawImage(e),e.restore())},t.prototype.optionsChange=function(t){"src"===t.field?(this.loading=a(),this.img.src=this.srcElement.src()):e.prototype.optionsChange.call(this,t)},t.prototype.onLoad=function(){this.loading.resolve(),this.invalidate()},t.prototype.onError=function(){this.loading.reject(new Error("Unable to load image '"+this.img.src+"'. Check for connectivity and verify CORS headers."))},t.prototype.drawImage=function(e){var t=this.srcElement.rect(),n=t.topLeft();e.drawImage(this.img,n.x,n.y,t.width(),t.height())},t}(Wn),Gn=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.renderPoints=function(e){for(var t=this.srcElement.paths,n=0;n"},t.prototype._enableTracking=function(){this._searchTree=new Vn,this._cursor=new Nn(this),e.prototype._enableTracking.call(this)},t.prototype._trackMouse=function(e){if(!this._suspendedTracking){var t=this.eventTarget(e);if("click"!==e.type){var n=this._currentShape;n&&n!==t&&this.trigger("mouseleave",{element:n,originalEvent:e,type:"mouseleave"}),t&&n!==t&&this.trigger("mouseenter",{element:t,originalEvent:e,type:"mouseenter"}),this.trigger("mousemove",{element:t,originalEvent:e,type:"mousemove"}),this._currentShape=t}else t&&this.trigger("click",{element:t,originalEvent:e,type:"click"})}},Object.defineProperties(t.prototype,i),t}(jt),Zn=function(){return"undefined"!=typeof document},Jn=function(e){function t(){e.call(this),this._items=[{name:"svg",type:Mn},{name:"canvas",type:Xn}]}n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor;var i={support:{},current:{}};return i.support.get=function(){return Qn||(Qn={canvas:Zn()&&document.createElement("canvas").getContext,svg:Zn()&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}),Qn},i.current.get=function(){return $n||($n=new t),$n},t.prototype.create=function(e,t){var n=this._items,i=n[0];if(t&&t.type)for(var r=t.type.toLowerCase(),o=0;o"+t.render()+"";return t.destroy(),a}var ni={Surface:Mn,RootNode:mn,Node:ln,GroupNode:xn,ArcNode:yn,CircleNode:kn,RectNode:Tn,ImageNode:Cn,TextNode:zn,PathNode:wn,MultiPathNode:Sn,DefinitionNode:fn,ClipNode:pn,GradientStopNode:cn,LinearGradientNode:un,RadialGradientNode:hn,exportGroup:ti},ii={Surface:Xn,RootNode:Fn,Node:Hn,GroupNode:Rn,ArcNode:Un,CircleNode:jn,RectNode:Kn,ImageNode:qn,TextNode:Yn,PathNode:Wn,MultiPathNode:Gn};var ri=o||{};function oi(e){return Array.prototype.slice.call(e)}var ai="KENDO-PSEUDO-ELEMENT",si={},li={};li._root=li;var ci=!!("undefined"!=typeof window)&&(ri.msie||ri.edge),di=function(e){function t(t,n,i){e.call(this,t,n.getOrigin(),i),this._pdfRect=n}return n(t,e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.fn=t.prototype,t.fn.init=t.fn.constructor,t.prototype.rect=function(){return this._pdfRect},t.prototype.rawBBox=function(){return this._pdfRect},t}(ht);function ui(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}var hi,pi="undefined"!=typeof Element&&Element.prototype&&((hi=Element.prototype).matches?function(e,t){return e.matches(t)}:hi.webkitMatchesSelector?function(e,t){return e.webkitMatchesSelector(t)}:hi.mozMatchesSelector?function(e,t){return e.mozMatchesSelector(t)}:hi.msMatchesSelector?function(e,t){return e.msMatchesSelector(t)}:function(e){return-1!==[].indexOf.call(document.querySelectorAll(e),this)});function fi(e,t){if(e.closest)return e.closest(t);for(;e&&!/^\[object (?:HTML)?Document\]$/.test(String(e));){if(1==e.nodeType&&pi(e,t))return e;e=e.parentNode}}var mi=function(e){return e?function t(n){var i=n.cloneNode(!1);if(1==n.nodeType){var r,o=e(n),a=e(i),s=o.data();for(r in s)a.data(r,s[r]);for(/^canvas$/i.test(n.tagName)?i.getContext("2d").drawImage(n,0,0):/^(?:input|select|textarea|option)$/i.test(n.tagName)&&(i.removeAttribute("id"),i.removeAttribute("name"),/^textarea$/i.test(n.tagName)||(i.value=n.value),i.checked=n.checked,i.selected=n.selected),r=n.firstChild;r;r=r.nextSibling)i.appendChild(t(r))}return i}:function(e){var t=function e(t){var n=t.cloneNode(!1);t._kendoExportVisual&&(n._kendoExportVisual=t._kendoExportVisual);for(var i=t.firstChild;i;i=i.nextSibling)n.appendChild(e(i));return n}(e),n=e.querySelectorAll("canvas");n.length&&oi(t.querySelectorAll("canvas")).forEach((function(e,t){e.getContext("2d").drawImage(n[t],0,0)}));var i=e.querySelectorAll("input, select, textarea, option");return oi(t.querySelectorAll("input, select, textarea, option")).forEach((function(e,t){e.removeAttribute("id"),e.removeAttribute("name"),/^textarea$/i.test(e.tagName)||(e.value=i[t].value),e.checked=i[t].checked,e.selected=i[t].selected})),t}}("undefined"!=typeof window&&window.kendo&&window.kendo.jQuery);var gi,vi=function(){var e=/^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\s*)\(/,t=/^([-0-9.]+%)/,n=/^([-0-9.]+px)/,i=/^(left|right|top|bottom|to|center)\W/,r=/^([-0-9.]+(deg|grad|rad|turn)|0)/,o=/^(\s+)/,a=/^(\()/,s=/^(\))/,l=/^(,)/,c=/^(url)\(/,d=/^(.*?)\)/,u={},h={};function p(h){var p,f=h;if(ki(u,f))return u[f];function m(e){!function(){var e=o.exec(h);e&&(h=h.substr(e[1].length))}();var t=e.exec(h);if(t)return h=h.substr(t[1].length),t[1]}function g(){var e,i,r=kendo.parseColor(h,!0);if(r){var o=/^#[0-9a-f]+/i.exec(h)||/^rgba?\(.*?\)/i.exec(h)||/^..*?\b/.exec(h);return h=h.substr(o[0].length),r=r.toRGB(),(e=m(n))||(i=m(t)),{color:r,length:e,percent:i}}}return(p=m(e))?p=function(e){var n,o,c,d=[],u=!1;if(m(a)){if("0"==(n=m(r))&&(n="0deg"),n?(n=function(e){var t=parseFloat(e);return/grad$/.test(e)?Math.PI*t/200:/rad$/.test(e)?t:/turn$/.test(e)?Math.PI*t*2:/deg$/.test(e)?Math.PI*t/180:void 0}(n),m(l)):("to"==(o=m(i))?o=m(i):o&&/^-/.test(e)&&(u=!0),c=m(i),m(l)),/-moz-/.test(e)&&null==n&&null==o){var p=m(t),f=m(t);u=!0,"0%"==p?o="left":"100%"==p&&(o="right"),"0%"==f?c="top":"100%"==f&&(c="bottom"),m(l)}for(;h&&!m(s);){var v=g();if(!v)break;d.push(v),m(l)}return{type:"linear",angle:n,to:o&&c?o+" "+c:o||c||null,stops:d,reverse:u}}}(p):(p=m(c))&&(p=function(){if(m(a)){var e=m(d);return e=e.replace(/^['"]+|["']+$/g,""),m(s),{type:"url",url:e}}}()),u[f]=p||{type:"none"}}return function(e){return ki(h,e)?h[e]:h[e]=_i(e).map(p)}}(),_i=(gi={},function(e,t){t||(t=/^\s*,\s*/);var n=e+t;if(ki(gi,n))return gi[n];var i,r=[],o=0,a=0,s=0,l=!1;function c(t){return i=t.exec(e.substr(a))}function d(e){return e.replace(/^\s+|\s+$/g,"")}for(;ao&&(r.push(d(e.substring(o,a))),o=a+i[0].length),a+=i[0].length):a++;return o0&&o(e,l,c,d,u[0])}}}(e,t)}}function r(e){var t=Fi(e.style,"src");if(t)return _i(t).reduce((function(e,t){var n=bi(t);return n&&e.push(n),e}),[]);var n=bi(e.cssText);return n?[n]:[]}function o(e,n,i,r,o){/^data:/i.test(o)||/^[^\/:]+:\/\//.test(o)||/^\//.test(o)||(o=String(e.href).replace(/[^\/]*$/,"")+o),n.forEach((function(e){e=e.replace(/^(['"]?)(.*?)\1$/,"$2"),i&&(e+="|bold"),r&&(e+="|italic"),t[e]=o}))}}function ki(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function xi(e,t){var n=li;for(e="_counter_"+e;n&&!ki(n,e);)n=Object.getPrototypeOf(n);n||(n=li._root),n[e]=(n[e]||0)+(null==t?1:t)}function Ci(e,t){li[e="_counter_"+e]=null==t?0:t}function Si(e,t,n){for(var i=0;i0);return t}function Ei(e,t,n){(li=Object.create(li))[e.tagName.toLowerCase()]={element:e,style:t};var i=Fi(t,"text-decoration");if(i&&"none"!=i){var r=Fi(t,"text-decoration-color");i.split(/\s+/g).forEach((function(e){if(!li[e]&&(li[e]=r,"underline"==e)){var n=Fi(t,"text-underline-offset");"auto"!=n&&(li["underline-offset"]=parseFloat(n))}}))}(function(e){function t(t){return Fi(e,t)}if("none"!=t("transform")||"static"!=t("position")||"auto"!=t("z-index")||t("opacity")<1)return!0})(t)&&(li._stackingContext={element:e,group:n})}function Ai(){li=Object.getPrototypeOf(li)}function Hi(e){if(null!=li._clipbox){var t=e.bbox(li._matrix);li._clipbox?li._clipbox=Z.intersect(li._clipbox,t):li._clipbox=t}}function Ri(e,t){return window.getComputedStyle(e,t||null)}function Fi(e,t,n){var i=e.getPropertyValue(t);return null!=i&&""!==i||(ri.webkit?i=e.getPropertyValue("-webkit-"+t):ri.mozilla?i=e.getPropertyValue("-moz-"+t):ri.opera?i=e.getPropertyValue("-o-"+t):ci&&(i=e.getPropertyValue("-ms-"+t))),arguments.length>2&&(null==i||""===i)?n:i}function Pi(e,t,n,i){e.setProperty(t,n,i),ri.webkit?e.setProperty("-webkit-"+t,n,i):ri.mozilla?e.setProperty("-moz-"+t,n,i):ri.opera?e.setProperty("-o-"+t,n,i):ci&&(e.setProperty("-ms-"+t,n,i),e[t="ms"+t.replace(/(^|-)([a-z])/g,(function(e,t,n){return t+n.toUpperCase()}))]=n)}function Bi(e,t){return t="border-"+t,{width:parseFloat(Fi(e,t+"-width")),style:Fi(e,t+"-style"),color:Di(Fi(e,t+"-color"),!0)}}function Li(e,t){var n=e.style.cssText,i=t();return e.style.cssText=n,i}function Vi(e,t){var n=Fi(e,"border-"+t+"-radius").split(/\s+/g).map(parseFloat);return 1==n.length&&n.push(n[0]),Gi({x:n[0],y:n[1]})}function Oi(e){var t=e.getBoundingClientRect();return t=Ni(t,"border-*-width",e),t=Ni(t,"padding-*",e)}function Ni(e,t,n){var i,r,o,a,s;return"string"==typeof t?(i=Ri(n),r=parseFloat(Fi(i,t.replace("*","top"))),o=parseFloat(Fi(i,t.replace("*","right"))),a=parseFloat(Fi(i,t.replace("*","bottom"))),s=parseFloat(Fi(i,t.replace("*","left")))):"number"==typeof t&&(r=o=a=s=t),{top:e.top+r,right:e.right-o,bottom:e.bottom-a,left:e.left+s,width:e.right-e.left-o-s,height:e.bottom-e.top-a-r}}function Wi(e){return 180*e/Math.PI%360}function Ui(e,t){return t=new V(t[0],t[1],t[2],t[3],t[4],t[5]),e.transform(t),t}function ji(e,t){e.clip(t)}function qi(e,t,n,i){for(var r=new me([t,n],i).curvePoints(),o=1;o0){var i=e.className;e.className+=" kendo-pdf-hide-pseudo-elements",er(e,t),e.className=i,n.forEach((function(t){e.removeChild(t)}))}else er(e,t)}else er(e,t);function r(t,i){var r=Ri(e,t),o=r.content;if(Ti(r),o&&"normal"!=o&&"none"!=o&&"0px"!=r.width){var a=e.ownerDocument.createElement(ai);a.style.cssText=Zi(r),a.textContent=Xi(e,o),e.insertBefore(a,i),n.push(a)}}}function er(e,t){var n=Ri(e),i=Bi(n,"top"),r=Bi(n,"right"),o=Bi(n,"bottom"),a=Bi(n,"left"),s=Vi(n,"top-left"),l=Vi(n,"top-right"),c=Vi(n,"bottom-left"),d=Vi(n,"bottom-right"),h=Fi(n,"direction"),p=Fi(n,"background-color");p=Di(p);var f,m,g=vi(Fi(n,"background-image")),v=_i(Fi(n,"background-repeat")),_=_i(Fi(n,"background-position")),b=_i(Fi(n,"background-origin")),w=_i(Fi(n,"background-size"));ci&&"ellipsis"==(f=n.textOverflow)&&(m=e.style.textOverflow,e.style.textOverflow="clip"),ri.msie&&ri.version<10&&(_=_i(e.currentStyle.backgroundPosition));var y,k,x,C=Ni(e.getBoundingClientRect(),"border-*-width",e);!function(){var e=Fi(n,"clip"),i=/^\s*rect\((.*)\)\s*$/.exec(e);if(i){var r=i[1].split(/[ ,]+/g),o="auto"==r[0]?C.top:parseFloat(r[0])+C.top,a="auto"==r[1]?C.right:parseFloat(r[1])+C.left,s="auto"==r[2]?C.bottom:parseFloat(r[2])+C.top,l="auto"==r[3]?C.left:parseFloat(r[3])+C.left,c=new mt,d=(new ct).moveTo(l,o).lineTo(a,o).lineTo(a,s).lineTo(l,s).close();ji(c,d),t.append(c),t=c,Hi(d)}}();var S=Fi(n,"display");if("table-row"==S)for(y=[],k=0,x=e.children;k0&&"list-item"==S&&!e.getAttribute("kendo-no-bullet")&&function(){var i=Fi(n,"list-style-type");if("none"==i)return;var r=Fi(n,"list-style-position");function o(n){Li(e,(function(){e.style.position="relative";var i=e.ownerDocument.createElement(ai);i.style.position="absolute",i.style.boxSizing="border-box","outside"==r?(i.style.width="6em",i.style.left="-6.8em",i.style.textAlign="right"):i.style.left="0px",n(i),e.insertBefore(i,e.firstChild),ar(i,t),e.removeChild(i)}))}function a(t){var n=e.parentNode.children,i=e.getAttribute("kendo-split-index");if(null!=i)return t(0|i,n.length);for(var r=0;r0&&a.y>0?(s.lineTo(a.x*Math.cos(o),n.y-a.y*Math.sin(o)),qi(s,0,n.y,{startAngle:-Wi(o),endAngle:-90,radiusX:a.x,radiusY:a.y,anticlockwise:!0})):a.x>0?s.lineTo(a.x,i).lineTo(0,i):s.lineTo(a.x,i).lineTo(a.x,0),d.append(s.close())}}function I(t,n,i,r,o,a,s){var l;if(i&&"none"!=i)if("url"==i.type){var c=si[i.url];c&&c.width>0&&c.height>0&&d(t,n,c.width,c.height,(function(e,t){e.append(new pt(i.url,t))}))}else{if("linear"!=i.type)return;d(t,n,n.width,n.height,(l=i,function(e,t){var n=t.width(),i=t.height();switch(l.type){case"linear":var r=null!=l.angle?l.angle:Math.PI;switch(l.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(i,n);break;case"top right":case"right top":r=Math.atan2(i,n);break;case"bottom left":case"left bottom":r=Math.PI+Math.atan2(i,n);break;case"bottom right":case"right bottom":r=Math.PI-Math.atan2(i,n)}l.reverse&&(r-=Math.PI),(r%=2*Math.PI)<0&&(r+=2*Math.PI);var o=Math.abs(n*Math.sin(r))+Math.abs(i*Math.cos(r)),a=Math.atan(n*Math.tan(r)/i),s=Math.sin(a),c=Math.cos(a),d=Math.abs(s)+Math.abs(c),u=d/2*s,h=d/2*c;r>Math.PI/2&&r<=3*Math.PI/2&&(u=-u,h=-h);var p=[],f=0,m=l.stops.map((function(e,t){var n=e.percent;n?n=parseFloat(n)/100:e.length?n=parseFloat(e.length)/o:0===t?n=0:t==l.stops.length-1&&(n=1);var i={color:e.color.toCssRgba(),offset:n};return null!=n?(f=n,p.forEach((function(e,t){e.stop.offset=e.left+(f-e.left)*(t+1)/(p.length+1)})),p=[]):p.push({left:f,stop:i}),i})),g=[.5-u,.5+h],v=[.5+u,.5-h];e.append(ct.fromRect(t).stroke(null).fill(new Rt({start:g,end:v,stops:m,userSpace:!1})));break;case"radial":window.console&&window.console.log&&window.console.log("Radial gradients are not yet supported in HTML renderer")}}))}function d(t,n,i,l,c){var d,u=i/l,h=n;if("content-box"==a?(h=Ni(h,"border-*-width",e),h=Ni(h,"padding-*",e)):"padding-box"==a&&(h=Ni(h,"border-*-width",e)),!/^\s*auto(\s+auto)?\s*$/.test(s))if("contain"==s)d=Math.min(h.width/i,h.height/l),i*=d,l*=d;else if("cover"==s)d=Math.max(h.width/i,h.height/l),i*=d,l*=d;else{var p=s.split(/\s+/g);i=/%$/.test(p[0])?h.width*parseFloat(p[0])/100:parseFloat(p[0]),l=1==p.length||"auto"==p[1]?i/u:/%$/.test(p[1])?h.height*parseFloat(p[1])/100:parseFloat(p[1])}var f=String(o);switch(f){case"bottom":f="50% 100%";break;case"top":f="50% 0";break;case"left":f="0 50%";break;case"right":f="100% 50%";break;case"center":f="50% 50%"}1==(f=f.split(/\s+/)).length&&(f[1]="50%"),/%$/.test(f[0])?f[0]=parseFloat(f[0])/100*(h.width-i):f[0]=parseFloat(f[0]),/%$/.test(f[1])?f[1]=parseFloat(f[1])/100*(h.height-l):f[1]=parseFloat(f[1]);var m=new Z([h.left+f[0],h.top+f[1]],[i,l]);function g(){for(;m.origin.x>n.left;)m.origin.x-=i}function v(){for(;m.origin.y>n.top;)m.origin.y-=l}function _(){for(;m.origin.x=0;)I(n,e,g[r],v[r%v.length],_[r%_.length],b[r%b.length],w[r%w.length])}(n);var m=a.width>0&&(u&&"ltr"==h||f&&"rtl"==h),y=r.width>0&&(f&&"ltr"==h||u&&"rtl"==h);if(0!==i.width||0!==a.width||0!==r.width||0!==o.width){if(i.color==r.color&&i.color==o.color&&i.color==a.color&&i.width==r.width&&i.width==o.width&&i.width==a.width&&m&&y){n=Ni(n,i.width/2);var k=Yi(e,n,i.width/2);return k.options.stroke={color:i.color,width:i.width},void t.append(k)}if(0===s.x&&0===l.x&&0===d.x&&0===c.x&&i.width<2&&a.width<2&&r.width<2&&o.width<2)return i.width>0&&t.append(new ct({stroke:{width:i.width,color:i.color}}).moveTo(n.left,n.top+i.width/2).lineTo(n.right,n.top+i.width/2)),o.width>0&&t.append(new ct({stroke:{width:o.width,color:o.color}}).moveTo(n.left,n.bottom-o.width/2).lineTo(n.right,n.bottom-o.width/2)),m&&t.append(new ct({stroke:{width:a.width,color:a.color}}).moveTo(n.left+a.width/2,n.top).lineTo(n.left+a.width/2,n.bottom)),void(y&&t.append(new ct({stroke:{width:r.width,color:r.color}}).moveTo(n.right-r.width/2,n.top).lineTo(n.right-r.width/2,n.bottom)));var x=Ki(n,s,l,d,c),C=x.tl,S=x.tr,T=x.br,z=x.bl;D(i.color,n.width,i.width,a.width,r.width,C,S,[1,0,0,1,n.left,n.top]),D(o.color,n.width,o.width,r.width,a.width,T,z,[-1,0,0,-1,n.right,n.bottom]),D(a.color,n.height,a.width,o.width,i.width,M(z),M(C),[0,-1,1,0,n.left,n.bottom]),D(r.color,n.height,r.width,i.width,o.width,M(S),M(T),[0,1,-1,0,n.right,n.top])}}function M(e){return{x:e.y,y:e.x}}}}function tr(e,t,n){var i=Oi(e),r=new Z([i.left,i.top],[i.width,i.height]),o=new pt(t,r);ji(o,Yi(e,i,"content")),n.append(o)}function nr(e,t){var n=Ri(e),i=Ri(t),r=parseFloat(Fi(n,"z-index")),o=parseFloat(Fi(i,"z-index")),a=Fi(n,"position"),s=Fi(i,"position");return isNaN(r)&&isNaN(o)?/static|absolute/.test(a)&&/static|absolute/.test(s)?0:"static"==a?-1:"static"==s?1:0:isNaN(r)?0===o?0:o>0?-1:1:isNaN(o)?0===r?0:r>0?1:-1:parseFloat(r)-parseFloat(o)}function ir(e,t){var n=e.tagName.toLowerCase();if("input"==n&&("checkbox"==e.type||"radio"==e.type))return function(e,t){var n=Fi(Ri(e),"color"),i=e.getBoundingClientRect();"checkbox"==e.type?(t.append(ct.fromRect(new Z([i.left+1,i.top+1],[i.width-2,i.height-2])).stroke(n,1)),e.checked&&t.append((new ct).stroke(n,1.2).moveTo(i.left+.22*i.width,i.top+.55*i.height).lineTo(i.left+.45*i.width,i.top+.75*i.height).lineTo(i.left+.78*i.width,i.top+.22*i.width))):(t.append(new de(new re([(i.left+i.right)/2,(i.top+i.bottom)/2],Math.min(i.width-2,i.height-2)/2)).stroke(n,1)),e.checked&&t.append(new de(new re([(i.left+i.right)/2,(i.top+i.bottom)/2],Math.min(i.width-8,i.height-8)/2)).fill(n).stroke(null)))}(e,t);var i,r=e.parentNode,o=e.ownerDocument,a=o.createElement(ai);if(a.style.cssText=Zi(Ri(e)),"input"==n&&(a.style.whiteSpace="pre"),"select"!=n&&"textarea"!=n||(a.style.overflow="auto"),"select"==n)if(e.multiple)for(var s=0;s0?e.selectedOptions[0]:e.options[e.selectedIndex]}(e),i&&(a.textContent=i.textContent);else a.textContent=e.value;r.insertBefore(a,e),a.scrollLeft=e.scrollLeft,a.scrollTop=e.scrollTop,e.style.display="none",rr(a,t),e.style.display="",r.removeChild(a)}function rr(e,t){switch(li._stackingContext.element===e&&(li._stackingContext.group=t),e.tagName.toLowerCase()){case"img":tr(e,e.src,t);break;case"svg":var n=function(e){var t=new window.XMLSerializer,n=t.serializeToString(e);if(ri.mozilla&&(!e.getAttribute("width")||!e.getAttribute("height"))){var i=(new window.DOMParser).parseFromString(n,"image/svg+xml").documentElement,r=Oi(e);i.setAttribute("width",r.width),i.setAttribute("height",r.height),n=t.serializeToString(i)}return n}(e);tr(e,"data:image/svg+xml;base64,"+y(n),t);break;case"canvas":try{tr(e,e.toDataURL("image/png"),t)}catch(e){}break;case"textarea":case"input":case"select":ir(e,t);break;default:for(var i=[],r=[],o=[],a=e.firstChild;a;a=a.nextSibling)switch(a.nodeType){case 3:/\S/.test(a.data)&&or(e,a,t);break;case 1:var s=Ri(a),l=Fi(s,"float");"static"!=Fi(s,"position")?o.push(a):"none"!=l?r.push(a):i.push(a)}D(i,nr).forEach((function(e){ar(e,t)})),D(r,nr).forEach((function(e){ar(e,t)})),D(o,nr).forEach((function(e){ar(e,t)}))}}function or(e,t,n){if(null!=(i=li._clipbox)&&!(i?0===i.width()||0===i.height():void 0)){var i,r=Ri(e);if(!(parseFloat(Fi(r,"text-indent"))<-500)){var o=t.data,a=0,s=o.search(/\S\s*$/)+1;if(s){var l=Fi(r,"font-size"),c=Fi(r,"line-height"),d=[Fi(r,"font-style"),Fi(r,"font-variant"),Fi(r,"font-weight"),l,Fi(r,"font-family")].join(" ");if(l=parseFloat(l),c=parseFloat(c),0!==l&&!isNaN(l)){var u=Fi(r,"color"),h=e.ownerDocument.createRange(),p="justify"==Fi(r,"text-align"),f=Fi(r,"column-count",1),m=Fi(r,"white-space"),g=Fi(r,"text-transform"),v=e.getBoundingClientRect().width/l*5;0===v&&(v=500);var _=null,b=li.underline,w=li["line-through"],y=li.overline,k=li["underline-offset"];for(b&&x((function(e){var t=l/12,n=e.bottom;n+=null!=k?k:t;T(t,e,b,n)}));!S(););return void((w||y)&&x((function(e){var t=l/12;T(t,e,w,e.bottom-e.height/2.7),T(t,e,y,e.top)})))}}}}function x(e){h.selectNode(t);var n=oi(h.getClientRects());x=function(e){return n.forEach(e)},x(e)}function C(e){if(ci||ri.chrome||ri.safari){for(var t=e.getClientRects(),n={top:1/0,right:-1/0,bottom:-1/0,left:1/0},i=!1,r=0;r=s)return!0;h.setStart(t,a),h.setEnd(t,a+1),e=C(h);var l=!1;if((p||f>1)&&(r=o.substr(a).search(/\s/))>=0){h.setEnd(t,a+r);var b=C(h);b.bottom==e.bottom&&(e=b,l=!0,a+=r)}if(!l){if(r=function n(i,r,o){h.setEnd(t,r);var a=C(h);return a.bottom!=e.bottom&&i>1,r):a.right!=e.right?(e=a,r>1,o):r):r}(a,Math.min(s,a+v),s),r==a)return!0;if(a=r,0===(r=h.toString().search(/\s+$/)))return!1;r>0&&(h.setEnd(t,h.startOffset+r),e=C(h))}ci&&(e=h.getClientRects()[0]);var w=h.toString();if(/^(?:pre|pre-wrap)$/i.test(m)){if(/\t/.test(w)){var y=0;for(r=i;r=0;){var x=" ".substr(0,8-(y+r)%8);w=w.substr(0,r)+x+w.substr(r+1)}}}else w=w.replace(/\s+/g," ");l||(_=e.bottom),function(e,t){if(ci&&!isNaN(c)){var i=wi(d),r=(t.top+t.bottom-i)/2;t={top:r,right:t.right,bottom:r+i,left:t.left,height:i,width:t.right-t.left}}switch(g){case"uppercase":e=e.toUpperCase();break;case"lowercase":e=e.toLowerCase();break;case"capitalize":e=e.replace(/(?:^|\s)\S/g,(function(e){return e.toUpperCase()}))}var o=new di(e,new Z([t.left,t.top],[t.width,t.height]),{font:d,fill:{color:u}});n.append(o)}(w,e)}function T(e,t,i,r){if(i){var o=new ct({stroke:{width:e,color:i}});r-=e,o.moveTo(t.left,r).lineTo(t.right,r),n.append(o)}}}function ar(e,t){var n=Ri(e);if(Ti(n),!/^(style|script|link|meta|iframe|col|colgroup)$/i.test(e.tagName)&&null!=li._clipbox){var i=parseFloat(Fi(n,"opacity")),r=Fi(n,"visibility"),o=Fi(n,"display");if(0!==i&&"hidden"!=r&&"none"!=o){var a,s=function(e){var t=Fi(e,"transform");if("none"==t)return null;var n=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(t);if(n){var i=Fi(e,"transform-origin");return{matrix:n=n[1].split(/\s*,\s*/g).map(parseFloat),origin:i=i.split(/\s+/g).map(parseFloat)}}}(n),l=Fi(n,"z-index");(s||i<1)&&"auto"==l&&(l=0),a=function(e,t,n){var i;"auto"!=n?(i=li._stackingContext.group,n=parseFloat(n)):(i=t,n=0);for(var r=i.children,o=0;on);++o);var a=new mt;if(i.insert(o,a),a._dom_zIndex=n,i!==t&&li._clipbox){var s=li._matrix.invert(),l=li._clipbox.transformCopy(s);ji(a,ct.fromRect(l))}return a}(0,t,l),i<1&&a.opacity(i*a.opacity()),Ei(e,n,a),s?Li(e,(function(){Pi(e.style,"transform","none","important"),Pi(e.style,"transition","none","important"),"static"==Fi(n,"position")&&Pi(e.style,"position","relative","important");var t=e.getBoundingClientRect(),i=t.left+s.origin[0],r=t.top+s.origin[1],o=[1,0,0,1,-i,-r];o=sr(o,s.matrix),o=sr(o,[1,0,0,1,i,r]),o=Ui(a,o),li._matrix=li._matrix.multiplyCopy(o),Ji(e,a)})):Ji(e,a),Ai()}}}function sr(e,t){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],c=t[1],d=t[2],u=t[3];return[n*l+i*d,n*c+i*u,r*l+o*d,r*c+o*u,a*l+s*d+t[4],a*c+s*u+t[5]]}var lr={svg:ni,canvas:ii,util:U,HasObservers:l,PathParser:Nt,parsePath:ot,BaseNode:Wt,OptionsStore:q,Surface:ei,SurfaceFactory:Jn,exportImage:function(t,n){var i={width:"800px",height:"600px",cors:"Anonymous"},r=t,o=t.clippedBBox();if(o){var a=o.getOrigin();(r=new mt).transform(ee().translate(-a.x,-a.y)),r.children.push(t);var s=o.getSize();i.width=s.width+"px",i.height=s.height+"px"}var l=e.extend(i,n),c=document.createElement("div"),d=c.style;d.display="none",d.width=l.width,d.height=l.height,document.body.appendChild(c);var u=new Xn(c,l);u.suspendTracking(),u.draw(r);var h=u.image(),p=function(){u.destroy(),document.body.removeChild(c)};return h.then(p,p),h},exportSVG:function(e,t){var n=ti(e);return t&&t.raw||(n="data:image/svg+xml;base64,"+y(n)),a().resolve(n)},QuadNode:Bn,ShapesQuadTree:Vn,Element:te,Circle:de,Arc:ut,Path:ct,MultiPath:dt,Text:ht,Image:pt,Group:mt,Layout:kt,Rect:xt,align:function(e,t,n){Ct(e,t,n,"x","width")},vAlign:function(e,t,n){Ct(e,t,n,"y","height")},stack:function(e){St(Tt(e),"x","y","width")},vStack:function(e){St(Tt(e),"y","x","height")},wrap:function(e,t){return Dt(e,t,"x","y","width")},vWrap:function(e,t){return Dt(e,t,"y","x","height")},fit:function(e,t){var n=e.clippedBBox();if(n){var i=n.size,r=t.size;if(r.width=r-h)&&(e.getAttribute("data-kendo-chart")||/^(?:img|tr|thead|th|tfoot|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(e.tagName))}function m(e){if("TABLE"==e.tagName&&ui(e,{tableLayout:"fixed"}),!f(e)){var t=Ri(e),i=parseFloat(Fi(t,"padding-bottom")),o=parseFloat(Fi(t,"border-bottom-width")),a=h;h+=i+o;for(var s=!0,l=e.firstChild;l;l=l.nextSibling)if(1==l.nodeType){if(s=!1,pi(l,n)){v(l);continue}if(!r){m(l);continue}if(!/^(?:static|relative)$/.test(Fi(Ri(l),"position")))continue;var c=b(l);1==c||c&&f(l)?v(l):m(l)}else 3==l.nodeType&&r&&(w(l,s),s=!1);h=a}}function g(e){var t=e.parentNode,n=t.firstChild;if(e===n)return!0;if(e===t.children[0]){if(7==n.nodeType||8==n.nodeType)return!0;if(3==n.nodeType)return!/\S/.test(n.data)}return!1}function v(e){if(1==e.nodeType&&e!==d&&g(e))return v(e.parentNode);var t,n,i,r,o;n=(t=fi(e,"table"))&&t.querySelector("colgroup"),a.repeatHeaders&&(i=t&&t.querySelector("thead"),(r=fi(e,".k-grid"))&&r.querySelector(".k-auto-scrollable")&&(o=r.querySelector(".k-grid-header")));var s=_(),c=l.createRange();c.setStartBefore(d),c.setEndBefore(e),s.appendChild(c.extractContents()),d.parentNode.insertBefore(s,d),y(e.parentNode),t&&(t=fi(e,"table"),a.repeatHeaders&&i&&t.insertBefore(i.cloneNode(!0),t.firstChild),n&&t.insertBefore(n.cloneNode(!0),t.firstChild)),a.repeatHeaders&&o&&(r=fi(e,".k-grid")).insertBefore(o.cloneNode(!0),r.firstChild)}function _(){var e=l.createElement("KENDO-PDF-PAGE");return ui(e,{display:"block",boxSizing:"content-box",width:i?i+"px":"auto",padding:o.top+"px "+o.right+"px "+o.bottom+"px "+o.left+"px",position:"relative",height:r?r+"px":"auto",overflow:r||i?"hidden":"visible",clear:"both"}),a&&a.pageClassName&&(e.className=a.pageClassName),c.push(e),e}function b(e){var t=e.getBoundingClientRect();if(0===t.width||0===t.height)return 0;var n=d.getBoundingClientRect().top,i=r-h;return t.height>i?3:t.top-n>i?1:t.bottom-n>i?2:0}function w(e,t){if(/\S/.test(e.data)){var n=e.data.length,i=l.createRange();i.selectNodeContents(e);var r=b(i);if(r){var o=e;if(1==r)v(t?e.parentNode:e);else if(function t(n,r,o){return i.setEnd(e,r),n==r||r==o?r:b(i)?t(n,n+r>>1,r):t(r,r+o>>1,o)}(0,n>>1,n),!/\S/.test(i.toString())&&t)v(e.parentNode);else{o=e.splitText(i.endOffset);var a=_();i.setStartBefore(d),a.appendChild(i.extractContents()),d.parentNode.insertBefore(a,d),y(o.parentNode)}w(o)}}}function y(e){var t=fi(e,"li");t&&(t.setAttribute("kendo-no-bullet","1"),y(t.parentNode))}}((function(e){if(t.progress){var i=!1,r=0;!function a(){if(r0)&&t.preventDefault()})).on("mouseleave"+H,(function(){s._hovered=!1})),s.wrapper=e(),!1===i.animation&&(i.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),A(i.animation.open,{complete:function(){s.wrapper.addClass("k-animation-container-shown"),s.wrapper.css("overflow",""),s._activated=!0,s._trigger(p)}}),A(i.animation.close,{complete:function(){s._animationClose()}}),s._mousedownProxy=function(e){s._mousedown(e)},a.mobileOS.android?s._resizeProxy=function(e){setTimeout((function(){s._resize(e)}),600)}:s._resizeProxy=function(e){s._resize(e)},i.toggleTarget&&e(i.toggleTarget).on(i.toggleEvent+H,s.toggle.bind(s))},events:[d,p,u,h],options:{name:"Popup",toggleEvent:"click",origin:"bottom left",position:"top left",anchor:w,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}},omitOriginOffsets:!1},_animationClose:function(){var e=this,t=e.wrapper.data(y);e.wrapper.hide(),t&&e.wrapper.css(t),e.options.anchor!=w&&e._hideDirClass(),e._closing=!1,e._trigger(h)},destroy:function(){var t,i=this,o=i.options,a=i.element.off(H);r.fn.destroy.call(i),o.toggleTarget&&e(o.toggleTarget).off(H),o.modal||(I.off(i.downEvent,i._mousedownProxy),i._toggleResize(!1)),n.destroy(i.element.children()),a.removeData(),o.appendTo[0]===document.body&&((t=a.closest(".k-animation-container"))[0]?t.remove():a.remove())},open:function(t,i){var r,o,s,l=this,c={isFixed:!isNaN(parseInt(i,10)),x:t,y:i},u=l.element,h=l.options,p=e(h.anchor),f=u[0]&&u.hasClass("km-widget"),m=u.find("[role='listbox']");if(!l.visible()){if(h.copyAnchorStyles&&(f&&"font-size"==R[0]&&R.shift(),u.css(n.getComputedStyles(p[0],R))),l.element.parent().data("animating")||l._trigger(d))return;l._activated=!1,h.modal||(I.off(l.downEvent,l._mousedownProxy).on(l.downEvent,l._mousedownProxy),l._toggleResize(!1),l._toggleResize(!0)),l.wrapper=o=n.wrap(u,h.autosize,h._resizeOnWrap).css({overflow:b,display:"block",position:_}).attr("aria-hidden",!1),s=u.parent(),m.attr("aria-label")?o.attr("aria-label",m.attr("aria-label")):m.attr("aria-labelledby")&&o.attr("aria-labelledby",m.attr("aria-labelledby")),a.mobileOS.android&&s.css(E,"translatez(0)"),o.css(k),e(h.appendTo)[0]==document.body&&o.css(g,"-10000px"),l.flipped=l._position(c),r=l._openAnimation(),h.anchor==w||l.element.hasClass("k-tooltip")||l._showDirClass(r),s.hide(),u.show(),l.wrapper.show(),s.data(x,r.effects).kendoStop(!0).kendoAnimate(r),u.attr("aria-hidden",!1)}},_location:function(t){var i,r=this,o=r.element,s=r.options,l=e(s.anchor),c=o[0]&&o.hasClass("km-widget");s.copyAnchorStyles&&(c&&"font-size"==R[0]&&R.shift(),o.css(n.getComputedStyles(l[0],R))),r.wrapper=i=n.wrap(o,s.autosize).css({overflow:b,display:"block",position:_}),a.mobileOS.android&&i.css(E,"translatez(0)"),i.css(k),e(s.appendTo)[0]==document.body&&i.css(g,"-10000px"),r._position(t||{});var d=i.offset();return{width:n._outerWidth(i),height:n._outerHeight(i),left:d.left,top:d.top}},_openAnimation:function(){var e=A(!0,{},this.options.animation.open);return e.effects=n.parseEffects(e.effects,this.flipped),e},_hideDirClass:function(){var t=e(this.options.anchor),i=((t.attr("class")||"").match(T)||["","down"])[1],r=S+"-"+i;t.removeClass(r).children(D).removeClass(C).removeClass(r),this.element.removeClass(S+"-"+n.directions[i].reverse)},_showDirClass:function(t){var n=t.effects.slideIn?t.effects.slideIn.direction:"down",i=S+"-"+n;e(this.options.anchor).addClass(i).children(D).addClass(C).addClass(i)},position:function(){this.visible()&&(this.flipped=this._position())},toggle:function(){this[this.visible()?u:d]()},visible:function(){return this.wrapper.is(":visible")&&this.element.is(":visible")},close:function(t){var i,r,o,a,s=this,l=s.element.parent(),c=s.options;if(s.visible()){if(i=s.wrapper[0]?s.wrapper:n.wrap(s.element).hide(),s.wrapper.removeClass("k-animation-container-shown"),s._toggleResize(!1),s._closing||s._trigger(u))return void s._toggleResize(!0);s.element.find(".k-popup").each((function(){var n=e(this).data("kendoPopup");n&&n.close(t)})),I.off(s.downEvent,s._mousedownProxy),t?r={hide:!0,effects:{}}:(r=A(!0,{},c.animation.close),o=l.data(x),!(a=r.effects)&&!n.size(a)&&o&&n.size(o)&&(r.effects=o,r.reverse=!0),s._closing=!0),l.kendoStop(!0),s.element.attr("aria-hidden",!0),i.css({overflow:b}).attr("aria-hidden",!0),l.kendoAnimate(r),t&&s._animationClose()}},_trigger:function(e){return this.trigger(e,{type:e})},_resize:function(e){var t=this;-1!==a.resize.indexOf(e.type)?(clearTimeout(t._resizeTimeout),t._resizeTimeout=setTimeout((function(){t._position(),t._resizeTimeout=null}),50)):(!t._hovered||t._activated&&t.element.find(".k-list").length>0)&&t.close()},_toggleResize:function(e){var t=e?"on":"off",n=a.resize;a.mobileOS.ios||a.mobileOS.android||a.browser.safari||(n+=" scroll"),e&&!this.scrollableParents&&(this.scrollableParents=this._scrollableParents()),this.scrollableParents&&this.scrollableParents.length&&this.scrollableParents[t](M,this._resizeProxy),z[t](n,this._resizeProxy)},_mousedown:function(t){var i=this,r=i.element[0],o=i.options,a=e(o.anchor)[0],s=o.toggleTarget,l=n.eventTarget(t),c=e(l).closest(".k-popup"),d=c.parent().parent(".km-shim").length;c=c[0],!d&&c&&c!==i.element[0]||"popover"!==e(t.target).closest("a").data("rel")&&(F(r,l)||F(a,l)||s&&F(e(s)[0],l)||i.close())},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),e<0&&(i=-e),i},_flip:function(e,t,n,i,r,o,a){var s=0;return a=a||t,o!==r&&o!==f&&r!==f&&(e+a>i&&(s+=-(n+t)),e+s<0&&(s+=n+t)),s},_scrollableParents:function(){return e(this.options.anchor).parentsUntil("body").filter((function(e,t){return n.isScrollable(t)}))},_position:function(t){var i,r,o,d,u,h,p,f=this,m=f.element,g=f.wrapper,v=f.options,_=e(v.viewport),b=a.zoomLevel(),w=!!(_[0]==window&&window.innerWidth&&b<=1.02),x=e(v.anchor),C=v.origin.toLowerCase().split(" "),S=v.position.toLowerCase().split(" "),T=f.collisions,D=10002,I=0,z=document.documentElement;(u=v.viewport===window?{top:window.pageYOffset||document.documentElement.scrollTop||0,left:window.pageXOffset||document.documentElement.scrollLeft||0}:_.offset(),w?(h=window.innerWidth,p=window.innerHeight):(h=_.width(),p=_.height()),w&&z.scrollHeight-z.clientHeight>0)&&(h-=(v.isRtl?-1:1)*n.support.scrollbar());if((i=x.parents().filter(g.siblings()))[0])if(o=Math.max(Number(i.css("zIndex")),0))D=o+10;else for(d=(r=x.parentsUntil(i)).length;I=0&&e(n).is(":visible")&&!e(n).is("[disabled]")}));return this.element.is("[tabindex]")&&t.push(this.element[0]),t},_sortFocusableElements:function(e){var t;if(B)t=e.sort((function(e,t){return e.tabIndex-t.tabIndex}));else{var n="__k_index";e.each((function(e,t){t.setAttribute(n,e)})),t=e.sort((function(e,t){return e.tabIndex===t.tabIndex?parseInt(e.getAttribute(n),10)-parseInt(t.getAttribute(n),10):e.tabIndex-t.tabIndex})),e.removeAttr(n)}return t},_nextFocusable:function(e,t){var n=t.length,i=t.index(e.target);return t.get((i+(e.shiftKey?-1:1))%n)},_focus:function(e){"IFRAME"!=e.nodeName?(e.focus(),"INPUT"==e.nodeName&&e.setSelectionRange&&this._haveSelectionRange(e)&&e.setSelectionRange(0,e.value.length)):e.contentWindow.document.body.focus()},_haveSelectionRange:function(e){var t=e.type.toLowerCase();return"text"===t||"search"===t||"url"===t||"tel"===t||"password"===t}});i.Popup.TabKeyTrap=V}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.Class;n.html=n.html||{};var r=i.extend({init:function(t,n){this.element=e(t),delete(n=n||{}).name,this._initOptions(n)},options:{stylingOptions:[]},_addClasses:function(){var e=this,t=e.options,i=t.stylingOptions,r=e.wrapper.data("added-classes");i=i.map((function(e){var i;return"themeColor"!==e||(i=n.cssProperties.getValidClass({widget:t.name,propName:"fillMode",value:t.fillMode}))&&0!==i.length?n.cssProperties.getValidClass({widget:t.name,propName:e,value:t[e],fill:t.fillMode}):""})),r&&e.wrapper.removeClass(r.join(" ")),e.wrapper.data("added-classes",i),e.wrapper.addClass(i.join(" "))},html:function(){return this.wrapper[0].outerHTML}});e.extend(n.html,{HTMLBase:r})}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=e.extend,r=n.html.HTMLBase,o="k-i-",a="k-svg-i-",s="k-flip-h",l="k-flip-v",c={svg:function(e,t){return new p(e,t)},font:function(e,t){return new h(e,t)}},d={default:"",horizontal:s,vertical:l,both:"k-flip-h k-flip-v"},u=r.extend({init:function(e,t){r.fn.init.call(this,e,t),this._wrapper()},options:{name:"HTMLIcon",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]},_wrapper:function(){this._addClasses()},_addClasses:function(){var e=this,t=e.options,i=t.stylingOptions,r=e.wrapper.data("added-classes");i=i.map((function(e){return"themeColor"===e?n.cssProperties.getValidClass({widget:t.name,propName:e,value:t[e],prefix:"k-color-"}):"fill"===e?d[t.flip]:n.cssProperties.getValidClass({widget:t.name,propName:e,value:t[e],fill:t.fillMode})})),r&&e.wrapper.removeClass(r.filter((function(t){return t!==e._className})).join(" ")),e.wrapper.data("added-classes",i.concat([e._className])),e.wrapper.addClass(i.join(" "))}}),h=u.extend({init:function(e,t){u.fn.init.call(this,e,t)},options:i({},u.fn.options,{name:"HTMLFontIcon",icon:null}),_wrapper:function(){var e=this,t=e.element[0].className.split(" ").find((function(e){return e.includes(o)})),n=e.options.icon?""+(e.options.icon.startsWith(o)?"":o)+e.options.icon:"";e._className=n,e.wrapper=e.element.addClass("k-icon").removeClass(t).addClass(n).addClass(e.options.iconClass||""),u.fn._wrapper.call(this)}}),p=u.extend({init:function(e,t){e.empty(),u.fn.init.call(this,e,t)},options:i({},u.fn.options,{name:"HTMLSVGIcon",icon:null}),_wrapper:function(){var t,i=this,r=i.options.icon,o=i.options.iconClass,s=i.element[0].className.split(" ").find((function(e){return e.includes(a)})),l=e("");if(!r&&o){var c=o.match(/k-i-(\w+(?:-\w+)*)/);c&&(r=c[1],o=o.replace(c[0],""))}n.isString(r)&&(r=r.replace("k-i-","").replace(/-./g,(function(e){return e[1].toUpperCase()})),r=n.ui.svgIcons[r]||n.ui.svgIcons[r+"Icon"]),t=r&&r.name?"k-svg-i-"+r.name:"",i._className=t,i.wrapper=i.element.addClass("k-svg-icon").removeClass(s).addClass(t).addClass(o||"").attr("aria-hidden",!0),e.isPlainObject(r)&&(l.attr("viewBox",r.viewBox||"").attr({viewBox:r.viewBox||"",focusable:"false",xmlns:"http://www.w3.org/2000/svg"}).html(r.content||""),i.wrapper.append(l[0].outerHTML)),u.fn._wrapper.call(this)}});e.extend(n.html,{renderIcon:function(t,i){return(!t||e.isPlainObject(t)||n.isString(t))&&(i=t,t=e("")),n.isString(i)&&(i={icon:i}),n.isPresent(i.type)||(i.type=n.defaults.iconType?n.defaults.iconType:"svg"),n.isFunction(i.type)?i.type(t,i):n.isFunction(c[i.type])?c[i.type](t,i).html():null},HTMLFontIcon:h,HTMLSvgIcon:p,getIconRenderer:function(e){return c[e]}}),n.cssProperties.registerPrefix("HTMLFontIcon","k-icon-"),n.cssProperties.registerValues("HTMLFontIcon",[{prop:"size",values:n.cssProperties.sizeValues.concat([["xsmall","xs"],["xlarge","xl"],["xxlarge","xxl"],["xxxlarge","xxxl"]])},{prop:"themeColor",values:["primary","secondary","tertiary","inherit","info","success","warning","error","dark","light","inverse"]}]),n.cssProperties.registerPrefix("HTMLSVGIcon","k-icon-"),n.cssProperties.registerValues("HTMLSVGIcon",[{prop:"size",values:n.cssProperties.sizeValues.concat([["xsmall","xs"],["xlarge","xl"],["xxlarge","xxl"],["xxxlarge","xxxl"]])},{prop:"themeColor",values:["primary","secondary","tertiary","inherit","info","success","warning","error","dark","light","inverse"]}])}(window.kendo.jQuery);kendo;var T=Object.freeze({__proto__:null,accessibilityIcon:{name:"accessibility",content:'',viewBox:"0 0 512 512"},aggregateFieldsIcon:{name:"aggregate-fields",content:'',viewBox:"0 0 512 512"},alignBottomIcon:{name:"align-bottom",content:'',viewBox:"0 0 512 512"},alignCenterIcon:{name:"align-center",content:'',viewBox:"0 0 512 512"},alignItemsBaselineAltIcon:{name:"align-items-baseline-alt",content:'',viewBox:"0 0 512 512"},alignItemsBaselineIcon:{name:"align-items-baseline",content:'',viewBox:"0 0 512 512"},alignItemsCenterAltIcon:{name:"align-items-center-alt",content:'',viewBox:"0 0 512 512"},alignItemsCenterIcon:{name:"align-items-center",content:'',viewBox:"0 0 512 512"},alignItemsEndAltIcon:{name:"align-items-end-alt",content:'',viewBox:"0 0 512 512"},alignItemsEndIcon:{name:"align-items-end",content:'',viewBox:"0 0 512 512"},alignItemsStartAltIcon:{name:"align-items-start-alt",content:'',viewBox:"0 0 512 512"},alignItemsStartIcon:{name:"align-items-start",content:'',viewBox:"0 0 512 512"},alignItemsStretchAltIcon:{name:"align-items-stretch-alt",content:'',viewBox:"0 0 512 512"},alignItemsStretchIcon:{name:"align-items-stretch",content:'',viewBox:"0 0 512 512"},alignJustifyIcon:{name:"align-justify",content:'',viewBox:"0 0 512 512"},alignLeftIcon:{name:"align-left",content:'',viewBox:"0 0 512 512"},alignMiddleIcon:{name:"align-middle",content:'',viewBox:"0 0 512 512"},alignRemoveIcon:{name:"align-remove",content:'',viewBox:"0 0 512 512"},alignRightIcon:{name:"align-right",content:'',viewBox:"0 0 512 512"},alignSelfCenterAltIcon:{name:"align-self-center-alt",content:'',viewBox:"0 0 512 512"},alignSelfCenterIcon:{name:"align-self-center",content:'',viewBox:"0 0 512 512"},alignSelfEndAltIcon:{name:"align-self-end-alt",content:'',viewBox:"0 0 512 512"},alignSelfEndIcon:{name:"align-self-end",content:'',viewBox:"0 0 512 512"},alignSelfStartAltIcon:{name:"align-self-start-alt",content:'',viewBox:"0 0 512 512"},alignSelfStartIcon:{name:"align-self-start",content:'',viewBox:"0 0 512 512"},alignSelfStretchAltIcon:{name:"align-self-stretch-alt",content:'',viewBox:"0 0 512 512"},alignSelfStretchIcon:{name:"align-self-stretch",content:'',viewBox:"0 0 512 512"},alignToGridIcon:{name:"align-to-grid",content:'',viewBox:"0 0 512 512"},alignTopIcon:{name:"align-top",content:'',viewBox:"0 0 512 512"},allIcon:{name:"all",content:'',viewBox:"0 0 512 512"},anchorIcon:{name:"anchor",content:'',viewBox:"0 0 512 512"},applyFormatIcon:{name:"apply-format",content:'',viewBox:"0 0 512 512"},arrowDownIcon:{name:"arrow-down",content:'',viewBox:"0 0 512 512"},arrowLeftIcon:{name:"arrow-left",content:'',viewBox:"0 0 512 512"},arrowOverflowDownIcon:{name:"arrow-overflow-down",content:'',viewBox:"0 0 512 512"},arrowRightIcon:{name:"arrow-right",content:'',viewBox:"0 0 512 512"},arrowRotateCcwIcon:{name:"arrow-rotate-ccw",content:'',viewBox:"0 0 512 512"},arrowRotateCcwSmallIcon:{name:"arrow-rotate-ccw-small",content:'',viewBox:"0 0 512 512"},arrowRotateCwIcon:{name:"arrow-rotate-cw",content:'',viewBox:"0 0 512 512"},arrowRotateCwSmallIcon:{name:"arrow-rotate-cw-small",content:'',viewBox:"0 0 512 512"},arrowUpIcon:{name:"arrow-up",content:'',viewBox:"0 0 512 512"},arrowsAxesIcon:{name:"arrows-axes",content:'',viewBox:"0 0 512 512"},arrowsLeftRightIcon:{name:"arrows-left-right",content:'',viewBox:"0 0 512 512"},arrowsMoveIcon:{name:"arrows-move",content:'',viewBox:"0 0 512 512"},arrowsNoChangeIcon:{name:"arrows-no-change",content:'',viewBox:"0 0 512 512"},arrowsNoRepeatIcon:{name:"arrows-no-repeat",content:'',viewBox:"0 0 512 512"},arrowsSwapIcon:{name:"arrows-swap",content:'',viewBox:"0 0 512 512"},arrowsTopBottomIcon:{name:"arrows-top-bottom",content:'',viewBox:"0 0 512 512"},barcodeIcon:{name:"barcode",content:'',viewBox:"0 0 512 512"},barcodeOutlineIcon:{name:"barcode-outline",content:'',viewBox:"0 0 512 512"},barcodeQrCodeScannerIcon:{name:"barcode-qr-code-scanner",content:'',viewBox:"0 0 512 512"},barcodeScannerIcon:{name:"barcode-scanner",content:'',viewBox:"0 0 512 512"},behanceBoxIcon:{name:"behance-box",content:'',viewBox:"0 0 512 512"},behanceIcon:{name:"behance",content:'',viewBox:"0 0 512 512"},bellIcon:{name:"bell",content:'',viewBox:"0 0 512 512"},binocularsIcon:{name:"binoculars",content:'',viewBox:"0 0 512 512"},bloggerBoxIcon:{name:"blogger-box",content:'',viewBox:"0 0 512 512"},bloggerIcon:{name:"blogger",content:'',viewBox:"0 0 512 512"},blurIcon:{name:"blur",content:'',viewBox:"0 0 512 512"},boldIcon:{name:"bold",content:'',viewBox:"0 0 512 512"},bookIcon:{name:"book",content:'',viewBox:"0 0 512 512"},borderBottomIcon:{name:"border-bottom",content:'',viewBox:"0 0 512 512"},borderColorIcon:{name:"border-color",content:'',viewBox:"0 0 512 512"},borderLeftIcon:{name:"border-left",content:'',viewBox:"0 0 512 512"},borderRadiusBottomLeftIcon:{name:"border-radius-bottom-left",content:'',viewBox:"0 0 512 512"},borderRadiusBottomRightIcon:{name:"border-radius-bottom-right",content:'',viewBox:"0 0 512 512"},borderRadiusIcon:{name:"border-radius",content:'',viewBox:"0 0 512 512"},borderRadiusTopLeftIcon:{name:"border-radius-top-left",content:'',viewBox:"0 0 512 512"},borderRadiusTopRightIcon:{name:"border-radius-top-right",content:'',viewBox:"0 0 512 512"},borderRightIcon:{name:"border-right",content:'',viewBox:"0 0 512 512"},borderStyleBottomIcon:{name:"border-style-bottom",content:'',viewBox:"0 0 512 512"},borderStyleIcon:{name:"border-style",content:'',viewBox:"0 0 512 512"},borderStyleLeftIcon:{name:"border-style-left",content:'',viewBox:"0 0 512 512"},borderStyleRightIcon:{name:"border-style-right",content:'',viewBox:"0 0 512 512"},borderStyleTopIcon:{name:"border-style-top",content:'',viewBox:"0 0 512 512"},borderTopIcon:{name:"border-top",content:'',viewBox:"0 0 512 512"},borderTypeIcon:{name:"border-type",content:'',viewBox:"0 0 512 512"},bordersAllIcon:{name:"borders-all",content:'',viewBox:"0 0 512 512"},bordersInsideHorizontalIcon:{name:"borders-inside-horizontal",content:'',viewBox:"0 0 512 512"},bordersInsideIcon:{name:"borders-inside",content:'',viewBox:"0 0 512 512"},bordersInsideVerticalIcon:{name:"borders-inside-vertical",content:'',viewBox:"0 0 512 512"},bordersNoneIcon:{name:"borders-none",content:'',viewBox:"0 0 512 512"},bordersOutsideIcon:{name:"borders-outside",content:'',viewBox:"0 0 512 512"},bordersShowHideIcon:{name:"borders-show-hide",content:'',viewBox:"0 0 512 512"},boxSizingIcon:{name:"box-sizing",content:'',viewBox:"0 0 512 512"},brightnessContrastIcon:{name:"brightness-contrast",content:'',viewBox:"0 0 512 512"},bringBackwardIcon:{name:"bring-backward",content:'',viewBox:"0 0 512 512"},bringForwardIcon:{name:"bring-forward",content:'',viewBox:"0 0 512 512"},bringToBackIcon:{name:"bring-to-back",content:'',viewBox:"0 0 512 512"},bringToFrontIcon:{name:"bring-to-front",content:'',viewBox:"0 0 512 512"},brushIcon:{name:"brush",content:'',viewBox:"0 0 512 512"},buildingBlocksIcon:{name:"building-blocks",content:'',viewBox:"0 0 512 512"},buttonIcon:{name:"button",content:'',viewBox:"0 0 512 512"},calculatorIcon:{name:"calculator",content:'',viewBox:"0 0 512 512"},calendarDateIcon:{name:"calendar-date",content:'',viewBox:"0 0 512 512"},calendarIcon:{name:"calendar",content:'',viewBox:"0 0 512 512"},cameraIcon:{name:"camera",content:'',viewBox:"0 0 512 512"},cancelCircleIcon:{name:"cancel-circle",content:'',viewBox:"0 0 512 512"},cancelIcon:{name:"cancel",content:'',viewBox:"0 0 512 512"},cancelOutlineIcon:{name:"cancel-outline",content:'',viewBox:"0 0 512 512"},caretAltDownIcon:{name:"caret-alt-down",content:'',viewBox:"0 0 512 512"},caretAltExpandIcon:{name:"caret-alt-expand",content:'',viewBox:"0 0 512 512"},caretAltLeftIcon:{name:"caret-alt-left",content:'',viewBox:"0 0 512 512"},caretAltRightIcon:{name:"caret-alt-right",content:'',viewBox:"0 0 512 512"},caretAltToBottomIcon:{name:"caret-alt-to-bottom",content:'',viewBox:"0 0 512 512"},caretAltToLeftIcon:{name:"caret-alt-to-left",content:'',viewBox:"0 0 512 512"},caretAltToRightIcon:{name:"caret-alt-to-right",content:'',viewBox:"0 0 512 512"},caretAltToTopIcon:{name:"caret-alt-to-top",content:'',viewBox:"0 0 512 512"},caretAltUpIcon:{name:"caret-alt-up",content:'',viewBox:"0 0 512 512"},caretBlIcon:{name:"caret-bl",content:'',viewBox:"0 0 512 512"},caretBrIcon:{name:"caret-br",content:'',viewBox:"0 0 512 512"},caretDoubleAltDownIcon:{name:"caret-double-alt-down",content:'',viewBox:"0 0 512 512"},caretDoubleAltLeftIcon:{name:"caret-double-alt-left",content:'',viewBox:"0 0 512 512"},caretDoubleAltRightIcon:{name:"caret-double-alt-right",content:'',viewBox:"0 0 512 512"},caretDoubleAltUpIcon:{name:"caret-double-alt-up",content:'',viewBox:"0 0 512 512"},caretTlIcon:{name:"caret-tl",content:'',viewBox:"0 0 512 512"},caretTrIcon:{name:"caret-tr",content:'',viewBox:"0 0 512 512"},cartIcon:{name:"cart",content:'',viewBox:"0 0 512 512"},categorizeIcon:{name:"categorize",content:'',viewBox:"0 0 512 512"},cellSplitHorizontallyIcon:{name:"cell-split-horizontally",content:'',viewBox:"0 0 512 512"},cellSplitVerticallyIcon:{name:"cell-split-vertically",content:'',viewBox:"0 0 512 512"},cellsMergeHorizontallyIcon:{name:"cells-merge-horizontally",content:'',viewBox:"0 0 512 512"},cellsMergeIcon:{name:"cells-merge",content:'',viewBox:"0 0 512 512"},cellsMergeVerticallyIcon:{name:"cells-merge-vertically",content:'',viewBox:"0 0 512 512"},changeManuallyIcon:{name:"change-manually",content:'',viewBox:"0 0 512 512"},chartAreaClusteredIcon:{name:"chart-area-clustered",content:'',viewBox:"0 0 512 512"},chartAreaRangeIcon:{name:"chart-area-range",content:'',viewBox:"0 0 512 512"},chartAreaStacked100Icon:{name:"chart-area-stacked100",content:'',viewBox:"0 0 512 512"},chartAreaStackedIcon:{name:"chart-area-stacked",content:'',viewBox:"0 0 512 512"},chartBarClusteredIcon:{name:"chart-bar-clustered",content:'',viewBox:"0 0 512 512"},chartBarRangeIcon:{name:"chart-bar-range",content:'',viewBox:"0 0 512 512"},chartBarStacked100Icon:{name:"chart-bar-stacked100",content:'',viewBox:"0 0 512 512"},chartBarStackedIcon:{name:"chart-bar-stacked",content:'',viewBox:"0 0 512 512"},chartBubbleIcon:{name:"chart-bubble",content:'',viewBox:"0 0 512 512"},chartCandlestickIcon:{name:"chart-candlestick",content:'',viewBox:"0 0 512 512"},chartChoroplethIcon:{name:"chart-choropleth",content:'',viewBox:"0 0 512 512"},chartColumnClusteredIcon:{name:"chart-column-clustered",content:'',viewBox:"0 0 512 512"},chartColumnRangeIcon:{name:"chart-column-range",content:'',viewBox:"0 0 512 512"},chartColumnStacked100Icon:{name:"chart-column-stacked100",content:'',viewBox:"0 0 512 512"},chartColumnStackedIcon:{name:"chart-column-stacked",content:'',viewBox:"0 0 512 512"},chartDoughnutIcon:{name:"chart-doughnut",content:'',viewBox:"0 0 512 512"},chartLineIcon:{name:"chart-line",content:'',viewBox:"0 0 512 512"},chartLineMarkersIcon:{name:"chart-line-markers",content:'',viewBox:"0 0 512 512"},chartLineStacked100Icon:{name:"chart-line-stacked100",content:'',viewBox:"0 0 512 512"},chartLineStacked100MarkersIcon:{name:"chart-line-stacked100-markers",content:'',viewBox:"0 0 512 512"},chartLineStackedIcon:{name:"chart-line-stacked",content:'',viewBox:"0 0 512 512"},chartLineStackedMarkersIcon:{name:"chart-line-stacked-markers",content:'',viewBox:"0 0 512 512"},chartOhlcIcon:{name:"chart-ohlc",content:'',viewBox:"0 0 512 512"},chartPieIcon:{name:"chart-pie",content:'',viewBox:"0 0 512 512"},chartRadarFilledIcon:{name:"chart-radar-filled",content:'',viewBox:"0 0 512 512"},chartRadarIcon:{name:"chart-radar",content:'',viewBox:"0 0 512 512"},chartRadarMarkersIcon:{name:"chart-radar-markers",content:'',viewBox:"0 0 512 512"},chartRoseIcon:{name:"chart-rose",content:'',viewBox:"0 0 512 512"},chartScatterIcon:{name:"chart-scatter",content:'',viewBox:"0 0 512 512"},chartScatterSmoothLinesIcon:{name:"chart-scatter-smooth-lines",content:'',viewBox:"0 0 512 512"},chartScatterSmoothLinesMarkersIcon:{name:"chart-scatter-smooth-lines-markers",content:'',viewBox:"0 0 512 512"},chartScatterStraightLinesIcon:{name:"chart-scatter-straight-lines",content:'',viewBox:"0 0 512 512"},chartScatterStraightLinesMarkersIcon:{name:"chart-scatter-straight-lines-markers",content:'',viewBox:"0 0 512 512"},checkCircleIcon:{name:"check-circle",content:'',viewBox:"0 0 512 512"},checkIcon:{name:"check",content:'',viewBox:"0 0 512 512"},checkOutlineIcon:{name:"check-outline",content:'',viewBox:"0 0 512 512"},checkboxCheckedIcon:{name:"checkbox-checked",content:'',viewBox:"0 0 512 512"},checkboxIcon:{name:"checkbox",content:'',viewBox:"0 0 512 512"},checkboxIndeterminateIcon:{name:"checkbox-indeterminate",content:'',viewBox:"0 0 512 512"},checkboxNullIcon:{name:"checkbox-null",content:'',viewBox:"0 0 512 512"},chevronDoubleDownIcon:{name:"chevron-double-down",content:'',viewBox:"0 0 512 512"},chevronDoubleLeftIcon:{name:"chevron-double-left",content:'',viewBox:"0 0 512 512"},chevronDoubleRightIcon:{name:"chevron-double-right",content:'',viewBox:"0 0 512 512"},chevronDoubleUpIcon:{name:"chevron-double-up",content:'',viewBox:"0 0 512 512"},chevronDownIcon:{name:"chevron-down",content:'',viewBox:"0 0 512 512"},chevronLeftIcon:{name:"chevron-left",content:'',viewBox:"0 0 512 512"},chevronRightIcon:{name:"chevron-right",content:'',viewBox:"0 0 512 512"},chevronUpIcon:{name:"chevron-up",content:'',viewBox:"0 0 512 512"},circleIcon:{name:"circle",content:'',viewBox:"0 0 512 512"},clearCssIcon:{name:"clear-css",content:'',viewBox:"0 0 512 512"},clipboardCodeIcon:{name:"clipboard-code",content:'',viewBox:"0 0 512 512"},clipboardHtmlIcon:{name:"clipboard-html",content:'',viewBox:"0 0 512 512"},clipboardIcon:{name:"clipboard",content:'',viewBox:"0 0 512 512"},clipboardMarkdownIcon:{name:"clipboard-markdown",content:'',viewBox:"0 0 512 512"},clipboardTextIcon:{name:"clipboard-text",content:'',viewBox:"0 0 512 512"},clipboardWordAltIcon:{name:"clipboard-word-alt",content:'',viewBox:"0 0 512 512"},clipboardWordIcon:{name:"clipboard-word",content:'',viewBox:"0 0 512 512"},clockArrowRotateIcon:{name:"clock-arrow-rotate",content:'',viewBox:"0 0 512 512"},clockIcon:{name:"clock",content:'',viewBox:"0 0 512 512"},closedCaptionsIcon:{name:"closed-captions",content:'',viewBox:"0 0 512 512"},cloudIcon:{name:"cloud",content:'',viewBox:"0 0 512 512"},codeIcon:{name:"code",content:'',viewBox:"0 0 512 512"},codeSnippetIcon:{name:"code-snippet",content:'',viewBox:"0 0 512 512"},colResizeIcon:{name:"col-resize",content:'',viewBox:"0 0 512 512"},columnFreezeIcon:{name:"column-freeze",content:'',viewBox:"0 0 512 512"},columnsIcon:{name:"columns",content:'',viewBox:"0 0 512 512"},commentIcon:{name:"comment",content:'',viewBox:"0 0 512 512"},commentRemoveIcon:{name:"comment-remove",content:'',viewBox:"0 0 512 512"},commentsRemoveIcon:{name:"comments-remove",content:'',viewBox:"0 0 512 512"},connectorIcon:{name:"connector",content:'',viewBox:"0 0 512 512"},convertLowercaseIcon:{name:"convert-lowercase",content:'',viewBox:"0 0 512 512"},convertUppercaseIcon:{name:"convert-uppercase",content:'',viewBox:"0 0 512 512"},copyFormatIcon:{name:"copy-format",content:'',viewBox:"0 0 512 512"},copyIcon:{name:"copy",content:'',viewBox:"0 0 512 512"},cropIcon:{name:"crop",content:'',viewBox:"0 0 512 512"},crosstabIcon:{name:"crosstab",content:'',viewBox:"0 0 512 512"},crosstabWizardIcon:{name:"crosstab-wizard",content:'',viewBox:"0 0 512 512"},csIcon:{name:"cs",content:'',viewBox:"0 0 512 512"},csprojIcon:{name:"csproj",content:'',viewBox:"0 0 512 512"},css3Icon:{name:"css3",content:'',viewBox:"0 0 512 512"},cssIcon:{name:"css",content:'',viewBox:"0 0 512 512"},customFormatIcon:{name:"custom-format",content:'',viewBox:"0 0 512 512"},customIconIcon:{name:"custom-icon",content:'',viewBox:"0 0 512 512"},cutIcon:{name:"cut",content:'',viewBox:"0 0 512 512"},dataCsvIcon:{name:"data-csv",content:'',viewBox:"0 0 512 512"},dataIcon:{name:"data",content:'',viewBox:"0 0 512 512"},dataJsonIcon:{name:"data-json",content:'',viewBox:"0 0 512 512"},dataOdsIcon:{name:"data-ods",content:'',viewBox:"0 0 512 512"},dataRestIcon:{name:"data-rest",content:'',viewBox:"0 0 512 512"},dataSdsIcon:{name:"data-sds",content:'',viewBox:"0 0 512 512"},dataSqlIcon:{name:"data-sql",content:'',viewBox:"0 0 512 512"},dataWebIcon:{name:"data-web",content:'',viewBox:"0 0 512 512"},decimalDecreaseIcon:{name:"decimal-decrease",content:'',viewBox:"0 0 512 512"},decimalIncreaseIcon:{name:"decimal-increase",content:'',viewBox:"0 0 512 512"},decreaseHorizontalSpacingIcon:{name:"decrease-horizontal-spacing",content:'',viewBox:"0 0 512 512"},decreaseVerticalSpacingIcon:{name:"decrease-vertical-spacing",content:'',viewBox:"0 0 512 512"},deliciousBoxIcon:{name:"delicious-box",content:'',viewBox:"0 0 512 512"},deliciousIcon:{name:"delicious",content:'',viewBox:"0 0 512 512"},detailSectionIcon:{name:"detail-section",content:'',viewBox:"0 0 512 512"},diggBoxIcon:{name:"digg-box",content:'',viewBox:"0 0 512 512"},diggIcon:{name:"digg",content:'',viewBox:"0 0 512 512"},dimensionsIcon:{name:"dimensions",content:'',viewBox:"0 0 512 512"},displayBlockIcon:{name:"display-block",content:'',viewBox:"0 0 512 512"},displayFlexIcon:{name:"display-flex",content:'',viewBox:"0 0 512 512"},displayInlineBlockIcon:{name:"display-inline-block",content:'',viewBox:"0 0 512 512"},displayInlineFlexIcon:{name:"display-inline-flex",content:'',viewBox:"0 0 512 512"},divIcon:{name:"div",content:'',viewBox:"0 0 512 512"},divideIcon:{name:"divide",content:'',viewBox:"0 0 512 512"},documentManagerIcon:{name:"document-manager",content:'',viewBox:"0 0 512 512"},dollarIcon:{name:"dollar",content:'',viewBox:"0 0 512 512"},downloadIcon:{name:"download",content:'',viewBox:"0 0 512 512"},downloadLightIcon:{name:"download-light",content:'',viewBox:"0 0 512 512"},dragAndDropIcon:{name:"drag-and-drop",content:'',viewBox:"0 0 512 512"},dribbbleBoxIcon:{name:"dribbble-box",content:'',viewBox:"0 0 512 512"},dribbbleIcon:{name:"dribbble",content:'',viewBox:"0 0 512 512"},dropletIcon:{name:"droplet",content:'',viewBox:"0 0 512 512"},dropletSlashIcon:{name:"droplet-slash",content:'',viewBox:"0 0 512 512"},dropletSliderIcon:{name:"droplet-slider",content:'',viewBox:"0 0 512 512"},editToolsIcon:{name:"edit-tools",content:'',viewBox:"0 0 512 512"},envelopBoxIcon:{name:"envelop-box",content:'',viewBox:"0 0 512 512"},envelopIcon:{name:"envelop",content:'',viewBox:"0 0 512 512"},envelopLinkIcon:{name:"envelop-link",content:'',viewBox:"0 0 512 512"},envelopeBoxIcon:{name:"envelope-box",content:'',viewBox:"0 0 512 512"},envelopeIcon:{name:"envelope",content:'',viewBox:"0 0 512 512"},envelopeLinkIcon:{name:"envelope-link",content:'',viewBox:"0 0 512 512"},equalIcon:{name:"equal",content:'',viewBox:"0 0 512 512"},exclamationCircleIcon:{name:"exclamation-circle",content:'',viewBox:"0 0 512 512"},exeIcon:{name:"exe",content:'',viewBox:"0 0 512 512"},exportIcon:{name:"export",content:'',viewBox:"0 0 512 512"},eyeIcon:{name:"eye",content:'',viewBox:"0 0 512 512"},eyeSlashIcon:{name:"eye-slash",content:'',viewBox:"0 0 512 512"},eyedropperIcon:{name:"eyedropper",content:'',viewBox:"0 0 512 512"},facebookBoxIcon:{name:"facebook-box",content:'',viewBox:"0 0 512 512"},facebookIcon:{name:"facebook",content:'',viewBox:"0 0 512 512"},fileAddIcon:{name:"file-add",content:'',viewBox:"0 0 512 512"},fileAscxIcon:{name:"file-ascx",content:'',viewBox:"0 0 512 512"},fileAudioIcon:{name:"file-audio",content:'',viewBox:"0 0 512 512"},fileBacIcon:{name:"file-bac",content:'',viewBox:"0 0 512 512"},fileConfigIcon:{name:"file-config",content:'',viewBox:"0 0 512 512"},fileCsvIcon:{name:"file-csv",content:'',viewBox:"0 0 512 512"},fileDataIcon:{name:"file-data",content:'',viewBox:"0 0 512 512"},fileDiscImageIcon:{name:"file-disc-image",content:'',viewBox:"0 0 512 512"},fileErrorIcon:{name:"file-error",content:'',viewBox:"0 0 512 512"},fileExcelIcon:{name:"file-excel",content:'',viewBox:"0 0 512 512"},fileFlashIcon:{name:"file-flash",content:'',viewBox:"0 0 512 512"},fileFooterIcon:{name:"file-footer",content:'',viewBox:"0 0 512 512"},fileHeaderIcon:{name:"file-header",content:'',viewBox:"0 0 512 512"},fileHorizontalIcon:{name:"file-horizontal",content:'',viewBox:"0 0 512 512"},fileIcon:{name:"file",content:'',viewBox:"0 0 512 512"},fileImageIcon:{name:"file-image",content:'',viewBox:"0 0 512 512"},fileMdbIcon:{name:"file-mdb",content:'',viewBox:"0 0 512 512"},filePdfIcon:{name:"file-pdf",content:'',viewBox:"0 0 512 512"},filePptIcon:{name:"file-ppt",content:'',viewBox:"0 0 512 512"},filePresentationIcon:{name:"file-presentation",content:'',viewBox:"0 0 512 512"},fileProgrammingIcon:{name:"file-programming",content:'',viewBox:"0 0 512 512"},filePsdIcon:{name:"file-psd",content:'',viewBox:"0 0 512 512"},fileReportIcon:{name:"file-report",content:'',viewBox:"0 0 512 512"},fileTxtIcon:{name:"file-txt",content:'',viewBox:"0 0 512 512"},fileTypescriptIcon:{name:"file-typescript",content:'',viewBox:"0 0 512 512"},fileVideoIcon:{name:"file-video",content:'',viewBox:"0 0 512 512"},fileWordIcon:{name:"file-word",content:'',viewBox:"0 0 512 512"},fileWrenchIcon:{name:"file-wrench",content:'',viewBox:"0 0 512 512"},fileZipIcon:{name:"file-zip",content:'',viewBox:"0 0 512 512"},filesErrorIcon:{name:"files-error",content:'',viewBox:"0 0 512 512"},filmIcon:{name:"film",content:'',viewBox:"0 0 512 512"},filterAddExpressionIcon:{name:"filter-add-expression",content:'',viewBox:"0 0 512 512"},filterAddGroupIcon:{name:"filter-add-group",content:'',viewBox:"0 0 512 512"},filterClearIcon:{name:"filter-clear",content:'',viewBox:"0 0 512 512"},filterIcon:{name:"filter",content:'',viewBox:"0 0 512 512"},filterSmallIcon:{name:"filter-small",content:'',viewBox:"0 0 512 512"},filterSortAscSmallIcon:{name:"filter-sort-asc-small",content:'',viewBox:"0 0 512 512"},filterSortDescSmallIcon:{name:"filter-sort-desc-small",content:'',viewBox:"0 0 512 512"},flashManagerIcon:{name:"flash-manager",content:'',viewBox:"0 0 512 512"},flipHorizontalIcon:{name:"flip-horizontal",content:'',viewBox:"0 0 512 512"},flipVerticalIcon:{name:"flip-vertical",content:'',viewBox:"0 0 512 512"},folderAddIcon:{name:"folder-add",content:'',viewBox:"0 0 512 512"},folderIcon:{name:"folder",content:'',viewBox:"0 0 512 512"},folderMoreIcon:{name:"folder-more",content:'',viewBox:"0 0 512 512"},folderOpenIcon:{name:"folder-open",content:'',viewBox:"0 0 512 512"},folderUpIcon:{name:"folder-up",content:'',viewBox:"0 0 512 512"},fontFamilyIcon:{name:"font-family",content:'',viewBox:"0 0 512 512"},fontGrowIcon:{name:"font-grow",content:'',viewBox:"0 0 512 512"},fontShrinkIcon:{name:"font-shrink",content:'',viewBox:"0 0 512 512"},fontSizeIcon:{name:"font-size",content:'',viewBox:"0 0 512 512"},foregroundColorIcon:{name:"foreground-color",content:'',viewBox:"0 0 512 512"},formElementIcon:{name:"form-element",content:'',viewBox:"0 0 512 512"},formIcon:{name:"form",content:'',viewBox:"0 0 512 512"},formatCodeBlockIcon:{name:"format-code-block",content:'',viewBox:"0 0 512 512"},formulaFxIcon:{name:"formula-fx",content:'',viewBox:"0 0 512 512"},forwardIcon:{name:"forward",content:'',viewBox:"0 0 512 512"},fullscreenExitIcon:{name:"fullscreen-exit",content:'',viewBox:"0 0 512 512"},fullscreenIcon:{name:"fullscreen",content:'',viewBox:"0 0 512 512"},gapColumnIcon:{name:"gap-column",content:'',viewBox:"0 0 512 512"},gapRowIcon:{name:"gap-row",content:'',viewBox:"0 0 512 512"},gaugeLinearIcon:{name:"gauge-linear",content:'',viewBox:"0 0 512 512"},gaugeRadialIcon:{name:"gauge-radial",content:'',viewBox:"0 0 512 512"},gearIcon:{name:"gear",content:'',viewBox:"0 0 512 512"},gearsIcon:{name:"gears",content:'',viewBox:"0 0 512 512"},globeIcon:{name:"globe",content:'',viewBox:"0 0 512 512"},globeLinkIcon:{name:"globe-link",content:'',viewBox:"0 0 512 512"},globeOutlineIcon:{name:"globe-outline",content:'',viewBox:"0 0 512 512"},globeUnlinkIcon:{name:"globe-unlink",content:'',viewBox:"0 0 512 512"},googleBoxIcon:{name:"google-box",content:'',viewBox:"0 0 512 512"},googleIcon:{name:"google",content:'',viewBox:"0 0 512 512"},googlePlusBoxIcon:{name:"google-plus-box",content:'',viewBox:"0 0 512 512"},googlePlusIcon:{name:"google-plus",content:'',viewBox:"0 0 512 512"},graphIcon:{name:"graph",content:'',viewBox:"0 0 512 512"},grayscaleIcon:{name:"grayscale",content:'',viewBox:"0 0 512 512"},greaterOrEqualIcon:{name:"greater-or-equal",content:'',viewBox:"0 0 512 512"},gridIcon:{name:"grid",content:'',viewBox:"0 0 512 512"},gridLayoutIcon:{name:"grid-layout",content:'',viewBox:"0 0 512 512"},groupBoxIcon:{name:"group-box",content:'',viewBox:"0 0 512 512"},groupCollectionIcon:{name:"group-collection",content:'',viewBox:"0 0 512 512"},groupFooterSectionIcon:{name:"group-footer-section",content:'',viewBox:"0 0 512 512"},groupHeaderSectionIcon:{name:"group-header-section",content:'',viewBox:"0 0 512 512"},groupIcon:{name:"group",content:'',viewBox:"0 0 512 512"},groupSectionIcon:{name:"group-section",content:'',viewBox:"0 0 512 512"},h1Icon:{name:"h1",content:'',viewBox:"0 0 512 512"},h2Icon:{name:"h2",content:'',viewBox:"0 0 512 512"},h3Icon:{name:"h3",content:'',viewBox:"0 0 512 512"},h4Icon:{name:"h4",content:'',viewBox:"0 0 512 512"},h5Icon:{name:"h5",content:'',viewBox:"0 0 512 512"},h6Icon:{name:"h6",content:'',viewBox:"0 0 512 512"},handIcon:{name:"hand",content:'',viewBox:"0 0 512 512"},handleDragIcon:{name:"handle-drag",content:'',viewBox:"0 0 512 512"},handleResizeAltIcon:{name:"handle-resize-alt",content:'',viewBox:"0 0 512 512"},handleResizeIcon:{name:"handle-resize",content:'',viewBox:"0 0 512 512"},hdIcon:{name:"hd",content:'',viewBox:"0 0 512 512"},heartIcon:{name:"heart",content:'',viewBox:"0 0 512 512"},heartOutlineIcon:{name:"heart-outline",content:'',viewBox:"0 0 512 512"},homeIcon:{name:"home",content:'',viewBox:"0 0 512 512"},horizontalRuleIcon:{name:"horizontal-rule",content:'',viewBox:"0 0 512 512"},html5Icon:{name:"html5",content:'',viewBox:"0 0 512 512"},hyperlinkOpenIcon:{name:"hyperlink-open",content:'',viewBox:"0 0 512 512"},hyperlinkOpenSmIcon:{name:"hyperlink-open-sm",content:'',viewBox:"0 0 512 512"},imageAbsolutePositionIcon:{name:"image-absolute-position",content:'',viewBox:"0 0 512 512"},imageAddIcon:{name:"image-add",content:'',viewBox:"0 0 512 512"},imageEditIcon:{name:"image-edit",content:'',viewBox:"0 0 512 512"},imageExportIcon:{name:"image-export",content:'',viewBox:"0 0 512 512"},imageIcon:{name:"image",content:'',viewBox:"0 0 512 512"},imageMapEditorIcon:{name:"image-map-editor",content:'',viewBox:"0 0 512 512"},imageResizeIcon:{name:"image-resize",content:'',viewBox:"0 0 512 512"},imagesIcon:{name:"images",content:'',viewBox:"0 0 512 512"},importIcon:{name:"import",content:'',viewBox:"0 0 512 512"},inboxIcon:{name:"inbox",content:'',viewBox:"0 0 512 512"},increaseHorizontalSpacingIcon:{name:"increase-horizontal-spacing",content:'',viewBox:"0 0 512 512"},increaseVerticalSpacingIcon:{name:"increase-vertical-spacing",content:'',viewBox:"0 0 512 512"},indentIcon:{name:"indent",content:'',viewBox:"0 0 512 512"},infoCircleIcon:{name:"info-circle",content:'',viewBox:"0 0 512 512"},inheritedIcon:{name:"inherited",content:'',viewBox:"0 0 512 512"},insertBottomIcon:{name:"insert-bottom",content:'',viewBox:"0 0 512 512"},insertMiddleIcon:{name:"insert-middle",content:'',viewBox:"0 0 512 512"},insertTopIcon:{name:"insert-top",content:'',viewBox:"0 0 512 512"},invertColorsIcon:{name:"invert-colors",content:'',viewBox:"0 0 512 512"},italicIcon:{name:"italic",content:'',viewBox:"0 0 512 512"},jsIcon:{name:"js",content:'',viewBox:"0 0 512 512"},justifyContentAroundAltIcon:{name:"justify-content-around-alt",content:'',viewBox:"0 0 512 512"},justifyContentAroundIcon:{name:"justify-content-around",content:'',viewBox:"0 0 512 512"},justifyContentBetweenAltIcon:{name:"justify-content-between-alt",content:'',viewBox:"0 0 512 512"},justifyContentBetweenIcon:{name:"justify-content-between",content:'',viewBox:"0 0 512 512"},justifyContentCenterAltIcon:{name:"justify-content-center-alt",content:'',viewBox:"0 0 512 512"},justifyContentCenterIcon:{name:"justify-content-center",content:'',viewBox:"0 0 512 512"},justifyContentEndAltIcon:{name:"justify-content-end-alt",content:'',viewBox:"0 0 512 512"},justifyContentEndIcon:{name:"justify-content-end",content:'',viewBox:"0 0 512 512"},justifyContentStartAltIcon:{name:"justify-content-start-alt",content:'',viewBox:"0 0 512 512"},justifyContentStartIcon:{name:"justify-content-start",content:'',viewBox:"0 0 512 512"},kpiStatusDenyIcon:{name:"kpi-status-deny",content:'',viewBox:"0 0 512 512"},kpiStatusHoldIcon:{name:"kpi-status-hold",content:'',viewBox:"0 0 512 512"},kpiStatusOpenIcon:{name:"kpi-status-open",content:'',viewBox:"0 0 512 512"},launchIcon:{name:"launch",content:'',viewBox:"0 0 512 512"},layout1By4Icon:{name:"layout-1-by-4",content:'',viewBox:"0 0 512 512"},layout2By2Icon:{name:"layout-2-by-2",content:'',viewBox:"0 0 512 512"},layoutIcon:{name:"layout",content:'',viewBox:"0 0 512 512"},layoutSideBySideIcon:{name:"layout-side-by-side",content:'',viewBox:"0 0 512 512"},layoutStackedIcon:{name:"layout-stacked",content:'',viewBox:"0 0 512 512"},lessOrEqualIcon:{name:"less-or-equal",content:'',viewBox:"0 0 512 512"},letterSpaceIcon:{name:"letter-space",content:'',viewBox:"0 0 512 512"},levelDownIcon:{name:"level-down",content:'',viewBox:"0 0 512 512"},levelToTopIcon:{name:"level-to-top",content:'',viewBox:"0 0 512 512"},levelUpIcon:{name:"level-up",content:'',viewBox:"0 0 512 512"},lineHeightIcon:{name:"line-height",content:'',viewBox:"0 0 512 512"},linkAddIcon:{name:"link-add",content:'',viewBox:"0 0 512 512"},linkIcon:{name:"link",content:'',viewBox:"0 0 512 512"},linkVerticalIcon:{name:"link-vertical",content:'',viewBox:"0 0 512 512"},linkedinBoxIcon:{name:"linkedin-box",content:'',viewBox:"0 0 512 512"},linkedinIcon:{name:"linkedin",content:'',viewBox:"0 0 512 512"},listLatinBigIcon:{name:"list-latin-big",content:'',viewBox:"0 0 512 512"},listLatinSmallIcon:{name:"list-latin-small",content:'',viewBox:"0 0 512 512"},listOrderedIcon:{name:"list-ordered",content:'',viewBox:"0 0 512 512"},listRomanBigIcon:{name:"list-roman-big",content:'',viewBox:"0 0 512 512"},listRomanLowerIcon:{name:"list-roman-lower",content:'',viewBox:"0 0 512 512"},listRomanSmallIcon:{name:"list-roman-small",content:'',viewBox:"0 0 512 512"},listRomanUpperIcon:{name:"list-roman-upper",content:'',viewBox:"0 0 512 512"},listUnorderedIcon:{name:"list-unordered",content:'',viewBox:"0 0 512 512"},listUnorderedOutlineIcon:{name:"list-unordered-outline",content:'',viewBox:"0 0 512 512"},listUnorderedSquareIcon:{name:"list-unordered-square",content:'',viewBox:"0 0 512 512"},lockIcon:{name:"lock",content:'',viewBox:"0 0 512 512"},loginIcon:{name:"login",content:'',viewBox:"0 0 512 512"},logoutIcon:{name:"logout",content:'',viewBox:"0 0 512 512"},makeHorizontalSpacingEqualIcon:{name:"make-horizontal-spacing-equal",content:'',viewBox:"0 0 512 512"},makeSameHeightIcon:{name:"make-same-height",content:'',viewBox:"0 0 512 512"},makeSameSizeIcon:{name:"make-same-size",content:'',viewBox:"0 0 512 512"},makeSameWidthIcon:{name:"make-same-width",content:'',viewBox:"0 0 512 512"},makeVerticalSpacingEqualIcon:{name:"make-vertical-spacing-equal",content:'',viewBox:"0 0 512 512"},mapMarkerIcon:{name:"map-marker",content:'',viewBox:"0 0 512 512"},mapMarkerTargetIcon:{name:"map-marker-target",content:'',viewBox:"0 0 512 512"},maxHeightIcon:{name:"max-height",content:'',viewBox:"0 0 512 512"},maxWidthIcon:{name:"max-width",content:'',viewBox:"0 0 512 512"},mediaManagerIcon:{name:"media-manager",content:'',viewBox:"0 0 512 512"},menuIcon:{name:"menu",content:'',viewBox:"0 0 512 512"},minHeightIcon:{name:"min-height",content:'',viewBox:"0 0 512 512"},minWidthIcon:{name:"min-width",content:'',viewBox:"0 0 512 512"},minusCircleIcon:{name:"minus-circle",content:'',viewBox:"0 0 512 512"},minusIcon:{name:"minus",content:'',viewBox:"0 0 512 512"},minusOutlineIcon:{name:"minus-outline",content:'',viewBox:"0 0 512 512"},minusSmIcon:{name:"minus-sm",content:'',viewBox:"0 0 512 512"},mirrorIcon:{name:"mirror",content:'',viewBox:"0 0 512 512"},moreHorizontalIcon:{name:"more-horizontal",content:'',viewBox:"0 0 512 512"},moreVerticalIcon:{name:"more-vertical",content:'',viewBox:"0 0 512 512"},musicNotesIcon:{name:"music-notes",content:'',viewBox:"0 0 512 512"},myspaceBoxIcon:{name:"myspace-box",content:'',viewBox:"0 0 512 512"},myspaceIcon:{name:"myspace",content:'',viewBox:"0 0 512 512"},nonRecurrenceIcon:{name:"non-recurrence",content:'',viewBox:"0 0 512 512"},notEqualIcon:{name:"not-equal",content:'',viewBox:"0 0 512 512"},outdentIcon:{name:"outdent",content:'',viewBox:"0 0 512 512"},outlineOffsetIcon:{name:"outline-offset",content:'',viewBox:"0 0 512 512"},outlineWidthIcon:{name:"outline-width",content:'',viewBox:"0 0 512 512"},overlapIcon:{name:"overlap",content:'',viewBox:"0 0 512 512"},paddingBottomIcon:{name:"padding-bottom",content:'',viewBox:"0 0 512 512"},paddingIcon:{name:"padding",content:'',viewBox:"0 0 512 512"},paddingLeftIcon:{name:"padding-left",content:'',viewBox:"0 0 512 512"},paddingRightIcon:{name:"padding-right",content:'',viewBox:"0 0 512 512"},paddingTopIcon:{name:"padding-top",content:'',viewBox:"0 0 512 512"},pageFooterSectionIcon:{name:"page-footer-section",content:'',viewBox:"0 0 512 512"},pageHeaderSectionIcon:{name:"page-header-section",content:'',viewBox:"0 0 512 512"},paletteIcon:{name:"palette",content:'',viewBox:"0 0 512 512"},paneFreezeIcon:{name:"pane-freeze",content:'',viewBox:"0 0 512 512"},paperPlaneIcon:{name:"paper-plane",content:'',viewBox:"0 0 512 512"},paperclipAltIcon:{name:"paperclip-alt",content:'',viewBox:"0 0 512 512"},paperclipIcon:{name:"paperclip",content:'',viewBox:"0 0 512 512"},paragraphAddIcon:{name:"paragraph-add",content:'',viewBox:"0 0 512 512"},parameterBooleanIcon:{name:"parameter-boolean",content:'',viewBox:"0 0 512 512"},parameterDateTimeIcon:{name:"parameter-date-time",content:'',viewBox:"0 0 512 512"},parameterFloatIcon:{name:"parameter-float",content:'',viewBox:"0 0 512 512"},parameterIntegerIcon:{name:"parameter-integer",content:'',viewBox:"0 0 512 512"},parameterStringIcon:{name:"parameter-string",content:'',viewBox:"0 0 512 512"},parametersByteArrayIcon:{name:"parameters-byte-array",content:'',viewBox:"0 0 512 512"},parametersIcon:{name:"parameters",content:'',viewBox:"0 0 512 512"},parametersUnknownIcon:{name:"parameters-unknown",content:'',viewBox:"0 0 512 512"},passwordIcon:{name:"password",content:'',viewBox:"0 0 512 512"},pauseIcon:{name:"pause",content:'',viewBox:"0 0 512 512"},pauseSmIcon:{name:"pause-sm",content:'',viewBox:"0 0 512 512"},pencilIcon:{name:"pencil",content:'',viewBox:"0 0 512 512"},percentIcon:{name:"percent",content:'',viewBox:"0 0 512 512"},photosIcon:{name:"photos",content:'',viewBox:"0 0 512 512"},pinIcon:{name:"pin",content:'',viewBox:"0 0 512 512"},pinterestBoxIcon:{name:"pinterest-box",content:'',viewBox:"0 0 512 512"},pinterestIcon:{name:"pinterest",content:'',viewBox:"0 0 512 512"},playIcon:{name:"play",content:'',viewBox:"0 0 512 512"},playSmIcon:{name:"play-sm",content:'',viewBox:"0 0 512 512"},playlistIcon:{name:"playlist",content:'',viewBox:"0 0 512 512"},plusCircleIcon:{name:"plus-circle",content:'',viewBox:"0 0 512 512"},plusIcon:{name:"plus",content:'',viewBox:"0 0 512 512"},plusOutlineIcon:{name:"plus-outline",content:'',viewBox:"0 0 512 512"},plusSmIcon:{name:"plus-sm",content:'',viewBox:"0 0 512 512"},pointerIcon:{name:"pointer",content:'',viewBox:"0 0 512 512"},positionBottomIcon:{name:"position-bottom",content:'',viewBox:"0 0 512 512"},positionLeftIcon:{name:"position-left",content:'',viewBox:"0 0 512 512"},positionRightIcon:{name:"position-right",content:'',viewBox:"0 0 512 512"},positionTopIcon:{name:"position-top",content:'',viewBox:"0 0 512 512"},printIcon:{name:"print",content:'',viewBox:"0 0 512 512"},puzzlePieceIcon:{name:"puzzle-piece",content:'',viewBox:"0 0 512 512"},qrCodeIcon:{name:"qr-code",content:'',viewBox:"0 0 512 512"},qrCodeOutlineIcon:{name:"qr-code-outline",content:'',viewBox:"0 0 512 512"},qrCodeScannerIcon:{name:"qr-code-scanner",content:'',viewBox:"0 0 512 512"},questionCircleIcon:{name:"question-circle",content:'',viewBox:"0 0 512 512"},radiobuttonCheckedIcon:{name:"radiobutton-checked",content:'',viewBox:"0 0 512 512"},radiobuttonIcon:{name:"radiobutton",content:'',viewBox:"0 0 512 512"},redditBoxIcon:{name:"reddit-box",content:'',viewBox:"0 0 512 512"},redditIcon:{name:"reddit",content:'',viewBox:"0 0 512 512"},redoIcon:{name:"redo",content:'',viewBox:"0 0 512 512"},regularExpressionIcon:{name:"regular-expression",content:'',viewBox:"0 0 512 512"},removeHorizontalSpacingIcon:{name:"remove-horizontal-spacing",content:'',viewBox:"0 0 512 512"},removeVerticalSpacingIcon:{name:"remove-vertical-spacing",content:'',viewBox:"0 0 512 512"},reorderIcon:{name:"reorder",content:'',viewBox:"0 0 512 512"},replaceAllIcon:{name:"replace-all",content:'',viewBox:"0 0 512 512"},replaceSingleIcon:{name:"replace-single",content:'',viewBox:"0 0 512 512"},reportElementIcon:{name:"report-element",content:'',viewBox:"0 0 512 512"},rewindIcon:{name:"rewind",content:'',viewBox:"0 0 512 512"},rightDoubleQuotesIcon:{name:"right-double-quotes",content:'',viewBox:"0 0 512 512"},rotateIcon:{name:"rotate",content:'',viewBox:"0 0 512 512"},rotateLeftIcon:{name:"rotate-left",content:'',viewBox:"0 0 512 512"},rotateRightIcon:{name:"rotate-right",content:'',viewBox:"0 0 512 512"},roundCornersIcon:{name:"round-corners",content:'',viewBox:"0 0 512 512"},rowFreezeIcon:{name:"row-freeze",content:'',viewBox:"0 0 512 512"},rowsIcon:{name:"rows",content:'',viewBox:"0 0 512 512"},rssBoxIcon:{name:"rss-box",content:'',viewBox:"0 0 512 512"},rssIcon:{name:"rss",content:'',viewBox:"0 0 512 512"},saveIcon:{name:"save",content:'',viewBox:"0 0 512 512"},searchIcon:{name:"search",content:'',viewBox:"0 0 512 512"},selectAllIcon:{name:"select-all",content:'',viewBox:"0 0 512 512"},selectBoxIcon:{name:"select-box",content:'',viewBox:"0 0 512 512"},setColumnPositionIcon:{name:"set-column-position",content:'',viewBox:"0 0 512 512"},shapeLineIcon:{name:"shape-line",content:'',viewBox:"0 0 512 512"},shapesIcon:{name:"shapes",content:'',viewBox:"0 0 512 512"},shareIcon:{name:"share",content:'',viewBox:"0 0 512 512"},sharpenIcon:{name:"sharpen",content:'',viewBox:"0 0 512 512"},signatureIcon:{name:"signature",content:'',viewBox:"0 0 512 512"},silverlightIcon:{name:"silverlight",content:'',viewBox:"0 0 512 512"},sizeToGridIcon:{name:"size-to-grid",content:'',viewBox:"0 0 512 512"},slidersIcon:{name:"sliders",content:'',viewBox:"0 0 512 512"},slnIcon:{name:"sln",content:'',viewBox:"0 0 512 512"},snapGridIcon:{name:"snap-grid",content:'',viewBox:"0 0 512 512"},snapToGridlinesIcon:{name:"snap-to-gridlines",content:'',viewBox:"0 0 512 512"},snapToSnaplinesIcon:{name:"snap-to-snaplines",content:'',viewBox:"0 0 512 512"},sortAscIcon:{name:"sort-asc",content:'',viewBox:"0 0 512 512"},sortAscSmallIcon:{name:"sort-asc-small",content:'',viewBox:"0 0 512 512"},sortClearIcon:{name:"sort-clear",content:'',viewBox:"0 0 512 512"},sortDescIcon:{name:"sort-desc",content:'',viewBox:"0 0 512 512"},sortDescSmallIcon:{name:"sort-desc-small",content:'',viewBox:"0 0 512 512"},spellCheckerIcon:{name:"spell-checker",content:'',viewBox:"0 0 512 512"},starIcon:{name:"star",content:'',viewBox:"0 0 512 512"},starOutlineIcon:{name:"star-outline",content:'',viewBox:"0 0 512 512"},stickIcon:{name:"stick",content:'',viewBox:"0 0 512 512"},stopIcon:{name:"stop",content:'',viewBox:"0 0 512 512"},stopSmIcon:{name:"stop-sm",content:'',viewBox:"0 0 512 512"},strikethroughIcon:{name:"strikethrough",content:'',viewBox:"0 0 512 512"},stripAllFormattingIcon:{name:"strip-all-formatting",content:'',viewBox:"0 0 512 512"},stripCssFormatIcon:{name:"strip-css-format",content:'',viewBox:"0 0 512 512"},stripFontElementsIcon:{name:"strip-font-elements",content:'',viewBox:"0 0 512 512"},stripSpanElementsIcon:{name:"strip-span-elements",content:'',viewBox:"0 0 512 512"},stripWordFormattingIcon:{name:"strip-word-formatting",content:'',viewBox:"0 0 512 512"},stumbleUponBoxIcon:{name:"stumble-upon-box",content:'',viewBox:"0 0 512 512"},stumbleUponIcon:{name:"stumble-upon",content:'',viewBox:"0 0 512 512"},subreportIcon:{name:"subreport",content:'',viewBox:"0 0 512 512"},subscriptIcon:{name:"subscript",content:'',viewBox:"0 0 512 512"},sumIcon:{name:"sum",content:'',viewBox:"0 0 512 512"},supscriptIcon:{name:"supscript",content:'',viewBox:"0 0 512 512"},symbolIcon:{name:"symbol",content:'',viewBox:"0 0 512 512"},tableAddIcon:{name:"table-add",content:'',viewBox:"0 0 512 512"},tableAlignBottomCenterIcon:{name:"table-align-bottom-center",content:'',viewBox:"0 0 512 512"},tableAlignBottomLeftIcon:{name:"table-align-bottom-left",content:'',viewBox:"0 0 512 512"},tableAlignBottomRightIcon:{name:"table-align-bottom-right",content:'',viewBox:"0 0 512 512"},tableAlignMiddleCenterIcon:{name:"table-align-middle-center",content:'',viewBox:"0 0 512 512"},tableAlignMiddleLeftIcon:{name:"table-align-middle-left",content:'',viewBox:"0 0 512 512"},tableAlignMiddleRightIcon:{name:"table-align-middle-right",content:'',viewBox:"0 0 512 512"},tableAlignRemoveIcon:{name:"table-align-remove",content:'',viewBox:"0 0 512 512"},tableAlignTopCenterIcon:{name:"table-align-top-center",content:'',viewBox:"0 0 512 512"},tableAlignTopLeftIcon:{name:"table-align-top-left",content:'',viewBox:"0 0 512 512"},tableAlignTopRightIcon:{name:"table-align-top-right",content:'',viewBox:"0 0 512 512"},tableBodyIcon:{name:"table-body",content:'',viewBox:"0 0 512 512"},tableCellDeleteIcon:{name:"table-cell-delete",content:'',viewBox:"0 0 512 512"},tableCellIcon:{name:"table-cell",content:'',viewBox:"0 0 512 512"},tableCellPropertiesIcon:{name:"table-cell-properties",content:'',viewBox:"0 0 512 512"},tableColumnDeleteIcon:{name:"table-column-delete",content:'',viewBox:"0 0 512 512"},tableColumnGroupsIcon:{name:"table-column-groups",content:'',viewBox:"0 0 512 512"},tableColumnInsertLeftIcon:{name:"table-column-insert-left",content:'',viewBox:"0 0 512 512"},tableColumnInsertRightIcon:{name:"table-column-insert-right",content:'',viewBox:"0 0 512 512"},tableCornerIcon:{name:"table-corner",content:'',viewBox:"0 0 512 512"},tableDeleteIcon:{name:"table-delete",content:'',viewBox:"0 0 512 512"},tableIcon:{name:"table",content:'',viewBox:"0 0 512 512"},tablePositionCenterIcon:{name:"table-position-center",content:'',viewBox:"0 0 512 512"},tablePositionEndIcon:{name:"table-position-end",content:'',viewBox:"0 0 512 512"},tablePositionStartIcon:{name:"table-position-start",content:'',viewBox:"0 0 512 512"},tablePropertiesIcon:{name:"table-properties",content:'',viewBox:"0 0 512 512"},tableRowDeleteIcon:{name:"table-row-delete",content:'',viewBox:"0 0 512 512"},tableRowGroupsIcon:{name:"table-row-groups",content:'',viewBox:"0 0 512 512"},tableRowInsertAboveIcon:{name:"table-row-insert-above",content:'',viewBox:"0 0 512 512"},tableRowInsertBelowIcon:{name:"table-row-insert-below",content:'',viewBox:"0 0 512 512"},tableUnmergeIcon:{name:"table-unmerge",content:'',viewBox:"0 0 512 512"},tableWizardIcon:{name:"table-wizard",content:'',viewBox:"0 0 512 512"},tellAFriendBoxIcon:{name:"tell-a-friend-box",content:'',viewBox:"0 0 512 512"},tellAFriendIcon:{name:"tell-a-friend",content:'',viewBox:"0 0 512 512"},templateManagerIcon:{name:"template-manager",content:'',viewBox:"0 0 512 512"},textClipIcon:{name:"text-clip",content:'',viewBox:"0 0 512 512"},textOverflowIcon:{name:"text-overflow",content:'',viewBox:"0 0 512 512"},textTruncateIcon:{name:"text-truncate",content:'',viewBox:"0 0 512 512"},textWrapArrowIcon:{name:"text-wrap-arrow",content:'',viewBox:"0 0 512 512"},textWrapIcon:{name:"text-wrap",content:'',viewBox:"0 0 512 512"},textareaIcon:{name:"textarea",content:'',viewBox:"0 0 512 512"},textboxHiddenIcon:{name:"textbox-hidden",content:'',viewBox:"0 0 512 512"},textboxIcon:{name:"textbox",content:'',viewBox:"0 0 512 512"},thumbnailsDownIcon:{name:"thumbnails-down",content:'',viewBox:"0 0 512 512"},thumbnailsLeftIcon:{name:"thumbnails-left",content:'',viewBox:"0 0 512 512"},thumbnailsRightIcon:{name:"thumbnails-right",content:'',viewBox:"0 0 512 512"},thumbnailsUpIcon:{name:"thumbnails-up",content:'',viewBox:"0 0 512 512"},tocSectionIcon:{name:"toc-section",content:'',viewBox:"0 0 512 512"},tocSectionLevelIcon:{name:"toc-section-level",content:'',viewBox:"0 0 512 512"},toggleFullScreenModeIcon:{name:"toggle-full-screen-mode",content:'',viewBox:"0 0 512 512"},toolbarFloatIcon:{name:"toolbar-float",content:'',viewBox:"0 0 512 512"},trackChangesAcceptAllIcon:{name:"track-changes-accept-all",content:'',viewBox:"0 0 512 512"},trackChangesAcceptIcon:{name:"track-changes-accept",content:'',viewBox:"0 0 512 512"},trackChangesEnableIcon:{name:"track-changes-enable",content:'',viewBox:"0 0 512 512"},trackChangesIcon:{name:"track-changes",content:'',viewBox:"0 0 512 512"},trackChangesRejectAllIcon:{name:"track-changes-reject-all",content:'',viewBox:"0 0 512 512"},trackChangesRejectIcon:{name:"track-changes-reject",content:'',viewBox:"0 0 512 512"},transparencyIcon:{name:"transparency",content:'',viewBox:"0 0 512 512"},trashIcon:{name:"trash",content:'',viewBox:"0 0 512 512"},tumblrBoxIcon:{name:"tumblr-box",content:'',viewBox:"0 0 512 512"},tumblrIcon:{name:"tumblr",content:'',viewBox:"0 0 512 512"},twitterBoxIcon:{name:"twitter-box",content:'',viewBox:"0 0 512 512"},twitterIcon:{name:"twitter",content:'',viewBox:"0 0 512 512"},underlineIcon:{name:"underline",content:'',viewBox:"0 0 512 512"},undoIcon:{name:"undo",content:'',viewBox:"0 0 512 512"},ungroupIcon:{name:"ungroup",content:'',viewBox:"0 0 512 512"},unlinkIcon:{name:"unlink",content:'',viewBox:"0 0 512 512"},unlinkVerticalIcon:{name:"unlink-vertical",content:'',viewBox:"0 0 512 512"},unlockIcon:{name:"unlock",content:'',viewBox:"0 0 512 512"},unpinIcon:{name:"unpin",content:'',viewBox:"0 0 512 512"},unstickIcon:{name:"unstick",content:'',viewBox:"0 0 512 512"},uploadIcon:{name:"upload",content:'',viewBox:"0 0 512 512"},userIcon:{name:"user",content:'',viewBox:"0 0 512 512"},validationDataIcon:{name:"validation-data",content:'',viewBox:"0 0 512 512"},validationXhtmlIcon:{name:"validation-xhtml",content:'',viewBox:"0 0 512 512"},vbIcon:{name:"vb",content:'',viewBox:"0 0 512 512"},vbprojIcon:{name:"vbproj",content:'',viewBox:"0 0 512 512"},videoExternalIcon:{name:"video-external",content:'',viewBox:"0 0 512 512"},vimeoBoxIcon:{name:"vimeo-box",content:'',viewBox:"0 0 512 512"},vimeoIcon:{name:"vimeo",content:'',viewBox:"0 0 512 512"},volumeDownIcon:{name:"volume-down",content:'',viewBox:"0 0 512 512"},volumeMuteIcon:{name:"volume-mute",content:'',viewBox:"0 0 512 512"},volumeUpIcon:{name:"volume-up",content:'',viewBox:"0 0 512 512"},warningCircleIcon:{name:"warning-circle",content:'',viewBox:"0 0 512 512"},warningTriangleIcon:{name:"warning-triangle",content:'',viewBox:"0 0 512 512"},wholeWordIcon:{name:"whole-word",content:'',viewBox:"0 0 512 512"},windowIcon:{name:"window",content:'',viewBox:"0 0 512 512"},windowMinimizeIcon:{name:"window-minimize",content:'',viewBox:"0 0 512 512"},windowRestoreIcon:{name:"window-restore",content:'',viewBox:"0 0 512 512"},wrenchIcon:{name:"wrench",content:'',viewBox:"0 0 512 512"},xCircleIcon:{name:"x-circle",content:'',viewBox:"0 0 512 512"},xIcon:{name:"x",content:'',viewBox:"0 0 512 512"},xOutlineIcon:{name:"x-outline",content:'',viewBox:"0 0 512 512"},yammerBoxIcon:{name:"yammer-box",content:'',viewBox:"0 0 512 512"},yammerIcon:{name:"yammer",content:'',viewBox:"0 0 512 512"},youtubeBoxIcon:{name:"youtube-box",content:'',viewBox:"0 0 512 512"},youtubeIcon:{name:"youtube",content:'',viewBox:"0 0 512 512"},zoomActualSizeIcon:{name:"zoom-actual-size",content:'',viewBox:"0 0 512 512"},zoomBestFitIcon:{name:"zoom-best-fit",content:'',viewBox:"0 0 512 512"},zoomInIcon:{name:"zoom-in",content:'',viewBox:"0 0 512 512"},zoomOutIcon:{name:"zoom-out",content:'',viewBox:"0 0 512 512"}});!function(e,t){var n=window.kendo,i=n.html,r=n.ui.Widget,o=e.extend,a=r.extend({init:function(t,o){var a=this;r.fn.init.call(a,t,o),delete o.name,a._icon=new i.HTMLFontIcon(t,e.extend({},o)),a.element=a.wrapper=a._icon.element,n.notify(a)},options:o({},i.HTMLFontIcon.fn.options,{name:"FontIcon"}),setOptions:function(t){var n=this;r.fn.setOptions.call(n,t),n._icon=new i.HTMLFontIcon(n.element,e.extend({},n.options))}}),s=r.extend({init:function(t,o){var a=this;r.fn.init.call(a,t,o),delete o.name,a._icon=new i.HTMLSvgIcon(t,e.extend({},o)),a.element=a.wrapper=a._icon.element,n.notify(a)},options:o({},i.HTMLSvgIcon.fn.options,{name:"SvgIcon"}),setOptions:function(t){var n=this;r.fn.setOptions.call(n,t),t.icon&&this.element.html(""),n._icon=new i.HTMLSvgIcon(n.element,e.extend({},n.options))}});n.ui.plugin(a),n.ui.plugin(s),n.setDefaults("iconType","svg"),n.ui.svgIcons=T,n.ui.icon=i.renderIcon}(window.kendo.jQuery);kendo;!function(e){var t=".kendo",n=window.kendo,i=n.deepExtend,r=n.drawing.util,o=r.defined,a=r.limitValue,s=r.eventCoordinates,l=n._outerWidth,c=n._outerHeight,d='
    '+n.ui.icon(e(''),{icon:"x"})+"
    ",u=n.Class.extend({init:function(t,n){this.element=e('
    '),this.content=this.element.children(".k-tooltip-content"),n=n||{},this.options=i({},this.options,this._tooltipOptions(n)),this.popupOptions={appendTo:n.appendTo,animation:n.animation,copyAnchorStyles:!1,collision:"fit fit"},this._openPopupHandler=this._openPopup.bind(this),this.surface=t,this._bindEvents()},options:{position:"top",showOn:"mouseenter",offset:7,autoHide:!0,hideDelay:0,showAfter:100},_bindEvents:function(){this._showHandler=this._showEvent.bind(this),this._surfaceLeaveHandler=this._surfaceLeave.bind(this),this._mouseleaveHandler=this._mouseleave.bind(this),this._mousemoveHandler=this._mousemove.bind(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"+t,this._surfaceLeaveHandler),this.element.on("click"+t,".k-tooltip-button",this._hideClick.bind(this)),this.element.on("mouseleave"+t,this._tooltipLeave.bind(this))},getPopup:function(){return this.popup||(this.popup=new n.ui.Popup(this.element,this.popupOptions)),this.popup},destroy:function(){var e=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"+t,this._surfaceLeaveHandler),this.element.off("click"+t),this.element.off("mouseleave"+t),e&&(e.destroy(),delete this.popup),delete this.popupOptions,clearTimeout(this._timeout),delete this.element,delete this.content,delete this.surface},_tooltipOptions:function(e){return{position:(e=e||{}).position,showOn:e.showOn,offset:e.offset,autoHide:e.autoHide,width:e.width,height:e.height,content:e.content,shared:e.shared,hideDelay:e.hideDelay,showAfter:e.showAfter}},_tooltipShape:function(e){for(;e&&!e.options.tooltip;)e=e.parent;return e},_updateContent:function(e,t,i){var r=i.content;if(n.isFunction(r)&&(r=r({element:t,target:e})),r)return this.content.html(r),!0},_position:function(e,t,n,i){var r=t.position,o=t.offset||0,l=this.surface,c=l._instance._elementOffset(),d=l.getSize(),u=l._instance._offset,h=e.bbox(),p=n.width,f=n.height,m=0,g=0;if(h.origin.translate(c.left,c.top),u&&h.origin.translate(-u.x,-u.y),"cursor"==r&&i){var v=s(i);m=v.x-p/2,g=v.y-f-o}else"left"==r?(m=h.origin.x-p-o,g=h.center().y-f/2):"right"==r?(m=h.bottomRight().x+o,g=h.center().y-f/2):"bottom"==r?(m=h.center().x-p/2,g=h.bottomRight().y+o):(m=h.center().x-p/2,g=h.origin.y-f-o);return{left:a(m,c.left,c.left+d.width),top:a(g,c.top,c.top+d.height)}},show:function(e,t){this._show(e,e,i({},this.options,this._tooltipOptions(e.options.tooltip),t))},hide:function(){var e=this.popup,t=this._current;delete this._current,clearTimeout(this._showTimeout),e&&e.visible()&&t&&!this.surface.trigger("tooltipClose",{element:t.shape,target:t.target,popup:e})&&e.close()},_hideClick:function(e){e.preventDefault(),this.hide()},_show:function(e,t,n,i,r){var o=this._current;if(clearTimeout(this._timeout),!o||!(o.shape===t&&n.shared||o.target===e)){clearTimeout(this._showTimeout);var a=this.getPopup();if(!this.surface.trigger("tooltipOpen",{element:t,target:e,popup:a})&&this._updateContent(e,t,n)){this._autoHide(n);var s=this._measure(n);a.visible()&&a.close(!0),this._current={options:n,elementSize:s,shape:t,target:e,position:this._position(n.shared?t:e,n,s,i)},r?this._showTimeout=setTimeout(this._openPopupHandler,n.showAfter||0):this._openPopup()}}},_openPopup:function(){var e=this._current.position;this.getPopup().open(e.left,e.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=e(d).appendTo(this.element))},_showEvent:function(e){var t=this._tooltipShape(e.element);if(t){var n=i({},this.options,this._tooltipOptions(t.options.tooltip));n&&n.showOn==e.type&&this._show(e.element,t,n,e.originalEvent,!0)}},_measure:function(e){this.element.css({width:o(e.width)?e.width:"auto",height:o(e.height)?e.height:"auto"});var t=this.element.clone().appendTo(document.body).css({visibility:"hidden"}),n=l(t),i=c(t);return t.remove(),this.element.css({width:n,height:i}),{width:n,height:i}},_mouseleave:function(e){if(this.popup&&!this._popupRelatedTarget(e.originalEvent)){var t=this,n=t._current;n&&n.options.autoHide&&(t._timeout=setTimeout((function(){clearTimeout(t._showTimeout),t.hide()}),n.options.hideDelay||0))}},_mousemove:function(e){var t=this._current;if(t&&e.element){var n=t.options;if("cursor"==n.position){var i=this._position(e.element,n,t.elementSize,e.originalEvent);t.position=i,this.getPopup().wrapper.css({left:i.left,top:i.top})}}},_surfaceLeave:function(e){this.popup&&!this._popupRelatedTarget(e)&&(clearTimeout(this._showTimeout),this.hide())},_popupRelatedTarget:function(t){return t.relatedTarget&&e(t.relatedTarget).closest(this.popup.wrapper).length},_tooltipLeave:function(){var e=this,t=e._current;t&&t.options.autoHide&&(e._timeout=setTimeout((function(){e.hide()}),t.options.hideDelay||0))}});n.drawing.SurfaceTooltip=u}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.drawing,i=n.Surface,r=t.ui.Widget,o=t.deepExtend;t.support.svg=i.support.svg,t.support.canvas=i.support.canvas;var a=r.extend({init:function(e,t){r.fn.init.call(this,e,{}),this.options=o({},this.options,t),this._instance=i.create(this.element[0],t),this._instance.translate&&(this.translate=s),this._triggerInstanceHandler=this._triggerInstanceEvent.bind(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(e){this.trigger(e.type,e)},_bindHandler:function(e){this._instance.bind(e,this._triggerInstanceHandler)},draw:function(e){this._instance.draw(e)},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),r.fn.destroy.call(this)},exportVisual:function(){return this._instance.exportVisual()},eventTarget:function(e){return this._instance.eventTarget(e)},showTooltip:function(e,t){this._tooltip&&this._tooltip.show(e,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(e){this.element.css({width:e.width,height:e.height}),this._size=e,this._instance.currentSize(e),this._resize()},_resize:function(){this._instance.currentSize(this._size),this._instance._resize()},_enableTracking:function(){t.ui.Popup&&(this._tooltip=new n.SurfaceTooltip(this,this.options.tooltip||{}))}});function s(e){this._instance.translate(e)}t.ui.plugin(a),a.create=function(e,t){return new a(e,t)},t.drawing.Surface=a}(window.kendo.jQuery),function(e){var t=window.kendo.drawing,n=t.drawDOM;t.drawDOM=function(t,i){return n(e(t)[0],i)},t.drawDOM.drawText=t.drawText,t.drawDOM.getFontFaces=t.getFontFaces}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,r=".kendoValidator",o="k-invalid-msg",a=new RegExp(o,"i"),s="k-invalid",l="k-valid",c="k-validation-summary",d="k-text-error",u="k-messagebox k-messagebox-error",h="aria-invalid",p=/^[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,f=/^(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,m=":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",g=":checkbox:not([disabled],[readonly])",v="[type=number],[type=range]",_="blur",b="name",w="form",y="novalidate",k="validate",x="change",C="validateInput",S=function(e,t){return"string"==typeof t&&(t=new RegExp("^(?:"+t+")$")),t.test(e)},T=function(e,t,n){var i=e.val();return!e.filter(t).length||""===i||S(i,n)},D=function(e,t){return!!e.length&&null!=e[0].attributes[t]};function I(t){return e.parseHTML?e(e.parseHTML(t)):e(t)}function z(t,i){for(var r,o=e(),s=0,l=t.length;s",i=0;i'+t[i].message+"";return n+=""},A=i.extend({init:function(t,r){var o=this,a=function(t){var i,r=n.ui.validator.ruleResolvers||{},o={};for(i in r)e.extend(!0,o,r[i].resolve(t));return o}(t),s="["+n.attr("validate")+"!=false]";(r=r||{}).rules=e.extend({},n.ui.validator.rules,a.rules,r.rules),r.messages=e.extend({},n.ui.validator.messages,a.messages,r.messages),i.fn.init.call(o,t,r),o._errorTemplate=n.template(o.options.errorTemplate),o._summaryTemplate=n.template(o.options.validationSummary.template||E),o.element.is(w)&&o.element.attr(y,y),o._inputSelector=m+s,o._checkboxSelector=g+s,o._errors={},o._attachEvents(),o._isValidated=!1,o._validateOnInit()&&o.validate()},events:[k,x,C],options:{name:"Validator",errorTemplate:function(e){return''+e.message+""},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",captcha:"The text you entered doesn't match the image."},rules:{required:function(e){var t=!e.attr("name")&&!e.is(":checked"),n=e.attr("name"),i=n&&n.indexOf("'")>-1?'"':"'",r=e.attr("name")&&!this.element.find("input[name="+i+e.attr("name")+i+"]:checked").length,o=e.filter("[type=checkbox]").length&&(t||r),a=e.filter("[type=radio]").length&&!this.element.find("input[name="+i+e.attr("name")+i+"]:checked").length,s=e.val();return!(D(e,"required")&&(!s||""===s||0===s.length||o||a))},pattern:function(e){return!e.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length||""===e.val()||S(e.val(),e.attr("pattern"))},min:function(e){return!e.filter(v+",["+n.attr("type")+"=number]").filter("[min]").length||""===e.val()||(parseFloat(e.attr("min"))||0)<=n.parseFloat(e.val())},max:function(e){return!e.filter(v+",["+n.attr("type")+"=number]").filter("[max]").length||""===e.val()||(parseFloat(e.attr("max"))||0)>=n.parseFloat(e.val())},step:function(e){if(e.filter(v+",["+n.attr("type")+"=number]").filter("[step]").length&&""!==e.val()){var t,i=parseFloat(e.attr("min"))||0,r=parseFloat(e.attr("step"))||1,o=parseFloat(e.val()),a=(s=((s=r)+"").split(".")).length>1?s[1].length:0;return a?(t=Math.pow(10,a),Math.floor((o-i)*t)%(r*t)/Math.pow(100,a)==0):(o-i)%r==0}var s;return!0},email:function(e){return T(e,"[type=email],["+n.attr("type")+"=email]",p)},url:function(e){return T(e,"[type=url],["+n.attr("type")+"=url]",f)},date:function(e){return!e.filter("[type^=date],["+n.attr("type")+"=date]").length||""===e.val()||null!==n.parseDate(e.val(),e.attr(n.attr("format")))},captcha:function(e){if(e.filter("["+n.attr("role")+"=captcha]").length){var t=this,i=n.widgetInstance(e),r=function(e){return null!=e};if(e.data("captcha_validating")||r(i.isValid())||!i.getCaptchaId()||(e.data("captcha_validating",!0),t._validating=!0,i.validate().done((function(){t._validating=!1,t._checkElement(e)})).fail((function(e){t._validating=!1,e.error&&"handler_not_defined"===e.error&&window.console.warn("Captcha's validationHandler is not defined! You should either define a proper validation endpoint or declare a callback function to ensure the required behavior.")}))),r(i.isValid()))return e.removeData("captcha_validating"),i.isValid()}return!0}},validateOnBlur:!0,validationSummary:!1},_allowSubmit:function(){return n.ui.validator.allowSubmit(this.element,this.errors())},_validateOnInit:function(){return n.ui.validator.validateOnInit(this.element)},destroy:function(){i.fn.destroy.call(this),this.element.off(r),this.validationSummary&&(this.validationSummary.off(r),this.validationSummary=null)},value:function(){return!!this._isValidated&&0===this.errors().length},_submit:function(e){return!(!this.validate()&&!this._allowSubmit()||this._validating)||(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault(),!1)},_checkElement:function(e){var t=this.value();this.validateInput(e),this.value()!==t&&this.trigger(x)},_attachEvents:function(){var t=this;t.element.is(w)&&t.element.on("submit"+r,t._submit.bind(t)),t.options.validateOnBlur&&(t.element.is(m)?(t.element.on(_+r,(function(){t._checkElement(t.element)})),t.element.is(g)&&t.element.on("click"+r,(function(){t._checkElement(t.element)}))):(t.element.on(_+r,t._inputSelector,(function(){t._checkElement(e(this))})),t.element.on("click"+r,t._checkboxSelector,(function(){t._checkElement(e(this))}))))},validate:function(){var e,t,n,i=!1,r=this.value();if(this._errors={},this.element.is(m))i=this.validateInput(this.element);else{var o=!1;for(t=0,n=(e=this.element.find(this._inputSelector)).length;t")),field:p})),v=!t.attr(h),_=t.is(".k-input-inner"),w=t.parent(".k-input");if(t.removeAttr(h),t.hasClass("k-hidden")&&(i=n.widgetInstance(t.closest(".k-signature"))),t.is("[type=radio]")&&(i=n.widgetInstance(t.closest(".k-radio-list"))),t.is("[type=checkbox]")&&(i=n.widgetInstance(t.closest(".k-checkbox-list"))),u||t.data("captcha_validating"))delete o._errors[p];else{o._errors[p]=m;var y=f.attr("id");if(o._decorateMessageContainer(g,p),y&&g.attr("id",y),0!==f.length)f.replaceWith(g);else{i=i||n.widgetInstance(t);var k=t.parent().get(0),x=t.next().get(0),S=t.prev().get(0);!i&&t.is("[type=radio]")&&(i=n.widgetInstance(t.closest(".k-radio-list"))),!i&&t.is("[type=checkbox]")&&(i=n.widgetInstance(t.closest(".k-checkbox-list"))),i&&i.wrapper&&(i.element!==i.wrapper||["Signature","RadioGroup","CheckBoxGroup"].indexOf(i.options.name)>-1)?g.insertAfter(i.wrapper):k&&"LABEL"===k.nodeName?g.insertAfter(k):x&&M(x,t[0])?g.insertAfter(x):S&&M(S,t[0])?g.insertAfter(t):_&&w.length?g.insertAfter(w):g.insertAfter(t)}g.removeClass("k-hidden"),t.attr(h,!0)}if(v!==u&&this.trigger(C,{valid:u,input:t,error:m,field:p}),(i=i&&"Signature"==i.options.name?i:n.widgetInstance(t))&&(i._inputWrapper||i.wrapper)||(t.toggleClass(s,!u),t.toggleClass(l,u)),i){var T=i._inputWrapper||i.wrapper,D=i._inputLabel;T&&(T.toggleClass(s,!u),T.toggleClass(l,u)),D&&D.toggleClass(d,!u)}if(v!==u){var z=g?g.attr("id"):f.attr("id");o._associateMessageContainer(t,z),this.options.validationSummary&&this.options.validateOnBlur&&this.showValidationSummary()}return u},hideMessages:function(){var e="."+o,t=this.element;this._disassociateMessageContainers(),t.is(m)?t.next(e).addClass("k-hidden"):t.find(e).addClass("k-hidden")},reset:function(){var e=this,t=e.element.find(".k-invalid"),n=e.element.find(".k-text-error");e._errors=[],e.hideMessages(),e.hideValidationSummary(),t.removeAttr(h),t.removeClass(s),n.removeClass(d)},_findMessageContainer:function(t){for(var i,r=n.ui.validator.messageLocators,o=e(),a=0,s=this.element.length;a").insertBefore(n.element)).addClass([c,u].join(" ")),t.attr("role","alert"),t.on("click"+r,n._summaryClick.bind(n)),t},_summaryClick:function(t){t.preventDefault();var i,r=e(t.target),o=this.element.find("[name='"+r.data("field")+"']");o.length&&(i=n.getWidgetFocusableElement(o))&&i.trigger("focus")},showValidationSummary:function(){var e,t=this,n=t.validationSummary,i=t._errorsByName();n||(n=t.validationSummary=t._renderSummary()),e=I(t._summaryTemplate({errors:i})),n.html(e),n.toggleClass("k-hidden",!i.length)},hideValidationSummary:function(){var e=this.validationSummary;e&&e.addClass("k-hidden")}});n.ui.plugin(A)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.support,r=n.Class,o=n.Observable,a=Date.now,s=e.extend,l=i.mobileOS,c=l&&l.android,d=800,u=i.browser.msie?5:0,h="press",p="hold",f="select",m="start",g="move",v="end",_="cancel",b="tap",w="doubleTap",y="release",k="gesturechange",x="gestureend",C="gesturetap",S={api:0,touch:0,mouse:9,pointer:9},T=!i.touch||i.mouseAndTouchPresent;function D(e,t){var n=e.x.location,i=e.y.location,r=t.x.location,o=t.y.location,a=n-r,s=i-o;return{center:{x:(n+r)/2,y:(i+o)/2},distance:Math.sqrt(a*a+s*s)}}function I(e){var t,n,r,o=[],a=e.originalEvent,s=e.currentTarget,l=0;if(e.api)o.push({id:2,event:e,target:e.target,currentTarget:e.target,location:e,type:"api"});else if(e.type.match(/touch/))for(t=(n=a?a.changedTouches:[]).length;l1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var e=this.touches;e.length>0;)e.pop().dispose()},_isMoved:function(){return e.grep(this.touches,(function(e){return e.isMoved()})).length},_select:function(e){this.allowSelection&&!this.trigger(f,{event:e})||e.preventDefault()},_start:function(t){var n,i,r=this,o=0,a=r.filter,s=I(t),l=s.length,c=t.which;if(!(c&&c>1||r._maxTouchesReached()))for(A.current=null,r.currentTarget=t.currentTarget,r.stopPropagation&&t.stopPropagation();o1?this.cancel():(this._downStarted=(new Date).getTime(),this._downTarget=e.target)},_up:function(e){var t=(new Date).getTime(),n=e.target;(!e.which||1===e.which)&&t0?this._end(e):this._start(e),this._preventCancel=!0):this.cancel(),this._downStarted=0,this._downTarget=null},destroy:function(){var e=this;e._destroyed||(e._destroyed=!0,e.element.kendoDestroy(e.eventNS),e.surface.kendoDestroy(e.eventNS),e.element.removeData("handler"),e.surface.removeData("handler"),e._disposeAll(),e.unbind(),delete e.surface,delete e.element,delete e.currentTarget)},capture:function(){H.current=this},cancel:function(){this._preventCancel?this._preventCancel=!1:this.touches&&this.touches.length>0&&(this._disposeAll(),this.trigger(_))},notify:function(e,t){return t.clickMoveClick=!0,this.trigger(e,s(t,{type:e}))},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var e=this.touches;e.length>0;)e.pop().dispose()},_start:function(t){var n,i,r=this,o=0,a=r.filter,s=I(t),l=s.length,c=t.which;if(!(c&&c>1||r._maxTouchesReached()))for(H.current=null,r.currentTarget=t.currentTarget,r.stopPropagation&&t.stopPropagation();othis.max||er,e||t.trigger(b,t))}}),F=c.extend({init:function(e){var t=this;c.fn.init.call(t),t.x=new R(h({horizontal:!0},e)),t.y=new R(h({horizontal:!1},e)),t.container=e.container,t.forcedMinScale=e.minScale,t.maxScale=e.maxScale||100,t.bind(b,e)},rescale:function(e){this.x.rescale(e),this.y.rescale(e),this.refresh()},centerCoordinates:function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},refresh:function(){var e=this;e.x.update(),e.y.update(),e.enabled=e.x.enabled||e.y.enabled,e.minScale=e.forcedMinScale||Math.min(e.x.minScale,e.y.minScale),e.fitScale=Math.max(e.x.minScale,e.y.minScale),e.trigger(b)}}),P=c.extend({init:function(e){h(this,e),c.fn.init.call(this)},outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},dragMove:function(e){var t=this,n=t.dimension,i=t.axis,r=t.movable,o=r[i]+e;n.enabled&&((on.max&&e>0)&&(e*=t.resistance),r.translateAxis(i,e),t.trigger(b,t))}}),B=s.extend({init:function(t){var n,i,r,o,a=this;h(a,{elastic:!0},t),r=a.elastic?.5:0,o=a.movable,a.x=n=new P({axis:"x",dimension:a.dimensions.x,resistance:r,movable:o}),a.y=i=new P({axis:"y",dimension:a.dimensions.y,resistance:r,movable:o}),a.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(e){a.gesture=e,a.offset=a.dimensions.container.offset()},press:function(t){e(t.event.target).closest("a").is("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(e){var t,r=a.gesture,s=r.center,l=e.center,c=e.distance/r.distance,d=a.dimensions.minScale,u=a.dimensions.maxScale;o.scale<=d&&c<1&&(c+=.8*(1-c)),o.scale*c>=u&&(c=u/o.scale);var h=o.x+a.offset.left,p=o.y+a.offset.top;t={x:(h-s.x)*c+l.x-h,y:(p-s.y)*c+l.y-p},o.scaleWith(c),n.dragMove(t.x),i.dragMove(t.y),a.dimensions.rescale(o.scale),a.gesture=e,e.preventDefault()},move:function(e){e.event.target.tagName.match(/textarea|input/i)||(n.dimension.enabled||i.dimension.enabled?(n.dragMove(e.x.delta),i.dragMove(e.y.delta),e.preventDefault()):e.touch.skip())},end:function(e){e.preventDefault()}})}}),L=r.transitions.prefix+"Transform";A=r.hasHW3D?function(e,t,n){return"translate3d("+e+"px,"+t+"px,0) scale("+n+")"}:function(e,t,n){return"translate("+e+"px,"+t+"px) scale("+n+")"};var V=c.extend({init:function(t){var n=this;c.fn.init.call(n),n.element=e(t),n.element[0].style.webkitTransformOrigin="left top",n.x=0,n.y=0,n.scale=1,n._saveCoordinates(A(n.x,n.y,n.scale))},translateAxis:function(e,t){this[e]+=t,this.refresh()},scaleTo:function(e){this.scale=e,this.refresh()},scaleWith:function(e){this.scale*=e,this.refresh()},translate:function(e){this.x+=e.x,this.y+=e.y,this.refresh()},moveAxis:function(e,t){this[e]=t,this.refresh()},moveTo:function(e){h(this,e),this.refresh()},refresh:function(){var e,t=this,n=t.x,r=t.y;t.round&&(n=Math.round(n),r=Math.round(r)),(e=A(n,r,t.scale))!=t.coordinates&&(i.support.browser.msie&&i.support.browser.version<10?(t.element[0].style.position="absolute",t.element[0].style.left=t.x+"px",t.element[0].style.top=t.y+"px"):t.element[0].style[L]=e,t._saveCoordinates(e),t.trigger(b))},_saveCoordinates:function(e){this.coordinates=e}});function O(e,t){var n,i=t.options.group,r=e[i];if(l.fn.destroy.call(t),r.length>1){for(n=0;na.height(),r=o.body.scrollWidth>a.width()):(i=e.offsetHeight<=e.scrollHeight,r=e.offsetWidth<=e.scrollWidth);var c=e.scrollTop+t.y,d=i&&c>0&&c0&&ut.max?t.max:t.min;e._moveTo(n)},_moveTo:function(e){this.transition.moveTo({location:e,duration:500,ease:h.easeOutExpo})}}),y=p.extend({init:function(e){n.effects.Animation.fn.init.call(this),a(this,e,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return f(this.offset.y)<5&&f(this.offset.x)<5},onEnd:function(){this.moveTo(this.destination),this.callback&&this.callback.call()},setCoordinates:function(e,t){this.offset={},this.origin=e,this.destination=t},setCallback:function(e){e&&n.isFunction(e)?this.callback=e:e=undefined},_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}}}),k=l.extend({init:function(t){var n=this,i="x"===t.axis,r=e('
    ');i&&r.attr("aria-orientation","horizontal"),a(n,t,{element:r,elementSize:0,movable:new c(r),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:i?"width":"height"}),n.scrollMovable.bind(v,n.refresh.bind(n)),n.container.append(r),t.alwaysVisible&&n.show()},refresh:function(){var e=this,t=e.axis,n=e.dimension,i=n.size,r=e.scrollMovable,o=i/n.total,a=Math.round(-r[t]*o),s=Math.round(i*o);o>=1?this.element.css("display","none"):this.element.css("display",""),a+s>i?s=i-a:a<0&&(s+=a,a=0),e.elementSize!=s&&(e.element.css(e.size,s+"px"),e.elementSize=s),e._ariaValue(a,n.size-e.elementSize),e.movable.moveAxis(t,a)},show:function(){this.element.css({opacity:.7,visibility:"visible"})},hide:function(){this.alwaysVisible||this.element.css({opacity:0})},_ariaValue:function(e,t){var n=this.element;e>t&&(e=t),n.attr("aria-valuemax",t),n.attr("aria-valuenow",e)}}),x=s.extend({init:function(t,i){var r=this;if(s.fn.init.call(r,t,i),t=r.element,r._native=r.options.useNative&&n.support.hasNativeScrolling,r._native)return t.addClass("km-native-scroller").prepend('
    '),void a(r,{scrollElement:t,fixedContainer:t.children().first()});t.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('
    ').prepend('
    ');var o=t.children().eq(1),l=new n.TapCapture(t),h=new c(o),p=new u({element:o,container:t,forcedEnabled:r.options.zoom}),m=this.options.avoidScrolling,g=new n.UserEvents(t,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:r.options.zoom,supportDoubleTap:r.options.supportDoubleTap,start:function(t){p.refresh();var n=f(t.x.velocity),i=f(t.y.velocity),o=2*n>=i,a=2*i>=n;!e.contains(r.fixedContainer[0],t.event.target)&&!m(t)&&r.enabled&&(p.x.enabled&&o||p.y.enabled&&a)?g.capture():g.cancel()}}),w=new d({movable:h,dimensions:p,userEvents:g,elastic:r.options.elastic}),k=new b({movable:h,dimensions:p,userEvents:g,tapCapture:l}),x=new y({moveTo:function(e){r.scrollTo(e.x,e.y)}});h.bind(v,(function(){r.scrollTop=-h.y,r.scrollLeft=-h.x,r.trigger(_,{scrollTop:r.scrollTop,scrollLeft:r.scrollLeft})})),r.options.mousewheelScrolling&&t.on("DOMMouseScroll mousewheel",this._wheelScroll.bind(this)),a(r,{movable:h,dimensions:p,zoomSnapBack:k,animatedScroller:x,userEvents:g,pane:w,tapCapture:l,pulled:!1,enabled:!0,scrollElement:o,scrollTop:0,scrollLeft:0,fixedContainer:t.children().first()}),r._initAxis("x"),r._initAxis("y"),r._wheelEnd=function(){r._wheel=!1,r.userEvents.end(0,r._wheelY)},p.refresh(),r.options.pullToRefresh&&r._initPullToRefresh()},_wheelScroll:function(e){if(!e.ctrlKey){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=n.wheelDeltaY(e);t&&(this._wheelY+=t,this.userEvents.move(0,this._wheelY)),e.preventDefault()}},makeVirtual:function(){this.dimensions.y.makeVirtual()},virtualSize:function(e,t){this.dimensions.y.virtualSize(e,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:["pull",_,"resize"],_resize:function(){this._native||this.contentResized()},setOptions:function(e){s.fn.setOptions.call(this,e),e.pullToRefresh&&this._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 e=this.dimensions;e.refresh(),this._scale(e.fitScale),this.movable.moveTo(e.centerCoordinates())},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},scrollTo:function(e,t){this._native?(n.scrollLeft(this.scrollElement,f(e)),this.scrollElement.scrollTop(f(t))):(this.dimensions.refresh(),this.movable.moveTo({x:e,y:t}))},animatedScrollTo:function(e,t,n){var i,r;this._native?this.scrollTo(e,t):(i={x:this.movable.x,y:this.movable.y},r={x:e,y:t},this.animatedScroller.setCoordinates(i,r),this.animatedScroller.setCallback(n),this.animatedScroller.start())},pullHandled:function(){var e=this;e.refreshHint.removeClass(g),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd(),e.userEvents.cancel()},destroy:function(){s.fn.destroy.call(this),this.userEvents&&this.userEvents.destroy()},_scale:function(e){this.dimensions.rescale(e),this.movable.scaleTo(e)},_initPullToRefresh:function(){var e=this;e.dimensions.y.forceEnabled(),e.pullTemplate=n.template(e.options.messages.pullTemplate),e.releaseTemplate=n.template(e.options.messages.releaseTemplate),e.refreshTemplate=n.template(e.options.messages.refreshTemplate),e.scrollElement.prepend(''+e.pullTemplate({})+""),e.refreshHint=e.scrollElement.children().first(),e.hintContainer=e.refreshHint.children(".km-template"),e.pane.y.bind("change",e._paneChange.bind(e)),e.userEvents.bind("end",e._dragEnd.bind(e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(m).addClass(g),e.hintContainer.html(e.refreshTemplate({})),e.yinertia.freeze(e.options.pullOffset/2),e.trigger("pull"))},_paneChange:function(){var e=this;e.movable.y/.5>e.options.pullOffset?e.pulled||(e.pulled=!0,e.refreshHint.removeClass(g).addClass(m),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(m),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var t,i=this,r=i.element.attr("id"),o=i.movable,a=i.dimensions[e],s=i.tapCapture,l=i.pane[e];r||(r=n.guid(),i.element.attr("id",r)),t=new k({axis:e,movable:o,dimension:a,container:i.element,alwaysVisible:i.options.visibleScrollHints,controlsId:r}),a.bind(v,(function(){t.refresh()})),l.bind(v,(function(){t.show()})),i[e+"inertia"]=new w({axis:e,paneAxis:l,movable:o,tapCapture:s,userEvents:i.userEvents,dimension:a,elastic:i.options.elastic,friction:i.options.friction||.96,velocityMultiplier:i.options.velocityMultiplier||10,end:function(){t.hide(),i.trigger("scrollEnd",{axis:e,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft})}})}});o.plugin(x)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.html.HTMLBase,r=i.extend({init:function(e,t){i.fn.init.call(this,e,t),this._wrapper()},options:{name:"HTMLChip",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base",attr:{},icon:"",iconClass:"",iconAttr:{},removable:!1,removableAttr:{},removeIcon:"x-circle",removeIconClass:"",content:"",text:"",actions:[],stylingOptions:["size","rounded","fillMode","themeColor"]},_wrapper:function(){var t=this,i=t.options;i.text=i.text||i.label,t.wrapper=t.element.wrap("
    ").parent().attr(i.attr),t._addClasses(),i.icon?t.wrapper.prepend(e(n.ui.icon({icon:i.icon,size:"small",iconClass:"k-chip-icon"+(i.iconClass?" "+i.iconClass:"")})).attr(i.iconAttr)):i.iconClass?t.wrapper.prepend(e("").attr(i.iconAttr)):i.avatarClass&&t.wrapper.prepend(e("").attr(i.iconAttr)),t.element.addClass("k-chip-content"),i.text&&t.element.html(''+i.text+""),!1===i.visible&&t.wrapper.addClass("k-hidden"),!0===i.selected&&t.wrapper.addClass("k-selected"),!1===i.enabled&&t.wrapper.addClass("k-disabled"),(i.actions&&i.actions.length>0||i.removable)&&t._actions()},_actions:function(){var t=this,i=t.options;if(t.actionsWrapper=e(""),t.actionsWrapper.appendTo(t.wrapper),i.actions&&i.actions.length>0)for(var r=0;r"+n.ui.icon({icon:o.icon,iconClass:"k-chip-icon"})+"").attr(o.attr?o.attr:{}))}i.removable&&t.actionsWrapper.append(e(""+n.ui.icon({icon:i.removeIcon,iconClass:"k-chip-icon"})+"").attr(i.removableAttr))}});e.extend(n.html,{renderChip:function(t,n){return t&&!e.isPlainObject(t)||(n=t,t=e("")),new r(t,n).html()},HTMLChip:r}),n.cssProperties.registerPrefix("HTMLChip","k-chip-"),n.cssProperties.registerValues("HTMLChip",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Widget,r=n.html,o=n.ui,a=n.keys,s="select",l="click",c="remove",d=".kendoChip",u="k-chip-remove-action",h="k-selected",p="k-disabled",f=i.extend({init:function(o,a){var s=this;i.fn.init.call(s,o,a),r.renderChip(o,e.extend({},s.options)),s.wrapper=s.element.closest(".k-chip"),s._enabled=s.options.enabled=a.enabled!==t?a.enabled:!Boolean(s.element.is("[disabled]")),s._selected=s.options.selected,s._selectable=s.options.selectable,s._setTabIndex(),s._applyAriaAttributes(),s._bindEvents(),n.notify(s)},options:{name:"Chip",enabled:!0,selectable:!1,selected:!1,removable:!1,icon:"",iconClass:"",avatarClass:"",label:"",removeIcon:"x-circle",removeIconClass:"",fillMode:"solid",rounded:"medium",size:"medium",themeColor:"base"},events:[s,l,c],destroy:function(){this.wrapper.off(d),i.fn.destroy.call(this)},setOptions:function(e){var t=this;t.wrapper.off(d),t.element.insertBefore(t.wrapper),t.wrapper.remove(),i.fn.setOptions.call(t,e),t.element.empty(),r.renderChip(t.element,t.options),t.wrapper=t.element.closest(".k-chip"),t._setTabIndex(),t._applyAriaAttributes(),t._bindEvents()},enable:function(e){var n=this;if(e===t)return n._enabled;n._enabled=!1!==e,n.wrapper.toggleClass(p,!n._enabled),n.wrapper.attr("aria-disabled",!n._enabled)},select:function(e){var n=this;if(e==t)return n._selected;e=!1!==e,n._selectable&&(n._selected=e,n.wrapper.toggleClass(h,e)),n._applyAriaAttributes()},focus:function(){this._enabled&&this.wrapper.focus()},_bindEvents:function(){var e=this,t=e._click.bind(e),n=e._remove.bind(e),i=e._keydown.bind(e);e.wrapper.on("click touchend"+d,t).on("click touchend"+d,"."+u,n).on("keydown"+d,i)},_click:function(e){e.preventDefault(),e.stopPropagation();var t=this;t.enable()?t.trigger(l,{originalEvent:e})||t._triggerSelect(t,e):e.preventDefault()},_remove:function(e){e.preventDefault(),e.stopPropagation();this.enable()?this.trigger(c,{originalEvent:e}):e.preventDefault()},_triggerSelect:function(e,t){var n=this;n._selectable&&n._enabled&&!n.trigger(s,{originalEvent:t})&&n._toggleSelect()},_toggleSelect:function(){this.select(!this.select())},_keydown:function(t){var n=this,i=e(t.target),r=t.keyCode;if(r===a.ENTER||r===a.SPACEBAR){if(!n.enable())return void t.preventDefault();if(n.trigger(l,{originalEvent:t}))return;n._triggerSelect(i,t),r===a.SPACEBAR&&t.preventDefault()}else r!==a.DELETE&&r!==a.BACKSPACE||n.options.removable&&n.trigger(c,{originalEvent:t})},_setTabIndex:function(){var t=this,n=t.enable()?t.options.tabindex||"0":"-1";t.options.attributes&&t.options.attributes.class&&(t.options.attributes.class=(t.wrapper.attr("class")||"")+" "+t.options.attributes.class),t.wrapper.attr(e.extend({},t.options.attributes,{tabindex:n,ariaSelectedAttributeName:null}))},_applyAriaAttributes:function(){var e=this,t=(e.options.attributes||{}).role||"button";e.wrapper.attr("role",t),e._selectable&&"button"==t&&e.wrapper.attr("aria-pressed",e._selected),e.wrapper.attr("aria-disabled",!1===e.enable())}});o.plugin(f)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.html.HTMLBase,r=i.extend({init:function(e,t){var n=this;i.fn.init.call(n,e,t),n.wrapper=n.element.addClass("k-chip-list"),n._applyAriaAttributes(t),n._addClasses()},options:{name:"HTMLChipList",size:"medium",stylingOptions:["size"]},_applyAriaAttributes:function(t){var n=this,i=((t=e.extend({selectable:"none"},t)).attributes||{})["aria-label"];"none"!==t.selectable?n.element.attr({"aria-multiselectable":"multiple"===t.selectable,role:"listbox","aria-label":i||n.element.attr("id")+" listbox","aria-orientation":"horizontal"}):n.element.removeAttr("role aria-label aria-multiselectable aria-orientation")}});e.extend(n.html,{renderChipList:function(n,i){return(arguments[0]===t||e.isPlainObject(arguments[0]))&&(i=n,n=e("
    ")),new r(n,i).html()},HTMLChipList:r}),n.cssProperties.registerPrefix("HTMLChipList","k-chip-list-")}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o=n.keys,a=e.isPlainObject,s=e.isEmptyObject,l=".kendoChipList",c=".",d="select",u="remove",h=n.html,p={widget:"k-chip-list",item:"k-chip",selected:"k-selected",disabled:"k-disabled",enabledItemSelector:"k-chip:not(.k-disabled)"},f=r.extend({init:function(t,n){var i=this;n=n||{},r.fn.init.call(i,t,n),h.renderChipList(t,e.extend({},n)),i._selectable=i.options.selectable,i._bindEvents(),i._items()},options:{name:"ChipList",selectable:"none",items:[],fillMode:"solid",rounded:"medium",size:"medium",itemSize:"medium"},events:[d,u],destroy:function(){var e=this;e._keydownProxy&&(e.unbind(e._keydownProxy),e._keydownProxy=null),e._selectProxy&&(e.unbind(e._selectProxy),e._selectProxy=null),e._removeProxy&&(e.unbind(e._removeProxy),e._removeProxy=null),e.element.off(l),e.element.find("[data-role='chip']").each((function(){e._getChipFromElement(this).destroy()})),r.fn.destroy.call(this)},_updateCssClasses:function(){var e=this,t=e.options,i=p;e.element.removeClass((function(t,n){0===n.indexOf("k-")&&e.element.removeClass(n)})),e.element.addClass(i.widget),e.element.addClass(n.getValidCssClass("k-chip-list-","size",t.size))},_getInitializeChipOptions:function(t){var n=this,i=n.options,r=e.extend(t.attributes||{},{tabindex:"-1"});return"none"!==i.selectable&&(r.role="option",r["aria-selected"]=t.selected),(i.removable||t.removable)&&(r["aria-keyshortcuts"]="Enter Delete"),e.extend({fillMode:i.fillMode,size:i.itemSize,rounded:i.rounded,selectable:"none"!==i.selectable,removable:i.removable,remove:n._removeProxy,select:n._selectProxy},t,{attributes:r})},_getChipFromElement:function(t){return e(t).getKendoChip()||e(t).find("[data-role='chip']").getKendoChip()},_items:function(){for(var t,n,i,r,o=this,a=o.options.items,s=0;s"),o.element.append(i),o._createChip(i,t);(r=o._getFirstNavigatableItem())&&o._applyTabIndex(o.items().index(r)),"single"===o._selectable&&(n=o.items().filter(c+p.selected)).each((function(e,t){if(e!==n.length-1){var i=o._getChipFromElement(t);i&&i.select(!1)}}))},_isItem:function(t){return(t=e(t)).is(c+p.item)&&!!this.element.find(t).length},_applyTabIndex:function(t){var n=this.item(+t?+t:0);this.items().each((function(t,n){e(n).attr("tabindex","-1")})),n.attr("tabindex","0")},_createChip:function(e,t){return e.kendoChip(t)},_bindEvents:function(){var e=this;e._keydownProxy=e._keydown.bind(e),e._selectProxy=e._select.bind(e),e._removeProxy=e._remove.bind(e),e.element.on("keydown"+l,c+p.item,e._keydownProxy)},_select:function(e){var t=e.sender;"none"!=this._selectable?this._triggerSelect(t,e):e.preventDefault()},_triggerSelect:function(e,t){var n,i=this;i.element.is(c+p.disabled)||i.trigger(d,{originalEvent:t,item:e})||"single"===i._selectable&&(n=i.select()).length>0&&n.each((function(t,n){var r=i._getChipFromElement(n);r&&r!==e&&r.select(!1)}))},_remove:function(e){var t=e.sender;this.trigger(u,{originalEvent:e,item:e.sender})||this._removeItem(t)},_removeItem:function(e){if(e){var t=e.wrapper;e.destroy(),t.remove(),this._focusNavigatableItem()}},_keydown:function(t){var n=e(t.target).closest(c+p.item),i=t.keyCode;i!==o.LEFT&&i!==o.RIGHT||this._focusNavigatableItem(i,n)},_focusNavigatableItem:function(e,t){var n=this,i=n._getNavigatableItem(e,t);i&&(n._applyTabIndex(n.items().index(i)),i.focus())},_getFirstNavigatableItem:function(){return this.items().filter(c+p.enabledItemSelector).first()},_getLastNavigatableItem:function(){return this.items().filter(c+p.enabledItemSelector).last()},_getNavigatableItem:function(e,t){var n;return n=t||this._getFirstNavigatableItem(),e===o.LEFT&&t&&(n=t.prevAll(c+p.enabledItemSelector).first()),e===o.RIGHT&&t&&(n=t.nextAll(c+p.enabledItemSelector).first()),n.length?n:null},items:function(){return this.element.children()},select:function(e,t){var n,i=this,r=i.items().filter(c+p.selected);if(!e)return r;t=!1!==t,(n=i._getChipFromElement(e))&&("single"===i._selectable&&(r=i.select()).length>0&&r.each((function(t,n){var r=i._getChipFromElement(n);r&&r!==e&&r.select(!1)})),n.select(t))},enable:function(e,t){var n=this._getChipFromElement(e);t=!1!==t,n&&n.enable(t)},item:function(e){return isNaN(e)?null:this.items().eq(e)},itemById:function(e){return this.element.find("#"+e)},add:function(t,n){var i,r,o=this,l="append",c=o.element;n&&o._isItem(n)&&(l="before",c=e(n)),(i=o._getChipFromElement(t))?("none"!==o._selectable&&i.wrapper.attr("role","option"),c[l](i.wrapper)):t&&a(t)&&!s(t)&&(r=e(""),c[l](r),o._createChip(r,o._getInitializeChipOptions(t)))},remove:function(e){e&&this._isItem(e)&&(n.destroy(e),e.remove(),this._focusNavigatableItem())},setOptions:function(e){var t=this;r.fn.setOptions.call(this,e),t._updateCssClasses(),e.items&&(t.element.empty(),t._items())}});i.plugin(f)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Widget,r=n._outerWidth,o=n.attr,a=e.extend,s=e.each,l=!1,c="asc",d="group-sort",u="k-grouping-drop-container",h=function(t){var i=t.attr(n.attr("title"));return i&&(i=n.htmlEncode(i)),e('
    ').html(i||t.attr(n.attr("field"))).prepend(n.ui.icon({icon:"cancel",iconClass:"k-drag-status"}))},p=e('
    ');function f(e){e.contents().filter((function(){return 3===this.nodeType})).remove()}var m=i.extend({init:function(t,o){var s,c,m=this,g=n.guid(),v=m._intializePositions.bind(m);m._dropCuePositions=[];i.fn.init.call(m,t,o),l=n.support.isRtl(t),c=l?"right":"left",m.draggable=s=m.options.draggable||new n.ui.Draggable(m.element,{filter:m.options.draggableElements,hint:h,group:g}),m.groupContainer=e(m.options.groupContainer,m.element).kendoDropTarget({group:s.options.group,dragenter:function(e){m._canDrag(e.draggable.currentTarget)&&(n.ui.icon(e.draggable.hint.find(".k-drag-status"),{icon:"plus"}),p.css(c,0).appendTo(m.groupContainer))},dragleave:function(e){n.ui.icon(e.draggable.hint.find(".k-drag-status"),{icon:"cancel"}),p.remove()},drop:function(t){var i,r=t.draggable.currentTarget,o=r.attr(n.attr("field")),s=r.attr(n.attr("title")),c=r.attr("id"),u=m.indicator(o),h=m._dropCuePositions,g=h[h.length-1],v="after",_=l||!g?0:g.element.parent().position().left,b=a({},m.options.sort,r.data(d)),w=b.dir;(r.hasClass("k-chip")||m._canDrag(r))&&(g?(i=m._dropCuePosition(n.getOffset(p).left+_+parseInt(g.element.css("marginLeft"),10)*(l?-1:1)+parseInt(g.element.css("marginRight"),10)))&&m._canDrop(e(u),i.element,i.left)&&(i.before&&(v="before"),i.element[v](u||m.buildIndicator(o,s,w,c).wrapper),m._setIndicatorSortOptions(o,b),m._change()):(f(m._messageContainer),m._list.element.show(),m._list.add(m.buildIndicator(o,s,w,c).element),m._setIndicatorSortOptions(o,b),m._change()))}}).kendoDraggable({filter:"div.k-chip",hint:h,group:s.options.group,dragcancel:m._dragCancel.bind(m),dragstart:function(e){var t=e.currentTarget,i=parseInt(t.css("marginLeft"),10),o=t.position(),a=l?o.left-i:o.left+r(t);v(),p.css("left",a).appendTo(m.groupContainer),n.ui.icon(this.hint.find(".k-drag-status"),{icon:"plus"})},dragend:function(){m._dragEnd(this)},drag:m._drag.bind(m)}),s.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){m._dragEnd(this)},dragcancel:m._dragCancel.bind(m),dragstart:function(e){m.options.allowDrag||m._canDrag(e.currentTarget)?v():e.preventDefault()},drag:m._drag.bind(m)}),m.dataSource=m.options.dataSource,m._messageContainer=m.groupContainer.find("."+u),m._messageContainer.length||(m._messageContainer=e("
    ").addClass(u).appendTo(m.groupContainer)),m._createList(),m.dataSource&&m._refreshHandler?m.dataSource.unbind("change",m._refreshHandler):m._refreshHandler=m.refresh.bind(m),m.dataSource&&(m.dataSource.bind("change",m._refreshHandler),m.refresh())},refresh:function(){var t=this,n=t.dataSource.group()||[],i=o("field"),r=o("title");t.groupContainer&&(t._list&&(t._list.remove(t._list.items()),t._list.element.hide()),n.length&&f(t._messageContainer),s(n,(function(n,o){var s=o.field,l=o.dir,c=t.element.find(t.options.filter).filter((function(){return e(this).attr(i)===s})),d=t.buildIndicator(s,c.attr(r),l,c.attr("id"));t._list.add(d.element),t._list.element.show(),t._setIndicatorSortOptions(s,a({},t.options.sort,{dir:l,compare:o.compare}))}))),t._invalidateGroupContainer()},destroy:function(){var e=this;i.fn.destroy.call(e),e.groupContainer.off(".kendoGroupable"),e.groupContainer.data("kendoDropTarget")&&e.groupContainer.data("kendoDropTarget").destroy(),e.groupContainer.data("kendoDraggable")&&e.groupContainer.data("kendoDraggable").destroy(),e.options.draggable||e.draggable.destroy(),e.dataSource&&e._refreshHandler&&(e.dataSource.unbind("change",e._refreshHandler),e._refreshHandler=null),e._list&&e._list.destroy(),e.groupContainer=e.element=e.draggable=null},events:["change","removeGroup"],options:{name:"Groupable",filter:"th",draggableElements:"th",messages:{empty:"Drag a column header and drop it here to group by that column"},sort:{dir:c,compare:null}},indicator:function(t){var i=e(".k-chip",this.groupContainer);return e.grep(i,(function(i){return e(i).attr(n.attr("field"))===t}))[0]},removeHandler:function(e){this._removeIndicator(e.sender.wrapper)},clickHandler:function(e){var t=e.sender.wrapper.find(".k-chip-icon"),n=t.attr(o("dir"))===c?"desc":c;t.attr(o("dir"),n),this._change()},buildIndicator:function(t,i,r,o){var a,s,l,d=this;return r=r||(d.options.sort||{}).dir||c,s=(l=(a=e("
    ").kendoChip({icon:"sort-"+("asc"==(r||"asc")?"asc-small":"desc-small"),iconClass:"k-chip-icon",label:""+(i||t),removable:!0,size:d.options.size||"medium",remove:d.removeHandler.bind(d),click:d.clickHandler.bind(d)}).data("kendoChip")).wrapper).find(".k-chip-icon").first(),l.attr("data-"+n.ns+"field",t),l.attr("data-"+n.ns+"title",i||""),o&&l.attr("data-"+n.ns+"id",o),s.attr("title","(sorted "+("asc"==r?"ascending":"descending")+")"),s.attr("data-"+n.ns+"dir",r),a},_setIndicatorSortOptions:function(t,n){e(this.indicator(t)).data(d,n)},aggregates:function(){var t,i,r;return this.element.find(this.options.filter).map((function(){var o=e(this),a=o.attr(n.attr("aggregates")),s=o.attr(n.attr("field"));if(a&&""!==a)for(t=a.split(","),a=[],i=0,r=t.length;i=a&&!l||te.right}))[0])&&(t={left:l?t.element.position().left+r(t.element)+c+d:t.element.position().left-s,element:t.element,before:!0}),t}},_drag:function(e){var t=this._dropCuePosition(e.x.location);t&&p.css({left:t.left,right:"auto"})},_canDrag:function(e){var t=e.attr(n.attr("field"));return"false"!=e.attr(n.attr("groupable"))&&t&&(e.hasClass("k-chip")||!this.indicator(t))},_canDrop:function(e,t,n){var i=e.next();return e[0]!==t[0]&&(!i[0]||t[0]!==i[0]||!l&&n>i.position().left||l&&n").kendoChipList({selectable:"none",size:t.options.size||"medium"}).data("kendoChipList"),t._list.element.insertBefore(t._messageContainer)}});n.ui.plugin(m)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n._outerWidth,r=n._outerHeight,o=n.getOffset,a=n.ui.Widget,s="change",l=a.extend({init:function(e,t){var l,c=this,d=n.guid()+"-reorderable";a.fn.init.call(c,e,t),e=c.element.addClass("k-reorderable"),t=c.options,c.draggable=l=t.draggable||new n.ui.Draggable(e,{group:d,autoScroll:!0,filter:t.filter,hint:t.hint}),c.options.dropFilter||(c.options.dropFilter=l.options.filter),c.reorderDropCue=c.options.reorderDropCue,e.find(t.dropFilter).kendoDropTarget({group:l.options.group,dragenter:function(e){var n=c._externalDraggable(e);if(c._draggable||n){n&&c._handleExternalDraggable(n);var a,s=this.element,l=!!c._isPartOfSortable(c._draggable)&&(!c._dropTargetAllowed(s)||c._isLastDraggable());if(c.toggleHintClass(e.draggable.hint,l),!l){var d={top:(a=o(s)).top,left:a.left},u="horizontal"===t.orientation;!t.smartPosition||t.inSameContainer&&!t.inSameContainer({source:s,target:c._draggable,sourceIndex:c._index(s),targetIndex:c._index(c._draggable)})?c._dropTarget=s:c._index(s)>c._index(c._draggable)&&t.smartPosition&&(d[u?"left":"top"]+=u?i(s):r(s)),c.reorderDropCue.css({height:r(s),top:d.top,left:d.left,zIndex:19e3}).appendTo(document.body),t.positionDropCue&&t.positionDropCue(c.reorderDropCue,s)}}},dragleave:function(e){c.toggleHintClass(e.draggable.hint,!0),c.reorderDropCue.remove(),c._dropTarget=null},drop:function(){if(c._dropTarget=null,c._draggable){var e=this.element,t=c._draggable,n=c._index(e),i="horizontal"===c.options.orientation?o(c.reorderDropCue).left>o(e).left:o(c.reorderDropCue).top>o(e).top;n=i?n+1:n,c._dropTargetAllowed(e)&&!c._isLastDraggable()&&c._index(t)!==n&&c.trigger(s,{element:c._draggable,target:e,oldIndex:c._index(t),newIndex:c._index(e),position:i?"after":"before"}),c.reorderDropCue&&c.reorderDropCue.remove()}}}),l.bind(["dragcancel","dragend","dragstart","drag"],{dragcancel:c._dragcancel.bind(c),dragend:c._dragend.bind(c),dragstart:c._dragstart.bind(c),drag:c._drag.bind(c)})},options:{name:"Reorderable",filter:"*",orientation:"horizontal",deniedIcon:"cancel",allowIcon:"plus",reorderDropCue:e('
    '),smartPosition:!0},events:[s],toggleHintClass:function(t,i){var r=this.options;(t=e(t)).find(".k-drag-status").length>0&&n.ui.icon(t.find(".k-drag-status").eq(0),{icon:i?r.deniedIcon:r.allowIcon})},_handleExternalDraggable:function(e){var t=this,n=t.options.dropFilter.trimStart();n&&">"==n[0]&&(n=n.substring(1)),t._dragcancelHandler=t._dragcancel.bind(t),t._dragendHandler=t._dragend.bind(t),t._dragstartHandler=t._dragstart.bind(t),t._dragHandler=t._drag.bind(t),t._draggable=e.currentTarget.closest(n),t._draggableInstance=e,t._elements=t.element.find(t.options.dropFilter),e.bind(["dragcancel","dragend","dragstart","drag"],{dragcancel:t._dragcancelHandler,dragend:t._dragendHandler,dragstart:t._dragstartHandler,drag:t._dragHandler})},_dragcancel:function(){var e=this;e._draggableInstance&&(e._dragcancelHandler||e._dragendHandler||e._dragstartHandler||e._dragHandler)&&e._draggableInstance.unbind({dragcancel:e._dragcancelHandler,dragend:e._dragendHandler,dragstart:e._dragstartHandler,drag:e._dragHandler}),e.reorderDropCue&&e.reorderDropCue.remove(),e._draggable=null,e._elements=null},_dragend:function(){var e=this;e._draggableInstance&&(e._dragcancelHandler||e._dragendHandler||e._dragstartHandler||e._dragHandler)&&e._draggableInstance.unbind({dragcancel:e._dragcancelHandler,dragend:e._dragendHandler,dragstart:e._dragstartHandler,drag:e._dragHandler}),e.reorderDropCue&&e.reorderDropCue.remove(),e._draggable=null,e._elements=null},_dragstart:function(t){var n=this,i=e(t.currentTarget),r=n.options.dropFilter.trimStart();r&&">"==r[0]&&(r=r.substring(1)),n._draggable=i.is(r)?i:i.closest(r),n._elements=n.element.find(n.options.dropFilter)},_drag:function(t){var n,a,s,l,c=this,d={},u=c.options.dropFilter.trimStart();if(u&&">"==u[0]&&(u=u.substring(1)),l=e(t.currentTarget).closest(u),!(!c._dropTarget||c.options.smartPosition&&t.sender.hint.find(".k-drag-status").is(".k-i-cancel,.k-svg-i-cancel"))){if(a=(n=c._index(c._dropTarget))>(a=c._index(l))?a+1:a,"horizontal"===c.options.orientation){var h=o(c._dropTarget).left,p=i(c._dropTarget);t.pageX>h+p/2?(d.left=h+p,n+=1):d.left=h}else{var f=o(c._dropTarget).top,m=r(c._dropTarget);t.pageY>f+m/2?(d.top=f+m,n+=1):d.top=f}c.reorderDropCue.css(d),c.options.positionDropCue&&c.options.positionDropCue(c.reorderDropCue,c._dropTarget),c._isPartOfSortable(l)&&(s=a===n||c.options.dragOverContainers&&!c.options.dragOverContainers(a,n)||t.clickMoveClick&&t.currentTarget.hasClass("k-drag-cell")&&0===e(t.elementUnderCursor).closest(".k-drag-cell").length,c.toggleHintClass(t.sender.hint,s))}},_isPartOfSortable:function(e){return this._elements.index(e)>=0},_externalDraggable:function(e){var t=this.options;return!this._draggable&&t.externalDraggable?t.externalDraggable(e):null},_isLastDraggable:function(){var e,t=this.options.inSameContainer,n=this._draggable[0],i=this._elements.get(),r=!1;if(!t)return!1;for(;!r&&i.length>0;)r=n!==(e=i.pop())&&t({source:n,target:e,sourceIndex:this._index(n),targetIndex:this._index(e)});return!r},_dropTargetAllowed:function(e){var t=this.options.inSameContainer,n=this.options.dragOverContainers,i=this._draggable;return i[0]!==e[0]&&(!t||!n||(!!t({source:i,target:e,sourceIndex:this._index(i),targetIndex:this._index(e)})||n(this._index(i),this._index(e))))},_index:function(e){return this._elements.index(e)},destroy:function(){var t=this;a.fn.destroy.call(t),t.element.find(t.options.dropFilter).each((function(){var t=e(this);t.data("kendoDropTarget")&&t.data("kendoDropTarget").destroy()})),t.draggable&&(t.draggable.destroy(),t.draggable.element=t.draggable=null),t.reorderDropCue.remove(),t.elements=t.reorderDropCue=t._elements=t._draggable=null}});n.ui.plugin(l)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o=n.isFunction,a=e.extend,s="horizontal",l="vertical",c="start",d="resize",u="resizeend",h=r.extend({init:function(e,t){var n=this;r.fn.init.call(n,e,t),n.orientation=n.options.orientation.toLowerCase()!=l?s:l,n._positionMouse=n.orientation==s?"x":"y",n._position=n.orientation==s?"left":"top",n._sizingDom=n.orientation==s?"outerWidth":"outerHeight",n.draggable=new i.Draggable(t.draggableElement||e,{distance:1,filter:t.handle,drag:n._resize.bind(n),dragcancel:n._cancel.bind(n),dragstart:n._start.bind(n),dragend:n._dragend.bind(n),clickMoveClick:t.clickMoveClick}),n.userEvents=n.draggable.userEvents},events:[d,u,c],options:{name:"Resizable",orientation:s,clickMoveClick:!1},resize:function(){},_max:function(e){var n=this,i=n.hint?n.hint[n._sizingDom]():0,r=n.options.max;return o(r)?r(e):r!==t?n._initialElementPosition+r-i:r},_min:function(e){var n=this.options.min;return o(n)?n(e):n!==t?this._initialElementPosition+n:n},_start:function(t){var n=this,i=n.options.hint,r=e(t.currentTarget);n._initialElementPosition=r.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,i&&(n.hint=o(i)?e(i(r)):i,n.hint.css({position:"absolute"}).css(n._position,n._initialElementPosition).appendTo(n.element)),n.trigger(c,t),n._maxPosition=n._max(t),n._minPosition=n._min(t),e(document.body).css("cursor",r.css("cursor"))},_resize:function(e){var n,i=this,r=i._maxPosition,o=i._minPosition,s=i._initialElementPosition+(e[i._positionMouse].location-i._initialMousePosition);n=o!==t?Math.max(o,s):s,i.position=n=r!==t?Math.min(r,n):n,i.hint&&i.hint.toggleClass(i.options.invalidClass||"",n==r||n==o).css(i._position,n),i.resizing=!0,i.trigger(d,a(e,{position:n}))},_dragend:function(e){this._stop(),this.trigger(u,a(e,{position:this.position}))},_stop:function(){var t=this;t.hint&&t.hint.remove(),t.resizing=!1,e(document.body).css("cursor","")},_cancel:function(e){var n=this;n.hint&&(n.position=t,n.hint.css(n._position,n._initialElementPosition),n._stop())},destroy:function(){var e=this;r.fn.destroy.call(e),e.draggable&&e.draggable.destroy()},press:function(e){if(e){var t=e.position(),n=this;n.userEvents.press(t.left,t.top,e[0]),n.targetPosition=t,n.target=e}},move:function(e){var n=this,i=n._position,r=n.targetPosition,o=n.position;o===t&&(o=r[i]),r[i]=o+e,n.userEvents.move(r.left,r.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});n.ui.plugin(h)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Widget,r=n._outerWidth,o=n._outerHeight,a="start",s="beforeMove",l="move",c="end",d="change",u="cancel",h="sort",p="remove",f="receive";function m(e){return e.clone()}function g(e){return e.clone().removeAttr("id").css("visibility","hidden")}var v=i.extend({init:function(e,t){var n=this;i.fn.init.call(n,e,t),n.options.placeholder||(n.options.placeholder=g),n.options.hint||(n.options.hint=m),n.draggable=n._createDraggable()},events:[a,s,l,c,d,u],options:{name:"Sortable",hint:null,placeholder:null,filter:">*",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(),i.fn.destroy.call(this)},_createDraggable:function(){var t=this,i=t.element,r=t.options;return new n.ui.Draggable(i,{filter:r.filter,hint:n.isFunction(r.hint)?r.hint:e(r.hint),holdToDrag:r.holdToDrag,container:r.container?e(r.container):null,cursorOffset:r.cursorOffset,axis:r.axis,ignore:r.ignore,autoScroll:r.autoScroll,dragstart:t._dragstart.bind(t),dragcancel:t._dragcancel.bind(t),drag:t._drag.bind(t),dragend:t._dragend.bind(t)})},_dragstart:function(t){var i=this.draggedElement=t.currentTarget,r=this.options.disabled,o=this.options.handler,s=this.options.placeholder,l=this.placeholder=n.isFunction(s)?e(s.call(this,i)):e(s);r&&i.is(r)||o&&!e(t.initialTarget).is(o)||this.trigger(a,{item:i,draggableEvent:t})?t.preventDefault():(i.css("display","none"),i.before(l),this._setCursor())},_dragcancel:function(){this._cancel(),this.trigger(u,{item:this.draggedElement}),this._resetCursor()},_drag:function(t){var n,i,r,o,a,s=this.draggedElement,l=this._findTarget(t),c={left:t.x.location,top:t.y.location},d={x:t.x.delta,y:t.y.delta},u=this.options.axis,h=this.options.moveOnDragEnter,p={item:s,list:this,draggableEvent:t};if("x"!==u&&"y"!==u){if(l){if(n=this._getElementCenter(l.element),i={left:Math.round(c.left-n.left),top:Math.round(c.top-n.top)},e.extend(p,{target:l.element}),l.appendToBottom)return void this._movePlaceholder(l,null,p);if(l.appendAfterHidden&&this._movePlaceholder(l,"next",p),this._isFloating(l.element)?d.x<0&&h||!h&&i.left<0?r="prev":(d.x>0&&h||!h&&i.left>0)&&(r="next"):d.y<0&&h||!h&&i.top<0?r="prev":(d.y>0&&h||!h&&i.top>0)&&(r="next"),r){for(o=(a="prev"===r?jQuery.fn.prev:jQuery.fn.next).call(l.element);o.length&&!o.is(":visible");)o=a.call(o);o[0]!=this.placeholder[0]&&this._movePlaceholder(l,r,p)}}}else this._movementByAxis(u,c,d[u],p)},_dragend:function(t){var n,i,r,o,a=this.placeholder,s=this.draggedElement,l=this.indexOf(s),u=this.indexOf(a),m=this.options.connectWith;this._resetCursor(),r={action:h,item:s,oldIndex:l,newIndex:u,draggableEvent:t},u>=0?i=this.trigger(c,r):(n=a.parents(m).getKendoSortable(),r.action=p,o=e.extend({},r,{action:f,oldIndex:-1,newIndex:n.indexOf(a)}),i=!(!this.trigger(c,r)&&!n.trigger(c,o))),i||u===l?this._cancel():(a.replaceWith(s),s.show(),this.draggable.dropped=!0,r={action:-1!=this.indexOf(s)?h:p,item:s,oldIndex:l,newIndex:this.indexOf(s),draggableEvent:t},this.trigger(d,r),n&&(o=e.extend({},r,{action:f,oldIndex:-1,newIndex:n.indexOf(s)}),n.trigger(d,o)))},_findTarget:function(t){var n,i,r=this._findElementUnderCursor(t),o=this.options.connectWith;return e.contains(this.element[0],r)?(i=(n=this.items()).filter(r)[0]||n.has(r)[0])?{element:e(i),sortable:this}:null:this.element[0]==r&&this._isEmpty()?{element:this.element,sortable:this,appendToBottom:!0}:this.element[0]==r&&this._isLastHidden()?{element:i=this.items().eq(0),sortable:this,appendAfterHidden:!0}:o?this._searchConnectedTargets(r,t):void 0},_findElementUnderCursor:function(t){var i=n.elementUnderCursor(t),r=t.sender;return function(t,n){try{return e.contains(t,n)||t==n}catch(e){return!1}}(r.hint[0],i)&&(r.hint.hide(),(i=n.elementUnderCursor(t))||(i=n.elementUnderCursor(t)),r.hint.show()),i},_searchConnectedTargets:function(t,n){for(var i,r,o,a=e(this.options.connectWith),s=0;s0&&a-o>0&&this._movePlaceholder({element:s,sortable:this},"next",r))},_movePlaceholder:function(e,t,n){var i=this.placeholder;e.sortable.trigger(s,n)||(t?"prev"===t?e.element.before(i):"next"===t&&e.element.after(i):e.element.append(i),e.sortable.trigger(l,n))},_setCursor:function(){var t,n=this.options.cursor;n&&"auto"!==n&&(t=e(document.body),this._originalCursorType=t.css("cursor"),t.css({cursor:n}),this._cursorStylesheet||(this._cursorStylesheet=e("")),this._cursorStylesheet.appendTo(t))},_resetCursor:function(){this._originalCursorType&&(e(document.body).css("cursor",this._originalCursorType),this._originalCursorType=null,this._cursorStylesheet.remove())},_getElementCenter:function(e){var t=e.length?n.getOffset(e):null;return t&&(t.top+=o(e)/2,t.left+=r(e)/2),t},_isFloating:function(e){var t=/left|right/.test(e.css("float")),n=/inline|table-cell/.test(e.css("display")),i=/flex/.test(e.parent().css("display"))&&(/row|row-reverse/.test(e.parent().css("flex-direction"))||!e.parent().css("flex-direction"));return t||n||i},_cancel:function(){this.draggedElement&&(this.draggedElement.show(),this.placeholder.remove(),this.draggable.dropped=!0)},_items:function(){var e=this.options.filter;return e?this.element.find(e):this.element.children()},indexOf:function(e){var t=this._items(),n=this.placeholder,i=this.draggedElement;return n&&e[0]==n[0]?t.not(i).index(e):t.not(n).index(e)},items:function(){var e=this.placeholder,t=this._items();return e&&(t=t.not(e)),t},_isEmpty:function(){return!this.items().length},_isLastHidden:function(){return 1===this.items().length&&this.items().is(":hidden")}});n.ui.plugin(v)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Widget,r=Math.abs,o="aria-selected",a="k-selected",s="k-selecting",l="k-selectable",c="change",d="unselect",u="k-unselecting",h="span.k-icon.k-i-caret-alt-down,span.k-icon.k-i-caret-alt-up,.k-icon.k-i-caret-alt-down,.k-icon.k-i-caret-alt-right,.k-icon.k-i-caret-alt-left",p=h.replaceAll("k-i","k-svg-i"),f=p.split(",").map((function(e){return e+" *"})).join(","),m="input,a,textarea,.k-multiselect-wrap,select,button,"+h+","+p+","+f+",.k-button>span,.k-button>span *,.k-button>img,label.k-checkbox-label.k-no-text,span.k-numeric-wrap,.k-focusable",g=n.support.browser.msie,v=!1,_=e.extend;!function(e){e('
    ').on("click",">*",(function(){v=!0})).find("span").trigger("click").end().off()}(e);var b=i.extend({init:function(t,r){var o,a,s=this;i.fn.init.call(s,t,r),s._marquee=e("
    "),s._lastActive=null,s.element.addClass(l),s.relatedTarget=s.options.relatedTarget,o=s.options.multiple,a=s.options.dragToSelect,s.userEvents=new n.UserEvents(s.element,{global:!0,allowSelection:!0,filter:(v?"":".k-selectable ")+s.options.filter,tap:s._tap.bind(s),touchAction:o?"none":"pan-x pan-y"}),o&&(a&&s.userEvents.bind("start",s._start.bind(s)).bind("move",s._move.bind(s)).bind("end",s._end.bind(s)),s.userEvents.bind("select",s._select.bind(s)))},events:[c,d],options:{name:"Selectable",filter:">*",inputSelectors:m,multiple:!1,dragToSelect:!0,relatedTarget:e.noop,ignoreOverlapped:!1,addIdToRanges:!1},_isElement:function(e){var t,n=this.element,i=n.length,r=!1;for(e=e[0],t=0;t1)&&(r.clear(),r.value(i,t),r._notify(c,t)),r._lastActive=r._downTarget=i):n&&o?(r._unselect(i),r._notify(c,t)):n||(r.clear(),r.value(i,t),r._notify(c,t)))},_start:function(t){var n,i=this,r=e(t.target),o=i.options.selectedClass||a,s=r.hasClass(o),c=t.event.ctrlKey||t.event.metaKey;this._allowSelection(t.event.target)&&(i._downTarget=r,i._isElement(r.closest("."+l))?(i.options.useAllItems?i._items=i.element.find(i.options.filter):(n=r.closest(i.element),i._items=n.find(i.options.filter)),t.sender.capture(),i._marquee.appendTo(document.body).css({left:t.x.client+1,top:t.y.client+1,width:0,height:0}),c||i.clear(),r=r.add(i.relatedTarget(r)),s&&(i._selectElement(r,!0),c&&r.addClass(u))):i.userEvents.cancel())},_move:function(e){var t={left:e.x.startLocation>e.x.location?e.x.location:e.x.startLocation,top:e.y.startLocation>e.y.location?e.y.location:e.y.startLocation,width:r(e.x.initialDelta),height:r(e.y.initialDelta)};this._marquee.css(t),this._invalidateSelectables(t,e.event.ctrlKey||e.event.metaKey),e.preventDefault()},_end:function(t){var i=this,r=n.attr("range-selected"),o=n.guid();i._marquee.remove(),i._unselect(i.element.find(i.options.filter+"."+u)).removeClass(u);var a=i.element.find(i.options.filter+"."+s);if(a=a.add(i.relatedTarget(a)),i.options.addIdToRanges)for(var l=0;lo.right)return!0;a=!k(o,t)}return a},value:function(e){var t=this,n=t._selectElement.bind(t);if(!e)return t.element.find(t.options.filter+"."+(t.options.selectedClass||a));e.each((function(){n(this)}))},selectedRanges:function(){var t=n.attr("range-selected"),i={};return this.element.find("["+t+"]").each((function(n,r){var o=e(r).attr(t),a=i[o];a||(a=i[o]=[]),a.push(e(r))})),i},selectedSingleItems:function(){var t=this,i=n.attr("range-selected");return t.element.find(t.options.filter+"."+(t.options.selectedClass||a)+":not(["+i+"])").toArray().map((function(t){return e(t)}))},_firstSelectee:function(){var e,t=this;return null!==t._lastActive?t._lastActive:(e=t.value()).length>0?e[0]:t.element.find(t.options.filter)[0]},_selectElement:function(t,n){var i=e(t),r=this.options.selectedClass||a,l=!n&&this._notify("select",{element:t});i.removeClass(s),l||(i.addClass(r),this.options.aria&&i.attr(o,!0))},_notify:function(e,t){return t=t||{},this.trigger(e,t)},_unselect:function(e){if(!this.trigger(d,{element:e})){var t=n.attr("range-selected");return e.removeClass(this.options.selectedClass||a).removeAttr(t),this.options.aria&&e.attr(o,!1),e}},_select:function(t){this._allowSelection(t.event.target)&&(!g||g&&!e(n._activeElement()).is(this.options.inputSelectors))&&t.preventDefault()},_allowSelection:function(t){return!e(t).is(this.options.inputSelectors)||(this.userEvents.cancel(),this._downTarget=null,!1)},resetTouchEvents:function(){this.userEvents.cancel()},clear:function(){var e=this.element.find(this.options.filter+"."+(this.options.selectedClass||a));this._unselect(e)},selectRange:function(t,n){var i,r,o,a=this;for(a.clear(),a.element.length>1&&(o=a.options.continuousItems()),o&&o.length||(o=a.element.find(a.options.filter)),(t=e.inArray(e(t)[0],o))>(n=e.inArray(e(n)[0],o))&&(r=t,t=n,n=r),a.options.useAllItems||(n+=a.element.length-1),i=t;i<=n;i++)a._selectElement(o[i],!0)},destroy:function(){var e=this;i.fn.destroy.call(e),e.element.off(".kendoSelectable"),e.userEvents.destroy(),e._marquee=e._lastActive=e.element=e.userEvents=null}});function w(e,t){if(e.length!==t.length)return!1;for(var n=0;nr||i.righto||i.bottom=t.right||e.bottom<=t.top||e.top>=t.bottom)}b.parseOptions=function(e){var t=e.mode||e,n="string"==typeof t&&t.toLowerCase();return{multiple:n&&n.indexOf("multiple")>-1,cell:n&&n.indexOf("cell")>-1}},n.ui.plugin(b)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.html.HTMLBase,r="k-button-icon",o=i.extend({init:function(e,t){var n=this;i.fn.init.call(n,e,t),n.wrapper=n.element.addClass("k-button"),!n.element.attr("type")&&n.options.type&&n.element.attr("type",n.options.type),n._addClasses(),n.iconElement(),n._textElement()},options:{name:"HTMLButton",type:"button",icon:"",iconClass:"",spriteCssClass:"",imageUrl:"",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base",stylingOptions:["size","rounded","fillMode","themeColor"]},iconElement:function(){var t,i,o,a=this,s=a.element,l=a.options,c=l.icon,d=l.iconClass,u=l.spriteCssClass,h=l.imageUrl;(u||h||c||d)&&(o=!0,s.contents().filter((function(){return!(e(this).hasClass("k-sprite")||e(this).hasClass("k-icon")||e(this).hasClass("k-svg-icon")||e(this).hasClass("k-image"))})).each((function(e,t){(1==t.nodeType||3==t.nodeType&&n.trim(t.nodeValue).length>0)&&(o=!1)}))),o&&a.element.addClass("k-icon-button"),h?((i=s.children("img.k-image").first())[0]||(i=e('icon').prependTo(s)),i.attr("src",h),i.addClass(r)):c||d?((t=s.children("span.k-icon, span.k-svg-icon").first())[0]?n.ui.icon(t,{icon:c,iconClass:d}):t=e(n.ui.icon({icon:c,iconClass:d})).prependTo(s),t.addClass(r)):u&&((t=s.children("span.k-sprite").first())[0]||(t=e('').prependTo(s)),t.addClass(u+" "+r))},_textElement:function(){this.element.contents().filter((function(){return!(e(this).hasClass(r)||e(this).hasClass("k-sprite")||e(this).hasClass("k-icon")||e(this).hasClass("k-image"))})).each((function(e,t){if(1==t.nodeType||3==t.nodeType&&n.trim(t.nodeValue).length>0){if(3===t.nodeType){var i=document.createElement("span");t.parentNode.insertBefore(i,t),i.appendChild(t),t=i}t.classList.add("k-button-text")}}))}});e.extend(n.html,{renderButton:function(n,i){return(arguments[0]===t||e.isPlainObject(arguments[0]))&&(i=n,n=e("")),new o(n,i).html()},HTMLButton:o}),n.cssProperties.registerPrefix("HTMLButton","k-button-"),n.cssProperties.registerValues("HTMLButton",[{prop:"fillMode",values:n.cssProperties.fillModeValues.concat(["link"])},{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Widget,r=e.extend,o=".kendoChat",a=n.keys,s=i.extend({init:function(e,t){i.fn.init.call(this,e,t),this._wrapper(),this._attachEvents(),this._typing=!1},events:["focusToolbar","sendMessage","toggleToolbar","typingEnd","typingStart"],options:{messages:{placeholder:"Type a message...",toggleButton:"Toggle toolbar",sendButton:"Send message"}},destroy:function(){i.fn.destroy.call(this),this.input&&(this.input.off(o),this.input.remove(),this.input=null),this.element.off(o),this.element.empty()},_wrapper:function(){var t=s.styles,i=this.options,r=i.messages,o="inputId_"+n.guid();this.inputWrapper=this.element.addClass(t.inputWrapper).appendTo(this.element),this.input=e("").addClass(t.input).attr("id",o).attr("aria-label",r.placeholder).attr("placeholder",r.placeholder).appendTo(this.inputWrapper),this.inputSuffix=e("").addClass(t.inputSuffix).appendTo(this.inputWrapper),i.toolbar&&i.toolbar.toggleable&&i.toolbar.buttons&&i.toolbar.buttons.length&&e(n.html.renderButton('',{icon:t.buttonToggleIcon,fillMode:"flat",size:"large"})).appendTo(this.inputSuffix),e(n.html.renderButton('',{icon:t.buttonSendIcon,fillMode:"flat",size:"large"})).appendTo(this.inputSuffix)},_attachEvents:function(){var e=s.styles;this.input.on("keydown"+o,this._keydown.bind(this)).on("input"+o,this._input.bind(this)).on("focusout"+o,this._inputFocusout.bind(this)),this.element.on("click"+o,"."+e.buttonSend,this._buttonClick.bind(this)),this.element.on("click"+o,"."+e.buttonToggle,this._toggleToolbar.bind(this))},_input:function(){var e=this.input.val().length>0;this._triggerTyping(e)},_keydown:function(e){switch(e.keyCode){case a.ENTER:e.preventDefault(),this._sendMessage();break;case a.F10:e.preventDefault(),this.trigger("focusToolbar")}},_buttonClick:function(e){e.preventDefault(),this._sendMessage()},_sendMessage:function(){var e=this.input.val();if(e.length){this._triggerTyping(!1);var t={text:e};this.trigger("sendMessage",t),this.input.val("")}},_inputFocusout:function(){this._triggerTyping(!1)},_triggerTyping:function(e){e?this._typing||(this.trigger("typingStart",{}),this._typing=!0):this._typing&&(this.trigger("typingEnd",{}),this._typing=!1)},_toggleToolbar:function(e){this.trigger("toggleToolbar",{originalEvent:e})}});r(!0,s,{styles:{input:"k-input-inner",inputWrapper:"k-textbox k-input k-input-lg k-input-solid",button:"k-button",buttonFlat:"k-button-lg k-button-flat k-button-flat-base",iconButton:"k-icon-button",buttonIcon:"k-button-icon",buttonSend:"k-chat-send",buttonSendIcon:"paper-plane",buttonToggle:"k-button-toggle",buttonToggleIcon:"more-horizontal",hidden:"k-hidden",inputSuffix:"k-input-suffix"}}),r(n,{chat:{ChatMessageBox:s}})}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui.Widget,r=e.extend,o=".kendoChat",a="kButtonName",s="chatToolbarScrollLeft",l="chatToolbarScrollRight",c=":visible",d="tabindex",u={effects:"expand:vertical",duration:200},h={expand:{show:!0},collapse:{hide:!0}},p=i.extend({init:function(e,t){var n=(t=r({},t,{name:"ChatToolbar"})).toolbar,a=n.buttons&&n.buttons.length;i.fn.init.call(this,e,t),a&&this._createButtonList(),a&&n.scrollable&&this.buttonsWidth()>this.element.width()&&this._initScrolling(),this._setupAnimation(),a&&n.toggleable&&this.toggle(!0),this.element.on("click"+o,this._onClick.bind(this)).on("keydown"+o,this._onKeydown.bind(this))},events:["click"],destroy:function(){i.fn.destroy.call(this),this.element.off(o),this.element.empty()},_createButtonList:function(){for(var t=p.styles,n=this.options.toolbar.buttons,i=e("
    "),r=0;r");return"string"==typeof t&&(t={name:t}),i=e.extend({},t.attr||{},{title:t.text||t.name,"aria-label":t.text||t.name,type:"button",tabindex:-1}),o.attr(i).addClass(t.name).data(a,t.name).addClass(r.button).addClass(r.buttonDefaults),(t.icon||t.iconClass)&&(o.addClass(r.iconButton),o.prepend(n.html.renderIcon({icon:t.icon,iconClass:"k-button-icon"+(t.iconClass?" "+t.iconClass:"")}))),o},_onClick:function(t){var n=p.styles,i=e(t.target).closest("."+n.button);i.is("."+n.scrollButton)&&!this._scrolling&&this._scroll(i.data(a)),i.data(a)&&(this.buttons().attr(d,-1),i.removeAttr(d),this.trigger("click",{button:i[0],name:i.data(a),originalEvent:t}))},_onKeydown:function(e){var t=e.keyCode,i=n.keys;switch(t){case i.LEFT:this._focusButton(-1);break;case i.RIGHT:this._focusButton(1)}},_focusButton:function(e){var t=this.buttons(),n=t.not("[tabindex=-1]"),i=t[n.index()+e];i&&(n.attr(d,-1),i.removeAttribute(d),i.focus())},_initScrolling:function(){var e=p.styles;this.scrollButtonLeft=this._createButton({name:s,icon:e.scrollButtonLeftIcon,attr:{class:e.scrollButton+" "+e.scrollButtonLeft}}),this.scrollButtonRight=this._createButton({name:l,icon:e.scrollButtonRightIcon,attr:{class:e.scrollButton+" "+e.scrollButtonRight}}),this.element.prepend(this.scrollButtonLeft),this.element.append(this.scrollButtonRight),this._refreshScrollButtons(),this.element.on("keydown"+o,this._refreshScrollButtons.bind(this))},_scroll:function(e){var t=this,i=t.buttonWidth(),r=this.maxScrollSize(),o=e===s?-1*i:i,a=this.currentScrollLeft()+o;a=Math.min(Math.max(a,0),r),e!==s&&e!==l||(n.scrollLeft(t.buttonList,a),t._refreshScrollButtons(a))},_refreshScrollButtons:function(e){var t=this.maxScrollSize(),n=undefined===e||isNaN(parseInt(e,10))?this.currentScrollLeft():e;(this.scrollButtonLeft||this.scrollButtonRight)&&(this.scrollButtonLeft.toggle(0!==n),this.scrollButtonRight.toggle(n!==t))},_setupAnimation:function(){var e=this.options.toolbar.animation,t=r({},u),n=r({reverse:!0,hide:!0},u);e=!1===e?r(!0,{},h):r(!0,{expand:t,collapse:n},e),this.options.toolbar.animation=e},_animationComplete:function(){this._refreshScrollButtons()},_animationCompleteExpand:function(){this._animationComplete(),this.buttons().not("[tabindex=-1]").trigger("focus")},currentScrollLeft:function(){return Math.round(n.scrollLeft(this.buttonList))},maxScrollSize:function(){return Math.round(this.buttonList[0].scrollWidth-this.buttonList[0].clientWidth)},buttons:function(){var e=p.styles;return this.buttonList?this.buttonList.children("."+e.button):null},buttonWidth:function(){return Math.round(this.buttons().last().outerWidth(!0))},buttonsWidth:function(){var e=0;return this.buttons()&&(e=this.buttonWidth()*this.buttons().length),e},toggle:function(e){var t=this.options.toolbar.animation;e&&(t=r(!0,{},h)),t.expand.complete=this._animationCompleteExpand.bind(this),t.collapse.complete=this._animationComplete.bind(this),this.element.is(c)?this.element.kendoStop().kendoAnimate(t.collapse):this.element.kendoStop().kendoAnimate(t.expand)},focus:function(){this.element.is(c)?this.buttons().not("[tabindex=-1]").trigger("focus"):this.toggle()}});r(!0,p,{styles:{button:"k-button",buttonDefaults:"k-button-md k-rounded-md k-button-solid k-button-solid-base",buttonList:"k-button-list k-toolbar-group",scrollButton:"k-scroll-button",scrollButtonLeft:"k-scroll-button-left",scrollButtonRight:"k-scroll-button-right",scrollButtonLeftIcon:"chevron-left",scrollButtonRightIcon:"chevron-right",iconButton:"k-icon-button"}}),r(n.chat,{ChatToolBar:p})}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.htmlEncode,r=n.ui.Widget,o=e.extend,a=".",s=".kendoChat",l=function(e){return'
    '+function(e){var t=e.url,n=e.text;return e.styles,''+i(n)+''}({url:e.url,text:e.text,styles:e.styles})+"
    "},c=function(e){var t=e.text,n=e.url,r=e.styles;return"
    \n

    '+i(t)+"

    \n "+(n?l({url:n,text:t,styles:r}):"")+"\n
    "},d=function(e){var t=e.url,n=e.text,i=e.styles;return'
    \n '+(t?l({url:t,text:n,styles:i}):"")+"\n
    "},u=function(e){var t=e.styles,r=e.text,o=e.timestamp;return'
    \n \n
    '+i(r)+"
    \n
    "},h=function(e){var t=e.styles,n=e.text;return'
    \n

    '+i(n)+'

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    '},p=function(e){var t=e.styles,n=e.buttons;return'
    \n '+n.map((function(e){return function(e){var t=e.button,n=e.styles;return''+i(t.title)+""}({styles:t,button:e})})).join("")+"\n
    "},f=function(e){var t=e.styles,n=e.images,r=e.buttons,o=e.title,a=e.subtitle,s=e.text;return'
    \n '+(void 0!==n&&n.length>0?function(e){var t=e.images,n=e.styles;return''+t[0].alt+''}({images:n,styles:t}):"")+'\n
    \n '+(void 0!==o?'
    '+i(o)+"
    ":"")+"\n "+(void 0!==a?'
    '+i(a)+"
    ":"")+"\n "+(void 0!==s?"

    "+i(s)+"

    ":"")+"\n
    \n "+(void 0!==r&&r.length>0?p({buttons:r,styles:t}):"")+"\n
    "};o(n.chat,{Templates:{},Components:{}}),n.chat.registerTemplate=function(e,t){n.chat.Templates[e]=n.template(t)},n.chat.getTemplate=function(e){return n.chat.Templates[e]||u},n.chat.registerTemplate("text",u),n.chat.registerTemplate("message",u),n.chat.registerTemplate("typing",h),n.chat.registerTemplate("suggestedAction",(function(e){var t=e.styles,n=e.suggestedActions;return'
    \n '+n.map((function(e){return function(e){var t=e.styles,n=e.action;return''+i(n.title)+""}({styles:t,action:e})})).join("")+"\n
    "})),n.chat.registerTemplate("heroCard",f),n.chat.registerTemplate("application/vnd.microsoft.card.hero",f),n.chat.registerComponent=function(e,t){n.chat.Components[e]=t},n.chat.getComponent=function(e){return n.chat.Components[e]||null};var m=n.chat.Component=n.Class.extend({init:function(t,n){this.element=e("
    "),this.options=t,this.view=n},destroy:function(){n.destroy(this.element)}}),g=m.extend({init:function(e,t){m.fn.init.call(this,e,t),this.element.kendoCalendar({change:function(){t.trigger("suggestedAction",{text:n.toString(this.value(),"d"),type:"message"})}})},destroy:function(){}});n.chat.registerComponent("calendar",g);var v={wrapper:"k-chat",messageList:"k-avatars",messageListContent:"k-message-list-content",messageTime:"k-message-time",messageGroup:"k-message-group",message:"k-message",only:"k-only",first:"k-first",middle:"k-middle",last:"k-last",author:"k-author",avatar:"k-avatar",noAvatar:"k-no-avatar",self:"k-alt",button:"k-button",buttonDefaults:"k-button-md k-rounded-md k-button-solid k-button-solid-base",iconButton:"k-icon-button",buttonIcon:"k-button-icon",buttonPrimary:"k-button-md k-rounded-md k-button-flat k-button-flat-primary",scrollButtonIconLeft:"chevron-left",scrollButtonIconRight:"chevron-right",typingIndicator:"k-typing-indicator",typingIndicatorBubble:"k-typing-indicator-bubble",bubble:"k-chat-bubble",suggestedActions:"k-quick-replies",suggestedAction:"k-quick-reply",cardWrapper:"k-card-container",cardDeckScrollWrap:"k-card-deck-scrollwrap",cardDeck:"k-card-deck",cardList:"k-card-list",card:"k-card",cardRich:"k-card-type-rich",cardBody:"k-card-body",cardImage:"k-card-image",cardTitle:"k-card-title",cardSubtitle:"k-card-subtitle",cardActions:"k-card-actions",cardActionsVertical:"k-card-actions-vertical",cardAction:"k-card-action",selected:"k-selected"},_=n.chat.ChatView=r.extend({init:function(e,t){r.fn.init.call(this,e,t),this._list(),this._lastSender=null,this.typingParticipants=[],this._attachEvents(),this._scrollable()},events:[],options:{messages:{isTyping:" is typing.",areTyping:" are typing.",and:" and "}},destroy:function(){r.fn.destroy.call(this),this._scrollDraggable&&this._scrollDraggable.destroy(),this.element.empty(),this.element.off(s),this.list=null,this._lastSender=null},_list:function(){var t=_.styles;this.element.addClass(t.messageList).attr("role","log").attr("aria-label",this.options.messages.messageListLabel),this.list=e("
    ").addClass(t.messageListContent).appendTo(this.element)},_attachEvents:function(){var e=_.styles;this.element.on("click"+s,this._listClick.bind(this)).on("click"+s,a+e.message,this._messageClick.bind(this)).on("click"+s,a+e.suggestedAction,this._suggestedActionClick.bind(this)).on("click"+s,a+e.cardAction+" "+a+e.button,this._cardActionClick.bind(this)),this.element.on("keydown"+s,a+e.suggestedAction,this._suggestedActionKeydown.bind(this))},_scrollable:function(){var e=_.styles;this.element.on("click"+s,a+e.cardDeckScrollWrap+" "+a+e.button,this._scrollButtonClick.bind(this))},_scrollButtonClick:function(t){var i=_.styles,r=e(t.currentTarget),o=0!==r.find(a+i.buttonIcon+"[class*="+i.scrollButtonIconLeft+"]").length,s=r.siblings(a+i.cardDeck),l=s.find(a+i.card).last().outerWidth(!0);o?n.scrollLeft(s,n.scrollLeft(s)-l):n.scrollLeft(s,n.scrollLeft(s)+l)},getTemplate:function(e){return n.chat.getTemplate(e)},getComponent:function(e){return n.chat.getComponent(e)},renderMessage:function(e,t){e.timestamp||(e.timestamp=new Date),e.text||(e.text="");var n=this._renderTemplate(e.type,e);this._renderBubble(e.type,n,t),"typing"==e.type?this.typingParticipants.length>0&&this._removeTypingParticipant(t):this._lastSender=t.id},renderSuggestedActions:function(e){this._removeSuggestedActions();var t=this._renderTemplate("suggestedAction",{suggestedActions:e});this.list.append(t),this._scrollToBottom()},renderAttachments:function(e){var t=this._renderAttachmentWrapper(e.attachmentLayout),n="carousel"===e.attachmentLayout?t.find(a+_.styles.cardDeck):t,i=e.attachments;if(i.length){for(var r=0;r");if("carousel"===t){i.addClass(n.cardDeckScrollWrap);var r=this._renderScrollButton(n.scrollButtonIconLeft);i.append(r),i.append(e("
    ").addClass(n.cardDeck));var o=this._renderScrollButton(n.scrollButtonIconRight);i.append(o)}else i.addClass(n.cardList);return i},_renderScrollButton:function(t){var i=_.styles;return e("
    ",l=e('').hide();this.wrapper=this.element.addClass(t.wrapper).append(a).append(l),n.toolbar&&n.toolbar.buttons&&n.toolbar.buttons.length&&this.wrapper.find(o+t.toolbarBoxWrapper).show(),i&&this.wrapper.height(i),r&&this.wrapper.css("max-width",r)},_view:function(){var e=this,t=s.styles,i=r(!0,{},this.options),a=this.wrapper.find(o+t.viewWrapper+"");this.view=new n.chat.ChatView(a,i),this.view.bind("actionClick",(function(t){e.trigger("actionClick",t),e.postMessage(t.text)}))},_messageBox:function(){var e=this,t=s.styles,i=r(!0,{},this.options),a=this.wrapper.find(o+t.messageBoxWrapper+"");this.messageBox=new n.chat.ChatMessageBox(a,i),this.messageBox.bind("typingStart",(function(t){e.trigger("typingStart",t)})).bind("typingEnd",(function(t){e.trigger("typingEnd",t)})).bind("sendMessage",(function(t){e.trigger("sendMessage",t),e.postMessage(t.text)})).bind("toggleToolbar",(function(){e.toggleToolbar()})).bind("focusToolbar",(function(){e.toolbar&&e.toolbar.focus()}))},_toolbar:function(){var e=this,i=s.styles,a=r(!0,{},e.options),l=e.wrapper.find(o+i.toolbarBoxWrapper+"");e.options.toolbarId=n.guid(),l.attr("id",e.options.toolbarId),a.toolbar.scrollable===t&&(this.options.toolbar.scrollable=a.toolbar.scrollable=!0),a.toolbar.toggleable===t&&(this.options.toolbar.toggleable=a.toolbar.toggleable=!1),e.toolbar=new n.chat.ChatToolBar(l,a),e.toolbar.bind("click",(function(t){e.trigger("toolClick",{sender:e,name:t.name,button:t.button,messageBox:e.messageBox.input[0],originalEvent:t.originalEvent})}))},postMessage:function(e){var t=r(!0,{},{text:e,type:"message",timestamp:new Date,from:this.getUser()});this.trigger("post",t),this.renderMessage(t,t.from)},renderMessage:function(e,t){this.view.renderMessage(e,t)},renderSuggestedActions:function(e){this.view.renderSuggestedActions(e)},renderAttachments:function(e,t){this.view.renderAttachments(e,t)},toggleToolbar:function(e){this.toolbar.toggle(e)},renderUserTypingIndicator:function(e){this.view._renderTypingIndicator(e)},clearUserTypingIndicator:function(e){this.view._removeTypingParticipant(e)},removeTypingIndicator:function(){this.view._removeTypingIndicator()}});n.ui.plugin(s),r(!0,s,{styles:a})}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Widget,r=n.ui,o=function(t){var i=t.icon;return n.ui.icon(e(""),{icon:i})},a=function(e){return""+e.icon+""},s=i.extend({init:function(e,t){var r=this;i.fn.init.call(r,e,t),r._content(),r._appearance(),n.notify(r)},destroy:function(){i.fn.destroy.call(this)},options:{name:"Badge",cutoutBorder:!1,data:{},fillMode:"solid",icon:"",max:1/0,position:"inline",align:"",rounded:"medium",roundings:{small:"sm",medium:"md",large:"lg",full:"full"},sizes:{small:"sm",medium:"md",large:"lg"},size:"medium",template:null,text:"",themeColor:"secondary",visible:!0,_classNames:[]},_content:function(){var e=this,t=e.options.text,i=e.options.template,r=e.options.data,o=e.options.icon;if(null!==i)return e._text=t,e._template=n.template(i).bind(e),void e.element.html(e._template(r));""===o?""===t?e.text(e.element.html()):e.text(t):e.icon(o)},_appearance:function(){var e=this;e._themeColor=e.options.themeColor,e._shape=e.options.shape,e._sizes=e.options.sizes,e._size=e.options.size,e._fillMode=e.options.fillMode,e._rounded=e.options.rounded,e._roundings=e.options.roundings,e._cutoutBorder=e.options.cutoutBorder,e._align=e.options.align,e._position=e.options.position,e._visible=e.options.visible,e._updateClassNames()},_updateClassNames:function(){var e=this,n=["k-badge"],i=e.options._classNames,r=e._themeColor,o=e._shape,a=e._sizes,s=e._size,l=a[s]===t?s:a[s],c=e._fillMode,d=e._rounded,u=e._roundings,h=u[d]===t?d:u[d],p=e._cutoutBorder,f=e._align,m=e._position,g=e._visible;e.element.removeClass((function(t,n){0===n.indexOf("k-")&&-1===i.indexOf(n)&&e.element.removeClass(n)})),"string"==typeof c&&""!==c&&n.push("k-badge-"+c),"string"==typeof r&&""!==r&&n.push("k-badge-"+c+"-"+r),"string"==typeof s&&""!==s&&n.push("k-badge-"+l),"string"==typeof d&&""!==d&&n.push("k-rounded-"+h),"string"==typeof o&&""!==o&&n.push("k-badge-"+o),"boolean"==typeof p&&!0===p&&n.push("k-badge-border-cutout"),"string"==typeof m&&""!==m&&n.push("k-badge-"+m),"string"==typeof m&&""!==m&&"inline"!==m&&"string"==typeof f&&2==f.split(" ").length&&n.push("k-"+f.replace(" ","-")),!1===g&&n.push("k-hidden"),e.element.addClass(n.join(" "))},setOptions:function(e){var t=this;t.element.removeClass((function(e,n){n.indexOf("k-")>=0&&t.element.removeClass(n)})),i.fn.setOptions.call(t,e),t._content(),t._appearance()},text:function(e){var n=this,i=n.options.max;if(0===arguments.length||e===t)return n._text;n._text=e,!0!==e&&!1!==e&&null!==e?"string"!=typeof e?"number"!=typeof e?"object"==typeof e&&"toString"in e&&n.element.html(e.toString()):e>i?n.element.html(i+"+"):n.element.html(e):n.element.html(e):n.element.html("")},icon:function(e){var i,r=this;return 0===arguments.length||e===t?r._icon:(r._icon=e,0===e.indexOf("").appendTo(r.element),r.badge=new o.Badge(i,a))}});!1===f.fn.hasOwnProperty("defaults")&&Object.defineProperty(f.fn,"defaults",{get:function(){return n.defaults.button}}),n.cssProperties.registerPrefix("Button","k-button-"),n.cssProperties.registerValues("Button",[{prop:"fillMode",values:n.cssProperties.fillModeValues.concat(["link"])},{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),n.ui.plugin(f)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Button,r="click",o="toggle",a="aria-pressed",s="k-selected",l=i.extend({init:function(e,t){var r=this;i.fn.init.call(r,e,t),e=r.wrapper=r.element,t=r.options,e.addClass("k-toggle-button"),r._selected=!0===t.selected,r.toggle(r._selected),t.group&&e.attr("data-group",t.group),n.notify(r)},destroy:function(){this.wrapper.off(".kendoToggleButton"),i.fn.destroy.call(this)},events:[r,o],options:{name:"ToggleButton",group:t,selected:!1},toggle:function(e){e===t&&(e=!this._selected),this._selected=e,!0===e?(this.element.attr(a,!0),this.element.addClass(s)):!1===e&&(this.element.attr(a,!1),this.element.removeClass(s))},_click:function(e){this.options.enable&&(this.trigger(r,{event:e,id:this.element.attr("id"),target:this.element})?e.preventDefault():(this.toggle(),this.trigger(o,{event:e,checked:this._selected,group:this.options.group,id:this.element.attr("id"),target:this.element})))}});n.cssProperties.registerPrefix("ToggleButton","k-button-"),n.cssProperties.registerValues("ToggleButton",[{prop:"fillMode",values:n.cssProperties.fillModeValues.concat(["link"])},{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),n.ui.plugin(l)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o=i.ToggleButton,a=i.Button,s=n.keys,l=".kendoButtonGroup",c="k-selected",d="k-disabled",u="select",h="aria-disabled",p=".",f="none",m="single",g="multiple",v="focus",_=r.extend({init:function(e,t){var n=this;r.fn.init.call(n,e,t),n.wrapper=n.element,n.selectedIndices=[],n._buttons=n._renderItems(n.options.items),n.element.addClass("k-widget k-button-group").attr("role","group"),n._enable=!0,n.options.enable&&n.options.enabled||(n._enable=!1,n.element.attr(h,!0).addClass(d),n._buttons.forEach((function(e){e.enable(!1)}))),n.options.selection!==f&&n.select(n.options.index),n._attachEvents()},events:[u],options:{name:"ButtonGroup",selection:m,index:-1,enable:!0,enabled:!0,preventKeyNav:!1,size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"},badge:function(e,t){var i,r,o=this.element,a=isNaN(e)?o.find(e).getKendoToggleButton()||o.find(e).getKendoButton():this._buttons[e],s=t||0===t;if(a){if(!(i=a.badge)&&s)return a._badge({text:n.htmlEncode(t)}),n.htmlEncode(t);if(s)i.text(n.htmlEncode(t));else if(!1===t)return a.badge=null,r=i.element,i.destroy(),void r.empty().remove();return i?i.text():null}},current:function(){return this.element.find(p+c)},destroy:function(){var t=this;t.element.off(l),t.element.find(".k-button").each((function(t,n){var i=e(n).getKendoToggleButton()||e(n).getKendoButton();i&&i.destroy()})),r.fn.destroy.call(t)},enable:function(e){void 0===e&&(e=!0),this.element.attr(h,!e).toggleClass(d,!e),this._buttons.forEach((function(t){var n=t.element.hasClass("k-focus")||t.element.is(":focus");t.enable(e),n&&t.element.removeAttr("disabled").addClass("k-focus").trigger("focus")})),this._enable=this.options.enable=e},select:function(t){var n=this,i=-1;this.options.selection!==f&&undefined!==t&&-1!==t&&(i="number"==typeof t?t:t.nodeType?(t=e(t)).index():t.index(),n._buttons[i]&&(n.options.selection===g?t.length>1?t.each((function(t,i){var r=e(i).index();n._buttons[r].toggle(),n._toggleIndex(r)})):(n._buttons[i].toggle(),n._toggleIndex(i)):n._resetIndexes(i)))},_addButton:function(e,t){if(this.options.selection===f)return delete t.selected,new a(e,t);var n=new o(e,t);return n.bind("toggle",this._select.bind(this,e)),n},_attachEvents:function(){this.options.preventKeyNav||this.element.on("keydown"+l,this._keyDown.bind(this))},_keyDown:function(t){var i=e(this.element),r=i.find(".k-button"),o=i.find(":focus"),a=r.index(o),l=n.support.isRtl(this.element);t.keyCode===s.LEFT&&!l||t.keyCode===s.RIGHT&&l?((0===a?r.eq(r.length-1):e(r[a-1])).trigger(v),t.preventDefault()):(t.keyCode===s.LEFT&&l||t.keyCode===s.RIGHT&&!l)&&((a+1===r.length?r.eq(0):e(r[a+1])).trigger(v),t.preventDefault())},_renderItems:function(t){var i=this,r=i.options,o=i.element.children(),a=[];return o.length>0&&o.each((function(t){var o=e(this),s=o.find("img").addClass("k-image"),l=o.is("[disabled]")||o.hasClass(d),u={badge:n.attrValue(o,"badge"),icon:s[0]?null:n.attrValue(o,"icon"),disabled:l,selected:!l&&o.is(p+c),size:r.size,rounded:r.rounded,fillMode:r.fillMode,themeColor:r.themeColor};a.push(i._addButton(o,u)),u.selected&&i.selectedIndices.push(t)})),t?(t.forEach((function(t,o){var s=t.text?!1===t.encoded?t.text:n.htmlEncode(t.text):"",l=t.url?e(""):e(""}({className:t,text:i,wrapClassName:r||"",id:o||"",size:a})}function S(e,t,i,r){e.find('[class*="-i-'+t+'"]').parent().attr(n.attr("page"),i).attr("tabindex",r?-1:0).attr("aria-disabled",r).toggleClass("k-disabled",r)}function T(e,t){S(e,l,1,t<=1)}function D(e,t){S(e,d,Math.max(1,t-1),t<=1)}function I(e,t,n){S(e,u,Math.min(n,t+1),t>=n)}function z(e,t,n){S(e,c,n,t>=n)}var M=r.extend({init:function(t,i){var o,s,g,w,k=this,x="",S="";if(r.fn.init.call(k,t,i),i=k.options,k._createDataSource(i),k.linkTemplate=n.template(k.options.linkTemplate),k.selectTemplate=n.template(k.options.selectTemplate),k.numericSelectItemTemplate=n.template(k.options.numericSelectItemTemplate),o=k.page(),s=k.totalPages(),k._refreshHandler=k.refresh.bind(k),k.dataSource.bind(v,k._refreshHandler),k.downEvent=n.applyEventMap("down",n.guid()),(y=n.support.isRtl(t))?(l=p,c=h,d=m,u=f):(l=h,c=p,d=f,u=m),i.size&&(x=n.getValidCssClass("k-button-","size",i.size),S="k-rounded-md "+n.getValidCssClass("k-picker-","size",i.size)),i.navigatable&&(k._id=k.element.attr("id")||n.guid()),k._template(),(i.previousNext||i.numeric)&&(k._numericWrap=k.element.find(".k-pager-numbers-wrap"),0===k._numericWrap.length&&(k._numericWrap=e("
    ").appendTo(k.element))),i.previousNext&&(k._numericWrap.find("[class*='-i-"+l+"']").length||(k._numericWrap.append(C(l,i.messages.first,"k-pager-first",k._id,x)),T(k._numericWrap,o)),k._numericWrap.find("[class*='-i-"+d+"']").length||(k._numericWrap.append(C(d,i.messages.previous,null,k._id,x)),D(k._numericWrap,o))),i.numeric&&(k._numericSelect||(k._numericSelect=k._numericWrap.find(".k-dropdown"),0===k._numericSelect.length&&(k._numericSelect=e("'+a(n.format(i.messages.of,s))+""),k.element.on("keydown"+_,".k-pager-input input",k._keydown.bind(k))),i.previousNext&&(k._numericWrap.find("[class*='-i-"+u+"']").length||(k._numericWrap.append(C(u,i.messages.next,null,k._id,x)),I(k._numericWrap,o,s)),k._numericWrap.find("[class*='-i-"+c+"']").length||(k._numericWrap.append(C(c,i.messages.last,"k-pager-last",k._id,x)),z(k._numericWrap,o,s))),i.pageSizes){if(!k.element.find(".k-pager-sizes").length){var M=i.pageSizes.length?i.pageSizes:["all",5,10,20],E=e.map(M,(function(e){return e.toLowerCase&&"all"===e.toLowerCase()?"":""}));e(''+a(i.messages.itemsPerPage)+"").appendTo(k.element).find("select").html(E.join("")).end().appendTo(k.element)}k.element.find(".k-pager-sizes select").val(k.pageSize()),n.ui.DropDownList&&k.element.find(".k-pager-sizes select").show().attr("aria-label",i.messages.pageSizeDropDownLabel).kendoDropDownList({size:i.size}),k.element.on(v+_,".k-pager-sizes select",k._change.bind(k))}i.refresh&&(k.element.find(".k-pager-refresh").length||k.element.append('"),k.element.on(b+_,".k-pager-refresh",k._refreshClick.bind(k))),i.info&&(k.element.find(".k-pager-info").length||k.element.append('')),k.element.on(b+_,"button",k._click.bind(k)).on(v+_,"select.k-dropdown",k._numericSelectChange.bind(k)).addClass("k-pager"),i.autoBind&&k.refresh(),k._resizeHandler=k.resize.bind(k,!0),e(window).on("resize"+_,k._resizeHandler),i.size&&k.element.addClass(n.getValidCssClass("k-pager-","size",i.size)),k._navigatable(),k.options.responsive&&(g=k.element.outerWidth(),w=k.element.find(".k-pager-info"),g<=480?(w.hide(),k.element.find(".k-pager-sizes").children().hide(),i.numeric&&(k._numericSelect.show(),k.list.hide())):g<=600?w.hide():i.numeric&&k._numericSelect.hide()),n.notify(k)},destroy:function(){var t=this;r.fn.destroy.call(t),t.element.off(_),t.dataSource.unbind(v,t._refreshHandler),t._refreshHandler=null,e(window).off("resize"+_,this._resizeHandler),n.destroy(t.element),t.element=t.list=null},events:[v],options:{name:"Pager",ARIATemplate:function(e){return"Page navigation, page "+e.page+" of "+e.totalPages},selectTemplate:function(e){var t=e.text,n=e.title;return'"},linkTemplate:function(e){var t=e.ns,n=e.idx,i=e.text,r=e.title,o=e.tabindex;return'"},numericSelectItemTemplate:function(e){var t=e.idx,n=e.selected,i=e.text;return'"},buttonCount:10,autoBind:!0,numeric:!0,info:!0,input:!1,previousNext:!0,pageSizes:!1,refresh:!1,responsive:!0,navigatable:!1,size:"medium",messages:{allPages:"All",display:"{0} - {1} of {2} items",empty:"No items to display",page:"Page",of:"of {0}",itemsPerPage:"items per page",pageButtonLabel:"Page {0}",pageSizeDropDownLabel:"Page sizes drop down",numbersSelectLabel:"Page select",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(e){var t=this;t.dataSource.unbind(v,t._refreshHandler),t.dataSource=t.options.dataSource=e,e.bind(v,t._refreshHandler),t.options.autoBind&&e.fetch()},_aria:function(){this.element.attr({role:"application","aria-roledescription":"pager","aria-keyshortcuts":"Enter ArrowRight ArrowLeft"})},_adaptiveStep:function(e,t,n){var i=this;switch(e){case 0:return i._toggleButtons(t,n);case 1:return i._toggleRefresh(t,n);case 2:return i._togglePagerInfo(t,n);case 3:return i._toggleInputSizesLabel(t,n);case 4:return i._togglePageSizesLabel(t,n);case 5:return i._togglePageSizesDropDown(t,n);case 6:return i._togglePageInputs(t,n)}},_calculateNeededWidth:function(){var t=0,n=parseInt(this.element.css("gap"));return this.element.children().each((function(){var i=e(this),r=i.hasClass("k-pager-info");r&&i.removeClass("k-pager-info k-label"),t+=i.is(":visible")?i.width():0,t+=n,r&&i.addClass("k-pager-info k-label")})),t},_resize:function(e){var t=this;if(t._lastWidth&&t.options.responsive){if(t._lastWidth=0;n--){var i=t._calculateNeededWidth();if(e.widthe.width)for(var r=0;r<7&&!(e.width>t._calculateNeededWidth());r++)t._adaptiveStep(r,!0);t._lastWidth=e.width}},_toggleButtons:function(e,t){this._numericWrap&&this.list&&this._numericSelect&&(e?(this._numericSelect.show(),this.list.hide()):t&&this.list.width()-this._numericSelect.width()C&&(l=0===(o=c%C)?c-C+1:c-o+1),r=Math.min(l+C-1,g),l>1&&(d+=k({template:v,navigatable:_,size:y,idx:l-1,text:"...",numeric:!1,title:h.messages.morePages}),u+=x(b,l-1,h.messages.morePages)),i=l;i<=r;i++)d+=k({template:i==c?s.selectTemplate:v,navigatable:_,idx:i,text:i,size:y,numeric:!0,title:n.format(h.messages.pageButtonLabel,i)}),u+=x(b,i,i,i==c);r")),s.list.html(d),s._numericSelect.html(u)}if(h.info&&(d=m>0?n.format(h.messages.display,s.dataSource.options.endless?1:Math.min((c-1)*(s.dataSource.pageSize()||0)+1,f),Math.min(c*p,f),m):h.messages.empty,s.element.find(".k-pager-info").html(d)),h.input&&s.element.find(".k-pager-input").html(""+a(s.options.messages.page)+''+a(n.format(h.messages.of,g))+"").find("input").val(c).attr("disabled",m<1).attr("aria-disabled",m<1).toggleClass("k-disabled",m<1),h.previousNext&&(T(s.element,c),D(s.element,c),I(s.element,c,g),z(s.element,c,g)),h.pageSizes){var S=p;s.element.find(".k-pager-sizes option[value='all']").length>0&&(p===this.dataSource.total()||p==w)&&(p="all",S=h.messages.allPages),s.element.find(".k-pager-sizes select").val(p).filter("["+n.attr("role")+"=dropdownlist]").kendoDropDownList("value",p).kendoDropDownList("text",S)}s._restoreFocus(l,r,g),s._excludeChildrenFromTab(),s._updateAria(),g?(s._lastWidth=n._outerWidth(s.element)+12,s.resize(!0)):s._lastWidth&&(s._lastWidth=n._outerWidth(s.element))}},_excludeChildrenFromTab:function(){var t=n._activeElement();!this.options.navigatable||t!==this.element[0]&&e.contains(this.element[0],t)||this.element.find(g).attr("tabindex",-1)},_restoreFocus:function(e,t,n){var i=this;i.options.navigatable&&(i._focusSelected&&(i.element.find(".k-selected").trigger("focus"),i._focusSelected=null),null!==i._focusMore&&(t1&&i.list.find("li").first().find("a").trigger("focus"),i._focusMore=null))},_restoreTabIndexes:function(){this.element.find("[tabindex='-1']:not(.k-disabled)").attr("tabindex",0)},_collapsedTotal:function(){return this.dataSource.total()},_keydown:function(e){if(e.keyCode===n.keys.ENTER){var t=this.element.find(".k-pager-input").find("input"),i=parseInt(t.val(),10);(isNaN(i)||i<1||i>this.totalPages())&&(i=this.page()),t.val(i),this.page(i)}},_refreshClick:function(e){e.preventDefault(),this.dataSource.read()},_change:function(e){var n=e.currentTarget.value,i=parseInt(n,10),r=this.dataSource;isNaN(i)?"all"==(n+"").toLowerCase()&&(r._pageSize=t,r._take=t,r._skip=0,r.fetch()):r.pageSize(i)},_template:function(){this._ariaTemplate=s(this.options.ARIATemplate).bind(this)},_updateAria:function(){this.options.navigatable&&this.element.attr("aria-label",this._ariaTemplate({page:this.page(),totalPages:this.totalPages()}))},_navigatable:function(){var e=this;e.options.navigatable&&(e._aria(),e.element.attr("id",e._id),e._template(),e._updateAria(),e._tabindex(e.element),e.element.on("keydown"+_,e,e._keyDown.bind(e)),e.element.on("focusout"+_,(function(){e.element.removeClass("k-focus")})),e.element.on("focusin"+_,(function(t){e.element.addClass("k-focus"),t.target===e.element[0]?e.element.find(g).attr("tabindex",-1):e.element.removeClass("k-focus")})))},_keyDown:function(t){var n,i,r=this,a=e(t.target),s=!1;a[0]===r.element[0]&&t.keyCode==o.ENTER&&(r._restoreTabIndexes(),r.element.find(g).first().trigger("focus"),s=!0),a[0]!==r.element[0]&&t.keyCode==o.ESC&&(r.element.trigger("focus"),s=!0),a[0]===r.element[0]&&t.keyCode==o.HOME&&(r.page(1),s=!0),a[0]===r.element[0]&&t.keyCode==o.END&&(r.page(r.totalPages()),s=!0),a[0]!==r.element[0]||t.keyCode!=(y?o.LEFT:o.RIGHT)&&t.keyCode!=o.PAGEDOWN||(r.page(r.page()+1),s=!0),a[0]!==r.element[0]||t.keyCode!=(y?o.RIGHT:o.LEFT)&&t.keyCode!=o.PAGEUP||(r.page(r.page()-1||1),s=!0),a[0]!==r.element[0]&&t.keyCode==o.TAB&&(i=(n=r.element.find(g)).index(a),t.shiftKey?i-1<0?n.last().trigger("focus"):n.eq(i-1).trigger("focus"):i+10?this.dataSource.page():0;this.trigger("pageChange",{index:e})||(this.dataSource.page(e),this.trigger(v,{index:e}))}});i.plugin(M)}(window.kendo.jQuery);kendo;!function(e,t){var n,i=window.kendo,r=i.ui.Widget,o=e.extend,a=i.htmlEncode,s=window.setTimeout,l="click",c="show",d="hide",u="k-close-icon",h=".k-notification-actions .k-close-icon",p="k-hiding",f="info",m="success",g="warning",v="error",_=((n={}).info="info-circle",n.error="x-outline",n.warning="exclamation-circle",n.success="check-outline",n),b="top",w="left",y="right",k=".kendoNotification",x=function(t){return function(n){var r=n.typeIcon,o=n.content;n.closeButton;return i.ui.icon(e(''),{icon:_[a(r)]||a(r)})+'
    '+(t?a(o):o)+"
    "}},C=x(!1),S=x(!0),T={close:{template:i.ui.icon(e(''),{icon:"x",iconClass:u})}},D=r.extend({init:function(t,n){var o=this;r.fn.init.call(o,t,n),(n=o.options).appendTo&&e(n.appendTo).is(t)||o.element.hide(),o._compileTemplates(n.templates),o._guid="_"+i.guid(),o._isRtl=i.support.isRtl(t),o._compileStacking(n.stacking,n.position.top,n.position.left),i.notify(o)},events:[c,d],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:[],title:null,animation:{open:{effects:"fade:in",duration:300},close:{effects:"fade:out",duration:600,hide:!0}}},_compileTemplates:function(t){var n=this,r=i.template;n._compiled={},e.each(t,(function(t,i){n._compiled[i.type]=r(i.template||e("#"+i.templateId).html())})),n._defaultCompiled=r(C),n._safeCompiled=r(S)},_getCompiled:function(e,t){var n=t?this._safeCompiled:this._defaultCompiled;return e&&this._compiled[e]||n},_compileStacking:function(e,t,n){var i,r,o=this,a={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},s=null!==n?w:y;switch(e){case"down":i="bottom "+s,r="top "+s,delete a.paddingBottom;break;case y:i="top right",r="top left",delete a.paddingRight;break;case w:i="top left",r="top right",delete a.paddingLeft;break;case"up":i="top "+s,r="bottom "+s,delete a.paddingTop;break;default:null!==t?(i="bottom "+s,r="top "+s,delete a.paddingBottom):(i="top "+s,r="bottom "+s,delete a.paddingTop)}o._popupOrigin=i,o._popupPosition=r,o._popupPaddings=a},_attachPopupEvents:function(e,t){var n,i=this,r=e.allowHideAfter,o=!isNaN(r)&&r>0;function a(e){e.on(l+k,(function(){i._hidePopup(t)}))}e.hideOnClick?t.bind("activate",(function(){o?s((function(){a(t.element)}),r):a(t.element)})):e.button&&(n=t.element.find(h),o?s((function(){a(n)}),r):a(n))},_showPopup:function(t,n){var r,a,l=this,c=n.autoHideAfter,d=n.position.left,u=n.position.top;a=e("."+l._guid+":not(."+"k-hiding)").last(),r=new i.ui.Popup(t,{anchor:a[0]?a:document.body,origin:l._popupOrigin,position:l._popupPosition,_resizeOnWrap:!0,animation:n.animation,copyAnchorStyles:!1,autosize:!0,modal:!0,collision:"",isRtl:l._isRtl,close:function(){l._triggerHide(this.element)},deactivate:function(e){e.sender.element.off(k),e.sender.element.find(h).off(k),e.sender.destroy()}}),l._attachPopupEvents(n,r),t.removeClass("k-group k-reset k-popup"),a[0]?r.open():(null===d&&(d=e(window).width()-t.outerWidth()-n.position.right),null===u&&(u=e(window).height()-t.outerHeight()-n.position.bottom),r.open(d,u)),t.removeClass("k-popup"),r.wrapper.addClass(l._guid).css(o({margin:0,zIndex:10050},l._popupPaddings)),n.position.pinned?(r.wrapper.css("position","fixed"),a[0]&&l._togglePin(r.wrapper,!0)):a[0]||l._togglePin(r.wrapper,!1),c>0&&s((function(){l._hidePopup(r)}),c)},_hidePopup:function(e){e.wrapper.addClass(p),e.close()},_togglePin:function(t,n){var i=e(window),r=n?-1:1;t.css({top:parseInt(t.css(b),10)+r*i.scrollTop(),left:parseInt(t.css(w),10)+r*i.scrollLeft()})},_attachStaticEvents:function(e,t){var n=this,i=e.allowHideAfter,r=!isNaN(i)&&i>0;function o(e){e.on(l+k,n._hideStatic.bind(n,t))}e.hideOnClick?r?s((function(){o(t)}),i):o(t):e.button&&(r?s((function(){o(t.find(h))}),i):o(t.find(h)))},_showStatic:function(t,n){var r=this,o=n.autoHideAfter,a=n.animation,l="up"==n.stacking||n.stacking==w?"prependTo":"appendTo";r._hideTimeouts||(r._hideTimeouts=[]),t.removeClass("k-popup").addClass(r._guid)[l](n.appendTo).hide().kendoAnimate(a.open||!1),t.css("display",""),r.getNotifications().each((function(t,a){r._attachStaticEvents(n,e(a)),o>0&&!e(a).attr(i.attr("has-hidetimeout"))&&(e(a).attr(i.attr("has-hidetimeout"),!0),r._hideTimeouts.push(s((function(){r._hideStatic(e(a))}),o)))}))},_hideStatic:function(e){e.kendoAnimate(o(this.options.animation.close||!1,{complete:function(){e.off(k).find(h).off(k),e.remove()}})),this._triggerHide(e)},_triggerHide:function(e){this.trigger(d,{element:e}),this.angular("cleanup",(function(){return{elements:e}}))},show:function(n,r,a){var s,l,d=this,u=d.options,h=e(''),p=i.guid();return r||(r=f),h.attr("aria-label",r),null!==n&&n!==t&&""!==n&&(i.isFunction(n)&&(n=n()),l={typeIcon:r,content:"",closeButton:u.button},s=e.isPlainObject(n)?o(l,n):o(l,{content:n}),h.addClass("k-notification-"+r).toggleClass("k-notification-closable",u.button).attr({"data-role":"alert",title:u.title}).css({width:u.width,height:u.height}).append(d._getCompiled(r,a)(s)),d.options.button&&h.append(d.addActions("close")),h.find(".k-notification-content").attr("id",p),h.attr("aria-describedby",p),d.angular("compile",(function(){return{elements:h,data:[{dataItem:s}]}})),e(u.appendTo)[0]?d._showStatic(h,u):d._showPopup(h,u),d.trigger(c,{element:h})),d},showText:function(e,t){this.show(e,t,!0)},info:function(e){return this.show(e,f)},success:function(e){return this.show(e,m)},warning:function(e){return this.show(e,g)},error:function(e){return this.show(e,v)},hide:function(){var t=this,n=t.getNotifications();return t.options.appendTo?(t._hideTimeouts&&t._hideTimeouts.forEach(clearTimeout),t._hideTimeouts=[],n.each((function(n,i){t._hideStatic(e(i))}))):n.each((function(n,i){var r=e(i).data("kendoPopup");r&&t._hidePopup(r)})),t},getNotifications:function(){var t=e("."+this._guid+":not(."+"k-hiding)");return this.options.appendTo?t:t.find(">.k-child-animation-container >.k-notification")},setOptions:function(e){var n,i=this;r.fn.setOptions.call(i,e),n=i.options,e.templates!==t&&i._compileTemplates(n.templates),e.stacking===t&&e.position===t||i._compileStacking(n.stacking,n.position.top,n.position.left)},destroy:function(){r.fn.destroy.call(this),this.getNotifications().off(k).find(h).off(k)},addActions:function(t){var n=e('');return Array.isArray(t)||(t=[t]),t.forEach((function(t){e(T[t].template).wrap('').parent().appendTo(n)})),n}});i.ui.plugin(D)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Widget,r=n.ui.Popup,o=n.isFunction,a=e.isPlainObject,s=e.extend,l=e(document),c=n.isLocalUrl,d="_tb_active",u="aria-describedby",h="show",p="hide",f="error",m="contentLoad",g="requestStart",v="k-content-frame",_=function(t){var i=t.autoHide,r=t.callout,o=t.dir;return'"},b=n.template((function(e){return""})),w=".kendoTooltip",y={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"}},k={top:"bottom",bottom:"top",left:"right",right:"left",center:"center"},x={bottom:"n",top:"s",left:"e",right:"w",center:"n"},C={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}};function S(e){for(;e.length&&!T(e);)e=e.parent()}function T(e){var t=e.data(n.ns+"title");if(t)return e.attr("title",t),e.removeData(n.ns+"title"),!0}function D(e){var t=e.attr("title");if(t)return e.data(n.ns+"title",t),e.attr("title",""),!0}function I(e){for(;e.length&&!e.is("body")&&!D(e);)e=e.parent()}var z=i.extend({init:function(e,t){var r,o=this;i.fn.init.call(o,e,t),r=o.options.position.match(/left|right/)?"horizontal":"vertical",o.dimensions=C[r],n.support.touch&&this._isShownOnMouseEnter()&&o.element.on(n.support.mousedown+w,o.options.filter,o._showOn.bind(o)),o.element.on(o.options.showOn+w,o.options.filter,o._showOn.bind(o)),"click"===o.options.showOn&&o.element.on("keydown"+w,o.options.filter,o._keydown.bind(o))},options:{name:"TooltipBase",filter:"",offset:0,showAfter:100,hideAfter:100,callout:!0,position:"bottom",showOn:"mouseenter",animation:{open:{effects:"fade:in",duration:0},close:{duration:40,hide:!0}}},destroy:function(){var e=this.popup;e&&(e.element.off(w),e.destroy()),clearTimeout(this.timeout),i.fn.destroy.call(this)},hide:function(){this.popup&&this.popup.close()},show:function(e){e=e||this.element,this._saveTitle(e),this._show(e)},target:function(){return this.popup?this.popup.options.anchor:null},_keydown:function(t){var i=e(t.currentTarget);t.keyCode==n.keys.ENTER&&this._show(i)},_showOn:function(t){var n=this,i=e(t.currentTarget);n._isShownOnClick()&&!n._isShownOnMouseEnter()?n._show(i):n._isShownOnFocus()?(n._saveTitle(i),n._show(i)):(clearTimeout(n.timeout),n.timeout=setTimeout((function(){n._show(i)}),n.options.showAfter))},_isShownOnFocus:function(){return this.options.showOn&&this.options.showOn.match(/focus/)},_isShownOnMouseEnter:function(){return this.options.showOn&&this.options.showOn.match(/mouseenter/)},_isShownOnClick:function(){return this.options.showOn&&this.options.showOn.match(/click/)},_positionCallout:function(){var t=this,n=t.options.position,i=t.dimensions,r=i.offset,o=t.popup,a=o.options.anchor,s=e(a).offset(),l=e(o.element).offset(),c=x[o.flipped?k[n]:n],d=s[r]-l[r]+e(a)[i.size]()/2;t._offset(n,t.options.offset),t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-"+c).css(r,d)},_offset:function(e,t,i){var r=this,o="top"==e||"left"==e,a=r.popup.flipped,s=o&&a||!o&&!a?1:-1,l=o?"margin-"+e:"margin-"+k[e],c=(i||n._outerWidth(r.arrow))/2+t;r.popup.wrapper.css(l,c*s+"px")},_addDescribedBy:function(){var e=this,t=e.popup.options.anchor,i=t[0].id||e.element[0].id||n.guid(),r=[];t.attr(u)&&r.push(t.attr(u)),i&&(r.push(i+d),t.attr(u,r.join(" ")),e.popup.element.attr("id",i+d))},_removeDescribedBy:function(e){var t,n,i,r=this.popup.element.attr("id"),o=e.attr(u);o&&((t=o.split(" "))&&t.length>0&&(n=t.filter((function(e){return e!==r}))),n&&n.length>0?(i=n.join(" "),e.attr(u,i)):e.removeAttr(u))},_openPopup:function(){this.popup&&(this.popup._hovered=!0,this.popup.open())}});n.ui.plugin(z);var M=z.extend({init:function(e,t){var i,r=this;z.fn.init.call(r,e,t),i=r.options.position.match(/left|right/)?"horizontal":"vertical",r.dimensions=C[i],r._documentKeyDownHandler=r._documentKeyDown.bind(r),(this._isShownOnMouseEnter()||this._isShownOnClick())&&r.element.on("mouseenter"+w,r.options.filter,r._mouseenter.bind(r)),this.options.autoHide&&this._isShownOnMouseEnter()&&r.element.on("mouseleave"+w,r.options.filter,r._mouseleave.bind(r)),this.options.autoHide&&this._isShownOnFocus()&&r.element.on("blur"+w,r.options.filter,r._blur.bind(r)),n.support.touch&&r.element.on(n.support.mousedown+w,r.options.filter,r._mouseenter.bind(r))},options:{name:"Tooltip",filter:"",content:function(e){return e.target.data(n.ns+"title")},showAfter:100,callout:!0,offset:0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{duration:40,hide:!0}}},events:[h,p,m,f,g],_mouseenter:function(t){I(e(t.currentTarget))},_saveTitle:function(e){I(e)},_appendContent:function(e){var t,i=this,r=i.options.content,s=i.content,l=i.options.iframe;a(r)&&r.url?("iframe"in i.options||(l=!c(r.url)),i.trigger(g,{options:r,target:e}),l?(s.hide(),(t=s.find("."+v)[0])?t.src=r.url||t.src:s.html(b({content:r})),s.find("."+v).off("load"+w).on("load"+w,(function(){i.trigger(m),s.show()}))):(s.empty(),n.ui.progress(s,!0),i._ajaxRequest(r))):r&&o(r)?(r=r({sender:this,target:e}),s.html(r||"")):s.html(r),i.angular("compile",(function(){return{elements:s}}))},_ajaxRequest:function(e){var t=this;jQuery.ajax(s({type:"GET",dataType:"html",cache:!1,error:function(e,i){n.ui.progress(t.content,!1),t.trigger(f,{status:i,xhr:e})},success:function(e){n.ui.progress(t.content,!1),t.content.html(e),n._outerHeight(t.popup.element)>n._outerHeight(t.popup.wrapper)&&(t.popup.wrapper.css("height",n._outerHeight(t.popup.element)+"px"),t.popup.position(),t._positionCallout()),t.trigger(m)}.bind(t)},e))},_documentKeyDown:function(e){e.keyCode===n.keys.ESC&&this.hide()},refresh:function(){var e=this.popup;e&&e.options.anchor&&this._appendContent(e.options.anchor)},_show:function(e){var t=this,n=t.target();t.popup||t._initPopup(),n&&n[0]!=e[0]&&(t.popup.close(!0),t.popup.element.kendoStop(!0,!0)),n&&n[0]==e[0]||(t._appendContent(e),t.popup.options.anchor=e),t.popup.one("deactivate",(function(){S(e),t._removeDescribedBy(e),this.element.removeAttr("id").attr("aria-hidden",!0),l.off("keydown"+w,t._documentKeyDownHandler)})),t._openPopup()},_initPopup:function(){var t=this,i=t.options,o=e(n.template(_)({callout:i.callout&&"center"!==i.position,dir:x[i.position],autoHide:i.autoHide}));t.popup=new r(o,s({autosize:!0,activate:function(){t._addDescribedBy(),i.callout?t._positionCallout():t._offset(t.options.position,t.options.offset),this.element.removeAttr("aria-hidden"),l.on("keydown"+w,t._documentKeyDownHandler),t.trigger(h),t.popup._hovered=undefined},close:function(){t.trigger(p)},copyAnchorStyles:!1,animation:i.animation},y[i.position])),o.css({width:i.width,height:i.height}),t.content=o.find(".k-tooltip-content"),t.arrow=o.find(".k-callout"),i.autoHide&&this._isShownOnMouseEnter()?o.on("mouseleave"+w,t._mouseleave.bind(t)):o.on("click"+w,".k-tooltip-button",t._closeButtonClick.bind(t))},_closeButtonClick:function(e){e.preventDefault(),this.hide()},_mouseleave:function(e){var t=this;clearTimeout(t.timeout),t.timeout=setTimeout((function(){t._closePopup(e.currentTarget)}),t.options.hideAfter)},_blur:function(e){this._closePopup(e.currentTarget)},_closePopup:function(t){this.popup&&!this.popup._hovered?this.popup.close():S(e(t))},destroy:function(){this.element.off(w),l.off("keydown"+w,this._documentKeyDownHandler),z.fn.destroy.call(this)}});n.ui.plugin(M)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Widget,r=n.ui,o=".kendoFloatingLabel",a="k-empty",s="k-focus",l="k-disabled",c="k-no-click",d="k-readonly",u=i.extend({init:function(r,o){var a=this;i.fn.init.call(a,r,o),o=e.extend(!0,{},o),a.widget=a.options.widget,a.widgetWrapper=a.widget.wrapper[0],a.refresh(),a._editable({readonly:a.options.widget.options.readonly!==t&&a.options.widget.options.readonly,disable:a.options.widget.options.enable!==t&&!a.options.widget.options.enable}),a.widgetWrapper.style.width&&(a.element.css("width",a.widgetWrapper.style.width),a.widgetWrapper.style.width="100%"),a.element.addClass("k-floating-label-container"),n.notify(a)},options:{name:"FloatingLabel",widget:null,useReadOnlyClass:!1,floatCheck:function(e){return!e.element.val()}},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},refresh:function(){var e=this,t=e.element;t.removeClass(a).removeClass(s),e.options.floatCheck({element:e.options.widget.element,floating:e.element})&&t.addClass(a),(document.activeElement===e.options.widget.element[0]||e.options.widget.input&&document.activeElement===e.options.widget.input[0])&&t.addClass(s)},destroy:function(){this.element.off(o),i.fn.destroy.call(this)},_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly;n.off(o),r||i?n.toggleClass(l,i).toggleClass(t.options.useReadOnlyClass?d:c,r):(n.removeClass(l).removeClass(t.options.useReadOnlyClass?d:c),n.on("focusin"+o,t.refresh.bind(t)),n.on("focusout"+o,t.refresh.bind(t)))}});r.plugin(u)}(window.kendo.jQuery);kendo;var D=window.kendo,I=D.jQuery,z=D.ui.Widget,M=D.isFunction,E=z.extend({options:{name:"Label",widget:null},init:function(e,t){var n=this;e=e||I(""),z.fn.init.call(n,e,t),t=I.extend(!0,{},t),n.widget=t.widget,t.floating&&n._floatingLabel(),n._label()},destroy:function(){this.floatingLabel&&this.floatingLabel.destroy(),z.fn.destroy.call(this)},_unwrapFloating:function(){var e=this;e.floatingLabel&&(e.floatingLabel.destroy(),e.widget.wrapper.unwrap(e._floatingLabelContainer))},setOptions:function(e){var t=this,n=!1;("string"==typeof e||I.isPlainObject(e)&&!1===e.floating)&&(n=!0),e=I.isPlainObject(e)?e:{content:e},z.fn.setOptions.call(t,e),n&&t.floatingLabel?(t._unwrapFloating(),t.floatingLabel.destroy(),delete t.floatingLabel):!0!==e.floating||t.floatingLabel||(t.element.remove(),t._floatingLabel()),t._label(),t.floatingLabel&&t.floatingLabel.refresh()},_label:function(){var e=this,t=e.widget.element,n=e.options,i=t.attr("id"),r=n.content;M(r)&&(r=r.call(e)),r||(r=""),i||(i=n.name+"_"+D.guid(),t.attr("id",i)),e.element.addClass("k-label k-input-label").attr("for",i).text(r).insertBefore(e.options.beforeElm||e.widget.wrapper)},_floatingLabel:function(){var e=this,t=I.extend({},e.options);delete t.name,(t.floating||!1)&&(e._floatingLabelContainer=e.widget.wrapper.wrap("").parent(),e.floatingLabel=new D.ui.FloatingLabel(e._floatingLabelContainer,I.extend({},t)))}});D.ui.plugin(E);!function(e,t){var n=window.kendo,i=n.htmlEncode,r=n.ui.Widget,o=n.ui,a=".kendoActionSheet",s=o.Popup,l=n.keys,c=n.isFunction,d=s.TabKeyTrap,u=e(document.documentElement),h="open",p="close",f="activate",m="deactivate",g=":kendoFocusable:not([tabindex='-1'])",v="k-actionsheet-bottom",_="k-actionsheet-fullscreen",b=".k-actionsheet-item:not(."+w+"),.k-actions .k-button[ref-actionsheet-action-button]:not(."+w+")",w="k-disabled",y="aria-disabled",k="k-hidden",x=n.guid(),C=e.extend,S=n.template,T=/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,D=function(e){return'
    '+(e.title?'
    '+e.title+"
    "+(e.subtitle?'
    '+(e.subtitle||"")+"
    ":"")+"
    "+(e.closeButton?'
    '+n.html.renderButton("",{icon:"x",fillMode:"flat",size:"large"})+"
    ":"")+"
    ":"")+"
    "},I=function(e){var t=e.disabled,n=e.icon,r=e.text,o=e.description;return''+(n?''+n+"":"")+''+i(r)+""+(o?''+i(o)+"":"")+""},z={text:"",description:"",iconClass:"",iconSize:0,iconColor:"",click:e.noop,group:"top",disabled:!1},M={text:"",icon:"",iconClass:"",click:e.noop,disabled:!1};var E=r.extend({init:function(e,t){var i=this;t=t||{},r.fn.init.call(i,e,t),t.appendTo&&i.element.appendTo(t.appendTo),i._hasItems=t.items&&t.items.length,i._hasActionButtons=t.actionButtons&&t.actionButtons.length,i._mapItems(),i._mapActionButtons(),i._wrapper(),i._popup(),i._createContent(),i._createHeader(),i._createFooter(),i._applyAria(),i._tabKeyTrap=new d(i.wrapper),i.downEvent=n.applyEventMap("down",n.guid()),i.clickEvent=n.applyEventMap("click",n.guid()),i._mousedownProxy=i._mousedown.bind(i),i._clickProxy=i._click.bind(i),i.wrapper.on("keydown"+a,i,i._keydown.bind(i))},events:[h,p,f,m],options:{name:"ActionSheet",title:"",items:[],popup:null,fullscreen:!1,footerTemplate:null,headerTemplate:null,contentTemplate:null,actionButtons:[],closeButton:!1,adaptive:!1,focusOnActivate:!0},_mapItems:function(){var e=this;e._hasItems&&(e.options.items=e.options.items.map(H))},_mapActionButtons:function(){var e=this;e._hasActionButtons&&(e.options.actionButtons=e.options.actionButtons.map(R))},_wrapper:function(){var t,n=this,i=n.element,r=1==n.options.fullscreen?_:v;i.addClass("k-actionsheet "+r+(n.options.adaptive?" k-adaptive-actionsheet":" k-actionsheet-jq")),n.wrapper=t=i.wrap("
    ").parent(),t.prepend(e("
    ").addClass("k-overlay"))},_applyAria:function(){var e=this,t=e.element,n=e.wrapper.find(".k-actionsheet-title").attr("id");t.attr({role:"dialog","aria-modal":!0,"aria-labelledby":e.options.title?n:null})},_popup:function(){var e=this,t=e.options,i=!!t.adaptive&&{open:{effects:"slideIn:up",transition:!0,duration:200}};t.open=null,t.close=null,t.activate=null,t.deactivate=null,e.popup=new s(e.element,C(t.popup,t,{name:"Popup",isRtl:n.support.isRtl(t.anchor),omitOriginOffsets:!0,appendTo:e.wrapper,modal:!0,animation:i,position:"top center",anchor:t.anchor||e.wrapper})),t.focusOnActivate&&e.popup.bind(f,e._openHandler.bind(e)),e.popup.bind(f,(function(t){e.trigger(f,t)})),e.popup.bind(m,(function(t){e.wrapper.addClass(k),u.off(e.downEvent,e._mousedownProxy),u.off(e.clickEvent,e._clickProxy),e.trigger(m,t)})),e.popup.bind(h,(function(t){e.trigger(h,t)})),e.popup.bind(p,(function(t){var n=e._closeButtonPressed;e._closeButtonPressed=!1,e.trigger(p,C({},t,{closeButton:n}))}))},_createHeader:function(){var e=this.options;(e.title||e.headerTemplate)&&this.element.prepend(S(e.headerTemplate||D)(e))},_items:function(){var e=this;if(e._hasItems){var t=e.options.items.reduce((function(e,t){var n=t.group||"top";return e[n]=e[n]||[],e[n].push(t),e}),new Map),n=t.top,i=t.bottom;e._createItems(n),n&&n.length&&i&&i.length&&e._content.append('
    '),e._createItems(i)}},_createContent:function(){var t=this,n=t.options;t.element.wrapInner(e("
    "));var i=t._content=t.element.find(".k-actionsheet-content");if(t._hasItems)return i.empty(),void t._items();(n.contentTemplate||n.hideOverflowContent)&&i.addClass("!k-overflow-hidden"),n.contentTemplate&&i.html(S(n.contentTemplate)(n))},_createItems:function(t){var i,r,o,a,s,l,c,d,u=this._content,h=e("
    ");if(t&&t.length)for(u.append(h),o=S(I),i=0;i"+(a.text||"")+"",e.extend({size:"large"},a))),r.append(t),t.toggleClass(w,!s),t.attr("disabled",!s),s?t.removeAttr(y):t.attr(y,!s),a.click&&t.data("action",a.click)}},_createFooter:function(){var t,n=this,i=n.options;if(n._hasActionButtons||i.footerTemplate){if((t=n._footer=e("")).insertAfter(n._content),n._hasActionButtons)return t.addClass("k-actions k-actions-stretched k-actions-horizontal"),void n._createActionButtons();i.footerTemplate&&n._footer.append(S(i.footerTemplate)(i))}},destroy:function(){var e=this;e.close(),r.fn.destroy.call(e),e._content=null,e._footer=null,e._header=null,e.element.off(a),e.wrapper.off(a),e.popup.destroy()},open:function(e){var t=this;t.altTarget=e&&e.altTarget,t.wrapper.removeClass(k),t._elementHeight=t._elementHeight||t.element.outerHeight(),t.options.adaptive&&t.wrapper.width("100%"),t.popup.open("auto",0),t.popup.wrapper.find(">.k-child-animation-container").css({bottom:0,width:"100%"}),u.off(t.downEvent,t._mousedownProxy).on(t.downEvent,t._mousedownProxy),u.off(t.clickEvent,t._clickProxy).on(t.clickEvent,t._clickProxy),t._tabKeyTrap.trap()},visible:function(){return this.popup.visible()},toggle:function(){this.visible()?this.close():this.open()},fullscreen:function(e){var t=this;t.element.toggleClass(_,!0===e),t.element.toggleClass(v,!0!==e),t.element.closest(".k-child-animation-container").css({height:e?"100%":"auto"})},close:function(){this.popup.close()},position:e.noop,_focusFirstFocusableElement:function(){var e=this.element.find(g).first();e.length&&e.trigger("focus")},_focusLastFocusableElement:function(){var e=this.element.find(g).last();e.length&&e.trigger("focus")},_openHandler:function(){var e=this;if(e._hasItems){var t=e._content.find(".k-actionsheet-item")[0];t&&t.focus()}else e._focusFirstFocusableElement()},_isActionableButton:function(t){return e(t).closest(b).length>0},_triggerAction:function(t){var n=e(t.target).closest(b).data("action");c(n)&&n(t),t.isDefaultPrevented()||this.close()},_keydown:function(t){var i=this,r=n.keys,o=t.keyCode,a=e(t.target);if(o==r.ESC)t.stopPropagation(),i.close();else if(i._isActionableButton(a)&&A(t))i._triggerAction(t);else if(t.keyCode===n.keys.TAB){var s=this.wrapper.find(g),l=s.first(),c=s.last();t.shiftKey?document.activeElement===l[0]&&(c.trigger("focus"),t.preventDefault()):document.activeElement===c[0]&&(l.trigger("focus"),t.preventDefault())}},_click:function(e){var t=n.eventTarget(e);this._isActionableButton(t)&&this._triggerAction(e)},_mousedown:function(t){var i=this,r=i.element[0],o=n.eventTarget(t);i.altTarget&&i.altTarget.is(e(o))||(!function(t,n){return!(!t||!n)&&(t===n||e.contains(t,n))}(r,o)||e(o).closest("["+n.attr("ref-actionsheet-close-button")+"]",e(r).find("k-actionsheet-titlebar")).length>0)&&(i._closeButtonPressed=!0,i.close())}});function A(e){return e.keyCode==l.ENTER||e.keyCode==l.SPACEBAR}function H(e){return C({},z,e)}function R(e){return C({},M,e)}o.plugin(E)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=n._outerHeight,o=/^\d+(\.\d+)?%$/i,a=i.Widget,s=n.keys,l=n.support,c=n.htmlEncode,d=n._activeElement,u=n._outerWidth,h=n.data.ObservableArray,p="id",f="change",m="k-focus",g="k-hover",v="k-selected",_="k-i-loading k-input-loading-icon",b="k-list-ul",w=".k-list-group-sticky-header",y=".k-list-item",k="open",x="close",C="cascade",S="select",T="click",D="mouseenter",I="activate",z="deactivate",M="dataBinding",E="dataBound",A="selectedItemChange",H="selected",R="requestStart",F="requestEnd",P="focus",B=e.extend,L=Array.isArray,V=l.browser,O="k-hidden",N="width",W="text",U=V.msie,j=/"/g,q={ComboBox:["DropDownList","MultiColumnComboBox"],DropDownList:["ComboBox","MultiColumnComboBox"],MultiColumnComboBox:["ComboBox","DropDownList"]},G="aria-labelledby",K="aria-label",Y="aria-activedescendant",$="aria-expanded",Q="aria-hidden",X="aria-busy",Z="aria-selected",J=".k-table-group-row",ee=n.ui.DataBoundWidget.extend({init:function(t,i){var r,o=this;a.fn.init.call(o,t,i),t=o.element,i=o.options,o._isSelect=t.is(S),o._isSelect&&o.element[0].length&&(i.dataSource||(i.dataTextField=i.dataTextField||W,i.dataValueField=i.dataValueField||"value")),"auto"===i.adaptiveMode&&(o.largeMQL=n.mediaQuery("large"),o.mediumMQL=n.mediaQuery("medium"),o.smallMQL=n.mediaQuery("small")),o._listSize=n.cssProperties.getValidClass({widget:"List",propName:"size",value:i.size}),o._filterHeader(),o.ul=e('
      ').attr({tabIndex:-1,"aria-hidden":!0}),o.list=e("
      ").addClass(o._listSize).append(o.ul),(r=t.attr(p))||(r=n.guid()),o.list.attr(p,r+"-list"),o.ul.attr(p,r+"_listbox"),i.columns&&i.columns.length&&(o.list.removeClass("k-list").addClass("k-data-table"),o.list.removeClass(o._listSize).addClass("k-table-md"),o.ul.removeClass(b).addClass("k-table"),o._columnsHeader()),o._header(),o._noData(),o._footer(),o._accessors(),o._initValue()},options:{valuePrimitive:!1,footerTemplate:"",headerTemplate:"",noDataTemplate:!0,size:"medium",messages:{noData:"No data found.",clear:"clear"},adaptiveMode:"none"},setOptions:function(e){a.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable),e.columns&&e.columns.length&&this._columnsHeader(),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData(),e.label&&this._inputLabel?this.label.setOptions(e.label):!1===e.label?(this.label._unwrapFloating(),this._inputLabel.remove(),delete this._inputLabel):e.label&&this._label()},focus:function(){this._focused.trigger(P)},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e=e===t||e)},_label:function(){var t=this,i=t.options,r=e.isPlainObject(i.label)?i.label:{content:i.label};t.label=new n.ui.Label(null,e.extend({},r,{widget:t,floatCheck:t._floatCheck.bind(t)})),t._inputLabel=t.label.element},_floatCheck:function(){return!this.listView||!(this.value()||!!this.text&&this.text())&&!this.popup.visible()},_refreshFloatingLabel:function(){var e=this;e.label&&e.label.floatingLabel&&e.label.floatingLabel.refresh()},_header:function(){var t=this,i=e(t.header),r=t.options.headerTemplate;if(this._angularElement(i,"cleanup"),n.destroy(i),i.remove(),r){var o="function"!=typeof r?n.template(r):r;i=e(o({})),t.header=i[0]?i:null,t.list.parent.length>0&&t.list.before(i),this._angularElement(t.header,"compile")}else t.header=null},_filterHeader:function(){this.filterTemplate='
      '+n.ui.icon({icon:"search",iconClass:"k-input-icon"})+"
      ",this._isFilterEnabled()&&(this.filterInput=e('').attr({placeholder:this.element.attr("placeholder"),title:this.options.filterTitle||this.element.attr("title"),role:"searchbox","aria-label":this.options.filterTitle,"aria-haspopup":"listbox","aria-autocomplete":"list"}))},_columnsHeader:function(){var t,i=this,r=e(i.columnsHeader);this._angularElement(r,"cleanup"),n.destroy(r),r.remove();for(var a="
      ",s="",l="",c=0;c",l+=""}a+=s+="",a+="",a+=l+="",t=e(a+="
      "),n.applyStylesFromKendoAttributes(t,["width"]),i.columnsHeader=r=t,i.list.prepend(r),this._angularElement(i.columnsHeader,"compile")},_noData:function(){var t=this,i=e(t.noData),r=!0===t.options.noDataTemplate?function(){return c(t.options.messages.noData)}:t.options.noDataTemplate;t.angular("cleanup",(function(){return{elements:i}})),n.destroy(i),i.remove(),r?(t.noData=e('
      ').hide().appendTo(t.list),t.noDataTemplate="function"!=typeof r?n.template(r):r):t.noData=null},_footer:function(){var t=this,i=e(t.footer),r=t.options.footerTemplate,o=this.options.columns&&this.options.columns.length?'':'';this._angularElement(i,"cleanup"),n.destroy(i),i.remove(),r?(t.footer=e(o).appendTo(t.list),t.footerTemplate="function"!=typeof r?n.template(r):r):t.footer=null},_listOptions:function(t){var i=this,r=i.options,o=r.virtual,a={change:i._listChange.bind(i)},s=i._listBound.bind(i),l=i._focused,d=i.element.attr("id"),u=e('label[for="'+i.element.attr("id")+'"]'),h=l.attr(G);return!h&&u.length&&(h=u.attr("id")||i._generateLabelId(u,d||n.guid())),o="object"==typeof o?o:{},(t=e.extend({autoBind:!1,selectable:!0,dataSource:i.dataSource,click:i._click.bind(i),activate:i._activateItem.bind(i),columns:r.columns,deactivate:i._deactivateItem.bind(i),dataBinding:function(){i.trigger(M)},dataBound:s,height:r.height,dataValueField:r.dataValueField,dataTextField:r.dataTextField,groupTemplate:r.groupTemplate,fixedGroupTemplate:r.fixedGroupTemplate,template:r.template,ariaLabel:l.attr(K),ariaLabelledBy:h,listSize:i._listSize},t,o,a)).template||(t.template=function(e){return c(n.getter(t.dataTextField)(e))}),r.$angular&&(t.$angular=r.$angular),t},_initList:function(e){var t=this,i=e&&e.skipValueUpdate,r=t._listOptions({selectedItemChange:t._listChange.bind(t)});t.options.virtual?(t.listView=new n.ui.VirtualList(t.ul,Object.assign(r,{height:t._hasActionSheet()?362:t.options.height})),t.list.addClass("k-virtual-list")):t.listView=new n.ui.StaticList(t.ul,r),t.listView.bind("listBound",t._listBound.bind(t)),i||t._setListValue()},_setListValue:function(e){(e=e||this.options.value)!==t&&this.listView.value(e).done(this._updateSelectionState.bind(this))},_updateSelectionState:e.noop,_listMousedown:function(e){this.filterInput&&this.filterInput[0]===e.target||e.preventDefault()},_isFilterEnabled:function(){var e=this.options.filter;return e&&"none"!==e},_hideClear:function(){this._clear&&this._clear.addClass(O)},_showClear:function(){this._clear&&this._clear.removeClass(O)},_clearValue:function(){this._clearText(),this._accessor(""),this.listView.value([]),this._isSelect&&(this._customOption=t),this._isFilterEnabled()&&!this.options.enforceMinLength&&(this._filter({word:"",open:!1}),this.options.highlightFirst&&this.listView.focus(0)),this._change()},_clearText:function(){this.text("")},_clearFilter:function(){this.options.virtual||this.listView.bound(!1),this._filterSource()},_filterSource:function(t,n){var i=this,r=i.options,o=r.filterFields&&t&&t.logic&&t.filters&&t.filters.length,a=i.dataSource,s=B({},a.filter()||{}),l=t||s.filters&&s.filters.length&&!t,c=se(s,r.dataTextField);if(this._clearFilterExpressions(s),(t||c)&&i.trigger("filtering",{filter:t}))return e.Deferred().reject().promise();var d={filters:[],logic:"and"};o?d.filters.push(t):this._pushFilterExpression(d,t),ae(s)&&(d.logic===s.logic?d.filters=d.filters.concat(s.filters):d.filters.push(s)),i._cascading&&this.listView.setDSFilter(d);var u=B({},{page:l?1:a.page(),pageSize:l?a.options.pageSize:a.pageSize(),sort:a.sort(),filter:a.filter(),group:a.group(),aggregate:a.aggregate()},{filter:d});return a[n?"read":"query"](a._mergeState(u))},_pushFilterExpression:function(e,t){ae(t)&&""!==t.value&&e.filters.push(t)},_clearFilterExpressions:function(e){if(e.filters){for(var t,n=0;n'+n.ui.icon("x")+"").attr({role:"button",tabIndex:-1})),t.options.clearButton||t._clear.remove(),this._hideClear()},search:function(e){var t=this.options;e="string"==typeof e?e:this._inputValue(),clearTimeout(this._typingTimeout),(!t.enforceMinLength&&!e.length||e.length>=t.minLength)&&(this._state="filter",this.listView&&(this.listView._emptySearch=!n.trim(e).length),this._isFilterEnabled()?this._filter({word:e,open:!0}):this._searchByWord(e))},current:function(e){return this._focus(e)},items:function(){return this.ul[0].children},destroy:function(){var e=this,t=e.ns;a.fn.destroy.call(e),e._unbindDataSource(),(e.largeMQL||e.mediumMQL||e.smallMQL)&&(e.largeMQL.destroy(),e.mediumMQL.destroy(),e.smallMQL.destroy()),e.listView.destroy(),e.list.off(t),e.popup.destroy(),e._form&&e._form.off("reset",e._resetHandler),e.label&&e.label.destroy()},dataItem:function(n){var i=this;if(n===t)return i.listView.selectedDataItems()[0];if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(e(n).data("uid"));n=e(i.items()).index(n)}return i.dataSource.flatView()[n]},_activateItem:function(){var e=this.listView.focus();e&&this.popup.visible()&&this._focused.add(this.filterInput).attr(Y,e.attr("id"))},_deactivateItem:function(){this._focused.add(this.filterInput).removeAttr(Y)},_accessors:function(){var e=this,t=e.element,i=e.options,r=n.getter,o=t.attr(n.attr("text-field")),a=t.attr(n.attr("value-field"));!i.dataTextField&&o&&(i.dataTextField=o),!i.dataValueField&&a&&(i.dataValueField=a),e._text=r(i.dataTextField),e._value=r(i.dataValueField)},_aria:function(e){var n,i=this,r=i.options,o=i._focused;r.suggest!==t&&(n="none"===r.filter?!0===r.suggest?"inline":"none":!0===r.suggest?"both":"list",o.attr("aria-autocomplete",n)),e=e?e+" "+i.ul[0].id:i.ul[0].id,o.attr({"aria-controls":e}),i.filterInput&&i.filterInput.length>0&&i.filterInput.attr("aria-controls",e),i.ul.attr("aria-live",i._isFilterEnabled()?"polite":"off"),i._ariaLabel(i._focused)},_blur:function(){var e=this;e._change(),e.close(),e._userTriggered=!1},_isValueChanged:function(e){return e!==te(this._old,typeof e)},_change:function(){var e,n=this,i=n.selectedIndex,r=n.options.value,o=n.value();n._isSelect&&!n.listView.bound()&&r&&(o=r),n._isValueChanged(o)||n._valueBeforeCascade!==t&&n._valueBeforeCascade!==te(n._old,typeof n._valueBeforeCascade)&&n._userTriggered?e=!0:i===t||i===n._oldIndex||n.listView.isFiltered()||(e=!0),e&&(null===n._old||""===n._old||""===o?n._valueBeforeCascade=n._old=o:n.dataItem()?n._valueBeforeCascade=n._old=n.options.dataValueField?n.dataItem()[n.options.dataValueField]:n.dataItem():n._valueBeforeCascade=n._old=null,n._oldIndex=i,n._typing||n.element.trigger(f),n.trigger(f)),n.typing=!1},_data:function(){return this.dataSource.view()},_enable:function(){var e=this,n=e.options,i=e.element.is("[disabled]");n.enable!==t&&(n.enabled=n.enable),!n.enabled||i?e.enable(!1):e.readonly(e.element.is("[readonly]"))},_dataValue:function(e){var n=this._value(e);return n===t&&(n=this._text(e)),n},_offsetHeight:function(){var t=0;return this.listView.content.parent().prevAll(":visible").each((function(){var n=e(this);t+=r(n,!0)})),t},_height:function(t){var n,i=this,o=i.list,a=i.options.height,s=i.popup.visible(),l=this.options.columns&&this.options.columns.length;if(t||i.options.noDataTemplate){if(n=o.parent().add(o.closest(".k-animation-container").add(o.closest(".k-child-animation-container"))).show(),!o.parent().is(":visible"))return void n.hide();a=i.listView.content[0].scrollHeight>a?a:"auto",n.height(a),"auto"!==a&&(a-=i._offsetHeight(),l&&(a=a-(r(e(i.footer))||0)-(r(e(i.columnsHeader))||0))),l?i.listView.content.outerHeight(a):i.listView.content.parent().outerHeight(a),s||o.parent().hide()}return a},_openHandler:function(e){var t;this._adjustListWidth(),this.trigger(k)?e.preventDefault():(this._focused.attr($,!0),this.ul.attr(Q,!1),(t=this.listView.focus())&&this._focused.add(this.filterInput).attr(Y,t.attr("id")))},_adjustListWidth:function(){var e,t,n=this,i=n.list.parent(),r=i[0].style.width,o=n.wrapper;if(!(!i.data(N)&&r||n._hasActionSheet()))return e=window.getComputedStyle?window.getComputedStyle(o[0],null):0,t=parseFloat(e&&e.width)||u(o),e&&V.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),r="border-box"!==i.css("box-sizing")?t-(u(i)-i.width()):t,i.css({fontFamily:o.css("font-family"),width:n.options.autoWidth?"auto":r,minWidth:r,whiteSpace:n.options.autoWidth?"nowrap":"normal"}).data(N,r),!0},_closeHandler:function(e){e.closeButton&&this._onCloseButtonPressed(),this.trigger(x)?e.preventDefault():(this._focused.attr($,!1),this.ul.attr(Q,!0),this._focused.add(this.filterInput).removeAttr(Y))},_focusItem:function(){var e=this.listView,n=!e.focus(),i=re(e.select());i===t&&this.options.highlightFirst&&n&&(i=0),i!==t?e.focus(i):n&&e.scrollToIndex(0)},_calculateGroupPadding:function(e){var t=this.ul.children(".k-first").first(),i=this.listView.content.prev(w),r=0,o="right";i[0]&&"none"!==i[0].style.display&&("auto"!==e&&(r=n.support.scrollbar()),this.element.parents(".k-rtl").length&&(o="left"),r+=parseFloat(t.css("border-"+o+"-width"),10)+parseFloat(t.children(".k-list-item-group-label").css("padding-"+o),10),i.css("padding-"+o,r))},_calculatePopupHeight:function(e){var t=this._height(this.dataSource.flatView().length||e);this._calculateGroupPadding(t),this._calculateColumnsHeaderPadding(t)},_calculateColumnsHeaderPadding:function(e){if(this.options.columns&&this.options.columns.length){var t=l.isRtl(this.wrapper),i=n.support.scrollbar();this.columnsHeader.css(t?"padding-left":"padding-right","auto"!==e?i:0)}},_refreshScroll:function(){var e=this.listView,t=e.element.height()>e.content.height();this.options.autoWidth&&e.content.css({overflowX:"hidden",overflowY:t?"scroll":"auto"})},_hasActionSheet:function(){return"auto"===this.options.adaptiveMode&&(this.mediumMQL.mediaQueryList.matches||this.smallMQL.mediaQueryList.matches)},_resizePopup:function(e){this.options.virtual||this._hasActionSheet()||(this.popup.element.is(":visible")?this._calculatePopupHeight(e):(this.popup.one("open",function(e){return function(t){t.isDefaultPrevented()||this._calculatePopupHeight(e)}.bind(this)}.call(this,e)),this.popup.one(I,this._refreshScroll.bind(this))))},_popup:function(){var e=this;e.list.wrap("
      "),"auto"===e.options.adaptiveMode?(e.largeMQL.onEnter(e._createPopup.bind(e)),e.mediumMQL.onEnter(e._createActionSheet.bind(e)),e.smallMQL.onEnter((function(){e.popup||e._createActionSheet(),e.popup.fullscreen(!0)}))):e._createPopup()},_createPopup:function(){var t=this,n=this;n.popup&&(n._cachedFilterValue=n.filterInput?n.filterInput.val():null,n.popup.destroy(),n._removeFilterHeader(),n._removeStaticHeader()),n.popup=new i.Popup(n.list.parent().addClass("k-list-container"),B({},n.options.popup,{anchor:n.wrapper,open:n._openHandler.bind(n),close:n._closeHandler.bind(n),animation:n.options.animation,isRtl:l.isRtl(n.wrapper),autosize:n.options.autoWidth,activate:function(){t._refreshFloatingLabel()},deactivate:function(){t._refreshFloatingLabel()}})),n._addFilterHeader=n._isFilterEnabled()&&n.options.popupFilter?function(){n._filterHeader(),n.list.parent().prepend(e(n.filterTemplate)).find(".k-searchbox").append(n.filterInput),n.enable()}:e.noop,n._postCreatePopup()},_onActionSheetCreate:e.noop,_onCloseButtonPressed:e.noop,_createActionSheet:function(){var t=this,r=this;r.popup&&(r._cachedFilterValue=r.filterInput?r.filterInput.val():null,r.popup.destroy(),r._removeFilterHeader(),r._removeStaticHeader(),r.list.parent().css({width:"",height:"",minWidth:""})),r.popup=new i.ActionSheet(r.list.parent(),{headerTemplate:function(e){return'
      '+(r.options.label?'
      '+r.options.label+"
      ":"")+(r.options.placeholder?'
      '+(r.options.placeholder||"")+"
      ":"")+"
      "+(e.closeButton?'
      '+n.html.renderButton('",{icon:"x",fillMode:"flat",size:"large"})+"
      ":"")+"
      "+(t._isFilterEnabled()?'
      '+r.filterTemplate+"
      ":"")+"
      "},open:r._openHandler.bind(r),close:r._closeHandler.bind(r),focusOnActivate:!1,adaptive:!0,appendTo:r.options.popup&&r.options.popup.appendTo||document.body,closeButton:!0,fullscreen:r.smallMQL.mediaQueryList.matches,activate:function(){t._refreshFloatingLabel()},deactivate:function(){t._refreshFloatingLabel()},popup:B({},r.options.popup,{autosize:r.options.autoWidth})}),r._addFilterHeader=this._isFilterEnabled()?function(){r._filterHeader(),r.popup.element.find(".k-searchbox").append(r.filterInput),r.enable()}:e.noop,r._postCreatePopup(),r._onActionSheetCreate()},_removeFilterHeader:function(){this.filterInput&&(this.filterInput.off(this.ns).closest(".k-list-filter").remove(),this.filterInput=null)},_removeStaticHeader:function(){this.listView.header.remove()},_postCreatePopup:function(){var e,t=this;t._addFilterHeader(),t.filterInput&&t._cachedFilterValue&&t.filterInput.val(t._cachedFilterValue),t.popup.element.prepend(t.header).on("mousedown"+this.ns,this._listMousedown.bind(this)),t.listView&&(e=t.listView.value(),t.listView._clean&&t.listView._clean(),t.tagList&&t.options.virtual&&t.tagList.empty(),t.listView.destroy(),t._initList({skipValueUpdate:!0}),t.listView.value(e))},_toggleHover:function(t){e(t.currentTarget).toggleClass(g,t.type===D)},_toggle:function(e,n){var i=this,r=l.mobileOS&&(l.touch||l.MSPointers||l.pointers);e=e!==t?e:!i.popup.visible(),n||r||i._focused[0]===d()||(i._prevent=!0,i._focused.trigger(P),i._prevent=!1),i[e?k:x]()},_triggerCascade:function(){var e=this;e._cascadeTriggered&&e.value()===te(e._cascadedValue,typeof e.value())||(e._cascadedValue=e.value(),e._cascadeTriggered=!0,e.trigger(C,{userTriggered:e._userTriggered}))},_triggerChange:function(){this._valueBeforeCascade!==this.value()&&this.trigger(f)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(R,e._requestStartHandler).unbind(F,e._requestEndHandler).unbind("error",e._errorHandler)},requireValueMapper:function(e,t){if(((e.value instanceof Array?e.value.length:e.value)||(t instanceof Array?t.length:t))&&e.virtual&&"function"!=typeof e.virtual.valueMapper)throw new 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")}});function te(e,n){return e!==t&&""!==e&&null!==e&&("boolean"===n?("boolean"!=typeof e&&(e="true"===e.toString().toLowerCase()),e=Boolean(e)):"number"===n?e=Number(e):"string"===n&&(e=e.toString())),e}B(ee,{inArray:function(e,t){var n,i,r=t.children;if(!e||e.parentNode!==t)return-1;for(n=0,i=r.length;n"),n._customOption=r,i.append(r)),r.text(t),r[0].selected=!0},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(_),e._focused.attr(X,!1),e._busy=null,e._showClear()},_showBusy:function(e){var t=this;e.isDefaultPrevented()||(t._request=!0,t._busy||(t._busy=setTimeout((function(){t._arrowIcon&&(t._focused.attr(X,!0),t._arrowIcon.addClass(_),t._hideClear())}),100)))},_requestEnd:function(){this._request=!1,this._hideBusy()},_dataSource:function(){var e,t=this,i=t.element,r=t.options,o=r.dataSource||{};o=Array.isArray(o)?{data:o}:o,t._isSelect&&((e=i[0].selectedIndex)>-1&&(r.index=e),o.select=i,o.fields=[{field:r.dataTextField},{field:r.dataValueField}]),t.dataSource?t._unbindDataSource():(t._requestStartHandler=t._showBusy.bind(t),t._requestEndHandler=t._requestEnd.bind(t),t._errorHandler=t._hideBusy.bind(t)),t.dataSource=n.data.DataSource.create(o).bind(R,t._requestStartHandler).bind(F,t._requestEndHandler).bind("error",t._errorHandler)},_firstItem:function(){this.listView.focusFirst()},_lastItem:function(){this.listView.focusLast()},_nextItem:function(){return this.listView.focusNext()},_prevItem:function(){return this.listView.focusPrev()},_getNormalizedDataItem:function(e){var t,n=this,i=n.listView,r="number"==typeof e,o=n.optionLabel&&n.optionLabel.length;return t=r?o?--e:e:i.getElementIndex(e),i.dataItemByIndex(t)},_getNormalizedSelectCandidate:function(e){var t=e;return this.optionLabel&&this.optionLabel.length&&"number"==typeof e&&t++,t},_move:function(e){var t,n,i,r,o,a=this,l=a.listView,c=e.keyCode,u=c===s.DOWN,h=a.options.virtual;if(c===s.UP||u){if(e.altKey)a.toggle(u);else{if(!l.bound()&&!a.ul[0].firstChild)return a._fetch||(a.dataSource.one(f,(function(){a._fetch=!1,a._move(e)})),a._fetch=!0,a._filterSource()),e.preventDefault(),!0;i=a._focus(),a._fetch||i&&!i.hasClass(v)||(u?(r=a._nextItem(),(h&&r<=0||!a._focus()&&!r)&&a._lastItem()):(r=a._prevItem(),(h&&r>=l.dataSource.total()-1||!a._focus()&&!r)&&a._firstItem())),o=a._getNormalizedSelectCandidate(a._get(a._focus())||r||0),a._select(o,!0).done((function(){var e=function(){a.popup.visible()||a._blur(),null===a._cascadedValue?a._cascadedValue=a.value():a._cascadedValue=a.dataItem()?a.dataItem()[a.options.dataValueField]||a.dataItem():null};a.trigger(S,{dataItem:a._getNormalizedDataItem(o),item:a._focus()})?a._select(i).done(e):e()}))}e.preventDefault(),n=!0}else if(c===s.ENTER||c===s.TAB){a.popup.visible()&&e.preventDefault(),i=a._focus(),t=a.dataItem(),a.popup.visible()||t&&a.text()===a._text(t)||(i=null);var p,m=a.filterInput&&a.filterInput[0]===d();if(i){var g=!0;if((t=l.dataItemByIndex(l.getElementIndex(i)))&&(g=a._value(t)!==ee.unifyType(a.value(),typeof a._value(t))),g&&a.trigger(S,{dataItem:t,item:i}))return;p=a._select(i)}else a.input&&((a._syncValueAndText()||a._isSelect)&&a._accessor(a.input.val()),a.listView.value(a.input.val()));a._focusElement&&a._focusElement(a.wrapper),m&&c===s.TAB?a.wrapper.focusout():p&&"function"==typeof p.done?p.done((function(){a._blur()})):a._blur(),a.close(),n=!0}else if(c===s.ESC)a.popup.visible()&&e.preventDefault(),a.close(),n=!0;else if(a.popup.visible()&&(c===s.PAGEDOWN||c===s.PAGEUP)){e.preventDefault();var _=c===s.PAGEDOWN?1:-1;l.scrollWith(_*l.screenHeight()),n=!0}return n},_fetchData:function(){var e=this,t=!!e.dataSource.view().length;e._request||e.options.cascadeFrom||e.listView.bound()||e._fetch||t||(e._fetch=!0,e.dataSource.fetch().done((function(){e._fetch=!1})))},_options:function(e,n,i){var r,o,a,s,l=this,d=l.element,u=d[0],h=e.length,p="",f=0;for(n&&(p=n);f";d.html(p),i!==t&&(u.value=i,u.value&&!i&&(u.selectedIndex=-1)),-1!==u.selectedIndex&&(r=oe(u))&&r.setAttribute(H,H)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout((function(){t.value(t._initial)}))},t._form=r.on("reset",t._resetHandler))},_parentWidget:function(){var t=this.options.name;if(this.options.cascadeFrom){var n=e("#"+this.options.cascadeFrom),i=n.data("kendo"+t);if(!i)for(var r=0;r');r.append(o),this.header=o.find(".k-table-th"),this.content=this.element.wrap("
      ").parent(),this.element.addClass("k-table-list")}else this.content=this.element.wrap("
      ").parent(),this.header=this.content.before(e('
      ').hide()).prev(),this.element.addClass(b);this.bound(!1),this._optionID=n.guid(),this._selectedIndices=[],this._view=[],this._dataItems=[],this._values=[];var s=this.options.value;s&&(this._values=Array.isArray(s)?s.slice(0):[s]),this._getter(),this._templates(),this.setDataSource(this.options.dataSource),this._createOnScrollProxy()},options:{name:"StaticList",dataValueField:null,valuePrimitive:!1,selectable:!0,template:null,groupTemplate:null,fixedGroupTemplate:null,ariaLabel:null,ariaLabelledBy:null},events:[T,f,I,z,M,E,A],setDataSource:function(e){var t,i=this,r=e||{};r=Array.isArray(r)?{data:r}:r,r=n.data.DataSource.create(r),i.dataSource?(i.dataSource.unbind(f,i._refreshHandler),t=i.value(),i.value([]),i.bound(!1),i.value(t)):i._refreshHandler=i.refresh.bind(i),i.setDSFilter(r.filter()),i.dataSource=r.bind(f,i._refreshHandler),i._fixedHeader()},_touchHandlers:function(){var t,n,i=this,r=this.options.columns&&this.options.columns.length?".k-table-row":y,o=function(e){return(e.originalEvent||e).changedTouches[0].pageY};i.element.on("touchstart.StaticList",(function(e){t=o(e)})),i.element.on("touchend.StaticList",(function(a){a.isDefaultPrevented()||(n=o(a),Math.abs(n-t)<10&&(i._touchTriggered=!0,i._triggerClick(e(a.target).closest(r).get(0))))}))},skip:function(){return this.dataSource.skip()},setOptions:function(e){a.fn.setOptions.call(this,e),this._getter(),this._templates(),this._render(),this.label&&e.label?this.label.setOptions(e.label):this.label&&!1===e.label&&(this.label._unwrapFloating(),this._inputLabel.remove(),delete this._inputLabel)},destroy:function(){this.element.off(ne),this._refreshHandler&&this.dataSource.unbind(f,this._refreshHandler),clearTimeout(this._scrollId),a.fn.destroy.call(this)},dataItemByIndex:function(e){return this.dataSource.flatView()[e]},screenHeight:function(){return this.content[0].clientHeight},scrollToIndex:function(e){var t=this.element[0].children[e];t&&this.scroll(t)},scrollWith:function(e){this.content.scrollTop(this.content.scrollTop()+e)},scroll:function(e){if(e){e[0]&&(e=e[0]);var t=this.content[0],n=e.offsetTop,i=e.offsetHeight,r=t.scrollTop,o=t.clientHeight,a=n+i;r>n?r=n:a>r+o&&(r=a-o),t.scrollTop=r}},selectedDataItems:function(e){if(e===t)return this._dataItems.slice();this._dataItems=e,this._values=this._getValues(e)},_getValues:function(t){var n=this._valueGetter;return e.map(t,(function(e){return n(e)}))},focusNext:function(){var e=this.focus();e=e?e.next():0,this.focus(e)},focusPrev:function(){var e=this.focus();e=e?e.prev():this.element[0].children.length-1,this.focus(e)},focusFirst:function(){this.focus(this.element[0].children[0])},focusLast:function(){this.focus(re(this.element[0].children))},focus:function(n){var i,r=this,o=r._optionID;if(n===t)return r._current;n=re(r._get(n)),n=e(this.element[0].children[n]),r._current&&(r._current.removeClass(m).removeAttr(p),r.trigger(z)),(i=!!n[0])&&(n.addClass(m),r.scroll(n),n.attr("id",o)),r._current=i?n:null,r.trigger(I)},focusIndex:function(){return this.focus()?this.focus().index():t},skipUpdate:function(e){this._skipUpdate=e},select:function(n){var i,r,o=this,a=o.options.selectable,s="multiple"!==a&&!1!==a,l=o._selectedIndices,c=[this.element.find(".k-selected").index()],d=[];if(n===t)return l.slice();1===(n=o._get(n)).length&&-1===n[0]&&(n=[]);var u=e.Deferred().resolve(),h=o.isFiltered();return h&&!s&&o._deselectFiltered(n)?u:s&&!h&&-1!==e.inArray(re(n),l)&&-1!==e.inArray(re(n),c)?(o._dataItems.length&&o._view.length&&(o._dataItems=[o._view[l[0]].item]),u):(i=(r=o._deselect(n)).removed,(n=r.indices).length&&(s&&(n=[re(n)]),d=o._select(n)),(d.length||i.length)&&(o._valueComparer=null,o.trigger(f,{added:d,removed:i})),u)},removeAt:function(e){return this._selectedIndices.splice(e,1),this._values.splice(e,1),this._valueComparer=null,{position:e,dataItem:this._dataItems.splice(e,1)[0]}},setValue:function(e){e=Array.isArray(e)||e instanceof h?e.slice(0):[e],this._values=e,this._valueComparer=null},value:function(n){var i,r=this,o=r._valueDeferred;return n===t?r._values.slice():(r.setValue(n),o&&"resolved"!==o.state()||(r._valueDeferred=o=e.Deferred()),r.bound()&&(i=r._valueIndices(r._values),"multiple"===r.options.selectable&&r.select(-1),r.select(i),o.resolve()),r._skipUpdate=!1,o)},items:function(){return this.element.children(y)},_click:function(e){this._touchTriggered?this._touchTriggered=!1:e.isDefaultPrevented()||this._triggerClick(e.currentTarget)},_createOnScrollProxy:function(){this._onScroll=function(){var e=this;clearTimeout(e._scrollId),e._scrollId=setTimeout((function(){e._renderHeader()}),50)}.bind(this)},_triggerClick:function(t){this.trigger(T,{item:e(t)})||this.select(t)},_valueExpr:function(e,t){var n,i=this,r=0,o=[];if(!i._valueComparer||i._valueType!==e){for(i._valueType=e;r-1&&(a.push(this.removeAt(r)),e(o[i]).removeClass(v));return!!a.length&&(this.trigger(f,{added:[],removed:a}),!0)},_select:function(t){var n,i,r=this,o=r.element[0].children,a=r._view,s=[],l=0;for(-1!==re(t)&&r.focus(t);ln||!o.nextSibling)break;o=o.nextSibling}else{if(o.offsetTop<=n||!o.previousSibling)break;o=o.previousSibling}return this._view[e(o).data("offset-index")]},_fixedHeader:function(){this.isGrouped()&&this.templates.fixedGroupTemplate?(this.header.closest(J).length?this.header.closest(J).show():this.header.show(),this.content.scroll(this._onScroll)):(this.header.closest(J).length?this.header.closest(J).hide():this.header.hide(),this.content.off("scroll",this._onScroll))},_renderHeader:function(){var e=this.templates.fixedGroupTemplate;if(e){var t=this._firstVisibleItem();t&&t.group.toString().length&&this.header.html(e(t.group))}},_renderItem:function(e){var t='
    • ',a?t+=this._renderColumns(n):(t+='',t+=this.templates.template(n),t+=""),i&&e.newGroup?t+=a?''+this.templates.groupTemplate(e.group)+"":'
      '+this.templates.groupTemplate(e.group)+"
      ":o&&a&&(t+=''),t+"
    • "},_renderColumns:function(e){for(var t="",i=0;i",t+=this.templates["column"+i](e),t+=""}return t},_render:function(){var t,i,r,o,a,s="",l=0,c=0,d=[],u=this.dataSource.view(),h=this.value(),p=this.isGrouped();if(p)for(l=0;l-1?e.options[t]:{}}function ae(t){return!(!t||e.isEmptyObject(t))&&!(t.filters&&!t.filters.length)}function se(t,n){var i,r=!1;return t.filters&&(i=e.grep(t.filters,(function(e){return r=se(e,n),e.filters?e.filters.length:e.field!=n})),r||t.filters.length===i.length||(r=!0),t.filters=i),r}i.plugin(ie),n.cssProperties.registerPrefix("List","k-list-")}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.support,r=n.ui,o=r.Widget,a=n.keys,s=n.parseDate,l=n.htmlEncode,c=n.date.adjustDST,d=n.date.weekInYear,u=n.ui.Selectable,h=n._extractFormat,p=n.template,f=n.getCulture,m=n.support.transitions,g=m?m.css+"transform-origin":"",v=p((function(e){return''+e.value+""})),_=p((function(){return''})),b=p((function(){return' '})),w=p((function(e){return''+e.weekNumber+""})),y=n._outerWidth,k=".kendoCalendar",x="click"+k,C="id",S="slideIn",T="month",D="century",I="change",z="navigate",M="value",E="k-disabled",A="k-focus",H="k-other-month",R="td:has(.k-link)",F="td:has(.k-link):not(.k-disabled):not(.k-out-of-range)",P="k-selected",B="focus",L=i.touch?"touchstart":"mouseenter",V=i.touch?"touchstart"+k:"mouseenter"+k,O=i.touch?"touchend"+k+" touchmove"+k:"mouseleave"+k,N=864e5,W="_prevArrow",U="_nextArrow",j="aria-disabled",q="aria-selected",G="aria-label",K=e.extend,Y=Date,$={month:0,year:1,decade:2,century:3},Q=".k-header, .k-calendar-header",X=o.extend({init:function(t,i){var r,a=this;(i=i||{}).componentType=i.componentType||"classic",o.fn.init.call(a,t,i),t=a.wrapper=a.element,(i=a.options).url=n.unescape(i.url),a.options.disableDates=me(a.options.disableDates),a._templates(),a._selectable(),a._header(),a._viewWrapper(),a.options.hasFooter?a._footer(a.footer):(a._today=a.element.find(".k-calendar-nav-today"),a._toggle()),t.addClass("k-widget k-calendar "+(i.weekNumber?" k-week-number":"")).on(V+" "+O,R,ce).on("keydown.kendoCalendar","table.k-content",a._move.bind(a)).on(x+" touchend",R,(function(t){var n=t.currentTarget.firstChild,r=ve(n);-1!=n.href.indexOf("#")&&t.preventDefault(),"month"==a._view.name&&a.options.disableDates(r)||"month"==a._view.name&&"single"!=i.selectable||a._click(e(n))})).on("mouseup"+k,"table.k-content, .k-footer",(function(){a._focusView(!1!==a.options.focusOnNav)})).attr(C),a._isMultipleSelection()&&a.options.weekNumber&&t.on(x,"td:not(:has(.k-link))",(function(t){var n=e(t.currentTarget).closest("tr").find(F).first(),i=a.selectable._lastActive=e(t.currentTarget).closest("tr").find(F).last();a.selectable.selectRange(n,i),a.selectable.trigger(I,{event:t}),a._current=a._value=ve(i.find("a")),a._setCurrent(a._current)})),pe(i),r=s(i.value,i.format,i.culture),a._selectDates=[],a._index=$[i.start],a._current=new Y(+ie(r,i.min,i.max)),a._addClassProxy=function(){if(a._active=!0,a._cell.hasClass(E)){var e=a._view.toDateString(ne());a._cell=a._cellByDate(e)}a._cell.addClass(A)},a._removeClassProxy=function(){a._active=!1,a._cell&&a._cell.removeClass(A)},a.value(r),a._isMultipleSelection()&&i.selectDates.length>0&&a.selectDates(i.selectDates),n.notify(a)},options:{name:"Calendar",value:null,min:new Y(1900,0,1),max:new Y(2099,11,31),dates:[],disableDates:null,url:"",culture:"",footer:"",format:"",month:{},weekNumber:!1,selectable:"single",selectDates:[],start:T,depth:T,size:"medium",animation:{horizontal:{effects:S,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}},messages:{weekColumnHeader:"",today:"Today",navigateTo:"Navigate to ",parentViews:{month:"year view",year:"decade view",decade:"century view"}},componentType:"classic"},events:[I,z],componentTypes:{classic:{header:{template:function(e){var t=e.actionAttr,i=e.size,r=e.isRtl;return'"}},hasFooter:!0,linksSelector:".k-button",contentClasses:"k-calendar-table k-content"},modern:{header:{template:function(e){var t=e.actionAttr,i=e.size,r=e.messages,o=e.isRtl;return'
      \n \n \n \n \n \n \n \n
      "}},hasFooter:!1,linksSelector:".k-button",contentClasses:"k-calendar-table k-content k-calendar-content"}},setOptions:function(t){var n=this;pe(t),t.disableDates=me(t.disableDates),n._destroySelectable(),t.messages&&(t.messages=e.extend({},!0,n.options.messages,t.messages)),o.fn.setOptions.call(n,t),n._templates(),n._selectable(),n._viewWrapper(),n.options.hasFooter?n._footer(n.footer):(n.element.find(".k-footer").hide(),n._toggle()),n._index=$[n.options.start],n.navigate(),t.weekNumber&&n.element.addClass("k-week-number")},destroy:function(){var e=this,t=e._today;e.element.off(k),e._title.off(k),e._prevArrow.off(k),e._nextArrow.off(k),e._destroySelectable(),n.destroy(e._table),t&&n.destroy(t.off(k)),o.fn.destroy.call(e)},current:function(){return this._current},view:function(){return this._view},focus:function(e){e=e||this._table,this._bindTable(e),e.trigger("focus")},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(W,-1)},navigateToFuture:function(){this._navigate(U,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass(E)||e.navigate(e._current,++t)},navigateDown:function(e){var t=this,n=t._index,i=t.options.depth;e&&(n!==$[i]?t.navigate(e,--n):ge(t._value,t._current)&&ge(t._value,e)||(t.value(e),t.trigger(I)))},navigate:function(n,i){i=isNaN(i)?$[i]:i;var r,o,a,s,c=this,d=c.options,u=d.culture,h=d.min,p=d.max,f=c._title,m=c._table,g=c._oldTable,v=c._current,_=n&&+n>+v,b=i!==t&&i!==c._index,w=c.element.children(".k-calendar-view");if(n||(n=v),c._current=n=new Y(+ie(n,h,p)),i===t?i=c._index:c._index=i,c._view=o=Z.views[i],a=o.compare,s=i===$.century,f.toggleClass(E,s).attr(j,s),s=a(n,h)<1,c._prevArrow.toggleClass(E,s).attr(j,s),s=a(n,p)>-1,c._nextArrow.toggleClass(E,s).attr(j,s),m&&g&&g.data("animating")&&(g.kendoStop(!0,!0),m.kendoStop(!0,!0)),c._oldTable=m,!m||c._changeView){f.html(''+o.title(n,h,p,u)+""),c.options.messages.parentViews&&c._view.name!==D?f.attr("title",l(c.options.messages.navigateTo+c.options.messages.parentViews[c._view.name])):f.removeAttr("title"),c._table=r=e(o.content(K({min:h,max:p,date:n,url:d.url,dates:d.dates,format:d.format,otherMonth:!0,culture:u,disableDates:d.disableDates,isWeekColumnVisible:d.weekNumber,messages:d.messages,contentClasses:c.options.contentClasses},c[o.name]))),c._aria(),fe(r,o.name);var y=m&&m.data("start")===r.data("start");c._animate({from:m,to:r,vertical:b,future:_,replace:y}),w.removeClass("k-calendar-monthview k-calendar-yearview k-calendar-decadeview k-calendar-centuryview"),w.addClass("k-calendar-"+o.name+"view"),c.trigger(z),c._focus(n)}i===$[d.depth]&&c._selectDates.length>0&&c._visualizeSelectedDatesInView(),"single"===c.options.selectable&&i===$[d.depth]&&c._value&&!c.options.disableDates(c._value)&&c._selectCell(c._value),c._setCurrent(n),!m&&c._cell&&c._cell.removeClass(A),c._changeView=!0},selectDates:function(n){var i,r,o=this;if(n===t)return o._selectDates;r=n.map((function(e){return e.getTime()})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return new Date(e)})),i=e.grep(r,(function(e){if(e)return+o._validateValue(new Date(e.setHours(0,0,0,0)))==+e})),o._selectDates=i.length>0?i:0===r.length?r:o._selectDates,o._visualizeSelectedDatesInView()},value:function(e){var n=this,i=n._view,r=n._view;if(e===t)return n._value;if((e=n._validateValue(e))&&n._isMultipleSelection()){var o=new Date(+e);o.setHours(0,0,0,0),n._selectDates=[o],n.selectable._lastActive=null}i&&null===e&&n._cell?n._cell.removeClass(P):(n._changeView=!e||r&&0!==r.compare(e,n._current),n.navigate(e))},isRtl:function(){return n.support.isRtl(this.wrapper)},_aria:function(){var e=this._table;e.attr("aria-labelledby",this._title.attr("id")),"month"===this._view.name&&"multiple"===this.options.selectable&&e.attr("aria-multiselectable","true")},_validateValue:function(e){var n=this,i=n.options,r=i.min,o=i.max;return null===e&&(n._current=ue(n._current.getFullYear(),n._current.getMonth(),n._current.getDate())),null!==(e=s(e,i.format,i.culture))&&(re(e=new Y(+e),r,o)||(e=null)),null!==e&&n.options.disableDates(new Date(+e))?n._value===t&&(n._value=null):n._value=e,n._value},_visualizeSelectedDatesInView:function(){var t=this,i={};e.each(t._selectDates,(function(e,t){i[n.calendar.views[0].toDateString(t)]=t})),t.selectable.clear();var r=t._table.find(R).filter((function(t,r){return i[e(r.firstChild).attr(n.attr(M))]}));r.length>0&&t.selectable._selectElement(r,!0)},_isMultipleSelection:function(){return"multiple"===this.options.selectable},_selectable:function(){var e=this;if(e._isMultipleSelection()){var t=e.options.selectable,n=u.parseOptions(t);e.selectable=new u(e.wrapper,{aria:!0,inputSelectors:"input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-caret-alt-down,span.k-icon.k-i-caret-alt-up,span.k-svg-icon.k-svg-i-caret-alt-down,span.k-svg-icon.k-svg-i-caret-alt-up",multiple:n.multiple,filter:"table.k-month:eq(0) "+F,change:e._onSelect.bind(e),relatedTarget:e._onRelatedTarget.bind(e)})}},_onRelatedTarget:function(e){var t=this;t.selectable.options.multiple&&e.is(F)&&(t._current=ve(e.find("a")),t._setCurrent(t._current))},_onSelect:function(t){var n=this,i=t;u.parseOptions(n.options.selectable).multiple?(i.event.ctrlKey||i.event.metaKey?e(i.event.currentTarget).is(F)?n._toggleSelection(e(i.event.currentTarget)):(n._cellsBySelector(F).each((function(t,i){var r=ve(e(i).find("a"));n._deselect(r)})),n._addSelectedCellsToArray()):i.event.shiftKey?n._rangeSelection(n._cell):e(i.event.currentTarget).is(R)?n.value(ve(e(i.event.currentTarget).find("a"))):(n._selectDates=[],n._addSelectedCellsToArray()),n.trigger(I)):e(i.event.currentTarget).is("td")&&!e(i.event.currentTarget).hasClass("k-selected")?e(i.event.currentTarget).addClass("k-selected"):n._click(e(i.event.currentTarget).find("a"))},_destroySelectable:function(){var e=this;e.selectable&&(e.selectable.destroy(),e.selectable=null)},_toggleSelection:function(e){var t=ve(e.find("a"));e.hasClass("k-selected")?this._selectDates.push(t):this._deselect(t)},_rangeSelection:function(e,t){var n,i=this,r=t||ve(i.selectable.value().first().find("a")),o=ve(e.find("a"));i.selectable._lastActive||i._value?r=i.selectable._lastActive?ve(i.selectable._lastActive.find("a")):new Date(+i._value):i.selectable._lastActive=t?i._cellByDate(i._view.toDateString(t),F):i.selectable.value().first(),i._selectDates=[],n=se(r,o),le(i._selectDates,n,r,i.options.disableDates),i._visualizeSelectedDatesInView()},_cellsBySelector:function(e){return this._table.find(e)},_addSelectedCellsToArray:function(){var t=this;t.selectable.value().each((function(n,i){var r=ve(e(i.firstChild));t.options.disableDates(r)||t._selectDates.push(r)}))},_deselect:function(e){var t=this._selectDates.map(Number).indexOf(+e);-1!=t&&this._selectDates.splice(t,1)},_dateInView:function(e){var t=ve(this._cellsBySelector(F).first().find("a"));return+e<=+ve(this._cellsBySelector(F).last().find("a"))&&+e>=+t},_isNavigatable:function(e,t){var n,i=this,r=i.options.disableDates;return"month"==i._view.name?!r(e):(n=i.wrapper.find(".k-focus").index(),i.wrapper.find(".k-content td").eq(n+t).is(F)||!r(e))},_move:function(n){var i,r,o,s,l=this,c=l.options,d=n.keyCode,u=l._view,h=l._index,p=l.options.min,f=l.options.max,m=new Y(+l._current),g=l.isRtl(),v=l.options.disableDates;if(n.target===l._table[0]&&(l._active=!0),d==a.RIGHT&&!g||d==a.LEFT&&g?(i=1,r=!0):d==a.LEFT&&!g||d==a.RIGHT&&g?(i=-1,r=!0):d==a.UP?(i=0===h?-7:-4,r=!0):d==a.DOWN?(i=0===h?7:4,r=!0):d==a.SPACEBAR?(i=0,r=!0):d==a.HOME||d==a.END?(s=u[o=d==a.HOME?"first":"last"](m),(m=new Y(s.getFullYear(),s.getMonth(),s.getDate(),m.getHours(),m.getMinutes(),m.getSeconds(),m.getMilliseconds())).setFullYear(s.getFullYear()),r=!0):84===d&&(l._todayClick(n),r=!0),n.ctrlKey||n.metaKey){if(d==a.RIGHT&&!g||d==a.LEFT&&g)l.navigateToFuture(),r=!0;else if(d==a.LEFT&&!g||d==a.RIGHT&&g)l.navigateToPast(),r=!0;else if(d==a.UP)l.navigateUp(),r=!0;else if(d==a.DOWN)l._click(e(l._cell[0].firstChild)),r=!0;else if((d==a.ENTER||d==a.SPACEBAR)&&l._isMultipleSelection()){l._keyboardToggleSelection(n);var _=ve(e(l._cell[0]).find("a"));l._setCurrent(_)}}else n.shiftKey?(i!==t||o)&&(o||u.setDate(m,i),re(m,p,f)||(m=ie(m,c.min,c.max)),v(m)&&(m=l._nextNavigatable(m,i)),p=ue(p.getFullYear(),p.getMonth(),p.getDate()),l._isMultipleSelection()?l._keyboardRangeSelection(n,m):l._focus(m)):(d==a.ENTER||d==a.SPACEBAR?("month"==u.name&&l._isMultipleSelection()?(l.value(ve(e(l._cell.find("a")))),l.selectable._lastActive=e(l._cell[0]),l.trigger(I)):l._click(e(l._cell[0].firstChild)),r=!0):d==a.PAGEUP?(r=!0,l.navigateToPast()):d==a.PAGEDOWN&&(r=!0,l.navigateToFuture()),(i||o)&&(o||u.setDate(m,i),re(m,p=ue(p.getFullYear(),p.getMonth(),p.getDate()),f)||(m=ie(m,c.min,c.max)),l._isNavigatable(m,i)||(m=l._nextNavigatable(m,i)),l._isMultipleSelection()?l._dateInView(m)?(l._current=m,l._setCurrent(m)):l.navigate(m):l._focus(m)));return r&&n.preventDefault(),l._current},_keyboardRangeSelection:function(e,t){var n,i,r=this;if(!r._dateInView(t))return r._selectDates=[],i=se(n=r.selectable._lastActive?ve(r.selectable._lastActive.find("a")):t,new Date(+t)),le(r._selectDates,i,n,r.options.disableDates),r.navigate(t),r._current=t,r.selectable._lastActive=r.selectable._lastActive||r._cellByDate(r._view.toDateString(t),F),void r.trigger(I);r.selectable.options.filter=r.wrapper.find("table").length>1&&+t>+r._current?"table.k-month:eq(1) "+F:"table.k-month:eq(0) "+F,r._setCurrent(t),r._current=t,r._rangeSelection(r._cellByDate(r._view.toDateString(t),F),t),r.trigger(I),r.selectable.options.filter="table.k-month:eq(0) "+F},_keyboardToggleSelection:function(t){var n=this;t.currentTarget=n._cell[0],n.selectable._lastActive=e(n._cell[0]),e(n._cell[0]).hasClass(P)?n.selectable._unselect(e(n._cell[0])):n.selectable.value(e(n._cell[0])),n.selectable.trigger(I,{event:t})},_nextNavigatable:function(e,t){var n=this,i=!0,r=n._view,o=n.options.min,a=n.options.max,s=n.options.disableDates,l=new Date(e.getTime());for(r.setDate(l,-t);i;){if(r.setDate(e,t),!re(e,o,a)){e=l;break}i=s(e)}return e},_animate:function(e){var t=this,n=e.from,i=e.to,r=t._active,o=t.element.children(".k-calendar-view");n?n.parent().data("animating")?(n.off(k),n.parent().kendoStop(!0,!0).remove(),n.remove(),o.append(i),t._focusView(r)):!n.is(":visible")||!1===t.options.animation||e.replace?(i.insertAfter(n),n.off(k).remove(),t._focusView(r)):t[e.vertical?"_vertical":"_horizontal"](n,i,e.future):(o.append(i),t._bindTable(i))},_horizontal:function(e,t,n){var i=this,r=i._active,o=i.options.animation.horizontal,a=o.effects,s=y(e),l=y(e,!0)-s;a&&-1!=a.indexOf(S)&&(e.add(t).css({width:s}),e.wrap("
      "),i._focusView(r,e),e.parent().css({position:"relative",width:2*s+2*l,display:"flex","margin-left":n?0:-s-l}),t[n?"insertAfter":"insertBefore"](e),K(o,{effects:S+":"+(n?"right":"left"),complete:function(){e.off(k).remove(),i._oldTable=null,t.unwrap(),i._focusView(r)}}),e.parent().kendoStop(!0,!0).kendoAnimate(o))},_vertical:function(e,t){var n,i,r=this,o=r.options.animation.vertical,a=o.effects,s=r._active;a&&-1!=a.indexOf("zoom")&&(t.insertBefore(e),e.css({position:"absolute",width:t.width()}),g&&(i=(i=(n=r._cellByDate(r._view.toDateString(r._current))).position()).left+parseInt(n.width()/2,10)+"px "+(i.top+parseInt(n.height()/2,10))+"px",t.css(g,i)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.off(k).remove(),r._oldTable=null,r._focusView(s)}}),t.kendoStop(!0,!0).kendoAnimate(o))},_cellByDate:function(t,i){return this._table.find(i||"td:not(.k-other-month)").filter((function(){return e(this.firstChild).attr(n.attr(M))===t}))},_selectCell:function(e){var t=this,n=t._selectedCell,i=t._view.toDateString(e);n&&n[0]&&(n[0].removeAttribute(q),n.removeClass(P)),n=t._cellByDate(i,"multiple"==t.options.selectable?R:"td:not(.k-other-month)"),t._selectedCell=n,n.addClass(P).attr(q,!0)},_setCurrent:function(e){var t=this,i=n.guid(),r=t._cell,o=t._view.toDateString(e);r&&r[0]&&(r.removeClass(A),r[0].removeAttribute(G),r[0].removeAttribute(C)),r=t._cellByDate(o,"multiple"==t.options.selectable?R:"td:not(.k-other-month)"),t._cell=r,r.attr(C,i).addClass(A),t._table[0]&&(t._table[0].removeAttribute("aria-activedescendant"),t._table.attr("aria-activedescendant",i))},_bindTable:function(e){e.on("focus.kendoCalendar",this._addClassProxy).on("blur.kendoCalendar",this._removeClassProxy)},_click:function(e){var t=this,n=t.options,i=new Date(+t._current),r=ve(e);c(r,0),"month"==t._view.name&&t.options.disableDates(r)&&(r=t._value),t._view.setDate(i,r),t.navigateDown(ie(i,n.min,n.max))},_focus:function(e){var t=this;0!==t._view.compare(e,t._current)?t.navigate(e):(t._current=e,t._setCurrent(e))},_focusView:function(e,t){e&&this.focus(t)},_viewWrapper:function(){var t=this.element,n=t.children(".k-calendar-view");n[0]||(n=e("
      ").insertAfter(t.find(Q)))},_footer:function(t){var i=this,r=ne(),o=i.element,a=o.find(".k-footer");if(!t)return i._toggle(!1),void a.hide();a[0]||(a=e('').appendTo(o)),i._today=a.show().find(".k-button-flat-primary").attr("title",n.toString(r,"D",i.options.culture)),a.find(".k-button-text").html(t(r)),i._toggle()},_header:function(){var t=this,i=t.element,r=t.options.linksSelector;i.find(Q)[0]||i.html(n.template(t.options.header.template)(e.extend(!0,{},t.options,{actionAttr:n.attr("action"),size:n.getValidCssClass("k-button-","size",t.options.size),isRtl:t.isRtl()}))),i.find(r).on(x+" touchend"+k,(function(){return!1})),t._title=i.find("["+n.attr("action")+'="nav-up"]').on(x+" touchend"+k,(function(){t._active=!1!==t.options.focusOnNav,t.navigateUp()})),t._prevArrow=i.find("["+n.attr("action")+'="prev"]').on(x+" touchend"+k,(function(){t._active=!1!==t.options.focusOnNav,t.navigateToPast()})),t._nextArrow=i.find("["+n.attr("action")+'="next"]').on(x+" touchend"+k,(function(){t._active=!1!==t.options.focusOnNav,t.navigateToFuture()})),i.find("["+n.attr("action")+'="today"]').on(x+" touchend"+k,t._todayClick.bind(t))},_navigate:function(e,t){var n=this,i=n._index+1,r=new Y(+n._current);n._isMultipleSelection()&&(r=ve(n._table.find("td:not(.k-other-month):not(.k-out-of-range)").has(".k-link").first().find("a")),n._current=new Date(+r));(e=n[e]).hasClass(E)||(i>3?r.setFullYear(r.getFullYear()+100*t):Z.views[i].setDate(r,t),n.navigate(r))},_option:function(e,n){var i,r=this,o=r.options,a=r._value||r._current;if(n===t)return o[e];(n=s(n,o.format,o.culture))&&(o[e]=new Y(+n),((i="min"===e?n>a:a>n)||function(e,t){if(e)return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth();return!1}(a,n))&&(i&&(r._value=null),r._changeView=!0),r._changeView||(r._changeView=!(!o.month.content&&!o.month.empty)),r.navigate(r._value),r._toggle())},_toggle:function(e){var n=this,i=n.options,r=n.options.disableDates(ne()),o=n._today,a=n._todayClass();e===t&&(e=re(ne(),i.min,i.max)),o&&(o.off(x),e&&!r?o.addClass(a).removeClass(E).on(x,n._todayClick.bind(n)):o.removeClass(a).addClass(E).on(x,de))},_todayClass:function(){return"k-calendar-nav-today"},_todayClick:function(e){var t=this,n=$[t.options.depth],i=t.options.disableDates,r=ne();e.preventDefault(),i(r)||(0===t._view.compare(t._current,r)&&t._index==n&&(t._changeView=!1),t._isMultipleSelection()&&(t._selectDates=[r],t.selectable._lastActive=null),t._value=r,t.navigate(r,n),t.trigger(I))},_templates:function(){var e=this,t=e.options,i=t.footer,r=t.month,o=r.content,a=r.weekNumber,s=r.empty,l=function(e){return""+n.toString(e,"D",t.culture)};e.month={content:function(e){return''+(_e(o,e)||e.value)+""},empty:function(e){return''+(_e(s,e)||" ")+""},weekNumber:function(e){return''+(_e(a,e)||e.weekNumber)+""}},e.year={content:p((function(e){return''+e.value+""}))},i&&!0!==i&&(l=i),e.footer=!1!==i?p(l,{useWithBlock:!1}):null},_updateAria:function(e,t){var i,r=this,o=r._cell,a=r.view().valueType(),s=t||r.current();return i="month"===a?n.toString(s,"MMMM"):"date"===a?n.toString(s,"D"):o.text(),o.attr("aria-label",e({current:s,valueType:a,text:i})),o.attr("id")}});r.plugin(X);var Z={firstDayOfMonth:function(e){return ue(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){var i=(t=t||n.culture().calendar).firstDay,r=new Y(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());for(r.setFullYear(e.getFullYear());r.getDay()!=i;)Z.setTime(r,-864e5);return r},setTime:function(e,t){var n=e.getTimezoneOffset(),i=new Y(e.getTime()+t),r=i.getTimezoneOffset()-n;e.setTime(i.getTime()+6e4*r)},views:[{name:T,title:function(e,t,n,i){return he(i).months.names[e.getMonth()]+" "+e.getFullYear()},content:function(e){var t=this,i=0,r=e.min,o=e.max,a=e.date,s=e.dates,u=e.format,h=e.culture,p=e.url,f=e.showHeader,m=e.otherMonth,g=e.isWeekColumnVisible,v=p&&s[0],_=he(h),b=_.firstDay,w=_.days,y=oe(w.names,b),k=oe(w.namesShort,b),x=Z.firstVisibleDay(a,_),C=t.first(a),S=t.last(a),T=t.toDateString,D=ne(),I='';for(f&&(I+='"),I+='',g&&(I+='");i<7;i++)I+='";return c(D,0),D=+D,ee({cells:42,perRow:7,html:I+='',start:ue(x.getFullYear(),x.getMonth(),x.getDate()),isWeekColumnVisible:g,weekNumber:e.weekNumber,min:ue(r.getFullYear(),r.getMonth(),r.getDate()),max:ue(o.getFullYear(),o.getMonth(),o.getDate()),otherMonth:m,content:e.content,lastDayOfMonth:S,empty:e.empty,setter:t.setDate,disableDates:e.disableDates,build:function(e,t,i){var r=["k-calendar-td"],o=e.getDay(),a="",l="#";return(eS)&&r.push(H),i(e)&&r.push(E),+e===D&&r.push("k-today"),0!==o&&6!==o||r.push("k-weekend"),v&&function(e,t){for(var n=0,i=t.length;no?1:ir?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof Y?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):Z.setTime(e,t*N),c(e,n)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/"+e.getDate()},valueType:function(){return"date"}},{name:"year",title:function(e){return e.getFullYear()},content:function(e){var t=he(e.culture).months,i=t.namesAbbr,r=t.names,o=this.toDateString,a=e.min,s=e.max,l="";return e.showHeader&&(l+='
      '+this.title(a,r,o,h)+"
      '+l(e.messages.weekColumnHeader)+"'+k[i]+"
      ',l+='",l+='',l+=''),ee({min:ue(a.getFullYear(),a.getMonth(),1),max:ue(s.getFullYear(),s.getMonth(),1),start:ue(e.date.getFullYear(),0,1),html:l,setter:this.setDate,content:e.content,build:function(e){return{value:i[e.getMonth()],label:r[e.getMonth()],ns:n.ns,dateString:o(e),cssClass:["k-calendar-td"].join(" ")}}})},first:function(e){return ue(e.getFullYear(),0,e.getDate())},last:function(e){return ue(e.getFullYear(),11,e.getDate())},compare:function(e,t){return te(e,t)},setDate:function(e,t){var n,i=e.getHours();t instanceof Y?(n=t.getMonth(),e.setFullYear(t.getFullYear(),n,e.getDate()),n!==e.getMonth()&&e.setDate(0)):(n=e.getMonth()+t,e.setMonth(n),n>11&&(n-=12),n>0&&e.getMonth()!=n&&e.setDate(0)),c(e,i)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/1"},valueType:function(){return"month"}},{name:"decade",title:function(e,t,n){return J(e,t,n,10)},content:function(e){var t=e.date.getFullYear(),i=this.toDateString,r="";return e.showHeader&&(r+='
      ',l+=this.title(e.date),l+="
      ',r+='",r+='',r+=''),ee({start:ue(t-t%10-1,0,1),min:ue(e.min.getFullYear(),0,1),max:ue(e.max.getFullYear(),0,1),otherMonth:e.otherMonth,html:r,setter:this.setDate,build:function(e,t){var r=["k-calendar-td"];return 0!==t&&11!==t||r.push(H),{value:e.getFullYear(),ns:n.ns,dateString:i(e),cssClass:r.join(" ")}}})},first:function(e){var t=e.getFullYear();return ue(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return ue(t-t%10+9,e.getMonth(),e.getDate())},compare:function(e,t){return te(e,t,10)},setDate:function(e,t){ae(e,t,1)},toDateString:function(e){return e.getFullYear()+"/0/1"},valueType:function(){return"year"}},{name:D,title:function(e,t,n){return J(e,t,n,100)},content:function(e){var t=e.date.getFullYear(),i=e.min.getFullYear(),r=e.max.getFullYear(),o=this.toDateString,a=i,s=r,l="";return(s-=s%10)-(a-=a%10)<10&&(s=a+9),e.showHeader&&(l+='
      ',r+=this.title(e.date,e.min,e.max),r+="
      ',l+='",l+='',l+=''),ee({start:ue(t-t%100-10,0,1),min:ue(a,0,1),max:ue(s,0,1),otherMonth:e.otherMonth,html:l,setter:this.setDate,build:function(e,t){var a=["k-calendar-td"],s=e.getFullYear(),l=s+9;return 0!==t&&11!==t||a.push(H),sr&&(l=r),{ns:n.ns,value:s+" - "+l,dateString:o(e),cssClass:a.join(" ")}}})},first:function(e){var t=e.getFullYear();return ue(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return ue(t-t%100+99,e.getMonth(),e.getDate())},compare:function(e,t){return te(e,t,100)},setDate:function(e,t){ae(e,t,10)},toDateString:function(e){var t=e.getFullYear();return t-t%10+"/0/1"},valueType:function(){return"decade"}}]};function J(e,t,n,i){var r,o=e.getFullYear(),a=t.getFullYear(),s=n.getFullYear();return r=(o-=o%i)+(i-1),os&&(r=s),o+"-"+r}function ee(e){var t,n=0,i=e.min,r=e.max,o=e.start,a=e.setter,s=e.build,l=e.weekNumberBuild,d=e.cells||12,u=e.isWeekColumnVisible,h=e.perRow||4,p=e.otherMonth,f=e.lastDayOfMonth,m=e.weekNumber||w,g=e.content||v,y=e.empty||_,k=e.otherMonthCellTemplate||b,x=e.html||'
      ',l+=this.title(e.date,e.min,e.max),l+="
      ';for(u&&(x+=m(l(o)));n0&&n%h==0&&(x+='',u&&(x+=m(p||+o<=+f?l(o):{weekNumber:" "}))),o=ue(o.getFullYear(),o.getMonth(),o.getDate()),c(o,0),x+=-1===(t=s(o,n,e.disableDates)).cssClass.indexOf(H)||p?re(o,i,r)?g(t):y(t):k(t),a(o,1);return x+"
      "}function te(e,t,n){var i=e.getFullYear(),r=t.getFullYear(),o=r,a=0;return n&&(o=(r-=r%n)-r%n+n-1),i>o?a=1:ii?i=new Y(+t):n=+t&&+e<=+n}function oe(e,t){return e.slice(t).concat(e.slice(0,t))}function ae(e,t,n){t=t instanceof Y?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function se(e,t){if(+t<+e){var i=+e;Z.views[0].setDate(e,t),Z.views[0].setDate(t,new Date(i))}var r=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),o=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.ceil((+o-+r)/n.date.MS_PER_DAY)}function le(e,t,n,i){for(var r=0;r<=t;r++){var o=new Date(n.getTime());i(o=new Date(o.setDate(o.getDate()+r)))||e.push(o)}}function ce(t){e(this).hasClass("k-disabled")||e(this).toggleClass("k-hover",L.indexOf(t.type)>-1||t.type==B)}function de(e){e.preventDefault()}function ue(e,t,n){var i=new Y(e,t,n);return i.setFullYear(e,t,n),i}function he(e){return f(e).calendars.standard}function pe(e){var n=$[e.start],i=$[e.depth],r=f(e.culture);e.format=h(e.format||r.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=T),(i===t||i>n)&&(e.depth=T),null===e.dates&&(e.dates=[])}function fe(e,t){e.addClass("k-"+t)}function me(t){return n.isFunction(t)?t:Array.isArray(t)?function(e){var t,n=[],i=["su","mo","tu","we","th","fr","sa"];e[0]instanceof Y?(n=function(e){for(var t=[],n=0;n-1)}):(n=e.map((function(e){e=e.slice(0,2).toLowerCase();var t=i.indexOf(e);if(t>-1)return t})),t=function(e){return!!(e&&n.indexOf(new Date(e).getDay())>-1)});return t}(t):e.noop}function ge(e,t){return e instanceof Date&&t instanceof Date&&(e=e.getTime(),t=t.getTime()),e===t}function ve(t){var i=e(t).attr(n.attr(M)).split("/");return i=ue(i[0],i[1],i[2])}function _e(e,i){return e?n.isFunction(e)?e(i):p(e)(i):t}Z.isEqualDatePart=function(e,t){return!!e&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())},Z.isEqualDate=ge,Z.restrictValue=ie,Z.isInRange=re,Z.addClassToViewContainer=fe,Z.normalize=pe,Z.viewsEnum=$,Z.disabled=me,Z.toDateObject=ve,Z.getToday=ne,Z.createDate=ue,n.calendar=Z}(window.kendo.jQuery);kendo;var A=function(e,t){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},A(e,t)};function H(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;Object.create;var R,F=function(e){return e?new Date(e.getTime()):null},P=function(e,t){var n=F(e);return 0===t&&23===n.getHours()&&n.setHours(n.getHours()+2),n},B=function(e,t){var n=F(e);return n.setDate(n.getDate()+t),P(n,e.getHours())},L=function(e,t,n,i,r,o,a){void 0===i&&(i=0),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a=0);var s=new Date(e,t,n,i,r,o,a);return e>-1&&e<100&&s.setFullYear(s.getFullYear()-1900),P(s,i)},V=function(e){var t=L(e.getFullYear(),e.getMonth()+1,1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());return B(t,-1)},O=function(e,t){var n=F(e),i=(12+(n.getMonth()+t)%12)%12;return n.setMonth(n.getMonth()+t),function(e,t){return e.getMonth()!==t?V(O(e,-1)):e}(P(n,e.getHours()),i)};!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(R||(R={}));var N;!function(e){e[e.Sunday=0]="Sunday",e[e.Monday=1]="Monday",e[e.Tuesday=2]="Tuesday",e[e.Wednesday=3]="Wednesday",e[e.Thursday=4]="Thursday",e[e.Friday=5]="Friday",e[e.Saturday=6]="Saturday"}(N||(N={}));var W=function(e){return L(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0)},U=function(e,t){return!e&&!t||e&&t&&e.getTime()===t.getTime()},j={rules:{},titles:{},zones:{}},q={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},G={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6},K=function(e,t,n){var i,r=t[3],o=t[4],a=t[5],s="u"===a[3]?6e4*-n:0;if(isNaN(o)){if(0===o.indexOf("last")){i=new Date(Date.UTC(e,q[r]+1,1,a[0]-24,a[1],a[2])+s);var l=G[o.substr(4,3)],c=i.getUTCDay();i.setUTCDate(i.getUTCDate()+l-c-(l>c?7:0))}else if(o.indexOf(">=")>=0){i=new Date(Date.UTC(e,q[r],o.substr(5),a[0],a[1],a[2],0)+s);l=G[o.substr(0,3)],c=i.getUTCDay();i.setUTCDate(i.getUTCDate()+l-c+(l1&&(o=60*r[0]+Number(r[1])),[-1e6,"max","-","Jan",1,[0,0,0],o,"-"]}var a=new Date(t).getUTCFullYear();(i=i.filter((function(e){var t=e[0],n=e[1];return t<=a&&(n>=a||t===a&&"only"===n||"max"===n)}))).push(t),i.sort((function(e,t){return"number"!=typeof e&&(e=Number(K(a,e,n))),"number"!=typeof t&&(t=Number(K(a,t,n))),e-t}));var s=i[i.indexOf(t)-1]||i[i.length-1];return isNaN(s)?s:null},X="The required {0} timezone information is not provided!",Z=/\{(\d+)}?\}/g,J=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},ee=function(e){for(var t=arguments,n=[],i=1;i=0;i--){var r=n[i][3];if(r&&t>r)break}var o=n[i+1];if(!o)throw new Error(ee(X,e));return o},ne=function(e,t){var n=t.getTime(),i=te(e,n);return{rule:Q(i[1],n,i[0]),zone:i}},ie=function(e,t){if(void 0===t&&(t=new Date),"Etc/UTC"===e||"Etc/GMT"===e)return 0;if(""===e)return t.getTimezoneOffset();var n=ne(e,t),i=n.rule,r=n.zone;return parseFloat(i?r[0]-i[6]:r[0])};var re=function(e,t){return new Date(e.getTime()+6e4*t)},oe=function(e,t){return new Date(e.getTime()+36e5*t)},ae=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dev"],le=function(e,t){return void 0===t&&(t=2),(e<0?"-":"")+new Array(t).concat([Math.abs(e)]).join("0").slice(-t)};function ce(e,t){var n=ie(t,e),i=oe(e,-1);return n0?-1:1);var s=oe(i,a);return e.fromUTCDate(s,n)},e.fromUTCDate=function(t,n){return void 0===n&&(n=""),new e(t,n)},e.prototype.toLocalDate=function(){return F(this._localDate)},e.prototype.toUTCDate=function(){return F(this._utcDate)},e.prototype.toTimezone=function(t){if(this.timezone===t)return this.clone();var n=ie(this.timezone,this._utcDate),i=re(this._utcDate,n);return e.fromLocalDate(i,t)},e.prototype.clone=function(){return e.fromUTCDate(this._utcDate,this.timezone)},e.prototype.addDays=function(t){var n=new Date(this._utcDate.getTime());return n.setUTCDate(n.getUTCDate()+t),e.fromUTCDate(n,this.timezone)},e.prototype.addTime=function(t){var n=de(new Date(this._utcDate.getTime()),this.timezone);n.setTime(n.getTime()+t);var i=de(n,this.timezone);return e.fromUTCDate(i,this.timezone)},e.prototype.stripTime=function(){var t=this._utcDate,n=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0);return e.fromUTCDate(new Date(n),this.timezone)},e.prototype.getTime=function(){return this._localDate.getTime()},e.prototype.getTimezoneOffset=function(){return this.timezoneOffset},e.prototype.getFullYear=function(){return this._utcDate.getUTCFullYear()},e.prototype.getMonth=function(){return this._utcDate.getUTCMonth()},e.prototype.getDate=function(){return this._utcDate.getUTCDate()},e.prototype.getDay=function(){return this._utcDate.getUTCDay()},e.prototype.getHours=function(){return this._utcDate.getUTCHours()},e.prototype.getMinutes=function(){return this._utcDate.getUTCMinutes()},e.prototype.getSeconds=function(){return this._utcDate.getUTCSeconds()},e.prototype.getMilliseconds=function(){return this._utcDate.getUTCMilliseconds()},e.prototype.getUTCDate=function(){return this._localDate.getUTCDate()},e.prototype.getUTCDay=function(){return this._localDate.getUTCDay()},e.prototype.getUTCFullYear=function(){return this._localDate.getUTCFullYear()},e.prototype.getUTCHours=function(){return this._localDate.getUTCHours()},e.prototype.getUTCMilliseconds=function(){return this._localDate.getUTCMilliseconds()},e.prototype.getUTCMinutes=function(){return this._localDate.getUTCMinutes()},e.prototype.getUTCMonth=function(){return this._localDate.getUTCMonth()},e.prototype.getUTCSeconds=function(){return this._localDate.getUTCSeconds()},e.prototype.setTime=function(e){throw new Error("Method not implemented.")},e.prototype.setMilliseconds=function(e){throw new Error("Method not implemented.")},e.prototype.setUTCMilliseconds=function(e){throw new Error("Method not implemented.")},e.prototype.setSeconds=function(e,t){throw new Error("Method not implemented.")},e.prototype.setUTCSeconds=function(e,t){throw new Error("Method not implemented.")},e.prototype.setMinutes=function(e,t,n){throw new Error("Method not implemented.")},e.prototype.setUTCMinutes=function(e,t,n){throw new Error("Method not implemented.")},e.prototype.setHours=function(e,t,n,i){throw new Error("Method not implemented.")},e.prototype.setUTCHours=function(e,t,n,i){throw new Error("Method not implemented.")},e.prototype.setDate=function(e){throw new Error("Method not implemented.")},e.prototype.setUTCDate=function(e){throw new Error("Method not implemented.")},e.prototype.setMonth=function(e,t){throw new Error("Method not implemented.")},e.prototype.setUTCMonth=function(e,t){throw new Error("Method not implemented.")},e.prototype.setFullYear=function(e,t,n){throw new Error("Method not implemented.")},e.prototype.setUTCFullYear=function(e,t,n){throw new Error("Method not implemented.")},e.prototype.toISOString=function(){return this._localDate.toISOString()},e.prototype.toJSON=function(){return this._localDate.toJSON()},e.prototype.toString=function(){var e,t=(e=this._utcDate,ae[e.getUTCDay()]+" "+se[e.getUTCMonth()]),n=this.toTimeString();return t+" "+this.getDate()+" "+this.getFullYear()+" "+n},e.prototype.toDateString=function(){return(e=this._utcDate,new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())).toDateString();var e},e.prototype.toTimeString=function(){var e=le(this.getHours())+":"+le(this.getMinutes())+":"+le(this.getSeconds()),t=function(e){var t=e<=0?"+":"-",n=Math.abs(e);return"GMT"+t+le(Math.floor(n/60))+le(n%60)}(this.timezoneOffset),n=function(e,t){if(void 0===t&&(t=new Date),"Etc/UTC"===e)return"UTC";if("Etc/GMT"===e)return"GMT";if(""===e)return"";var n=ne(e,t),i=n.zone,r=n.rule,o=i[2];return o.indexOf("/")>=0?o.split("/")[r&&+r[6]?1:0]:o.indexOf("%s")>=0?o.replace("%s",r&&"-"!==r[7]?r[7]:""):o}(this.timezone,this._utcDate);return n&&(n=" ("+n+")"),e+" "+t+n},e.prototype.toLocaleString=function(e,t){return this._localDate.toLocaleString(e,t)},e.prototype.toLocaleDateString=function(e,t){return this._localDate.toLocaleDateString(e,t)},e.prototype.toLocaleTimeString=function(e,t){return this._localDate.toLocaleTimeString(e,t)},e.prototype.toUTCString=function(){return this.toTimezone("Etc/UTC").toString()},e.prototype[Symbol.toPrimitive]=function(e){return"string"===e||"default"===e?this.toString():this._localDate.getTime()},e.prototype.valueOf=function(){return this.getTime()},e.prototype.getVarDate=function(){throw new Error("Not implemented.")},e.prototype.format=function(e){throw new Error("Not implemented.")},e.prototype.formatUTC=function(e){throw new Error("Not implemented.")}}();var he,pe,fe,me=function(){this.symbols="",this.partMap=[]},ge="_",ve=68,_e="d",be="en",we="Delete",ye="Backspace",ke=" ",xe=function(e){return new Array(Math.max(e,0)).fill("0").join("")},Ce=function(e){return e.replace(/^0*/,"")},Se=function(e,t){return e[t.pattern[0]]=t.type,e},Te=function(e){return null!=e},De=function(e){return Te(e)&&"number"==typeof e&&!Number.isNaN(e)},Ie=function(e){return parseInt(e,10)},ze=function(e,t,n){return Math.min(n,Math.max(t,e))},Me=function(){for(var e=arguments,t=[],n=0;n2)r+=a[l][s];else if(this.getInvalidDatePartValue(l))r+=xe(c.length-d.length)+d,s+=c.length-1;else r+=a[l][s]}else if(this.getInvalidDatePartValue(l)){d=this.getInvalidDatePartValue(l).toString();r+=xe(c.length-d.length)+d,s+=c.length-1}else r+=a[l][s]}else r+=n[s]}n=r}return this.merge(n,i)},e.prototype.getFormattedInvalidDates=function(e){var t=this;void 0===e&&(e="");var n=e||this.format,i={E:"",H:"",M:"",a:"",d:"",h:"",m:"",s:"",y:"",S:""};return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(e){var r=t.getInvalidDatePart(e).date;if(r){var o=t.intl.formatDate(r,n,t.localeId);i[e]=o}})),i},e.prototype.modifyExisting=function(e){for(var t=this.dateFormatString(this.value,this.format).symbols,n=0;n11)&&s)return this.setExisting(e,!1),void this.resetInvalidDateSymbol(e);if(!s){if(u<0)u=ze(u%11+1+11,0,11);else{var v=Te(c)?u:(t-1)%12;u=ze(v,0,11)}u=ze(u,0,11)}u=ze(u,0,11)}else if("d"===e)if(s){if(h<=0||h>31)return this.setExisting(e,!1),void this.resetInvalidDateSymbol(e)}else if(!s){if(Te(c)&&(h<=0||h>31))return this.setExisting(e,!1),void this.resetInvalidDateSymbol(e);if(t<0){var _=Te(c)?h:31-Math.abs(t%31)+1;h=ze(_,1,31)}else{_=Te(c)?h:t%31;h=ze(_,1,31)}h=ze(h,1,31)}var b=L(d,u,h,p,f,m,g),w=o||a?this.modifyDateSymbolWithValue(i,e,o?u:h):null,y=Ae(b,d,u,h,p,f,m,g);this.getValue()&&Ae(b,d,u,h,p,f,m,g)?(i=F(b),this.markDatePartsAsExisting()):o&&w?w.getMonth()===u?this.getExisting("d")?y?(i=F(b),this.resetInvalidDateSymbol(e)):(n=!0,this.setInvalidDatePart(e,{value:u,date:F(w),startDateOffset:t,startDate:F(this.value)}),this.setExisting(e,!1)):y?(this.resetInvalidDateSymbol(e),i=F(b),this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d"))):(this.resetInvalidDateSymbol(e),i=F(w)):(n=!0,this.setInvalidDatePart(e,{value:u,date:F(w),startDateOffset:t,startDate:F(this.value)}),this.setExisting(e,!1)):a&&w&&(w.getDate()===h?this.getExisting("M")?y?(i=F(b),this.resetInvalidDateSymbol(e)):(n=!0,this.setInvalidDatePart(e,{value:h,date:F(w),startDateOffset:t,startDate:F(this.value)}),this.setExisting(e,!1)):y?(i=F(b),this.resetInvalidDateSymbol(e),this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M"))):(this.resetInvalidDateSymbol(e),i=F(w)):(n=!0,this.setInvalidDatePart(e,{value:h,date:F(this.value),startDateOffset:t,startDate:F(this.value)}),this.setExisting(e,!1)))}this.shouldNormalizeCentury()&&(i=this.normalizeCentury(i)),r&&!this.cycleTime&&(i.getDate(),this._value.getDate()),n||(this.setExisting(e,!0),this._value=i,this.getValue()&&this.resetInvalidDate())}},e.prototype.parsePart=function(e){for(var t=e.symbol,n=e.currentChar,i=e.resetSegmentValue,r=e.cycleSegmentValue,o=e.rawTextValue,a=e.isDeleting,s=e.originalFormat,l=!r,c=this.dateFormatString(this.value,this.format),d=c.partMap.filter((function(e){return"literal"===e.type})).map((function(e,t){return{datePartIndex:t,type:e.type,pattern:e.pattern,literal:""}})),u=c.partMap.map((function(e){return{type:e.type,pattern:e.pattern,text:""}})),h=0;h2})),hasInvalidDatePart:!1};if(!n){if(!l)return this.resetLeadingZero(),this.setExisting(t,!1),this.resetInvalidDateSymbol(t),Me(m,{value:null,switchToNext:!1});for(h=0;h=0;if(v||_||b)return this.resetLeadingZero(),this.setExisting(t,!1),this.resetInvalidDateSymbol(t),Me(m,{value:null,switchToNext:!1})}}var w=this.intl.formatDate(this.value,this.format,this.localeId),y=c.symbols,k=!1,x="",C="",S="",T="",D="",I="",z="";for(h=0;h0?S.length+HA))return Me(m,{value:null,switchToNext:!1});if(!M||M&&!this.autoCorrectParts){C="",S="",x="",I="",k=!1;for(h=0;h0?S.length+H-1&&J<12&&((R=F(this.value)).setMonth(J),R.getMonth()!==J&&(R=V(O(R,-1))))}"y"===t&&(R=L(parseInt(Y,10),this.month?this.value.getMonth():0,this.date?this.value.getDate():1,this.hours?this.value.getHours():0,this.minutes?this.value.getMinutes():0,this.seconds?this.value.getSeconds():0,this.milliseconds?this.value.getMilliseconds():0),(l&&He(R)||!l&&R)&&this.date&&R.getDate()!==this.value.getDate()&&(R=V(O(R,-1))))}if(l&&He(R)||!l&&R){var ee=this.peek(Y,j),te=X?""+T+ee+D:""+x+ee+I,ne=this.intl.parseDate(te,this.format,this.localeId),ie=((this.leadingZero||{})[t]||0)+Ce(Y).length>=q,re=null===ne||(W[t]?j.length<=Y.length:ie);return this.shouldNormalizeCentury()&&(R=this.normalizeCentury(R)),this._value=R,this.setExisting(t,!0),this.resetInvalidDateSymbol(t),this.autoCorrectParts||("M"===t?this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d")):"d"===t&&this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M")),this.hasInvalidDatePart()||this.markDatePartsAsExisting()),Me(m,{value:this.value,switchToNext:re})}}if(P&&(R=this.intl.parseDate(x+P+I,this.format,this.localeId)))return this._value=R,this.setExisting(t,!0),Me(m,{value:this.value,switchToNext:!1});if(B&&(R=this.intl.parseDate(x+B+I,this.format)))return this._value=R,Me(m,{value:this.value,switchToNext:!0});if(N&&this.setExisting(t,!1),!this.autoCorrectParts){var oe=void 0,ae=l?S:Y,se=Ie(ae);if(De(se)){if("d"===t&&(se<=0||se>31)||"M"===t&&(se<0||se>11))return Me(m,{value:null,switchToNext:!1});oe="M"===t?se-1:se;var le="M"===t,ce="d"===t,de=F(this._value),ue=this._partiallyInvalidDate.invalidDateParts||{},he=ue.y.value||de.getFullYear(),pe=le?oe:ue.M.value||de.getMonth(),fe=ce?oe:ue.d.value||ue.E.value||de.getDate(),me=ue.h.value||ue.H.value||de.getHours(),ge=ue.m.value||de.getMinutes(),ve=ue.s.value||de.getSeconds(),_e=ue.S.value||de.getMilliseconds(),be=L(he,pe,fe,me,ge,ve,_e),we=Ae(be,he,pe,fe,me,ge,ve,_e),ye=le||ce?this.modifyDateSymbolWithValue(de,t,le?pe:fe):null,ke=!1;if(le&&ye?ye.getMonth()===pe?this.getExisting("d")?we?(de=F(be),this.resetInvalidDateSymbol(t)):(ke=!0,this.setInvalidDatePart(t,{value:pe,date:F(ye),startDate:F(this.value)}),this.setExisting(t,!1)):we?(this.resetInvalidDateSymbol(t),de=F(be),this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d"))):(this.resetInvalidDateSymbol(t),de=F(ye)):(ke=!0,this.setInvalidDatePart(t,{value:pe,date:F(ye),startDate:F(this.value)}),this.setExisting(t,!1)):ce&&ye&&(ye.getDate()===fe?this.getExisting("M")?we?(de=F(be),this.resetInvalidDateSymbol(t)):(ke=!0,this.setInvalidDatePart(t,{value:fe,date:F(ye),startDate:F(this.value)}),this.setExisting(t,!1)):we?(de=F(be),this.resetInvalidDateSymbol(t),this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M"))):(this.resetInvalidDateSymbol(t),de=F(ye)):(ke=!0,this.setInvalidDatePart(t,{value:fe,date:F(this.value),startDate:F(this.value)}),this.setExisting(t,!1))),!ke){if(this.setExisting(t,!0),l&&!He(R)){var Se=this.intl.parseDate(T+Y+D,this.format,this.localeId);He(Se)&&(this._value=Se)}else this._value=de;this.getValue()&&this.resetInvalidDate()}re=!1;return re="M"===t?se>=2||ae.length>=2:M?ae.length===A:ae.length>A,Me(m,{value:null,switchToNext:re,hasInvalidDatePart:ke})}}return Me(m,{value:null,switchToNext:!1})},e.prototype.symbolMap=function(e){return this.intl.splitDateFormat(this.format,this.localeId).reduce(Se,{})[e]},e.prototype.resetLeadingZero=function(){var e=null!==this.leadingZero;return this.setLeadingZero(null),e},e.prototype.setLeadingZero=function(e){this.leadingZero=e},e.prototype.getLeadingZero=function(){return this.leadingZero||{}},e.prototype.normalizeCentury=function(e){if(!Te(e))return e;var t=function(e){return!Te(e)||isNaN(e.getTime())?0:Number(e.getFullYear().toString().slice(-2))}(e),n=this.getNormalizedCenturyBase(t);return Ee(e,n+t)},e.prototype.incrementLeadingZero=function(e){var t=this.leadingZero||{};t[e]=(t[e]||0)+1,this.leadingZero=t},e.prototype.isAbbrMonth=function(e,t){var n=this.partPattern(e,t);return"month"===n.type&&n.names},e.prototype.partPattern=function(e,t){return e.filter((function(e){return-1!==e.pattern.indexOf(t)}))[0]},e.prototype.peek=function(e,t){var n=e.replace(/^0*/,"")+"0";return xe(t.length-n.length)+n},e.prototype.matchMonth=function(e){if(this.typedMonthPart+=e.toLowerCase(),0===this.monthNames.length)return"";for(;this.typedMonthPart.length>0;){for(var t=0;t=1&&n<=12&&n.toString()===this.typedMonthPart)return this.monthNames[n-1];this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return""},e.prototype.matchDayPeriod=function(e,t){var n=e.toLowerCase();if("a"===t&&this.dayPeriods){if(this.dayPeriods.am.toLowerCase().startsWith(n))return this.dayPeriods.am;if(this.dayPeriods.pm.toLowerCase().startsWith(n))return this.dayPeriods.pm}return""},e.prototype.allFormattedMonths=function(e){void 0===e&&(e="en");for(var t=this.intl.splitDateFormat(this.format,this.localeId),n=0;n0;)i.push(this.symbols[n[o].pattern[0]]||ge),r.push(n[o]),a--;var s=new me;return s.symbols=i.join(""),s.partMap=r,s},e.prototype.merge=function(e,t){for(var n="",i="",r=t.symbols,o=!1,a=0,s=this.getFormattedInvalidDates(r),l=r.length-1;l>=0;l--){var c=this.getPartsForSegment(t,l);if(-1===this.knownParts.indexOf(r[l])||this.getExisting(r[l]))this.autoCorrectParts?n=e[l]+n:e.length!==r.length?o?n=e[l]+n:a>0?(n=e[l]+n,--a<=0&&(o=!0)):n=(e[l+e.length-r.length]||"")+n:n=e[l]+n,i=r[l]+i;else{var d=r[l],u=0;if(this.autoCorrectParts||!this.autoCorrectParts&&!this.getInvalidDatePartValue(d)){for(;l>=0&&d===r[l];)l--;l++}if(this.leadingZero&&this.leadingZero[d])n="0"+n;else if(!this.autoCorrectParts&&this.getInvalidDatePartValue(d)){var h=this.getInvalidDatePartValue(d).toString();if("M"===d)if(h=(Ie(this.getInvalidDatePartValue(d))+1).toString(),c.length>2)n=s[d][l]+n;else h=(Ie(this.getInvalidDatePartValue(d))+1).toString(),n=xe(c.length-h.length)+h+n,u=c.length-1,a=h.length-c.length;else n=xe(c.length-h.length)+h+n,u=c.length-1,a=h.length-c.length}else n=this.dateFieldName(t.partMap[l])+n;for(;i.lengththis.twoDigitYearMax?1900:2e3},e.prototype.shouldNormalizeCentury=function(){return this.intl.splitDateFormat(this.format).some((function(e){return"yy"===e.pattern}))},e.prototype.resetInvalidDate=function(){var e=this;this._partiallyInvalidDate.startDate=null,Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(t){e.resetInvalidDatePart(t)}))},e.prototype.resetInvalidDateSymbol=function(e){var t=this;this.resetInvalidDatePart(e);var n=!0;Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(e){t._partiallyInvalidDate.invalidDateParts[e]&&Te(t._partiallyInvalidDate.invalidDateParts[e].value)&&(n=!1)})),n&&this.resetInvalidDate()},e.prototype.resetInvalidDatePart=function(e){this._partiallyInvalidDate.invalidDateParts[e]&&(this._partiallyInvalidDate.invalidDateParts[e]={value:null,date:null,startDateOffset:0})},e.prototype.getInvalidDatePart=function(e){return this._partiallyInvalidDate.invalidDateParts[e]||{}},e.prototype.getInvalidDatePartValue=function(e){return(this._partiallyInvalidDate.invalidDateParts[e]||{}).value},e.prototype.setInvalidDatePart=function(e,t){var n=t.value,i=void 0===n?null:n,r=t.date,o=void 0===r?null:r,a=t.startDateOffset,s=void 0===a?0:a,l=t.startDate,c=void 0===l?null:l;this._partiallyInvalidDate.invalidDateParts[e]&&(this._partiallyInvalidDate.invalidDateParts[e].value=i,this._partiallyInvalidDate.invalidDateParts[e].date=o,this._partiallyInvalidDate.invalidDateParts[e].startDateOffset=s,this._partiallyInvalidDate.startDate=c)},e.prototype.hasInvalidDatePart=function(){var e=this,t=!1;return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(n){e._partiallyInvalidDate.invalidDateParts[n]&&Te(e._partiallyInvalidDate.invalidDateParts[n].value)&&(t=!0)})),t},e.prototype.modifyDateSymbolWithOffset=function(e,t,n){var i=F(e),r=!1;switch(t){case"y":i.setFullYear(i.getFullYear()+n);break;case"M":i=O(this.value,n);break;case"d":case"E":i.setDate(i.getDate()+n);break;case"h":case"H":i.setHours(i.getHours()+n),r=!0;break;case"m":i.setMinutes(i.getMinutes()+n),r=!0;break;case"s":i.setSeconds(i.getSeconds()+n),r=!0;break;case"S":i.setMilliseconds(i.getMilliseconds()+n);break;case"a":i.setHours(i.getHours()+12*n),r=!0}return{date:i,timeModified:r}},e.prototype.modifyDateSymbolWithValue=function(e,t,n){var i=F(e);switch(t){case"y":i.setFullYear(n);break;case"M":i=O(e,n-e.getMonth());break;case"d":case"E":i.setDate(n);break;case"h":case"H":case"a":i.setHours(n);break;case"m":i.setMinutes(n);break;case"s":i.setSeconds(n);break;case"S":i.setMilliseconds(n)}return i},e.prototype.markDatePartsAsExisting=function(){this.modifyExisting(!0)},e.prototype.getPartsForSegment=function(e,t){for(var n=e.partMap[t],i=[],r=t;r=0;r--){o=e.partMap[r];if(n.type!==o.type||n.pattern!==o.pattern)break;i.unshift(o)}return i},e}(),Pe=8,Be=46,Le=9,Ve=13,Oe=37,Ne=38,We=39,Ue=40,je=35,qe=36,Ge={events:{}},Ke=function(){function e(e){this.options=Me({},Ge,e)}return e.prototype.destroy=function(){},e.prototype.trigger=function(e,t){void 0===t&&(t={});var n={defaultPrevented:!1,preventDefault:function(){n.defaultPrevented=!0}};return"function"==typeof this.options.events[e]&&(this.options.events[e](Me(n,t,{sender:this})),n.defaultPrevented)},e}();!function(e){e.None="none",e.Caret="caret",e.Selection="selection"}(pe||(pe={}));var Ye="dragStart",$e="drop",Qe="touchstart",Xe="mousedown",Ze="mouseup",Je="click",et="input",tt="keydown",nt="focus",it="blur",rt="paste",ot="DOMMouseScroll",at="mousewheel",st="valueChange",lt="inputEnd",ct="blurEnd",dt="focusEnd",ut="change",ht={format:"d",hasPlaceholder:!1,placeholder:null,cycleTime:!0,locale:null,steps:{millisecond:1,second:1,minute:1,hour:1,day:1,month:1,year:1},formatPlaceholder:null,events:(fe={},fe.valueChange=null,fe.input=null,fe.inputEnd=null,fe.focus=null,fe.focusEnd=null,fe.blur=null,fe.blurEnd=null,fe.keydown=null,fe.mousewheel=null,fe.change=null,fe),selectNearestSegmentOnFocus:!1,selectPreviousSegmentOnBackspace:!1,enableMouseWheel:!1,allowCaretMode:!1,autoSwitchParts:!0,autoSwitchKeys:[],twoDigitYearMax:ve,autoCorrectParts:!0},pt=function(e){function t(t,n){var i=e.call(this,n)||this;return i.dateObject=null,i.currentText="",i.currentFormat="",i.interactionMode=pe.None,i.previousElementSelection={start:0,end:0},i.init(t,n),i}return H(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.dateObject&&this.dateObject.getValue()},enumerable:!0,configurable:!0}),t.prototype.init=function(e,t){var n=He(this.options.value)?F(this.options.value):new Date(t.formattedValue);He(n)||(n=null),this.element=e,this.options=Me({},ht,t),this.intl=this.options.intlService,this.dateObject=this.createDateObject(),this.dateObject.setValue(n),this.setTextAndFormat(),this.bindEvents(),this.resetSegmentValue=!0,this.interactionMode=pe.None,this.forceUpdate()},t.prototype.destroy=function(){this.unbindEvents(),this.dateObject=null,e.prototype.destroy.call(this)},t.prototype.bindEvents=function(){this.onElementDragStart=this.onElementDragStart.bind(this),this.element.addEventListener(Ye,this.onElementDragStart),this.onElementDrop=this.onElementDrop.bind(this),this.element.addEventListener($e,this.onElementDrop),this.onElementClick=this.onElementClick.bind(this),this.element.addEventListener(Je,this.onElementClick),this.onElementMouseDown=this.onElementMouseDown.bind(this),this.element.addEventListener(Xe,this.onElementMouseDown),this.element.addEventListener(Qe,this.onElementMouseDown),this.onElementMouseUp=this.onElementMouseUp.bind(this),this.element.addEventListener(Ze,this.onElementMouseUp),this.onElementInput=this.onElementInput.bind(this),this.element.addEventListener(et,this.onElementInput),this.onElementKeyDown=this.onElementKeyDown.bind(this),this.element.addEventListener(tt,this.onElementKeyDown),this.onElementFocus=this.onElementFocus.bind(this),this.element.addEventListener(nt,this.onElementFocus),this.onElementBlur=this.onElementBlur.bind(this),this.element.addEventListener(it,this.onElementBlur),this.onElementChange=this.onElementChange.bind(this),this.element.addEventListener(ut,this.onElementChange),this.onElementPaste=this.onElementPaste.bind(this),this.element.addEventListener(rt,this.onElementPaste),this.onElementMouseWheel=this.onElementMouseWheel.bind(this),this.element.addEventListener(ot,this.onElementMouseWheel),this.element.addEventListener(at,this.onElementMouseWheel)},t.prototype.unbindEvents=function(){this.element.removeEventListener(Ye,this.onElementDragStart),this.element.removeEventListener($e,this.onElementDrop),this.element.removeEventListener(Qe,this.onElementMouseDown),this.element.removeEventListener(Xe,this.onElementMouseDown),this.element.removeEventListener(Ze,this.onElementMouseUp),this.element.removeEventListener(Je,this.onElementClick),this.element.removeEventListener(et,this.onElementInput),this.element.removeEventListener(tt,this.onElementKeyDown),this.element.removeEventListener(nt,this.onElementFocus),this.element.removeEventListener(it,this.onElementBlur),this.element.removeEventListener(ut,this.onElementChange),this.element.removeEventListener(rt,this.onElementPaste),this.element.removeEventListener(ot,this.onElementMouseWheel),this.element.removeEventListener(at,this.onElementMouseWheel)},t.prototype.setOptions=function(e,t){void 0===t&&(t=!1),this.options=Me(this.options,e),this.setDateObjectOptions(),t&&(this.unbindEvents(),this.init(this.element,this.options))},t.prototype.setDateObjectOptions=function(){if(this.dateObject){var e=this.getDateObjectOptions();this.dateObject.setOptions(e)}},t.prototype.resetLocale=function(){this.unbindEvents(),this.init(this.element,this.options)},t.prototype.isInCaretMode=function(){return this.interactionMode===pe.Caret},t.prototype.focus=function(){this.element.focus(),this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(0)},t.prototype.onElementDragStart=function(e){e.preventDefault()},t.prototype.onElementDrop=function(e){e.preventDefault()},t.prototype.onElementMouseDown=function(){this.mouseDownStarted=!0,this.focusedPriorToMouseDown=this.isActive},t.prototype.onElementMouseUp=function(e){this.mouseDownStarted=!1,e.preventDefault()},t.prototype.onElementClick=function(e){this.mouseDownStarted=!1,this.switchedPartOnPreviousKeyAction=!1;var t=this.selection;if(this.isInCaretMode()&&this.forceUpdate(),3===e.detail);else if(this.isActive&&this.options.selectNearestSegmentOnFocus){var n=this.element.selectionStart!==this.element.selectionEnd,i=Te(this.options.placeholder)&&!this.dateObject.hasValue()&&!this.focusedPriorToMouseDown,r=!n&&i?0:this.caret()[0];this.selectNearestSegment(r)}else this.setSelection(this.selectionByIndex(t.start))},t.prototype.onElementInput=function(e){if(this.triggerInput({event:e}),this.element&&this.dateObject){var t=this.switchedPartOnPreviousKeyAction;if(this.isPasteInProgress)return this.options.allowCaretMode&&(this.resetSegmentValue=!1),this.updateOnPaste(e),void(this.isPasteInProgress=!1);var n=this.keyDownEvent||{},i=n.keyCode===Pe||n.key===ye,r=n.keyCode===Be||n.key===we,o=this.interactionMode;!this.options.allowCaretMode||o===pe.Caret||r||i||(this.resetSegmentValue=!0),this.options.allowCaretMode?this.interactionMode=pe.Caret:this.interactionMode=pe.Selection;var a=this.isInCaretMode();if(a&&this.keyDownEvent.key===ke)this.restorePreviousInputEventState();else{var s=this.dateObject&&this.dateObject.getValue(),l=this.dateObject?this.dateObject.value:null,c=this.dateObject.getTextAndFormat(),d=c.text,u=c.format;this.currentFormat=u;var h=function(e){var t=e.oldText,n=e.newText,i=e.formatPattern,r=e.selectionStart,o=e.isInCaretMode,a=e.keyEvent,s=t[r+t.length-n.length],l=t.substring(0,r+t.length-n.length),c=n.substring(0,r),d=[];if(l===c&&r>0)return d.push([i[r-1],c[r-1]]),d;if(0===l.indexOf(c)&&o&&(a.key===we||a.key===ye)||0===l.indexOf(c)&&!o&&(0===c.length||i[c.length-1]!==i[c.length])){var u="";o||1!==c.length||d.push([i[0],c[0]]);for(var h=c.length;h1,y=f[f.length-1],k=y&&!Te(y.value),x=a&&(i||r)&&k,C=!!y&&y.resetPart,S=this.dateObject.getValue(),T=!U(s,S),D=this.dateObject.value,I=this.selection;if(a){var z=h&&h.length>0?h[0][0]:null,M=this.dateObject.getLeadingZero()[z];h.length&&h[0][0]!==ge?m?(this.forceUpdateWithSelection(),this.switchDateSegment(1)):C?(b=this.currentFormat[I.start])?(this.forceUpdate(),this.setSelection(this.selectionBySymbol(b))):this.restorePreviousInputEventState():x?(this.forceUpdate(),h.length&&h[0][0]!==ge&&this.setSelection(this.selectionBySymbol(h[0][0]))):k?"0"===e.data&&M||(Te(s)&&!Te(S)?this.restorePreviousInputEventState():!Te(s)&&Te(S)?this.forceUpdateWithSelection():Te(s)&&Te(S)?T?this.forceUpdateWithSelection():this.restorePreviousInputEventState():Te(s)||Te(S)?l!==D||this.restorePreviousInputEventState():this.forceUpdateWithSelection()):k||w||this.forceUpdateWithSelection():(this.options.autoSwitchParts||h[0][1]!==ge)&&this.setSelection(this.selectionBySymbol(h[0][0]))}else a||(this.forceUpdate(),h.length&&h[0][0]!==ge&&this.setSelection(this.selectionBySymbol(h[0][0])),this.options.autoSwitchParts?p?(this.resetSegmentValue=!0,t||this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0):m&&(this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0):y&&y.switchToNext?this.resetSegmentValue=!0:p&&(this.resetSegmentValue=!0,t||this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0),i&&this.options.selectPreviousSegmentOnBackspace&&this.switchDateSegment(-1));this.tryTriggerValueChange({oldValue:s,event:e}),this.triggerInputEnd({event:e,error:g}),a&&this.setTextAndFormat()}else this.restorePreviousInputEventState()}}},t.prototype.onElementFocus=function(e){this.triggerFocus({event:e})||(this.isActive=!0,this.interactionMode=pe.None,this.switchedPartOnPreviousKeyAction=!1,this.refreshElementValue(),this.mouseDownStarted||this.caret(0,this.elementValue.length),this.mouseDownStarted=!1,this.triggerFocusEnd({event:e}))},t.prototype.onElementBlur=function(e){this.resetSegmentValue=!0,this.isActive=!1,this.triggerBlur({event:e})||(this.interactionMode=pe.None,this.switchedPartOnPreviousKeyAction=!1,this.refreshElementValue(),this.triggerBlurEnd({event:e}))},t.prototype.onElementChange=function(e){this.triggerChange({event:e})},t.prototype.onElementKeyDown=function(e){if(!this.triggerKeyDown({event:e})){var t=this.selection,n=t.start,i=t.end;if(this.keyDownEvent=e,this.previousElementValue=this.element.value,this.previousElementSelection={start:n,end:i},this.keyEventMatchesAutoSwitchKeys(e)){var r=e.keyCode===Le;if(!r)return e.preventDefault(),void this.switchDateSegment(1);var o=this.selection,a=o.start,s=o.end;if(e.shiftKey&&r?this.switchDateSegment(-1):this.switchDateSegment(1),a!==this.selection.start||s!==this.selection.end)return void e.preventDefault()}var l=this.currentFormat[this.selection.start],c=this.getStepFromSymbol(l),d=!1;if(!(e.altKey||e.ctrlKey||e.metaKey||e.keyCode===Le)){switch(e.keyCode){case Oe:this.switchDateSegment(-1),d=!0,this.switchedPartOnPreviousKeyAction=!1;break;case Ne:this.modifyDateSegmentValue(c,l,event),d=!0,this.switchedPartOnPreviousKeyAction=!1;break;case We:this.switchDateSegment(1),d=!0,this.switchedPartOnPreviousKeyAction=!1;break;case Ue:this.modifyDateSegmentValue(-c,l,event),d=!0,this.switchedPartOnPreviousKeyAction=!1;break;case Ve:break;case qe:this.selectNearestSegment(0),d=!0,this.switchedPartOnPreviousKeyAction=!1,this.resetSegmentValue=!0;break;case je:this.selectNearestSegment(this.elementValue.length),d=!0,this.switchedPartOnPreviousKeyAction=!1,this.resetSegmentValue=!0;break;default:return}d&&e.preventDefault()}}},t.prototype.onElementPaste=function(){this.isPasteInProgress=!0},t.prototype.onElementMouseWheel=function(e){if(this.options.enableMouseWheel&&!this.triggerMouseWheel({event:e})&&this.isActive){var t=e;t.shiftKey?this.switchDateSegment((t.wheelDelta||-t.detail)>0?-1:1):this.modifyDateSegmentValue((t.wheelDelta||-t.detail)>0?1:-1),t.returnValue=!1,t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation()}},t.prototype.updateOnPaste=function(e){var t=this.intl.parseDate(this.elementValue,this.inputFormat)||this.value;Te(t)&&this.dateObject.shouldNormalizeCentury()&&(t=this.dateObject.normalizeCentury(t));var n=this.dateObject&&this.dateObject.getValue();this.writeValue(t),this.tryTriggerValueChange({oldValue:n,event:e})},Object.defineProperty(t.prototype,"elementValue",{get:function(){return(this.element||{}).value||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.inputFormat:_e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"displayFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.displayFormat:_e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selection",{get:function(){var e={start:0,end:0};return null!==this.element&&void 0!==this.element.selectionStart&&(e={start:this.element.selectionStart,end:this.element.selectionEnd}),e},enumerable:!0,configurable:!0}),t.prototype.setSelection=function(e){this.element&&document.activeElement===this.element&&(this.element.setSelectionRange(e.start,e.end),e.start!==e.end&&(this.interactionMode=pe.Selection))},t.prototype.selectionBySymbol=function(e){for(var t=-1,n=0,i=0;i=0;n++,i--){if(n=0&&this.currentFormat[i]!==ge){t=this.selectionBySymbol(this.currentFormat[i]);break}}return t},t.prototype.switchDateSegment=function(e){var t=this.selection;if(this.isInCaretMode()){var n=t.start,i=this.currentFormat[n-1],r="",o="";if(e<0){for(var a=n+e;a>=0;a--)if((o=this.currentFormat[a])!==ge&&o!==i){n=a,r=o;break}}else for(a=n+e;a0?l:c-1)),this.resetSegmentValue=!0,void(this.interactionMode=pe.None);for(var d=this.currentFormat[l],u=l+e;u>0&&u=0&&hh&&(h+1!==l||u+1!==c)?(this.setSelection({start:h+1,end:u+1}),this.resetSegmentValue=!0):u=0;t++,n--){if(t=0&&"_"!==this.currentFormat[n])return void this.selectDateSegment(this.currentFormat[n])}},t.prototype.selectDateSegment=function(e){for(var t=-1,n=0,i=0;i=0||t.indexOf(e.keyCode)>=0||t.indexOf(e.key.toLowerCase().trim())>=0},t}(Ke);window.kendo.jQuery,kendo.ui.DateInputCommon=pt;kendo;!function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o=i.DateInputCommon,a=".kendoDateInput",s={}.toString,l=e.isPlainObject,c="k-focus",d="k-disabled",u="k-invalid",h="disabled",p="readonly",f="change",m=n.Class.extend({init:function(e){var t=e.culture?n.getCulture(e.culture):n.culture();this.messages=e.messages,this.cldr={},this.cldr[t.name]={name:t.name,calendar:t.calendar||{},numbers:t.numberFormat}},parseDate:function(e,t,i){return n.parseDate(e,t,i)},formatDate:function(e,t,i){return n.toString(e,t,i)},splitDateFormat:function(e){return n.date.splitDateFormat(e)},dateFormatNames:function(e,t){return n.date.dateFormatNames(t)},dateFieldName:function(e){return this.messages[e.type]||{}}});function g(){var e=n.culture(),t=[];return t.push(e.calendars.standard["/"]),t.push(e.calendars.standard[":"]),t}function v(e,t){return e&&n.getCulture(e).calendars.standard.patterns[t]||t}var _=r.extend({init:function(t,i){var s=this;r.fn.init.call(s,t,i),t=s.element,(i=s.options).format=n._extractFormat(i.format||n.getCulture(i.culture).calendars.standard.patterns.d),i.min=n.parseDate(t.attr("min"))||n.parseDate(i.min),i.max=n.parseDate(t.attr("max"))||n.parseDate(i.max);var l=t.parent().attr("class")||"",d=l.indexOf("picker")>=0&&l.indexOf("rangepicker")<0,u=s.options.value||t.val();d?s.wrapper=s.element.parent():(s.wrapper=t.wrap("").parent(),s.wrapper.addClass(t[0].className).removeClass("input-validation-error")),s.wrapper[0].style.cssText=t[0].style.cssText,t.css({height:t[0].style.height}),s._validationIcon=e(n.ui.icon({icon:"exclamation-circle",iconClass:"k-input-validation-icon k-hidden"})).insertAfter(t),s._form(),s.dateInputInstance=new o(t[0],{format:v(i.culture,i.format),autoCorrectParts:i.autoCorrectParts,autoSwitchKeys:i.autoSwitchKeys.length?i.autoSwitchKeys:g(),enableMouseWheel:i.enableMouseWheel,twoDigitYearMax:i.twoDigitYearMax,steps:i.steps,formatPlaceholder:i.messages,events:{inputEnd:function(e){e.error&&s._blinkInvalidState()},keydown:function(e){e.event.keyCode!=n.keys.UP&&e.event.keyCode!=n.keys.DOWN||setTimeout((function(){s.element.trigger(f)}))},blur:function(e){s._change(),e.preventDefault()}},intlService:new m({culture:i.culture,messages:s.options.messages}),autoSwitchParts:i.autoSwitchParts}),s._emptyMask=this.element.val(),i.value&&s.value(i.value),s.element.addClass("k-input-inner").attr("autocomplete","off").on("focus"+a,(function(){s.wrapper.addClass(c)})).on("focusout"+a,(function(){s.wrapper.removeClass(c)}));try{t[0].setAttribute("type","text")}catch(e){t[0].type="text"}t.is("[disabled]")||e(s.element).parents("fieldset").is(":disabled")?s.enable(!1):s.readonly(t.is("[readonly]")),s.value(u),d||s._applyCssClasses(),i.label&&s._label(),n.notify(s)},options:{name:"DateInput",autoCorrectParts:!0,autoSwitchKeys:[],autoSwitchParts:!1,enableMouseWheel:!0,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",milliseconds:"milliseconds",dayperiod:"AM/PM"},size:"medium",steps:{year:1,month:1,day:1,hour:1,minute:1,second:1,millisecond:1},fillMode:"solid",rounded:"medium",label:null},events:[f],min:function(e){if(e===t)return this.options.min;this.options.min=e},max:function(e){if(e===t)return this.options.max;this.options.max=e},setOptions:function(e){var t=this;r.fn.setOptions.call(t,e),t.dateInputInstance.destroy(),t.dateInputInstance=null,t.dateInputInstance=new o(this.element[0],{format:v(t.options.culture,t.options.format),autoSwitchKeys:t.options.autoSwitchKeys.length?t.options.autoSwitchKeys:g(),autoCorrectParts:t.options.autoCorrectParts,enableMouseWheel:t.options.enableMouseWheel,steps:t.options.steps,twoDigitYearMax:t.options.twoDigitYearMax,formatPlaceholder:t.options.messages,events:{inputEnd:function(e){e.error&&t._blinkInvalidState()},keydown:function(e){e.event.keyCode!=n.keys.UP&&e.event.keyCode!=n.keys.DOWN||setTimeout((function(){t.element.trigger(f)}))},blur:function(e){t._change(),e.preventDefault()}},intlService:new m({culture:t.options.culture,messages:t.options.messages}),autoSwitchParts:t.options.autoSwitchParts})},destroy:function(){var e=this;e.element.off(a),e.dateInputInstance.destroy(),e._formElement&&e._formElement.off("reset",e._resetHandler),e.label&&e.label.destroy(),e._validationIcon&&e._validationIcon.remove(),r.fn.destroy.call(e)},value:function(e){if(e===t)return this.dateInputInstance.value;null===e&&(e=""),"[object Date]"!==s.call(e)&&(e=n.parseDate(e,this.options.format,this.options.culture)),e&&!e.getTime()&&(e=null),this.dateInputInstance.writeValue(e),this.label&&this.label.floatingLabel&&this.label.floatingLabel.refresh()},_hasDateInput:function(){return this._emptyMask!==this.element.val()},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e=e===t||e)},_label:function(){var t=this,i=this,r=i.options,o=l(r.label)?r.label:{content:r.label};i.label=new n.ui.Label(null,e.extend({},o,{widget:i,floatCheck:function(){return!i.value()&&!i._hasDateInput()&&document.activeElement!==i.element[0]&&(t.element.val(""),!0)}})),i._inputLabel=i.label.element},_bindInput:function(){var e=this;e.element.on("focus"+a,(function(){e.wrapper.addClass(c)})).on("focusout"+a,(function(){e.wrapper.removeClass(c)}))},_unbindInput:function(){this.element.off("focus"+a).off("focusout"+a)},_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,o=t.wrapper;t._unbindInput(),r||i?(i&&(o.addClass(d),n.attr(h,i),n&&n.length&&n[0].removeAttribute(p)),r&&n.attr(p,r)):(o.removeClass(d),n&&n.length&&(n[0].removeAttribute(h),n[0].removeAttribute(p)),t._bindInput())},_change:function(){var e=this,t=e._oldValue,n=e.value();n&&e.min()&&ne.max()&&(e.value(e.max()),n=e.value()),(t&&n&&n.getTime()!==t.getTime()||t&&!n||!t&&n)&&(e._oldValue=n,e.trigger(f),e.element.trigger(f))},_blinkInvalidState:function(){var e=this;e._addInvalidState(),clearTimeout(e._invalidStateTimeout),e._invalidStateTimeout=setTimeout(e._removeInvalidState.bind(e),100)},_addInvalidState:function(){this.wrapper.addClass(u),this._validationIcon.removeClass("k-hidden")},_removeInvalidState:function(){var e=this;e.wrapper.removeClass(u),e._validationIcon.addClass("k-hidden"),e._invalidStateTimeout=null},_form:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form"),o=n[0].value;!o&&t.options.value&&(o=t.options.value),r[0]&&(t._resetHandler=function(){setTimeout((function(){t.value(o)}))},t._formElement=r.on("reset",t._resetHandler))},_paste:function(e){e.preventDefault()}});n.cssProperties.registerPrefix("DateInput","k-input-"),n.cssProperties.registerValues("DateInput",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),i.plugin(_)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=n.html,o=n.mediaQuery,a=i.Widget,s=n.parseDate,l=n.keys,c=n.support,d=n.template,u=n._activeElement,h="
      ",p=".kendoDatePicker",f="click"+p,m=c.mouseAndTouchPresent?n.applyEventMap("up",p.slice(1)):f,g="open",v="close",_="change",b="disabled",w="readonly",y="k-focus",k="k-selected",x="k-disabled",C="mousedown"+p,S="navigate",T="id",D="month",I="aria-disabled",z="aria-readonly",M="aria-expanded",E="aria-hidden",A="aria-activedescendant",H=n.calendar,R=H.isInRange,F=H.restrictValue,P=H.isEqualDatePart,B=e.extend,L=Date;function V(t){var n=t.parseFormats,i=t.format;H.normalize(t),(n=Array.isArray(n)?n:[n]).length||n.push("yyyy-MM-dd"),-1===e.inArray(i,n)&&n.splice(0,0,t.format),t.parseFormats=n}function O(e){e.preventDefault()}var N=function(t){var r,a=this,s=document.body,l=e(h).attr(E,"true").addClass("k-calendar-container");a.options=t=t||{},r=t.id,a.bigScreenMQL=o("large"),a.smallScreenMQL=o("small"),"auto"==t.adaptiveMode&&a.smallScreenMQL.onChange((function(){a.popup&&n.isFunction(a.popup.fullscreen)&&a.popup.fullscreen(a.smallScreenMQL.mediaQueryList.matches)})),t.omitPopup?l=t.dateDiv:(l.appendTo(s),"auto"!=t.adaptiveMode||a.bigScreenMQL.mediaQueryList.matches?a.popup=new i.Popup(l,B(t.popup,t,{name:"Popup",isRtl:n.support.isRtl(t.anchor)})):a.popup=new i.ActionSheet(l,{adaptive:!0,title:"Set dates",subtitle:"DD / MM / YY",closeButton:!0,focusOnActivate:!1,fullscreen:a.smallScreenMQL.mediaQueryList.matches,popup:B(t.popup,t,{name:"Popup",isRtl:n.support.isRtl(t.anchor)})})),r&&(r+="_dateview",l.attr(T,r),a._dateViewID=r),a.div=l,a.value(t.value)};N.prototype={_calendar:function(){var t,r=this,o=r.calendar,a=r.options;if(!o){var s="auto"!=a.adaptiveMode||this.bigScreenMQL.mediaQueryList.matches?this.options.size:"large";t=e(h).attr(T,n.guid()).appendTo(a.omitPopup?a.dateDiv:r.popup._content||r.popup.element).on(C,O).on(f,"td:has(.k-link)",r._click.bind(r)),r.calendar=o=new i.Calendar(t,{componentType:a.componentType,size:s,messages:a.messages}),r._setOptions(a),t.addClass(n.getValidCssClass("k-calendar-","size",s)),o.navigate(r._value||r._current,a.start),r.value(r._value)}},_setOptions:function(e){this.calendar.setOptions({focusOnNav:!1,change:e.change,culture:e.culture,dates:e.dates,depth:e.depth,footer:e.footer,format:e.format,max:e.max,min:e.min,month:e.month,weekNumber:e.weekNumber,start:e.start,messages:e.messages,disableDates:e.disableDates})},setOptions:function(e){var t=this,n=t.options,i=e.disableDates;i&&(e.disableDates=H.disabled(i)),t.options=B(n,e,{change:n.change,close:n.close,open:n.open}),t.calendar&&t._setOptions(t.options)},destroy:function(){var e=this;this.popup&&this.popup.destroy(),e.bigScreenMQL&&(e.bigScreenMQL.destroy(),e.bigScreenMQL=null),e.smallScreenMQL&&(e.smallScreenMQL.destroy(),e.smallScreenMQL=null)},open:function(){var e,t=this;t._calendar(),e=t.popup._hovered,t.popup._hovered=!0,t.popup.open(),setTimeout((function(){t.popup._hovered=e}),1)},close:function(){this.popup&&this.popup.close()},min:function(e){this._option("min",e)},max:function(e){this._option("max",e)},toggle:function(){this[this.popup.visible()?v:g]()},move:function(e){var t=this,n=e.keyCode,i=t.calendar,r=e.ctrlKey&&n==l.DOWN||n==l.ENTER,o=!1;if(e.altKey)n==l.DOWN?(t.open(),e.preventDefault(),o=!0):n==l.UP&&(t.close(),e.preventDefault(),o=!0);else if(t.popup&&t.popup.visible()){if(n==l.ESC||r&&i._cell.hasClass(k))return t.close(),e.preventDefault(),!0;n!=l.SPACEBAR&&(t._current=i._move(e)),o=!0}return o},current:function(e){this._current=e,this.calendar&&this.calendar._focus(e)},value:function(e){var t=this,n=t.calendar,i=t.options,r=i.disableDates;r&&r(e)&&(e=null),t._value=e,t._current=new L(+F(e,i.min,i.max)),n&&n.value(e)},_click:function(e){-1!==e.currentTarget.className.indexOf(k)&&(this.calendar.trigger("change"),this.close())},_option:function(e,t){var n=this.calendar;this.options[e]=t,n&&n[e](t)}},N.normalize=V,n.DateView=N;var W=a.extend({init:function(i,r){var l,c=this;a.fn.init.call(c,i,r),i=c.element,(r=c.options).disableDates=n.calendar.disabled(r.disableDates),r.min=s(i.attr("min"))||s(r.min),r.max=s(i.attr("max"))||s(r.max),c.options.readonly=r.readonly!==t?r.readonly:Boolean(c.element.attr("readonly")),c.options.enable=r.enable!==t?r.enable:!Boolean(i.is("[disabled]")||e(i).parents("fieldset").is(":disabled")),V(r),c._initialOptions=B({},r),c._wrapper(),c._createDateView(),c._createDateViewProxy=c._createDateView.bind(c),c.bigScreenMQL=o("large"),"auto"==c.options.adaptiveMode&&c.bigScreenMQL.onChange((function(){c._createDateViewProxy(),c.dateView.value(c._value)})),c._icon();try{i[0].setAttribute("type","text")}catch(e){i[0].type="text"}i.addClass("k-input-inner").attr({role:"combobox","aria-expanded":!1,"aria-haspopup":"grid","aria-controls":c.dateView._dateViewID,autocomplete:"off"}),c._reset(),c._template(),!c.options.enable?c.enable(!1):c.readonly(i.is("[readonly]")),l=s(r.value||c.element.val(),r.parseFormats,r.culture),c._createDateInput(r),c._old=c._update(l||c.element.val()),c._oldText=i.val(),c._applyCssClasses(),r.label&&c._label(),n.notify(c)},events:[g,v,_],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:D,depth:D,animation:{},month:{},dates:[],disableDates:null,ARIATemplate:function(e){return"Current focused "+e.valueType+" is "+e.text},dateInput:!1,weekNumber:!1,messages:{weekColumnHeader:""},componentType:"classic",adaptiveMode:"none",size:"medium",fillMode:"solid",rounded:"medium",label:null},_createDateView:function(){var e,t=this,n=t.options,i=t.element;t.dateView&&(t.dateView.destroy(),t.dateView=null),t.dateView=new N(B({},n,{id:i.attr(T),anchor:t.wrapper,change:function(){t._change(this.value()),t.close()},close:function(n){t.trigger(v)?n.preventDefault():(i.attr(M,!1),e.attr(E,!0),setTimeout((function(){i.removeAttr("aria-activedescendant")})))},open:function(n){var r,o=t.options;t.trigger(g)?n.preventDefault():(t.element.val()!==t._oldText&&(r=s(i.val(),o.parseFormats,o.culture),t.dateView[r?"current":"value"](r)),i.attr(M,!0),e.attr(E,!1),t._updateARIA(r))}})),e=t.dateView.div},setOptions:function(e){var i=this,r=i._value;a.fn.setOptions.call(i,e),(e=i.options).min=s(e.min),e.max=s(e.max),V(e),i._dateIcon.off(p),i._dateIcon.remove(),i.dateView.setOptions(e),i._icon(),i._editable({readonly:e.readonly===t?i.options.readonly:e.readonly,disable:!(e.enable===t?i.options.enable:e.enable)}),i._createDateInput(e),i._dateInput||i.element.val(n.toString(r,e.format,e.culture)),r&&i._updateARIA(r),e.label&&i._inputLabel?i.label.setOptions(e.label):!1===e.label?(i.label._unwrapFloating(),i._inputLabel.remove(),delete i._inputLabel):e.label&&i._label()},_editable:function(e){var t=this,n=t._dateIcon.off(p),i=t.element.off(p),r=t.wrapper.off(p),o=e.readonly,a=e.disable;o||a?(r.addClass(a?x:"").removeClass(a?"":x),i.attr(b,a).attr(w,o).attr(I,a).attr(z,o)):(r.removeClass(x).on("mouseenter.kendoDatePicker mouseleave.kendoDatePicker",t._toggleHover),i&&i.length&&(i[0].removeAttribute(b),i[0].removeAttribute(w)),i.attr(I,!1).attr(z,!1).on("keydown"+p,t._keydown.bind(t)).on("focusout"+p,t._blur.bind(t)).on("focus"+p,(function(){t.wrapper.addClass(y)})),n.on(m,t._click.bind(t)).on(C,O))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this._dateInput&&this._dateInput._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this._dateInput&&this._dateInput._editable({readonly:!1,disable:!(e=e===t||e)}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e=e===t||e)},_label:function(){var t=this,i=t.options,r=e.isPlainObject(i.label)?i.label:{content:i.label};t._dateInput&&(r.floatCheck=function(){return!t.value()&&!t._dateInput._hasDateInput()&&document.activeElement!==t.element[0]&&(t.element.val(""),!0)}),t.label=new n.ui.Label(null,e.extend({},r,{widget:t})),t._inputLabel=t.label.element},destroy:function(){var e=this;e.label&&e.label.destroy(),a.fn.destroy.call(e),e.dateView.calendar&&e._navigateCalendarHandler&&(e.dateView.calendar.unbind(S,e._navigateCalendarHandler),e._navigateCalendarHandler=null),e.dateView.destroy(),e.element.off(p),e._dateIcon.off(p),e._form&&e._form.off("reset",e._resetHandler),e.bigScreenMQL&&e.bigScreenMQL.destroy(),e._createDateViewProxy=null},open:function(){this.dateView.open(),this._navigateCalendar()},close:function(){this.dateView.close()},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},value:function(e){var n=this;if(e===t)return n._value;n._old=n._update(e),null===n._old&&(n._dateInput?n._dateInput.value(n._old):n.element.val("")),n._oldText=n.element.val(),n.label&&n.label.floatingLabel&&n.label.floatingLabel.refresh()},_toggleHover:function(t){e(t.currentTarget).toggleClass("k-hover","mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&(e._change(t),t||e.dateView.current(n.calendar.getToday())),e.wrapper.removeClass(y)},_click:function(e){var t=this;t.dateView.toggle(),t._navigateCalendar(),t._focusElement(e.type)},_focusElement:function(e){var t=this.element;c.touch&&(!c.mouseAndTouchPresent||(e||"").match(/touch/i))||t[0]===u()||t.trigger("focus")},_change:function(e){var t,i=this,r=i.element.val();e=i._update(e);var o=(t=!n.calendar.isEqualDate(i._old,e))&&!i._typing,a=r!==i.element.val();(o||a)&&i.element.trigger(_),t&&(i._old=e,i._oldText=i.element.val(),i.trigger(_)),i._typing=!1},_keydown:function(e){var t=this,n=t.dateView,i=t.element.val(),r=!1;n.popup.visible()||e.keyCode!=l.ENTER||i===t._oldText?(r=n.move(e),t._updateARIA(n._current),r?t._dateInput&&e.stopImmediatePropagation&&e.stopImmediatePropagation():t._typing=!0):t._change(i)},_icon:function(){var t,n=this,i=n.element,o=n.options;(t=i.next("button.k-input-button"))[0]||(t=e(r.renderButton('',{icon:"calendar",size:o.size,fillMode:o.fillMode,shape:"none",rounded:"none"})).insertAfter(i)),n._dateIcon=t.attr({role:"button"})},_setCalendarAttribute:function(){var e=this;setTimeout((function(){e.element.attr(A,e.dateView.calendar._table.attr(A))}))},_navigateCalendar:function(){var e=this;e._navigateCalendarHandler||(e._navigateCalendarHandler=e._setCalendarAttribute.bind(e)),e.dateView.calendar&&e.dateView.calendar.unbind(S,e._navigateCalendarHandler).bind(S,e._navigateCalendarHandler)},_option:function(e,n){var i=this.options;if(n===t)return i[e];(n=s(n,i.parseFormats,i.culture))&&(i[e]=new L(+n),this.dateView[e](n))},_update:function(e){var t,i=this,r=i.options,o=r.min,a=r.max,l=i._value,c=s(e,r.parseFormats,r.culture),d=null===c&&null===l||c instanceof Date&&l instanceof Date;return r.disableDates(c)&&(c=null,i._old||i.element.val()||(e=null)),+c==+l&&d?((t=n.toString(c,r.format,r.culture))===e||i._dateInput&&!c||i.element.val(null===c?e:t),c):(null!==c&&P(c,o)?c=F(c,o,a):R(c,o,a)||(c=null),i._value=c,i.dateView.value(c),i._dateInput&&c?i._dateInput.value(c||e):i.element.val(n.toString(c||e,r.format,r.culture)),i._updateARIA(c),c)},_wrapper:function(){var e,t=this.element;(e=t.parents(".k-datepicker"))[0]||(e=t.wrap("").parent()),e[0].style.cssText=t[0].style.cssText,t.css({height:t[0].style.height}),this.wrapper=e.addClass("k-datepicker k-input").addClass(t[0].className).removeClass("input-validation-error")},_reset:function(){var t=this,i=t.element,r=i.attr("form"),o=t.options,a=o.disableDates,s=o.parseFormats.length?o.parseFormats:null,l=t._initialOptions.value,c=r?e("#"+r):i.closest("form"),d=i[0].defaultValue;l&&a&&a(l)&&(l=null),d&&n.parseDate(d,s,o.culture)||!l||i.attr("value",n.toString(l,o.format,o.culture)),c[0]&&(t._resetHandler=function(){t.value(l||i[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=c.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=d(this.options.ARIATemplate).bind(this)},_createDateInput:function(e){this._dateInput&&(this._dateInput.destroy(),this._dateInput=null),e.dateInput&&(this._dateInput=new i.DateInput(this.element,{culture:e.culture,format:e.format,size:e.size,fillMode:e.fillMode,rounded:e.rounded,min:e.min,max:e.max,messages:e.messages.dateInput}))},_updateARIA:function(e){var t=this,n=t.dateView.calendar;t.element&&t.element.length&&t.element[0].removeAttribute(A),n&&t.element.attr(A,n._updateAria(t._ariaTemplate,e))}});n.cssProperties.registerPrefix("DatePicker","k-input-"),n.cssProperties.registerValues("DatePicker",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),i.plugin(W)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Widget,r=".kendoDrawer",o="k-focus",a=n.keys,s="push",l="overlay",c="left",d=n.ui.Widget.extend({init:function(t,r){var o,a=this;i.fn.init.call(this,t,r),r=a.options,a._element(t),a._wrapper(t),a._navigatable(),a.position(),a._mode(),r.mini&&a._miniMode(),a._initDrawerItems(),r.mini&&r.mode!=s&&a._setBodyOffset(),o=this.userEvents=new n.UserEvents(r.mode!=s?e(document.body):this.drawerContainer,{fastTap:!0,allowSelection:!0}),a.tap=function(t){e.contains(a.drawerItemsWrapper[0],t.event.target)&&a._itemClick(t),r.autoCollapse&&a.visible&&!a.trigger("hide",{sender:this})&&(a.hide(),t.preventDefault())},this.options.swipeToOpen?(o.bind("start",(function(e){a._start(e)})),o.bind("move",(function(e){a._update(e)})),o.bind("end",(function(e){a._end(e)})),o.bind("tap",a.tap)):o.bind("press",a.tap),r.minHeight&&r.mode==s&&a.drawerContainer.css("min-height",r.minHeight)},_element:function(){var t=this,n=t.element,i=t.options;t.contentElement=n.children().wrapAll("
      ").parent(),t.drawerElement=e(i.template),n.addClass("k-widget k-drawer")},_navigatable:function(){var e=this,t=e.element;t.find("[data-role='drawer-item']").first().parent().attr("role","menu").attr("aria-orientation","vertical"),this.options.navigatable&&t.attr("tabIndex",0).on("focus"+r,e._focus.bind(e)).on("focusout"+r,e._blur.bind(e)).on("keydown"+r,e,e._keyDown.bind(e))},_blur:function(){this._current&&this._current.removeClass(o)},_focus:function(){var e=this;e._setCurrent(e._current?e._current:e.drawerItemsWrapper.find("[data-role='drawer-item']").eq(0))},_setCurrent:function(t){var i=this,r=n.guid(),a=e(t);i._current&&(e(i._current).removeClass(o).removeAttr("id"),i.element.removeAttr("aria-activedescendant")),a.attr("id",r).addClass(o),i.element.attr("aria-activedescendant",r),i._current=a},_keyDown:function(t){var n,i=this,r=!1,o=i._current;t.keyCode==a.UP&&(r=!0,(n=o.prevAll("[data-role='drawer-item']").first()).length?i._setCurrent(n):i._setCurrent(o.parent().find("[data-role='drawer-item']").last())),t.keyCode==a.DOWN&&(r=!0,(n=o.nextAll("[data-role='drawer-item']").first()).length?i._setCurrent(n):i._setCurrent(o.parent().find("[data-role='drawer-item']").first())),t.keyCode==a.HOME&&(r=!0,i._setCurrent(i.drawerItemsWrapper.find("[data-role='drawer-item']").eq(0))),t.keyCode==a.END&&(r=!0,i._setCurrent(i.drawerItemsWrapper.find("[data-role='drawer-item']").last())),t.keyCode!=a.SPACEBAR&&t.keyCode!=a.ENTER||(r=!0,i.tap({event:{target:o[0]},preventDefault:e.noop})),t.keyCode==a.ESC&&(r=!0,i.hide()),r&&t.preventDefault()},_wrapper:function(){var t=this.options,n=this.drawerElement,i=this.element,r=this.contentElement,o=this.drawerItemsWrapper=n.wrapAll("
      ").parent(),a=this.drawerWrapper=o.wrap("
      ").parent(),c=this.drawerContainer=i.wrap("
      ").parent();t.mini?t.mini.width&&a.width(t.mini.width):a.width(0),t.mode===s?c.append(r):t.mode===l&&(c.after(r),e(document.body).prepend(c)),i.append(a)},_setBodyOffset:function(){var t=this.element.outerWidth();this.leftPositioned?e(document.body).css("padding-left",t):e(document.body).css("padding-right",t)},_initDrawerItems:function(){var e=this.drawerItemsWrapper,t=e.find("[data-role='drawer-item']"),n=e.find("[data-role='drawer-separator']");t.addClass("k-drawer-item").attr("role","menuitem"),n.addClass("k-drawer-item k-drawer-separator").attr("role","separator"),t.each((function(e,t){t.setAttribute("aria-label",t.textContent.trim())})),this._selectedItemIndex>=0&&(t.removeClass("k-selected"),t.eq(this._selectedItemIndex).addClass("k-selected"))},_mode:function(){var t,n=this.options,i=this.drawerContainer;n.mode==s?i.addClass("k-drawer-push"):(i.addClass("k-drawer-overlay"),(t=this.overlayContainer=e('
      ')).hide(),i.prepend(t))},_miniMode:function(){var t=this.options,n=this.drawerContainer,i=t.mini.width,r=this._miniTemplate=t.mini.template&&e(t.mini.template),o=this.drawerItemsWrapper,a=this.drawerWrapper;n.addClass("k-drawer-mini"),r&&o.html(r),i&&a.width(i),this.minWidth=t.mini.width||this.drawerWrapper.width()},show:function(){var e=this.drawerWrapper,t=this.drawerContainer,n=this.options,i=t.hasClass("k-drawer-expanded"),r=this._miniTemplate,o=this.drawerElement,a=this.drawerItemsWrapper;i||(t.addClass("k-drawer-expanded"),this.visible=!0),r&&(a.html(o),this._initDrawerItems(),this._selectItem()),e.width(n.width),n.mini&&t.removeClass("k-drawer-mini"),n.mode===l&&(this.overlayContainer.show(),this.visible=!0)},hide:function(){var e=this,t=e.drawerWrapper,n=e.drawerContainer,i=this.options,r=this.drawerItemsWrapper,o=this._miniTemplate,a=i.mini&&i.mini.width;this._miniTemplate&&(r.html(o),e._initDrawerItems(),this._selectItem()),i.mini?(n.addClass("k-drawer-mini"),a?t.width(a):t.width("")):t.width(0),this.visible&&(n.removeClass("k-drawer-expanded"),this.visible=!1),i.mode===l&&this.overlayContainer.hide()},position:function(e){var t=this,n=t.options,i=e||n.position;"right"==i?(t.element.removeClass("k-drawer-start"),t.element.addClass("k-drawer-end")):(t.element.removeClass("k-drawer-end"),t.element.addClass("k-drawer-start")),this.leftPositioned=i===c},_start:function(e){var t=this.options,i=this.drawerWrapper,r=this.drawerItemsWrapper,o=e.sender;Math.abs(e.x.velocity)n.width/2,o=.8;i.css("transition","all .3s ease-out"),(this.leftPositioned?t>-.8&&(t>o||r):t0?n=e(t.event.target).find(".k-drawer-item"):e(t.event.target).closest(".k-drawer-item").length>0?n=e(t.event.target).closest(".k-drawer-item"):e(t.event.target).hasClass(".k-drawer-item")&&(n=e(t.event.target)),i.drawerItemsWrapper.find(".k-drawer-item").removeClass("k-selected"),i._selectItem(n),i.options.navigatable&&i._setCurrent(n)},destroy:function(){this.options.mode!=s&&(this.leftPositioned?e(document.body).css("padding-left",0):e(document.body).css("padding-right",0)),i.fn.destroy.call(this),this.userEvents.destroy(),n.destroy(this.element),this.element=this.drawerWrapper=this.drawerElement=this.drawerContainer=this.drawerItemsWrapper=this._miniTemplate=null},options:{name:"Drawer",autoCollapse:!0,position:c,mode:"overlay",swipeToOpen:!0,width:280,mini:!1,navigatable:!1,template:""},events:["hide","show","itemClick"]});n.ui.plugin(d)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.calendar,r=n.support,o=i.isInRange,a=i.toDateObject,s=i.createDate,l=i.isEqualDate,c=i.getToday,d=n.keys,u=n.ui,h=u.Widget,p=u.Selectable,f=n.template,m=r.mobileOS,g=".kendoMultiViewCalendar",v="click",_="id",b="month",w=".",y="century",k="change",x="navigate",C="value",S="k-focus",T="k-selected",D="k-range-mid",I="k-range-split-end",z="k-range-split-start",M="k-range-start",E="k-range-end",A="k-hover",H="k-disabled",R="k-calendar-nav-today",F="k-out-of-range",P="k-calendar-view",B="td:has(.k-link):not(.k-out-of-range)",L="td:has(.k-link):not(.k-disabled):not(.k-out-of-range)",V="blur",O="focus",N=r.touch?"touchstart":"mouseenter",W=r.touch?"touchend"+g+" touchmove"+g:"mouseleave"+g,U="_prevArrow",j="_nextArrow",q="range",G="single",K="multiple",Y="table",$="tbody",Q="thead",X="th",Z="role",J="none",ee="aria-selected",te="aria-disabled",ne="aria-label",ie="aria-activedescendant",re=Date,oe={month:0,year:1,decade:2,century:3},ae=h.extend({init:function(e,t){var i=this;h.fn.init.call(i,e,t),i.calendar=t.calendar,i.userEvents=new n.UserEvents(i.element,{global:!0,allowSelection:!0,filter:i.options.filter,tap:i._tap.bind(i),touchAction:J})},events:[k],options:{name:"RangeSelectable",filter:">*",inputSelectors:"input,a,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-caret-alt-down,span.k-icon.k-i-caret-alt-up,span.k-svg-icon.k-svg-i-caret-alt-down,span.k-svg-icon.k-svg-i-caret-alt-up",multiple:!1,dragToSelect:!0,relatedTarget:e.noop},destroy:function(){var e=this;h.fn.destroy.call(e),e.userEvents.destroy(),e.calendar=null,e._lastActive=e.element=e.userEvents=e._start=e._end=null},_allowSelection:function(t){return!e(t).is(this.options.inputSelectors)||(this.userEvents.cancel(),!1)},start:function(e){if(e===t)return this._start;e.addClass(M+" "+T).attr(ee,!0),this._start=e},end:function(e){if(e===t)return this._start;e.addClass(E+" "+T).attr(ee,!0),this._end=e},mid:function(t){var n=this.element.find("table.k-month");t.addClass(D).attr(ee,!0),n.each((function(){var t=e(this),n=t.find(L).last(),i=t.find(L).first();n.hasClass(D)&&n.addClass(I),i.hasClass(D)&&i.addClass(z)}))},clear:function(e){this.element.find(B).removeClass(E+" "+T+" "+M+" "+D+" "+I+" "+z).removeAttr(ee),e&&(this._start=this._end=null)},selectFrom:function(t){var n,i,r=this;n=r.element.find(B),i=e.inArray(e(t)[0],n),r.clear(),r.start(t),n=n.filter((function(e){return e>i})),r.mid(n)},selectTo:function(t){var n,i,r=this;n=r.element.find(B),i=e.inArray(e(t)[0],n),r.clear(),n=n.filter((function(e){return ea&&(s=i,i=n,n=s,s=o,o=a,a=s),l.clear(),n.addClass(M+" "+T).attr(ee,!0),l._start=n,r=r.filter((function(e){return e>o&&e+u)return d.clear(!0),d.start(o),d._clearFlags(),void d.trigger(k);if(l&&!c)return n=d.element.find(B),i=e.inArray(e(d._start)[0],n),r=e.inArray(e(o)[0],n),l&&(d._useStart=!0),n=n.filter((function(e){return e>i&&e0&&a<7&&o.children().not(X).first().hasClass(F)&&(o.find(X).removeAttr(Z),(r=n.eq(t-1)).attr(Z)&&r.attr(Z)!==J||(r=n.eq(t-2)),o.children().not(X).each((function(n,i){var r,o=e(i);o.hasClass(F)||(r="owned_"+t+"_"+n,o.attr(_,r),s.push(r))})),o.removeAttr(Z),r.attr("aria-owns",s.join(" ")))}))},_updateHeader:function(){var t,i,r,a,s=this,l=s._currentView,c=s._title,d=s._firstViewValue,u=s.options,h=s._visibleRange(),p=u.culture,f=u.min,m=u.max;"decade"===l.name||l.name===y?(t=ce(d,l.name,u.views-1),o(t,f,m)||(t=m),c.html(''+l.first(d).getFullYear()+" - "+l.last(t).getFullYear()+"")):c.html(''+l.title(d,f,m,p)+" - "+l.title(ce(d,l.name,u.views-1),f,m,p)+""),i=l.name===y,c.toggleClass(H,i).attr(te,i),r=l.compare(h.start,s.options.min)<1,a=l.compare(h.end,s.options.max)>-1,r&&a?s._navContainer&&(s._navContainer.remove(),s._navContainer=null):(s._navContainer||(s._navContainer=e(''+n.ui.icon({icon:"chevron-left",iconClass:"k-button-icon"})+''+n.ui.icon({icon:"chevron-right",iconClass:"k-button-icon"})+"").appendTo(s.header),s._prevArrow=s._navContainer.find(".k-calendar-prev-view"),s._nextArrow=s._navContainer.find(".k-calendar-next-view")),s._prevArrow.toggleClass(H,r).attr(te,r),s._prevArrow.hasClass(H)&&s._prevArrow.removeClass(A),s._nextArrow.toggleClass(H,a).attr(te,a),s._nextArrow.hasClass(H)&&s._nextArrow.removeClass(A))},_mouseEnter:function(t){var n,i,r=this,o=e(t.currentTarget);if(o.addClass(A),r.rangeSelectable&&r._currentView.name===b&&(n=r.selectRange()).start&&!n.end){if(r._dateInViews(r.selectRange().start)){if(i=r.element.find(r.rangeSelectable.options.filter),e.inArray(e(r.rangeSelectable._start)[0],i)>e.inArray(e(o)[0],i))return;r.rangeSelectable.range(r.rangeSelectable._start,o)}else+a(r.element.find(B).first().find("a"))>+n.start&&r.rangeSelectable.selectTo(o);r.rangeSelectable._end=null}},_move:function(i){var r,l,c,u,h,p,f=this,m=f.options,g=i.keyCode,v=f._index,_=m.min,y=m.max,C=f.element.find(".k-focus"),D=C.closest(Y),I=new re(+(f._current||a(C.find("a")))),z=n.support.isRtl(f.wrapper),M=!1;if(g==d.RIGHT&&!z||g==d.LEFT&&z?(r=1,l=!0):g==d.LEFT&&!z||g==d.RIGHT&&z?(r=-1,l=!0):g==d.UP?(r=0===v?-7:-4,l=!0):g==d.DOWN?(r=0===v?7:4,l=!0):g==d.SPACEBAR?(r=0,l=!0):g==d.HOME?(l=!0,(c=D.find(L).eq(0)).hasClass(S)?(D=D.prev()).length?f._focusCell(D.find(L).eq(0)):(M=f._prevArrow&&!f._prevArrow.hasClass(H),f._navigate(U,-1),f._focusCell(f.element.find(Y).first().find(L).first())):f._focusCell(c)):g==d.END?(l=!0,(c=D.find(L).last()).hasClass(S)?(D=D.next()).length?f._focusCell(D.find(L).last()):(M=f._nextArrow&&!f._nextArrow.hasClass(H),f._navigate(j,1),f._focusCell(f.element.find(Y).last().find(L).last())):f._focusCell(c)):84===g&&(f._todayClick(i),l=!0),i.ctrlKey||i.metaKey)g==d.RIGHT&&!z||g==d.LEFT&&z?(M=f._nextArrow&&!f._nextArrow.hasClass(H),f._navigate(j,1),l=!0):g==d.LEFT&&!z||g==d.RIGHT&&z?(M=f._prevArrow&&!f._prevArrow.hasClass(H),f._navigate(U,-1),l=!0):g==d.UP?(M=!f._title.hasClass(H),f.navigateUp(),f._focusCell(f._cellByDate(f._current)),l=!0):g==d.DOWN?(f._currentView.name===b?f.value(I):(f.navigateDown(I),f._focusCell(f._cellByDate(f._current)),M=!0),l=!0):g!=d.ENTER&&g!=d.SPACEBAR||m.selectable===K&&f._toggleSelection(i);else if(i.shiftKey&&m.selectable!==G){if(r!==t){if(f._currentView.setDate(I,r),f._currentView.name!==b)return;m.disableDates(I)&&(I=f._nextNavigatable(I,r)),_=s(_.getFullYear(),_.getMonth(),_.getDate()),o(I,_,y)&&(f._dateInViews(I)||(r>0?(M=f._nextArrow&&!f._nextArrow.hasClass(H),f._navigate(j,1)):(M=f._prevArrow&&!f._prevArrow.hasClass(H),f._navigate(U,-1))),c=f._cellByDate(I),f._current=I,f.selectable&&(f._selectRange(a((f.selectable._lastActive||C).find("a")),I),f.selectable._lastActive||(f.selectable._lastActive=C),f.trigger(k),f._focusCell(c)),f.rangeSelectable&&(u=a((f.rangeSelectable._lastActive||C).find("a")),f._dateInViews(u)?(f.rangeSelectable._end&&f.rangeSelectable._end.is(".k-focus")?f.rangeSelectable._lastActive=f.rangeSelectable._start:f.rangeSelectable._lastActive=f._cellByDate(u),f.rangeSelectable.range(f.rangeSelectable._lastActive,c)):+u>+I?(f.rangeSelectable._end=f.rangeSelectable._lastActive,f.rangeSelectable.selectFrom(c)):f.rangeSelectable.selectTo(c),f.rangeSelectable.change(),f._focusCell(c)))}}else g==d.ENTER||g==d.SPACEBAR?(f._currentView.name===b?(p=!C.hasClass(T)||f.element.find(w+T).length>1,f.value(I),f.selectable&&(f.selectable._lastActive=f._cellByDate(I),p&&f.selectable.trigger(k,{event:i})),f.rangeSelectable&&f.rangeSelectable.change()):f._click(e(f._cell[0].firstChild)),l=!0):g!=d.PAGEUP&&g!=d.PAGEDOWN||(l=!0,h=D.find(L).index(C),(D=g==d.PAGEUP?D.prev():D.next()).length||(g==d.PAGEUP?(M=f._prevArrow&&!f._prevArrow.hasClass(H),f.navigateToPast(),D=f.element.find(Y).first()):(M=f._nextArrow&&!f._nextArrow.hasClass(H),f.navigateToFuture(),D=f.element.find(Y).last())),(c=D.find(L).eq(h)).length?f._focusCell(c):f._focusCell(D.find(L).last())),r&&(f._currentView.setDate(I,r),_=s(_.getFullYear(),_.getMonth(),_.getDate()),o(I,_,y)&&(f.selectable&&m.disableDates(I)&&(I=f._nextNavigatable(I,r)),f._dateInViews(I)||(r>0?(M=f._nextArrow&&!f._nextArrow.hasClass(H),f._navigate(j,1)):(M=f._prevArrow&&!f._prevArrow.hasClass(H),f._navigate(j,-1))),c=f._cellByDate(I),f._current=I,f._focusCell(c)));return M&&f.trigger(x),l&&i.preventDefault(),f._current},_visualizeSelectedDatesInView:function(){var t,i=this,r={};e.each(i._selectDates,(function(e,t){r[n.calendar.views[0].toDateString(t)]=t})),i.selectable.clear(),(t=i.element.find(Y).find(B).filter((function(t,i){return r[e(i.firstChild).attr(n.attr(C))]}))).length>0&&i.selectable._selectElement(t,!0)},_nextNavigatable:function(e,t){var n=this,i=!0,r=n._currentView,a=n.options.min,s=n.options.max,l=n.options.disableDates,c=new Date(e.getTime());for(r.setDate(c,-t);i;){if(r.setDate(e,t),!o(e,a,s)){e=c;break}i=l(e)}return e},_toggleSelection:function(t){var n=this;n.selectable._lastActive=e(n._cell[0]),e(n._cell[0]).hasClass(T)?n.selectable._unselect(e(n._cell[0])):n.selectable.value(e(n._cell[0])),n.selectable.trigger(k,{event:t})},_option:function(e,i){var r=this,o=r.options,a=r._value||r._current;if(i===t)return o[e];(i=n.parseDate(i,o.format,o.culture))&&(o[e]=new re(+i),("min"===e?i>a:a>i)&&(r._value=null),r.navigate(r._value),r._toggle())},_cellByDate:function(t){return t instanceof Date&&(t=this._currentView.toDateString(t)),this.element.find(Y).find("td:not(.k-other-month)").filter((function(){return e(this.firstChild).attr(n.attr(C))===t}))},_selectable:function(){var e=this,t=e.options.selectable;e.selectable&&(e.selectable.destroy(),e.selectable=null),e.rangeSelectable&&(e.rangeSelectable.destroy(),e.rangeSelectable=null),t.toLowerCase()===q?e.rangeSelectable=new ae(e.wrapper,{calendar:e,filter:"table.k-month "+L,change:e._rangeSelection.bind(e)}):e.selectable=new p(e.wrapper,{aria:!0,dragToSelect:!1,inputSelectors:"input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-caret-alt-down,span.k-icon.k-i-caret-alt-up,span.k-svg-icon.k-svg-i-caret-alt-down,span.k-svg-icon.k-svg-i-caret-alt-up",multiple:p.parseOptions(t).multiple,filter:"table.k-content "+L,change:e._selection.bind(e),relatedTarget:e._onRelatedTarget.bind(e),unselect:e._unselecting.bind(e)})},_onRelatedTarget:function(e){this.selectable.options.multiple&&e.is(L)&&e.length>1&&this._focusCell(e.first(),!0)},_getFirstViewDate:function(e){var t,n,i,r=this,o=r.options,a=[],s=new Date(+r._current);for(i=0;i+o.max){+t<=+o.max&&a.push({start:t,end:new Date(+o.max)});break}a.push({start:t,end:n}),s=new Date(+ce(n,e.name,1))}for(s=new Date(+r._current),i=0;i=+o.min&&a.push({start:new Date(+o.min),end:n});break}a.push({start:t,end:n}),s=new Date(+ce(t,e.name,-1))}for(t=a[0].start,i=0;i+a[i].start&&(t=a[i].start);return new Date(+t)},_canRenderNextView:function(e){var t=e.getFullYear(),n=e.getMonth(),i=e.getDate(),r=this.options.max,o=r.getFullYear(),a=r.getMonth();return t=+n},_fillRange:function(e,t){var r,o=this;o._selectDates=[],r=function(e,t){if(+t<+e){var r=+e;i.views[0].setDate(e,t),i.views[0].setDate(t,new Date(r))}var o=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),a=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.ceil((+a-+o)/n.date.MS_PER_DAY)}(e,t),function(e,t,n,i){for(var r=0;r<=t;r++){var o=new Date(n.getTime());i(o=new Date(o.setDate(o.getDate()+r)))||e.push(o)}}(o._selectDates,r,e,o.options.disableDates)},_selectRange:function(e,t){var n;+t<+e&&(n=t,t=e,e=n),this._fillRange(e,t),this._visualizeSelectedDatesInView()},_header:function(){var t,i=this,r=i.element,o=r.find(".k-calendar-header");o.length||(o=e('").prependTo(r)),i.header=o,o.on(N+g+" "+W+" "+O+g+" "+V+g,".k-button",le).on(v,(function(){return!1})).on(v+g,".k-button.k-calendar-title",i._calendarTitleClick.bind(i)).on(v+g,".k-button.k-calendar-prev-view",i._prevViewClick.bind(i)).on(v+g,".k-button.k-calendar-next-view",i._nextViewClick.bind(i)),t=o.find(".k-button"),i._title=t.filter(".k-calendar-title"),i._navContainer=o.find(".k-calendar-nav"),i._prevArrow=t.filter(".k-calendar-prev-view"),i._nextArrow=t.filter(".k-calendar-next-view")},_calendarTitleClick:function(){this.navigateUp(),this.focus(),this.trigger(x)},_prevViewClick:function(e){e.preventDefault(),this.navigateToPast(),this.focus(),this.trigger(x)},_nextViewClick:function(e){e.preventDefault(),this.navigateToFuture(),this.focus(),this.trigger(x)},_wrapper:function(){this.tablesWrapper=e('
      ').insertAfter(this.element[0].firstChild)},_templates:function(){var e=this.options.month,t=e.content,i=e.weekNumber,r=e.empty;this.month={content:f((function(e){return''+(t?n.template(t,{useWithBlock:!!t})(e):e.value)+""}),{useWithBlock:!!t}),empty:f((function(e){return'":' class="k-calendar-td k-out-of-range">')+(r?n.template(r,{useWithBlock:!!r})(e):"")+""}),{useWithBlock:!!r}),weekNumber:f((function(e){return''+(i?n.template(i,{useWithBlock:!!i})(e):e.weekNumber)+""}),{useWithBlock:!!i})}},_footer:function(){var t=this,i=t.options,r=!1!==i.footer?n.template(t.options.footer||function(e){return n.toString(e,"D",i.culture)},{useWithBlock:!1}):null,o=c(),a=t.element,s=a.find(".k-footer");if(!r)return t._toggle(!1),void s.hide();s[0]||(s=e('').appendTo(a)),t._today=s.show().find(".k-button-flat-primary").attr("title",n.toString(o,"D",t.options.culture)),s.find(".k-button-text").html(r(o)),t._toggle()},_navigate:function(e,t){var n,r=this,o=r._index+1,a=new re(+r._current),s=new re(+r._current);e=r[e],n=r._cellByDate(a).closest(Y).index(),t>0?n=1-n:n+=1,e&&e.hasClass(H)||(o>3?a.setFullYear(a.getFullYear()+t*n*100):i.views[o].setDate(a,t*n),r.navigate(a),r._dateInViews(s)?(r._focusCell(r._cellByDate(s)),r._current=s):(o>3?s.setFullYear(s.getFullYear()+100*t):i.views[o].setDate(s,t),r._focusCell(r._cellByDate(s)),r._current=s))},_toggle:function(e){var n=this,i=n.options,r=i.selectable!==q&&n.options.disableDates(c()),a=n._today;e===t&&(e=o(c(),i.min,i.max)),a&&(a.off(v+g),e&&!r?a.addClass(R).removeClass(H).on(v+g,(function(e){n._todayClick(e),n.focus()})):a.removeClass(R).addClass(H).on(v+g,(function(e){e.preventDefault()})))},_click:function(e){var t=this,r=t.options,o=new Date(+t._current),s=a(e);n.date.adjustDST(s,0),t._currentView.setDate(o,s),t._current=s,t._currentView.name!==r.depth?(t.navigateDown(i.restrictValue(o,r.min,r.max)),t._focusCell(t._cellByDate(t._current)),t.trigger(x)):t._focusCell(e.closest("td")),t.focus()},_blur:function(){this._cell&&this._cell.removeClass(S)},_focus:function(){var t=this._cell;t&&e.contains(this.tablesWrapper[0],t[0])||(t=this._current&&this._dateInViews(this._current)?this._cellByDate(this._current):this.tablesWrapper.find(L).first()),this._focusCell(t)},_focusCell:function(e){var t=this,n=t._cellID;t._cell&&t._cell.length&&(t._cell[0].removeAttribute(ne),t._cell.removeClass(S),t.tablesWrapper.removeAttr(ie),t._cell.attr(_)===n&&t._cell[0].removeAttribute(_)),t._cell=e,e.attr(_)?t.tablesWrapper.attr(ie,e.attr(_)):n&&(e.attr(_,n),t.tablesWrapper.attr(ie,n)),e.addClass(S),e.length&&t._currentView.name==b&&(t._current=a(e.find("a")))},_todayClick:function(e){var t=this,n=t.options.disableDates,i=c(),r=!1;e.preventDefault(),n(i)||(t._value=i,t.options.selectable===K&&(t._selectDates=[i]),t.options.selectable===q&&(t.rangeSelectable.clear(!0),t._range={start:i,end:null}),t._currentView.name==b&&t._dateInViews(i)||(r=!0),t.navigate(i,t.options.depth),t.options.selectable===G&&(t.selectable._lastActive=null),r&&t.trigger(x),t.trigger(k))},_validateValue:function(e){var i=this,r=i.options,a=r.min,s=r.max;return null!==(e=n.parseDate(e,r.format,r.culture))&&(e=new re(+e),o(e,a,s)||(e=null)),null!==e&&i.options.disableDates(new Date(+e))?i._value===t&&(i._value=null):i._value=e,i._value},_updateAria:function(e,t){var i,r=this,o=r._cellByDate(t||r.current()),a=r.view().valueType(),s=t||r.current();return r._focusCell(o),i=a===b?n.toString(s,"MMMM"):"date"===a?n.toString(s,"D"):o.text(),o.attr(ne,e({current:s,valueType:a,text:i})),o.attr(_)},clearSelection:function(){var e=this;e.selectable&&e.element.find(w+T).removeClass(T).removeAttr(ee),e.rangeSelectable&&e.rangeSelectable.clear(!0)},_restoreSelection:function(){var e,t=this,n=t.options.selectable;if(t._currentView.name===t.options.depth){if(t._preventChange=!0,n===q){if(!(e=t.selectRange())||!e.start)return void(t._preventChange=!1);t.selectRange(e)}n===G&&t.value()&&t.selectable.value(t._cellByDate(t.value())),n===K&&t._visualizeSelectedDatesInView(),t._preventChange=!1}},value:function(e){var n,i=this;if(e===t)return i._value;e=i._validateValue(e),i.clearSelection(),e&&!i._dateInViews(e)&&i.navigate(e),null!==e&&i._currentView.name===b&&(n=i._cellByDate(e),i.selectable&&i.selectable.value(n),i.rangeSelectable&&(i.rangeSelectable.start(n),i.rangeSelectable._lastActive=n))},selectDates:function(n){var i,r,o=this;if(n===t)return o._selectDates;r=n.map((function(e){return e.getTime()})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return new Date(e)})),i=e.grep(r,(function(e){if(e)return+o._validateValue(new Date(e.setHours(0,0,0,0)))==+e})),o._selectDates=i.length>0?i:0===r.length?r:o._selectDates,o._visualizeSelectedDatesInView()},selectRange:function(e){var n,i,r,o=this;if(e===t)return o._range;o._range=e,e.start&&(r=o._visibleRange(),n=o._dateInViews(e.start),i=e.end&&o._dateInViews(e.end),!n&&i&&o.rangeSelectable.selectTo(o._cellByDate(e.end)),n&&i&&o.rangeSelectable.range(o._cellByDate(e.start),o._cellByDate(e.end)),e.end&&n&&!i&&o.rangeSelectable.selectFrom(o._cellByDate(e.start)),!e.end&&n&&o.rangeSelectable.start(o._cellByDate(e.start)),+r.start>+e.start&&+r.end<+e.end&&o.rangeSelectable.mid(o.element.find(L)))}});function le(t){e(this).hasClass("k-disabled")||e(this).toggleClass(A,N.indexOf(t.type)>-1||t.type==O)}function ce(e,t,n){var r;return t===b?((r=new re(e.getFullYear(),e.getMonth()+n,e.getDate())).setFullYear(e.getFullYear()),(Math.abs(r.getMonth()-e.getMonth())>n||n>10)&&(r.setMonth(e.getMonth()+n),r=i.views[0].last(r)),r):"year"===t?((r=new re(1,e.getMonth(),e.getDate())).setFullYear(e.getFullYear()+n),Math.abs(r.getFullYear()-e.getFullYear())>n&&((r=new re(1,e.getMonth(),1)).setFullYear(e.getFullYear()+n),r=i.views[1].last(r)),r):"decade"===t?((r=new re(1,e.getMonth(),e.getDate())).setFullYear(e.getFullYear()+10*n),Math.abs(r.getFullYear()-e.getFullYear())>10*n&&((r=new re(1,e.getMonth(),1)).setFullYear(e.getFullYear()+10*n),r=i.views[2].last(r)),r):"century"===t?((r=new re(1,e.getMonth(),e.getDate())).setFullYear(e.getFullYear()+100*n),Math.abs(r.getFullYear()-e.getFullYear())>100*n&&((r=new re(1,e.getMonth(),1)).setFullYear(e.getFullYear()+100*n),r=i.views[3].last(r)),r):void 0}n.ui.plugin(se)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=n.htmlEncode,o=i.Widget,a=i.DataBoundWidget,s=/^\d+(\.\d+)?%$/i,l="k-list-item",c="k-table-row",d="k-list-item-group-label",u="k-selected",h="k-focus",p="k-hover",f="change",m="click",g="listBound",v="itemChange",_="activate",b="deactivate",w=".k-table-group-row",y=".VirtualList";function k(e){return e[e.length-1]}function x(e){return e instanceof Array?e:[e]}function C(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function S(e,t,n){var i=document.createElement(n||"div");return t&&(i.className=t),e.appendChild(i),i}function T(i,r,o){var a=o.template,l=this.options.columns&&this.options.columns.length,c=r.index%2==1?"k-table-alt-row":"";if(i=e(i),r.item||(a=o.placeholderTemplate),0===r.index&&this.header&&r.group&&this.header.html(o.fixedGroupTemplate(r.group)),this.angular("cleanup",(function(){return{elements:[i]}})),i.attr("data-uid",r.item?r.item.uid:"").attr("data-offset-index",r.index),l&&r.item){c.length>0?i.addClass(c):i.removeClass("k-table-alt-row");var p=e(function(e,t,i){for(var r="",o=0;o",r+=i["column"+o](t),r+=""}return r}(this.options,r.item,o));n.applyStylesFromKendoAttributes(p,["width","max-width"]),i.empty().append(p)}else i.find("."+d).remove(),i.find(".k-list-item-text").html(a(r.item||{}));i.toggleClass(h,r.current),i.toggleClass(u,r.selected),i.toggleClass("k-first",r.newGroup),i.toggleClass("k-last",r.isLastGroupedItem),i.toggleClass("k-loading-item",!r.item),0!==r.index&&r.newGroup?l?e(''+o.groupTemplate(r.group)+"").appendTo(i):e("
      ").appendTo(i).html(o.groupTemplate(r.group)):r.group&&l&&i.append(e('')),r.top!==t&&function(e,t){e.style.webkitTransform="translateY("+t+"px)",e.style.transform="translateY("+t+"px)"}(i[0],r.top),this.angular("compile",(function(){return{elements:[i],data:[{dataItem:r.item,group:r.group,newGroup:r.newGroup}]}}))}function D(e){return e&&"resolved"!==e.state()}var I=a.extend({init:function(t,i){var r,a,s,l=this,c=i.columns&&i.columns.length?"k-table-body k-table-scroller":"k-list-content k-virtual-content";l.bound(!1),l._fetching=!1,o.fn.init.call(l,t,i),l.options.itemHeight||(l.options.itemHeight=(r=i.listSize,(s=e('
      • test
      ')).css({position:"absolute",left:"-200000px",visibility:"hidden"}),s.appendTo(document.body),a=parseFloat(n.getComputedStyles(s.find(".k-list-item")[0],["height"]).height),s.remove(),a)),i=l.options,l.element.attr("role","listbox");var d="."+c.split(" ").join("."),u=l.element.closest(d);if(l.content=l.wrapper=u.length?u:l.element.wrap("
      ").parent(),l.options.columns&&l.options.columns.length){var h=l.element.closest(".k-data-table").find(".k-table-thead"),f=e('');h.append(f),l.header=f.find(".k-table-th"),l.element.addClass("k-table-list k-virtual-table")}else l.header=l.content.before("
      ").prev(),l.element.addClass("k-list-ul");i.ariaLabel?this.element.attr("aria-label",i.ariaLabel):i.ariaLabelledBy&&this.element.attr("aria-labelledby",i.ariaLabelledBy),l.element.on("mouseenter.VirtualList","li:not(.k-loading-item)",(function(){e(this).addClass(p)})).on("mouseleave.VirtualList","li",(function(){e(this).removeClass(p)})),l._values=x(l.options.value),l._selectedDataItems=[],l._selectedIndexes=[],l._rangesList={},l._promisesList=[],l._optionID=n.guid(),l._templates(),l.setDataSource(i.dataSource),l.content.on("scroll.VirtualList",n.throttle((function(){l._renderItems(),l._triggerListBound()}),i.delay)),l._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:function(e){return r(e)},placeholderTemplate:function(){return"loading..."},groupTemplate:function(e){return r(e)},fixedGroupTemplate:function(e){return r(e)},mapValueTo:"index",valueMapper:null,ariaLabel:null,ariaLabelledBy:null},events:[f,m,g,v,_,b],setOptions:function(e){var t=this.options.columns&&this.options.columns.length?c:l;o.fn.setOptions.call(this,e),this._selectProxy&&!1===this.options.selectable?this.element.off(m,"."+t,this._selectProxy):!this._selectProxy&&this.options.selectable&&this._selectable(),this._templates(),this.refresh()},items:function(){return e(this._items)},destroy:function(){this.wrapper.off(y),this.dataSource.unbind(f,this._refreshHandler),o.fn.destroy.call(this)},setDataSource:function(e){var t,i=this,r=e||{};r=Array.isArray(r)?{data:r}:r,r=n.data.DataSource.create(r),i.dataSource?(i.dataSource.unbind(f,i._refreshHandler),i._clean(),i.bound(!1),i._deferValueSet=!0,t=i.value(),i.value([]),i.mute((function(){i.value(t)}))):i._refreshHandler=i.refresh.bind(i),i.dataSource=r.bind(f,i._refreshHandler),i.setDSFilter(r.filter()),0!==r.view().length?i.refresh():i.options.autoBind&&r.fetch()},skip:function(){return this.dataSource.currentRangeStart()},_triggerListBound:function(){var e=this,t=e.skip();e.bound()&&!e._selectingValue&&e._skip!==t&&(e._skip=t,e.trigger(g))},_getValues:function(t){var n=this._valueGetter;return e.map(t,(function(e){return n(e)}))},_highlightSelectedItems:function(){for(var e=0;e0?(t-=1,this.focus(t),(e=this.focus())&&e.hasClass("k-loading-item")&&(t+=1,this.focus(t)),t):(t=this.dataSource.total()-1,this.focus(t),t)},focusNext:function(){var e,t=this._focusedIndex,n=this.dataSource.total()-1;return!isNaN(t)&&ti&&(t=i*n):t=0,t},setScreenHeight:function(){var e=this._height();this.content.height(e),this._screenHeight=e},screenHeight:function(){return this._screenHeight},_getElementLocation:function(e){var t=this.content.scrollTop(),n=this._screenHeight,i=this.options.itemHeight,r=e*i,o=r+i,a=t+n;return r===t-i||o>t&&r=t&&r<=t+(n-i)?"inScreen":"outScreen"},_templates:function(){var e=this.options,t={template:e.template,placeholderTemplate:e.placeholderTemplate,groupTemplate:e.groupTemplate,fixedGroupTemplate:e.fixedGroupTemplate};for(var i in e.columns&&e.columns.forEach((function(e,i){var o=e.field?e.field.toString():"text";t["column"+i]=e.template||function(e){return r(n.getter(o)(e))}})),t)"function"!=typeof t[i]&&(t[i]=n.template(t[i]||""));this.templates=t},_generateItems:function(e,t){for(var n,i,r=[],o=this.options.itemHeight+"px",a=this.options.columns&&this.options.columns.length?c:l;t-- >0;)(i=document.createElement("span")).className="k-list-item-text",(n=document.createElement("li")).tabIndex=-1,n.className=a,n.setAttribute("role","option"),n.style.height=o,n.style.minHeight=o,n.appendChild(i),e.appendChild(n),r.push(n);return r},_saveInitialRanges:function(){var t=this.dataSource._ranges,n=e.Deferred();n.resolve(),this._rangesList={};for(var i=0;ic.total()&&(a.itemCount=c.total()),a._items=a._generateItems(a.element[0],a.itemCount),a._setHeight(l.itemHeight*c.total()),a.options.type=(c.group()||[]).length?"group":"flat","flat"===a.options.type?a.header.closest(w).length?a.header.closest(w).hide():a.header.hide():a.header.closest(w).length?a.header.closest(w).show():a.header.show(),a.getter=a._getter((function(){a._renderItems(!0)})),a._onScroll=function(e,t){var n=a._listItems(a.getter);return a._fixedHeader(e,n(e,t))},a._renderItems=a._whenChanged((r=s,o=a._onScroll,function(e){return o(r.scrollTop,e)}),(i=a._reorderList(a._items,T.bind(a)),function(e,t){return i(e.items,e.index,t),e})),a._renderItems(),a._calculateGroupPadding(a._screenHeight),a._calculateColumnsHeaderPadding()},_setHeight:function(e){var t,n=this.heightContainer;if(n?t=n.offsetHeight:n=this.heightContainer=S(this.content[0],"k-height-container"),e!==t)for(n.innerHTML="";e>0;){var i=Math.min(e,25e4);S(n).style.height=i+"px",e-=i}},_getter:function(){var e=null,t=this.dataSource,n=t.skip(),i=this.options.type,r=this.itemCount,o={};return t.pageSize()r?t-e.topi}}(this.options,e);return function(e,n){var i=this.result,r=this._lastScrollTop;return!n&&i&&t(i,e,r)||(i=this._getDataItemsCollection(e,r)),this._lastScrollTop=e,this.result=i,i}.bind(this)},_whenChanged:function(e,t){var n;return function(i){var r=e(i);r!==n&&(n=r,t(r,i))}},_reorderList:function(t,i){var r,o,a=this,s=t.length,l=-1/0;return i=(r=i,o=this.templates,function(t,i){for(var a=0,s=t.length;a=s?(o=t,c=e):(o=function(e,t){var n;return t>0?(n=e.splice(0,t),e.push.apply(e,n)):(n=e.splice(t,-t),e.unshift.apply(e,n)),n}(t,d),c=d>0?e.slice(-d):e.slice(0,-d)),i(o,c,a.bound()),l=n}},_bufferSizes:function(){var e,t,n,i=this.options;return e=this._screenHeight,t=i.listScreens,n=i.oppositeBuffer,{down:e*n,up:e*(t-1-n)}},_indexConstraint:function(e){var t=this.itemCount,n=this.options.itemHeight,i=this.dataSource.total();return Math.min(Math.max(i-t,0),Math.max(0,Math.floor(e/n)))},_listIndex:function(e,t){var n,i=this._bufferSizes();return n=e-(e>t?i.down:i.up),this._indexConstraint(n)},_selectable:function(){var e=this.options.columns&&this.options.columns.length?c:l;this.options.selectable&&(this._selectProxy=this._clickHandler.bind(this),this.element.on("click.VirtualList","."+e,this._selectProxy))},getElementIndex:function(e){return e instanceof jQuery?parseInt(e.attr("data-offset-index"),10):t},_getIndecies:function(e){var t,n=[];if("function"==typeof e){t=this.dataSource.flatView();for(var i=0;i-1&&(l.push(this.removeAt(r)),e(a[i]).removeClass(u))}return l},_getSkip:function(e,t){return((e=i.minLength)&&(n._open=!0,n._mute((function(){this.listView.value([])})),n._filterSource({value:r?l?e.toLocaleLowerCase(l):e.toLowerCase():e,operator:i.filter,field:i.dataTextField,ignoreCase:r}),n.one("close",n._unifySeparators.bind(n))),n._toggleCloseVisibility()},suggest:function(e){var n,i=this,r=i._last,s=i._accessor(),l=i.element[0],u=o(l)[0],h=i._separator(),p=s.split(h),f=y(u,s,h),m=u,g=i.dataSource.options.accentFoldingFiltering;r!=d.BACKSPACE&&r!=d.DELETE?("string"!=typeof(e=e||"")&&(e[0]&&(e=i.dataSource.view()[c.inArray(e[0],i.ul[0])]),e=e?i._text(e):""),u<=0&&(u=(g?s.toLocaleLowerCase(g):s.toLowerCase()).indexOf(g?e.toLocaleLowerCase(g):e.toLowerCase())+1),n=(n=s.substring(0,u).lastIndexOf(h))>-1?u-(n+h.length):u,s=p[f].substring(0,n),e&&(e=e.toString(),(n=(g?e.toLocaleLowerCase(g):e.toLowerCase()).indexOf(g?s.toLocaleLowerCase(g):s.toLowerCase()))>-1&&(m=u+(e=e.substring(n+s.length)).length,s+=e),h&&""!==p[p.length-1]&&p.push("")),p[f]=s,i._accessor(p.join(h||"")),l===a()&&o(l,u,m)):i._last=t},value:function(e){if(e===t)return this._accessor();this.listView.value(e),this._accessor(e),this._old=this._accessor(),this._oldText=this._accessor(),this._toggleCloseVisibility(),this._refreshFloatingLabel()},_click:function(e){var t=e.item,n=this,i=n.element,r=n.listView.dataItemByIndex(n.listView.getElementIndex(t));e.preventDefault(),n._active=!0,n.trigger("select",{dataItem:r,item:t})?n.close():(n._oldText=i.val(),n._select(t).done((function(){n._blur(),o(i,i.val().length)})))},_clearText:e.noop,_resetFocusItem:function(){var e=this.options.highlightFirst?0:-1;this.options.virtual&&this.listView.scrollTo(0),this.listView.focus(e)},_listBound:function(){var e,n=this,i=n.popup,r=n.options,o=n.dataSource.flatView(),s=o.length,l=n.dataSource._group?n.dataSource._group.length:0,c=n.element[0]===a()||n.filterInput&&n.filterInput[0]===a();n._renderFooter(),n._renderNoData(),n._toggleNoData(!s),n._toggleHeader(!!l&&!!s),n._resizePopup(),i.position(),s&&r.suggest&&c&&n._inputValue()&&n.suggest(o[0]),n._open&&(n._open=!1,e=n._allowOpening()?"open":"close",n._typingTimeout&&!c&&(e="close"),s&&(n._resetFocusItem(),r.virtual&&n.popup.unbind("activate",n._resetFocusItemHandler).one("activate",n._resetFocusItemHandler)),i[e](),n._typingTimeout=t),n._touchScroller&&n._touchScroller.reset(),n._hideBusy(),n.trigger("dataBound")},_mute:function(e){this._muted=!0,e.call(this),this._muted=!1},_listChange:function(){(this._active||this.element[0]===a())&&!this._muted&&this._selectValue(this.listView.selectedDataItems()[0])},_selectValue:function(e){var t=this._separator(),n="";e&&(n=this._text(e)),null===n&&(n=""),t&&(n=function(e,t,n,i,r){var o=t.split(i);return o.splice(y(e,t,i),1,n),i&&""!==o[o.length-1]&&o.push(""),o.join(r)}(o(this.element)[0],this._accessor(),n,t,this._defaultSeparator())),this._prev=n,this._accessor(n),this._placeholder()},_unifySeparators:function(){return this._accessor(this.value().split(this._separator()).join(this._defaultSeparator())),this},_preselect:function(e,t){this._inputValue(t),this._accessor(e),this._old=this.oldText=this._accessor(),this.listView.setValue(e),this._placeholder()},_change:function(){var e=this,t=e._unifySeparators().value(),n=t!==c.unifyType(e._old,typeof t),i=n&&!e._typing,r=e._oldText!==t;e._old=t,e._oldText=t,e.filterInput&&a()===e.filterInput[0]&&e.element.val(e.filterInput.val()),(i||r)&&e.element.trigger(f),n&&e.trigger(f),e.typing=!1,e._toggleCloseVisibility()},_accessor:function(e){var n=this,i=n.filterInput&&a()===n.filterInput[0]?n.filterInput[0]:n.element[0];if(e===t)return e=i.value,i.className.indexOf("k-readonly")>-1&&e===n.options.placeholder?"":e;i.value=null===e?"":e,n._placeholder()},_keydown:function(e){var t=this,n=e.keyCode,i=t.listView,r=t.popup.visible(),o=i.focus();if(t._last=n,n===d.DOWN)r?this._move(o?"focusNext":"focusFirst"):t.value()&&t._filterSource({value:t.ignoreCase?t.value().toLowerCase():t.value(),operator:t.options.filter,field:t.options.dataTextField,ignoreCase:t.ignoreCase}).done((function(){t._allowOpening()&&(t._resetFocusItem(),t.popup.open())})),e.preventDefault();else if(n===d.ESC)r?(e.preventDefault(),t.close()):t._clearValue();else if(e.altKey&&n===d.UP&&r)e.preventDefault(),t.close();else if(n===d.UP)r&&this._move(o?"focusPrev":"focusLast"),e.preventDefault();else if(n===d.HOME)this._move("focusFirst");else if(n===d.END)this._move("focusLast");else if(n===d.ENTER||n===d.TAB){if(n===d.ENTER&&r&&e.preventDefault(),r&&o){var a=i.dataItemByIndex(i.getElementIndex(o));if(t.trigger("select",{dataItem:a,item:o}))return;this._select(o)}this._blur()}else if(!t.popup.visible()||n!==d.PAGEDOWN&&n!==d.PAGEUP)t.popup._hovered=!0,t._search();else{e.preventDefault();var s=n===d.PAGEDOWN?1:-1;i.scrollWith(s*i.screenHeight())}},_keypress:function(){this._oldText=this.element.val(),this._typing=!0},_move:function(e){this.listView[e](),this.options.suggest&&this.suggest(this.listView.focus())},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._loading.addClass(_),e.element.attr("aria-busy",!1),e._busy=null,e._toggleCloseVisibility()},_showBusy:function(){var e=this;e._busy||(e._busy=setTimeout((function(){e.element.attr("aria-busy",!0),e._loading.removeClass(_),e._hideClear()}),100))},_placeholder:function(e){if(!s){var n,i=this,r=i.element,a=i.options.placeholder;if(a){if(n=r.val(),e===t&&(e=!n),e||(a=n!==a?n:""),n===i._old&&!e)return;r.toggleClass("k-readonly",e).val(a),a||r[0]!==document.activeElement||o(r[0],0,0)}}},_separator:function(){var e=this.options.separator;return e instanceof Array?new RegExp(e.join("|"),"gi"):e},_defaultSeparator:function(){var e=this.options.separator;return e instanceof Array?e[0]:e},_inputValue:function(){return this.element.val()},_search:function(){var e=this;clearTimeout(e._typingTimeout),e._typingTimeout=setTimeout((function(){e._prev!==e._accessor()&&(e._prev=e._accessor(),e.search())}),e.options.delay)},_select:function(e){var t=this;return t._active=!0,t.listView.select(e).done((function(){t._active=!1}))},_loader:function(){this._loading=e('').insertAfter(this.element)},_clearButton:function(){c.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.element),this.wrapper.addClass("k-autocomplete-clearable"))},_toggleHover:function(t){e(t.currentTarget).toggleClass("k-hover","mouseenter"===t.type)},_toggleCloseVisibility:function(){var e=this.element.is(":disabled")||this.element.is("[readonly]");this.value()&&!e?this._showClear():this._hideClear()},_wrapper:function(){var e,t=this,n=t.element,i=n[0];(e=n.parent()).is("span.k-autocomplete")||(e=n.wrap("").parent()),e.attr("tabindex",-1),e[0].style.cssText=i.style.cssText,n.css({width:"",height:i.style.height}),t._focused=t.element,t.wrapper=e.addClass("k-autocomplete k-input").addClass(i.className).removeClass("input-validation-error")},_clearValue:function(){c.fn._clearValue.call(this),this.element.focus()}});l.plugin(k),n.cssProperties.registerPrefix("AutoComplete","k-input-"),n.cssProperties.registerValues("AutoComplete",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.htmlEncode,r=n.ui,o=n.html,a=r.List,s=r.Select,l=n.support,c=n._activeElement,d=n.data.ObservableObject,u=n.keys,h=".kendoDropDownList",p=h+"FocusEvent",f="disabled",m="readonly",g="change",v="k-focus",_="k-disabled",b="aria-disabled",w="aria-readonly",y="mouseenter"+h+" mouseleave"+h,k="tabindex",x="filter",C="accept",S=s.extend({init:function(i,r){var o,a,l=this,c=r&&r.index;l.ns=h,r=Array.isArray(r)?{dataSource:r}:r,s.fn.init.call(l,i,r),r=l.options,i=l.element.on("focus"+h,l._focusHandler.bind(l)),l._focusInputHandler=l._focusInput.bind(l),l.optionLabel=e(),l._optionLabel(),l._inputTemplate(),l._reset(),l._prev="",l._word="",l._wrapper(),l._tabindex(),l.wrapper.data(k,l.wrapper.attr(k)),l._span(),l._popup(),l._mobile(),l._dataSource(),l._ignoreCase(),r.label&&this._label(),l._aria(),l._enable(),l._oldIndex=l.selectedIndex=-1,c!==t&&(r.index=c),l._initialIndex=r.index,l.requireValueMapper(l.options),l._initList(),l.listView.one("dataBound",l._attachAriaActiveDescendant.bind(l)),l._cascade(),l.one("set",(function(e){!e.sender.listView.bound()&&l.hasOptionLabel()&&l._textAccessor(l._optionLabelText())})),r.autoBind?l.dataSource.fetch():-1===l.selectedIndex&&((a=r.text||"")||((o=r.optionLabel)&&0===r.index?a=o:l._isSelect&&(a=i.children(":selected").text())),l._textAccessor(a)),e(l.element).parents("fieldset").is(":disabled")&&l.enable(!1),l.listView.bind("click",(function(e){e.preventDefault()})),n.notify(l),l._applyCssClasses()},options:{name:"DropDownList",enabled:!0,autoBind:!0,index:0,text:null,value:null,delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",cascadeFromField:"",cascadeFromParentField:"",ignoreCase:!0,animation:{},filter:"none",minLength:1,enforceMinLength:!1,virtual:!1,template:null,valueTemplate:null,optionLabelTemplate:null,groupTemplate:function(e){return i(e)},fixedGroupTemplate:function(e){return i(e)},autoWidth:!1,popup:null,filterTitle:null,size:"medium",fillMode:"solid",rounded:"medium",label:null,popupFilter:!0},events:["open","close",g,"select","filtering","dataBinding","dataBound","cascade","set","kendoKeydown"],setOptions:function(e){s.fn.setOptions.call(this,e),this.listView.setOptions(this._listOptions(e)),this._optionLabel(),this._inputTemplate(),this._accessors(),this._removeFilterHeader(),this._addFilterHeader(),this._enable(),this._aria(),!this.value()&&this.hasOptionLabel()&&this.select(0)},destroy:function(){var e=this;s.fn.destroy.call(e),e.wrapper.off(h),e.wrapper.off(p),e.element.off(h),e._arrow.off(),e._arrow=null,e._arrowIcon=null,e.optionLabel.off(),e.filterInput&&e.filterInput.off(p)},open:function(){var e=this,t=!!e.dataSource.filter()&&e.dataSource.filter().filters.length>0,n=this.listView;e.popup.visible()||(e.listView.bound()&&e._state!==C?e._allowOpening()&&(e._focusFilter=!0,e.popup.one("activate",e._focusInputHandler),e.popup._hovered=!0,e.wrapper.attr("aria-activedescendant",n._optionID),e.popup.open(),e._resizeFilterInput(),e._focusItem()):(e._open=!0,e._state="rebind",e.filterInput&&(e.filterInput.val(""),e._prev=""),e.filterInput&&1!==e.options.minLength&&!t?(e.refresh(),e.popup.one("activate",e._focusInputHandler),e.wrapper.attr("aria-activedescendant",n._optionID),e.popup.open(),e._resizeFilterInput()):e._filterSource()))},close:function(){this._attachAriaActiveDescendant(),this.popup.close()},_attachAriaActiveDescendant:function(){var e=this.wrapper,t=e.find(".k-input-inner").attr("id");e.attr("aria-describedby",t)},_focusInput:function(){this._hasActionSheet()||this._focusElement(this.filterInput)},_resizeFilterInput:function(){var e=this.filterInput,t=this._prevent;if(e&&!this._hasActionSheet()){var i=this.filterInput[0]===c(),r=n.caret(this.filterInput[0])[0];this._prevent=!0,e.addClass("k-hidden"),e.closest(".k-list-filter").css("width",this.popup.element.width()),e.removeClass("k-hidden"),i&&(e.trigger("focus"),n.caret(e[0],r)),this._prevent=t}},_allowOpening:function(){return this.hasOptionLabel()||this.filterInput||s.fn._allowOpening.call(this)},toggle:function(e){this._toggle(e,!0)},current:function(e){var n;if(e===t)return!(n=this.listView.focus())&&0===this.selectedIndex&&this.hasOptionLabel()?this.optionLabel:n;this._focus(e)},dataItem:function(n){var i=this,r=null;if(null===n)return n;if(n===t)r=i.listView.selectedDataItems()[0];else{if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(e(n).data("uid"));n=n.hasClass("k-list-optionlabel")?-1:e(i.items()).index(n)}else i.hasOptionLabel()&&(n-=1);r=i.dataSource.flatView()[n]}return r||(r=i._optionLabelDataItem()),r},refresh:function(){this.listView.refresh()},text:function(e){var n,i=this,r=i.options.ignoreCase;if((e=null===e?"":e)===t)return i._textAccessor();"string"==typeof e?(n=r?e.toLowerCase():e,i._select((function(e){return e=i._text(e),r&&(e=(e+"").toLowerCase()),e===n})).done((function(){i._textAccessor(i.dataItem()||e),i._refreshFloatingLabel()}))):i._textAccessor(e)},_clearFilter:function(){e(this.filterInput).val(""),s.fn._clearFilter.call(this)},value:function(e){var n=this,i=n.listView,r=n.dataSource;return e===t?(e=n._accessor()||n.listView.value()[0])===t||null===e?"":e:(n.requireValueMapper(n.options,e),!e&&n.hasOptionLabel()||(n._initialIndex=null),this.trigger("set",{value:e}),n._request&&n.options.cascadeFrom&&n.listView.bound()?(n._valueSetter&&r.unbind(g,n._valueSetter),n._valueSetter=function(){n.value(e)}.bind(n),void r.one(g,n._valueSetter)):(n._isFilterEnabled()&&i.bound()&&i.isFiltered()?n._clearFilter():n._fetchData(),void i.value(e).done((function(){n._old=n._valueBeforeCascade=n._accessor(),n._oldIndex=n.selectedIndex,n._refreshFloatingLabel()}))))},hasOptionLabel:function(){return this.optionLabel&&!!this.optionLabel[0]},_optionLabel:function(){var t=this,r=t.options,o=r.optionLabel,a=r.optionLabelTemplate;if(!o)return t.optionLabel.off().remove(),void(t.optionLabel=e());a||(a=function(e){return i("string"==typeof o?e:n.getter(r.dataTextField)(e))}),"function"!=typeof a&&(a=n.template(a)),t.optionLabelTemplate=a,t.hasOptionLabel()||(t.optionLabel=e('
      ').prependTo(t.list)),t.optionLabel.html(a(o)).off().on("click.kendoDropDownList touchend.kendoDropDownList",t._click.bind(t)).on(y,t._toggleHover),t.angular("compile",(function(){return{elements:t.optionLabel,data:[{dataItem:t._optionLabelDataItem()}]}}))},_optionLabelText:function(){var e=this.options.optionLabel;return"string"==typeof e?e:this._text(e)},_optionLabelDataItem:function(){var n=this,i=n.options.optionLabel;return n.hasOptionLabel()?e.isPlainObject(i)?new d(i):n._assignInstance(n._optionLabelText(),""):t},_buildOptions:function(e){var n=this;if(n._isSelect){var i=n.listView.value()[0],r=n._optionLabelDataItem(),o=r&&n._value(r);i!==t&&null!==i||(i=""),r&&(o!==t&&null!==o||(o=""),r='"),n._options(e,r,i),i!==a.unifyType(n._accessor(),typeof i)&&(n._customOption=null,n._custom(i))}},_listBound:function(){var e,t=this,n=t._initialIndex,i=t._state===x,r=t.dataSource.flatView();t._presetValue=!1,t._renderFooter(),t._renderNoData(),t._toggleNoData(!r.length),t._resizePopup(!0),t.popup.position(),t._buildOptions(r),i||(t._open&&t.toggle(t._allowOpening()),t._open=!1,t._fetch||(r.length?(!t.listView.value().length&&n>-1&&null!==n&&t.select(n),t._initialIndex=null,(e=t.listView.selectedDataItems()[0])&&t.text()!==t._text(e)&&t._selectValue(e)):t._textAccessor()!==t._optionLabelText()&&(t.listView.value(""),t._selectValue(null),t._oldIndex=t.selectedIndex))),t._hideBusy(),t.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),(this._presetValue||this._old&&-1===this._oldIndex)&&(this._oldIndex=this.selectedIndex)},_filterPaste:function(){this._search()},_attachFocusHandlers:function(){var e=this;e.wrapper.on("focusin"+p,e._focusinHandler.bind(e)).on("focusout"+p,e._focusoutHandler.bind(e)),e.filterInput&&e.filterInput.on("focusin"+p,e._focusinHandler.bind(e)).on("focusout"+p,e._focusoutHandler.bind(e))},_focusHandler:function(){this.wrapper.trigger("focus")},_focusinHandler:function(){this.wrapper.addClass(v),this._prevent=!1},_focusoutHandler:function(){var e=this,t=window.self!==window.top;e._prevent||(clearTimeout(e._typingTimeout),l.mobileOS.ios&&t?e._change():e._blur(),e.wrapper.removeClass(v),e._prevent=!0,e._open=!1,e.element.trigger("blur"))},_wrapperMousedown:function(){this._prevent=!!this.filterInput},_wrapperClick:function(e){e.preventDefault(),this.popup.unbind("activate",this._focusInputHandler),this._focused=this.wrapper,this._prevent=!1,this._toggle()},_editable:function(e){var t=this,i=t.element,r=e.disable,o=e.readonly,a=t.wrapper.add(t.filterInput).off(h),s=t.wrapper.off(y);o||r?r?(a.removeAttr(k),s.addClass(_)):s.removeClass(_):(i.prop(f,!1).prop(m,!1),s.removeClass(_).on(y,t._toggleHover),a.attr(k,a.data(k)).attr(b,!1).attr(w,!1).on("keydown"+h,t,t._keydown.bind(t)).on(n.support.mousedown+h,t._wrapperMousedown.bind(t)).on("paste"+h,t._filterPaste.bind(t)),t.wrapper.on("click"+h,t._wrapperClick.bind(t)),t.filterInput?a.on("input"+h,t._search.bind(t)):a.on("keypress"+h,t._keypress.bind(t))),i.attr(f,r).attr(m,o),a.attr(b,r).attr(w,o)},_keydown:function(e){var t,n,i=this,r=e.keyCode,o=e.altKey,a=i.popup.visible();if(i.filterInput&&(t=i.filterInput[0]===c()),r===u.LEFT?(r=u.UP,n=!0):r===u.RIGHT&&(r=u.DOWN,n=!0),!n||!t)if(e.keyCode=r,(o&&r===u.UP||r===u.ESC)&&i._focusElement(i.wrapper),i._state===x&&r===u.ESC&&(i._clearFilter(),i._open=!1,i._state=C),r===u.ENTER&&i._typingTimeout&&i.filterInput&&a)e.preventDefault();else if(r!==u.SPACEBAR||t||(i.toggle(!a),e.preventDefault()),!(n=i._move(e))){if(!a||!i.filterInput){var s=i._focus();if(r===u.HOME?(n=!0,i._firstItem()):r===u.END&&(n=!0,i._lastItem()),n){if(i.trigger("select",{dataItem:i._getElementDataItem(i._focus()),item:i._focus()}))return void i._focus(s);i._select(i._focus(),!0).done((function(){a||i._blur()})),e.preventDefault()}}o||n||!i.filterInput||i._search()}},_matchText:function(e,n){var i=this.options.ignoreCase;return e!==t&&null!==e&&(e+="",i&&(e=e.toLowerCase()),0===e.indexOf(n))},_shuffleData:function(e,t){var n=this._optionLabelDataItem();return n&&(e=[n].concat(e)),e.slice(t).concat(e.slice(0,t))},_selectNext:function(){var e,t,n=this,i=n.dataSource.flatView(),r=i.length+(n.hasOptionLabel()?1:0),o=function(e,t){for(var n=0;n-1&&(t-=1):a.hasClass("k-list-optionlabel")&&(t=-1)),o){for(n=this.dataSource.flatView(),r=0;r
      ',{icon:"caret-alt-down",size:l.size,fillMode:l.fillMode,shape:"none",rounded:"none"}),r.append('').append(t).append(i.element),e=r.find(a)),i.span=e,i._arrow=r.find(".k-input-button"),i._arrowIcon=i._arrow.find(".k-icon,.k-svg-icon")},_wrapper:function(){var e,t=this,n=t.element,i=n[0];(e=n.parent()).is("span.k-picker")||((e=n.wrap("").parent())[0].style.cssText=i.style.cssText,e[0].title=i.title),t._focused=t.wrapper=e.addClass("k-picker k-dropdownlist").addClass(i.className).removeClass("input-validation-error").css("display","").attr({accesskey:n.attr("accesskey"),unselectable:"on",role:"combobox","aria-expanded":!1}),n.hide().removeAttr("accesskey")},_clearSelection:function(e){this.select(e.value()?0:-1)},_openHandler:function(e){this._adjustListWidth(),this.trigger("open")?e.preventDefault():(this.wrapper.attr("aria-expanded",!0),this.ul.attr("aria-hidden",!1))},_closeHandler:function(e){this.trigger("close")?e.preventDefault():(this.wrapper.attr("aria-expanded",!1),this.ul.attr("aria-hidden",!0))},_inputTemplate:function(){var e=this,t=e.options.valueTemplate;if(t=t?n.template(t):function(t){return i(e._text(t))},e.valueTemplate=t,e.hasOptionLabel()&&!e.options.optionLabelTemplate)try{e.valueTemplate(e._optionLabelDataItem())}catch(e){throw new Error("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")}},_textAccessor:function(n){var i=null,r=this.valueTemplate,o=this._optionLabelText(),a=this.span;if(n===t)return a.text();e.isPlainObject(n)||n instanceof d?i=n:o&&o===n&&(i=this.options.optionLabel),i||(i=this._assignInstance(n,this._accessor())),this.hasOptionLabel()&&(i!==o&&this._text(i)!==o||(r=this.optionLabelTemplate,"string"!=typeof this.options.optionLabel||this.options.optionLabelTemplate||(i=o)));var s=function(){return{elements:a.get(),data:[{dataItem:i}]}};this.angular("cleanup",s);try{a.html(r(i))}catch(e){a.html("")}this.angular("compile",s)},_preselect:function(e,t){e||t||(t=this._optionLabelText()),this._accessor(e),this._textAccessor(t),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._initialIndex=null,this._presetValue=!0},_assignInstance:function(e,t){var n=this.options.dataTextField,i={};return n?(T(i,n.split("."),e),T(i,this.options.dataValueField.split("."),t),i=new d(i)):i=e,i}});function T(e,t,n){for(var i,r=0,o=t.length-1;r=t&&(e-=t),e}r.plugin(S),n.cssProperties.registerPrefix("DropDownList","k-picker-"),n.cssProperties.registerValues("DropDownList",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=e.extend,o="visibility",a="k-drag-status",s='',l="k-hover";i.HierarchicalDragAndDrop=n.Class.extend({init:function(t,o){this.element=t,this.hovered=t,this.options=r({dragstart:e.noop,drag:e.noop,drop:e.noop,dragend:e.noop},o),this._draggable=new i.Draggable(t,{ignore:"input,a:not(.k-in),textarea,.k-multiselect-wrap,select,button,a.k-button>.k-icon,button.k-button>.k-icon,span.k-toggle-icon,a.k-button>.k-svg-icon,button.k-button>.k-svg-icon",filter:o.filter,autoScroll:o.autoScroll,cursorOffset:{left:10,top:n.support.mobileOS?-40/n.support.zoomLevel():10},hint:this._hint.bind(this),dragstart:this.dragstart.bind(this),dragcancel:this.dragcancel.bind(this),hintDestroyed:this.dragcancel.bind(this),drag:this.drag.bind(this),dragend:this.dragend.bind(this),$angular:o.$angular,holdToDrag:o.holdToDrag,clickMoveClick:o.clickMoveClick})},_hint:function(e){return"
      "+s+this.options.hintText(e)+"
      "},_removeTouchHover:function(){n.support.touch&&this.hovered&&(this.hovered.find(".k-hover").removeClass(l),this.hovered=!1)},_hintStatus:function(e){var t=this._draggable.hint.find("."+a);e?(this.status=e,i.icon(t,{icon:e})):(this.status="",t.replaceWith(s))},dragstart:function(t){this.dropHint&&this.dropHint.remove(),this.source=t.currentTarget.closest(this.options.itemSelector),this.options.dragstart(this.source)&&t.preventDefault(),this.options.reorderable?this.dropHint=e("
      ").css(o,"hidden").appendTo(this.element):this.dropHint=e()},drag:function(t){var i,r,a,s,c,d,u,h,p,f,m,g=this.options,v=this.source,_=this.dropTarget=e(n.eventTarget(t)),b=_.closest(g.allowedContainers);b.length?v[0]==_[0]||g.contains(v[0],_[0])||t.clickMoveClick&&t.currentTarget.hasClass("k-drag-cell")&&0===_.closest(".k-drag-cell").length||t.clickMoveClick&&t.currentTarget.hasClass("k-treeview-leaf")&&0===_.closest(".k-treeview-leaf").length?m="cancel":(m="insert-middle",(i=(p=g.itemFromTarget(_)).item).length?(this._removeTouchHover(),r=n._outerHeight(i),s=p.content,g.reorderable?(c=r/(s.length>0?4:2),a=n.getOffset(i).top,d=t.y.location"),r.encoded?t.labelEl.text(r.label):t.labelEl.html(r.label),r.labelId&&t.labelEl.attr("id",r.labelId),r.optional&&t.labelEl.append(""+r.optionalText+""),t.element[r.labelPosition](t.labelEl))},html:function(){var e=this,t="after"===e.options.labelPosition,n=i.fn.html.call(e);return e.labelEl?t?n+e.labelEl[0].outerHTML:e.labelEl[0].outerHTML+n:n}}),o=r.extend({init:function(e,t){r.fn.init.call(this,e,t),this._addClasses()},options:{name:"HTMLCheckBox",inputClass:"k-checkbox",labelClass:"k-checkbox-label",optionalClass:"k-label-optional",optionalText:"(Optional)",type:"checkbox",rounded:"medium",size:"medium",stylingOptions:["size","rounded"]}}),a=r.extend({init:function(e,t){r.fn.init.call(this,e,t),this._addClasses()},options:{name:"HTMLRadioButton",inputClass:"k-radio",labelClass:"k-radio-label",optionalClass:"k-label-optional",optionalText:"(Optional)",type:"radio",size:"medium",stylingOptions:["size"]}});e.extend(n.html,{renderCheckBox:function(n,i){return(arguments[0]===t||e.isPlainObject(arguments[0]))&&(i=n,n=e("")),new o(n,i).html()},renderRadioButton:function(n,i){return(arguments[0]===t||e.isPlainObject(arguments[0]))&&(i=n,n=e("")),new a(n,i).html()},HTMLInput:r,HTMLCheckBox:o,HTMLRadioButton:a}),n.cssProperties.registerPrefix("HTMLCheckBox","k-checkbox-"),n.cssProperties.registerValues("HTMLCheckBox",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),n.cssProperties.registerPrefix("HTMLRadioButton","k-radio-")}(window.kendo.jQuery);kendo;!function(e,t){var n,i,r,o,a,s=window.kendo,l=s.ui,c=s.data,d=s.htmlEncode,u=e.extend,h=s.template,p=Array.isArray,f=l.Widget,m=c.HierarchicalDataSource,g=s.keys,v=".kendoTreeView",_=".kendoTreeViewTemp",b="select",w="check",y="navigate",k="change",x="error",C="checked",S="indeterminate",T="dragstart",D="drag",I="drop",z="dragend",M="dataBound",E="itemsLoaded",A="loadCompleted",H="requestEnd",R="click",F="undefined",P="k-hover",B="k-treeview",L=".k-item",V="k-toggle-icon",O="",N="string",W="aria-checked",U="aria-selected",j="aria-disabled",q="aria-expanded",G="aria-activedescendant",K="aria-busy",Y="k-disabled",$={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},Q=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&typeof e.nodeName===N};function X(e){return function(t){var n=t.children(".k-animation-container");return n.length||(n=t),n.children(e)}}function Z(e){return e.find(".k-checkbox-wrapper:first input[type=checkbox]")}function J(e){return function(t,n){var i,r=(n=n.closest(L)).parent();return r.parent().is("li")&&(i=r.parent()),this._dataSourceMove(t,r,i,(function(t,i){var r=this.dataItem(n),o=r&&n.parent().children().length!==r.parent().length?r.parent().indexOf(r):n.index();return this._insert(t.data(),i,o+e)}))}}function ee(t){var n=t.children("div"),i=t.children("ul"),r=n.find(".k-treeview-toggle > ."+V),o=t.children("input[type=checkbox]"),l=n.children(".k-in");t.hasClass("k-treeview")||(n.length||(n=e("
      ").prependTo(t)),!r.length&&i.length?r=e(""+O+"").prependTo(n):i.length&&i.children().length||(r.parent().remove(),i.remove(),t.removeAttr(q)),o.length&&e("").appendTo(n).append(o),l.length||((l=t.children("a").eq(0).addClass("k-in k-link")).length||(l=e("")),l.appendTo(n),n.length&&function(e,t){for(var n;e&&"ul"!=e.nodeName.toLowerCase();)n=e,e=e.nextSibling,3==n.nodeType&&(n.nodeValue=s.trim(n.nodeValue)),a.test(n.className)?t.insertBefore(n,t.firstChild):t.appendChild(n)}(n[0].nextSibling,l[0])))}i=X(".k-group"),r=X(".k-group,.k-content"),o=function(e){return e.children("div").find(".k-treeview-toggle > ."+V)},a=/k-sprite/,n=s.ui.DataBoundWidget.extend({init:function(e,t){var n,i,r=this,o=t&&!!t.dataSource;p(t)&&(t={dataSource:t}),t&&typeof t.loadOnDemand==F&&p(t.dataSource)&&(t.loadOnDemand=!1),f.prototype.init.call(r,e,t),e=r.element,t=r.options,r._dataSourceUids={},i=e.is("ul")&&e||e.hasClass(B)&&e.children("ul"),(n=!o&&i.length)&&(t.dataSource.list=i),r._animation(),r._accessors(),r._templates(),e.hasClass(B)?(r.wrapper=e,r.root=e.children("ul").eq(0)):(r._wrapper(),i&&(r.root=e,r._group(r.wrapper))),r._applyCssClasses(),r._tabindex(),r.wrapper.find(">ul").attr("role","tree"),r._dataSource(n),r._attachEvents(),r._dragging(),n?r._syncHtmlAndDataSource():t.autoBind&&(r._progress(!0),r.dataSource.fetch(this._attemptLoadCompleted.bind(this))),t.checkboxes&&t.checkboxes.checkChildren&&r.updateIndeterminate(),r.element[0].id?r._ariaId=s.format("{0}_tv_active",r.element[0].id):r._ariaId=s.guid()+"_tv_active",s.notify(r)},_attachEvents:function(){var t=this,n=".k-in:not(.k-selected,.k-disabled)",i="mouseenter";t._clickHandler=t._click.bind(t),t.wrapper.on(i+v,".k-in.k-selected",(function(e){e.preventDefault()})).on(i+v,n,(function(){e(this).addClass(P)})).on("mouseleave"+v,n,(function(){e(this).removeClass(P)})).on(R+v,n,t._clickHandler).on("dblclick"+v,".k-in:not(.k-disabled)",t._toggleButtonClick.bind(t)).on(R+v,"."+V,t._toggleButtonClick.bind(t)).on("keydown"+v,t,t._keydown.bind(t)).on("keypress"+v,t._keypress.bind(t)).on("focus"+v,t._focus.bind(t)).on("blur"+v,t._blur.bind(t)).on("mousedown"+v,".k-in,.k-checkbox-wrapper :checkbox,."+V,t._mousedown.bind(t)).on("change"+v,".k-checkbox-wrapper :checkbox",t._checkboxChange.bind(t)).on("click"+v,".k-request-retry",t._retryRequest.bind(t)).on("click"+v,".k-link.k-disabled",(function(e){e.preventDefault()})).on("click"+v,(function(n){var i=e(n.target);i.is(":kendoFocusable")||i.find("input,select,textarea,button,object").is(":kendoFocusable")||t.focus()}))},_syncHtmlAndDataSource:function(e,t){e=e||this.root;var n,i,r,o,a,l=(t=t||this.dataSource).view(),c=s.attr("uid"),d=s.attr("expanded"),u=this.options.checkboxes,h=e.children("li");for(n=0;n0?"after":"before"},dragstart:function(e){return i.wrapper.attr(s.attr("scrollable"),!1),i.trigger(T,{sourceNode:e[0]})},drag:function(e){i.trigger(D,{originalEvent:e.originalEvent,sourceNode:e.source[0],dropTarget:e.target[0],pageY:e.pageY,pageX:e.pageX,statusClass:e.status,setStatusClass:e.setStatus})},drop:function(t){var n=e(t.dropTarget).closest("a");return n&&n.attr("href")&&i._tempPreventNavigation(n),i.trigger(I,{originalEvent:t.originalEvent,sourceNode:t.source,destinationNode:t.destination,valid:t.valid,setValid:function(e){this.valid=e,t.setValid(e)},dropTarget:t.dropTarget,dropPosition:t.position})},dragend:function(e){var t=e.source,n=e.destination,r=e.position;function o(t){i.options.checkboxes&&i.options.checkboxes.checkChildren&&i.updateIndeterminate(),i.current(t),i.element.focus(),i.trigger(z,{originalEvent:e.originalEvent,sourceNode:t&&t[0],destinationNode:n[0],dropPosition:r})}i.wrapper.removeAttr(s.attr("scrollable")),"over"==r?i.append(t,n,o):("before"==r?t=i.insertBefore(t,n):"after"==r&&(t=i.insertAfter(t,n)),o(t))}})}else!t&&n&&(n.destroy(),this.dragging=null)},_tempPreventNavigation:function(e){e.on(R+v+_,(function(t){t.preventDefault(),e.off(R+v+_)}))},_hintText:function(e){return this.templates.dragClue({item:this.dataItem(e),treeview:this.options})},_templates:function(){var t=this,n=t.options,i=t._fieldAccessor.bind(t);n.template&&typeof n.template==N?n.template=h(n.template):n.template||(n.template=function(e){var t=e.item,n=i("text")(t);return void 0!==t.encoded&&!1===t.encoded?""+n+"":""+d(n)+""}),t._checkboxes(),t.templates={setAttributes:function(e){var t="",n=e.attr||{};for(var i in n)n.hasOwnProperty(i)&&"class"!==i&&(t+=i+'="'+n[i]+'" ');return t},wrapperCssClass:function(e,t){var n="k-item k-treeview-item",i=t.index;return e.firstLevel&&0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),n},cssClass:function(e,t){var n="",i=t.index,r=e.length-1;return e.firstLevel&&0===i&&(n+="k-treeview-top "),n+=0===i&&i!=r?"k-treeview-top":i==r?"k-treeview-bot":"k-treeview-mid"},textClass:function(e,t){var n="k-treeview-leaf k-in";return t&&(n+=" k-link"),!1===e.enabled&&(n+=" k-disabled"),!0===e.selected&&(n+=" k-selected"),n},checkboxClass:function(e){var t="k-checkbox";return!1===e.enabled&&(t+=" k-disabled"),t},toggleButtonClass:function(e){var t="k-treeview-toggle";return!1===e.enabled&&(t+=" k-disabled"),t},toggleIcon:function(e,n){return!0!==n.expanded?l.icon(e,{icon:"caret-alt-"+(s.support.isRtl(t.element)?"left":"right")}):l.icon(e,{icon:"caret-alt-down"})},groupAttributes:function(e){var t="";return e.firstLevel||(t="role='group'"),t+(!0!==e.expanded?" "+s.attr("style-display")+'="none"':"")},groupCssClass:function(e){var t="k-group k-treeview-group";return e.firstLevel&&(t+=" k-treeview-lines"),t},dragClue:function(e){return e.treeview.template(e)},group:function(e){return"
        "+e.renderItems(e)+"
      "},itemContent:function(e){var t=i("imageUrl")(e.item),n=i("spriteCssClass")(e.item),r="";return t&&(r+=""),n&&(r+=""),r+=e.treeview.template(e)},itemElement:function(t){var n=t.item,r=t.r,o=i("url")(n),a=o?"a":"span",s=o?' href="'+o+'"':"",l='
      ';return n.hasChildren&&(l+=""+r.toggleIcon(e(O),n)+""),t.treeview.checkboxes&&(l+=""+t.treeview.checkboxes.template(t)+""),l+="<"+a+" class='"+r.textClass(n,!!o)+"'"+s+">"+r.itemContent(t)+"",l+="
      "},item:function(e){var t=e.item,n=e.r,i="
    • '+n.itemElement(e)+"
    • "},loading:function(e){var t=e.messages;return"
      "+d(t.loading)},retry:function(e){var t=e.messages;return d(t.requestFailed)+" "}}},items:function(){return this.element.find(".k-item > div:first-child")},setDataSource:function(e){var t=this.options;t.dataSource=e,this._dataSourceUids={},this._dataSource(),t.checkboxes&&t.checkboxes.checkChildren&&this.dataSource.one("change",this.updateIndeterminate.bind(this,null)),this.options.autoBind&&this.dataSource.fetch(this._attemptLoadCompleted.bind(this))},_bindDataSource:function(){var e=this;e._refreshHandler=e.refresh.bind(e),e._errorHandler=e._error.bind(e),e._loadCompletedHandler=e._loadCompleted.bind(e),e._requestEndHandler=e._dsRequestEnd.bind(e),e._loadedNodes=[],e.dataSource.bind(k,e._refreshHandler),e.dataSource.bind(x,e._errorHandler),e.dataSource.bind(E,e._loadCompletedHandler),e.dataSource.bind(H,e._requestEndHandler)},_dsRequestEnd:function(e){var t=this;setTimeout((function(){"read"!==e.type||t._loadCompletedFired||t._attemptLoadCompleted()}))},_loadCompleted:function(e){var t=this;t._loadedNodes=t._loadedNodes.concat(e.nodes),t.dataSource.loading()||!1!==t.options.loadOnDemand||(t.trigger(A,{nodes:t._loadedNodes}),t._loadedNodes=[])},_attemptLoadCompleted:function(){var e,t,n=this,i=n.dataSource.view();if(!1===n.options.loadOnDemand){for(t=0;t1){for(r=1;rn.clientHeight&&(i.push(n),r.push(n.scrollTop))}while(n!=o);for(s.focusElement(t),e=0;et&&e(r).is(":visible")&&0===e(r).text().toLowerCase().indexOf(n)})).eq(0).closest(L)},_click:function(t){var n=e(t.currentTarget),i=r(n.closest(L)),o=n.attr("href");(o?"#"==o||o.indexOf("#"+this.element.id+"-")>=0:i.length&&!i.children().length)&&t.preventDefault(),n.hasClass(".k-selected")||this._trigger(b,n)||this.select(n)},_wrapper:function(){var e,t,n=this,i=n.element;i.is("ul")?(e=i.wrap("
      ").parent(),t=i):t=(e=i).children("ul").eq(0),n.wrapper=e.addClass("k-treeview"),n.root=t},_getSelectedNode:function(){return this.element.find(".k-selected").closest(L)},_group:function(e){var t=this,n=e.hasClass(B),i={firstLevel:n,expanded:n||t._expanded(e)},r=e.children("ul");r.addClass(t.templates.groupCssClass(i)).css("display",i.expanded?"":"none"),n||r.attr("role","group"),t._nodes(r,i)},_nodes:function(t,n){var i,r=this,o=t.children("li");n=u({length:o.length},n),o.each((function(t,o){o=e(o),i={index:t,expanded:r._expanded(o)},ee(o),r._updateNodeClasses(o,n,i),r._group(o)}))},_checkboxes:function(){var t,n=this.options,i=n.checkboxes;i&&(t=(t=s.html.renderCheckBox(e(""),e.extend({},n,{rounded:"medium"}))).replace(">",""),typeof(i=u({template:function(e){var n=e.item;return t+' id="_'+n.uid+'" aria-hidden="true" type="checkbox" tabindex="-1"'+(i.name?'name="'+i.name+'"':"")+" "+(!1===n.enabled?"disabled":"")+" "+(n.checked?"checked":"")+"/>"}},n.checkboxes)).template==N&&(i.template=h(i.template)),n.checkboxes=i)},_updateNodeClasses:function(e,t,n){var i=e.children("div"),r=e.children("ul"),o=this.templates;if(!e.hasClass("k-treeview")){(n=n||{}).expanded=typeof n.expanded!=F?n.expanded:this._expanded(e),n.index=typeof n.index!=F?n.index:e.index(),n.enabled=typeof n.enabled!=F?n.enabled:!i.children(".k-in").hasClass("k-disabled"),(t=t||{}).firstLevel=typeof t.firstLevel!=F?t.firstLevel:e.parent().parent().hasClass(B),t.length=typeof t.length!=F?t.length:e.parent().children().length,e.removeClass("k-first k-last").addClass(o.wrapperCssClass(t,n)),i.removeClass("k-treeview-top k-treeview-mid k-treeview-bot").addClass(o.cssClass(t,n)),i.find(".k-checkbox").removeClass("k-checkbox k-disabled").addClass(o.checkboxClass(n));var a=i.children(".k-in"),s=a[0]&&"a"==a[0].nodeName.toLowerCase();if(a.removeClass("k-in k-link k-disabled").addClass(o.textClass(n,s)),r.length||"true"==e.attr("data-hasChildren")){var l=i.find(".k-treeview-toggle"),c=l.children("."+V);l.removeClass("k-treeview-toggle k-disabled").addClass(o.toggleButtonClass(n)),o.toggleIcon(c,n),r.addClass("k-group k-treeview-group")}}},_processNodes:function(t,n){for(var i=this.element.find(t),r=0;r=r.length?t.appendTo(n):t.insertBefore(r.eq(e))}),o),o||(this._updateNodeClasses(n,{},{expanded:!o}),i(n).css("display","block"))},_refreshChildren:function(e,t,n){var r,o,a,s=this.options,c=s.loadOnDemand,d=s.checkboxes&&s.checkboxes.checkChildren;if(i(e).empty(),t.length)for(this._appendItems(n,t,e),o=i(e).children(),c&&d&&this._bubbleIndeterminate(o.last()),r=0;rul").attr("role","tree"),this.trigger(M,{node:i?a:t}),this.dataSource.filter()&&this.options.checkboxes.checkChildren&&this.updateIndeterminate(a)}},_error:function(t){var n=t.node&&this.findByUid(t.node.uid),i=this.templates.retry({messages:this.options.messages});n?(this._progress(n,!1),this._expanded(n,!1),o(n).replaceWith(l.icon(e(O),{icon:"arrow-rotate-cw"})),t.node.loaded(!1)):(this._progress(!1),this.dataSource.data([]),this.element.html(i))},_retryRequest:function(e){e.preventDefault(),this.dataSource.fetch(this._attemptLoadCompleted.bind(this))},expand:function(e){this._processNodes(e,(function(e,t){this.toggle(t,!0)}))},collapse:function(e){this._processNodes(e,(function(e,t){this.toggle(t,!1)}))},enable:function(e,t){"boolean"==typeof e?(t=e,e=this.items()):t=2!=arguments.length||!!t,this._processNodes(e,(function(e,n){this.dataItem(n).set("enabled",t)}))},current:function(t){var n=this,i=n._current,r=n.element;return arguments.length>0&&t&&t.length?(i&&i.find(".k-in").first().removeClass("k-focus"),(i=n._current=e(t,r).closest(L)).find(".k-in").first().addClass("k-focus"),void n._updateActiveDescendant()):(i||(i=n._nextVisible(e())),i)},_updateActiveDescendant:function(){var e=this._current,t=e[0].id||this._ariaId,n=this.element.find("#"+this._ariaId);n.length>0&&n.removeAttr("id"),this.root.removeAttr(G),e.attr("id",t),this.root.attr(G,t)},select:function(t){var n=this,i=n.element;if(!arguments.length)return i.find(".k-selected").closest(L);t=e(t,i).closest(L),i.find(".k-selected").each((function(){var t=n.dataItem(this);t?(t.set("selected",!1),delete t.selected):e(this).removeClass("k-selected")})),t.length&&(n.dataItem(t).set("selected",!0),n._clickTarget=t),n.trigger(k)},_toggle:function(e,t,n){var i,o=this.options,a=r(e),s=n?"expand":"collapse";a.data("animating")||(i=t&&t.loaded(),n&&!i?(o.loadOnDemand&&this._progress(e,!0),a.remove(),t.load()):(this._updateNodeClasses(e,{},{expanded:n}),n||a.css("height",a.height()).css("height"),a.kendoStop(!0,!0).kendoAnimate(u({reset:!0},o.animation[s],{complete:function(){n&&a.css("height","")}}))))},toggle:function(t,n){t=e(t),o(t)&&(1==arguments.length&&(n=!this._expanded(t)),this._expanded(t,n))},destroy:function(){var e=this;f.fn.destroy.call(e),e.wrapper.off(v),e.wrapper.find(".k-checkbox-wrapper :checkbox").off(v),e._clickHandler=null,e._unbindDataSource(),e.dragging&&e.dragging.destroy(),e._dataSourceUids={},s.destroy(e.element),e.root=e.wrapper=e.element=null},_expanded:function(e,t,n){var i,o=s.attr("expanded"),a=t,l=a?"expand":"collapse";if(1==arguments.length)return i=this._dataItem(e),"true"===e.attr(o)||i&&i.expanded;i=this.dataItem(e),r(e).data("animating")||!n&&this._trigger(l,e)||(a?(e.attr(o,"true"),e.attr(q,"true")):(e.removeAttr(o),e.attr(q,"false")),i&&(i.set("expanded",a),a=i.expanded))},_progress:function(t,n){var i=this.element,r=this.templates.loading({messages:this.options.messages});1==arguments.length?((n=t)?i.html(r):i.empty(),this.element.attr(K,n)):(o(t).replaceWith(e(O).toggleClass("k-i-loading",n).toggleClass("k-icon",n)),t.attr(K,n))},text:function(e,t){var n=this.dataItem(e),i=this.options[$.text],r=n.level(),o=i.length,a=i[Math.min(r,o-1)];if(!t)return n[a];n.set(a,t)},_objectOrSelf:function(t){return e(t).closest("[data-role=treeview]").data("kendoTreeView")||this},_dataSourceMove:function(t,n,i,r){var o,a=this._objectOrSelf(i||n),s=a.dataSource,l=e.Deferred().resolve().promise();return i&&i[0]!=a.element[0]&&((o=a.dataItem(i)).loaded()||(a._progress(i,!0),l=o.load()),i!=this.root&&((s=o.children)&&s instanceof m||(o._initChildren(),o.loaded(!0),s=o.children))),t=this._toObservableData(t),r.call(a,s,t,l)},_toObservableData:function(t){var n,i,r,o=t;return((r=t)instanceof s.jQuery||window.jQuery&&r instanceof window.jQuery||Q(t))&&(n=this._objectOrSelf(t).dataSource,i=e(t).attr(s.attr("uid")),(o=n.getByUid(i))&&(o=n.remove(o))),o},_insert:function(e,t,n){t instanceof s.data.ObservableArray?t=t.toJSON():p(t)||(t=[t]);var i=e.parent();return i&&i._initChildren&&(i.hasChildren=!0,i._initChildren()),e.splice.apply(e,[n,0].concat(t)),this.findByUid(e[n].uid)},insertAfter:J(1),insertBefore:J(0),append:function(t,n,r){var o=this.root;if(!(n&&t instanceof jQuery&&n[0]===t[0]))return(n=n&&n.length?n:null)&&(o=i(n)),this._dataSourceMove(t,o,n,(function(t,i,o){var a,s=this;return o.done((function(){a=function(){n&&s._expanded(n,!0,!0);var e=t.data(),r=Math.max(e.length,0);return s._insert(e,i,r)}(),(r=r||e.noop)(a)})),a||null}))},_remove:function(t,n){var i,r,o,a=this;return(t=e(t,a.element)).attr("id")===a.root.attr(G)&&a.root.removeAttr(G),this.angular("cleanup",(function(){return{elements:t.get()}})),i=t.parent().parent(),r=t.prev(),o=t.next(),t[n?"detach":"remove"](),i.hasClass("k-item")&&(ee(i),a._updateNodeClasses(i)),a._updateNodeClasses(r),a._updateNodeClasses(o),t},remove:function(e){var t=this.dataItem(e);t&&this.dataSource.remove(t)},detach:function(e){return this._remove(e,!0)},findByText:function(t){return e(this.element).find(".k-in").filter((function(n,i){return e(i).text()==t})).closest(L)},findByUid:function(t){for(var n,i=this.element.find(".k-item"),r=s.attr("uid"),o=0;oul").attr("role","tree"),this.trigger("dataBound",{node:i?a:t}),this.dropdowntree._treeViewDataBound({node:i?a:t,sender:this}),this.options.checkboxes.checkChildren&&this.updateIndeterminate()}},_previousVisible:function(e){var t,i,r=this;if(!e.length||e.prev().length)for(i=e.length?e.prev():r.root.children().last();r._expanded(i)&&(t=n(i).children().last()).length;)i=t;else(i=r.parent(e)||e).length||(r.dropdowntree.checkAll&&r.dropdowntree.checkAll.is(":visible")?r.dropdowntree.checkAll.find(".k-checkbox").trigger("focus"):r.dropdowntree.filterInput?r.dropdowntree.filterInput.trigger("focus"):r.dropdowntree.wrapper.trigger("focus"));return i},_keydown:function(n){var i,o=this,u=n.keyCode,h=o.current(),p=o._expanded(h),f=h.find(".k-checkbox-wrapper").first().find(":checkbox"),m=r.support.isRtl(o.element);n.target==n.currentTarget&&(!m&&u==a.RIGHT||m&&u==a.LEFT?p?i=o._nextVisible(h):h.find(".k-in").first().hasClass(s)||o.expand(h):!m&&u==a.LEFT||m&&u==a.RIGHT?p&&!h.find(".k-in").first().hasClass(s)?o.collapse(h):(i=o.parent(h),o._enabled(i)||(i=t)):u==a.DOWN?i=o._nextVisible(h):u!=a.UP||n.altKey?u==a.HOME?i=o._nextVisible(e()):u==a.END?i=o._previousVisible(e()):u!=a.ENTER||h.find(".k-in").first().hasClass(s)?u==a.SPACEBAR&&f.length&&!h.find(".k-in").first().hasClass(s)?(f.prop(c,!f.prop(c)).data(d,!1).prop(d,!1),o._checkboxChange({target:f}),i=h):n.altKey&&u===a.UP||u===a.ESC?o._closePopup():u===a.TAB&&(n.preventDefault(),o._closePopup()):h.find(".k-in").first().hasClass("k-selected")||o._trigger(l,h)||o.select(h):i=o._previousVisible(h),i&&(n.preventDefault(),h[0]!=i[0]&&(o._trigger("navigate",i),o.current(i))))},_closePopup:function(){this.dropdowntree.close(),this.dropdowntree.wrapper.trigger("focus")},refresh:function(e){this.defaultrefresh(e),this.dropdowntree.options.skipUpdateOnBind||("itemchange"===e.action?this.dropdowntree._isMultipleSelection()?"checked"===e.field&&this.dropdowntree._checkValue(e.items[0]):"checked"!==e.field&&"expanded"!==e.field&&e.items[0].selected&&this.dropdowntree._selectValue(e.items[0]):this.dropdowntree.refresh(e))}});r.ui._dropdowntree=h}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,r=n.html,o=n.htmlEncode,a=n.mediaQuery,s=i.Widget,l=i._dropdowntree,c=n.data.ObservableArray,d=n.data.ObservableObject,u=e.extend,h=n._activeElement,p=".kendoDropDownTree",f=n.keys,m=n.support,g="k-hidden",v="width",_=m.browser,b=n._outerWidth,w=".",y="disabled",k="readonly",x="k-disabled",C="aria-disabled",S="k-focus",T="mouseenter"+p+" mouseleave"+p,D="tabindex",I="click",z="open",M="close",E="change",A=/"/g,H=".k-chip",R=n.ui.Widget.extend({init:function(t,i){var r=this;this.ns=p,n.ui.Widget.fn.init.call(this,t,i),this._selection=this._getSelection(),this._focusInputHandler=this._focusInput.bind(this),this._initial=this.element.val(),this._values=[];var o=this.options.value;if(null!==o&&o.length||(this._noInitialValue=!0),this._isNullorUndefined(o)||(this._valueMethodCalled=!0,this._values=Array.isArray(o)?o.slice(0):[o]),r.bigScreenMQL=a("large"),r.smallScreenMQL=a("small"),"auto"==r.options.adaptiveMode&&r.smallScreenMQL.onChange((function(){r.popup&&n.isFunction(r.popup.fullscreen)&&r.popup.fullscreen(r.smallScreenMQL.mediaQueryList.matches)})),this._inputTemplate(),this._accessors(),this._setTreeViewOptions(this.options),this._dataSource(),this._selection._initWrapper(),this._applyCssClasses(),this._placeholder(!0),this._tabindex(),this.wrapper.data(D,this.wrapper.attr(D)),this.tree=e("
      ").attr({tabIndex:-1,"aria-hidden":!0}),this.list=e("
      ").append(this.tree),this._header(),this._noData(),this._footer(),this._reset(),this._popup(),"auto"==r.options.adaptiveMode&&r.bigScreenMQL.onChange((function(){r.list=e("
      ").append(r.tree),r._header.bind(r)(),r._noData.bind(r)(),r._footer.bind(r)(),r._reset.bind(r)(),r.popup&&(r.popup.destroy(),r.popup.element.remove(),r.popup=null),r.treeview&&r.treeview.destroy(),r._popup.bind(r)(),r._filterHeader.bind(r)(),r._treeview.bind(r)(),r._renderFooter.bind(r)(),r._checkAll.bind(r)(),r._enable.bind(r)(),r._toggleCloseVisibility.bind(r)(),r._aria.bind(r)()})),this._clearButton(),this._filterHeader(),this._treeview(),this._renderFooter(),this._checkAll(),this._enable(),this._toggleCloseVisibility(),!this.options.autoBind){var s=i.text||"";this._isNullorUndefined(i.value)?s?this._textAccessor(s):i.placeholder&&this._placeholder(!0):this._preselect(i.value)}e(this.element).parents("fieldset").is(":disabled")&&this.enable(!1),this._valueMethodCalled=!1,this.options.label&&this._label(),this._aria(),n.notify(this)},_label:function(){var t=this,i=t.options,r=e.isPlainObject(i.label)?i.label:{content:i.label};t.label=new n.ui.Label(null,e.extend({},r,{widget:t,floatCheck:t._floatCheck.bind(t)})),t._inputLabel=t.label.element},_floatCheck:function(){return!(this.value()&&!this._isMultipleSelection()||this.value().length||this.text())&&!this.popup.visible()},_refreshFloatingLabel:function(){var e=this;e.label&&e.label.floatingLabel&&e.label.floatingLabel.refresh()},_preselect:function(e,t){this._selection._preselect(e,t)},_setTreeViewOptions:function(t){var n={autoBind:t.autoBind,checkboxes:t.checkboxes,dataImageUrlField:t.dataImageUrlField,dataSpriteCssClassField:t.dataSpriteCssClassField,dataTextField:t.dataTextField,dataUrlField:t.dataUrlField,loadOnDemand:t.loadOnDemand,size:t.size};this.options.treeview=e.extend({},n,this.options.treeview),t.template&&(this.options.treeview.template=t.template),t.size&&(this.options.treeview.size=t.size)},_dataSource:function(){var t=this.options.dataSource;this.dataSource=n.data.HierarchicalDataSource.create(t),t&&e.extend(this.options.treeview,{dataSource:this.dataSource})},_popupOpen:function(){var e=this.popup;e.wrapper=n.wrap(e.element)},_getSelection:function(){return this._isMultipleSelection()?(this.options._altname="MultiSelectTree",new i.DropDownTree.MultipleSelection(this)):new i.DropDownTree.SingleSelection(this)},setDataSource:function(e){this._isDataSourceSet=!0,this._tags&&(this._noInitialValue=!0,this.setValue([]),this._tags.empty(),this.span.show(),this._multipleTags.empty()),this.dataSource=e,this.treeview.setDataSource(e),this._isDataSourceSet=!1},_isMultipleSelection:function(){return this.options&&(this.options.treeview.checkboxes||this.options.checkboxes)},options:{name:"DropDownTree",adaptiveMode:"none",animation:{},autoBind:!0,autoClose:!0,autoWidth:!1,clearButton:!0,dataTextField:"",dataValueField:"",dataImageUrlField:"",dataSpriteCssClassField:"",dataUrlField:"",delay:500,enabled:!0,enforceMinLength:!1,filter:"none",height:200,ignoreCase:!0,index:0,loadOnDemand:!1,messages:{singleTag:"item(s) selected",clear:"clear",deleteTag:"delete",noData:"No data found."},minLength:1,checkboxes:!1,noDataTemplate:!0,placeholder:"",checkAll:!1,checkAllTemplate:function(){return"Check all"},tagMode:"multiple",template:null,text:null,treeview:{},valuePrimitive:!1,footerTemplate:function(){return""},headerTemplate:function(){return""},value:null,valueTemplate:null,popup:null,filterLabel:null,size:"medium",fillMode:"solid",rounded:"medium",label:null},events:["open","close","dataBound",E,"select","filtering"],focus:function(){this.wrapper.trigger("focus")},dataItem:function(e){return this.treeview.dataItem(e)},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this._toggleCloseVisibility(),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this._toggleCloseVisibility(),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e=e===t||e)},toggle:function(e){this._toggle(e)},open:function(){var e=this.popup;this.options.autoBind||this.dataSource.data().length||(this.treeview._progress(!0),this._isFilterEnabled()?this._search():this.dataSource.fetch()),!e.visible()&&this._allowOpening()&&(e.one("activate",this._focusInputHandler),e._hovered=!0,e.open())},close:function(){this.popup.close()},search:function(e){var t,n=this.options;if(clearTimeout(this._typingTimeout),!n.enforceMinLength&&!e.length||e.length>=n.minLength){if(t=this._getFilter(e),this.trigger("filtering",{filter:t})||Array.isArray(this.options.dataTextField))return;this._filtering=!0,this.treeview.dataSource.filter(t)}},_getFilter:function(e){return{field:this.options.dataTextField,operator:this.options.filter,value:e,ignoreCase:this.options.ignoreCase}},refresh:function(){var t=this.treeview.dataSource.flatView();this._renderFooter(),this._renderNoData(),this.filterInput&&this.checkAll&&this.checkAll.toggle(!this.filterInput.val().length),this.tree.toggle(!!t.length),e(this.noData).toggle(!t.length)},setOptions:function(e){this.options.checkboxes!=e.checkboxes&&(delete e.checkboxes,window.console.warn("setOptions method can not be used to set the checkboxes option in DropDownTree")),s.fn.setOptions.call(this,e),this._setTreeViewOptions(e),this._dataSource(),(this.options.treeview||e.size)&&this.treeview.setOptions(this.options.treeview),e.height&&this.tree&&this.tree.css("max-height",e.height),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData(),this.span&&(this._isMultipleSelection()||this.span.hasClass("k-readonly"))&&this._placeholder(!0),this._inputTemplate(),this._accessors(),this._filterHeader(),this._checkAll(),this._enable(),e&&(e.enable||e.enabled)&&this.enable(!0),this._clearButton(),e!==t&&null!==e||(e={}),e.label&&this._inputLabel?this.label.setOptions(e.label):!1===e.label?(this.label._unwrapFloating(),this._inputLabel.remove(),delete this._inputLabel):e.label&&this._label()},destroy:function(){n.ui.Widget.fn.destroy.call(this),this.treeview&&this.treeview.destroy(),this.popup.destroy(),this.wrapper.off(p),this._clear.off(p),this.filterInput&&this.filterInput.off(p),this.tagList&&this.tagList.off(p),this.bigScreenMQL&&this.bigScreenMQL.destroy(),this.smallScreenMQL&&this.smallScreenMQL.destroy(),n.unbind(this.tagList),this.options.checkAll&&this.checkAll&&this.checkAll.off(p),this._form&&this._form.off("reset",this._resetHandler),this.label&&this.label.destroy()},setValue:function(e){e=Array.isArray(e)||e instanceof c?e.slice(0):[e],this._values=e},items:function(){return this.treeview.items()},value:function(e){var t=this;if(e)if(t.filterInput&&t.dataSource._filter)t._filtering=!0,t.dataSource.filter({});else if(!t.dataSource.data().length||!t.treeview.dataSource.data().length)return void(t.options.loadOnDemand?t.dataSource.fetch((function(){t._selection._setValue(e)})):(t.treeview.one("loadCompleted",(function(){t._selection._setValue(e)})),!t.options.autoBind&&t.options.valuePrimitive&&t.dataSource.fetch()));return t._selection._setValue(e)},text:function(e){var n,i=this.options.ignoreCase;if((e=null===e?"":e)===t||this._isMultipleSelection())return this._textAccessor();"string"==typeof e?(n=i?e:e.toLowerCase(),this._selectItemByText(n),this._textAccessor(n),this._refreshFloatingLabel()):this._textAccessor(e)},_aria:function(){this.wrapper.find("span.k-input-inner");this.wrapper.attr({"aria-haspopup":"tree","aria-expanded":!1,"aria-controls":this.treeview.element.attr("id"),role:"combobox"}),this._activeId=n.guid(),this._ariaLabel(this.wrapper),this.filterInput&&this.options.filterLabel&&this.filterInput.attr("aria-label",this.options.filterLabel),this.options.checkboxes&&(this.wrapper.attr({"aria-describedby":this.tagList[0].id}),this.tagList.attr({role:"listbox","aria-orientation":"horizontal","aria-multiselectable":!0}),this._ariaLabel(this.tagList))},_header:function(){var t=this,i=e(t.header),r=t.options.headerTemplate;if(this._angularElement(i,"cleanup"),n.destroy(i),i.remove(),r){var o="function"!=typeof r?n.template(r):r;i=e(o({})),t.header=i[0]?i:null,t.list.prepend(i),this._angularElement(t.header,"compile")}else t.header=null},_noData:function(){var t=this,i=e(t.noData),r=!0===t.options.noDataTemplate?o(t.options.messages.noData):t.options.noDataTemplate;t.angular("cleanup",(function(){return{elements:i}})),n.destroy(i),i.remove(),r?(t.noData=e('
      ').hide().appendTo(t.list),t.noDataTemplate="function"!=typeof r?n.template((function(){return r})):r):t.noData=null},_renderNoData:function(){var e=this,t=e.noData;t&&(this._angularElement(t,"cleanup"),t.html(e.noDataTemplate({instance:e})),this._angularElement(t,"compile"))},_footer:function(){var t=this,i=e(t.footer),r=t.options.footerTemplate;this._angularElement(i,"cleanup"),n.destroy(i),i.remove(),r?(t.footer=e('').appendTo(t.list),t.footerTemplate="function"!=typeof r?n.template(r):r):t.footer=null},_renderFooter:function(){var e=this,t=e.footer;t&&(this._angularElement(t,"cleanup"),t.html(e.footerTemplate({instance:e})),this._angularElement(t,"compile"))},_enable:function(){var e=this,n=e.options,i=e.element.is("[disabled]");n.enable!==t&&(n.enabled=n.enable),!n.enabled||i?e.enable(!1):e.readonly(e.element.is("[readonly]"))},_adjustListWidth:function(){var e,t,n=this,i=n.list,r=i[0].style.width,o=n.wrapper;if(i.data(v)||!r)return e=window.getComputedStyle?window.getComputedStyle(o[0],null):0,t=parseFloat(e&&e.width)||b(o),e&&_.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),r="border-box"!==i.css("box-sizing")?t-(b(i)-i.width()):t,i.css({fontFamily:o.css("font-family"),width:n.options.autoWidth?"auto":r,minWidth:r,whiteSpace:n.options.autoWidth?"nowrap":"normal"}).data(v,r),!0},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout((function(){t.value(t._initial)}))},t._form=r.on("reset",t._resetHandler))},_hasActionSheet:function(){return"auto"===this.options.adaptiveMode&&!this.bigScreenMQL.mediaQueryList.matches},_popup:function(){var t=this,r=this,o=this;r.options.checkboxes?(r.options.checkAll&&r.list.attr("role","application"),r.list.addClass("k-multiselecttree-popup")):r.list.addClass("k-dropdowntree-popup"),"auto"!=o.options.adaptiveMode||o.bigScreenMQL.mediaQueryList.matches?(o.popup=new i.Popup(o.list,u({},o.options.popup,{anchor:o.wrapper,open:o._openHandler.bind(o),close:o._closeHandler.bind(o),animation:o.options.animation,isRtl:m.isRtl(o.wrapper),autosize:o.options.autoWidth,deactivate:function(){t._refreshFloatingLabel()},activate:function(){t._refreshFloatingLabel()}})),o.popup.one("open",o._popupOpen.bind(o))):(e(document.body).append(o.list),o.popup=new i.ActionSheet(o.list,{adaptive:!0,hideOverflowContent:!0,headerTemplate:function(e){return'
      '+(o.label?o.label.element.text():o.options.label||o.options.placeholder||"Select")+"
      "+(o.options.placeholder&&(o.label||o.options.label)?'
      '+(o.options.placeholder||"")+"
      ":"")+"
      "+(e.closeButton?'
      '+n.html.renderButton('",{icon:"x",fillMode:"flat",size:"large"})+"
      ":"")+"
      "+(t._isFilterEnabled()?'
      ':"")+"
      "},closeButton:!0,focusOnActivate:!1,fullscreen:o.smallScreenMQL.mediaQueryList.matches,popup:u({},o.options.popup,{anchor:o.wrapper,open:o._openHandler.bind(o),close:o._closeHandler.bind(o),animation:o.options.animation,isRtl:m.isRtl(o.wrapper),autosize:o.options.autoWidth}),deactivate:function(){t._refreshFloatingLabel()},activate:function(){t._refreshFloatingLabel()}}))},_angularElement:function(e,t){e&&this.angular(t,(function(){return{elements:e}}))},_allowOpening:function(){return this.options.noDataTemplate||this.treeview.dataSource.flatView().length},_placeholder:function(e){this.span&&this.span.toggleClass("k-readonly",e).text(e?this.options.placeholder:"")},_currentValue:function(e){var t=this._value(e);return t||0===t||(t=e),t},_checkValue:function(t){var n="",i=-1,r=this.value(),o="multiple"===this.options.tagMode;if((t||0===t)&&(t.level&&(t._level=t.level()),n=this._currentValue(t),i=r.indexOf(n)),t.checked){if(e.grep(this._tags,(function(e){return e.uid===t._tagUid})).length)return;var a=new d(t.toJSON());t._tagUid=a.uid,this._tags.push(a),1===this._tags.length&&(this.span.hide(),o||this._multipleTags.push(a)),-1===i&&(r.push(n),this.setValue(r))}else{var s=this._tags.find((function(e){return e.uid===t._tagUid})),l=this._tags.indexOf(s);if(-1===l)return void this._treeViewCheckAllCheck(t);this._tags.splice(l,1),0===this._tags.length&&(this.span.show(),o||this._multipleTags.splice(0,1)),-1!==i&&(r.splice(i,1),this.setValue(r))}this._treeViewCheckAllCheck(t),this._preventChangeTrigger||this._valueMethodCalled||this._noInitialValue||this.trigger(E),this.options.autoClose&&this.popup.visible()&&(this.close(),this.wrapper.trigger("focus")),this.popup.position(),this._toggleCloseVisibility(),this._updateSelectedOptions()},_updateSelectedOptions:function(){if("select"===this.element[0].tagName.toLowerCase()){var e=this._tags,t="",n=null,i=null;if(e.length)for(var r=0;r"},_selectValue:function(e){var t="",n="";(e||0===e)&&(e.level&&(e._level=e.level()),n=this._text(e)||e,t=this._currentValue(e)),null===t&&(t=""),this.setValue(t),this._textAccessor(n,e),this._accessor(t),this._preventChangeTrigger||this._valueMethodCalled||this.trigger(E),this._valueMethodCalled=!1,this.options.autoClose&&this.popup.visible()&&(this.close(),this.wrapper.trigger("focus")),this.popup.position(),this._toggleCloseVisibility()},_clearClick:function(e){e.stopPropagation(),this.wrapper.trigger("focus"),this._clearTextAndValue()},_clearTextAndValue:function(){var e=this._selection._clearValue();this.setValue([]),this._clearInput(),this._clearText(),this.popup.position(),this._toggleCloseVisibility(),this._refreshFloatingLabel(),e&&this.trigger(E)},_clearText:function(){this.options.placeholder?this._placeholder(!0):this.span&&this.span.html("")},_inputTemplate:function(){var e=this,t=this.options.valueTemplate;t=t?n.template(t):function(t){return o(e._text(t))},this.valueTemplate=t},_assignInstance:function(e,t){var n=this.options.dataTextField,i={};return n?(F(i,n.split(w),e),F(i,this.options.dataValueField.split(w),t),i=new d(i)):i=e,i},_textAccessor:function(n,i){var r=this.valueTemplate,o=this.span;if(n===t)return o.text();o.removeClass("k-readonly"),!i&&(e.isPlainObject(n)||n instanceof d)&&(i=n),i||(i=this._assignInstance(n,this._accessor()));var a=function(){return{elements:o.get(),data:[{dataItem:i}]}};this.angular("cleanup",a);try{o.html(r(i))}catch(e){o&&o.html("")}this.angular("compile",a)},_accessors:function(){var t=this.element,i=this.options,r=n.getter,o=t.attr(n.attr("text-field")),a=t.attr(n.attr("value-field")),s=function(t){if(Array.isArray(t)){var n=t.length,i=e.map(t,(function(e){return function(t){return t[e]}}));return function(e){var t=e._level;if(t||0===t)return i[Math.min(t,n-1)](e)}}return r(t)};!i.dataTextField&&o&&(i.dataTextField=o),!i.dataValueField&&a&&(i.dataValueField=a),i.dataTextField=i.dataTextField||"text",i.dataValueField=i.dataValueField||"value",this._text=s(i.dataTextField),this._value=s(i.dataValueField)},_accessor:function(e,t){return this._accessorInput(e,t)},_accessorInput:function(e){var n=this.element[0];if(e===t)return n.value;null===e&&(e=""),n.value=e},_clearInput:function(){this.element[0].value=""},_clearButton:function(){var t=o(this.options.messages.clear);this._clear||(this._clear=e(''+n.ui.icon("x")+"").attr({tabIndex:-1})),this.options.clearButton?this._clear.insertAfter(this.span.parent()):this.options.clearButton||this._clear.remove()},_toggleCloseVisibility:function(){var e=this.element.attr(k),t=this.value()&&!this._isMultipleSelection()||this.value().length,n=this.element.val()&&this.element.val()!==this.options.placeholder;e||!t&&!n?this._hideClear():this._showClear()},_showClear:function(){this._clear&&this._clear.removeClass(g)},_hideClear:function(){this._clear&&this._clear.addClass(g)},_openHandler:function(e){this._adjustListWidth(),this.trigger(z)?e.preventDefault():(this.wrapper.attr("aria-expanded",!0),this.tree.attr("aria-hidden",!1))},_closeHandler:function(e){this.trigger(M)?e.preventDefault():(this.wrapper.attr("aria-expanded",!1),this.tree.attr("aria-hidden",!0))},_treeview:function(){var e=this;"auto"!=e.options.adaptiveMode&&e.options.height&&e.tree.css("max-height",e.options.height),e.tree.attr("id",n.guid()),e.treeview=new l(e.tree,u({size:e.options.size},e.options.treeview),e),e.dataSource=e.treeview.dataSource,e.treeview.bind("select",(function(t){e.trigger("select",t)}))},_treeViewDataBound:function(e){if(e.node&&this._prev&&this._prev.length&&e.sender.expand(e.node),this._filtering)return e.node||(this._filtering=!1),void(this._isMultipleSelection()||this._deselectItem(e));if(this.treeview||(this.treeview=e.sender),e.node){var t=e.sender.dataItem(e.node);if(t){var n=t.children.data();this._checkLoadedItems(n)}}else{var i=e.sender.dataSource.data();this._checkLoadedItems(i),this._noInitialValue&&(this._noInitialValue=!1)}this.trigger("dataBound",e)},_deselectItem:function(e){var t=[];if(e.node){var n=e.sender.dataItem(e.node);n&&(t=n.children.data())}else t=e.sender.dataSource.data();for(var i=0;i
      ";this.filterInput&&(this.filterInput.off(p).parent().remove(),this.filterInput=null),this._isFilterEnabled()&&(this._disableCheckChildren(),this.filterInput=e('').attr({placeholder:this.element.attr("placeholder"),title:this.element.attr("title"),role:"searchbox","aria-haspopup":"tree","aria-autocomplete":"list"}),this.filterInput.on("input",this._filterChange.bind(this)),this._hasActionSheet()?e(t).appendTo(this.popup.wrapper.find(".k-actionsheet-filter")).find(".k-textbox").append(this.filterInput):e(t).insertBefore(this.tree).find(".k-textbox").append(this.filterInput))},_filterChange:function(){this.filterInput&&this._search()},_disableCheckChildren:function(){this._isMultipleSelection()&&this.options.treeview.checkboxes&&this.options.treeview.checkboxes.checkChildren&&(this.options.treeview.checkboxes.checkChildren=!1)},_checkAll:function(){if(this.checkAll&&(this.checkAll.find(".k-checkbox-label, .k-checkbox").off(p),this.checkAll.remove(),this.checkAll=null),this._isMultipleSelection()&&this.options.checkAll){var t=r.renderCheckBox(u({},this.options,{label:"Check All",rounded:"medium"}));this.checkAll=e('
      '+t+"
      ").insertBefore(this.tree),this.checkAll.find(".k-checkbox-label").html(n.template(this.options.checkAllTemplate)({instance:this})),this.checkAll.find(".k-checkbox").on("change"+p,this._changeCheckAll.bind(this)).on("keydown"+p,this._keydownCheckAll.bind(this)),this._disabledCheckedItems=[],this._disabledUnCheckedItems=[],this._getAllChecked(),this._allItemsAreUnchecked||this._checkCheckAll()}},_changeCheckAll:function(){var e=this.checkAll.find(".k-checkbox").prop("checked");this._updateCheckAll(e)},_updateCheckAll:function(e){var t=this.checkAll.find(".k-checkbox");this._toggleCheckAllItems(e),t.prop("checked",e),this._disabledCheckedItems.length&&this._disabledUnCheckedItems.length?t.prop("indeterminate",!0):this._disabledCheckedItems.length?t.prop("indeterminate",!e):this._disabledUnCheckedItems.length?t.prop("indeterminate",e):t.prop("indeterminate",!1),this._disabledCheckedItems=[],this._disabledUnCheckedItems=[]},_keydownCheckAll:function(e){var t=e.keyCode;if(e.altKey&&t===f.UP||t===f.ESC||t===f.TAB)return this.close(),this.wrapper.trigger("focus"),void e.preventDefault();t===f.UP&&(this.filterInput?this.filterInput.trigger("focus"):this.wrapper.trigger("focus"),e.preventDefault()),t===f.DOWN&&(this.tree&&this.tree.is(":visible")&&this.tree.focus(),e.preventDefault()),t===f.SPACEBAR&&(_.msie||_.edge)&&(this._clickCheckAll(),e.preventDefault())},_clickCheckAll:function(){var e=this.checkAll.find(".k-checkbox"),t=e.prop("checked");this._updateCheckAll(!t),e.trigger("focus")},_dfs:function(e,t,n){for(var i=0;i").parent())[0].style.cssText=i.style.cssText,e[0].title=i.title),t._focused=t.wrapper=e.addClass("k-dropdowntree k-picker").addClass(i.className).removeClass("input-validation-error").removeClass("k-invalid").css("display","").attr({accesskey:n.attr("accesskey"),unselectable:"on"}),n.hide().removeAttr("accesskey")},_span:function(){var e,t=this._dropdowntree,n=t.wrapper,i="span.k-input-value-text";(e=n.find(i))[0]||(n.append(''+r.renderButton('',u({},t.options,{icon:"caret-alt-down",shape:"none",rounded:"none"}))).append(t.element),e=n.find(i)),t.span=e,t._arrow=n.find(".k-input-button"),t._arrowIcon=t._arrow.find(".k-icon,.k-svg-icon")},_setValue:function(e){var n,i=this._dropdowntree;return e===t||null===e?(e="object"==typeof(n=i._values.slice()[0])?n:i._accessor()||n)===t||null===e?"":e:(i._valueMethodCalled=!0,0===e.length?(i._clearTextAndValue(),void(i._valueMethodCalled=!1)):(i._selectItemByValue(e),i._toggleCloseVisibility(),void i._refreshFloatingLabel()))},_clearValue:function(){var e=this._dropdowntree,t=e.treeview.select(),n=e._values.length,i=!1;return e.treeview.dataItem(t)?(e.treeview.dataItem(t).set("selected",!1),i=!0):n>0&&(i=!0),!(e._valueMethodCalled||!i)},_checkLoadedItem:function(e,t){var n=this._dropdowntree;n._isNullorUndefined(t)||""===t?!t&&e.selected&&n.treeview.select(n.treeview.findByUid(e.uid)):n._valueComparer(e,t)?(n._preventChangeTrigger=!0,e.set("selected",!0),n._preventChangeTrigger=!1):e.selected&&n.treeview.select(n.treeview.findByUid(e.uid))}}),B=n.Class.extend({init:function(e){this._dropdowntree=e},_initWrapper:function(){var t=this._dropdowntree;this._tagTemplate(),t.element.attr("multiple","multiple").hide(),this._wrapper(),t._tags=new c([]),t._multipleTags=new c([]),this._tagList(),t.span=e('').appendTo(t.wrapper).find(".k-input-value-text")},_preselect:function(t,i){var r=this._dropdowntree,o=i||r.options.value;Array.isArray(t)||t instanceof n.data.ObservableArray||(t=[t]),(e.isPlainObject(t[0])||t[0]instanceof n.data.ObservableObject||!r.options.dataValueField)&&(r.dataSource.data(t),r.value(o))},_tagTemplate:function(){var t=this._dropdowntree,i=t.options,a=i.valueTemplate,s="multiple"===i.tagMode,l=o(i.messages.singleTag);a=a?n.template(a):t.valueTemplate,t.valueTemplate=function(n){return r.renderChip('",e.extend({},i,{fillMode:"solid",themeColor:"base",rounded:"medium",attr:{unselectable:"on","aria-keyshortcuts":"Enter Delete",role:"option"},text:s?a(n):' '+l+"",removable:s,removeIcon:"x-circle",removableAttr:{unselectable:"on","aria-hidden":!0,"aria-label":t.options.messages.deleteTag,title:t.options.messages.deleteTag}}))}},_wrapper:function(){var e=this._dropdowntree,t=e.element,n=t.parent(".k-multiselecttree");n[0]||((n=t.wrap('').parent())[0].style.cssText=t[0].style.cssText,n[0].title=t[0].title),e.wrapper=n.addClass(t[0].className).css("display","")},_tagList:function(){var t=this._dropdowntree,i=t.wrapper.children("div.k-input-values");if(!i[0]){var o="multiple"===t.options.tagMode?"tags":"multipleTag";i=e(r.renderChipList('
      ',e.extend({selectable:"none"},t.options))).appendTo(t.wrapper)}t.tagList=i,t.tagList.attr("id",n.guid()+"_tagList"),t.wrapper.attr("aria-controls",t.tagList.attr("id"));var a=n.observable({multipleTag:t._multipleTags,tags:t._tags,tagTemplate:t.valueTemplate});n.bind(t.tagList,a),t.tagList.attr("data-stop",!0)},_refreshTagListAria:function(){var t=this;t.tagList&&r.renderChipList(t.tagList,e.extend({selectable:0===t.tagList.items().length?"none":"multiple"},t.options))},_setValue:function(e){var n=this._dropdowntree,i=n._values;if(e===t||null===e)return n._values.slice();n.setValue(e),n._valueMethodCalled=!0,e.length?(this._removeValues(i,e),n._checkItemByValue(e)):n._clearTextAndValue(),n._valueMethodCalled=!1,n._toggleCloseVisibility(),this._refreshTagListAria(),n._refreshFloatingLabel()},_removeValues:function(e,t){for(var n=this._dropdowntree,i=this._getNewValues(e,t),r=0;r0,i=!e.ul.find(e.listView.focus()).length;e.popup.visible()||(!e.listView.bound()&&t!==C||t===S?(e._open=!0,e._state=T,1!==e.options.minLength&&!n||n&&e.value()&&-1===e.selectedIndex?(e.refresh(),e._openPopup(),this.options.virtual||e.listView.bound(!1)):e._filterSource()):e._allowOpening()&&(e.popup._hovered=!0,e._openPopup(),e.options.virtual?e._focusItem():i&&e.options.highlightFirst&&e.listView.focus(0)))},_scrollToFocusedItem:function(){var e=this.listView;e.scrollToIndex(e.getElementIndex(e.focus()))},_openPopup:function(){this.popup.one("activate",this._scrollToFocusedItem.bind(this)),this.popup.open()},_updateSelectionState:function(){var e=this,n=e.options.text,i=e.options.value;e.listView.isFiltered()||(-1===e.selectedIndex?(n!==t&&null!==n||(n=i),e._accessor(i),e.input.val(n||e.input.val()),e._placeholder()):-1===e._oldIndex&&(e._oldIndex=e.selectedIndex))},_buildOptions:function(e){var n=this;if(n._isSelect){var i=n._customOption;n._state===T&&(n._state=""),n._customOption=t,n._options(e,"",n.value()),i&&i[0].selected&&!n.listView._emptySearch&&n._custom(i.val())}},_updateSelection:function(){var t=this,n=t.listView,i=t._initialIndex,r=null!==i&&i>-1;if(t._state===C)e(n.focus()).removeClass("k-selected");else if(!t._fetch){n.value().length||(r?t.select(i):t._accessor()&&n.value(t._accessor())),t._initialIndex=null;var o=n.selectedDataItems()[0];o&&(t._value(o)!==t.value()?t._custom(t._value(o)):t._value(o)!==t.element[0].value&&t._accessor(t._value(o)),t.text()&&t.text()!==t._text(o)&&t._selectValue(o))}},_updateItemFocus:function(){var e=this.listView;this.options.highlightFirst?e.focus()||e.focusIndex()||e.focus(0):e.focus(-1)},_listBound:function(){var e=this,n=e.input[0]===u()||e.filterInput&&e.filterInput[0]===u(),i=e.dataSource.flatView(),r=e.listView.skip(),o=i.length,a=e.dataSource._group?e.dataSource._group.length:0,s=r===t||0===r;e._presetValue=!1,e._renderFooter(),e._renderNoData(),e._toggleNoData(!o),e._toggleHeader(!!a&&!!o),e._resizePopup(),e.popup.position(),e._buildOptions(i),e._updateSelection(),i.length&&s&&(e._updateItemFocus(),e.options.suggest&&n&&e.input.val()&&e.suggest(i[0])),e._open&&(e._open=!1,e._typingTimeout&&!n?e.popup.close():e.toggle(e._allowOpening()),e._typingTimeout=null),e._hideBusy(),e.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),this._presetValue&&(this._oldIndex=this.selectedIndex)},_get:function(e){var t,n,i;if("function"==typeof e){for(t=this.dataSource.flatView(),i=0;i-1&&(o+=e.substring(n+o.length))):o=o.substring(0,s),o.length===s&&e||(r.value=o,r===u()&&l(r,s,o.length))):i._last=t},text:function(e){e=null===e?"":e;var n,i,r=this,o=r.filterInput&&r.filterInput[0]===u()?r.filterInput[0]:r.input[0],s=r.options.ignoreCase,l=e;if(e===t)return o.value;!1!==r.options.autoBind||r.listView.bound()?(n=r.dataItem())&&r._text(n).replace&&r._text(n).replace(D,"")===e&&(i=r._value(n))===a.unifyType(r._old,typeof i)?r._triggerCascade():(s&&(l=l.toLowerCase()),r.dataItem()&&r._text(r.dataItem())===e||(r._select((function(e){return e=r._text(e),s&&(e=(e+"").toLowerCase()),e===l})).done((function(){r.selectedIndex<0&&(o.value=e,r.options.syncValueAndText&&r._accessor(e),r._cascadeTriggered=!0,r._triggerCascade(),r._refreshFloatingLabel()),r._prev=o.value})),r._toggleCloseVisibility())):r._setText(e)},toggle:function(e){this._toggle(e,!0)},value:function(e){var n=this,i=n.options,r=n.listView;if(e===t)return(e=n._accessor()||n.listView.value()[0])===t||null===e?"":e;n.requireValueMapper(n.options,e),n.trigger("set",{value:e}),(e!==i.value||n.input.val()!==i.text||n.options.cascadeFrom)&&(n._accessor(e),n._isFilterEnabled()&&r.bound()&&r.isFiltered()?n._clearFilter():n._fetchData(),r.value(e).done((function(){-1!==n.selectedIndex||r._selectedDataItems&&r._selectedDataItems.length||(n._accessor(e),n.input.val(e),n._placeholder(!0)),n._userTriggered?n._old=n._accessor():n._old=n._valueBeforeCascade=n._accessor(),n._oldIndex=n.selectedIndex,n._prev=n._oldText=n.input.val(),n._state===C&&(n._state=S),n._toggleCloseVisibility(),n._refreshFloatingLabel()})))},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass("k-i-loading k-input-loading-icon"),e._focused.attr("aria-busy",!1),e._busy=null,e._toggleCloseVisibility()},_click:function(e){var t=this,n=e.item,i=t.listView.dataItemByIndex(t.listView.getElementIndex(n)),r=!0;e.preventDefault(),i&&((r=t._value(i)!==a.unifyType(t.value(),typeof t._value(i)))||t.input.val(t._text(i))),r&&t.trigger("select",{dataItem:i,item:n})?t.close():(t._userTriggered=!0,t._select(n).done((function(){t._blur()})))},_syncValueAndText:function(){return this.options.syncValueAndText},_inputValue:function(){return this.text()},_searchByWord:function(e){var n=this,i=n.options,r=n.dataSource,o=i.ignoreCase;if(o&&(e=e.toLowerCase()),n.ul[0].firstChild){this.listView.focus(this._get((function(i){var r=n._text(i);if(r!==t)return(""==(r+="")||""!==e)&&(o&&(r=r.toLowerCase()),0===r.indexOf(e))})));var a=this.listView.focus();a&&(i.suggest&&n.suggest(a),this.open()),this.options.highlightFirst&&!e&&this.listView.focusFirst()}else r.one(b,(function(){r.view()[0]&&n.search(e)})).fetch()},_input:function(){var e,t,n,i=this,r=i.element.removeClass("k-input-inner")[0],a=r.accessKey,s=i.wrapper,l="input.k-input-inner",c=r.name||"",u=i.options;c&&(c='name="'+c+'_input" '),(e=s.find(l))[0]||(n=o.renderButton('',{icon:"caret-alt-down",size:u.size,fillMode:u.fillMode,shape:"none",rounded:"none"}),s.append("').append(n).append(i.element),e=s.find(l)),e[0].style.cssText=r.style.cssText,e[0].title=r.title,(t=parseInt(this.element.prop("maxlength")||this.element.attr("maxlength"),10))>-1&&(e[0].maxLength=t),e.addClass(r.className).css({width:"",height:r.style.height,position:""}).attr({role:"combobox","aria-expanded":!1}).show(),d&&e.attr("placeholder",i.options.placeholder),a&&(r.accessKey="",e[0].accessKey=a),i._focused=i.input=e,i._arrow=s.find(".k-input-button").attr({role:"button",tabIndex:-1}),i._arrowIcon=i._arrow.find(".k-icon, .k-svg-icon")},_clearButton:function(){a.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-combobox-clearable"))},_keydown:function(e){var t=this,n=e.keyCode,i=t.options.dataTextField||"text",r=n>=112&&n<=135,o=I.indexOf(n)>-1;if(t._last=n,clearTimeout(t._typingTimeout),t._typingTimeout=null,n===h.HOME)t._firstItem();else if(n===h.END)t._lastItem();else if(n===h.ENTER||n===h.TAB&&t.popup.visible()){var s=t.listView.focus(),l=t.dataItem(),c=!0;if(t.popup.visible()||l&&t.text()===t._text(l)||(s=null),s){if(t.popup.visible()&&e.preventDefault(),(l=t.listView.dataItemByIndex(t.listView.getElementIndex(s)))&&(c=t._value(l)!==a.unifyType(t.value(),typeof t._value(l))),c&&t.trigger("select",{dataItem:l,item:s}))return;t._userTriggered=!0,t._select(s).done((function(){t._blur(),t._valueBeforeCascade=t._old=t.value()}))}else{if((t._syncValueAndText()||t._isSelect)&&(!t.dataItem()||t.dataItem()[i]!==t.input.val())){var d=t.filterInput&&u()===t.filterInput[0]?t.filterInput:t.input;t._accessor(d.val())}t.options.highlightFirst?(t.listView.value(t.input.val()),t._blur()):t._oldText=t.text()}}else n==h.TAB||t._move(e)||o||r||e.ctrlKey?t.options.clearOnEscape&&n===h.ESC&&!t.popup.visible()&&t.text()&&t._clearValue():t._search()},_placeholder:function(e){if(!d){var n,i=this,r=i.input,o=i.options.placeholder;if(o){if(n=i.value(),e===t&&(e=!n),r.toggleClass("k-readonly",e),!e){if(n)return;o=""}r.val(o),o||r[0]!==u()||l(r[0],0,0)}}},_search:function(){var e=this;clearTimeout(e._typingTimeout),e._typingTimeout=setTimeout((function(){var n=e.text();""!==n&&e._prev!==n?(e._prev=n,"none"===e.options.filter&&e.options.virtual&&e.listView.select(-1),e.search(n),e._toggleCloseVisibility()):""===n&&""!==e._prev&&e._prev!==t&&(e._clearValue(),e._open=!0,e._state=T),e._typingTimeout=null}),e.options.delay)},_setText:function(e){this.input.val(e),this._prev=e},_wrapper:function(){var e=this.element,t=e.parent();t.is("span.k-input")||((t=e.hide().wrap("").parent())[0].style.cssText=e[0].style.cssText),this.wrapper=t.addClass("k-input k-combobox").addClass(e[0].className).removeClass("input-validation-error").css("display","")},_clearSelection:function(e,t){var n=e.value(),i=n&&-1===e.selectedIndex;-1==this.selectedIndex&&this.value()||(t||!n||i)&&(this.options.value="",this.value(""))},_preselect:function(e,t){this.input.val(t),this._accessor(e),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._placeholder(),this._initialIndex=null,this._presetValue=!0,this._toggleCloseVisibility()},_clearText:function(){this._old=this.value(),this.text("")},_clearValue:function(){var e=this,t=e.filterInput&&e.filterInput[0]===u()?e.filterInput:e.input;s.fn._clearValue.call(this),t.trigger("focus")}});r.plugin(z),n.cssProperties.registerPrefix("ComboBox","k-input-"),n.cssProperties.registerValues("ComboBox",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=i.List,o=n.htmlEncode,a=n.html,s=e.extend({A:65},n.keys),l=n._activeElement,c=n.data.ObservableArray,d="id",u=".k-chip",h="accept",p="filter",f="rebind",m="open",g="close",v="change",_="select",b="deselect",w="aria-disabled",y="aria-readonly",k="aria-expanded",x="aria-hidden",C="aria-activedescendant",S="aria-busy",T="k-focus",D="k-selected",I="k-hidden",z="k-hover",M="k-disabled",E="k-no-click",A="disabled",H="readonly",R=".kendoMultiSelect",F="click"+R,P="mouseenter"+R,B="mouseleave"+R,L=/"/g,V=Array.isArray,O=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],N=r.extend({init:function(t,i){var o,a=this;a.ns=R,r.fn.init.call(a,t,i),a._optionsMap={},a._customOptions={},a._wrapper(),a._inputValuesContainer(),a._tagList(),a._input(),a._textContainer(),a._loader(),a._clearButton(),a._arrowButton(),a._tabindex(a.input),t=a.element.attr("multiple","multiple").hide(),(i=a.options).placeholder||(i.placeholder=t.data("placeholder")),(o=t.attr(d))||(o=n.guid()),o&&(a._tagID=o+"_tag_active",o+="_taglist",a.tagList.attr(d,o)),a._initialOpen=!0,i.label&&this._label(),a._aria(),a._dataSource(),a._ignoreCase(),a._popup(),a._tagTemplate(),a.requireValueMapper(a.options),a._initList(),a._reset(),a._enable(),a._placeholder(),i.autoBind?a.dataSource.fetch():i.value&&a._preselect(i.value),e(a.element).parents("fieldset").is(":disabled")&&a.enable(!1),a._toggleCloseVisibility(),a._applyCssClasses(),n.notify(a)},options:{name:"MultiSelect",tagMode:"multiple",enabled:!0,autoBind:!0,autoClose:!0,highlightFirst:!0,dataTextField:"",dataValueField:"",filter:"startswith",ignoreCase:!0,minLength:1,messages:{singleTag:"item(s) selected",clear:"clear",deleteTag:"delete",noData:"No data found.",downArrow:"select"},enforceMinLength:!1,delay:100,value:null,maxSelectedItems:null,placeholder:"",height:200,animation:{},virtual:!1,itemTemplate:"",tagTemplate:"",groupTemplate:function(e){return o(e)},fixedGroupTemplate:function(e){return o(e)},clearButton:!0,autoWidth:!1,popup:null,size:"medium",fillMode:"solid",rounded:"medium",label:null},events:[m,g,v,_,b,"filtering","dataBinding","dataBound"],setDataSource:function(e){this.options.dataSource=e,this._state="",this._dataSource(),this.persistTagList=!1,this.listView.setDataSource(this.dataSource),this.options.autoBind&&this.dataSource.fetch()},setOptions:function(e){var t=this._listOptions(e);r.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(),this._tagTemplate(),this._placeholder(),this._clearButton(),this._arrowButton()},currentTag:function(e){var n=this;if(e===t)return n._currentTag;n._currentTag&&(n._currentTag.removeClass(T).removeAttr(d),n._currentTag.find(".k-chip-action").attr(x,!0),n.input.removeAttr(C)),e&&(e.addClass(T).attr(d,n._tagID),e.find(".k-chip-action").removeAttr(x),n.input.attr(C,n._tagID)),n._currentTag=e},dataItems:function(){return this.listView.selectedDataItems()},destroy:function(){var e=this,t=e.ns;clearTimeout(e._busy),clearTimeout(e._typingTimeout),e.filterInput&&e.filterInput.off(t),e.wrapper.off(t),e.tagList.off(t),e.input.off(t),e._clear.off(t),r.fn.destroy.call(e)},_onActionSheetCreate:function(){var e=this;e.filterInput.on("keydown"+R,e._keydown.bind(e)).on("input"+R,e._search.bind(e)).on("paste"+R,e._search.bind(e)).attr({role:"combobox","aria-expanded":!1,"aria-controls":e.input.attr("aria-controls"),"aria-autocomplete":e.input.attr("aria-autocomplete"),"aria-describedby":e.input.attr("aria-describedby")}),e.popup.bind("activate",(function(){e.filterInput.val(e.input.val()),e.filterInput.trigger("focus")})),e.popup.bind("close",(function(){e.input.trigger("focus")}))},_aria:function(){var e=this,t=e.ul[0].id,n="none"===this.options.filter?"none":"list",i=e.tagList.attr(d);e.input.attr({role:"combobox","aria-expanded":!1,"aria-controls":t,"aria-autocomplete":n,"aria-describedby":i}),e._ariaLabel(e._focused)},_activateItem:function(){this.popup.visible()&&r.fn._activateItem.call(this),this.currentTag(null)},_listOptions:function(t){var i=this,a=r.fn._listOptions.call(i,e.extend(t,{selectedItemChange:i._selectedItemChange.bind(i),selectable:"multiple"})),s=this.options.itemTemplate||this.options.template,l=a.itemTemplate||s||a.template;return l||(l=function(e){return o(n.getter(a.dataTextField)(e))}),a.template=l,a},_setListValue:function(){r.fn._setListValue.call(this,this._initialValues.slice(0))},_listChange:function(e){var n=this.dataSource.flatView(),i=this._optionsMap,r=this._value;this._state===f&&(this._state="");for(var o=0;o0&&(t=(r.filters[0].value||"").toString().toLowerCase()),n._request&&(n._retrieveData=!1),n._retrieveData||!n.listView.bound()||n._state===h&&i!==t?(n._open=!0,n._state=f,n.listView.skipUpdate(!0),n.persistTagList=!(n._initialOpen&&!n.listView.bound()),n._filterSource(),n._focusItem()):n._allowOpening()&&(!n._initialOpen||n.options.autoBind||n.options.virtual||!n.options.value||e.isPlainObject(n.options.value[0])||n.value(n.value()||n._initialValues),n.popup._hovered=!0,n._initialOpen=!1,n.popup.open({altTarget:n.wrapper.add(n.element).add(n.input)}),n._focusItem())},toggle:function(e){this[(e=e!==t?e:!this.popup.visible())?m:g]()},refresh:function(){this.listView.refresh()},_floatCheck:function(){return!this.listView||!(this.value()&&this.value().length)&&!this.popup.visible()},_listBound:function(){var e=this,t=e.dataSource.flatView();e._render(t),e._renderFooter(),e._renderNoData(),e._toggleNoData(!t.length),e._resizePopup(),e._open&&(e._open=!1,e.toggle(e._allowOpening())),e.popup.position(),e._updateItemFocus(),e._touchScroller&&e._touchScroller.reset(),e._hideBusy(),e.trigger("dataBound")},_updateItemFocus:function(){var e=this,n=e.dataSource.flatView(),i=e.listView.skip(),r=i===t||0===i;n.length&&r&&(e.options.highlightFirst?e.listView.focusFirst():e.listView.focus(-1))},_inputValue:function(){var e=this,t=e.filterInput&&l()===e.filterInput[0]?e.filterInput.val():e.input.val();return e.options.placeholder===t&&(t=""),t},value:function(e){var n=this,i=n.listView,r=i.value().slice(),o=n.options.maxSelectedItems,a=i.bound()&&i.isFiltered();if(e===t)return r;n.persistTagList=!1,n.requireValueMapper(n.options,e),e=n._normalizeValues(e),null!==o&&e.length>o&&(e=e.slice(0,o)),a&&n._clearFilter(),i.value(e),n._old=n._valueBeforeCascade=e.slice(),a||n._fetchData(),n._toggleCloseVisibility()},_preselect:function(t,i){var r=this;V(t)||t instanceof n.data.ObservableArray||(t=[t]),(e.isPlainObject(t[0])||t[0]instanceof n.data.ObservableObject||!r.options.dataValueField)&&(r.dataSource.data(t),r.value(i||r._initialValues),r._retrieveData=!0)},_setOption:function(e,t){var n=this.element[0].children[this._optionsMap[e]];n&&(n.selected=t)},_fetchData:function(){var e=this,t=!!e.dataSource.view().length;0===e.listView.value().length||e._request||(e._retrieveData||!e._fetch&&!t)&&(e._fetch=!0,e._retrieveData=!1,e.dataSource.read().done((function(){e._fetch=!1})))},_isBound:function(){return this.listView.bound()&&!this._retrieveData},_dataSource:function(){var e=this,t=e.element,i=e.options,r=i.dataSource||{};(r=V(r)?{data:r}:r).select=t,r.fields=[{field:i.dataTextField},{field:i.dataValueField}],e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._progressHandler=e._showBusy.bind(e),e._errorHandler=e._hideBusy.bind(e)),e.dataSource=n.data.DataSource.create(r).bind("progress",e._progressHandler).bind("error",e._errorHandler)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout((function(){t.value(t._initialValues),t._placeholder()}))},t._form=r.on("reset",t._resetHandler))},_initValue:function(){var e=this.options.value||this.element.val();this._old=this._initialValues=this._normalizeValues(e)},_normalizeValues:function(t){var n=this;return null===t?t=[]:t&&e.isPlainObject(t)?t=[n._value(t)]:t&&e.isPlainObject(t[0])?t=e.map(t,(function(e){return n._value(e)})):V(t)||t instanceof c?V(t)&&(t=t.slice()):t=[t],t},_change:function(){var e=this,t=e.value();(function(e,t){var n;if(null===e&&null!==t||null!==e&&null===t)return!1;if((n=e.length)!==t.length)return!1;for(;n--;)if(e[n]!==t[n])return!1;return!0})(t,e._old)||(e._old=t.slice(),e.trigger(v),e.element.trigger(v)),e.popup.position(),e._toggleCloseVisibility()},_click:function(e){var t=this,n=e.item;e.preventDefault(),t._select(n).done((function(){t._activeItem=n,t._change(),t._close()}))},_getActiveItem:function(){return this._activeItem||e(this.listView.items()[this._getSelectedIndices().length-1])||this.listView.focus()},_getSelectedIndices:function(){return this.listView._selectedIndices||this.listView._selectedIndexes},_keydown:function(i){var r,o=this,a=i.keyCode,l=o._currentTag,c=o.listView,d=o.input.val(),p=n.support.isRtl(o.wrapper),f=o.popup.visible(),m=0;if(a!==s.ENTER&&(this._multipleSelection=!1),a===s.DOWN){if(i.preventDefault(),!f)return o.open(),void(c.focus()||c.focusFirst());c.focus()?(!o._activeItem&&i.shiftKey&&(o._activeItem=c.focus(),m=-1),r=c.getElementIndex(o._getActiveItem().first()),c.focusNext(),c.focus()?i.shiftKey&&!o.options.virtual&&(this._multipleSelection=!0,o._selectRange(r,c.getElementIndex(c.focus().first())+m)):c.focusLast()):c.focusFirst()}else if(a===s.UP)f&&(!o._activeItem&&i.shiftKey&&(o._activeItem=c.focus(),m=1),r=c.getElementIndex(o._getActiveItem().first()),c.focusPrev(),c.focus()?i.shiftKey&&!o.options.virtual&&(this._multipleSelection=!0,o._selectRange(r,c.getElementIndex(c.focus().first())+m)):o.close()),i.preventDefault();else if(a===s.LEFT&&!p||a===s.RIGHT&&p)d||(l=l?l.prev(u):o.tagList.children(u).last())[0]&&o.currentTag(l);else if(a===s.RIGHT&&!p||a===s.LEFT&&p)!d&&l&&(l=l.next(u),o.currentTag(l[0]?l:null));else if(i.ctrlKey&&!i.altKey&&a===s.A&&f&&!o.options.virtual)this._multipleSelection=!0,this._getSelectedIndices().length===c.items().length&&(o._activeItem=null),c.items().length&&o._selectRange(0,c.items().length-1);else if(a===s.ENTER&&f){if(!c.focus())return;if(i.preventDefault(),this._multipleSelection&&(this._multipleSelection=!1,c.focus().hasClass(D)))return void o._close();o._select(c.focus()).done((function(){o._change(),o._close()}))}else if(a===s.SPACEBAR&&i.ctrlKey&&f)o._activeItem&&c.focus()&&c.focus()[0]===o._activeItem[0]&&(o._activeItem=null),e(c.focus()).hasClass(D)||(o._activeItem=c.focus()),o._select(c.focus()).done((function(){o._change()})),i.preventDefault();else if(a===s.SPACEBAR&&i.shiftKey&&f&&!o.options.virtual){var g=c.getElementIndex(o._getActiveItem()),v=c.getElementIndex(c.focus());g!==t&&v!==t&&o._selectRange(g,v),i.preventDefault()}else if(a===s.ESC)f?i.preventDefault():(o.tagList.children(u).each((function(t,n){o._removeTag(e(n),!1)})),o._change()),o.close();else if(a===s.HOME)f?c.focus()?(i.ctrlKey&&i.shiftKey&&!o.options.virtual&&o._selectRange(c.getElementIndex(c.focus()[0]),0),c.focusFirst()):o.close():d||(l=o.tagList.children(u).first()[0])&&o.currentTag(e(l));else if(a===s.END)f?c.focus()?(i.ctrlKey&&i.shiftKey&&!o.options.virtual&&o._selectRange(c.getElementIndex(c.focus()[0]),c.element.children().length-1),c.focusLast()):o.close():d||(l=o.tagList.children(u).last()[0])&&o.currentTag(e(l));else if(a!==s.DELETE&&a!==s.BACKSPACE||d)if(!o.popup.visible()||a!==s.PAGEDOWN&&a!==s.PAGEUP)clearTimeout(o._typingTimeout),o._search();else{i.preventDefault();var _=a===s.PAGEDOWN?1:-1;c.scrollWith(_*c.screenHeight())}else{if(o._state=h,"single"===o.options.tagMode)return o._clearSingleTagValue(),o._change(),void o._close();a!==s.BACKSPACE||l||(l=o.tagList.children(u).last()),l&&l[0]&&o._removeTag(l,!0)}},_hideBusy:function(){var e=this;clearTimeout(e._busy),e.input.attr(S,!1),e._loading.addClass(I),e._request=!1,e._busy=null,e._toggleCloseVisibility()},_showBusyHandler:function(){this.input.attr(S,!0),this._loading.removeClass(I),this._hideClear()},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(e._showBusyHandler.bind(e),100))},_placeholder:function(e,i){var r=this,o=r.input,a=l(),s=r.options.placeholder,c=o.val(),d=o[0]===a,u=c.length;d&&!r.options.autoClose&&c!==s||(u=0,c=""),e===t&&(e=!1,o[0]!==a&&(e=!r.listView.selectedDataItems()[0])),r._prev=c,o.toggleClass("k-readonly",e).val(e?s:c),d&&!i&&n.caret(o[0],u,u)},_option:function(e,i,r){var o=""},_render:function(e){var t,n,i,r,o=this.listView.selectedDataItems(),a=this.listView.value(),s=e.length,l="";a.length!==o.length&&(o=this._buildSelectedItems(a));var c={},d={};for(r=0;rthis.listView.value().length},_angularTagItems:function(t){var n=this;n.angular(t,(function(){return{elements:n.tagList[0].children,data:e.map(n.dataItems(),(function(e){return{dataItem:e}}))}}))},updatePersistTagList:function(e,t){this.persistTagList.added&&this.persistTagList.added.length===t.length&&this.persistTagList.removed&&this.persistTagList.removed.length===e.length?this.persistTagList=!1:(this.listView._removedAddedIndexes=this._old.slice(),this.persistTagList={added:e,removed:t})},_selectValue:function(e,t){var i,r,o,a=this,s=a.dataSource.total(),l=a.tagList,c=a._value;if(this.persistTagList)return this.updatePersistTagList(e,t),void a._refreshTagListAria();if(a._angularTagItems("cleanup"),"multiple"===a.options.tagMode){for(o=t.length-1;o>-1;o--)i=t[o],l.children(u).length&&(l[0].removeChild(l[0].children[i.position]),a._setOption(c(i.dataItem),!1));for(o=0;o-1;o--)a._setOption(c(t[o].dataItem),!1);for(o=0;o=n;i--)l.push(i);for(null!==a&&l.length>a&&(l=l.slice(0,a)),i=0;i').appendTo(t._inputValuesContainer)),n.removeAttr("accesskey"),t._focused=t.input=r.attr({autocomplete:"off",title:n[0].title}),i&&t._focused.attr("accesskey",i)},_inputValuesContainer:function(){var t=this,n=t.wrapper.children(".k-input-values");n[0]||(n=e('
      ').appendTo(t.wrapper)),t._inputValuesContainer=n},_tagList:function(){var t=this,n=t.options,i=t._inputValuesContainer.children(".k-chip-list");i[0]||(i=e(a.renderChipList('
      ',e.extend({selectable:"none"},n))).appendTo(t._inputValuesContainer)),t.tagList=i},_tagTemplate:function(){var t,i=this,r=i.options,s=r.tagTemplate,l=r.dataSource,c="multiple"===r.tagMode,d=r.messages.singleTag;i.element[0].length&&!l&&(r.dataTextField=r.dataTextField||"text",r.dataValueField=r.dataValueField||"value"),t=c?function(e){return o(n.getter(r.dataTextField)(e))}:function(e){return e.values.length+" "+o(d)},i.tagTextTemplate=s=s?n.template(s):t,i.tagTemplate=function(t){return a.renderChip('',e.extend({},r,{fillMode:"solid",rounded:"medium",enabled:!i.element.is("[disabled]"),themeColor:"base",text:s(t),attr:{unselectable:"on","aria-selected":!0,role:"option","aria-keyshortcuts":c?"Enter Delete":"Enter"},removable:c,removableAttr:{unselectable:"on","aria-hidden":!0,"aria-label":i.options.messages.deleteTag,title:i.options.messages.deleteTag},icon:c?"":"caret-alt-down",iconAttr:{unselectable:"on","aria-hidden":!0,"aria-label":"open"}}))}},_loader:function(){this._loading=e('').insertAfter(this._inputValuesContainer)},_clearButton:function(){r.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this._inputValuesContainer),this.wrapper.addClass("k-multiselect-clearable"))},_arrowButton:function(){var t=o(this.options.messages.downArrow),n=e(a.renderButton('',e.extend({},this.options,{icon:"caret-alt-down"})));this._arrow&&(this._arrow.remove(),this._arrow=null),this.options.downArrow&&(this._arrow=n.attr({tabIndex:-1}),this._arrow.appendTo(this.wrapper))},_textContainer:function(){var t=n.getComputedStyles(this.input[0],O);t.position="absolute",t.visibility="hidden",t.top=-3333,t.left=-3333,this._span=e("").css(t).appendTo(this.wrapper)},_wrapper:function(){var e=this.element,t=e.parent("span.k-multiselect");t[0]||((t=e.wrap('').parent())[0].style.cssText=e[0].style.cssText),this.wrapper=t.addClass(e[0].className).removeClass("input-validation-error").css("display","")},_closeHandler:function(e){this.trigger(g)?e.preventDefault():(this.input.attr(k,!1),this.ul.attr(x,!0))},_openHandler:function(e){this._adjustListWidth(),this.trigger(m)?e.preventDefault():(this.input.attr(k,!0),this.ul.attr(x,!1))}});i.plugin(N),n.cssProperties.registerPrefix("MultiSelect","k-input-"),n.cssProperties.registerValues("MultiSelect",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=i.ComboBox,o=/^\d+(\.\d+)?%$/i,a=r.extend({init:function(e,t){r.fn.init.call(this,e,t),this.list.parent().addClass("k-dropdowngrid-popup"),this._allColumnsWidthsAreSet(this.options)?this.list.parent().width(this._calculateDropDownWidth(this.options)):this.options.dropDownWidth&&this.list.parent().width(this.options.dropDownWidth)},options:{name:"MultiColumnComboBox",ns:".kendoMultiColumnComboBox",columns:[],dropDownWidth:null,filterFields:[]},setOptions:function(e){r.fn.setOptions.call(this,e),this._allColumnsWidthsAreSet(e)?this.list.parent().width(this._calculateDropDownWidth(e)):this.options.dropDownWidth&&this.list.parent().width(this.options.dropDownWidth)},_allColumnsWidthsAreSet:function(e){var t=e.columns;if(!t||!t.length)return!1;for(var n=0;n=2&&(e(this.element).parent().find(".k-slider-items").remove(),t._trackDiv.before(function(e,t){var n,i=""}(n,t._distance())),t._setItemsTitle()),t._calculateSteps(r),"none"!=n.tickPlacement&&i>=2&&n.largeStep>=n.smallStep&&(t._setItemsLargeTick(),t.wrapper.find(M).first().addClass("k-first"),t.wrapper.find(M).last().addClass("k-last"))},getSize:function(){return n.dimensions(this.wrapper)},_setItemsTitle:function(){for(var t=this.options,n=this.wrapper.find(M),i=t.min,r=n.length,o=0;o<=r;o+=1)e(n[o]).attr("title",l(t.tooltip.format,W(i))),i+=t.smallStep},_setItemsLargeTick:function(){var t,n=this,i=n.options,r=n.wrapper.find(M),o=0;if(q(i.largeStep)%q(i.smallStep)==0||n._distance()/i.largeStep>=3)for(n._isHorizontal||n._isRtl||(r=e.makeArray(r).reverse()),o=0;o"+t.attr("title")+""),0!==o&&o!==r.length-1&&t.css("line-height",t[n._sizeFn]()+"px"))}},_calculateItemsWidth:function(e){var t,n,i,r=this,o=r.options,a=parseFloat(r._trackDiv.css(r._sizeFn))+1,s=r._distance(),l=q(s)/q(o.smallStep),c=a/q(s);for(l-e>0&&(a-=q(s)%q(o.smallStep)*c),t=a/e,n=[],i=0;i
      "}(i,n,e._isHorizontal)).hide().parents(".k-slider"),i.showButtons&&e.wrapper.find(".k-slider-track-wrap").after(L(i,"increase",e._isHorizontal,e._isRtl)).before(L(i,"decrease",e._isHorizontal,e._isRtl)),n.before(function(e,n,i){var r,o,a,s=n.is("input")?1:2,l=2==s?e.leftDragHandleTitle:e.dragHandleTitle,c=e.value,d=e.selectionStart,u=e.selectionEnd;1===s?null!==(r=n.val())&&r!==t&&"null"!==r&&(null!==c&&c!==t||(c=r)):(o=n.find("input").eq(0).val(),a=n.find("input").eq(1).val(),null!==o&&o!==t&&"null"!==o&&(null!==d&&d!==t||(d=o)),null!==a&&a!==t&&"null"!==a&&(null!==u&&u!==t||(u=a)));return"
      \x3c!-- --\x3e
      "+(s>1?"":"")+"
      "}(i,n,e._isHorizontal))},_focus:function(t){var n=this,i=t.target,r=n.value(),o=n._drag;o||(i==n.wrapper.find(I).eq(0)[0]?(o=n._firstHandleDrag,n._activeHandle=0):(o=n._lastHandleDrag,n._activeHandle=1),r=r[n._activeHandle]),e(i).addClass("k-focus k-selected"),o&&(n._activeHandleDrag=o,o.selectionStart=n.options.selectionStart,o.selectionEnd=n.options.selectionEnd,o._updateTooltip(r))},_focusWithMouse:function(t){t=e(t);var n=this,i=t.is(I)?t.index():0;window.setTimeout((function(){n.wrapper.find(I)[2==i?1:0].focus()}),1),n._setTooltipTimeout()},_blur:function(t){var n=this,i=n._activeHandleDrag;e(t.target).removeClass("k-focus k-selected"),i&&(i._removeTooltip(),delete n._activeHandleDrag,delete n._activeHandle)},_setTooltipTimeout:function(){var e=this;e._tooltipTimeout=window.setTimeout((function(){var t=e._drag||e._activeHandleDrag;t&&t._removeTooltip()}),300)},_clearTooltipTimeout:function(){window.clearTimeout(this._tooltipTimeout);var e=this._drag||this._activeHandleDrag;e&&e.tooltipDiv&&e.tooltipDiv.stop(!0,!1).css("opacity",1)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._form=r.on("reset",t._formResetHandler.bind(t)))},min:function(e){if(!e)return this.options.min;this.setOptions({min:e})},max:function(e){if(!e)return this.options.max;this.setOptions({max:e})},setOptions:function(e){i.fn.setOptions.call(this,e),this._sliderItemsInit(),this._refresh()},destroy:function(){this._form&&this._form.off("reset",this._formResetHandler),i.fn.destroy.call(this)}});function L(e,t,i,r){var o="";return o=i?"increase"===t?r?"caret-alt-left":"caret-alt-right":r?"caret-alt-right":"caret-alt-left":"increase"==t?"caret-alt-up":"caret-alt-down",""+n.ui.icon({icon:o,iconClass:"k-button-icon"})+""}function V(e){return function(t){return t+e}}function O(e){return function(){return e}}function N(e){return(e+"").replace(".",n.cultures.current.numberFormat["."])}function W(e){var t,n;return t=function(e){var t=e.toString(),n=0;return(t=t.split("."))[1]&&(n=t[1].length),n>10?10:n}(e=parseFloat(e,10)),n=u.pow(10,t||0),u.round(e*n)/n}function U(e,n){var i=c(e.getAttribute(n));return null===i&&(i=t),i}function j(e){return void 0!==e}function q(e){return 1e4*e}var G=B.extend({init:function(n,i){var r,o=this;n.type="text",i=s({},{value:U(n,"value"),min:U(n,"min"),max:U(n,"max"),smallStep:U(n,"step")},i),n=e(n),i&&i.enabled===t&&(i.enabled=!n.is("[disabled]")),B.fn.init.call(o,n,i),j((i=o.options).value)&&null!==i.value||(i.value=i.min,n.prop("value",N(i.min))),i.value=u.max(u.min(i.value,i.max),i.min),r=o.wrapper.find(I),o._selection=new G.Selection(r,o,i),o._drag=new G.Drag(r,"",o,i),o._refreshAriaAttr(i.value)},options:{name:"Slider",showButtons:!0,increaseButtonTitle:"Increase",decreaseButtonTitle:"Decrease",dragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},value:null},enable:function(t){var i,r,o=this,a=o.options;if(o.disable(),!1!==t){if(o.wrapper.removeClass(E),o.wrapper.find("input").prop(A,!1),i=function(t){var n=R(t)[0];if(n){var i=o._isHorizontal?n.location.pageX:n.location.pageY,r=o._getDraggableArea(),a=e(t.target);a.hasClass("k-draghandle")?a.addClass("k-focus k-selected"):(o._update(o._getValueFromPosition(i,r)),o._focusWithMouse(t.target),o._drag.dragstart(t),t.preventDefault())}},o.wrapper.find(".k-tick, .k-slider-track").on(b,i).end().on(b,(function(){e(document.documentElement).one("selectstart",n.preventDefault)})).on(y,(function(){o._drag._end()})),o.wrapper.find(I).attr(H,0).on(w,(function(){o._setTooltipTimeout()})).on(C,(function(e){o._focusWithMouse(e.target),e.preventDefault()})).on(T,o._focus.bind(o)).on(D,o._blur.bind(o)),r=function(e){var t=o._nextValueByIndex(o._valueIndex+1*e);o._setValueInRange(t),o._drag._updateTooltip(t)},a.showButtons){var s=function(e,t){this._clearTooltipTimeout(),(1===e.which||h.touch&&0===e.which)&&(r(t),this.timeout=setTimeout(function(){this.timer=setInterval((function(){r(t)}),60)}.bind(this),200))}.bind(o);o.wrapper.find(".k-button").on(w,function(e){this._clearTimer(),o._focusWithMouse(e.target)}.bind(o)).on(S,(function(t){e(t.currentTarget).addClass("k-hover")})).on("mouseout"+v,function(t){e(t.currentTarget).removeClass("k-hover"),this._clearTimer()}.bind(o)).on(_,(function(t){var n=e(t.target).closest(".k-button").is(".k-button-increase")?1:-1;s(t,n)})).on("click",n.preventDefault)}o.wrapper.find(I).off(x,!1).on(x,this._keydown.bind(o)),a.enabled=!0}},disable:function(){var t=this;t.wrapper.addClass(E),e(t.element).prop(A,A),t.wrapper.find(".k-button").off(_).on(_,(function(t){t.preventDefault(),e(this).addClass("k-active")})).off(w).on(w,(function(t){t.preventDefault(),e(this).removeClass("k-active")})).off("mouseleave"+v).on("mouseleave"+v,n.preventDefault).off(S).on(S,n.preventDefault),t.wrapper.find(".k-tick, .k-slider-track").off(b).off(y),t.wrapper.find(I).attr(H,-1).off(w).off(x).off(C).off(T).off(D),t.options.enabled=!1},_update:function(e){var t=this,n=t.value()!=e;t.value(e),n&&t.trigger(m,{value:t.options.value})},value:function(e){var t=this,n=t.options;if(e=W(e),isNaN(e))return n.value;e>=n.min&&e<=n.max&&n.value!=e&&(t.element.prop("value",N(e)),n.value=e,t._refreshAriaAttr(e),t._refresh())},_refresh:function(){this.trigger(k,{value:this.options.value})},_refreshAriaAttr:function(e){var t,n=this._drag;t=n&&n._tooltipDiv?n._tooltipDiv.text():this._getFormattedValue(e,null),this.wrapper.find(I).attr(P,e).attr(F,t)},_clearTimer:function(){clearTimeout(this.timeout),clearInterval(this.timer)},_keydown:function(e){var t=this;e.keyCode in t._keyMap&&(t._clearTooltipTimeout(),t._setValueInRange(t._keyMap[e.keyCode](t.options.value)),t._drag._updateTooltip(t.value()),e.preventDefault())},_setValueInRange:function(e){var t=this,n=t.options;e=W(e),isNaN(e)?t._update(n.min):(e=u.max(u.min(e,n.max),n.min),t._update(e))},_nextValueByIndex:function(e){var t=this._values.length;return this._values[u.max(0,u.min(e,t-1))]},_formResetHandler:function(){var e=this,t=e.options.min;setTimeout((function(){var n=e.element[0].value;e.value(""===n||isNaN(n)?t:n)}))},destroy:function(){var e=this;B.fn.destroy.call(e),e.wrapper.off(v).find(".k-button").off(v).end().find(I).off(v).end().find(".k-tick, .k-slider-track").off(v).end(),e._drag.draggable.destroy(),e._drag._removeTooltip(!0)}});G.Selection=function(e,t,n){function i(i){var r=i-n.min,o=t._valueIndex=u.ceil(W(r/n.smallStep)),a=parseInt(t._pixelSteps[o],10);t._trackDiv.find(".k-slider-selection")[t._sizeFn](a),e.css(t._position,a)}i(n.value),t.bind([g,k],(function(e){i(parseFloat(e.value,10))})),t.bind(m,(function(e){i(parseFloat(e.sender.value(),10))}))},G.Drag=function(e,t,n,i){var o=this;o.owner=n,o.options=i,o.element=e,o.type=t,o.draggable=new r(e,{distance:0,dragstart:o._dragstart.bind(o),drag:o.drag.bind(o),dragend:o.dragend.bind(o),dragcancel:o.dragcancel.bind(o)}),e.click(!1),e.on("dragstart",(function(e){e.preventDefault()}))},G.Drag.prototype={dragstart:function(e){this.owner._activeDragHandle=this,this.draggable.userEvents.cancel(),this._dragstart(e),this.dragend()},_dragstart:function(t){var n=this,i=n.owner,r=n.options;r.enabled?(this.owner._activeDragHandle=this,i.element.off(S),i.wrapper.find(".k-focus").removeClass("k-focus k-selected"),n.element.addClass("k-focus k-selected"),e(document.documentElement).css("cursor","pointer"),n.draggableArea=i._getDraggableArea(),n.step=u.max(r.smallStep*(i._maxSelection/i._distance()),0),n.type?(n.selectionStart=r.selectionStart,n.selectionEnd=r.selectionEnd,i._setZIndex(n.type)):n.oldVal=n.val=r.value,n._removeTooltip(!0),n._createTooltip()):t.preventDefault()},_createTooltip:function(){var t,i=this,r=i.owner,o=i.options.tooltip,a="",s=e(window);o.enabled&&(o.template&&(i.tooltipTemplate=n.template(o.template)),e(".k-slider-tooltip").remove(),i.tooltipDiv=e("").appendTo(document.body),a=r._getFormattedValue(i.val||r.value(),i),i.type||(t="k-callout-"+(r._isHorizontal?"s":"e"),i.tooltipInnerDiv="
      \x3c!-- --\x3e
      ",a+=i.tooltipInnerDiv),i.tooltipDiv.html(a),i._scrollOffset={top:s.scrollTop(),left:n.scrollLeft(s)},i.moveTooltip())},drag:function(e){var t,n=this,i=n.owner,r=e.x.location,o=e.y.location,a=n.draggableArea.startPoint,s=n.draggableArea.endPoint;e.preventDefault(),i._isHorizontal?i._isRtl?n.val=n.constrainValue(r,a,s,r=s):n.val=n.constrainValue(o,s,a,o<=s),n.oldVal!=n.val&&(n.oldVal=n.val,n.type?("firstHandle"==n.type?n.valn.selectionStart?n.selectionEnd=n.val:n.selectionStart=n.selectionEnd=n.val,t={values:[n.selectionStart,n.selectionEnd],value:[n.selectionStart,n.selectionEnd]}):t={value:n.val},i.trigger(g,t)),n._updateTooltip(n.val)},_updateTooltip:function(e){var t=this,n="";t.options.tooltip.enabled&&(t.tooltipDiv||t._createTooltip(),n=t.owner._getFormattedValue(W(e),t),t.type||(n+=t.tooltipInnerDiv),t.tooltipDiv.html(n),t.moveTooltip())},dragcancel:function(){return this.owner._refresh(),e(document.documentElement).css("cursor",""),this._end()},dragend:function(){var t=this,n=t.owner;return e(document.documentElement).css("cursor",""),t.type?n._update(t.selectionStart,t.selectionEnd):(n._update(t.val),t.draggable.userEvents._disposeAll()),t.draggable.userEvents.cancel(),t._end()},_end:function(){var e=this.owner;return e._focusWithMouse(this.element),e.element.on(S),!1},_removeTooltip:function(t){var n=this,i=n.owner;n.tooltipDiv&&i.options.tooltip.enabled&&i.options.enabled&&(t?(n.tooltipDiv.remove(),n.tooltipDiv=null):n.tooltipDiv.fadeOut("slow",(function(){e(this).remove(),n.tooltipDiv=null})))},moveTooltip:function(){var t,i,r,s,l=this,c=l.owner,d=0,u=0,h=l.element,p=n.getOffset(h),f=e(window),m=l.tooltipDiv.find(".k-callout"),g=o(l.tooltipDiv),v=a(l.tooltipDiv);l.type?(t=c.wrapper.find(I),p=n.getOffset(t.eq(0)),i=n.getOffset(t.eq(1)),c._isHorizontal?(d=i.top,u=p.left+(i.left-p.left)/2):(d=p.top+(i.top-p.top)/2,u=i.left),s=o(t.eq(0))+16):(d=p.top,u=p.left,s=o(h)+16),c._isHorizontal?(u-=parseInt((g-c._outerSize(h))/2,10),d-=v+8+(m.length?m.height():0)):(d-=parseInt((v-c._outerSize(h))/2,10),u-=g+8+(m.length?m.width():0)),c._isHorizontal?(d+=r=l._flip(d,v,s,a(f)+l._scrollOffset.top),u+=l._fit(u,g,o(f)+l._scrollOffset.left)):(r=l._flip(u,g,s,o(f)+l._scrollOffset.left),d+=l._fit(d,v,a(f)+l._scrollOffset.top),u+=r),r>0&&m&&(m.removeClass(),m.addClass("k-callout k-callout-"+(c._isHorizontal?"n":"w"))),l.tooltipDiv.css({top:d,left:u})},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),e<0&&(i=-e),i},_flip:function(e,t,n,i){var r=0;return e+t>i&&(r+=-(n+t)),e+r<0&&(r+=n+t),r},constrainValue:function(e,t,n,i){var r=this;return tr.selectionEnd?(i=o.selectionStart,a=d,s=r._lastHandleDrag):d-o.selectionStart<=o.selectionEnd-d?(i=d,a=o.selectionEnd,s=r._firstHandleDrag):(i=o.selectionStart,a=d,s=r._lastHandleDrag),s.dragstart(t),r._setValueInRange(i,a),r._focusWithMouse(s.element)}},r.wrapper.find(".k-tick, .k-slider-track").on(b,i).end().on(b,(function(){e(document.documentElement).one("selectstart",n.preventDefault)})).on(y,(function(){r._activeDragHandle&&r._activeDragHandle._end()})),r.wrapper.find(I).attr(H,0).on(w,(function(){r._setTooltipTimeout()})).on(C,(function(e){r._focusWithMouse(e.target),e.preventDefault()})).on(T,r._focus.bind(r)).on(D,r._blur.bind(r)),r.wrapper.find(I).off(x,n.preventDefault).eq(0).on(x,function(e){this._keydown(e,"firstHandle")}.bind(r)).end().eq(1).on(x,function(e){this._keydown(e,"lastHandle")}.bind(r)),r.options.enabled=!0)},disable:function(){var e=this;e.wrapper.addClass(E),e.wrapper.find("input").prop(A,A),e.wrapper.find(".k-tick, .k-slider-track").off(b).off(y),e.wrapper.find(I).attr(H,-1).off(w).off(x).off(C).off(T).off(D),e.options.enabled=!1},_keydown:function(e,t){var n,i,r,o=this,a=o.options.selectionStart,s=o.options.selectionEnd;e.keyCode in o._keyMap&&(o._clearTooltipTimeout(),"firstHandle"==t?(r=o._activeHandleDrag=o._firstHandleDrag,(a=o._keyMap[e.keyCode](a))>s&&(s=a)):(r=o._activeHandleDrag=o._lastHandleDrag,a>(s=o._keyMap[e.keyCode](s))&&(a=s)),o._setValueInRange(W(a),W(s)),n=Math.max(a,o.options.selectionStart),i=Math.min(s,o.options.selectionEnd),r.selectionEnd=Math.max(i,o.options.selectionStart),r.selectionStart=Math.min(n,o.options.selectionEnd),r._updateTooltip(o.value()[o._activeHandle]),e.preventDefault())},_update:function(e,t){var n=this,i=n.value(),r=i[0]!=e||i[1]!=t;n.value([e,t]),r&&n.trigger(m,{values:[e,t],value:[e,t]})},value:function(e){return e&&e.length?this._value(e[0],e[1]):this._value()},_value:function(e,t){var n=this,i=n.options,r=i.selectionStart,o=i.selectionEnd;if(isNaN(e)&&isNaN(t))return[r,o];e=W(e),t=W(t),e>=i.min&&e<=i.max&&t>=i.min&&t<=i.max&&e<=t&&(r==e&&o==t||(n.element.find("input").eq(0).prop("value",N(e)).end().eq(1).prop("value",N(t)),i.selectionStart=e,i.selectionEnd=t,n._refresh(),n._refreshAriaAttr(e,t)))},values:function(e,t){return d(e)?this._value(e[0],e[1]):this._value(e,t)},_refresh:function(){var e=this,t=e.options;e.trigger(k,{values:[t.selectionStart,t.selectionEnd],value:[t.selectionStart,t.selectionEnd]}),t.selectionStart==t.max&&t.selectionEnd==t.max&&e._setZIndex("firstHandle")},_refreshAriaAttr:function(e,t){var n,i=this,r=i.wrapper.find(I),o=i._activeHandleDrag;n=i._getFormattedValue([e,t],o),r.eq(0).attr(P,e),r.eq(1).attr(P,t),r.attr(F,n)},_setValueInRange:function(e,t){var n=this.options;e=u.max(u.min(e,n.max),n.min),t=u.max(u.min(t,n.max),n.min),e==n.max&&t==n.max&&this._setZIndex("firstHandle"),this._update(u.min(e,t),u.max(e,t))},_setZIndex:function(t){this.wrapper.find(I).each((function(n){e(this).css("z-index","firstHandle"==t?1-n:n)}))},_formResetHandler:function(){var e=this,t=e.options;setTimeout((function(){var n=e.element.find("input"),i=n[0].value,r=n[1].value;e.values(""===i||isNaN(i)?t.min:i,""===r||isNaN(r)?t.max:r)}))},destroy:function(){var e=this;B.fn.destroy.call(e),e.wrapper.off(v).find(".k-tick, .k-slider-track").off(v).end().find(I).off(v),e._firstHandleDrag.draggable.destroy(),e._lastHandleDrag.draggable.destroy()}});K.Selection=function(e,t,n){function i(i){var r=(i=i||[])[0]-n.min,o=i[1]-n.min,a=u.ceil(W(r/n.smallStep)),s=u.ceil(W(o/n.smallStep)),l=t._pixelSteps[a],c=t._pixelSteps[s];e.eq(0).css(t._position,l).end().eq(1).css(t._position,c),function(e,n){var i,r,o=t._trackDiv.find(".k-slider-selection");i=u.abs(e-n),o[t._sizeFn](i),r=u.min(e,n),o.css(t._position,r-1)}(l,c)}i(t.value()),t.bind([m,g,k],(function(e){i(e.values)}))},n.ui.plugin(K)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Widget,r=n.ui,o=e.isPlainObject,a=".kendoTextBox",s="change",l="disabled",c="readonly",d="k-input-inner",u="input",h="k-focus",p="k-disabled",f="k-no-click",m="aria-disabled",g=i.extend({init:function(r,o){var a=this;i.fn.init.call(a,r,o),o=e.extend(!0,{},o),a.options.value=o.value||a.element.val(),a.options.readonly=o.readonly!==t?o.readonly:Boolean(a.element.attr("readonly")),a.options.enable=o.enable!==t?o.enable:!Boolean(a.element.attr("disabled")),a.options.placeholder=o.placeholder||a.element.attr("placeholder"),a.value(a.options.value),a._wrapper(),a._label(),a._editable({readonly:a.options.readonly,disable:!a.options.enable}),a.element.addClass(d).attr("placeholder",a.options.placeholder).attr("autocomplete","off"),o.icon&&a._icon(),n.notify(a),a._applyCssClasses()},events:[s,u],options:{name:"TextBox",value:"",readonly:!1,enable:!0,placeholder:"",label:null,rounded:"medium",size:"medium",fillMode:"solid",icon:null},value:function(e){var n=this;if(e===t)return n._value;n._value=e,n.element.val(e),n.floatingLabel&&n.floatingLabel.refresh()},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.floatingLabel&&this.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.floatingLabel&&this.floatingLabel.enable(e=e===t||e)},focus:function(){this.element[0].focus()},destroy:function(){var e=this;e.floatingLabel&&e.floatingLabel.destroy(),e.element.off(a),e.element[0].style.width="",e.element.removeClass(d),i.fn.destroy.call(e)},setOptions:function(e){this.destroy(),this._inputLabel&&(this._inputLabel.remove(),this._inputLabel=null),this._floatingLabelContainer?(this.floatingLabel.destroy(),this.floatingLabel=null,this.element.unwrap(),this.element.unwrap(),this._floatingLabelContainer=null):this.element.unwrap(),n.deepExtend(this.options,e),this.init(this.element,this.options)},_editable:function(e){var t=this,n=t.element,i=t.wrapper,r=e.disable,o=e.readonly;n.off(a),o||r?(n.attr(l,r).attr(c,o).attr(m,r),i.toggleClass(p,r).toggleClass(f,o)):(n.prop(l,!1).prop(c,!1).attr(m,!1),i.removeClass(p).removeClass(f),n.on("focusin"+a,t._focusin.bind(t)),n.on("focusout"+a,t._focusout.bind(t)),n.on("change"+a,t._change.bind(t)),n.on(u+a,t._input.bind(t)))},_icon:function(){this.wrapper.prepend(n.ui.icon({icon:this.options.icon,iconClass:"k-input-icon"}))},_input:function(e){var t=this.element.val();this.trigger(u,{value:t,originalEvent:e})},_label:function(){var t,i,r=this,a=r.element,s=r.options,l=a.attr("id");null!==s.label&&(t=!!o(s.label)&&s.label.floating,i=o(s.label)?s.label.content:s.label,t&&(r._floatingLabelContainer=r.wrapper.wrap("").parent(),r.floatingLabel=new n.ui.FloatingLabel(r._floatingLabelContainer,{widget:r})),n.isFunction(i)&&(i=i.call(r)),i||(i=""),l||(l=s.name+"_"+n.guid(),a.attr("id",l)),r._inputLabel=e("'").insertBefore(r.wrapper))},_focusin:function(){this.wrapper.addClass(h)},_focusout:function(){this.wrapper.removeClass(h)},_change:function(e){var t=this,n=t.element.val();t._value=n,t.trigger(s,{value:n,originalEvent:e})},_wrapper:function(){var e,t=this.element,n=t[0];(e=t.wrap("").parent())[0].style.cssText=n.style.cssText,n.style.width="100%",this.wrapper=e.addClass(n.className).removeClass("input-validation-error")}});n.cssProperties.registerPrefix("TextBox","k-input-"),n.cssProperties.registerValues("TextBox",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),r.plugin(g)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.caret,r=n.keys,o=n.html,a=n.ui,s=a.Widget,l=n._activeElement,c=n._extractFormat,d=n.parseFloat,u=n.support.placeholder,h=n.getCulture,p="change",f="disabled",m="readonly",g="k-input-inner",v="spin",_=".kendoNumericTextBox",b="mouseenter"+_+" mouseleave.kendoNumericTextBox",w="k-focus",y="k-hover",k="focus",x=".",C="k-selected",S="k-disabled",T="k-invalid",D="aria-disabled",I=/^(-)?(\d*)$/,z=null,M=e.isPlainObject,E=e.extend,A=s.extend({init:function(i,r){var o,a,l,d,u,h=this,p=r&&r.step!==t;s.fn.init.call(h,i,r),r=h.options,i=h.element.on("focusout"+_,h._focusout.bind(h)).attr("role","spinbutton"),r.placeholder=r.placeholder||i.attr("placeholder"),o=h.min(i.attr("min")),a=h.max(i.attr("max")),l=h._parse(i.attr("step")),r.min===z&&o!==z&&(r.min=o),r.max===z&&a!==z&&(r.max=a),p||l===z||(r.step=l),h._initialOptions=E({},r),u=i.attr("type"),h._reset(),h._wrapper(),h._arrows(),h._validation(),h._input(),n.support.mobileOS?h._text.on("touchend"+_+" "+k+_,(function(){n.support.browser.edge?h._text.one(k+_,(function(){h._focusin()})):h._focusin(),h.selectValue()})):h._text.on(k+_,h._click.bind(h)),i.attr("aria-valuemin",r.min!==z?r.min*r.factor:r.min).attr("aria-valuemax",r.max!==z?r.max*r.factor:r.max),r.format=c(r.format),(d=r.value)==z&&(d="number"==u?parseFloat(i.val()):i.val()),h.value(d),!r.enable||i.is("[disabled]")||e(h.element).parents("fieldset").is(":disabled")?h.enable(!1):h.readonly(i.is("[readonly]")),h.angular("compile",(function(){return{elements:h._text.get()}})),h._label(),h._ariaLabel(h._text),h._applyCssClasses(),n.notify(h)},options:{name:"NumericTextBox",decimals:z,enable:!0,restrictDecimals:!1,min:z,max:z,value:z,step:1,round:!0,culture:"",format:"n",spinners:!0,placeholder:"",selectOnFocus:!1,factor:1,upArrowText:"Increase value",downArrowText:"Decrease value",label:null,size:"medium",fillMode:"solid",rounded:"medium"},events:[p,v],_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,o=t._text.add(n),a=t.wrapper.off(b);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),n.off("keydown"+_).off("keyup"+_).off("input"+_).off("paste"+_),t._inputLabel&&t._inputLabel.off(_),r||i?(a.addClass(i?S:"").removeClass(i?"":S),o.attr(f,i).attr(m,r).attr(D,i)):(a.removeClass(S).on(b,t._toggleHover),o.prop(f,!1).prop(m,!1).attr(D,!1),t._upArrowEventHandler.bind("press",(function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(C)})),t._downArrowEventHandler.bind("press",(function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(C)})),t.element.on("keydown"+_,t._keydown.bind(t)).on("keyup"+_,t._keyup.bind(t)).on("paste"+_,t._paste.bind(t)).on("input"+_,t._inputHandler.bind(t)),t._inputLabel&&t._inputLabel.on("click"+_,t.focus.bind(t)))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.floatingLabel&&this.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.floatingLabel&&this.floatingLabel.enable(e=e===t||e)},setOptions:function(e){var n=this;s.fn.setOptions.call(n,e),n.wrapper.toggleClass("k-expand-padding",!n.options.spinners),n._text.prop("placeholder",n.options.placeholder),n._placeholder(n.options.placeholder),n.element.attr({"aria-valuemin":n.options.min!==z?n.options.min*n.options.factor:n.options.min,"aria-valuemax":n.options.max!==z?n.options.max*n.options.factor:n.options.max}),n.options.format=c(n.options.format),n._upArrowEventHandler.destroy(),n._upArrowEventHandler=null,n._downArrowEventHandler.destroy(),n._downArrowEventHandler=null,n._arrowsWrap.remove(),n._arrows(),n._applyCssClasses(),n._inputLabel&&(n._inputLabel.off(_),n._inputLabel.remove(),n.floatingLabel&&(n.floatingLabel.destroy(),n._floatingLabelContainer&&n.wrapper.unwrap())),n._label(),n._editable({readonly:n.options.readonly,disable:!n.options.enable}),e.value!==t&&n.value(e.value)},destroy:function(){var e=this;e._inputLabel&&(e._inputLabel.off(_),e.floatingLabel&&e.floatingLabel.destroy()),e.element.add(e._text).add(e._upArrow).add(e._downArrow).off(_),e._upArrowEventHandler.destroy(),e._downArrowEventHandler.destroy(),e._form&&e._form.off("reset",e._resetHandler),s.fn.destroy.call(e)},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},step:function(e){return this._option("step",e)},value:function(e){var n=this;if(e===t)return n._value;(e=n._parse(e))===n._adjust(e)&&(n._update(e),n._old=n._value,n.floatingLabel&&n.floatingLabel.refresh())},focus:function(){this._focusin()},_adjust:function(e){var t=this.options,n=t.min,i=t.max;return e===z||(n!==z&&ei&&(e=i)),e},_arrows:function(){var t,i=this,r=function(){clearTimeout(i._spinning),t.removeClass(C)},o=i.options,a=o.spinners,s=i.element;(t=s.siblings(".k-icon-button"))[0]||(t=e(H("increase",o.upArrowText,o)+H("decrease",o.downArrowText,o)).appendTo(i.wrapper),i._arrowsWrap=t.wrapAll('').parent()),a||(t.parent().toggle(a),i.wrapper.addClass("k-expand-padding")),i._upArrow=t.eq(0),i._upArrowEventHandler=new n.UserEvents(i._upArrow,{release:r}),i._downArrow=t.eq(1),i._downArrowEventHandler=new n.UserEvents(i._downArrow,{release:r})},_validation:function(){var t=this.element;this._validationIcon=e(n.ui.icon({icon:"exclamation-circle",iconClass:"k-input-validation-icon k-hidden"})).insertAfter(t)},_blur:function(){var e=this;e._toggleText(!0),e._change(e.element.val())},_click:function(e){var t=this;clearTimeout(t._focusing),t._focusing=setTimeout((function(){var n,r,o,a=e.target,s=i(a)[0],l=a.value.substring(0,s),c=t._format(t.options.format),d=c[","],u=0;d&&(r=new RegExp("\\"+d,"g"),o=new RegExp("(-)?("+c.symbol+")?([\\d\\"+d+"]+)(\\"+c["."]+")?(\\d+)?")),o&&(n=o.exec(l)),n&&(u=n[0].replace(r,"").length,-1!=l.indexOf("(")&&t._value<0&&u++),t._focusin(),i(t.element[0],u),t.selectValue()}))},selectValue:function(){this.options.selectOnFocus&&this.element[0].select()},_getFactorValue:function(e){var t=this.options.factor;return t&&1!==t&&null!==(e=n.parseFloat(e))&&(e/=t),e},_change:function(e){var t=this;e=t._getFactorValue(e),t._update(e),e=t._value,t._old!=e&&(t._old=e,t._typing||t.element.trigger(p),t.trigger(p)),t._typing=!1},_culture:function(e){return e||h(this.options.culture)},_focusin:function(){var e=this;e.wrapper.addClass(w),e._toggleText(!1),e.element[0].focus()},_focusout:function(){var e=this;clearTimeout(e._focusing),e.wrapper.removeClass(w).removeClass(y),e._blur(),e._removeInvalidState()},_format:function(e,t){var n=this._culture(t).numberFormat;return(e=e.toLowerCase()).indexOf("c")>-1?n=n.currency:e.indexOf("p")>-1&&(n=n.percent),n},_input:function(){var t,i=this,r=i.options,o=i.element.addClass(g).show()[0],a=o.accessKey;(t=i.wrapper.find(x+g).first()).length<2&&(t=e('').attr(n.attr("validate"),!1).insertBefore(o));try{o.setAttribute("type","text")}catch(e){o.type="text"}t[0].title=o.title,t[0].tabIndex=o.tabIndex,t[0].style.cssText=o.style.cssText,t.prop("placeholder",r.placeholder),a&&(t.attr("accesskey",a),o.accessKey=""),i._text=t.addClass(o.className).attr({role:"spinbutton","aria-valuemin":r.min!==z?r.min*r.factor:r.min,"aria-valuemax":r.max!==z?r.max*r.factor:r.max,autocomplete:"off"})},_keydown:function(e){var t=this,n=e.keyCode;n===r.NUMPAD_DOT&&(t._numPadDot=!0),n!=r.DOWN?n!=r.UP?n!=r.ENTER?(n!=r.TAB&&(t._typing=!0),t._cachedCaret=i(t.element)):t._change(t.element.val()):t._step(1):t._step(-1)},_keyup:function(){this._removeInvalidState()},_inputHandler:function(){var e=this.element,t=e.val(),n=this.options.min,r=this._format(this.options.format),o=r["."],a=null!==n&&n>=0&&"-"===t.charAt(0);this._numPadDot&&o!==x&&(t=t.replace(x,o),this.element.val(t),this._numPadDot=!1),this._isPasted&&this._parse(t)&&(t=this._parse(t).toString().replace(x,r["."])),this._numericRegex(r).test(t)&&!a?this._oldText=t:(this._blinkInvalidState(),this.element.val(this._oldText),this._cachedCaret&&(i(e,this._cachedCaret[0]),this._cachedCaret=null)),this._isPasted=!1},_blinkInvalidState:function(){var e=this;e._addInvalidState(),clearTimeout(e._invalidStateTimeout),e._invalidStateTimeout=setTimeout(e._removeInvalidState.bind(e),100)},_addInvalidState:function(){this.wrapper.addClass(T),this._validationIcon.removeClass("k-hidden")},_removeInvalidState:function(){var e=this;e.wrapper.removeClass(T),e._validationIcon.addClass("k-hidden"),e._invalidStateTimeout=null},_numericRegex:function(e){var t=this,n=e["."],i=t.options.decimals,r="*";return n===x&&(n="\\"+n),i===z&&(i=e.decimals),0===i&&t.options.restrictDecimals?I:(t.options.restrictDecimals&&(r="{0,"+i+"}"),t._separator!==n&&(t._separator=n,t._floatRegExp=new RegExp("^(-)?(((\\d+("+n+"\\d"+r+")?)|("+n+"\\d"+r+")))?$")),t._floatRegExp)},_paste:function(e){var t=this,n=e.target,i=n.value,r=t._format(t.options.format);t._isPasted=!0,setTimeout((function(){var e=t._parse(n.value);e===z?t._update(i):(n.value=e.toString().replace(x,r["."]),t._adjust(e)===e&&t._numericRegex(r).test(n.value)||(i=t._getFactorValue(n.value),t._update(i)))}))},_option:function(e,n){var i=this,r=i.element,o=i.options;if(n===t)return o[e];((n=i._parse(n))||"step"!==e)&&(o[e]=n,r.add(i._text).attr("aria-value"+e,n),r.attr(e,n))},_spin:function(e,t){var n=this;t=t||500,clearTimeout(n._spinning),n._spinning=setTimeout((function(){n._spin(e,50)}),t),n._step(e)},_step:function(e){var t=this,n=t.element,i=t._value,r=t._parse(n.val())||0,o=t.options.decimals||2;l()!=n[0]&&t._focusin(),t.options.factor&&r&&(r/=t.options.factor),r=+(r+t.options.step*e).toFixed(o),r=t._adjust(r),t._update(r),t._typing=!1,i!==r&&t.trigger(v)},_toggleHover:function(t){e(t.currentTarget).toggleClass(y,"mouseenter"===t.type)},_toggleText:function(e){var t=this;t._text.toggle(e),e?t._text.removeAttr("aria-hidden"):t._text.attr("aria-hidden","true"),t.element.toggle(!e)},_parse:function(e,t){return d(e,this._culture(t),this.options.format)},_round:function(e,t){return(this.options.round?n._round:R)(e,t)},_update:function(e){var t,i,r=this,o=r.options,a=o.factor,s=o.format,l=o.decimals,c=r._culture(),d=r._format(s,c);l===z&&(l=d.decimals),(i=(e=r._parse(e,c))!==z)&&(e=parseFloat(r._round(e,l),10)),r._value=e=r._adjust(e),r._placeholder(n.toString(e,s,c)),i?(a&&(e=parseFloat(r._round(e*a,l),10)),-1!==(e=e.toString()).indexOf("e")&&(e=r._round(+e,l)),t=e,e=e.replace(x,d["."])):(e=null,t=null),r.element.val(e),r._oldText=e,r.element.add(r._text).attr("aria-valuenow",t)},_placeholder:function(e){var t=this._text;t.val(e),u||e||t.val(this.options.placeholder),t.attr("title",this.element.attr("title")||t.val())},_label:function(){var i,r,o=this,a=o.element,s=o.options,l=a.attr("id");null!==s.label&&(i=!!M(s.label)&&s.label.floating,r=M(s.label)?s.label.content:s.label,i&&(o._floatingLabelContainer=o.wrapper.wrap("").parent(),o.floatingLabel=new n.ui.FloatingLabel(o._floatingLabelContainer,{widget:o})),n.isFunction(r)&&(r=r.call(o)),r||(r=""),l||(l=s.name+"_"+n.guid(),a.attr("id",l)),o._inputLabel=e("'").insertBefore(o.wrapper),o.element.attr("disabled")===t&&o.element.attr("readonly")===t&&o._inputLabel.on("click"+_,o.focus.bind(o)))},_wrapper:function(){var e,t=this.element,n=t[0];(e=t.parents(".k-numerictextbox")).is("span.k-numerictextbox")||(e=t.hide().wrap("").parent()),e[0].style.cssText=n.style.cssText,n.style.width="",this.wrapper=e.addClass("k-numerictextbox k-input").addClass(n.className).removeClass("input-validation-error").css("display","")},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout((function(){t.value(n[0].value),t.max(t._initialOptions.max),t.min(t._initialOptions.min)}))},t._form=r.on("reset",t._resetHandler))}});function H(e,t,n){var i="increase"===e?"caret-alt-up":"caret-alt-down",r="increase"===e?"increase":"decrease";return o.renderButton('',E({},n,{icon:i,shape:null,rounded:null}))}function R(e,t){var n=parseFloat(e,10).toString().split(x);return n[1]&&(n[1]=n[1].substring(0,t)),n.join(x)}n.cssProperties.registerPrefix("NumericTextBox","k-input-"),n.cssProperties.registerValues("NumericTextBox",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),a.plugin(A)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o=n.parseColor,a=n.ui.Popup.TabKeyTrap,s=e.extend,l=".kendoColorTools",c="keydown"+l,d="k-disabled",u=r.extend({init:function(e,t){var n=this;r.fn.init.call(n,e,t),e=n.element,t=n.options,e.is("input")?(n._initialValue(),n._preventDefaultLabelClick()):n._value=o(t.value),n._tabIndex=e.attr("tabIndex")||0,t._standalone&&(n._triggerSelect=n._triggerChange)},options:{name:"ColorSelector",ARIATemplate:function(e){return"Current selected color is "+(e||"none")},value:null,_standalone:!0},events:["change","select","forceSelect","cancel"],color:function(e){return e!==t&&(this._value=o(e),this.element.is("input")&&this._updateInput(this._value),this._updateUI(this._value)),this._value},value:function(e){return(e=this.color(e))&&(e=this.options.opacity?e.toCssRgba():e.toCss()),e||null},enable:function(e){0===arguments.length&&(e=!0),this.element.is("input")&&this.element.attr("disabled",!e),this.wrapper.toggleClass(d,!e),this._onEnable(e)},_attachFocusEvents:function(){this.wrapper.on(c,this._navKeydown.bind(this)).on("focusout"+l,this._navFocusout.bind(this))},_initialValue:function(){var e=this.element,t=this.options.value||e.attr("value");t&&(this._value=o(t,!0)),this.element.val(t)},_innerTabindex:function(e){this.wrapper.find(".k-draghandle, .k-button, .k-input-inner").attr("tabindex",e)},_isInputTypeColor:function(){var e=this.element[0];return/^input$/i.test(e.tagName)&&/^color$/i.test(e.type)},_navFocusout:function(){var e=this,t=e.wrapper[0];setTimeout((function(){t.contains(document.activeElement)||e._releaseInnerFocus()}))},_navKeydown:function(e){var i=this.wrapper;e.keyCode===n.keys.ENTER&&i.attr("tabindex")?(e.preventDefault(),this._trapInnerFocus()):e.keyCode===n.keys.ESC&&i.attr("tabindex")===t&&(this._releaseInnerFocus(),this.wrapper.trigger("focus"))},_releaseInnerFocus:function(){this._tabKeyTrap.removeTrap(),this.wrapper.attr("tabindex",this._tabIndex),this._innerTabindex(-1)},_select:function(e,t){var n=this._value;e=this.color(e),t||(e&&(!n||!e.equals(n))||null===e&&e!==n?(null===e&&this.element.val&&this.element.val(e),this.element.trigger("change"),this.trigger("change",{value:this.value()})):this._standalone||this.trigger("cancel"))},_navigation:function(){var e=this.value();e&&e.indexOf("rgba")>-1&&(e=e.replace("rgba","RGBA")),this.options._otOfPicker?(this._innerTabindex(-1),this._attachFocusEvents(),this._tabKeyTrap=new a(this.wrapper),this._ariaTemplate=n.template(this.options.ARIATemplate),this.wrapper.attr({"aria-label":this._ariaTemplate(e||""),tabindex:this._tabIndex})):(this.wrapper.removeAttr("tabindex"),this.wrapper.removeAttr("aria-label"),this.wrapper.removeAttr("role"),this.wrapper.removeAttr("aria-keyshortcuts"))},_trapInnerFocus:function(){this._innerTabindex(0),this.wrapper.removeAttr("tabindex"),this.wrapper.find(".k-hsv-draghandle").trigger("focus"),this._tabKeyTrap.trap()},_triggerSelect:function(e){h(this,"select",e)},_triggerChange:function(e){h(this,"change",e)},destroy:function(){this.element&&this.element.off(l),this.wrapper&&(this.wrapper.off(c),this.wrapper.off(l).find("*").off(l),this.wrapper=null),r.fn.destroy.call(this)},_preventDefaultLabelClick:function(){var e=this.element,t=e.closest("label"),n=e.attr("id");n&&(t=t.add('label[for="'+n+'"]')),t.on("click",(function(e){e.preventDefault()}))},_updateUI:e.noop,_updateInput:function(e){var t,i="";e&&(i=this._isInputTypeColor()||1==e.a?e.toCss():e.toCssRgba(),this.element.val(i)),this.options._otOfPicker&&(this._ariaTemplate||(this._ariaTemplate=n.template(this.options.ARIATemplate)),(t=this.value())&&t.indexOf("rgba")>-1&&(t=t.replace("rgba","RGBA")),this.wrapper.attr("aria-label",this._ariaTemplate(t||"")))},_selectOnHide:function(){return null},_cancel:function(){this.trigger("cancel")}});function h(e,t,n){((n=o(n))&&!n.equals(e.color())||n!==e.color())&&("change"==t&&(e._value=n,e._updateInput(e._value)),n&&1!=n.a?n=n.toCssRgba():n&&(n=n.toCss()),e.trigger(t,{value:n}))}s(i,{colorpicker:{ColorSelector:u}})}(window.kendo.jQuery),function(e,t){var n=kendo.ui.colorpicker,i=e.extend,r=kendo.Color,o=kendo.parseColor;function a(e,t){return n=s(l(e,t)),i=s(l(t,{r:0,g:0,b:0,a:1})),(Math.max(n,i)+.05)/(Math.min(n,i)+.05);var n,i}function s(e){var t=[e.r,e.g,e.b].map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*t[0]+.7152*t[1]+.0722*t[2]}function l(e,t){var n=c(e.r,0,255),i=c(e.g,0,255),r=c(e.b,0,255),o=c(e.a,0,1),a=c(t.r,0,255),s=c(t.g,0,255),l=c(t.b,0,255);return{r:Math.round((1-o)*a+o*n),g:Math.round((1-o)*s+o*i),b:Math.round((1-o)*l+o*r)}}function c(e,n,i){return null===(r=e)||r===t||isNaN(e)||e<=n?n:e>=i?i:e;var r}function d(e,t){if(0===e.length)return"";var n=e.reduce((function(e,n,i,r){return 0===i?kendo.format("M {0},{1}",n[0],n[1]):kendo.format("{0} {1}",e,t(n,i,r))}),"");return kendo.format('',n)}function u(e,t){var n=t[0]-e[0],i=t[1]-e[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(i,2)),angle:Math.atan2(i,n)}}i(n,{contrastToolUtils:{getContrastFromTwoRGBAs:a,renderSvgCurveLine:function(e,t,n){var s,l,h=function(s,l,d,u,p){var f=(d+u)/2,m=i({},t,{s:l/e.width,v:1-f/e.height}),g=a(o(function(e){var t=c(e.h,0,359.9),n=c(e.s,0,1),i=c(e.v,0,1),o=c(e.a,0,1);return r.fromHSV(t,n,i,o).toCssRgba()}(m)).toBytes(),o(n).toBytes());return d+.5>u?gs-1?f:null:p(g,s)?h(s,l,d,u-(u-d)/2,p):h(s,l,d+(u-d)/2,u,p)},p=function(e,t){return e>t},f=function(e,t){return e'+v+""}}})}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,r=n.Observable,o=n.parseColor,a=e.extend,s=n.htmlEncode,l=n.Color,c=n.keys,d="#ffffff",u="#000000",h="keydown.kendoColorTools",p=i.colorpicker.ColorSelector,f=i.colorpicker.contrastToolUtils;function m(e){e.preventDefault()}var g=r.extend({init:function(e,t){var i=this;i.element=e,i.options=t,i._viewModel=n.observable({switchMode:i.switchMode.bind(i),keydown:i.keydown.bind(i),isHEXMode:function(){return"hex"===this.get("format")},isRGBMode:function(){return"rgb"===this.get("format")},format:t.format,formats:t.formats,rgb:null,hex:function(){return null!==this.get("rgb")&&this.get("rgb").toCss({alpha:t.opacity})}}),i._changeHandler=i.change.bind(i),i._viewModel.bind("change",i._changeHandler),i._render(),i.element.on(h,i.keydown.bind(i)),r.fn.init.call(i)},_template:n.template((function(e){var t=e.options,n=e.ns,i=s(t.size),r=s(t.tabindex),o="";t.formats&&t.formats.length>1&&(o='
      ');var a="";t.formats&&t.formats.indexOf("hex")>=0&&(a='
      ');var l="";t.formats&&t.formats.indexOf("rgb")>=0&&(l='
      ',t.opacity&&(l+='
      '));return o+a+l})),destroy:function(){var e=this;e._viewModel.unbind("change",e._changeHandler),n.unbind(e.element),n.destroy(e.element),e.element.off(h),delete e._viewModel,delete e._changeHandler},change:function(e){var t=this;e.field.indexOf("rgb")>=0?(t._color=t._tryParseColor(t._viewModel.rgb.toCssRgba()),t._viewModel.set("hex",t._color.toCss({alpha:t.options.opacity}))):"hex"===e.field&&(t._color=t._tryParseColor(e.sender[e.field]),t._viewModel.set("rgb",t._color)),t._preventChangeEvent||t.trigger("change",{value:t._color})},keydown:function(t){var n=this,i=e(t.target).data("kendoTextBox");t.keyCode===c.ENTER&&e(t.target).is("input")&&(i&&i._change&&i._change(),n.trigger("change",{value:n._color}),n.trigger("select",{value:n._color}))},reset:function(){var e=this;e._preventChangeEvent=!0,e._viewModel.set("rgb",o(u)),delete e._preventChangeEvent},switchMode:function(){var e=this,t=e._viewModel,n=t.format,i=t.formats.indexOf(n)+1;i=i>=t.formats.length?0:i,e._preventChangeEvent=!0,e._viewModel.set("format",t.formats[i]),delete e._preventChangeEvent},value:function(e){var t=this;t._color=e&&e.toBytes()||o(u),t._preventChangeEvent=!0,t._viewModel.set("rgb",t._color),delete t._preventChangeEvent},_render:function(){var e=this;e.element.append(e._template({ns:n.ns,guid:n.guid(),options:e.options})).parent(),n.bind(e.element,e._viewModel),e.element.attr("data-"+n.ns+"stop","stop")},_tryParseColor:function(e){try{e=o(e)||this._color}catch(t){e=this._color}return e}}),v=p.extend({init:function(t,i){var r,o=this;p.fn.init.call(o,t,i),(i=o.options=n.deepExtend({},o.options,i)).messages.previewInput&&(i.messages.hex=i.messages.previewInput),i.messages=i.messages?e.extend(o.options.messages,i.messages):o.options.messages,t=o.element,o._wrapper(),o._sliders(),o._hsvArea(),r=o._value,o._gradientInputs(),o._updateUI(r),o._navigation()},options:{name:"ColorGradient",opacity:!1,hsvDragARIATemplate:function(e){return"Color well with two-dimensional slider for selecting saturation and value. Selected color is "+(e||"none")},input:!0,format:"hex",formats:["rgb","hex"],contrastTool:!1,size:"medium",messages:{contrastRatio:"Contrast ratio:",fail:"Fail",pass:"Pass",hex:"HEX",toggleFormat:"Toggle format",red:"Red channel",green:"Green channel",blue:"Blue channel",alpha:"Alpha channel"},_otOfPicker:!0},_template:n.template((function(e){return'
      '+(e.opacity?'':"")+"
      "+(e.input?'
      ':"")+(e.contrastTool?'
      ':"")})),focus:function(){this._hsvHandle.focus()},setBackgroundColor:function(t){var n=this;n.options.contrastTool&&(n.options.contrastTool=e.isPlainObject(n.options.contrastTool)?a({},n.options.contrastTool,{backgroundColor:t}):{backgroundColor:t},n._updateColorContrast(n.color()||o(d)))},_getHSV:function(e,t,n,i){var r=this,a=r._hsvRect,s=a.width(),c=a.height(),d=this._hsvHandle.position();return s&&c?(null==e&&(e=r._hueSlider.value()),null==t&&(t=d.left/s),null==n&&(n=1-d.top/c),null==i&&(i=r._opacitySlider?r._opacitySlider.value()/100:1),l.fromHSV(e,t,n,i)):r.color()?r.color().toHSV():o(u)},_gradientInputs:function(){var e=this,t=e.options;e._colorgradientInputs.length&&(e._colorInput=new g(e._colorgradientInputs,a({},t,{tabindex:0})),e._colorInput.bind("change",(function(t){e._updateUI(t.value,!0)})),e._colorInput.bind("select",(function(t){var n=o(t.value);e._select(n),e.trigger("forceSelect",{value:e.value()})})))},_hsvArea:function(){var e,t,i=this,r=i.wrapper.find(".k-hsv-rectangle"),o=r.find(".k-draghandle").attr("tabIndex",0).on(h,(e=i._hsvKeydown,t=i,function(){return e.apply(t,arguments)})),a=this.value();function s(e,t){var n,r,o=this.offset,a=e-o.left,s=t-o.top,l=this.width,c=this.height;n=(a=a<0?0:a>l?l:a)/l,r=1-(s=s<0?0:s>c?c:s)/c,i._svChange(n,r)}a&&a.indexOf("rgba")>-1&&(a=a.replace("rgba","RGBA")),this._hsvDragAriaTemplate||(this._hsvDragAriaTemplate=n.template(this.options.hsvDragARIATemplate)),o.attr("aria-label",this._hsvDragAriaTemplate(a||"")),i._hsvEvents=new n.UserEvents(r,{global:!0,press:function(e){this.offset=n.getOffset(r),this.width=r.width(),this.height=r.height(),o.focus(),s.call(this,e.x.location,e.y.location)},start:function(){r.addClass("k-dragging"),o.focus()},move:function(e){e.preventDefault(),s.call(this,e.x.location,e.y.location)},end:function(){r.removeClass("k-dragging")}}),i._hsvRect=r,i._hsvHandle=o},_hsvKeydown:function(e){var t=this;function n(n,i){var r=t._getHSV();r[n]+=i*(e.shiftKey?.01:.05),r[n]<0&&(r[n]=0),r[n]>1&&(r[n]=1),t._updateUI(r),m(e)}function i(n){var i=t._getHSV();i.h+=n*(e.shiftKey?1:5),i.h<0&&(i.h=0),i.h>359&&(i.h=359),t._updateUI(i),m(e)}switch(e.keyCode){case c.LEFT:e.ctrlKey?i(-1):n("s",-1);break;case c.RIGHT:e.ctrlKey?i(1):n("s",1);break;case c.UP:n(e.ctrlKey&&t._opacitySlider?"a":"v",1);break;case c.DOWN:n(e.ctrlKey&&t._opacitySlider?"a":"v",-1);break;case c.ENTER:t._select(t._getHSV());break;case c.F2:t._colorInput.element.find("input").trigger("focus").select();break;case c.ESC:t._cancel()}},_onEnable:function(e){var t=this.wrapper;this._hueSlider.enable(e),this._opacitySlider&&this._opacitySlider.enable(e),t.find("input").attr("disabled",!e),this.options._standalone&&(e?t.removeAttr("aria-disabled"):t.attr("aria-disabled",!0))},_reset:function(){var e=this;e._colorInput&&e._colorInput.reset(),e._resetHsv(),e._resetColorContrast()},_resetColorContrast:function(){var e=this,t=e.options.contrastTool;e._contrastTool.length&&e._updateColorContrast(t.backgroundColor?o(t.backgroundColor):o(d))},_resetHsv:function(){var e=o(u);this._updateHsv(e)},_sliders:function(){var e=this,t=e.wrapper,n=t.find(".k-hue-slider"),i=t.find(".k-alpha-slider");function r(t){e._updateUI(e._getHSV(t.value,null,null,null))}function o(t){e._updateUI(e._getHSV(null,null,null,t.value/100))}n.attr("aria-label","hue"),e._hueSlider=n.kendoSlider({min:0,max:360,tickPlacement:"none",showButtons:!1,orientation:"vertical",slide:r,change:r}).data("kendoSlider"),i.attr("aria-label","opacity"),e._opacitySlider=i.kendoSlider({min:0,max:100,tickPlacement:"none",showButtons:!1,orientation:"vertical",slide:o,change:o}).data("kendoSlider")},_svChange:function(e,t){var n=this._getHSV(null,e,t,null);this._updateUI(n)},_updateColorContrast:function(e){var t=this,i=t.options.contrastTool,r=i.backgroundColor?o(i.backgroundColor):o(d),a=f.getContrastFromTwoRGBAs(o(e.toCssRgba()),r),l=n.template((function(e){var t=e.messages,i=e.ratio;return'
      '+s(t.contrastRatio)+" "+s(n.toString(i,"n2"))+''+(i>4.5?n.ui.icon("check"):"")+(i>7?n.ui.icon("check"):"")+"
      "})),c=n.template((function(e){var t=e.messages,i=e.ratio,r=e.limit,o=e.level;return"
      "+s(o)+": "+s(r)+" "+(i>r?''+s(t.pass)+" "+n.ui.icon("check")+"":''+s(t.fail)+" "+n.ui.icon("x")+"")+"
      "})),u="";u+=l({messages:t.options.messages,ratio:a}),u+=c({messages:t.options.messages,ratio:a,limit:4.5,level:"AA"}),u+=c({messages:t.options.messages,ratio:a,limit:7,level:"AAA"}),t._contrastTool.find(".k-contrast-ratio, div").remove(),t._contrastTool.append(u),t._updateContrastSvg(r)},_updateContrastSvg:function(t){var i,r=this._hsvRect,o="k-color-contrast-svg",a={width:r.width(),height:r.height()};a.width&&a.height&&(i=e(f.renderSvgCurveLine(a,this._getHSV(),t)).addClass(o),n.applyStylesFromKendoAttributes(i,["position","overflow","pointer-events","left","top","z-index"]),r.find("."+o).remove(),r.append(i))},_updateHsv:function(e){var t=this,n=t._hsvRect;e=e.toHSV(),t._hsvHandle.css({left:e.s*n.width()+"px",top:(1-e.v)*n.height()+"px"}),t._hueElements.css("background-color",l.fromHSV(e.h,1,1,1).toCss()),t._hueSlider.value(e.h),t._opacitySlider&&(t._opacitySlider.wrapper.find(".k-slider-track").css("background","linear-gradient(to top, transparent, "+l.fromHSV(e.h,1,1,1).toCss()),t._opacitySlider.value(100*e.a)),t._updateHsvAria(e.s,e.v)},_updateHsvAria:function(e,t){var n=this.value();n&&n.indexOf("rgba")>-1&&(n=n.replace("rgba","RGBA")),this._hsvHandle.attr({"aria-label":this._hsvDragAriaTemplate(n||""),"aria-valuenow":Math.round(100*e),"aria-valuetext":"saturation: "+Math.round(100*e)+"%, value: "+Math.round(100*t)+"%"})},_updateUI:function(e,t){var n=this;e?(!t&&n._colorInput&&n._colorInput.value(e),n._triggerSelect(e),n._updateHsv(e),n._contrastTool.length&&n._updateColorContrast(e)):n._reset()},_wrapper:function(){var t,n=this.options;(t=this.element.is("input")?this.element.addClass("k-hidden").wrap("
      ").parent():this.element).addClass("k-colorgradient").attr({role:"textbox","aria-keyshortcuts":"Enter"}).append(this._template(n)),this._hueElements=e(".k-hsv-rectangle, .k-alpha-slider .k-slider-track",t),this._colorgradientInputs=e(".k-colorgradient-inputs",t),this._contrastTool=e(".k-colorgradient-color-contrast",t),this.wrapper=t},destroy:function(){this._hsvEvents.destroy(),this._hueSlider.destroy(),this._opacitySlider&&this._opacitySlider.destroy(),this._colorInput&&this._colorInput.destroy(),this._hueSlider=this._opacitySlider=this._hsvRect=this._hsvHandle=this._hueElements=this._selectedColor=this._colorAsText=this._contrastTool=null,p.fn.destroy.call(this)}});i.plugin(v)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,r=n.parseColor,o=n.keys,a=".",s="background-color",l="k-selected",c="k-focus",d="k-colorpalette-tile",u=i.colorpicker.ColorSelector;function h(e){e.preventDefault()}function p(e,t){return function(){return e.apply(t,arguments)}}var f=u.extend({init:function(e,t){var i=this;u.fn.init.call(i,e,t),i._tabIndex=this.element.attr("tabindex")||0,i._wrapper(),t=i.options,i._selectedID=(t.ariaId||n.guid())+"_selected",i._ariaTemplate=n.template(i.options.ARIATemplate),i._value&&(i._updateUI(i._value),i.wrapper.find(".k-focus").removeClass(c)),i.wrapper.attr("aria-label",i._ariaTemplate(i.value()||"")),i._attachEvents()},focus:function(){this.wrapper&&!this.wrapper.is("[unselectable='on']")&&this.wrapper.trigger("focus")},options:{name:"ColorPalette",columns:10,tileSize:null,palette:"basic"},_attachEvents:function(){var e=this;e.wrapper.on("click.kendoColorTools",a+d,(function(t){e._select(t.currentTarget)})).on("keydown.kendoColorTools",p(e._keydown,e)).on("blur.kendoColorTools",(function(){e.wrapper.find(a+d).removeClass(c)})).on("focus.kendoColorTools",p(e._focus,e))},_colors:function(){var t=this.options,n=t.palette||"basic";return"websafe"==n?(n="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",t.columns=18):"basic"==n&&(n="000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7"),"string"==typeof n&&(n=n.split(",")),Array.isArray(n)&&(n=e.map(n,(function(e){return r(e)}))),n},_current:function(t){this.wrapper.find(a+d).removeClass(c).removeAttr("id"),e(t).addClass(c).attr("id",this._selectedID),this.wrapper.removeAttr("aria-activedescendant").attr("aria-activedescendant",this._selectedID)},_focus:function(){var e=this.wrapper;0===e.find("#"+this._selectedID).length&&this._current(e.find(a+d).first())},_keydown:function(e){var t,n,i=this.wrapper.find(a+d),r=i.filter(".k-focus").get(0)||i.filter(".k-selected").get(0),s=e.keyCode;if(r&&(n=Array.prototype.indexOf.call(r.parentNode.children,r)),s==o.LEFT)t=r?r.previousSibling:i[i.length-1];else if(s==o.RIGHT)t=r?r.nextSibling:i[0];else if(s==o.DOWN)t=r?r.parentNode.nextSibling?r.parentNode.nextSibling.children[n]:null:i[0];else if(s==o.UP)t=r?r.parentNode.previousSibling?r.parentNode.previousSibling.children[n]:null:i.get[i.length-1];else if(s==o.ENTER){if(h(e),r)return this._select(r),void this.trigger("forceSelect",{value:this.value()})}else s==o.ESC&&this._cancel();t&&1!==t.nodeType&&(t=null),t&&(h(e),this._current(t))},_onEnable:function(e){this.options._standalone&&(e?(this.wrapper.attr("tabindex",this._tabIndex),this.wrapper.removeAttr("aria-disabled")):(this.wrapper.removeAttr("tabindex"),this.wrapper.attr("aria-disabled",!0)))},_select:function(t){var n=this.wrapper.find(a+d);t=e(t),u.fn._select.call(this,t.css(s)),n.removeClass(l).removeAttr("aria-selected"),t.addClass(l).attr("aria-selected",!0)},_template:n.template((function(e){for(var t=e.colors,i=e.columns,r=(e.tileSize,e.value),o=e.id,a="",s=0;s'),a+=''}return''+a+""})),_tileSize:function(){var e,t,n=this.options.tileSize;if(n){if(/number|string/.test(typeof n))e=t=parseFloat(n);else{if("object"!=typeof n)throw new Error("Unsupported value for the 'tileSize' argument");e=parseFloat(n.width),t=parseFloat(n.height)}this.wrapper.find(a+d).css({width:e,height:t})}},_updateUI:function(t){var n=null,i=this.wrapper.find(a+d);this.wrapper.find(a+d).each((function(){var i=r(e(this).css(s));if(i&&i.equals(t))return n=this,!1})),this._current(n),i.removeClass(l),n&&(e(n).addClass(l),this.wrapper.attr("aria-label",this._ariaTemplate(this.value()||"")))},_wrapper:function(){var t,i,r=this.options,o=this._colors();t=this.element.is("input")?this.element.addClass("k-hidden").wrap("
      ").parent():this.element,i=e(this._template({colors:o,columns:r.columns,tileSize:r.tileSize,value:this._value,id:r.ariaId})),n.applyStylesFromKendoAttributes(i,["background-color"]),t.addClass("k-colorpalette").attr("role","grid").append(i).attr("tabindex",this._tabIndex),this.wrapper=t,this._tileSize()}});i.plugin(f)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,r=n.html,o=n.Color,a=e.extend,s=n.htmlEncode,l="background-color",c=".kendoColorTools",d="click"+c,u=i.colorpicker.ColorSelector,h=n.keys,p="k-no-color",f="k-selected",m=".k-color-preview-mask",g="aria-pressed",v="aria-disabled",_={gradient:i.ColorGradient,palette:i.ColorPalette};var b=u.extend({init:function(e,t){var i=this;t&&!1===t.autoupdate&&(t._standalone=!1),u.fn.init.call(i,e,t),t=i.options=n.deepExtend({},i.options,t),e=i.element,i._wrapper();var r=i.color();i._changeView(t.view),i._setViewSize(),r?(i._updateUI(r),i._previousColor.children(m).css(l,r.toDisplay()),i._selectedColor.children(m).css(l,r.toDisplay())):(i._selectedColor.addClass(p),i._previousColor.addClass(p)),i._attachEvents(),i._navigation()},destroy:function(){var e=this;u.fn.destroy.call(this),e._view&&(e._view.destroy(),e._viewsContainer.empty()),e.element.off(c),e._selectedColor=e._previousColor=e._viewsContainer=e._view=null},options:{name:"FlatColorPicker",opacity:!1,buttons:!1,input:!0,preview:!0,clearButton:!1,format:"hex",formats:["rgb","hex"],view:"gradient",views:["gradient","palette"],palette:null,autoupdate:!0,backgroundColor:null,columns:10,tileSize:24,messages:{apply:"Apply",cancel:"Cancel",noColor:"no color",clearColor:"Clear color",previewInput:null,contrastRatio:"Contrast ratio:",fail:"Fail",pass:"Pass",hex:"HEX",toggleFormat:"Toggle format",red:"Red",green:"Green",blue:"Blue",alpha:"Alpha",gradient:"Gradient view",palette:"Palette view"},size:"medium",_otOfPicker:!0},setBackgroundColor:function(e){var t=this;t._view&&t._view.setBackgroundColor&&t._view.setBackgroundColor(e)},_attachEvents:function(){var t,n,i=this;i.wrapper.on("keydown.kendoColorTools",(t=i._keydown,n=i,function(){return t.apply(n,arguments)})).on(d,".k-coloreditor-reset",(function(){i._clearColor=!0,i._updateUI(null),i._view.value(null)})).on(d,".k-coloreditor-apply",(function(){i._clearColor?i._select(null):i._select(i._view.color())})).on(d,".k-coloreditor-cancel",(function(){delete i._clearColor,i._updateUI(i.color()),i._cancel()})).on(d,".k-button[data-view]",(function(t){var n=e(t.target).closest("[data-view]");n.is("."+f)||(i.wrapper.find(".k-button[data-view]").removeClass(f).attr(g,!1),n.addClass(f).attr(g,!0),i._changeView(n.data("view")))}))},_select:function(e){u.fn._select.call(this,e),this._updatePreviousColor(e)},_updatePreviousColor:function(e){var t=this;e?(t._previousColor.removeClass(p),t._previousColor.children(m).css(l,e.toDisplay())):(t._previousColor.addClass(p),t._previousColor.children(m).css(l,""))},_changeView:function(t){var n,i,r=this,a=e.extend({},r.options),s=_[t];r._view&&r._view._colorInput&&(r.options.format=r._view._colorInput._viewModel.format),r.options.view=t,delete a.name,delete a.change,delete a.select,delete a.cancel,delete a._standalone,r._view&&(n=r._view.color(),r._view.destroy(),r._viewsContainer.empty()),n&&(n=n.toHSV(),i=o.fromHSV(r._cachedHue||0,n.s,n.v,n.a),r._cachedHue=n.toHSV().h,n=n.equals(i)?i:n),a._otOfPicker=!1,s&&(r._view=new _[t](e("
      ").appendTo(r._viewsContainer),a),r._view.value(n),r._view.bind("change",(function(e){delete r._clearColor,r._updateUI(e.sender.color(),!0)})),r._view.bind("forceSelect",(function(e){delete r._clearColor,r._select(e.sender.color())})))},_onEnable:function(e){var t=this;t._view&&t._view._onEnable(e),t.options._standalone&&(e?t.wrapper.removeAttr(v):t.wrapper.attr(v,!0))},focus:function(){this._view&&this._view.focus()},_updateUI:function(e,t){var n=this;e&&e.toDisplay?(n._selectedColor.removeClass(p),n._selectedColor.children(m).css(l,e.toDisplay())):(n._selectedColor.addClass(p),n._selectedColor.children(m).css(l,"")),n._triggerSelect(e),n.options.autoupdate&&n._updatePreviousColor(e),t||n._view.value(e)},_setViewSize:function(){var e=this,t=e.wrapper[0],n=parseInt(e.options.tileSize.width||e.options.tileSize,10),i=parseInt(e.options.tileSize.width||e.options.tileSize,10),r=e.options.columns;t.style.setProperty("--kendo-color-preview-columns",r),t.style.setProperty("--kendo-color-preview-width",n+"px"),t.style.setProperty("--kendo-color-preview-height",i+"px")},_keydown:function(e){e.keyCode==h.ESC&&this._cancel()},_template:function(){var e=this.options,t=a({},e,{fillMode:"flat",themeColor:"base",rounded:"medium"});return n.template((function(e,t){return'
      '+(e.views&&e.views.length>1?'
      '+r.renderButton('',a({icon:"droplet-slider"},t))+r.renderButton('',a({icon:"palette"},t))+"
      ":"")+'
      '+(e.clearButton?r.renderButton('',a({icon:"droplet-slash"},t)):"")+(e.preview?'
      ':"")+'
      '+(e.buttons?'":"")}))(e,t)},_wrapper:function(){var t,n=this.options;(t=this.element.is("input")?this.element.addClass("k-hidden").wrap("
      ").parent():this.element).addClass("k-flatcolorpicker k-coloreditor").attr({role:"textbox","aria-keyshortcuts":"Enter"}).append(this._template()),this._selectedColor=e(".k-coloreditor-preview-color",t),this._previousColor=e(".k-coloreditor-current-color",t),this._viewsContainer=e(".k-coloreditor-views",t),t.find(".k-button[data-view="+n.view+"]").addClass(f).attr(g,!0),this.wrapper=t}});i.plugin(b)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o=n.Color,a=n.parseColor,s=n.keys,l=".kendoColorTools",c="click"+l,d="keydown"+l,u=i.colorpicker.ColorSelector,h=i.FlatColorPicker,p=r.extend({init:function(t,i){var o=this;i&&i.palette&&!i.view&&(i.view="palette"),r.fn.init.call(o,t,i),i=o.options=n.deepExtend({},o.options,i);var s=(t=o.element).attr("value")||t.val();s=a(s||i.value,!0),o._value=i.value=s;var l=n.html.renderButton('',e.extend({},o.options,{icon:"caret-alt-down"})),c=o._inputWrapper=o.wrapper=e(o._template(e.extend({},o.options,{_buttonHtml:l})));o._applyCssClasses(),t.hide().after(c),t.is("input")&&(t.appendTo(c),o._preventDefaultLabelClick()),o._tabIndex=t.attr("tabIndex")||0,o.enable(!t.attr("disabled"));var d=t.attr("accesskey");d&&(t.attr("accesskey",null),c.attr("accesskey",d)),o.bind("activate",(function(e){e.isDefaultPrevented()||o.toggle()})),o._updateUI(s)},destroy:function(){this.wrapper.off(l).find("*").off(l),this._popup&&(this._selector.destroy(),this._popup.destroy()),this._selector=this._popup=this.wrapper=null,r.fn.destroy.call(this)},enable:function(e){var t=this,n=t.wrapper,i=n.find(".k-input-button");0===arguments.length&&(e=!0),t.element.attr("disabled",!e),n.attr("aria-disabled",!e),i.off(l).on("mousedown"+l,f),n.addClass("k-disabled").removeAttr("tabIndex").add("*",n).off(l),e?n.removeClass("k-disabled").attr("tabIndex",t._tabIndex).on("mouseenter"+l,(function(){n.addClass("k-hover")})).on("mouseleave"+l,(function(){n.removeClass("k-hover")})).on("focus"+l,(function(){n.addClass("k-focus")})).on("blur"+l,(function(){n.removeClass("k-focus")})).on(d,m(t._keydown,t)).on(c,".k-input-button",m(t.toggle,t)).on(c,".k-input-inner",(function(){t.trigger("activate")})):t.close()},_template:n.template((function(e){var t=e.toolIcon,i=e._buttonHtml;return'"})),options:{name:"ColorPicker",closeOnSelect:!1,contrastTool:!1,palette:null,columns:10,toolIcon:null,value:null,messages:{apply:"Apply",cancel:"Cancel",noColor:"no color",clearColor:"Clear color",previewInput:null,contrastRatio:"Contrast ratio:",fail:"Fail",pass:"Pass",hex:"HEX",toggleFormat:"Toggle format",red:"Red",green:"Green",blue:"Blue",alpha:"Alpha",gradient:"Gradient view",palette:"Palette view"},opacity:!1,buttons:!0,preview:!0,clearButton:!1,input:!0,format:"hex",formats:["rgb","hex"],view:"gradient",views:["gradient","palette"],backgroundColor:null,ARIATemplate:function(e){return"Current selected color is "+(e||"none")},size:"medium",rounded:"medium",fillMode:"solid"},events:["activate","change","select","open","close"],open:function(){this.element.prop("disabled")||this._getPopup().open()},close:function(){var e=this._selector&&this._selector.options||{};e._closing=!0,this._getPopup().close(),delete e._closing},toggle:function(){this.element.prop("disabled")||this._getPopup().toggle()},setBackgroundColor:function(e){var t=this,n=function(){t._selector.setBackgroundColor(e)};t.options.contrastTool.backgroundColor=e,t._selector&&t._popup&&t._popup.visible()?t._selector.setBackgroundColor(e):t._popup&&(t._popup.unbind("activate",n),t._popup.bind("activate",n))},_noColorIcon:function(){return this.wrapper.find(".k-color-preview")},color:u.fn.color,value:u.fn.value,_select:u.fn._select,_triggerSelect:u.fn._triggerSelect,_isInputTypeColor:u.fn._isInputTypeColor,_preventDefaultLabelClick:function(){var e=this,t=e.element,n=t.closest("label"),i=t.attr("id");i&&(n=n.add('label[for="'+i+'"]')),n.on("click",(function(t){e.open(),t.preventDefault()}))},_updateUI:function(e,t){this._updateInput(e),this._triggerSelect(e),this.wrapper.find(".k-color-preview-mask").css("background-color",e?e.toDisplay():""),this._noColorIcon().toggleClass("k-no-color",!e),this._selector&&!t&&this._selector.value(e)},_updateInput:function(e){var t="";e&&(t=this._isInputTypeColor()||1==e.a?e.toCss():e.toCssRgba(),this.element.val(t)),this._ariaTemplate||(this._ariaTemplate=n.template(this.options.ARIATemplate)),this.wrapper.attr("aria-label",this._ariaTemplate(t))},_keydown:function(e){var t=e.keyCode;this._getPopup().visible()?(t==s.ESC?this._selector._cancel():this._selector._keydown(e),f(e)):t!=s.ENTER&&t!=s.DOWN||(this.open(),f(e))},_getPopup:function(){var t=this,i=t._popup;if(!i){var r,s=t.options;r=h,s.autoupdate=!0!==s.buttons,delete s.select,delete s.change,delete s.cancel,s._otOfPicker=!1;var l=n.guid(),c=e('
      ').appendTo(document.body),d=t._selector=new r(e("
      ").appendTo(c),s);t.wrapper.attr("aria-controls",l),t._popup=i=c.kendoPopup({anchor:t.wrapper,adjustSize:{width:5,height:0}}).data("kendoPopup"),d.bind({select:function(e){t._updateUI(a(e.value),!0)},change:function(e){t.options.buttons?t._select(d.color()):t._updateUI(a(e.value),!0),(t.options.buttons||"palette"===t._selector.options.view&&t.options.closeOnSelect)&&t.close()},cancel:function(){t.close()}}),i.bind({close:function(n){if(t.trigger("close"))n.preventDefault();else{t.wrapper.removeClass("k-focus");var i=d.color();t.options.buttons?t._select(t.color()):t._select(i),(i=t.color())&&i.h&&(t._cachedHue=i.h),event&&event instanceof MouseEvent&&0===e(event.target).parents(".k-colorpicker-popup").length||setTimeout((function(){t.wrapper&&!t.wrapper.is("[unselectable='on']")&&t.wrapper.trigger("focus")}),0),t.wrapper.attr("aria-expanded",!1)}},open:function(e){t.trigger("open")?e.preventDefault():(t.wrapper.addClass("k-focus"),t.wrapper.attr("aria-expanded",!0))},activate:function(){var e,n=t.color();n&&(n=n.toHSV(),e=o.fromHSV(t._cachedHue||0,n.s,n.v,n.a),n=n.equals(e)?e:n),d.value(n),d.focus(),t.wrapper.addClass("k-focus")}})}return i}});function f(e){e.preventDefault()}function m(e,t){return function(){return e.apply(t,arguments)}}i.plugin(p),n.cssProperties.registerPrefix("ColorPicker","k-picker-"),n.cssProperties.registerValues("ColorPicker",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=n.support,o=n.htmlEncode,a=r.browser.chrome?"disabled":"off",s="kendoPopup",l="init",c="open",d="refresh",u="change",h=".kendoFilterMenu",p=".k-table-th",f="Is equal to",m="Is not equal to",g={number:"numerictextbox",date:"datepicker"},v={string:"text",number:"number",date:"date"},_=n.isFunction,b=i.Widget,w=function(e){var t=e.actionsCssClass,i=e.messages;return'
      '+n.html.renderButton('",{type:"submit",themeColor:"primary",icon:"filter"})+n.html.renderButton('",{type:"reset",icon:"filter-clear"})+"
      "},y=function(e){e.field,e.format;var t=e.ns,n=e.messages;e.extra,e.operators,e.type,e.role,e.values,e.componentType;return'
      '+o(n.info)+'
      "+w({messages:n})+"
      "},k=function(e){e.field,e.format;var t=e.ns,i=e.messages,r=(e.extra,e.operators,e.type,e.role,e.values,e.componentType,n.guid()),a=n.guid();return'
      "+w({actionsCssClass:"k-columnmenu-actions",messages:i})+"
      "},x=function(e){e.field,e.format;var t=e.ns,n=e.messages;e.extra,e.operators,e.type,e.role,e.values,e.componentType;return'
      '+o(n.info)+'
      '+w({messages:n})+"
      "},C=function(e){e.field,e.format;var t=e.ns,i=e.messages,r=e.extra,a=e.operators,s=(e.type,e.role),l=e.values,c=e.componentType;return'
      '+("classic"===c?'
      '+o(i.info)+"
      ":"")+'"+(l?'':'")+(r?("modern"===c?"
      • And
      • Or
      ':'")+'"+(l?'':'"):"")+w({messages:i})+"
      "},S=function(e){e.field;var t=e.title,i=(e.format,e.ns),r=e.messages,s=e.extra,l=e.operators,c=e.filterMenuGuid,d=(e.type,e.role,e.inputType),u=e.values;return"
      '+n.ui.icon("chevron-left")+""+o(r.filter)+" "+o(r.into)+" "+o(t)+''+n.ui.icon("check")+'
      • '+o(r.info)+'
        "+(s?'
        ":"")+'
      •  
        • '+o(r.clear)+"
      "},T=function(e){e.field;var t=e.title,i=(e.format,e.ns),r=e.messages,s=(e.extra,e.operators,e.filterMenuGuid);e.type,e.role,e.inputType,e.values;return"
      '+n.ui.icon("chevron-left")+""+o(r.filter)+" "+o(r.into)+" "+o(t)+''+n.ui.icon("check")+'
      • '+o(r.info)+'
      •  
        • '+o(r.clear)+"
      "};function D(t,n){t.filters&&(t.filters=e.grep(t.filters,(function(e){return D(e,n),e.filters?e.filters.length:e.field!=n})))}function I(e){var t,n,i,r,o,a;if(e&&e.length)for(a=[],t=0,n=e.length;t.k-input-inner)").wrap("")),i.refresh(),i.trigger(l,{field:i.field,container:i.form}),i.options.cycleForm&&n.cycleForm(i.form)},_createForm:function(t){var i=this,r=i.options,a=i.operators||{},l=i.type;a=a[l]||r.operators[l],i.form=e('
      ').html(n.template(i._getTemplate())({field:i.field,format:r.format,ns:n.ns,messages:r.messages,extra:r.extra,operators:a,type:l,role:t,values:I(r.values),componentType:i.options.componentType})),r.appendToElement?(i.element.append(i.form),i.popup=i.element.closest(".k-column-menu.k-popup").data(s)):i.popup=i.form[s]({anchor:i.link,copyAnchorStyles:!1,open:i._open.bind(i),activate:i._activate.bind(i),close:function(){i.options.closeCallback&&i.options.closeCallback(i.element)}}).data(s),i.form.on("keydown"+h,i._keydown.bind(i))},_getTemplate:function(){var e=this,t=_(e.options.ui);return"boolean"===e.type?t?x:"modern"===e.options.componentType?k:y:C},_createMobileForm:function(t){var i=this,r=i.options,o=i.operators||{},a=n.guid(),s=i.type;o=o[s]||r.operators[s],i.form=e("
      ").html(n.template("boolean"===s?T:S)({field:i.field,title:r.title||i.field,format:r.format,ns:n.ns,messages:r.messages,extra:r.extra,operators:o,filterMenuGuid:a,type:s,role:t,inputType:v[s],values:I(r.values)})),i.view=i.pane.append(i.form.html()),i.form=i.view.element.find("form"),i.view.element.on("click",".k-header-done",(function(e){i.form.submit(),e.preventDefault()})).on("click",".k-header-cancel",(function(e){i._closeForm(),e.preventDefault()})).on("click",".k-clear",(function(e){i._mobileClear(),e.preventDefault()})),i.view.bind("showStart",(function(){i.refresh()}))},_createLink:function(){var e,t=this,i=t.element,r=t.appendTo.length?i.find(t.appendTo):i,o=t.options,a=n.format(o.messages.buttonTitle,t.options.title||t.field);if(!o.appendToElement)return(e=i.addClass("k-filterable").find(".k-grid-filter-menu"))[0]||(e=r.append('").find(".k-grid-filter-menu")),e.attr("tabindex",-1).on("click"+h,t._click.bind(t)),e},refresh:function(){var e=this,t=e.dataSource.filter()||{filters:[],logic:"and"},i=[e._defaultFilter()],r=e._defaultFilter().operator;(e.options.extra||"isnull"!==r&&"isnullorempty"!==r&&"isnotnullorempty"!==r&&"isnotnull"!==r&&"isempty"!==r&&"isnotempty"!==r)&&i.push(e._defaultFilter()),e.filterModel=n.observable({logic:"and",filters:i}),e.form&&(n.bind(e.form.children().first(),e.filterModel),"modern"===e.options.componentType&&e.options.extra&&"boolean"!==e.type&&!e._isMobile&&(e.filterModel.bind("change",(function(){var t=n.attr("role"),i=e.form.find("["+t+"='buttongroup']").data("kendoButtonGroup"),r="and"===this.logic?0:1;i.select(i.element.children().eq(r))})),e.filterModel.set("onLogicChange",e._logicChangeHandler))),e._bind(t)?e.link.addClass("k-active"):e.link.removeClass("k-active")},_logicChangeHandler:function(e){var t=n.attr("value"),i=e.sender.current().attr(t);this.set("logic",i)},destroy:function(){var e=this;b.fn.destroy.call(e),e.form&&(n.unbind(e.form),n.destroy(e.form),e.form.off(h),e.popup&&(e.popup.destroy(),e.popup=null),e.form=null),e.view&&(e.view.purge(),e.view=null),e.link.off(h),e._refreshHandler&&(e.dataSource.unbind(u,e._refreshHandler),e.dataSource=null),e.element=e.link=e._refreshHandler=e.filterModel=null},_bind:function(e){var t,n,i,r,o=this,a=e.filters,s=!1,l=0,c=o.filterModel;for(t=0,n=a.length;t1?s.filters.push(e):s.filters.push(a[0])):(s.filters=a,s.logic=o)),s},filter:function(e){var t=this._stripFilters(e.filters);t.length&&this.trigger("change",{filter:{logic:e.logic,filters:t},field:this.field})||(e=this._merge(e)).filters.length&&this.dataSource.filter(e)},clear:function(t){var n=this;t=t||e.extend(!0,{},{filters:[]},n.dataSource.filter())||{filters:[]},this.trigger("change",{filter:null,field:n.field})||n._removeFilter(t)},_mobileClear:function(){var t=this,n=t.view.element;if("boolean"===t.type){var i=n.find("[type='radio']:checked"),r=i.val();i.val(""),i.trigger("change"),i.val(r),i.prop("checked",!1)}else{if(n.find("select").each((function(t,n){var i=e(n);i.val(i.find("option").first().val()),i.trigger("change")})),"string"===t.type||"date"===t.type||"number"===t.type)n.find(".k-value-input").each((function(t,n){var i=e(n);i.val(""),i.trigger("change")}));if(t.options.extra){var o=n.find("[name=logic]").first();o.prop("checked",!0),o.trigger("change")}}},_removeFilter:function(t){var n=this;t.filters=e.grep(t.filters,(function(t){return t.filters?(t.filters=(i=t.filters,r=n.field,e.grep(i,(function(t){return t.filters?(t.filters=e.grep(t.filters,(function(e){return e.field!=r})),t.filters.length):t.field!=r}))),t.filters.length):t.field!=n.field;var i,r})),t.filters.length||(t=null),n.dataSource.filter(t)},_submit:function(t){t.preventDefault(),t.stopPropagation();var n=this.filterModel.toJSON(),i=e.grep(n.filters,(function(e){return""!==e.value&&null!==e.value}));if(this._checkForNullOrEmptyFilter(n)||i&&i.length)this.filter(n);else{var r=this.dataSource.filter();r&&(r.filters.push(n),n=r),this.clear(n)}this._closeForm()},_checkForNullOrEmptyFilter:function(e){if(!e||!e.filters||!e.filters.length)return!1;var t,n=!1,i=!1;return e.filters[0]&&(n="isnull"==(t=e.filters[0].operator)||"isnotnull"==t||"isnotempty"==t||"isempty"==t||"isnullorempty"==t||"isnotnullorempty"==t),e.filters[1]&&(i="isnull"==(t=e.filters[1].operator)||"isnotnull"==t||"isnotempty"==t||"isempty"==t||"isnullorempty"==t||"isnotnullorempty"==t),!this.options.extra&&n||this.options.extra&&(n||i)},_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(e){e.preventDefault(),e.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;e(".k-filter-menu").not(this.form).each((function(){(t=e(this).data(s))&&t.close()}))},_activate:function(){this.form.find(":kendoFocusable").first().trigger("focus"),this.trigger(c,{field:this.field,container:this.form})},_keydown:function(t){var i,r=e(t.target);if(t.keyCode==n.keys.ESC){if(i=n.widgetInstance(r.find("select")),r.hasClass("k-picker")&&i&&i.popup.visible())return void t.stopPropagation();r.closest(".k-popup").getKendoPopup().close()}},events:[l,"change",c],options:{name:"FilterMenu",extra:!0,appendToElement:!1,type:"string",operators:{string:{eq:f,neq:m,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",isnullorempty:"Has no value",isnotnullorempty:"Has value"},number:{eq:f,neq:m,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:m,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:m,isnull:"Is null",isnotnull:"Is not null"}},messages:{info:"Show items with value that:",title:"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",done:"Done",into:"in",buttonTitle:"{0} filter column settings"},animations:{left:"slide",right:"slide:right"},componentType:"classic",cycleForm:!0,appendTo:null}}),M=".kendoFilterMultiCheck";function E(t,n){t.filters&&(t.filters=e.grep(t.filters,(function(e){return E(e,n),e.filters?e.filters.length:e.field==n&&"eq"==e.operator})))}function A(n){return"and"==n.logic&&n.filters.length>1?[]:n.filters?e.map(n.filters,(function(e){return A(e)})):n.value!==t?[n.value]:[]}function H(e,i){for(var r=n.getter(i,!0),o=[],a=0,s={};a
        '+(o?'
      • '+n.ui.icon("search")+"
      • ":"")+'
      • '+r.checkAll+''+r.clearAll+"
      • "+(r.selectedItemsFormat?'
      • ':"")+'
        '},P=b.extend({init:function(t,i){var r;b.fn.init.call(this,t,i),i=this.options,this.element=e(t);var o,a,s=this.field=this.options.field||this.element.attr(n.attr("field")),l=i.checkSource;this._foreignKeyValues()?(this.checkSource=R.create(i.values),this.checkSource.fetch()):i.forceUnique?(delete(l=e.extend(!0,{},i.dataSource.options)).pageSize,this.checkSource=R.create(l),this.checkSource.reader.data=(o=this.checkSource.reader.data,a=this.field,function(e){return H(o(e),a)})):this.checkSource=R.create(l),this.dataSource=i.dataSource,this.model=this.dataSource.reader.model,this._parse=function(e){return e+""},this.model&&this.model.fields&&(s=this.model.fields[this.field])&&("number"==s.type?this._parse=function(e){return"string"==typeof e&&("null"===e.toLowerCase()||this._foreignKeyValues()&&""===e)?null:parseFloat(e)}:s.parse&&(this._parse=s.parse.bind(s)),this.type=s.type||"string"),(r=e(t.closest(p))).length?this.appendTo=r.find(i.appendTo):this.appendTo=e(i.appendTo),i.appendToElement?this._init():this._createLink(),this._refreshHandler=this.refresh.bind(this),this.dataSource.bind(u,this._refreshHandler)},_createLink:function(){var e=this.element,t=this.appendTo.length?e.find(this.appendTo):e,i=e.addClass("k-filterable").find(".k-grid-filter-menu"),r=o(n.format(this.options.messages.buttonTitle,this.options.title||this.field));i[0]||(i=t.append('").find(".k-grid-filter-menu")),this._link=i.attr("tabindex",-1).on("click"+h,this._click.bind(this))},_init:function(){var e=this,t=this.options.forceUnique,n=this.options;this.pane=n.pane,this.pane&&(this._isMobile=!0),this._createForm(),this._foreignKeyValues()?this.refresh():t&&!this.checkSource.options.serverPaging&&this.dataSource.data().length?(this.checkSource.data(H(this.dataSource.data(),this.field)),this.refresh()):(this._attachProgress(),this.checkSource.fetch((function(){e.refresh.call(e)}))),this.options.forceUnique||(this.checkChangeHandler=function(){e.container.empty(),e.refresh()},this.checkSource.bind(u,this.checkChangeHandler)),this.form.on("keydown"+M,this._keydown.bind(this)).on("submit"+M,this._filter.bind(this)).on("reset"+M,this._reset.bind(this)),this.trigger(l,{field:this.field,container:this.form})},_attachProgress:function(){var e=this;this._progressHandler=function(){i.progress(e.container,!0)},this._progressHideHandler=function(){i.progress(e.container,!1)},this.checkSource.bind("progress",this._progressHandler).bind("change",this._progressHideHandler)},_input:function(){var e=this;e._clearTypingTimeout(),e._typingTimeout=setTimeout((function(){e.search()}),100)},_clearSearch:function(){this.searchTextBox.val(""),this.search()},_clearTypingTimeout:function(){this._typingTimeout&&(clearTimeout(this._typingTimeout),this._typingTimeout=null)},search:function(){var e=this.options.ignoreCase,t=this.searchTextBox[0].value,n=this.container.find("label");e&&(t=t.toLowerCase());var i=0;for(this.options.checkAll&&n.length&&(this._isMobile?this.view.element.find(".k-select-all")[0].style.visibility=t?"hidden":"":(n[0].parentNode.style.display=t?"none":"",i++));i=0?"":"none",i++}},_activate:function(){this.form.find(":kendoFocusable").first().trigger("focus"),this.trigger(c,{field:this.field,container:this.form})},_createForm:function(){var t=this.options,i="",r=this;if(this._isMobile||(i+="
        ",t.search&&(i+=""+n.ui.icon("search")+""+n.ui.icon("x")+""),i+="
          ",t.messages.selectedItemsFormat&&(i+="
          "+n.format(t.messages.selectedItemsFormat,0)+"
          "),i+="
          ",i+="",i+="",i+="
          ",i+="
          ",this.form=e('
          ').html(i),this.container=this.form.find(".k-multicheck-wrap")),this._isMobile){var a=e(n.template(F)({field:r.field,title:t.title||r.field,ns:n.ns,messages:t.messages,search:t.search,checkAll:t.checkAll}));n.applyStylesFromKendoAttributes(a,["visibility"]),r.form=e("
          ").append(a),r.view=r.pane.append(r.form.html()),r.form=r.view.element.find("form");var l=this.view.element;this.container=l.find(".k-multicheck-wrap"),l.on("click",".k-header-done",(function(e){r.form.submit(),e.preventDefault()})).on("click",".k-header-cancel",(function(e){r._closeForm(),e.preventDefault()})).on("click",".k-clear-all",(function(e){r._mobileCheckAll(!1),e.preventDefault()})).on("click",".k-select-all",(function(e){r._mobileCheckAll(!0),e.preventDefault()})),r.view.bind("showStart",(function(){r.refresh()}))}else t.appendToElement?(this.popup=this.element.closest(".k-column-menu.k-popup").data(s),this.element.append(this.form)):r.popup=r.form.kendoPopup({anchor:r._link,copyAnchorStyles:!1,open:r._open.bind(r),activate:r._activate.bind(r),close:function(){r.options.closeCallback&&r.options.closeCallback(r.element)}}).data(s);t.search&&(this.searchTextBox=this.form.find(".k-searchbox input"),this.searchTextBox.on("input"+M,this._input.bind(this)),this.clearSearchButton=this.form.find(".k-searchbox .k-clear-value"),this.clearSearchButton.on("click"+M,this._clearSearch.bind(this)))},_open:function(){var t;e(".k-filter-menu").not(this.form).each((function(){(t=e(this).data(s))&&t.close()}))},createCheckAllItem:function(){var t=this.options,i=n.template(t.itemTemplate({field:"all",mobile:this._isMobile})),r=e(i({all:t.messages.checkAll}));this.container.prepend(r),r.addClass("k-check-all-wrap"),this.checkBoxAll=r.find(":checkbox").eq(0).addClass("k-check-all"),this.checkAllHandler=this.checkAll.bind(this),this.checkBoxAll.on(u+M,this.checkAllHandler)},updateCheckAllState:function(){if(this.options.messages.selectedItemsFormat&&this.form.find(".k-filter-selected-items").text(n.format(this.options.messages.selectedItemsFormat,this.container.find(":checked:not(.k-check-all)").length)),this.checkBoxAll){var e=this.container.find(":checkbox:not(.k-check-all)").length==this.container.find(":checked:not(.k-check-all)").length;this.checkBoxAll.prop("checked",e)}},createIsNullItem:function(){var t=this.options,i=n.template(t.itemTemplate({field:"isNull",mobile:this._isMobile,valueField:"value"})),r=e(i({isNull:t.messages.isNull,value:null}));this.container.append(r)},refresh:function(e){var t=this.options.forceUnique,n=this.dataSource,i=this.getFilterArray();this._link&&this._link.toggleClass("k-active",0!==i.length),this.form&&(e&&t&&e.sender===n&&!n.options.serverPaging&&("itemchange"==e.action||"add"==e.action||"remove"==e.action||n.options.autoSync&&"sync"===e.action)&&!this._foreignKeyValues()&&(this.checkSource.data(H(this.dataSource.data(),this.field)),this.container.empty()),this.container.is(":empty")&&this.createCheckBoxes(),this.checkValues(i),this.trigger(d))},getFilterArray:function(){var t=e.extend(!0,{},{filters:[],logic:"and"},this.dataSource.filter());return E(t,this.field),A(t)},createCheckBoxes:function(){var e,t=this.options,i={field:this.field,format:t.format,mobile:this._isMobile,type:this.type},r=B.bind(this);this.options.forceUnique?this._foreignKeyValues()?(e=this.checkSource.data(),i.valueField="value",i.field="text"):e=this.checkSource._isServerGrouped()?H(this.checkSource._flatData(this.checkSource.data()),this.field):this.checkSource.data():e=this.checkSource.view(),"boolean"===this.type&&(this.createIsNullItem(),e=e.filter(r));var o=n.template(t.itemTemplate(i)),a=n.render(o,e);this.container.on(u+M,":checkbox",this.updateCheckAllState.bind(this)),this.container.prepend(a),t.checkAll&&!this._isMobile&&this.createCheckAllItem()},checkAll:function(){var e=this.checkBoxAll.is(":checked");this.container.find(":checkbox").prop("checked",e)},checkValues:function(t){var n=this;e(e.grep(this.container.find(":checkbox").prop("checked",!1),(function(i){var r=!1;if(!e(i).is(".k-check-all"))for(var o=n._parse(e(i).val()),a=0;a"}:function(e){return"
        • "}},checkAll:!0,search:!1,ignoreCase:!0,appendToElement:!1,messages:{checkAll:"Select All",isNull:"is empty",clearAll:"Clear All",clear:"Clear",filter:"Filter",search:"Search",cancel:"Cancel",selectedItemsFormat:"{0} items selected",done:"Done",into:"in",buttonTitle:"{0} filter column settings"},forceUnique:!0,animations:{left:"slide",right:"slide:right"},appendTo:null},events:[l,d,"change",c]});function B(e){return null!==e[this.field]}e.extend(P.fn,{_click:z.fn._click,_keydown:z.fn._keydown,_reset:z.fn._reset,_closeForm:z.fn._closeForm,_removeFilter:z.fn._removeFilter,clear:z.fn.clear,_merge:z.fn._merge}),i.plugin(z),i.plugin(P)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=n._activeElement,o=n.support.touch&&n.support.mobileOS,a=Array.isArray,s=n.data.HierarchicalDataSource,l="mousedown",c="click",d=e.extend,u=e.each,h=n.htmlEncode,p=n.template,f=n.keys,m=i.Widget,g=/^(ul|a|div)$/i,v=".kendoMenu",_="open",b="k-menu",w="k-link k-menu-link",y=".k-link",k=".k-menu-expand-arrow-icon",x="k-last",C="close",S="timer",T="k-first",D="k-image",I="select",z="zIndex",M="activate",E="deactivate",A="touchstart"+v+" MSPointerDown"+v+" pointerdown"+v,H=n.support.pointers,R=n.support.msPointers,F=R||H,P="change",B="error",L=n.support.touch?"touchstart":"",V=H?"pointerover":R?"MSPointerOver":"mouseenter",O=H?"pointerout":R?"MSPointerOut":"mouseleave",N="DOMMouseScroll"+v+" mousewheel"+v,W=n.support.resize+v,U="group",j="groupparent",q=e(document.documentElement),G="kendoPopup",K="k-hover",Y="k-focus",$="k-disabled",Q=".k-menu",X=".k-animation-container",Z=".k-child-animation-container",J=".k-menu-popup ,.k-animation-container",ee=":not(.k-list) > .k-item:not([role='treeitem'])",te=".k-item",ne=".k-item:not(.k-disabled)",ie=":not(.k-item.k-separator):visible",re=".k-menu-scroll-button",oe={2:1,touch:1},ae="dataBound",se="aria-expanded",le="role",ce={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField",imageAttr:"dataImageAttrField",content:"dataContentField"},de={wrapperCssClass:function(e,t){var n="k-item k-menu-item",i=t.index;return t.separator&&(n+=" k-separator"),!1===t.enabled&&(n+=" k-disabled"),e.firstLevel&&0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),t.cssClass&&(n+=" "+t.cssClass),t.attr&&t.attr.hasOwnProperty("class")&&(n+=" "+t.attr.class),t.selected&&(n+=" k-selected"),n},itemCssAttributes:function(e){var t="",n=e.attr||{};for(var i in n)n.hasOwnProperty(i)&&"class"!==i&&(t+=i+'="'+n[i]+'" ');return t},imageCssAttributes:function(e){var t="",n=e&&e.toJSON?e.toJSON():{};for(var i in n.class?n.class+=" "+D:n.class=D,n)n.hasOwnProperty(i)&&(t+=i+'="'+n[i]+'" ');return t},contentCssAttributes:function(e){var t="",n=e.contentAttr||{},i="k-content k-group k-menu-group k-menu-group-md";for(var r in n.class?n.class+=" "+i:n.class=i,n)n.hasOwnProperty(r)&&(t+=r+'="'+n[r]+'" ');return t},textClass:function(){return w},groupAttributes:function(e){return!0!==e.expanded?n.attr("style-display")+'="none"':""},groupCssClass:function(){return"k-group k-menu-group k-menu-group-md"},groupWrapperCssClass:function(){return"k-menu-popup"},content:function(e){return e.content?e.content:" "}};function ue(t,n){try{return e.contains(t,n)}catch(e){return!1}}function he(t){(t=e(t)).attr(n.attr("omit-wrap"))||(t.addClass("k-item k-menu-item").children("img").addClass(D),t.children("a").addClass(w).children("img").addClass(D),t.filter(":not([disabled])"),t.filter(".k-separator").removeClass("k-menu-item").addClass("k-menu-separator").empty().append(" "),t.filter("li[disabled]").addClass($).prop("disabled",!1).attr("aria-disabled",!0),t.filter("[role]").length||t.attr(le,"menuitem"),t.children(y).length||t.contents().filter((function(){return!(this.nodeName.match(g)||3===this.nodeType&&!n.trim(this.nodeValue))})).wrapAll("").filter((function(e,t){return 3===t.nodeType})).wrap(""),pe(t),me(t))}function pe(t){(t=e(t)).find("> .k-link > .k-menu-expand-arrow > [class*=k-i-caret]:not(.k-sprite),> .k-link > .k-menu-expand-arrow > [class*=k-svg-i-caret]:not(.k-sprite)").parent().remove(),t.filter(":has(.k-menu-group)").children(".k-link:not(:has([class*=k-i-caret]:not(.k-sprite))),.k-link:not(:has([class*=k-svg-i-caret]:not(.k-sprite)))").each((function(){var t=e(this);t.append("")}))}function fe(e){var t=e.parent().parent(),i=n.support.isRtl(t);return t.hasClass(b+"-horizontal")?"caret-alt-down":i?"caret-alt-left":"caret-alt-right"}function me(t){(t=e(t)).filter(".k-first:not(:first-child)").removeClass(T),t.filter(".k-last:not(:last-child)").removeClass(x),t.filter(":first-child").addClass(T),t.filter(":last-child").addClass(x)}function ge(e){if(e&&e.length)for(var t in e){var n=e.eq(t);n.find("ul").length?n.attr("aria-haspopup",!0):n.removeAttr("aria-haspopup")}}function ve(e){if(!e.hasClass(b))return e.parentsUntil("."+b,"li")}function _e(t,i){var r=function(e){var t=e.select,i=n.isFunction;if(t&&i(t))return t;return null}(i);r&&function(t,n){e(t).children(".k-link").data({selectHandler:n})}(t,r),i.items&&e(t).children("ul").children("li").each((function(e){_e(this,i.items[e])}))}function be(e){return e?"li[data-groupparent='"+e+"']":"li[data-groupparent]"}function we(e){var t=e?"[data-group='"+e+"']":"[data-group]";return"ul"+t+",div"+t}function ye(t,n){var i=t.find(be()),r=[];return i.each((function(i,o){for(var a=(o=e(o)).data(j),s=t;a;)(s=n.find(we(a)+":visible")).length&&r.push(s),a=(o=s.find(be())).data(j)})),r}function ke(t,n){var i=t.data(U);return i?n.find(be(i)):e([])}function xe(t,n){var i=t.data(j);return i?n.children(X).find(we(i)):e([])}function Ce(e,t){for(var n=0,i=e.parentNode;i&&!isNaN(i[t]);)n+=i[t],i=i.parentNode;return n}function Se(e){return F&&e.originalEvent&&e.originalEvent.pointerType in oe}function Te(e){e.contents().filter((function(){return"LI"!=this.nodeName})).remove()}var De=n.ui.DataBoundWidget.extend({init:function(e,t){var i=this;m.fn.init.call(i,e,t),e=i.wrapper=i.element,t=i.options,i._accessors(),i._templates(),i._dataSource(),i._updateClasses(),i._wrapGroups(),i._animations(t),i.nextItemZIndex=100,i._tabindex(),i._initOverflow(t),i._attachMenuEventsHandlers(),t.openOnClick&&(i.clicked=!1),e.attr(le,"menubar"),e[0].id?i._ariaId=n.format("{0}_mn_active",e[0].id):i._ariaId=n.format("{0}_mn_active",n.guid()),n.notify(i)},events:[_,C,M,E,I,ae],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(){var e=this;e.dataSource&&(e.angular("cleanup",(function(){return{elements:e.element.children()}})),e.element.empty(),e.append(e.dataSource.view(),e.element),e.angular("compile",(function(){return{elements:e.element.children()}})))},_attachMenuEventsHandlers:function(){var t=this,n=t.element,i=t.options,r=t._overflowWrapper();t._checkActiveProxy=t._checkActiveElement.bind(t),(r||n).on(A,te,t._focusHandler.bind(t)).on(c+v,".k-item.k-disabled",!1).on(c+v,te,t._click.bind(t)).on(A+" "+l+v,".k-content",t._preventClose.bind(t)).on(V+v,ne,t._mouseenter.bind(t)).on(O+v,ne,t._mouseleave.bind(t)).on(l+v,ne,t._mousedown.bind(t)).on(L+v+" "+V+v+" "+O+v+" "+l+v+" "+c+v,".k-item:not(.k-disabled) > .k-link",t._toggleHover.bind(t)),n.on("keydown"+v,t._keydown.bind(t)).on("focus"+v,t._focus.bind(t)).on("focus"+v,".k-content",t._focus.bind(t)).on("blur"+v,t._removeHoverItem.bind(t)).on("blur"+v,"[tabindex]",t._checkActiveProxy),r&&r.on(O+v,J,t._mouseleavePopup.bind(t)).on(V+v,J,t._mouseenterPopup.bind(t)),i.openOnClick&&(t._documentClickHandler=t._documentClick.bind(t),e(document).on("click",t._documentClickHandler))},_detachMenuEventsHandlers:function(){var t=this,n=t._overflowWrapper();n&&n.off(v),t.element.off(v),t._documentClickHandler&&e(document).off("click",t._documentClickHandler)},_initOverflow:function(t){var n,i,r=this,o="horizontal"==t.orientation;if(t.scrollable){r._openedPopups={},r._scrollWrapper=r.element.wrap("
          ").parent(),o&&Te(r.element),n=e(r.templates.scrollButton({direction:o?"left":"up"})),i=e(r.templates.scrollButton({direction:o?"right":"down"})),n.add(i).appendTo(r._scrollWrapper),r._initScrolling(r.element,n,i,o);var a=r.element.outerWidth(),s=r.element[0].style.width;s="auto"===s?"":s,o&&e(window).on(W,(function(){setTimeout((function(){r._setOverflowWrapperWidth(a,s),r._toggleScrollButtons(r.element,n,i,o)}),300)})),r._setOverflowWrapperWidth(a,s),r._toggleScrollButtons(r.element,n,i,o)}},_overflowWrapper:function(){return this._scrollWrapper||this._popupsWrapper},_setOverflowWrapperWidth:function(e,t){var n=this,i=n._scrollWrapper.css("width");n._scrollWrapper.css({width:""});var r=n._scrollWrapper.outerWidth();n._scrollWrapper.css({width:i});var o=n.element.outerWidth(),a=n.element[0].offsetWidth-n.element[0].clientWidth;if(o!=r&&r>0){var s=t?Math.min(e,r):r;n.element.width(s-a),n._scrollWrapper.width(s)}},_reinitOverflow:function(e){var t=this;(e.scrollable&&!t.options.scrollable||!e.scrollable&&t.options.scrollable||e.scrollable&&t.options.scrollable&&e.scrollable.distance!=t.options.scrollable.distance||e.orientation!=t.options.orientation)&&(t._detachMenuEventsHandlers(),t._destroyOverflow(),t._initOverflow(e),t._attachMenuEventsHandlers())},_destroyOverflow:function(){var n=this,i=n._overflowWrapper();i&&(i.off(v),i.find(re).off(v).remove(),i.children(X).each((function(t,n){var r=e(n).find(".k-child-animation-container > .k-menu-popup");r.off(N);var o=ke(r,i);o.length&&o.append(n)})),i.find(be()).removeAttr("data-groupparent"),i.find(we()).removeAttr("data-group"),n.element.off(N),e(window).off(W),i.contents().unwrap(),n._scrollWrapper=n._popupsWrapper=n._openedPopups=t)},_initScrolling:function(t,i,r,a){var s=this,l=s.options.scrollable,c=s.isNumeric(l.distance)?l.distance:50,d=c/2,u="-="+c,h="+="+c,p="-="+2*c,f="+="+2*c,m=!1,g=!1,_=function(e){var n=a?{scrollLeft:e}:{scrollTop:e};t.finish().animate(n,"fast","linear",(function(){m&&_(e)})),s._toggleScrollButtons(t,i,r,a)},b=function(e){m||g||(_(e.data.direction),m=!0)},w=function(n){var l=a?{scrollLeft:n.data.direction}:{scrollTop:n.data.direction};g=function(e){var t=e.originalEvent;return o&&/touch/i.test(t.type||"")}(n)||Se(n),t.stop().animate(l,"fast","linear",(function(){g?(s._toggleScrollButtons(t,i,r,a),m=!0):e(n.currentTarget).trigger(V)})),m=!1,n.stopPropagation(),n.preventDefault()};i.on(V+v,{direction:u},b).on(n.eventMap.down+v,{direction:p},w),r.on(V+v,{direction:h},b).on(n.eventMap.down+v,{direction:f},w),i.add(r).on(O+v,(function(){t.stop(),m=!1,s._toggleScrollButtons(t,i,r,a)})),t.on(N,(function(e){if(!e.ctrlKey&&!e.shiftKey&&!e.altKey){var n=function(e){var t=0;return e.wheelDelta&&(t=(t=-e.wheelDelta/120)>0?Math.ceil(t):Math.floor(t)),e.detail&&(t=Math.round(e.detail/3)),t}(e.originalEvent),o=(n>0?"+=":"-=")+Math.abs(n)*d,l=a?{scrollLeft:o}:{scrollTop:o};s._closeChildPopups(t),t.finish().animate(l,"fast","linear",(function(){s._toggleScrollButtons(t,i,r,a)})),e.preventDefault()}}))},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},_toggleScrollButtons:function(e,t,i,r){var o=r?n.scrollLeft(e):e.scrollTop(),a=r?"scrollWidth":"scrollHeight",s=r?"offsetWidth":"offsetHeight";t.toggle(0!==o),i.toggle(o ul").addClass("k-menu-group k-menu-group-md").attr(le,"menu"),(o=o.filter("li")).add(s.find("> li")).each((function(){he(this)}))),{items:o,group:r}},remove:function(e){var t=(e=this.attemptGetItem(e)).parentsUntil(this.element,ee),n=e.parent("ul:not(.k-menu)");if(e.remove(),n&&!n.children(ee).length){var i=ve(n),r=n.parent(X);r.length?r.remove():n.remove(),ge(i)}return t.length&&(pe(t=t.eq(0)),me(t)),this},_openAfterLoad:function(e,t){var n=this;t.loaded()?(n.open(e),n._loading=!1):t.one(P,(function(){e.find(k).removeClass("k-i-loading"),n._loading&&(n.open(e),n._loading=!1)}))},open:function(i){var r=this,a=r.options,s="horizontal"==a.orientation,l=a.direction,c=n.support.isRtl(r.wrapper),u=r._overflowWrapper();i=(u||r.element).find(i);var h=r.dataSource&&r.dataSource.getByUid(i.data(n.ns+"uid"));if(h&&h.hasChildren&&!h.loaded()&&!r._loading)return r._loading=!0,i.find(k).addClass("k-i-loading"),h.load(),void r._openAfterLoad(i,h);/^(top|bottom|default)$/.test(l)&&(l=c?s?(l+" left").replace("default","bottom"):"left":s?(l+" right").replace("default","bottom"):"right");var p=">.k-popup:visible,>.k-animation-container > .k-child-animation-container > .k-menu-popup:visible",f=function(){e(this).data(G)&&r.close(e(this).closest("li.k-item"),!0)};return i.siblings().find(p).each(f),u&&i.find(p).each(f),r.options.openOnClick&&(r.clicked=!0),i.each((function(){var i=e(this);clearTimeout(i.data(S)),clearTimeout(r._timerTimeout),r._timerTimeout=setTimeout((function(){var h,p,f=i.find("> .k-menu-popup, > .k-animation-container > .k-child-animation-container > .k-menu-popup").filter(":hidden").first();if(!f[0]&&u&&(p=r._getPopup(i),f=p&&p.element),!f.is(":visible")&&f[0]&&!1===r._triggerEvent({item:i[0],type:_})){if(!f.find(".k-menu-popup")[0]&&f.children(".k-menu-group").children(".k-item").length>1){var m=e(window).height();f.css({maxHeight:m-(n._outerHeight(f)-f.height())-n.getShadows(f).bottom,overflow:"auto"})}else f.css({maxHeight:"",overflow:"visible"});i.data(z,i.css(z));var g=r.nextItemZIndex++;i.css(z,g),r.options.scrollable&&i.parent().siblings(re).css({zIndex:++g}),h=f.data(G);var v=i.parent().hasClass(b),w=v&&s,y=function(e,t,i){e=e.split(" ")[!t+0]||e;var r={origin:["bottom",i?"right":"left"],position:["top",i?"right":"left"]};return/left|right/.test(e)?(r.origin=["top",e],r.position[1]=n.directions[e].reverse):(r.origin[0]=e,r.position[0]=n.directions[e].reverse),r.origin=r.origin.join(" "),r.position=r.position.join(" "),r}(l,v,c),k=a.animation.open.effects,x=k!==t?k:"slideIn:"+function(e,t){return(e=e.split(" ")[!t+0]||e).replace("top","up").replace("bottom","down")}(l,v);h?((h=f.data(G)).options.origin=y.origin,h.options.position=y.position,h.options.animation.open.effects=x):(h=f.kendoPopup({activate:function(){r._triggerEvent({item:this.wrapper.parent(),type:M})},deactivate:function(e){r._closing=!1,e.sender.element.removeData("targetTransform").css({opacity:""}),r._triggerEvent({item:this.wrapper.parent(),type:E})},origin:y.origin,position:y.position,collision:a.popupCollision!==t?a.popupCollision:w?"fit":"fit flip",anchor:i,appendTo:u||i,animation:{open:d(!0,{effects:x},a.animation.open),close:a.animation.close},open:r._popupOpen.bind(r),close:function(e){r._closing=e.sender.element;var t=e.sender.wrapper.parent();if(u){var i=e.sender.element.data(U);i&&(t=(u||r.element).find(be(i))),e.sender.wrapper.children(re).hide()}r._triggerEvent({item:t[0],type:C})?e.preventDefault():(t.css(z,t.data(z)),t.removeData(z),r.options.scrollable&&t.parent().siblings(re).css({zIndex:""}),(o||F||n.support.mouseAndTouchPresent)&&(t.removeClass(K),r._removeHoverItem()))}}).data(G),f.closest(X).removeAttr(le)),f.removeAttr("aria-hidden"),i.attr(se,!0),r._configurePopupOverflow(h,i),h._hovered=!0,h.open(),r._initPopupScrolling(h)}}),r.options.hoverDelay),i.data(S,r._timerTimeout)})),r},_configurePopupOverflow:function(e,t){if(this.options.scrollable&&(this._wrapPopupElement(e),!t.attr("data-groupparent"))){var n=(new Date).getTime();t.attr("data-groupparent",n),e.element.attr("data-group",n)}},_wrapPopupElement:function(e){e.element.parent().is(Z)||(e.wrapper=n.wrap(e.element,e.options.autosize).css({overflow:"hidden",display:"block",position:"absolute"}))},_initPopupScrolling:function(e,t,n){this.options.scrollable&&e.element[0].scrollHeight>e.element[0].offsetHeight&&this._initPopupScrollButtons(e,t,n)},_initPopupScrollButtons:function(t,n,i){var r=this,o=t.wrapper.children(re),a=r.options.animation,s=(a&&a.open&&a.open.duration||0)+30;setTimeout((function(){if(!o.length){var a=e(r.templates.scrollButton({direction:n?"left":"up"})),s=e(r.templates.scrollButton({direction:n?"right":"down"}));o=a.add(s).appendTo(t.wrapper),r._initScrolling(t.element,a,s,n),i||o.on(V+v,(function(){var n=r._overflowWrapper();e(ye(t.element,n)).each((function(e,t){var i=n.find(be(t.data(U)));r.close(i)}))})).on(O+v,(function(){setTimeout((function(){e.isEmptyObject(r._openedPopups)&&r._closeParentPopups(t.element)}),30)}))}r._toggleScrollButtons(t.element,o.first(),o.last(),n)}),s)},_popupOpen:function(e){this._keyTriggered||e.sender.element.children(".k-focus").removeClass(Y),this.options.scrollable&&this._setPopupHeight(e.sender)},_setPopupHeight:function(t,i){var r=t.element,o=r.add(r.parent(Z));o.height(r.hasClass(b)&&this._initialHeight||"");var a=t._location(i),s=e(window).height(),l=a.height,c=i?0:Math.max(a.top,0),d=i?0:Ce(this._overflowWrapper()[0],"scrollTop"),u=window.innerHeight-s,h=s-n.getShadows(r).bottom+u;if(!(h+d>l+c)){var p=Math.min(h,h-c+d);o.css({overflow:"hidden",height:p+"px"})}},close:function(t,n){var i=this,r=i._overflowWrapper(),o=r||i.element;(t=o.find(t)).length||(t=o.find(">.k-item"));return t.each((function(){var o=e(this);o.attr(se,!1),!n&&i._isRootItem(o)&&(i.clicked=!1),clearTimeout(o.data(S)),o.data(S,setTimeout((function(){var n,a,s,l=i._getPopup(o);if(l&&(s=o.data(j),!r||!s||!i._openedPopups[s.toString()]||i._forceClose)){if(!i._forceClose&&(n=l.element,a=!1,e.isEmptyObject(i._openedPopups)||e(ye(n,r)).each((function(e,t){return!(a=!!i._openedPopups[t.data(U).toString()])})),a))return;l.close(),l.element.attr("aria-hidden",!0),r&&i._forceClose&&t.last().is(o[0])&&delete i._forceClose}}),i.options.hoverDelay))})),i},_getPopup:function(e){var t=e.find(".k-menu-popup:not(.k-list-container):not(.k-calendar-container):visible").first().data(G),n=this._overflowWrapper();if(!t&&n){var i=e.data(j);if(i)t=n.find(we(i)).data(G)}return t},_toggleDisabled:function(t,n){this.element.find(t).each((function(){e(this).toggleClass($,!n).attr("aria-disabled",!n)}))},_toggleHover:function(t){var i=e(n.eventTarget(t)||t.target).closest(ee),r=t.type==V||-1!==l.indexOf(t.type);i.siblings().removeClass(K),i.parents("li.k-disabled").length||i.toggleClass(K,r||"mousedown"==t.type||"pointerover"==t.type||t.type==L),this._removeHoverItem()},_preventClose:function(){this.options.closeOnClick||(this._closurePrevented=!0)},_checkActiveElement:function(t){var i=this,r=e(t?t.currentTarget:this._hoverItem()),o=i._findRootParent(r)[0];this._closurePrevented||setTimeout((function(){document.hasFocus()&&(ue(o,n._activeElement())||!t||ue(o,t.currentTarget))||i.close(o)}),0),this._closurePrevented=!1},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(Y)&&(e.removeClass(Y),this._oldHoverItem=null)},_wrapGroups:function(){var t=this;t.element.find("li > ul").filter((function(){return!e(this).parent().hasClass("k-menu-popup")})).wrap("
          ").parent("div").attr("aria-hidden",t.element.is(":visible")).hide(),t.element.find("ul").each((function(){var t=e(this),i=n.guid();t.attr("id",i).closest("li").attr("aria-controls",i)}))},_updateClasses:function(){var e,t=this.element;t.removeClass("k-menu-horizontal k-menu-vertical"),t.addClass("k-widget k-reset k-menu-init "+b).addClass(b+"-"+this.options.orientation),"vertical"===this.options.orientation?t.attr("aria-orientation","vertical"):t.attr("aria-orientation","horizontal"),t.find("li > ul").filter((function(){return!n.support.matchesSelector.call(this,".k-menu-init div ul")})).addClass("k-group k-menu-group k-menu-group-md").attr(le,"menu").parent("li").attr("aria-haspopup","true").end().find("li > div").addClass("k-content").attr("tabindex","-1"),t.find("li[aria-haspopup]").attr(se,!1),e=t.find("> li,.k-menu-group > li"),t.removeClass("k-menu-init"),e.each((function(){he(this)}))},_mouseenter:function(t){var n=this,i=e(t.currentTarget),r=n._itemHasChildren(i),a=i.data(j)||i.parent().data(U),s=Se(t),l=!1;a&&(n._openedPopups[a.toString()]=!0),n._closing&&(l=!!n._closing.find(i).length),l||t.delegateTarget!=i.parents(Q)[0]&&t.delegateTarget!=i.parents(".k-menu-scroll-wrapper,.k-popups-wrapper")[0]||(n._keyTriggered=!1,n.options.openOnClick.rootMenuItems&&n._isRootItem(i.closest(ee))||n.options.openOnClick.subMenuItems&&!n._isRootItem(i.closest(ee))||(!(!1===n.options.openOnClick||!1===n.options.openOnClick.rootMenuItems&&n._isRootItem(i.closest(ee))||!1===n.options.openOnClick.subMenuItems&&!n._isRootItem(i.closest(ee))||n.clicked)||o||s&&n._isRootItem(i.closest(ee))||!ue(t.currentTarget,t.relatedTarget)&&r&&n.open(i),(!0===n.options.openOnClick&&n.clicked||o)&&i.siblings().each((function(e,t){n.close(t,!0)}))))},_mousedown:function(t){var n=this,i=e(t.currentTarget);(n.options.openOnClick.subMenuItems&&!n._isRootItem(i)||o)&&i.siblings().each((function(e,t){n.close(t,!0)}))},_mouseleave:function(t){var i=this,r=e(t.currentTarget),a=r.data(j),s=r.children(X).length||r.children(".k-menu-group").length||a,l=e(window);if(a&&delete i._openedPopups[a.toString()],!r.parentsUntil(X,".k-list-container,.k-calendar-container")[0])return!1!==i.options.openOnClick&&(i.options.openOnClick.rootMenuItems||!i._isRootItem(r))&&(i.options.openOnClick.subMenuItems||i._isRootItem(r))||o||Se(t)||ue(t.currentTarget,t.relatedTarget||t.target)||!s||ue(t.currentTarget,n._activeElement())?void((n.support.browser.msie&&!t.toElement&&!t.relatedTarget&&!Se(t)||t.clientX<0||t.clientY<0||t.clientY>l.height()||t.clientX>l.width())&&i.close(r)):(i.close(r,!0),void(i._loading=!1));t.stopImmediatePropagation()},_mouseenterPopup:function(t){var n=e(t.currentTarget);if(!n.parent().is(Z)){var i=(n=n.children("ul")).data(U);i&&(this._openedPopups[i.toString()]=!0)}},_mouseleavePopup:function(t){var n=e(t.currentTarget);!Se(t)&&n.is(X)&&this._closePopups(n.children("ul"))},_closePopups:function(t){var n=this,i=n._overflowWrapper(),r=t.data(U);if(r){delete n._openedPopups[r.toString()];var o=i.find(be(r));setTimeout((function(){if(n.options.openOnClick)n._closeChildPopups(t);else if(e.isEmptyObject(n._openedPopups)){var i=n._innerPopup(t);n._closeParentPopups(i)}else n.close(o,!0)}),0)}},_closeChildPopups:function(t){var n=this,i=n._overflowWrapper();e(ye(t,i)).each((function(){var e=i.find(be(this.data(U)));n.close(e,!0)}))},_innerPopup:function(e){var t=ye(e,this._overflowWrapper());return t[t.length-1]||e},_closeParentPopups:function(e){var t=this,n=t._overflowWrapper(),i=e.data(U),r=n.find(be(i));for(i=r.parent().data(U),t.close(r,!0);i&&!t._openedPopups[i]&&!r.parent().is(Q);)r=n.find(be(i)),t.close(r,!0),i=r.parent().data(U)},_click:function(t){var i,r,o,a,s=this,l=s.options,c=e(n.eventTarget(t)),d=c[0],u=c[0]?c[0].nodeName.toUpperCase():"",h="INPUT"==u||"SELECT"==u||"BUTTON"==u||"LABEL"==u,p=c.closest(y),f=c.closest(ee),m=f[0],g=p.attr("href"),v=c.attr("href"),b=e("").attr("href"),w=!!g&&g!==b,k=w&&!!g.match(/^#/),x=!!v&&v!==b,S=s._overflowWrapper();if(!d||d.parentNode&&m){for(e(c).closest("span").hasClass("k-menu-expand-arrow-icon")&&(this._lastClickedElement=m);d&&d.parentNode!=m;)d=d.parentNode;if(!e(d).is("div:not(.k-animation-container,.k-list-container)"))if(f.hasClass($))t.preventDefault();else{if(t.handled||!s._triggerSelect(c,m)||h||t.preventDefault(),t.handled=!0,r=f.children(J),S){var T=f.data(j);T&&(r=S.find(we(T)))}if(o=r.is(":visible"),a=l.openOnClick&&o&&s._isRootItem(f),l.closeOnClick&&(!w||k)&&(!r.length||a)){f.removeClass(K).css("height"),s._oldHoverItem=s._findRootParent(f);var D=s._parentsUntil(p,s.element,ee);return s._forceClose=!!S,s.close(D),s.clicked=!1,void(-1!="MSPointerUp".indexOf(t.type)&&t.preventDefault())}w&&t.enterKey&&p[0].click(),(s._isRootItem(f)&&!1!==l.openOnClick||l.openOnClick.subMenuItems||n.support.touch||Se(t)&&s._isRootItem(f.closest(ee)))&&(w||h||x||t.preventDefault(),s.clicked=!0,i=r.is(":visible")?C:_,(l.closeOnClick||i!=C)&&s[i](f))}}},_parentsUntil:function(t,n,i){var r=this._overflowWrapper();if(r){var o=function(t,n){var i=[],r=function(e){for(;e.parentNode&&!n.is(e.parentNode);)i.push(e.parentNode),e=e.parentNode},o=t[0]||t;r(o);for(var a=i[i.length-1];e(a).is(X)&&(o=ke(e(a).children("ul"),n)[0]);)i.push(o),r(o),a=i[i.length-1];return i}(t,r),a=[];return e(o).each((function(){var t=e(this);if(t.is(n))return!1;t.is(i)&&a.push(this)})),e(a)}return t.parentsUntil(n,i)},_triggerSelect:function(e,t){var n,i=(e=e.is(".k-link")?e:e.closest(".k-link")).data("selectHandler");i&&(n=this._getEventData(e),i.call(this,n));var r=n&&n.isDefaultPrevented(),o=this._triggerEvent({item:t,type:I});return r||o},_getEventData:function(e){return{sender:this,target:e,_defaultPrevented:!1,preventDefault:function(){this._defaultPrevented=!0},isDefaultPrevented:function(){return this._defaultPrevented}}},_documentClick:function(n){var i=this,r=e(n.target).closest("span").hasClass("k-menu-expand-arrow-icon")?i._lastClickedElement:n.target;ue((i._overflowWrapper()||i.element)[0],r)?i._lastClickedElement=t:i.clicked=!1},_focus:function(t){var n=this,i=t.target,o=n._hoverItem(),a=r();if(i!=n.wrapper[0]&&!e(i).is(":kendoFocusable"))return t.stopPropagation(),e(i).closest(".k-content").closest(".k-menu-popup").closest(".k-item").addClass(Y),void n.wrapper.trigger("focus");a===t.currentTarget&&(o.length?n._moveHover([],o):n._oldHoverItem||n._moveHover([],n.wrapper.children().first()))},_keydown:function(e){var t,i,r,o=this,a=e.keyCode,s=o._oldHoverItem,l=n.support.isRtl(o.wrapper);if(e.target==e.currentTarget||a==f.ESC){if(s||(s=o._oldHoverItem=o._hoverItem()),i=o._itemBelongsToVertival(s),r=o._itemHasChildren(s),o._keyTriggered=!0,a==f.RIGHT)t=o[l?"_itemLeft":"_itemRight"](s,i,r);else if(a==f.LEFT)t=o[l?"_itemRight":"_itemLeft"](s,i,r);else if(a==f.DOWN)t=o._itemDown(s,i,r);else if(a==f.UP)t=o._itemUp(s,i,r);else if(a==f.HOME)o._moveHover(s,s.parent().children(":visible").first()),e.preventDefault();else if(a==f.END)o._moveHover(s,s.parent().children(":visible").last()),e.preventDefault();else if(a==f.ESC)t=o._itemEsc(s,i);else if(a==f.ENTER||a==f.SPACEBAR)(t=s.children(".k-link")).length>0&&(o._click({target:t[0],preventDefault:function(){},enterKey:!0}),r&&!s.hasClass($)?(o.open(s),o._moveHover(s,o._childPopupElement(s).children().find("li").first())):s.is("li")&&"menuitemcheckbox"===s.attr("role")?s.find(".k-checkbox").attr("checked",!0):o._moveHoverToRoot(s,o._findRootParent(s)));else if(a==f.TAB)return t=o._findRootParent(s),o._moveHover(s,t),void o._checkActiveElement();t&&t[0]&&(e.preventDefault(),e.stopPropagation())}},_hoverItem:function(){return this.wrapper.find(".k-item.k-hover,.k-item.k-focus").filter(":visible")},_itemBelongsToVertival:function(e){var t=this.wrapper.hasClass("k-menu-vertical");return e.length&&e.parent().hasClass("k-menu-group")||t},_itemHasChildren:function(e){return!!(e&&e.length&&e[0].nodeType)&&(e.children(".k-menu-group, .k-menu-popup, div.k-animation-container").length>0||!!e.data(j)&&!!this._overflowWrapper().children(we(e.data(j))))},_moveHover:function(t,n){var i=this,r=i._ariaId;t.length&&n.length&&t.removeClass(Y),n.length&&(n[0].id&&(r=n[0].id),n.addClass(Y),i._oldHoverItem=n,r&&(i.element.removeAttr("aria-activedescendant"),e("#"+r).removeAttr("id"),n.attr("id",r),i.element.attr("aria-activedescendant",r)),i._scrollToItem(n))},_moveHoverToRoot:function(e,t){this._moveHover(e,t)},_findRootParent:function(e){return this._isRootItem(e)?e:this._parentsUntil(e,Q,"li.k-item").last()},_isRootItem:function(e){return e.parent().hasClass(b)},_itemRight:function(e,t,n){var i,r,o,a=this;if(t){if(n&&!e.hasClass($))a.open(e),i=a._childPopupElement(e).children().find("li").first();else if("horizontal"==a.options.orientation){if(r=a._findRootParent(e),o=a._overflowWrapper()){var s=xe(r,o);a._closeChildPopups(s)}a.close(r),i=r.nextAll(te+ie).eq(0)}}else(i=e.nextAll(te+ie).eq(0)).length||(i=e.prevAll(te+ie).last()),a.close(e);return i&&!i.length?i=a.wrapper.children(".k-item").first():i||(i=[]),a._moveHover(e,i),i},_itemLeft:function(e,t){var n,i,r=this;return t?(n=e.parent().closest(".k-item"),i=r._overflowWrapper(),!n.length&&i&&(n=ke(e.parent(),i)),r.close(n),r._isRootItem(n)&&"horizontal"==r.options.orientation&&(n=n.prevAll(te+ie).eq(0))):((n=e.prevAll(te+ie).eq(0)).length||(n=e.nextAll(te+ie).last()),r.close(e)),n.length||(n=r.wrapper.children(".k-item").last()),r._moveHover(e,n),n},_itemDown:function(e,t,n){var i,r=this;if(t)i=e.nextAll(te+ie).eq(0);else{if(!n||e.hasClass($))return;r.open(e),i=r._childPopupElement(e).children().find("li").first()}return!i.length&&e.length?i=e.parent().children(":visible").first():e.length||(i=r.wrapper.children(".k-item").first()),r._moveHover(e,i),i},_itemUp:function(e,t){var n;if(t)return!(n=e.prevAll(te+ie).eq(0)).length&&e.length?n=e.parent().children(":visible").last():e.length||(n=this.wrapper.children(".k-item").last()),this._moveHover(e,n),n},_scrollToItem:function(e){var t=this;if(t.options.scrollable&&e&&e.length){var i,r=e.parent(),o=!!r.hasClass(b)&&"horizontal"==t.options.orientation,a=o?"scrollLeft":"scrollTop",s=o?n._outerWidth:n._outerHeight,l=r[a](),c=s(e),d=e[0][o?"offsetLeft":"offsetTop"],u=s(r),h=r.siblings(re),p=h.length?s(h.first()):0;if(l+ud-p&&(i=d-p),!isNaN(i)){var f={};f[a]=i,r.finish().animate(f,"fast","linear",(function(){t._toggleScrollButtons(r,h.first(),h.last(),o)}))}}},_itemEsc:function(e,t){var n,i,r=this;return t?(0===(n=e.parent().closest(".k-item")).length&&(i=e.closest(".k-menu-popup").data("group"),n=r.wrapper.find(".k-item[data-groupparent='"+i+"']")),r.close(n),r._moveHover(e,n),n):e},_childPopupElement:function(e){var t=e.find(".k-menu-popup"),n=this._overflowWrapper();return!t.length&&n&&(t=xe(e,n)),t},_triggerEvent:function(e){return this.trigger(e.type,{type:e.type,item:e.item})},_focusHandler:function(t){var i=this,r=e(n.eventTarget(t)).closest(ee);r.hasClass($)||setTimeout((function(){i._moveHover([],r),r.children(".k-content")[0]&&r.parent().closest(".k-item").removeClass(Y)}),200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})},_dataSource:function(e){var t=this,n=e?e.dataSource:t.options.dataSource;n&&(n=a(n)?{data:n}:n,t._unbindDataSource(),n.fields||(n.fields=[{field:"uid"},{field:"text"},{field:"url"},{field:"cssClass"},{field:"spriteCssClass"},{field:"imageUrl"},{field:"imageAttr"},{field:"attr"},{field:"contentAttr"},{field:"content"},{field:"encoded"},{field:"items"},{field:"select"}]),t.dataSource=s.create(n),t._bindDataSource(),t.dataSource.fetch())},_bindDataSource:function(){this._refreshHandler=this.refresh.bind(this),this._errorHandler=this._error.bind(this),this.dataSource.bind(P,this._refreshHandler),this.dataSource.bind(B,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(P,this._refreshHandler),e.unbind(B,this._errorHandler))},_error:function(){},findByUid:function(e){return(this._overflowWrapper()||this.element).find("["+n.attr("uid")+"="+e+"]")},refresh:function(e){var t=this,n=e.node,i=e.action,r=n?t.findByUid(n.uid):t.element,o=e.items,a=e.index,s=t._updateItem.bind(t),l=t._removeItem.bind(t);"add"==i?t._appendItems(o,a,r):"remove"==i?o.forEach(l):"itemchange"==i?o.forEach(s):"itemloaded"===i?t.append(e.items,r):this._initData(),this.trigger(ae,{item:r,dataItem:n})},_appendItems:function(e,t,n){var i=n.find(te).eq(t);i.length?this.insertBefore(e,i):this.append(e,n)},_removeItem:function(e){var t=this.findByUid(e.uid);this.remove(t)},_updateItem:function(e){var t=this,n=t.findByUid(e.uid),i=n.next(),r=e.parentNode();t.remove(n),i.length?t.insertBefore(e,i):t.append(e,r&&t.findByUid(r.uid))},_accessors:function(){var e,t,i,r=this.options,o=this.element;for(e in ce)t=r[ce[e]],i=o.attr(n.attr(e+"-field")),!t&&i&&(t=i),t||(t=e),a(t)||(t=[t]),r[ce[e]]=t},_fieldAccessor:function(t){var i=this.options[ce[t]]||[],r=i.length;return 0===r?function(e){return e[t]}:function(t){var o=e.map(i,n.getter);return t.level?o[Math.min(t.level(),r-1)](t):o[r-1](t)}},_templates:function(){var e=this,t=this,i=t.options,r=t._fieldAccessor.bind(t);i.template&&"string"==typeof i.template?i.template=p(i.template):i.template||(i.template=p((function(e){var t=r("text")(e.item);return void 0!==e.item.encoded&&!1===e.item.encoded||(t=h(t)),""+t+""}))),t.templates={content:p((function(e){var t=e.item,n=r("content")(t);return"
          "+(n||"")+"
          "})),group:p((function(e){return"
          "})),itemWrapper:p((function(t){var n=t.item,i=r("url")(n),o=r("imageUrl")(n),a=r("imageAttr")(n),s=i?"a":"span";return"<"+s+" class='"+de.textClass(n)+"' "+(i?"href='"+i+"'":"")+" >"+(o?"":"")+e.templates.sprite(n)+e.options.template(t)+t.arrow(t)+""})),item:p((function(t){var i=t.item,o=t.menu,a=t.group,s=t.subGroup,l=r("content")(i),c=n.guid();return""})),scrollButton:p((function(e){var t=e.direction;return""+n.ui.icon({icon:"caret-alt-"+t,iconClass:"k-button-icon"})+""})),arrow:p((function(e){e.item;var t=e.group;return""})),sprite:p((function(e){var t=r("spriteCssClass")(e);return t?"":""})),empty:p((function(){return""}))}},renderItem:function(e){var t=this;e=d({menu:t,group:{}},e);var n=t.templates.empty,i=e.item;return t.templates.item(d(e,{separator:i.separator?t.templates.separator:n,sprite:t.templates.sprite,itemWrapper:t.templates.itemWrapper,renderContent:t.renderContent,arrow:i.items||i.content||i[t.options.dataContentField[0]]?t.templates.arrow:n,subGroup:t.renderGroup.bind(t)},de))},renderGroup:function(e){return(this.templates||e.menu.templates).group(d({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,o=d({length:r},e.group);n
          ").parent(),"horizontal"==n.options.orientation&&Te(n.element),t.appendTo&&(t.appendTo=e(t.appendTo),t.appendTo.append(n._popupsWrapper)),n._initialHeight=n.element[0].style.height,n._initialWidth=n.element[0].style.width)},options:{name:"ContextMenu",filter:null,showOn:"contextmenu",orientation:"vertical",alignToAnchor:!1,copyAnchorStyles:!0,target:"body",origin:t,position:t},events:[_,C,M,E,I],setOptions:function(t){var n=this;De.fn.setOptions.call(n,t),n.target.off(n.showOn+v+n._marker,n._showProxy),n.userEvents&&n.userEvents.destroy(),n.target=e(n.options.target),t.orientation&&n.popup.wrapper[0]&&n.popup.element.unwrap(),n._wire(),De.fn.setOptions.call(this,t)},destroy:function(){var e=this;e.target.off(e.options.showOn+v+e._marker),q.off(n.support.mousedown+v+e._marker,e._closeProxy),e.userEvents&&e.userEvents.destroy(),De.fn.destroy.call(e),e.popup&&e.popup.destroy()},open:function(i,r){var o=this;if(i=e(i)[0],ue(o.element[0],e(i)[0])||o._itemHasChildren(e(i)))De.fn.open.call(o,i);else if(!1===o._triggerEvent({item:o.element,type:_})){if(o.popup.visible()&&o.options.filter&&(o.popup.close(!0),o.popup.element.kendoStop(!0)),o._triggerFocusOnActivate||(o._triggerFocusOnActivate=o._focusMenu.bind(o)),o.bind(M,o._triggerFocusOnActivate),r!==t){var a=o._overflowWrapper();if(a){var s=a.offset();i-=s.left,r-=s.top}o.popup.wrapper.hide(),o._configurePopupScrolling(i,r),o.popup.open(i,r)}else o.popup.options.anchor=i||o.popup.anchor||o.target,o.popup.element.kendoStop(!0),o._configurePopupScrolling(),o.popup.open();q.off(o.popup.downEvent,o.popup._mousedownProxy),q.on(n.support.mousedown+v+o._marker,o._closeProxy)}return o},_focusMenu:function(){var e=this;e.unbind(M,e._triggerFocusOnActivate),e.element.trigger("focus")},_configurePopupScrolling:function(e,n){var i=this,r=i.popup,o="horizontal"==i.options.orientation;i.options.scrollable&&(i._wrapPopupElement(r),r.element.parent().css({position:"",height:""}),r.element.css({visibility:"hidden",display:"",position:""}),o?i._setPopupWidth(r,isNaN(e)?t:{isFixed:!0,x:e,y:n}):i._setPopupHeight(r,isNaN(e)?t:{isFixed:!0,x:e,y:n}),r.element.css({visibility:"",display:"none",position:"absolute"}),i._initPopupScrollButtons(r,o,!0),r.element.siblings(re).hide())},_setPopupWidth:function(t,i){var r=t.element,o=r.add(r.parent(Z));o.width(this._initialWidth||"");var a=t._location(i),s=e(window).width(),l=a.width,c=Math.max(a.left,0),d=i?0:Ce(this._overflowWrapper()[0],"scrollLeft"),u=n.getShadows(r),h=s-u.left-u.right;h+d>l+c||o.css({overflow:"hidden",width:h-c+d+"px"})},close:function(){var t=this;ue(t.element[0],e(arguments[0])[0])||t._itemHasChildren(arguments[0])?De.fn.close.call(t,arguments[0]):t.popup.visible()&&!1===t._triggerEvent({item:t.element,type:C})&&(t._removeHoverItem(),t.element.find("#"+t._ariaId).removeAttr("id"),t.popup.close(),q.off(n.support.mousedown+v+t._marker,t._closeProxy),t.unbind(I,t._closeTimeoutProxy),t.popup.options.anchor.focus())},_showHandler:function(t){var i,r=t,o=this,a=o.options,s=n.support.mobileOS?e(r.target):e(r.currentTarget);t.event&&((r=t.event).pageX=t.x.location,r.pageY=t.y.location),ue(o.element[0],t.relatedTarget||t.target)||(o._eventOrigin=r,r.preventDefault(),r.stopImmediatePropagation(),o.element.find(".k-focus").removeClass(Y),(a.filter&&s.is(a.filter)||!a.filter)&&(a.alignToAnchor?(o.popup.options.anchor=r.currentTarget,o.open(r.currentTarget)):(o.popup.options.anchor=r.currentTarget,o._targetChild?(i=o.target.offset(),o.open(r.pageX-i.left,r.pageY-i.top)):o.open(r.pageX,r.pageY))))},_closeHandler:function(t){var n=this,i=e(t.relatedTarget||t.target),r=i.closest(n.target.selector)[0]==n.target[0],o=i.closest(te),a=n._itemHasChildren(o),s=n._overflowWrapper(),l=ue(n.element[0],i[0])||s&&ue(s[0],i[0]);n._eventOrigin=t;var c=3!==t.which;n.popup.visible()&&(c&&r||!r)&&(n.options.closeOnClick&&!a&&l||!l)&&(l?(this.unbind(I,this._closeTimeoutProxy),n.bind(I,n._closeTimeoutProxy)):n.close())},_wire:function(){var e=this,t=e.options,i=e.target;e._preventProxy=null,e._showProxy=e._showHandler.bind(e),e._closeProxy=e._closeHandler.bind(e),e._closeTimeoutProxy=e.close.bind(e),i[0]&&(n.support.mobileOS&&"contextmenu"==t.showOn&&(e.userEvents=new n.UserEvents(i,{filter:t.filter,allowSelection:!1}),e._preventProxy=function(){return!1},e.userEvents.bind("hold",e._showProxy)),t.filter?i.on(t.showOn+v+e._marker,t.filter,e._preventProxy||e._showProxy):i.on(t.showOn+v+e._marker,e._preventProxy||e._showProxy),i.on("keydown",(function(t){t.keyCode===n.keys.F10&&t.shiftKey&&(t.preventDefault(),e.open(t.target))})))},_triggerEvent:function(n){var i=this,r=e(i.popup.options.anchor)[0],o=i._eventOrigin;return i._eventOrigin=t,i.trigger(n.type,d({type:n.type,item:n.item||this.element[0],target:r},o?{event:o}:{}))},_popup:function(){var t=this,n=t._overflowWrapper(),i=t.element.addClass("k-context-menu");t._triggerProxy=t._triggerEvent.bind(t),t.popup=e("
          ").append(i).kendoPopup({origin:t.options.origin,position:t.options.position,autosize:"horizontal"===t.options.orientation,anchor:t.target||"body",copyAnchorStyles:t.options.copyAnchorStyles,collision:t.options.popupCollision||"fit",animation:t.options.animation,activate:t._triggerProxy,deactivate:t._triggerProxy,appendTo:n||t.options.appendTo,close:n?function(t){e(ye(t.sender.element,n)).each((function(e,t){var n=t.data(G);n&&n.close(!0)}))}:e.noop}).data(G),t._targetChild=ue(t.target[0],t.popup.element[0])},_moveHoverToRoot:function(e,t){this._moveHover(e,t),this.close()},_focus:function(e){var t=this._oldHoverItem=this._hoverItem()||[];De.fn._focus.call(this,e),r()===e.currentTarget&&this._moveHover(t,this.wrapper.children().filter(":visible").not(".k-separator").first())}});i.plugin(De),i.plugin(Ie)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Widget,r=n.ui,o=n.keys,a=e.extend,s=n.htmlEncode,l=".kendoExpansionPanel",c="expand",d="collapse",u="[class*='-i-chevron-up']",h="complete",p="k-disabled",f="aria-disabled",m="aria-expanded",g="aria-hidden",v="k-expanded",_="k-d-none",b="k-focus",w=function(e){var t=e.title,i=e.subTitle,r=e.iconClass,o=e.useBareTemplate,a=e.ns,l=e.elementId;return"
          '+(o?t:'
          '+s(t)+"
          ")+''+(o?"":'
          '+s(i)+"
          ")+''+(r&&r.includes("k-icon")?'':n.ui.icon({icon:r}))+"
          "},y=i.extend({init:function(t,r){var o=this,a=n.attr("expander-header");i.fn.init.call(o,t,r),r=e.extend(!0,{},r),o._wrapper(),o._animations(r),o.element.attr(g,!r.expanded),o.options.useBareTemplate||o.element.addClass("k-expander-content"),o.wrapper.on("click"+l,"["+a+"]",o._click.bind(o)).on("focusin"+l,o._focus.bind(o)).on("focusout"+l,o._blur.bind(o)).on("keydown"+l,o._keydown.bind(o)),o.toggle(o.options.expanded,!1),n.notify(o)},events:[c,d,h],options:{name:"ExpansionPanel",disabled:!1,expanded:!1,animation:{expand:{effects:"expand:vertical",duration:200},collapse:{duration:200}},height:null,toggleable:!0,expandIconClass:"chevron-down",collapseIconClass:"chevron-up",title:"",subTitle:"",headerClass:null,wrapperClass:null,useBareTemplate:!1},_wrapper:function(){var t,i,r=this,o=r.element,a=o[0],s=o.attr("id");s||(s=n.guid(),o.attr("id",s)),t=o.wrap("
          ").parent(),i=n.template(w)({title:r.options.title,subTitle:r.options.subTitle,iconClass:r.options.expanded?r.options.expandIconClass:r.options.collapseIconClass,useBareTemplate:r.options.useBareTemplate,ns:n.ns,elementId:s+"_wrapper"}),r.header=e(i),t.prepend(r.header),r._indicator=t.find(".k-expander-indicator span"),t[0].style.cssText=a.style.cssText,a.style.width="100%",r.wrapper=t.addClass(r.options.disabled?p:""),r.contentWrapper=r.element.wrap('
          ').parent().addClass("k-expander-content-wrapper").toggleClass(_,!r.options.expanded),r.header.attr(f,r.options.disabled).attr(m,r.options.expanded),r.options.useBareTemplate||t.addClass(a.className),r.options.height&&r.wrapper.css("height",r.options.height),r.options.headerClass&&r.header.addClass(r.options.headerClass),r.options.wrapperClass&&r.header.addClass(r.options.wrapperClass)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}})},_click:function(e){var t=this,n=t._indicator.is(u),i=t.element;e.stopPropagation(),t.options.toggleable?t.trigger(n?d:c,{item:i[0]})||t.toggle():e.preventDefault()},toggle:function(e,t){var i=this,r=i.options.animation,o=r.expand,s=r.collapse&&"effects"in r.collapse,l=a({},r.expand,r.collapse),c=i.element,d=i.wrapper;undefined!==e?!1===t&&(l=null):e=!i._indicator.is(u),s||(l=a(l,{reverse:!0})),e?o=a({complete:i._completeHandler.bind(i)},o):(o=a(l,{hide:!0})).complete=i._completeHandler.bind(i),e?(i.options.collapseIconClass.includes("k-icon")?(i._indicator.removeClass(this.options.expandIconClass),i._indicator.addClass(this.options.collapseIconClass)):n.ui.icon(i._indicator,{icon:this.options.collapseIconClass}),d.addClass(v)):(i.options.expandIconClass.includes("k-icon")?(i._indicator.removeClass(this.options.collapseIconClass),i._indicator.addClass(this.options.expandIconClass)):n.ui.icon(i._indicator,{icon:this.options.expandIconClass}),d.removeClass(v)),i.contentWrapper.toggleClass(_,!e),c.attr(g,!e),i.header.attr(m,e),i.contentWrapper.kendoStop(!0,!0).kendoAnimate(o)},_completeHandler:function(){this.trigger(h)},_keydown:function(t){var n=t.keyCode;n!=o.ENTER&&n!=o.SPACEBAR||!e(t.target).is("[data-expander-header]")||(this._click(t),t.preventDefault())},destroy:function(){this.wrapper.off(l),i.fn.destroy.call(this)},enable:function(e){this.wrapper.toggleClass(p,!e),this.header.attr(f,!e)},_blur:function(){this.header&&this.wrapper.removeClass(b)},_focus:function(){this.wrapper&&this.wrapper.addClass(b)}});r.plugin(y)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.htmlEncode,r=n.ui,o=e.extend,a=e.grep,s=(i=n.htmlEncode,e.map),l=e.inArray,c=n.data.Comparer,d="k-selected",u="asc",h="desc",p="change",f="init",m="open",g="select",v="stick",_="unstick",b="kendoPopup",w="kendoMenu",y="kendoExpansionPanel",k=".kendoColumnMenu",x=r.Widget;function C(e){return n.trim(e).replace(/ /gi,"")}function S(e){return this.columns.indexOf(e.title)>=0||this.columns.indexOf(e.field)>=0}function T(e){for(var t=[],n=0;n'),o._refreshHandler=o.refresh.bind(o),o.dataSource.bind(p,o._refreshHandler)},_init:function(){var e=this;e.pane=e.options.pane,e.pane&&(e._isMobile=!0),e._isMobile?e._createMobileMenu():e._createMenu(),e.owner._muteAngularRebind((function(){e._angularItems("compile")})),e._sort(),e._columns(),e._filter(),e._lockColumns(),e._reorderColumns(),e._stickyColumns(),e._groupColumn(),e.trigger(f,{field:e.field,container:e.wrapper})},events:[f,m,"sort","filtering",v,_],options:{name:"ColumnMenu",messages:{sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filter:"Filter",column:"Column",columns:"Columns",columnVisibility:"Column Visibility",clear:"Clear",cancel:"Cancel",done:"Done",settings:"Edit Column Settings",lock:"Lock Column",unlock:"Unlock Column",stick:"Stick Column",unstick:"Unstick Column",setColumnPosition:"Set Column Position",apply:"Apply",reset:"Reset",buttonTitle:"{0} edit column settings",movePrev:"Move previous",moveNext:"Move next",groupColumn:"Group column",ungroupColumn:"Ungroup column"},filter:"",columns:!0,sortable:!0,filterable:!0,animations:{left:"slide"},encodeTitles:!1,componentType:"classic",appendTo:null},_createMenu:function(){var t,i,r,o=this,a=o.options,s=o._ownerColumns();o._hasGroups()&&(s=o._groupColumns(s),(t=o._flattenMenuCols(s)).length!==o.owner.columns.length&&o._syncMenuCols(t,o.owner.columns)),i=o._isModernComponentType()?n.template(M):n.template(H),r=e(i({uid:n.guid(),ns:n.ns,messages:a.messages,sortable:a.sortable,filterable:a.filterable,columns:s,showColumns:a.columns,hasLockableColumns:a.hasLockableColumns,hasStickableColumns:a.hasStickableColumns,encodeTitles:a.encodeTitles,omitWrapAttribute:n.attr("omit-wrap"),reorderable:a.reorderable,groupable:a.groupable})),n.applyStylesFromKendoAttributes(r,["display"]),o.wrapper.empty().append(r),o.popup=o.wrapper[b]({anchor:o.link,copyAnchorStyles:!1,open:o._open.bind(o),activate:o._activate.bind(o),deactivate:o._deactivate.bind(o),close:function(e){o.menu&&(o.menu._closing=e.sender.element),o.options.closeCallback&&o.options.closeCallback(o.element)}}).data(b),o._isModernComponentType()?(o.popup.element.addClass("k-grid-columnmenu-popup"),o._createExpanders()):o.menu=o.wrapper.children()[w]({orientation:"vertical",closeOnClick:!1,open:function(){o._updateMenuItems()}}).data(w)},_createLink:function(){var e=this,t=e.element,r=e.appendTo.length?t.find(e.appendTo):t,o=t.find(".k-grid-column-menu"),a=i(n.format(e.options.messages.buttonTitle,e.title||e.field));return o[0]||(t.addClass("k-filterable"),o=r.append('
          ").find(".k-grid-column-menu")),o.attr("tabindex",-1).on("click"+k,e._click.bind(e)),o},_createExpanders:function(){var t=this,r=t.options,o={expanded:!1,headerClass:"k-columnmenu-item",useBareTemplate:!0};t.wrapper.find(".k-columns-item")[y](e.extend(!0,{},o,{title:n.ui.icon("columns")+""+i(r.messages.columns)+""})),t.wrapper.find(".k-column-menu-filter")[y](e.extend(!0,{},o,{title:n.ui.icon("filter")+""+i(r.messages.filter)+""})),t.wrapper.find(".k-column-menu-position")[y](e.extend(!0,{},o,{title:n.ui.icon("set-column-position")+""+i(r.messages.setColumnPosition)+""}))},_syncMenuCols:function(e,t){for(var n,i=t.length,r=e.map((function(e){return e.field})),o=0;o0?t.insertAfter(n.children().eq(e-1)):n.prepend(t)}(e,n,i)})),this._updateDataIndexes()},_updateDataIndexes:function(){var t=this,i=t._isMobile&&t.view?e(t.view.element).find(".k-columns-item").children("ul"):e(t.wrapper).find(".k-menu-group").first(),r=t._ownerColumns(!0).map((function(e){return e.title||e.field}));i.find("span."+(this._isMobile?"k-listgroup-form-field-wrapper":"k-menu-link")+" input").each((function(i){var o,a;t.options.columns.sort?(o=t._ownerColumns(),a=r.indexOf(o[i].title),e(this).attr(n.attr("index"),a)):e(this).attr(n.attr("index"),i)}))},_eachRenderedMenuItem:function(t){for(var i,r,o,s,l,c,d=this,u=a(T(d.owner.columns),(function(e){var t=!0,n=C(e.title||"");return!1!==e.menu&&(e.field||n.length)||(t=!1),t})).map((function(e){return{field:e.field,title:e.title,matchesMedia:e.matchesMedia}})),h=d._getRenderedList(),p=d._getRenderedListElements(h),f=function(e,t){for(var i,r,o,a,s,l=n.attr("index"),c=n.attr("field"),d={},u=0;u0&&(i.addClass("k-focus"),r.menu?r.menu.element.trigger("focus"):r.popup.element.find("[tabindex=0]").eq(0).trigger("focus")),a.closest(".k-popup").getKendoPopup().close()}})),r.options.hasLockableColumns&&r._updateLockedColumns(),r.options.hasStickableColumns&&r._updateStickyColumns(),r.options.reorderable&&r._updateReorderColumns(),r.options.groupable&&r._updateGroupColumns()},_activate:function(){this.menu?this.menu.element.trigger("focus"):this.popup.element.find("[tabindex=0]").eq(0).trigger("focus"),this.trigger(m,{field:this.field,container:this.wrapper})},_ownerColumns:function(e){var t,n=T(this.owner.columns),i=a(n,(function(e){var t=!0,n=C(e.title||"");return!1!==e.menu&&(e.field||n.length)||(t=!1),t})),r=this.options.columns.sort;return t=s(i,(function(e){return{originalField:e.field,field:e.field||e.title,title:e.title||e.field,hidden:e.hidden,matchesMedia:e.matchesMedia,index:l(e,n),locked:!!e.locked,_originalObject:e,uid:e.headerAttributes.id}})),r&&!e&&t.sort(c.create({field:"title",dir:r})),t},_sort:function(){var e=this;e.options.sortable&&(e.refresh(),e._isModernComponentType()?e.wrapper.on("click"+k,".k-sort-asc, .k-sort-desc",e._sortHandler.bind(e)):e.menu.bind(g,e._sortHandler.bind(e)))},_sortHandler:function(t){var n,i=this,r=t.item?e(t.item):e(t.target);r.hasClass("k-sort-asc")?n=u:r.hasClass("k-sort-desc")&&(n=h),n&&(i._getSortItemsContainer(r).find(".k-sort-"+(n==u?h:u)).removeClass(d),i._sortDataSource(r,n),i._isMobile||i.close())},_getSortItemsContainer:function(e){return this._isModernComponentType()?e.parents(".k-columnmenu-item-wrapper").first():e.parent()},_sortDataSource:function(e,n){var i,r,o=this,a=o.options.sortable,s=null===a.compare?t:a.compare,l=o.dataSource,c=l.sort()||[],u=e.hasClass(d)&&a&&!1!==a.allowUnsort;if(n=u?t:n,!o.trigger("sort",{sort:{field:o.field,dir:n,compare:s}})){if(u?e.removeClass(d):e.addClass(d),"multiple"===a.mode){for(i=0,r=c.length;i
          '+n.html.renderButton("",{themeColor:"primary",icon:"check"})+n.html.renderButton("",{icon:"undo"})+"
          "},z=function(e){var t=e.hasLockableColumns,r=e.hasStickableColumns,o=e.messages,a=e.reorderable;return'
          '+(t?function(e){var t=e.messages;return'
          '+n.ui.icon("lock")+i(t.lock)+'
          '+n.ui.icon("unlock")+i(t.unlock)+"
          "}({messages:o}):"")+(r?function(e){var t=e.messages;return'
          '+n.ui.icon("stick")+i(t.stick)+'
          '+n.ui.icon("unstick")+i(t.unstick)+"
          "}({messages:o}):"")+(a?function(e){var t=e.messages;return'
          '+n.ui.icon("caret-alt-left")+i(t.movePrev)+'
          '+n.ui.icon("caret-alt-right")+i(t.moveNext)+"
          "}({messages:o}):"")+"
          "},M=function(e){var t=e.sortable,r=e.filterable,o=e.showColumns,a=e.messages,s=e.columns,l=e.hasLockableColumns,c=e.hasStickableColumns,d=e.encodeTitles,u=e.ns,h=e.reorderable,p=e.groupable;return""+(t?function(e){var t=e.messages;return'
          '+n.ui.icon("sort-asc-small")+i(t.sortAscending)+'
          '+n.ui.icon("sort-desc-small")+i(t.sortDescending)+"
          "}({messages:a}):"")+(o?I({columns:s,messages:a,encodeTitles:d,ns:u}):"")+(r?'
          ':"")+(p?function(e){var t=e.messages;return'
          '+n.ui.icon("group")+i(t.groupColumn)+'
          \n
          '+n.ui.icon("ungroup")+i(t.ungroupColumn)+"
          "}({messages:a}):"")+(l||c||h?z({hasLockableColumns:l,hasStickableColumns:c,messages:a,reorderable:h}):"")};var E=function(e){var t=e.columns,r=e.messages,o=e.encodeTitles,a=e.ns,s=e.omitWrapAttribute,l=e.filterable,c=e.hasLockableColumns,d=e.hasStickableColumns;return'
        • '+n.ui.icon("columns")+''+i(r.columns)+"
            "+function(e,t,r,o){return e.map((function(e){return e.groupHeader?'
          • '+e.title+"
          • ":'
          • '+(t?i(e.title):e.title)+"
          • "})).join("")}(t,o,a,s)+"
        • "+(l||c||d?'':"")},A=function(e){var t=e.messages,r=e.hasLockableColumns,o=e.hasStickableColumns,a=e.reorderable;return'
        • '+n.ui.icon("set-column-position")+''+i(t.setColumnPosition)+"
            "+(r?function(e){var t=e.messages,r=e.hasStickableColumns;return'
          • '+n.ui.icon("lock")+''+i(t.lock)+'
          • '+n.ui.icon("unlock")+''+i(t.unlock)+"
          • "+(r?'':"")}({messages:t,hasStickableColumns:o}):"")+(o?function(e){var t=e.messages;return'
          • '+n.ui.icon("stick")+''+i(t.stick)+'
          • '+n.ui.icon("unstick")+''+i(t.unstick)+"
          • "}({messages:t}):"")+(a?function(e){var t=e.messages;return'
          • '+n.ui.icon("caret-alt-left")+''+i(t.movePrev)+'
          • '+n.ui.icon("caret-alt-right")+''+i(t.moveNext)+"
          • "}({messages:t}):"")+"
        • "},H=function(e){var t=e.uid,r=e.sortable,o=e.filterable,a=e.showColumns,s=e.messages,l=e.columns,c=e.hasLockableColumns,d=e.hasStickableColumns,u=e.encodeTitles,h=e.ns,p=e.omitWrapAttribute,f=e.reorderable,m=e.groupable;return'
            '+(r?function(e){var t=e.messages,r=e.showColumns,o=e.filterable;return'
          • '+n.ui.icon("sort-asc-small")+''+i(t.sortAscending)+'
          • '+n.ui.icon("sort-desc-small")+''+i(t.sortDescending)+"
          • "+(r||o?'':"")}({messages:s,showColumns:a,filterable:o}):"")+(a?E({columns:l,messages:s,encodeTitles:u,ns:h,omitWrapAttribute:p,filterable:o,hasLockableColumns:c,hasStickableColumns:d}):"")+(o?function(e){var t=e.messages,r=e.hasLockableColumns,o=e.hasStickableColumns,a=e.reorderable;return'
          • '+n.ui.icon("filter")+''+i(t.filter)+'
          • '+(r||o||a?'':"")}({messages:s,hasLockableColumns:c,hasStickableColumns:d,reorderable:f}):"")+(m?function(e){var t=e.messages,r=e.hasLockStickMove;return'
          • '+n.ui.icon("group")+''+i(t.groupColumn)+'
          • '+n.ui.icon("ungroup")+''+i(t.ungroupColumn)+"
          • "+(r?'':"")}({messages:s,hasLockStickMove:c||d||f}):"")+(c||d||f?A({messages:s,hasLockableColumns:c,hasStickableColumns:d,reorderable:f}):"")+"\n
          "};var R=function(e){var t=e.messages,r=e.hasGroups,o=e.columns,a=e.groups,s=e.ns;return'
        • '+t.columnVisibility+""+function(e,t,r,o){var a="";if(o)for(var s=0;s'+i(t[s].title)+'
            ';for(var l=0;l'+t[s].columns[l].title+'"';a+="
          "}else{for(a+='
            ',l=0;l'+e[l].title+'';a+="
          "}return a}(o,a,s,r)+"
        • "},F=function(e){var t=e.messages,r=e.title,o=e.sortable,a=e.filterable,s=e.showColumns,l=e.hasLockableColumns,c=e.hasStickableColumns,d=e.hasGroups,u=e.columns,h=e.groups,p=e.ns,f=e.reorderable,m=e.groupable;return"
          • '+i(t.column)+": "+r+'
              '+(o?function(e){var t=e.messages;return'
            • '+n.ui.icon("sort-asc-small")+''+i(t.sortAscending)+'
            • '+n.ui.icon("sort-desc-small")+''+i(t.sortDescending)+"
            • "}({messages:t}):"")+(l?function(e){var t=e.messages;return'
            • '+n.ui.icon("lock")+''+i(t.lock)+'
            • '+n.ui.icon("unlock")+''+i(t.unlock)+"
            • "}({messages:t}):"")+(c?function(e){var t=e.messages;return'
            • '+n.ui.icon("stick")+''+i(t.stick)+'
            • '+n.ui.icon("unstick")+''+i(t.unstick)+"
            • "}({messages:t}):"")+(f?function(e){var t=e.messages;return'
            • '+n.ui.icon("caret-alt-left")+''+i(t.movePrev)+'
            • '+n.ui.icon("caret-alt-right")+''+i(t.moveNext)+"
            • "}({messages:t}):"")+(a?function(e){var t=e.messages;return'
            • '+n.ui.icon("filter")+''+i(t.filter)+''+n.ui.icon("chevron-right")+"
            • "}({messages:t}):"")+(m?function(e){var t=e.messages;return'
            • '+n.ui.icon("group")+''+i(t.groupColumn)+'
            • '+n.ui.icon("ungroup")+''+i(t.ungroupColumn)+"
            • "}({messages:t}):"")+"
          • "+(s?R({messages:t,hasGroups:d,columns:u,groups:h,ns:p}):"")+'
            • '+i(t.clear)+"
          "},P=x.extend({init:function(e,t){var n=this;x.fn.init.call(n,e,t),n._createCheckBoxes(),n.element.on("click"+k,"li.k-item:not(.k-separator):not(.k-disabled):not(:has(.k-switch))","_click")},events:[g],_click:function(t){var n=this;if(e(t.target).is("[type=checkbox]")||t.preventDefault(),!e(t.target).hasClass("k-clear"))return e(t.target).hasClass("k-filterable")?(n._cancelChanges(!0),void n.trigger(g,{item:t.currentTarget})):void n._updateSelectedItems(t.currentTarget);n._cancelChanges(!0)},_updateSelectedItems:function(t){var n=this,i=e(t),r=n.options.columnMenu.view.state||{columns:{}},o=i.prop("id");if(!i.hasClass("k-filter-item")){var a,s,l;if(r[o]?r[o]=!1:r[o]=!0,i.hasClass("k-sort-asc")||i.hasClass("k-sort-desc"))i.hasClass("k-sort-asc")?(a="asc",s=n.element.find(".k-sort-desc")):(a="desc",s=n.element.find(".k-sort-asc")),l=s.prop("id"),a!==r.initialSort||i.hasClass("k-selected")||(r[o]=!1),r[l]&&(r[l]=!1),s.removeClass(d);i.hasClass(d)?i.removeClass(d):i.addClass(d)}},_cancelChanges:function(e){var t=this,n=t.options.columnMenu,i=n.view,r=(i.state||{columns:{}}).columns;if(t.element.find("."+d).removeClass(d),n.refresh(),e){var o=[];for(var a in r)if(r.hasOwnProperty(a)&&!0===r[a]){var s=i.element.find("#"+a);o.push(s[0])}for(var l=o.length-1;l>=0;l--)t.trigger(g,{item:o[l]});n.options.hasLockableColumns&&n._updateLockedColumns(),n.options.hasStickableColumns&&n._updateStickyColumns(),n.options.reorderable&&n._updateReorderColumns(),n.options.groupable&&n._updateGroupColumns()}t.options.columnMenu.view.state={columns:{}}},_applyChanges:function(){var e=this.options.columnMenu.view,t=e.state||{columns:{}};for(var n in t)if(t.hasOwnProperty(n)&&"initialSort"!==n&&"columns"!==n&&!0===t[n]){var i=e.element.find("#"+n);i.hasClass(d)?i.removeClass(d):i.addClass(d),this.trigger(g,{item:i[0]})}},_createCheckBoxes:function(){var e=this;e.element.find(".k-columns-item").find("[type='checkbox']").kendoSwitch({messages:{checked:"",unchecked:""},change:function(t){var n=t.sender.element.closest(".k-item"),i=e.options.columnMenu.view.state||{columns:{}},r=n.prop("id");i.columns[r]?i.columns[r]=!1:i.columns[r]=!0,e.trigger(g,{item:n})}})},_destroyCheckBoxes:function(){for(var e,t=this.element.find(".k-columns-item").find("[type='checkbox']"),n=0;n').find(h)),i.link=n,i.element.on("click"+u,i._click.bind(i))},options:{name:"ColumnSorter",mode:s,allowUnsort:!0,compare:null,filter:"",initialDirection:a,showIndexes:!1},events:["change"],destroy:function(){var e=this;r.fn.destroy.call(e),e.element.off(u),e.dataSource.unbind("change",e._refreshHandler),e._refreshHandler=e.element=e.link=e.dataSource=null},refresh:function(i){if(!i||"itemchange"!==i.action&&"sync"!==i.action){var r,s,l,u,h,f,m,g,v=this,_=v.dataSource.sort()||[],b=v.element,w=b.attr(n.attr(c)),y=(v.dataSource._sortFields||{})[w];b.removeAttr(n.attr(o)),b.removeAttr(p),y&&(r=y.dir,b.attr(n.attr(o),r),u=y.index),b.is("th")&&y&&(s=function(e){var t=null;e.is("th")&&((t=e.closest("table")).parent().hasClass("k-grid-header-wrap")?t=t.closest(".k-grid").find(".k-grid-content > table"):t.parent().hasClass("k-grid-header-locked")&&(t=t.closest(".k-grid").find(".k-grid-content-locked > table")));return t}(b),s&&(b.attr(n.attr("index"))?(h=b.closest("table"),f=h.find("tr:not(.k-filter-row)"),m=n.attr("index"),(g=f.find("th["+m+"]:visible")).sort((function(n,i){n=e(n),i=e(i);var r=n.attr(m),o=i.attr(m);return r===t&&(r=e(n).index()),o===t&&(o=e(i).index()),(r=parseInt(r,10))>(o=parseInt(o,10))?1:r'+n.ui.icon("sort-asc-small")+"").appendTo(v.link),b.attr(p,"ascending")):r===d&&(e(''+n.ui.icon("sort-desc-small")+"").appendTo(v.link),b.attr(p,"descending")),v.options.showIndexes&&_.length>1&&u&&e('').html(u).appendTo(v.link)}},_toggleSortDirection:function(e){var n=this.directions;return e===n[n.length-1]&&this.options.allowUnsort?t:n[0]===e?n[1]:n[0]},_click:function(e){var i,r,a=this,d=a.element,u=d.attr(n.attr(c)),h=d.attr(n.attr(o)),p=a.options,f=null===a.options.compare?t:a.options.compare,m=a.dataSource.sort()||[],g=e.ctrlKey||e.metaKey;if(e.preventDefault(),(!p.filter||d.is(p.filter))&&(h=this._toggleSortDirection(h),!this.trigger("change",{sort:{field:u,dir:h,compare:f}}))){if(p.mode===s||p.mode===l&&!g)m=[{field:u,dir:h,compare:f}];else if("multiple"===p.mode||p.mode===l&&g){for(i=0,r=m.length;i|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,d="change",u="equalSet",h=["url","email","number","date","boolean"];function p(e){return(e=null!=e?e:"").type||n.type(e)||"string"}function f(e){var t,i,r=(e.model.fields||e.model)[e.field],o=p(r),c=r?r.validation:{},d=r?r.attributes:{},u=n.attr("type"),f=n.attr("bind"),m={id:e.id||e.field,name:e.field,title:e.title?e.title:e.field};for(t in c){if(i=c[t],l(t,h)>=0)m[u]=t;else if(!a(i)){var g=n.getCulture();if("number"==typeof i&&g.name.length){var v=g.numberFormat,_=i.toString().replace(".",v["."]);m[t]=_}else m[t]=s(i)?i.value||t:i}m[n.attr(t+"-msg")]=i.message,m.autocomplete="off"}for(var b in d)m[b]=d[b];return l(o,h)>=0&&(m[u]=o),m[f]=("boolean"===o?"checked:":"value:")+e.field,m}function m(e,t){var n=e.attr("id");return n&&(t.id=n,e.removeAttr("id")),t}var g=["AutoComplete","CheckBox","CheckBoxGroup","ColorGradient","ColorPicker","ColorPalette","ComboBox","DateInput","DatePicker","DateTimePicker","DropDownTree","Editor","FlatColorPicker","MaskedTextBox","MultiColumnComboBox","MultiSelect","NumericTextBox","RadioGroup","Rating","Slider","Switch","TimePicker","DropDownList","TextBox","TextArea","Captcha","Signature","TimeDurationPicker"],v={hidden:function(t,n){var i=f(n);e('').attr(i).appendTo(t)},number:function(t,i){var r=f(i);e('').attr(r).appendTo(t).kendoNumericTextBox(o({},i.editorOptions,{format:i.format})),e("').appendTo(t)},date:function(t,i){var r=f(i),a=i.format;a&&(a=n._extractFormat(a)),r[n.attr("format")]=a,e('').attr(r).appendTo(t).kendoDatePicker(o({},i.editorOptions,{format:i.format})),e("').appendTo(t)},string:function(t,n){var i=f(n);e('').attr(i).appendTo(t).kendoTextBox(n.editorOptions)},boolean:function(t,n){var i=f(n);w(e('').attr(i).kendoCheckBox(n.editorOptions).appendTo(t),t,n)},values:function(t,i){var r=f(i),o=n.stringify(function(e){var t,n,i,r,o,a;if(e&&e.length)for(a=[],t=0,n=e.length;t').attr(r).appendTo(t),e("').appendTo(t)},kendoEditor:function(t,n){var i=f(n),r=n.editor,o="kendo"+r,a=n.editorOptions,s=function(e,t){if(e.length)return"DropDownTree"===e&&t&&t.checkboxes||"MultiSelect"===e?"
          '},_footerTemplate:function(e){var t=e.dialogUpdate,i=e.dialogCancel;return'
          '+n.html.renderButton('",{themeColor:"primary",icon:"check"})+n.html.renderButton('",{icon:"cancel-outline"})+"
          "},indent:function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"\n").replace(/<(ul|ol)([^>]*)>
        • \n/gi,"
          \n").replace(/\n$/,"")}}),n.ui.editor.ViewHtmlCommand=c,r.EditorUtils.registerTool("viewHtml",new s({command:c}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,r=i.Tool,o=i.Command,a=i.EditorUtils,s=o.extend({init:function(e){e.formatter=e.formatter();var t=e.formatter.finder;t&&a.formatByName("immutable",t.format)&&t._initOptions({immutables:e.immutables}),o.fn.init.call(this,e)}}),l=r.extend({init:function(e){r.fn.init.call(this,e)},command:function(e){return new s(n(e,{formatter:this.options.formatter}))},update:function(e,t){var n=this.options.finder.isFormatted(t),i=e.closest(".k-toolbar").getKendoToolBar();i&&e.getKendoToggleButton()&&i.toggle(e,n)}});e.extend(i,{FormatCommand:s,FormatTool:l})}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,r=t.ui.Editor.fn.options.formats,o=i.Tool,a=i.FormatTool,s=i.Dom,l=i.RangeUtils,c=e.extend,d=i.EditorUtils.registerTool,u=i.EditorUtils.registerFormat,h="mousedown.kendoEditor",p="k-marker",f=n.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,n=0,i=0,r=0,o=e.parentNode;for(t=o.firstChild;t;t=t.nextSibling)t!=e&&(t.className==p?r++:3==t.nodeType?n++:i++);return r>1&&o.firstChild.className==p&&o.lastChild.className==p?0:i+n},findSuitable:function(e,t){if(!t&&this.numberOfSiblings(e)>0)return null;for(var n=e.parentNode,i=this.format[0].tags;!s.ofType(n,i);){if(this.numberOfSiblings(n)>0)return null;n=n.parentNode}return n},findFormat:function(e){var t,n,i,r,o,a=this.format,l=s.attrEquals;for(t=0,n=a.length;t0&&this.activate(e,t)},immutables:function(){return this.editor&&this.editor.options.immutables},apply:function(e){var t,n,i,r,o=[];if(e.length>1)for(t=0,n=e.length;t0)for(t=0;t1;)if(t=e.pop(),n=e[e.length-1],t.previousSibling&&t.previousSibling.className==p&&n.appendChild(t.previousSibling),t.tagName==n.tagName&&t.previousSibling==n&&t.style.cssText==n.style.cssText&&t.className===n.className){for(;t.firstChild;)n.appendChild(t.firstChild);s.remove(t)}}}),g=f.extend({init:function(e,t,n){this.format=e,this.greedyProperty=t,this.fontAttr=n,f.fn.init.call(this,e)},getInlineCssValue:function(e){var n,i,r,o,a,l,c,d,u,h,p,f,m=e.attributes,g=t.trim;if(m)for(n=0,i=m.length;n=0?s.toHex(f):f}if(this.fontAttr&&r.specified&&o==this.fontAttr)return p=r.nodeValue,f=r.nodeValue,p.indexOf("color")>=0?s.toHex(f):f}},getFormatInner:function(t){var n,i,r,o=e(s.isDataNode(t)?t.parentNode:t).parentsUntil("[contentEditable]").addBack().toArray().reverse();for(n=0,i=o.length;n",{title:t.createLink,minWidth:340,close:this._close.bind(this),visible:!1}).data("kendoWindow");this._form=this._createForm(o),i&&(this._range.selectNodeContents(i),n=p(this._range)),this._initialText=this.linkText(n),o.wrapper.find(".k-dialog-insert").on("click",this._apply.bind(this)).end().find(".k-dialog-close").on("click",this._close.bind(this)).end().find(".k-form-field input").on("keydown",this._keydown.bind(this)).end().find("#k-editor-link-url").val(this.linkUrl(i)).end().find("#k-editor-link-text").val(this._initialText).end().find("#k-editor-link-title").val(i?i.title:"").end().find("#k-editor-link-target").prop("checked",!!i&&"_blank"==i.target).end().find(".k-editor-link-text-row").toggle(!r),this._dialog=o.center().open(),e("#k-editor-link-url",o.element).trigger("focus").select()},_createForm:function(t){var n=e("
          ").appendTo(t.element),r=this.editor.options.messages,o=n.kendoForm({renderButtons:!1,items:[{field:"k-editor-link-url",label:i(r.linkWebAddress),editor:"TextBox"},{field:"k-editor-link-text",label:i(r.linkText),editor:"TextBox"},{field:"k-editor-link-title",label:i(r.linkToolTip),editor:"TextBox"},{field:"k-editor-link-target",editorOptions:{label:i(r.linkOpenInNewWindow)},label:"",editor:"CheckBox"}]}).data("kendoForm");return n.find("#k-editor-link-text").parents(".k-form-field").addClass("k-editor-link-text-row"),t.element.after(e(this._actionButtonsTemplate({messages:r,insertButtonIcon:"link",cancelButtonIcon:"cancel-outline"}))),o},_keydown:function(e){var t=n.keys;e.keyCode==t.ENTER?this._apply(e):e.keyCode==t.ESC&&this._close(e)},_apply:function(t){var i,r,o,a=this._dialog.element,l=e("#k-editor-link-url",a).val(),c=e("#k-editor-link-text",a);l&&l!=v&&(l.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(l)&&(l="mailto:"+l),this.attributes={href:l},(i=e("#k-editor-link-title",a).val())&&(this.attributes.title=i),c.is(":visible")&&((r=n.trim(c.val()))||this._initialText?r&&r!==this._initialText&&(this.attributes.innerText=s.stripBom(r)):this.attributes.innerText=l),o=e("#k-editor-link-target",a).is(":checked"),this.attributes.target=o?"_blank":null,this.formatter.apply(this._range,this.attributes)),this._close(t),this.change&&this.change()},_close:function(e){e.preventDefault(),this._form.destroy(),this._dialog.destroy(),s.windowFromDocument(l.documentFromRange(this._range)).focus(),this.releaseRange(this._range)},linkUrl:function(e){return e?e.getAttribute("href",2):v},linkText:function(e){var t,n="";for(t=0;t-1)return this.end.node=t,this.end.offset=n+1,!1},_detectStart:function(e,t){var n=D(e,/\s/),i=n+1;if(this.text=e.substring(i)+this.text,this.start.node=t,this.start.offset=i,n>-1)return!1},_skipStartPuntuation:function(e,t,n){var i,r=(i=/\w/.exec(e))?i.index:-1,o=r;if(-1===r&&(o=e.length),this.text=this.text.substring(o),this.start.node=t,this.start.offset=o+(0|n),r>-1)return!1}});function D(e,t){for(var n=e.length;n--&&!t.test(e[n]););return n}var I=function(){return{node:null,offset:null,blank:function(){return null===this.node&&null===this.offset}}},z=r.extend({init:function(n){this.node=n.node,this.offset=n.offset===t?s.isDataNode(this.node)&&this.node.length||0:n.offset,this.cancelAtNode=n.cancelAtNode||this.cancelAtNode||e.noop},traverse:function(e){e&&(this.cancel=!1,this._traverse(e,this.node,this.offset))},_traverse:function(e,n,i){if(n&&!this.cancel){if(3!==n.nodeType){var r=this.edgeNode(n);return this.cancel=this.cancel||this.cancelAtNode(r),this._traverse(e,r)}var o=n.data;i!==t&&(o=this.subText(o,i)),this.cancel=!1===e(o,n,i);var a=this.next(n);if(!a)for(var l=n.parentNode;!a&&s.isInline(l);)a=this.next(l),l=l.parentNode;this.cancel=this.cancel||this.cancelAtNode(a),this._traverse(e,a)}},extendOptions:function(t){return e.extend({node:this.node,offset:this.offset,cancelAtNode:this.cancelAtNode},t||{})},edgeNode:function(e){},next:function(e){},subText:function(e,t){}}),M=z.extend({subText:function(e,t){return e.substring(0,t)},next:function(e){return e.previousSibling},edgeNode:function(e){return e.lastChild},clone:function(e){var t=this.extendOptions(e);return new M(t)}}),E=z.extend({subText:function(e,t){return e.substring(t)},next:function(e){return e.nextSibling},edgeNode:function(e){return e.firstChild},clone:function(e){var t=this.extendOptions(e);return new E(t)}});o(n.ui.editor,{LinkFormatFinder:w,LinkFormatter:y,UnlinkCommand:k,LinkCommand:x,AutoLinkCommand:C,UnlinkTool:S,DomTextLinkDetection:T,LeftDomTextTraverser:M,RightDomTextTraverser:E}),m("createLink",new d({key:"K",ctrl:!0,command:x})),m("unlink",new S({key:"K",ctrl:!0,shift:!0,ui:{enable:!1}})),m("autoLink",new d({key:[g.ENTER,g.SPACEBAR],keyPressCommand:!0,command:C}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,r=t.ui.editor,o=t.ui.Editor.fn.options.formats,a=r.Dom,s=r.FormatTool,l=r.EditorUtils,c=l.registerTool,d=l.registerFormat,u=r.RangeUtils,h=n.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,r;for(n=0,i=t.length;n=0&&!(r=a.ofType(t[n],o[l].tags)?t[n]:a.closestEditableOfType(t[n],o[l].tags));l--);if(!r||"true"===r.contentEditable)return[];e.inArray(r,s)<0&&s.push(r)}for(this._resolveListsItems(s),n=0,i=s.length;n=0;o--){var s=i.immutableParent(e[o]);s&&(s!==e[o+1]&&(t?a.attr(s,n.attr):a.unstyle(s,n.attr.style)),e.splice(o,1))}}},immutables:function(){return this.editor&&this.editor.options.immutables},remove:function(e){var t,n,i,r,o;for(this._handleImmutables(e,!1),t=0,n=e.length;t=0?new n.GreedyInlineFormatter(s):new n.GreedyBlockFormatter(s)).editor=i.editor,t}})},decorate:function(t){var n,i,r,o,s=this.component,l=s.dataSource,c=l.data();for(t&&s.list.css("background-color",a.getEffectiveBackground(e(t))),n=0;n=0;n--){var i=t[n];this.immutableParent(i)||this.clean(i)}this.releaseRange(e)},clean:function(i){if(i&&!a.isMarker(i)){var r=a.name(i);if("ul"==r||"ol"==r){var o=new n.ListFormatter(r),s=i.previousSibling,l=i.nextSibling;for(o.unwrap(i);s&&s!=l;s=s.nextSibling)this.clean(s)}else if("blockquote"==r)a.changeTag(i,"p");else if(1!=i.nodeType||a.insignificant(i))!function(e){var i=a.closestEditableOfType(e,["li"]);if(i){var r=new n.ListFormatter(a.name(i.parentNode)),o=t.ui.editor.W3CRange.fromNode(e);o.selectNode(i),r.toggle(o)}}(i);else{for(var c=i.childNodes.length-1;c>=0;c--)this.clean(i.childNodes[c]);i.removeAttribute("style"),i.removeAttribute("class")}e.inArray(r,this.tagsToClean)>-1&&a.unwrap(i)}},immutableParent:function(e){return this.immutables()&&n.Immutables.immutableParent(e)}});e.extend(n,{FormattingTool:d,CleanFormatCommand:u}),c("formatting",new d({ui:{type:"component",component:"DropDownList",componentOptions:{dataTextField:"text",dataValueField:"value",highlightFirst:!1,autoWidth:!0,template:t.template((function(e){return''+t.htmlEncode(e.text)+""}))},overflow:"never"}})),c("cleanFormatting",new i({command:u}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,r=n.htmlEncode,o=n.ui.editor,a=o.EditorUtils,s=o.Dom,l=a.registerTool,c=o.RangeUtils,d=o.Command,u=n.keys,h="#k-editor-image-url",p="#k-editor-image-title",f="#k-editor-image-width",m="#k-editor-image-height",g=d.extend({init:function(e){var t=this;d.fn.init.call(t,e),t.async=!0,t.attributes={}},insertImage:function(e,t){var n=this.attributes,i=c.documentFromRange(t);if(n.src&&"http://"!=n.src){var r=function(){setTimeout((function(){n.width||e.removeAttribute("width"),n.height||e.removeAttribute("height"),e.removeAttribute("complete")}))};if(!e)return(e=s.create(i,"img",n)).onload=e.onerror=r,t.deleteContents(),t.insertNode(e),e.nextSibling||s.insertAfter(i.createTextNode("\ufeff"),e),r(),t.setStartAfter(e),t.setEndAfter(e),c.selectRange(t),!0;e.onload=e.onerror=r,s.attr(e,n),r()}return!1},redo:function(){var e=this,t=e.lockRange();e.insertImage(c.image(t),t)||e.releaseRange(t)},exec:function(){var e,t,r=this,o=r.lockRange(),a=!1,l=c.image(o),d=l&&l.getAttribute("width")||"",g=l&&l.getAttribute("height")||"",v=n.support.browser.msie,_=r.editor.options,b=_.messages,w=_.imageBrowser,y=!!(n.ui.ImageBrowser&&w&&w.transport&&undefined!==w.transport.read),k={title:b.insertImage,visible:!1,resizable:y};function x(t){var n=e.element,i=parseInt(n.find(f).val(),10),s=parseInt(n.find(m).val(),10);r.attributes={src:n.find(h).val().replace(/ /g,"%20"),alt:n.find(p).val()},r.attributes.width=null,r.attributes.height=null,!isNaN(i)&&i>0&&(r.attributes.width=i),!isNaN(s)&&s>0&&(r.attributes.height=s),a=r.insertImage(l,o),C(t),r.change&&r.change()}function C(n){n.preventDefault(),t.destroy(),e.destroy(),s.windowFromDocument(c.documentFromRange(o)).focus(),a||r.releaseRange(o)}this.expandImmutablesIn(o),k.close=C,y&&(k.width=750),k.minWidth=350,e=this.createDialog("
          ",k).data("kendoWindow"),t=r._createForm(e,y),e.element.toggleClass("k-filebrowser-dialog",y),e.wrapper.find(".k-dialog-insert").on("click",x).end().find(".k-dialog-close").on("click",C).end().find(".k-form-field input").on("keydown",(function(e){e.keyCode==u.ENTER?x(e):e.keyCode==u.ESC&&C(e)})).end().find(h).val(l?l.getAttribute("src",2):"http://").end().find(p).val(l?l.alt:"").end().find(f).val(d).end().find(m).val(g).end();var S=e.element;if(y&&(this._imageBrowser=new n.ui.ImageBrowser(S.find(".k-imagebrowser"),i({},w)),this._imageBrowser.bind("change",(function(e){"f"===e.selected.get("type")&&S.find(h).val(this.value())})),this._imageBrowser.bind("apply",x)),v){var T=S.closest(".k-window").height();S.css("max-height",T)}e.center().open(),S.find(h).trigger("focus").select()},_createForm:function(t,n){var i=e("
          ").appendTo(t.element),o=this.editor.options.messages,a=i.kendoForm({renderButtons:!1,items:[{field:"k-editor-image-url",label:r(o.imageWebAddress),editor:"TextBox"},{field:"k-editor-image-title",label:r(o.imageAltText),editor:"TextBox"},{field:"k-editor-image-width",label:r(o.imageWidth),editor:"TextBox"},{field:"k-editor-image-height",label:r(o.imageHeight),editor:"TextBox"}]}).data("kendoForm");return n&&i.prepend(e('
          ')),t.element.after(e(this._actionButtonsTemplate({messages:o,insertButtonIcon:"image-add",cancelButtonIcon:"cancel-outline"}))),a}});n.ui.editor.ImageCommand=g,l("insertImage",new o.Tool({command:g}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,r=n.ui.editor,o=r.EditorUtils,a=r.Command,s=r.Tool,l=o.registerTool,c='
          ',d=a.extend({exec:function(){(this.editor._uploadWidget||this._initializeUploadWidget()).element.click()},_initializeUploadWidget:function(){var t=this,n=t.editor,i=n.options.import,r=e('').kendoUpload({success:t._onUploadSuccess.bind(t),progress:t._onUploadProgress.bind(t),select:t._onUploadSelect.bind(t),error:t._onUploadError.bind(t),complete:t._onUploadComplete.bind(t),showFileList:!1,multiple:!1,async:{saveUrl:i.proxyURL,autoUpload:!0,saveField:"file"},validation:{allowedExtensions:i.allowedExtensions,maxFileSize:i.maxFileSize}}).getKendoUpload();return n._uploadWidget=r,r},_onUploadComplete:function(e){this._trigger("complete",e),e.sender.clearAllFiles(),this._removeLoadingOverlay()},_onUploadSuccess:function(e){this.editor.value(e.response.html.replace(/<\/?body>/gi,"")),this._trigger("success",e)},_onUploadProgress:function(e){this._trigger("progress",e)},_onUploadSelect:function(e){this._trigger("select",e),e.files[0].validationErrors||this._initLoadingOverlay()},_onUploadError:function(e){this._trigger("error",e)},_trigger:function(e,t){var n=this.editor,i=n.options.import;"function"==typeof i[e]&&i[e].call(n,t)},_initLoadingOverlay:function(){var t=this.editor.body;r.Dom.is(t,"body")?this._iframeWrapper=this._container=this.editor.wrapper.find("iframe").parent().css({position:"relative"}).append(c):this._container=e(t).append(c),n.ui.progress(this._container,!0)},_removeLoadingOverlay:function(){n.ui.progress(this._container,!1),e(this._iframeWrapper).css({position:""}),delete this._container,delete this._iframeWrapper}});i(r,{ImportCommand:d}),l("import",new s({command:d,ui:{showText:"both"}}))}(window.kendo.jQuery),function(e){var t=window.kendo.ui.editor,n=t.Command,i=t.GenericCommand,r=t.EditorUtils.registerTool,o=t.Tool,a=t.RestorePoint,s=e.extend,l=n.extend({init:function(e){n.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e=this.editor,t=this.options,n=t.range,r=e.body,o=new a(n,r),s=t.html||t.value||"";e.selectRange(n),e.clipboard.paste(s,t),t.postProcess&&t.postProcess(e,e.getRange());var l=new i(o,new a(e.getRange(),r));l.editor=e,e.undoRedoStack.push(l),e.focus()}}),c=o.extend({initialize:function(e,t){var n=this.options,i=n.items?n.items:t.options.insertHtml,r=e.getKendoDropDownList();r&&(r.one("open",(function(){var e=r.list.parent().find(".k-list-optionlabel");e.length&&e.remove()})),r.setOptions({dataSource:i,optionLabel:t.options.messages.insertHtml}),r.bind("change",(function(){o.exec(t,"insertHtml",r.value())})))},command:function(e){return new l(e)},update:function(e){var t=e.data("kendoDropDownList");t.close(),t.value(null)}});s(t,{InsertHtmlCommand:l,InsertHtmlTool:c}),r("insertHtml",new c({ui:{initialValue:"Insert HTML",type:"component",component:"DropDownList",componentOptions:{dataTextField:"text",dataValueField:"value",autoSize:!0,highlightFirst:!1},overflow:"never"}}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,r=n.ui.editor,o=r.EditorUtils,a=r.Command,s=r.Tool,l=o.registerTool,c=a.extend({init:function(e){var t=this;t.options=e,a.fn.init.call(t,e),t.attributes=null,t.exportType=e.exportType},exec:function(){var e=this.lockRange(!0);this.postToProxy(),this.releaseRange(e)},postToProxy:function(){this.generateForm().appendTo("body").submit().remove()},generateForm:function(){var t=this,n=t.editor.options.exportAs,i=e("").attr({action:n&&n.proxyURL||"",method:"POST"});return i.append([t.valueInput(),t.exportTypeInput(),t.fileNameInput(),t.antiForgeryInput()]),i},valueInput:function(){var t=this.editor;return e("").attr({value:t.encodedValue(),name:"value",type:"hidden"})},exportTypeInput:function(){return e("").attr({value:this.exportType,name:"exportType",type:"hidden"})},fileNameInput:function(){var t=this.editor,n=t.options.exportAs,i=n&&n.fileName||t.element.attr("id")||"editor";return e("").attr({value:i,name:"fileName",type:"hidden"})},antiForgeryInput:function(){var t=e("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");return e("input[name^='__RequestVerificationToken']").clone().add(e("input[name^='"+t+"']").clone())}}),d=s.extend({init:function(e){var t=this;s.fn.init.call(t,n.deepExtend({},t.options,e)),t.type="kendoDropDownList"},options:{items:[{text:"Docx",value:"docx"},{text:"Rtf",value:"rtf"},{text:"Pdf",value:"pdf"},{text:"Html",value:"html"},{text:"Plain Text",value:"txt"}]},command:function(e){var t=e.value;return new r.ExportAsCommand({range:e.range,exportType:t.exportType})},initialize:function(e,t){var n=e.getKendoDropDownList();this.editor=t,n.bind("change",this.changeHandler.bind(this))},changeHandler:function(e){this._exec(e.sender.value()),e.sender.value(null),e.sender.wrapper.find(".k-export-tool-text").text(n.htmlEncode(this.editor.options.messages.exportAs))},update:function(e,t){var i=e.data("kendoDropDownList");i.close(),i.value(null),e.closest(".k-dropdownlist").find(".k-export-tool-text").text(n.htmlEncode(this.editor.options.messages.exportAs))},_exec:function(e){e&&s.exec(this.editor,this.options.name,{exportType:e})},destroy:function(){this._ancestor=null}});i(r,{ExportAsTool:d,ExportAsCommand:c}),l("exportAs",new d({ui:{type:"component",overflow:"never",component:"DropDownList",componentOptions:{dataTextField:"text",dataValueField:"value",valuePrimitive:!0,value:null,width:"140px",highlightFirst:!1,autoWidth:!0,itemTemplate:function(e){return''+e.text+""},icon:"export",valueTemplate:function(){return''+n.ui.icon({icon:"export",iconClass:"k-button-icon"})+''}}}}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.Class,r=e.extend,o=n.ui.editor,a=o.Dom,s=o.EditorUtils.registerTool,l=o.Command,c=o.Tool,d=o.RangeUtils,u=a.blockElements,h=o.BlockFormatFinder,p=o.BlockFormatter;function f(t,n){var i="rtl"==e(t).css("direction")?"Right":"Left",r="td"!=a.name(t)?"margin"+i:"padding"+i;if(undefined===n)return t.style[r]||0;n>0?t.style[r]=n+"px":(t.style[r]="",t.style.cssText||t.removeAttribute("style"))}var m=i.extend({init:function(){this.finder=new h([{tags:a.blockElements}])},apply:function(t){t=a.filterBy(t,a.htmlIndentSpace,!0);var n,i,r,o,s,l=this.finder.findSuitable(t),c=[];if((l=this.mapImmutables(l)).length){for(n=0,i=l.length;n1||f(c.parentNode))||a.ofType(c,["ul","ol"])&&r>0),i)return void h.enable(t,!0);h.enable(t,!1)}});r(o,{IndentFormatter:m,IndentCommand:g,OutdentCommand:v,OutdentTool:_}),s("indent",new c({command:g})),s("outdent",new _({command:v,ui:{enable:!1}}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,r=i.Dom,o=i.Command,a=i.Tool,s=i.BlockFormatter,l=r.normalize,c=i.RangeUtils,d=i.EditorUtils.registerTool,u=o.extend({init:function(e){this.options=e,o.fn.init.call(this,e)},_insertMarker:function(e,t){var n,i=r.create(e,"a");return i.className="k-marker",t.insertNode(i),i.parentNode||((n=t.commonAncestorContainer).innerHTML="",n.appendChild(i)),l(i.parentNode),i},_moveFocus:function(e,t){if(r.isEmpty(t))e.setStartBefore(t);else{e.selectNodeContents(t);var n=c.textNodes(e)[0];if(!n){for(;t.childNodes.length&&!r.is(t.firstChild,"br");)t=t.firstChild;n=t}if(r.isEmpty(n))e.setStartBefore(n);else{r.emptyNode(n)&&(n.innerHTML="\ufeff");var i=n.firstChild||n;r.isDataNode(i)?e.setStart(i,0):e.setStartBefore(i)}}},shouldTrim:function(e){var t="p,h1,h2,h3,h4,h5,h6".split(","),n=r.parentOfType(e.startContainer,t),i=r.parentOfType(e.endContainer,t);return n&&!i||!n&&i},_blankAfter:function(e){for(;e&&(r.isMarker(e)||""===r.stripBom(e.nodeValue));)e=e.nextSibling;return!e},exec:function(){var t,n,o,a,d,u,h,p,f,m,g=this.getRange(),v=c.documentFromRange(g),_=i.emptyElementContent;if(this.expandImmutablesIn(g),m=this.shouldTrim(g),g.deleteContents(),d=this._insertMarker(v,g),r.stripBomNode(d.previousSibling),r.stripBomNode(d.nextSibling),u=r.closestEditableOfType(d,["li"]),h=r.closestEditableOfType(d,"h1,h2,h3,h4,h5,h6".split(",")),p=r.is(d.parentNode,"table")&&d.parentNode,u){if(r.emptyNode(u)){a=r.create(v,"p"),r.next(u)&&((f=g.cloneRange()).selectNode(u),c.split(f,u.parentNode));var b=e("br",u);1==b.length&&b.remove();var w=u.parentNode,y=u.parentNode.children.length,k=y>1&&1==u.childNodes.length&&u.children[0];r.insertAfter(a,w),r.remove(1==y?u.parentNode:u),k&&k!==d?(a.appendChild(k),a.appendChild(d)):a.innerHTML=_,o=a}}else h&&this._blankAfter(d)?(a=this._insertParagraphAfter(h),r.remove(d),o=a):p&&(a=this._insertParagraphAfter(p),r.remove(d),o=a);o||(u||h||new s([{tags:["p"]}]).apply([d]),g.selectNode(d),t=r.parentOfType(d,[u?"li":h?r.name(h):"p"]),c.split(g,t,m),n=t.previousSibling,r.is(n,"li")&&n.firstChild&&!r.is(n.firstChild,"br")&&(n=n.firstChild),o=t.nextSibling,this.clean(n,{links:!0}),this.clean(o,{links:!0}),r.is(o,"li")&&o.firstChild&&!r.is(o.firstChild,"br")&&(o=o.firstChild),r.remove(t),l(n)),l(o),this._moveFocus(g,o),g.collapse(!0),r.scrollTo(o,!0),c.selectRange(g)},_insertParagraphAfter:function(e){var t=this.getRange(),n=c.documentFromRange(t),o=i.emptyElementContent,a=r.create(n,"p");return r.insertAfter(a,e),a.innerHTML=o,a},clean:function(t,n){var o=t;if(t.firstChild&&r.is(t.firstChild,"br")&&r.remove(t.firstChild),r.isDataNode(t)&&!t.nodeValue&&(t=t.parentNode),t){for(var a=!1;t.firstChild&&1==t.firstChild.nodeType;)a=a||r.significantNodes(t.childNodes).length>1,t=t.firstChild;if(r.isEmpty(t)||"k-br"==t.className||!/^\s*$/.test(t.innerHTML)||a||(e(o).find(".k-br").remove(),t.innerHTML=i.emptyElementContent),n&&n.links)for(;t!=o;){if(r.is(t,"a")&&r.emptyNode(t)){r.unwrap(t);break}t=t.parentNode}}}}),h=o.extend({init:function(e){this.options=e,o.fn.init.call(this,e)},exec:function(){var n=this.getRange();this.expandImmutablesIn(n);var i,o,a=r.create(c.documentFromRange(n),"br"),s=n.startContainer,d=t.support.browser,u=d.msie&&d.version<11,h=r.is(s,"table")&&s;n.deleteContents(),h?r.insertAfter(a,h):(o=e(s).closest(".k-br"),n.insertNode(a),o.length&&r.unwrap(o[0])),l(a.parentNode),u||a.nextSibling&&!r.isWhitespace(a.nextSibling)||(a.nextSibling&&r.isWhitespace(a.nextSibling)&&e(a.nextSibling).remove(),(i=a.cloneNode(!0)).className="k-br",r.insertAfter(i,a)),n.setStartAfter(a),n.collapse(!0),r.scrollTo(a.nextSibling||a,!0),c.selectRange(n)}});n(i,{ParagraphCommand:u,NewLineCommand:h}),d("insertLineBreak",new a({key:13,shift:!0,command:h})),d("insertParagraph",new a({key:13,command:u}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,r=n.htmlEncode,o=n.ui.editor,a=o.EditorUtils,s=o.Dom,l=a.registerTool,c=o.RangeUtils,d=o.Command,u=o.LinkFormatter,h=c.textNodes,p=n.keys,f="#k-editor-file-url",m="#k-editor-file-text",g="#k-editor-file-title",v=d.extend({init:function(e){var t=this;d.fn.init.call(t,e),t.formatter=new u,t.async=!0,t.attributes={}},insertFile:function(e,t){var n=this.attributes,i=c.documentFromRange(t);if(n.href&&"http://"!=n.href){if(!e)return(e=s.create(i,"a",{href:n.href})).innerHTML=n.innerHTML,e.title=n.title,t.deleteContents(),t.insertNode(e),e.nextSibling||s.insertAfter(i.createTextNode("\ufeff"),e),t.setStartAfter(e),t.setEndAfter(e),c.selectRange(t),!0;s.attr(e,n)}return!1},redo:function(){var e=this.lockRange();this.formatter.apply(e,this.attributes),this.releaseRange(e)},exec:function(){var e,t,r=this,o=r.lockRange(),a=h(o),l=!1,d=a.length?this.formatter.finder.findSuitable(a[0]):null,u=n.support.browser.msie,v=r.editor.options,_=v.messages,b=v.fileBrowser,w=!!(n.ui.FileBrowser&&b&&b.transport&&undefined!==b.transport.read),y={title:_.insertFile,visible:!1,resizable:w};function k(t){var n=e.element,i=n.find(f).val().replace(/ /g,"%20"),a=n.find(m).val(),s=n.find(g).val();r.attributes={href:i,innerHTML:""!==a?a:i,title:s},l=r.insertFile(d,o),x(t),r.change&&r.change()}function x(n){n.preventDefault(),t.destroy(),e.destroy(),s.windowFromDocument(c.documentFromRange(o)).focus(),l||r.releaseRange(o)}this.expandImmutablesIn(o),y.close=x,w&&(y.width=750),y.minWidth=350,e=this.createDialog("
          ",y).data("kendoWindow"),t=r._createForm(e,w),e.element.toggleClass("k-filebrowser-dialog",w),e.wrapper.find(".k-dialog-insert").on("click",k).end().find(".k-dialog-close").on("click",x).end().find(".k-form-field input").on("keydown",(function(e){e.keyCode==p.ENTER?k(e):e.keyCode==p.ESC&&x(e)})).end().find(f).val(d?d.getAttribute("href",2):"http://").end().find(m).val(d?d.innerText:"").end().find(g).val(d?d.title:"").end();var C=e.element;if(w&&(r._fileBrowser=new n.ui.FileBrowser(C.find(".k-filebrowser"),i({},b)),r._fileBrowser.bind("change",(function(e){"f"===e.selected.get("type")&&C.find(f).val(this.value())})),r._fileBrowser.bind("apply",k)),u){var S=C.closest(".k-window").height();C.css("max-height",S)}e.center().open(),C.find(f).trigger("focus").select()},_createForm:function(t,n){var i=e("
          ").appendTo(t.element),o=this.editor.options.messages,a=i.kendoForm({renderButtons:!1,items:[{field:"k-editor-file-url",label:r(o.fileWebAddress),editor:"TextBox"},{field:"k-editor-file-text",label:r(o.fileText),editor:"TextBox"},{field:"k-editor-file-title",label:r(o.fileTitle),editor:"TextBox"}]}).data("kendoForm");return n&&i.prepend(e('
          ')),t.element.after(e(this._actionButtonsTemplate({messages:o,insertButtonIcon:"file-add",cancelButtonIcon:"cancel-outline"}))),a}});n.ui.editor.FileCommand=v,l("insertFile",new o.Tool({command:v}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,r=n.ui.editor,o=r.Dom,a=r.RangeUtils,s=r.Command,l="kendoEditor",c="k-active",d="k-selected",u="scope",h="row",p="col",f="rowgroup",m="colgroup",g="colspan",v="rowspan",_="table",b="thead",w="tbody",y="tr",k="td",x="th",C=r.Tool,S=r.InsertHtmlCommand,T=r.BlockFormatFinder,D=r.BlockFormatTool,I=r.FormatCommand,z=r.EditorUtils.registerTool,M=r.EditorUtils.registerFormat,E=n.ui.Editor.fn.options.formats,A=n.getTouches,H=n.template,R=function(e){return''+e.content+""},F=new T([{tags:[_]}]),P=S.extend({init:function(t){var n=e.extend({postProcess:this.postProcess,skipCleaners:!0},t||{});S.fn.init.call(this,n)},_tableHtml:function(e,t){e=e||1,t=t||1;var n=H(R)({width:100/t,content:r.emptyTableCellContent}),i=100/e;return""+new Array(e+1).join(""+new Array(t+1).join(n)+"")+"
          "},postProcess:function(t,n){var i=e("table[data-last]",t.document).removeAttr("data-last");n.setStart(i.find(k)[0],0),n.collapse(!0),t.selectRange(n)},exec:function(){var e=this.options;e.html=this._tableHtml(e.rows,e.columns),S.fn.exec.call(this)}}),B=C.extend({initialize:function(t,n){var i=this,o=e(""),a=e(this.options.popupTemplate).appendTo("body").kendoPopup({anchor:t,copyAnchorStyles:!1,open:this._open.bind(this),activate:this._activate.bind(this),close:this._close.bind(this)}).data("kendoPopup");t.on("click",this._toggle.bind(this)).on("keydown",this._keydown.bind(this)),this._editor=n,this._popup=a,n.tablePopup=this._popup;var s=new r.TableWizardTool({command:r.TableWizardCommand,insertNewTable:!0});z("tableWizardInsert",s),o.appendTo(a.element),o.kendoButton({icon:"table-wizard"}),o.on("click",(function(){i._editor.exec("tableWizardInsert")}))},popup:function(){return this._popup},_activate:e.noop,_open:function(){this._popup.options.anchor.addClass(c)},_close:function(){this._popup.options.anchor.removeClass(c)},_keydown:function(e){var t=this,i=n.keys,r=e.keyCode;r==i.ESC?t._popup.close():r==i.DOWN&&e.altKey?(t._popup.open(),t._setTableSize({row:1,col:1})):r===i.ENTER&&setTimeout((function(){t._setTableSize({row:1,col:1})}))},_toggle:function(t){e(t.target).closest(".k-tool").hasClass("k-disabled")||this.popup().toggle()},update:function(e){var t=this.popup();t.wrapper&&"block"==t.wrapper.css("display")&&t.close(),e.removeClass("k-hover")},destroy:function(){this._popup&&this._popup.destroy()}}),L=B.extend({init:function(t){this.cols=8,this.rows=6,B.fn.init.call(this,e.extend(t,{command:P,popupTemplate:"
          "+new Array(this.cols*this.rows+1).join("")+"
          "}))},_activate:function(){var t,i,r=this,o=r._popup.element,a=o.find(".k-ct-cell"),s=a.eq(0),c=a.eq(a.length-1),d=n.getOffset(s),u=n.getOffset(c),h=r.cols,p=r.rows;function f(n){var r=e(window);return{row:Math.floor((n.clientY+r.scrollTop()-d.top)/i)+1,col:Math.floor((n.clientX+r.scrollLeft()-d.left)/t)+1}}o.find("*").addBack().attr("unselectable","on"),u.left+=c[0].offsetWidth,u.top+=c[0].offsetHeight,t=(u.left-d.left)/h,i=(u.top-d.top)/p,o.autoApplyNS(l).on("mousemove",".k-ct-cell",(function(e){r._setTableSize(f(e))})).on("mouseleave",".k-ct-cell",(function(){r._setTableSize()})).on("down",".k-ct-cell",(function(e){e.preventDefault();var t=A(e)[0];r._exec(f(t.location))}))},_valid:function(e){return e&&e.row>0&&e.col>0&&e.row<=this.rows&&e.col<=this.cols},_exec:function(e){this._valid(e)&&(this._editor.exec("createTable",{rows:e.row,columns:e.col}),this._popup.close())},_setTableSize:function(t){var i=this._popup.element,r=i.find(".k-status"),o=i.find(".k-ct-cell"),a=this.cols,s=this._editor.options.messages;this._valid(t)?(r.text(n.format(s.createTableHint,t.row,t.col)),o.each((function(n){e(this).toggleClass(d,n%a0&&(d=!0,i.trigger("focus")):(d=!0,l++);var u={row:Math.max(1,Math.min(this.rows,l+1)),col:Math.max(1,Math.min(this.cols,c+1))};o==r.ENTER&&t?this._exec(u):this._setTableSize(u),d&&(e.preventDefault(),e.stopImmediatePropagation())}},_open:function(){var e=this._editor.options.messages;B.fn._open.call(this),this.popup().element.find(".k-status").text(e.createTable).end().find(".k-ct-cell").removeClass(d)},_close:function(){B.fn._close.call(this),this.popup().element.off("."+l)}}),V=s.extend({undo:function(){var t=this.restorePoint;t.restoreHtml(),e(this.editor.body).find(".k-element-resize-handle-wrapper").each((function(e,t){t.remove()})),this.editor.selectRange(t.toRange())},_clearColIndexAttr:function(e){o.clearTableMappings(e,"col-index")},_mapColIndices:function(e){o.reMapTableColumns(e,"col-index")},_findRowSpanCell:function(t,n,i){for(var r,o,a=n;a>=0;a--)if(r=t.rows[a],(o=e(r).find("[col-index="+i+"]")).length)return o},_resetElementResizing:function(e){e._destroyResizings(),e._initializeColumnResizing(),e._initializeRowResizing(),e._initializeElementResizing()},_findNextTdInRow:function(e,t){for(var n,i=e.find("td:last-child"),r=parseInt(i.attr("col-index"),10)+i.prop("colSpan")-1,o=t;o<=r;o++)if((n=e.find("[col-index="+o+"]")).length)return n},_adjustColgroups:function(e,t){for(var n,i,r,a=t.getElementsByTagName(p),s=t.getElementsByTagName(m),l=e.cells,c=l.length;a.length>0;)a[0].remove();for(;s.length>0;)s[0].remove();for(n=c-1;n>=0;n--)(r=l[n]).getAttribute(u)===m?((i=o.createEmptyNode(this.editor.document,m)).setAttribute("span",r.getAttribute(g)),t.prepend(i)):t.prepend(o.createEmptyNode(this.editor.document,p))},_associateHeaderIds:function(t){o.clearTableMappings(t,"col-index"),o.reMapTableColumns(t,"col-index"),e(t).find("th, td").removeAttr("id headers"),o.associateWithIds(t)},_getNumberOfColumns:function(e){return o._getNumberOfColumns(e,"td, th")}}),O=V.extend({exec:function(){var t,n,i,a,s,l,c=this.lockRange(!0),d=o.closest(c.endContainer,[k,x]),p=o.closest(d,_),m=this.options.position||"after";if(!p||this.immutables()&&r.Immutables.immutableParent(d))this.releaseRange(c);else{this._mapColIndices(p),n=d.parentNode,s=o.findNodeIndex(n,!0),d.rowSpan>1&&"after"===m&&(n=p.rows[s+d.rowSpan-1]),t=this._getNumberOfColumns(p),a=n.cloneNode(!0),e(a).empty();for(var g=0;g1&&"after"===m&&i?i.attr(v,i.prop("rowSpan")+1):this._appendCell(a,i):(s=o.findNodeIndex(n,!0),(i=this._findRowSpanCell(n.parentElement,s,g)).closest(y).index()+i.prop("rowSpan")-1===s&&"after"===m?this._appendCell(a,i):i.attr(v,i.prop("rowSpan")+1)),(l=e(a).find("[col-index="+g+"]")).attr(u)!==f||l.attr(v)||l.attr(u,h);"before"==m?o.insertBefore(a,n):o.insertAfter(a,n),e(p).find("[headers]").length>0&&this._associateHeaderIds(p),this._clearColIndexAttr(p),this.releaseRange(c),this._resetElementResizing(this.editor)}},_appendCell:function(e,t){var n;(n=t.clone()).html(r.emptyTableCellContent),n.removeAttr(v),n.appendTo(e)}}),N=V.extend({exec:function(){var t,n,i,a,s=this.lockRange(!0),l=o.closest(s.endContainer,[k,x]),c=o.closest(l,_),d=c.getElementsByTagName(p),h=c.getElementsByTagName(m),f=c&&c.rows,v=this.options.position||"after";if(!l||this.immutables()&&r.Immutables.immutableParent(l))this.releaseRange(s);else{for(this._mapColIndices(c),t=parseInt(l.getAttribute("col-index"),10),l.colSpan>1&&"after"===v&&(l.setAttribute("col-index",t+l.colSpan-1),t=t+l.colSpan-1),n=0;n0||h.length>0)&&this._adjustColgroups(f[0],c),e(c).find("[headers]").length>0&&this._associateHeaderIds(c),this._clearColIndexAttr(c),this.releaseRange(s),this._resetElementResizing(this.editor)}},_processForColSpan:function(t,n,i,r){var o,a,s=n-1;if((o=e(t).find("[col-index="+n+"]")[0])&&o.colSpan>1&&"after"===i&&o!==r)o.colSpan+=1;else{if(o)return o;for(;s>=0&&!((o=e(t).find("[col-index="+s+"]")[0])&&o.colSpan>1);s--);if(o){if((a=parseInt(o.getAttribute("col-index"),10)+o.colSpan-1)===n&&"after"===i)return o;n<=a&&o.setAttribute(g,o.colSpan+1)}}},_resizeCells:function(e,t){var n,i,r,o=e.style.width;o&&(n=parseFloat(o),i=o.slice(n.toString().length),r=n/2+i,e.style.width=r,t.style.width=r)}}),W=V.extend({exec:function(){var t,n=this.lockRange(),i=a.mapAll(n,(function(t){return e(t).closest(y)[0]})),s=o.closest(n.endContainer,[k,x]),l=i[0],c=s?s.rowSpan:1,d=e(i[0]).index(),u=o.closest(l,_),h=l.parentElement;if(!u||this.immutables()&&r.Immutables.immutableParent(l))this.releaseRange(n);else{for(var p=0;p0?this._associateHeaderIds(u):o.is(h,b)&&e(u).find("[scope]").length>0&&this._adjustColgroups(h.rows[0],u),t&&this._focusElement(n,t),this._resetElementResizing(this.editor)}},_focusElement:function(e,t){e.setStart(t,0),e.collapse(!0),this.editor.selectRange(e)},_handleRowSpanCells:function(t,n){var i,r,a,s,l=o.findNodeIndex(n,!0),c=t.rows[0],d=c.cells[c.cells.length-1],u=parseInt(d.getAttribute("col-index"),10)+d.colSpan-1;for(i=0;i<=u;i+=r.prop("colSpan"))(r=e(n).find("[col-index="+i+"]")).length&&r.prop("rowSpan")>1&&(s=t.rows[l+1],(a=e(s).find("[col-index="+(i+1)+"]")).length?a.before(r):e(s).append(r),this._reduceRowSpan(r)),r.length||(r=this._findRowSpanCell(n.parentElement,l,i),this._reduceRowSpan(r))},_reduceRowSpan:function(e){var t=e.prop("rowSpan")-1;t<=1?(e.removeAttr(v),e.attr(u)===f&&e.attr(u,h)):e.attr(v,t)}}),U=V.extend({exec:function(){var t,n,i,a,s=this.lockRange(),l=o.closest(s.endContainer,[k,x]),c=o.closest(l,_),d=c&&c.rows,u=o.findNodeIndex(l,!0),h=d&&d[0].cells.length,f=c.getElementsByTagName(p),g=c.getElementsByTagName(m);if(!l||this.immutables()&&r.Immutables.immutableParent(l))this.releaseRange(s);else{if(1==h||l.colSpan==h)(t=o.next(c))&&!o.insignificant(t)||(t=o.prev(c)),t&&t.rows&&(t=t.rows[0].cells[0]),o.remove(c),this._resetElementResizing(this.editor);else{for(o.removeTextSiblings(l),t=o.next(l)||o.prev(l),this._mapColIndices(c),u=parseInt(l.getAttribute("col-index"),10),a=0;a0||g.length>0)&&this._adjustColgroups(d[0],c),e(c).find("[headers]").length>0&&this._associateHeaderIds(c),t&&(s.setStart(t,0),s.collapse(!0),this.editor.selectRange(s)),this._resetElementResizing(this.editor)}},_handleColSpanCells:function(t,n){var i=e(t).find("[col-index="+n+"]");if(i.length&&i.prop("colSpan")>1){var r=i.clone(!0);return i.after(r),this._reduceColSpan(r),r.attr("col-index",parseInt(i.attr("col-index"),10)+1),void i.remove()}for(var o=n;o>=0;o--)if((i=e(t).find("[col-index="+o+"]")).length)return this._reduceColSpan(i),void i.attr("col-index",parseInt(i.attr("col-index"),10)+1)},_reduceColSpan:function(e){var t=e.prop("colSpan")-1;t<=1?(e.removeAttr(g),e.attr(u)===m&&e.attr(u,p)):e.attr(g,t)}}),j=V.extend({exec:function(){var t,n,i,a,s,l=this.lockRange(),c=o.closest(l.endContainer,[k,x]);if(c)if(t=o.closest(c,_),n=c.parentNode,i=o.findNodeIndex(c,!0),n.children[i+1],this.immutables()&&r.Immutables.immutableParent(c))this.releaseRange(l);else{if(this._mapColIndices(t),i=parseInt(e(c).attr("col-index"),10),!(a=e(n).find("[col-index="+(i+1+this._getColspan(c)-1)+"]").get(0))||a.rowSpan!==c.rowSpan||c.tagName!==a.tagName)return this._clearColIndexAttr(t),void this.releaseRange(l);s=this._getColspan(c)+this._getColspan(a),e(c).prop(g,s).append(o.emptyNode(a)?"":"
          "+a.innerHTML),e(c).width(c.offsetWidth),e(a).remove(),c.getAttribute(u)===p&&c.setAttribute(u,m),c.getAttribute(u)===m&&this._adjustColgroups(n,t),e(t).find("[headers]").length>0&&this._associateHeaderIds(t),this._clearColIndexAttr(t),this.releaseRange(l),this._resetElementResizing(this.editor)}else this.releaseRange(l)},_getColspan:function(e){return parseInt(e.getAttribute(g),10)||1}}),q=V.extend({exec:function(){var t,n,i,a,s,l,c,d=this.lockRange(),p=o.closest(d.endContainer,[k,x]);if(p)if(t=o.closest(p,y),n=o.closest(p,[b,w]),i=o.closest(p,_),a=o.findNodeIndex(p,!0),(s=o.findNodeIndex(t,!0))+1!==n.rows.length)if((l=n.rows[s+this._getRowspan(p)])&&l.children[a],this.immutables()&&r.Immutables.immutableParent(p))this.releaseRange(d);else{if(this._mapColIndices(i),a=e(p).attr("col-index"),!(c=e(l).find("[col-index="+a+"]").get(0))||c.colSpan!==p.colSpan||p.tagName!==c.tagName)return this._clearColIndexAttr(i),void this.releaseRange(d);e(p).prop(v,this._getRowspan(p)+this._getRowspan(c)).append(o.emptyNode(c)?"":"
          "+c.innerHTML),p.getAttribute(u)===h&&p.setAttribute(u,f),e(c).remove(),e(i).find("[headers]").length>0&&this._associateHeaderIds(i),this._clearColIndexAttr(i),this.releaseRange(d)}else this.releaseRange(d);else this.releaseRange(d)},_getRowspan:function(e){return parseInt(e.getAttribute(v),10)||1}}),G=V.extend({exec:function(){var t=this.lockRange(),n=this.options.type,i="row"===n?g:v,a=o.closest(t.endContainer,[k,x]),s=o.closest(a,[b,w]),l=o.closest(a,_),c=o.createEmptyNode(this.editor.document,a.nodeName.toLowerCase());!a||this.immutables()&&r.Immutables.immutableParent(a)||(this._mapColIndices(l),"row"===n&&e(a).is("["+i+"]")?this._splitCellHorizontally(a,s,i,c):"column"===n&&e(a).is("["+i+"]")&&this._splitCellVertically(a,s,i,c),e(a).prop(i.toLowerCase())<=1&&e(a).removeAttr(i),e(l).find("[headers]").length>0&&this._associateHeaderIds(l),this._clearColIndexAttr(l)),this.releaseRange(t)},_getRowspanValue:function(e){return parseInt(e.getAttribute(v),10)},_getColspanValue:function(e){return parseInt(e.getAttribute(g),10)},_splitCellHorizontally:function(t,n,i,r){var o=t.rowSpan,a=t.colSpan,s=e(r),l=Math.floor(a/2);l>1&&s.attr(g,l),o>1&&s.attr(v,o),e(t).prop(i,a-l).after(s),e(t).width(t.offsetWidth),s.width(s[0].offsetWidth),t.hasAttribute(u)&&(t.getAttribute(u)===m?(s.attr(u,p),t.getAttribute(g)&&"1"!==t.getAttribute(g)||t.setAttribute(u,p),this._adjustColgroups(t.parentNode,n.parentNode)):s.attr(u,t.getAttribute(u)))},_splitCellVertically:function(t,n,i,r){var a=o.closest(t,y),s=parseInt(e(t).attr("col-index"),10),l=o.findNodeIndex(a,!0),c=t.rowSpan,d=t.colSpan,p=Math.floor(c/2),m=e(n).find(y).eq(l+c-p),_=this._findNextTdInRow(m,s+d),b=e(r);p>1&&b.attr(v,p),d>1&&b.attr(g,d),_&&_.length?_.before(b):m.append(b),e(t).prop(i,c-p),t.hasAttribute(u)&&(t.getAttribute(u)===f?(b.attr(u,h),t.getAttribute(v)&&"1"!==t.getAttribute(v)||t.setAttribute(u,h)):b.attr(u,t.getAttribute(u)))}}),K=C.extend({command:function(e){var t={row:{insert:O,delete:W,merge:j,split:G},column:{insert:N,delete:U,merge:q,split:G}};return(e=i(e,this.options)).action=e.action||"insert",new t[e.type][e.action](e)},update:function(e,t){var n=!F.isFormatted(t),i=e.closest(".k-toolbar").getKendoToolBar();!0===n?i.hide(e):i.show(e)}}),Y=I.extend({exec:function(){var e=this.editor;I.fn.exec.call(this),e.elementResizing&&e.elementResizing._showResizeHandles()}}),$=D.extend({update:function(e,t){var n=!F.isFormatted(t),i=this.options.finder.isFormatted(t,this.isTable),r=e.closest(".k-toolbar").getKendoToolBar();r&&r.toggle(e,i),!0===n?r.hide(e):r.show(e)},command:function(e){return new Y(i(e,{formatter:this.options.formatter}))},isTable:function(e){return o.is(e,"table")}});i(n.ui.editor,{PopupTool:B,TableCommand:P,InsertTableTool:L,TableFormatTool:$,TableFormatCommand:Y,TableModificationTool:K,InsertRowCommand:O,InsertColumnCommand:N,DeleteRowCommand:W,DeleteColumnCommand:U,MergeCellsHorizontallyCommand:j,MergeCellsVerticallyCommand:q,SplitCellCommand:G}),z("createTable",new L({ui:{popup:!0,overflow:"never"}})),z("addColumnLeft",new K({type:"column",position:"before"})),z("addColumnRight",new K({type:"column"})),z("addRowAbove",new K({type:"row",position:"before"})),z("addRowBelow",new K({type:"row"})),z("deleteRow",new K({type:"row",action:"delete"})),z("deleteColumn",new K({type:"column",action:"delete"})),z("mergeCellsHorizontally",new K({type:"row",action:"merge"})),z("mergeCellsVertically",new K({type:"column",action:"merge"})),z("splitCellHorizontally",new K({type:"row",action:"split"})),z("splitCellVertically",new K({type:"column",action:"split"})),M("tableAlignLeft",[{tags:["table"],attr:{style:{marginLeft:"",marginRight:"auto"}}},{tags:["table"],attr:{align:"left"}}]),z("tableAlignLeft",new $({format:E.tableAlignLeft,ui:{togglable:!0,group:"tableAlign"}})),M("tableAlignCenter",[{tags:["table"],attr:{style:{marginLeft:"auto",marginRight:"auto"}}},{tags:["table"],attr:{align:"center"}}]),z("tableAlignCenter",new $({format:E.tableAlignCenter,ui:{togglable:!0,group:"tableAlign"}})),M("tableAlignRight",[{tags:["table"],attr:{style:{marginLeft:"auto",marginRight:""}}},{tags:["table"],attr:{align:"right"}}]),z("tableAlignRight",new $({format:E.tableAlignRight,ui:{togglable:!0,group:"tableAlign"}}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,r=i.RangeUtils,o=i.Dom,a=i.RestorePoint,s=i.Marker,l=t.support.browser,c=e.extend,d=n.extend({init:function(e){this.editor=e;var t=e.options.pasteCleanup;this.cleaners=[new h(t),new p(t),new f(t),new m(t),new v(t),new _(t),new k(t),new x(t)]},htmlToFragment:function(e){var t=this.editor.document,n=o.create(t,"div"),i=t.createDocumentFragment();for(n.innerHTML=e;n.firstChild;)i.appendChild(n.firstChild);return i},isBlock:function(e){return/<(div|p|ul|ol|table|h[1-6])/i.test(e)},_startModification:function(){var e,t,n=this.editor;if(!this._inProgress)return this._inProgress=!0,e=n.getRange(),t=new a(e,n.body),o.persistScrollTop(n.document),{range:e,restorePoint:t}},_endModification:function(e){i._finishUpdate(this.editor,e.restorePoint),this.editor._selectionChange(),this._inProgress=!1},_contentModification:function(e,t){var n=this,i=n.editor,r=n._startModification();r&&(e.call(n,i,r.range),setTimeout((function(){t.call(n,i,r.range),n._endModification(r)})))},_removeBomNodes:function(e){for(var t=r.textNodes(e),n=0;n10)){var t=e.clipboardData||e.originalEvent.clipboardData||window.clipboardData||{},n=t.items||t.files;return this._insertImages(n)}},_insertImages:function(t){if(t){var n=e.grep(t,(function(e){return/^image\//i.test(e.type)}));if(!e.grep(t,(function(e){return/^text\/html/i.test(e.type)})).length&&n.length){var i=this._startModification();if(i)return e.when.apply(e,e.map(n,this._fileToDataURL)).done(function(){var t=Array.prototype.slice.call(arguments),n=e.map(t,(function(e){return''})).join("");this._triggerPaste(n),this._endModification(i)}.bind(this)),!0}}},onpaste:function(n){"false"!==this.editor.body.contentEditable&&(this._handleImagePaste(n)?n.preventDefault():(this.expandImmutablesIn(),this._contentModification((function(i,r){var a=o.create(i.document,"div",{className:"k-paste-container",innerHTML:"\ufeff"}),s=t.support.browser,l=i.body;if(this._decoreateClipboardNode(a,l),l.appendChild(a),s.webkit&&this._moveToCaretPosition(a,r),s.msie&&s.version<11){n.preventDefault();var c=i.createRange();c.selectNodeContents(a),i.selectRange(c);var d=i.document.body.createTextRange();d.moveToElementText(a),e(l).off("paste"),d.execCommand("Paste"),e(l).on("paste",this.onpaste.bind(this))}else{var u=i.createRange();u.selectNodeContents(a),i.selectRange(u)}r.deleteContents()}),(function(t,n){var i,r="";t.selectRange(n),(i=e(t.body).children(".k-paste-container")).each((function(){var e=this.lastChild;e&&o.is(e,"br")&&o.remove(e),r+=this.innerHTML})),i.remove(),this._triggerPaste(r,{clean:!0})}))))},ondragover:function(e){(l.msie||l.edge)&&(e.stopPropagation(),e.preventDefault())},ondrop:function(e){if("FileReader"in window){var t=(e.originalEvent||e).dataTransfer||{},n=t.items||t.files;this._insertImages(n)&&e.preventDefault()}},_decoreateClipboardNode:function(t,n){if((l.msie||l.webkit)&&((t=e(t)).css({borderWidth:"0px",width:"0px",height:"0px",overflow:"hidden",margin:"0",padding:"0"}),l.msie)){var i=e(n.ownerDocument.documentElement);t.css({fontVariant:"normal",fontWeight:"normal",lineSpacing:"normal",lineHeight:"normal",textDecoration:"none"});var r=i.css("color");r&&t.css("color",r);var o=i.css("fontFamily");o&&t.css("fontFamily",o);var a=i.css("fontSize");a&&t.css("fontSize",a)}},_moveToCaretPosition:function(t,n){var i=this.editor.body,r=o.offset(t,i),a=this._caretOffset(n,i),s="translate("+(a.left-r.left)+"px,"+(a.top-r.top)+"px)";e(t).css({"-webkit-transform":s,transform:s})},_caretOffset:function(e,t){var n,i=this.editor,r=o.create(i.document,"span",{innerHTML:"\ufeff"}),a=e.startContainer;if(e.collapsed){var s=o.isDataNode(a);s&&(o.isBom(a)||0===e.startOffset)?o.insertBefore(r,a):s&&e.startOffset===a.length?o.insertAfter(r,a):(e.insertNode(r),n=!0)}else a=a===t?a.childNodes[e.startOffset]:a,o.insertBefore(r,a);var l=o.offset(r,t),c=r.previousSibling,d=r.nextSibling;if(o.remove(r),n&&o.isDataNode(c)&&o.isDataNode(d)&&!o.isBom(c)&&!o.isBom(d)){var u=c.length;d.data=c.data+d.data,e.setStart(d,u),o.remove(c),e.collapse(!0),i.selectRange(e)}return l},expandImmutablesIn:function(e){var n=this.editor;if(n&&n.options.immutables){var i=n.body;if(e=e||n.getRange(),t.ui.editor.Immutables.expandImmutablesIn(e),e.startContainer===i&&0===e.startOffset){var r=i.ownerDocument.createTextNode("\ufeff");i.insertBefore(r,i.childNodes[0]),e.setStartBefore(r)}n.selectRange(e)}},splittableParent:function(e,t){var n,i;if(e)return o.closestEditableOfType(t,["p","ul","ol"])||t.parentNode;if(n=t.parentNode,i=t.ownerDocument.body,o.isInline(n))for(;n.parentNode!=i&&!o.isBlock(n.parentNode);)n=n.parentNode;return n},paste:function(t,n){var i,a,l,d=this.editor;if(this.expandImmutablesIn(),!(n=c({clean:!1,split:!0},n)).skipCleaners)for(i=0,a=this.cleaners.length;i(\s| )*)+(<\/?(div|p|li|col|t))/gi,"$3")).replace(/<(a|span)[^>]*><\/\1>/gi,"")),t=(t=t.replace(/<(a|span|font)([^>]*)> <\/\1>/gi,"<$1$2> ")).replace(/^
        • $/g,"li>
        ");var u=this.isBlock(t);d.focus();var h=d.getRange();h.deleteContents(),h.startContainer==d.document&&h.selectNodeContents(d.body);var p=new s,f=p.addCaret(h),m=this.splittableParent(u,f),g=!1,v=m!=d.body&&!o.is(m,"td");n.split&&v&&(u||o.isInline(m))&&(h.selectNode(f),r.split(h,m,!0),g=!0);var _=this.htmlToFragment(t);if(_.firstChild&&"k-paste-container"===_.firstChild.className){var b=[];for(i=0,a=_.childNodes.length;i"))}if(l=_.childNodes,e(l).filter("table").addClass("k-table").end().find("table").addClass("k-table"),e(l).each((function(e,t){o.isBlock(t)&&!o.isSelfClosing(t)&&""===t.innerHTML&&t.appendChild(d.document.createTextNode("\ufeff"))})),h.insertNode(_),m=this.splittableParent(u,f),g){for(;f.parentNode!=m;)o.unwrap(f.parentNode);o.unwrap(f.parentNode)}o.normalize(h.commonAncestorContainer),f.style.display="inline",o.restoreScrollTop(d.document),o.scrollTo(f),p.removeCaret(h);var w=h.commonAncestorContainer.parentNode;(h.collapsed&&"tbody"==o.name(w)||h.collapsed&&"thead"==o.name(w))&&(h.setStartAfter(e(w).closest("table")[0]),h.collapse(!0));var y=e(h.commonAncestorContainer.parentNode).closest("table");if(y.get(0)){for(var k=y.parent().contents(),x=k.length-1,C=k.get(x);null!==C.nodeValue&&(" "===C.nodeValue||""===C.nodeValue);)x-=1,C=k.get(x);C!==y.get(0)||y.parents("table").length||o.insertAfter(o.createEmptyNode(d.document,"p"),y[0])}d.selectRange(h)}}),u=n.extend({init:function(e){this.options=e||{},this.replacements=[]},clean:function(e,t){var n,i,r=t||this.replacements;for(n=0,i=r.length;n]*)>/i,"<$1telerik:script$2>"]},applicable:function(e){return!this.options.none&&/]*>/i.test(e)}}),p=u.extend({init:function(e){u.fn.init.call(this,e);this.replacements=[/]*>\s*<\/span>/gi," ",/\t/gi," ",/    /gi," "]},applicable:function(e){return/    |class="?Apple-tab-span/i.test(e)}}),f=u.extend({init:function(e){u.fn.init.call(this,e),this.junkReplacements=[/<\?xml[^>]*>/gi,"",//g,"",/"/g,"'",/ <\/o:p>/gi," ",/<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi,"",/<\/o>/g,""],this.replacements=this.junkReplacements.concat([/(?:
         [\s\r\n]+|
        )*(<\/?(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)[^>]*>)(?:
         [\s\r\n]+|
        )*/g,"$1",/

        /g,"

        ",/
        \n/g,"
        ",/
        (?!\n)/g," ",/]*)>(\s| )+]*>(\s| )*<\/tr>/gi,"",/]*>(\s| )*<\/tbody>/gi,"",/]*>(\s| )*<\/table>/gi,"",/

        /g,"
        ",/^\s*( )+/gi,"",/( |]*>)+\s*$/gi,"",/mso-[^;"]*;?/gi,"",/<(\/?)b(\s[^>]*)?>/gi,"<$1strong$2>",/<(\/?)font(\s[^>]*)?>/gi,this.convertFontMatch,/<(\/?)i(\s[^>]*)?>/gi,"<$1em$2>",/style=(["|'])\s*\1/g,"",/(]*>)?\n/g,function(e,t){return t?e:" "}])},convertFontMatch:function(e,t,n){var i=/face=['"]([^'"]+)['"]/i.exec(n),r=n&&i&&i[1];return t?"
        ":r?'':""},applicable:function(e){return/class="?Mso/i.test(e)||/style="[^"]*mso-/i.test(e)||/urn:schemas-microsoft-com:office/.test(e)},stripEmptyAnchors:function(e){return e.replace(/]*)>\s*<\/a>/gi,(function(e,t){return!t||t.indexOf("href")<0?"":e}))},listType:function(e,t){var n,i=e.innerHTML,r=o.innerText(e),a=i.match(/^(?:]*texhtml[^>]*>)?]*(?:Symbol|Wingdings)[^>]*>([^<]+)/i),s=a&&a[1],l=/^[a-z\d]/i.test(s),c=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return a&&(n=!0),i=i.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),!n&&/^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(i)||n&&/^.\u00a0+/.test(i)||s&&!l&&t?{tag:"ul",style:this._guessUnorderedListStyle(c(r))}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(i)?{tag:"ol",style:this._guessOrderedListStyle(c(r))}:void 0},_convertToLi:function(e){var t;return 1==e.childNodes.length?(t=e.firstChild.nodeType===o.nodeTypes.TEXT_NODE?o.innerText(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""),t=this._checkForBullet(t)):t=this._getHtmlNoBullet(e),o.remove(e),o.create(document,"li",{innerHTML:t})},_checkForBullet:function(e){var t=o.create(document,"p",{innerHTML:e});return/^\s*\w+[\.\)]\s+/.test(t.innerText)?this._getHtmlNoBullet(t):e},_getHtmlNoBullet:function(e){var t=o.name(e);return o.remove(e.firstChild),3==e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&o.remove(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&o.remove(e.firstChild),"p"!=t?"<"+t+">"+e.innerHTML+"":e.innerHTML},_guessUnorderedListStyle:function(e){return/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(e)?null:/^o/.test(e)?"circle":"square"},_guessOrderedListStyle:function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},extractListLevels:function(e){return e=e.replace(/style=['"]?[^'"]*?mso-list:\s?[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,(function(e,n,i){return t.format('data-list="{0}" data-level="{1}" {2}',n,i,e)}))},_createList:function(e,t){return o.create(document,e,{style:{listStyleType:t}})},lists:function(t){var n,i,r,a,s,c,d,u,h,p,f,m,g,v=e(t).find(o.blockElements.join(",")),_=-1,b={},w=["p","h1","h2","h3","h4","h5","h6"];for(u=0;u_||!m)&&(m=this._createList(p,k.style),b[f][x]=m,i.appendChild(m)),i=this._convertToLi(h),m.appendChild(i),c?r=_=-1:_=f}}}},removeAttributes:function(e){for(var t,n=e.attributes,i=n.length,r=[],a=function(e){(function(e){return["border","background","padding"].filter((function(t){return 0===e.trim().indexOf(t)})).length>0})(e)&&r.push(e.trim())};i--;)"colspan"!=o.name(n[i])&&("style"!==(t=n[i]).name||"TD"!==e.nodeName&&"TH"!==e.nodeName||t.value.split(";").forEach(a),e.removeAttributeNode(n[i]));r.length>0&&e.setAttribute("style",r.join(";"))},createColGroup:function(n){var i=n.cells,r=e(n).closest("table"),o=r.children("colgroup");i.length<2||(o.length&&(i=o.children(),o[0].parentNode.removeChild(o[0])),(o=e(e.map(i,(function(e){var n=e.width;return n&&0!==parseInt(n,10)?t.format('',n):""})).join(""))).is("colgroup")||(o=e("").append(o)),o.prependTo(r))},convertHeaders:function(t){var n,i=t.cells,r=e.map(i,(function(t){var n=e(t).children("p").children("strong")[0];if(n&&"strong"==o.name(n))return n}));if(r.length==i.length){for(n=0;n").end().find("thead").append(t),n=0;nr.cells.length&&(r=n[a]);l.createColGroup(r),l.convertHeaders(i),l.removeAttributes(s[o]),l.removeParagraphs(s.eq(o).find("td,th")),l.removeTextNodes(s.eq(o).find("tr"))}},headers:function(t){for(var n=e(t).find("p.MsoTitle"),i=0;i]*)\s+class="?[^"\s>]*"?/gi,"$1")),e}}),m=u.extend({init:function(e){u.fn.init.call(this,e),this.replacements=[/\s+class="Apple-style-span[^"]*"/gi,"",/<(div|p|h[1-6])\s+style="[^"]*"/gi,"<$1",/^
        (.*)<\/div>$/,"$1"]},applicable:function(e){return/class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(e)}}),g=u.extend({clean:function(e){var t=o.create(document,"div",{innerHTML:e});return(t=this.cleanDom(t)).innerHTML},cleanDom:function(e){return e}}),v=g.extend({cleanDom:function(t){var n=this.collectTags();return e(t).find(n).each((function(){o.unwrap(this)})),t},collectTags:function(){if(this.options.span)return"span"},applicable:function(){return this.options.span}}),_=g.extend({cleanDom:function(t){var n=this.collectAttr();return e(t).find("["+n.join("],[")+"]").removeAttr(n.join(" ")),t},collectAttr:function(){return this.options.css?["class","style"]:[]},applicable:function(){return this.options.css}}),b=function(){this.text="",this.add=function(e){this.text+=e}},w=n.extend({init:function(e){this.separators=e||{text:" ",line:"
        "},this.lines=[],this.inlineBlockText=[],this.resetLine()},appendText:function(e){3===e.nodeType&&(e=e.nodeValue),this.textContainer.add(e)},appendInlineBlockText:function(e){this.inlineBlockText.push(e)},flashInlineBlockText:function(){this.inlineBlockText.length&&(this.appendText(this.inlineBlockText.join(" ")),this.inlineBlockText=[])},endLine:function(){this.flashInlineBlockText(),this.resetLine()},html:function(){var e=this.separators,t="",n=this.lines;this.flashInlineBlockText();for(var i=0,r=n.length,o=r-1;i"}},actions:{ul:e.noop,ol:e.noop,table:e.noop,thead:e.noop,tbody:e.noop,td:function(e,t){var n=new k({all:!0}).cleanDom(t);return e.htmlLines.appendInlineBlockText(n),!0},block:function(e){e.htmlLines.endLine()}}}),x=u.extend({clean:function(e){return this.options.custom(e)},applicable:function(){return"function"==typeof this.options.custom}});c(i,{Clipboard:d,Cleaner:u,ScriptCleaner:h,TabCleaner:p,MSWordFormatCleaner:f,WebkitFormatCleaner:m,HtmlTagsCleaner:v,HtmlAttrCleaner:_,HtmlContentCleaner:k,HtmlTextLines:w,CustomCleaner:x})}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,r=i.RangeUtils,o=i.Dom,a=i.RestorePoint,s=i.Marker,l=t.support.browser,c="\ufeff",d=e.extend,u=o.nodeTypes,h="previousSibling";function p(e,t,n){for(var i=e?e[t]:null;i&&!n(i);)i=i[t];return i}var f="td,th,caption",m="table,tbody,thead,tfoot,tr",g=function(t){return!t.collapsed&&e(t.commonAncestorContainer).is(m)},v=n.extend({remove:function(t){var n=new s;n.add(t,!1);var i=r.getAll(t,(function(t){return e(t).is("table,tbody,thead,tfoot,tr,td,th,caption")})),a=r.documentFromRange(t),l=n.start,c=n.end,d=f.split(","),u=o.parentOfType(l,d),h=o.parentOfType(c,d);this._removeContent(l,u,!0),this._removeContent(c,h,!1),e(i).each((function(t,n){((n=e(n)).is(f)?n:n.find(f)).each((function(e,t){t.innerHTML=""}))})),u&&!l.previousSibling&&o.insertBefore(a.createTextNode("\ufeff"),l),h&&!c.nextSibling&&o.insertAfter(a.createTextNode("\ufeff"),c),u?t.setStartBefore(l):i[0]&&(u=(u=e(i[0])).is(f)?u:u.find(f).first()).length&&t.setStart(u.get(0),0),t.collapse(!0),o.remove(l),o.remove(c)},_removeContent:function(t,n,i){if(n){var r,a=i?"nextSibling":"previousSibling",s=function(t){for(;t&&!t[a];)t=t.parentNode;return t&&e.contains(n,t)?t[a]:null};for(t=s(t);t;)r=s(t),o.remove(t),t=r}}}),_=n.extend({init:function(e){this.editor=e},keydown:function(t){var n=this,r=n.editor,o=r.keyboard,s=o.isTypingKey(t),c=d(e.Event(),t);if(n.editor.trigger("keydown",c),c.isDefaultPrevented())return t.preventDefault(),!0;if(!c.isDefaultPrevented()&&s&&!o.isTypingInProgress()){var u=r.getRange(),h=r.body;if(n.startRestorePoint=new a(u,h),g(u))new v(r).remove(u),r.selectRange(u);if(l.webkit&&!u.collapsed&&function(e,t){return t.startContainer===e&&t.endContainer===e&&0===t.startOffset&&t.endOffset==e.childNodes.length}(h,u)&&(h.innerHTML=""),r.immutables&&i.Immutables.immutablesContext(u))new i.BackspaceHandler(r).deleteSelection(u);return o.startTyping((function(){n._removeBomSpan(),n.endRestorePoint=i._finishUpdate(r,n.startRestorePoint)})),!0}return!1},keyup:function(e){var t=this.editor.keyboard;return this.editor.trigger("keyup",e),!!t.isTypingInProgress()&&(t.endTyping(),!0)},_removeBomSpan:function(){var e=this.editor.getRange().commonAncestorContainer;o.emptyNode(e)||(3===e.nodeType&&(e=e.parentNode),o.insignificant(e)&&(e.textContent=o.stripBom(e.textContent),o.unwrap(e)))}}),b=n.extend({init:function(e){this.editor=e},_addCaret:function(e){var n=o.create(this.editor.document,"a");return!t.support.browser.chrome&&e.firstChild&&e.firstChild.nodeType===u.ELEMENT_NODE&&(e=e.firstChild),o.insertAt(e,n,0),o.stripBomNode(n.previousSibling),o.stripBomNode(n.nextSibling),n},_restoreCaret:function(e){var t=this.editor.createRange();!e.nextSibling&&o.isDataNode(e.previousSibling)?t.setStart(e.previousSibling,e.previousSibling.length):t.setStartAfter(e),t.collapse(!0),this.editor.selectRange(t),o.remove(e)},_handleDelete:function(e){var t=e.endContainer,n=o.closestEditableOfType(t,o.blockElements);if(n&&i.RangeUtils.isEndOf(e,n)){var r=o.next(n);if(!r||"p"!=o.name(r))return!1;var a=o.significantChildNodes(r)[0];a=a&&o.isInline(a)?a:r;var s=this._addCaret(a);return this._merge(n,r),this._restoreCaret(s),!0}return!1},_cleanBomBefore:function(e){for(var t=e.startOffset,n=e.startContainer,i=n.nodeValue,r=0;t-r>=0&&"\ufeff"==i[t-r-1];)r++;r>0&&(n.deleteData(t-r,r),e.setStart(n,Math.max(0,t-r)),e.collapse(!0),this.editor.selectRange(e))},_handleBackspace:function(t){var n,r=t.startContainer,a=o.closestEditableOfType(r,["li"]),s=o.closestEditableOfType(r,"p,h1,h2,h3,h4,h5,h6".split(",")),l=this.editor;if(o.isDataNode(r)){if(t.collapsed&&/^\s[\ufeff]+$/.test(r.nodeValue))return t.setStart(r,0),t.setEnd(r,r.length),l.selectRange(t),!1;this._cleanBomBefore(t)}n=p(s,h,(function(e){return!o.htmlIndentSpace(e)})),t.collapsed&&t.startOffset!==t.endOffset&&t.startOffset<0&&(t.startOffset=0,t.endOffset=0,l.selectRange(t));var c=a&&i.RangeUtils.isStartOf(t,a),d=a&&e(a).index(),u=c&&d>0;if(u&&(s=a,n=o.prev(a)),s&&n&&o.is(n,"table")&&i.RangeUtils.isStartOf(t,s))return""===s.innerText&&(s.innerHTML="\ufeff"),!0;if(i.RangeUtils.isStartOf(t,s)&&parseInt(s.style.marginLeft,10)>0)return l.exec("outdent"),!0;if(s&&n&&i.RangeUtils.isStartOf(t,s)||u){var f=o.significantChildNodes(s)[0];f=f&&o.isInline(f)?f:s;var m=this._addCaret(f);return this._merge(n,s),this._restoreCaret(m),!0}if(c&&0===d){var g=a.firstChild;g||(a.innerHTML=i.emptyElementContent,g=a.firstChild);var v=new i.ListFormatter(o.name(a.parentNode),"p");return t.selectNodeContents(a),v.toggle(t),o.insignificant(g)?t.setStartBefore(g):t.setStart(g,0),l.selectRange(t),!0}var _=r.childNodes[t.startOffset-1],b=t,w=_&&o.closestEditableOfType(_,["a"]),y=p(_||r,h,(function(e){return!o.isDataNode(e)||!o.isBom(e)&&e.length>0}));if((w||(0===t.startOffset||_)&&o.is(y,"a"))&&(w=w||y,(b=l.createRange()).setStart(w,w.childNodes.length),b.collapse(!0)),(w=w||o.closestEditableOfType(_||b.startContainer,["a"]))&&i.RangeUtils.isEndOf(b,w)){var k=new i.UnlinkCommand({range:b,body:l.body,immutables:!!l.immutables});l.execCommand(k),l._selectionChange()}return!1},_handleSelection:function(t){var n,r=t.commonAncestorContainer,a=o.closest(r,"table"),l=i.emptyElementContent,c=this.editor;if(g(t))return new v(c).remove(t),c.selectRange(t),!0;var d=new s;d.add(t,!1),t.commonAncestorContainer===c.body&&this._surroundFullyContent(d,t),c.immutables&&this._handleImmutables(d),this._surroundFullySelectedAnchor(d,t),t.setStartAfter(d.start),t.setEndBefore(d.end);var u=t.startContainer,h=t.endContainer;return t.deleteContents(),"li"===h.tagName.toLocaleLowerCase()&&o.emptyNode(h)&&(t.selectNode(h),t.deleteContents()),a&&""===e(a).text()&&(t.selectNode(a),t.deleteContents()),r=t.commonAncestorContainer,"p"===o.name(r)&&""===r.innerHTML&&(r.innerHTML=l,t.setStart(r,0)),this._join(u,h),o.insertAfter(c.document.createTextNode("\ufeff"),d.start),d.remove(t),u=t.startContainer,"tr"==o.name(u)&&(u=u.childNodes[Math.max(0,t.startOffset-1)],t.setStart(u,o.getNodeLength(u))),t.collapse(!0),c.selectRange(t),n=u.parentElement||u.parentNode,o.isDataNode(u)&&!o.emptyNode(n)&&this._cleanBomBefore(t),!0},_handleImmutables:function(e){var t=i.Immutables.immutableParent,n=t(e.start),r=t(e.start);n&&o.insertBefore(e.start,n),r&&o.insertAfter(e.end,r),n&&o.remove(n),r&&r.parentNode&&o.remove(r)},_surroundFullyContent:function(e,t){var n=t.commonAncestorContainer.children,i=n[0],r=n[n.length-1];this._moveMarker(e,t,i,r)},_surroundFullySelectedAnchor:function(t,n){var i=t.start,r=e(i).closest("a").get(0),o=t.end,a=e(o).closest("a").get(0);this._moveMarker(t,n,r,a)},_moveMarker:function(e,t,n,i){var a=e.start,s=e.end;n&&r.isStartOf(t,n)&&o.insertBefore(a,n),i&&r.isEndOf(t,i)&&o.insertAfter(s,i)},_root:function(e){for(;e&&"body"!=o.name(e)&&e.parentNode&&"body"!=o.name(e.parentNode);)e=e.parentNode;return e},_join:function(e,t){(e=this._root(e))!=(t=this._root(t))&&o.is(t,"p")&&this._merge(e,t)},_merge:function(e,t){for(o.removeTrailingBreak(e);e&&t.firstChild;)1==e.nodeType?(e=o.list(e)?e.children[e.children.length-1]:e)&&e.appendChild(t.firstChild):e.nodeType===u.TEXT_NODE?this._mergeWithTextNode(e,t.firstChild):e.parentNode.appendChild(t.firstChild);o.remove(t)},_mergeWithTextNode:function(e,t){e&&e.nodeType===u.TEXT_NODE&&(e.nextSibling&&this._isCaret(e.nextSibling)?o.insertAfter(t,e.nextSibling):o.insertAfter(t,e))},_isCaret:function(t){return e(t).is("a")},keydown:function(e){var n,r,o=this.editor,s=o.getRange(),l=e.keyCode,c=t.keys,d=l===c.BACKSPACE,u=l==c.DELETE;o.immutables&&o.immutables.keydown(e,s)||(!d&&!u||s.collapsed?d?n="_handleBackspace":u&&(n="_handleDelete"):n="_handleSelection",n&&(r=new a(s,o.body),this[n](s)&&(e.preventDefault(),i._finishUpdate(o,r))))},deleteSelection:function(e){this._handleSelection(e)},keyup:e.noop}),w=n.extend({init:function(e){this.editor=e,this.systemCommandIsInProgress=!1},createUndoCommand:function(){this.startRestorePoint=this.endRestorePoint=i._finishUpdate(this.editor,this.startRestorePoint)},changed:function(){return!!this.startRestorePoint&&this.startRestorePoint.html!=this.editor.body.innerHTML},keydown:function(e){var t=this,n=t.editor,i=n.keyboard;return i.isModifierKey(e)?(i.isTypingInProgress()&&i.endTyping(!0),t.startRestorePoint=new a(n.getRange(),n.body),!0):!!i.isSystem(e)&&(t.systemCommandIsInProgress=!0,t.changed()&&(t.systemCommandIsInProgress=!1,t.createUndoCommand()),!0)},keyup:function(){var e=this;return!(!e.systemCommandIsInProgress||!e.changed())&&(e.systemCommandIsInProgress=!1,e.createUndoCommand(),!0)}}),y=n.extend({init:function(e){this.editor=e},keydown:function(e){!l.webkit||e.isDefaultPrevented()||!e.ctrlKey||65!=e.keyCode||e.altKey||e.shiftKey||(this.editor.options.immutables&&this._toSelectableImmutables(),this._selectEditorBody())},_selectEditorBody:function(){var e=this.editor,t=e.getRange();t.selectNodeContents(e.body),setTimeout((function(){e.selectRange(t)}))},_toSelectableImmutables:function(){for(var t=this.editor.body,n=i.Immutables.immutable,r=o.emptyTextNode,a=t.firstChild,s=t.lastChild;r(a);)a=a.nextSibling;for(;r(s);)s=s.previousSibling;a&&n(a)&&e(c).prependTo(t),s&&n(s)&&e(c).appendTo(t)},keyup:e.noop}),k=n.extend({init:function(e){this.handlers=e,this.typingInProgress=!1},isCharacter:function(e){return e>=48&&e<=90||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||229==e},toolFromShortcut:function(t,n){var i,r,o=String.fromCharCode(n.keyCode),a=this._getShortcutModifier(n,navigator.platform);for(i in t)if(((r=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options)).key==o||r.key==n.keyCode)&&r.ctrl==a&&r.alt==n.altKey&&r.shift==n.shiftKey)return i},_getShortcutModifier:function(e,t){return t.toUpperCase().indexOf("MAC")>=0?e.metaKey:e.ctrlKey},toolsFromShortcut:function(t,n){var i,r,o=String.fromCharCode(n.keyCode),a=[],s=function(e){return e==o||e==n.keyCode||e==n.charCode};for(i in t)r=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),(Array.isArray(r.key)?e.grep(r.key,s).length>0:s(r.key))&&r.ctrl==n.ctrlKey&&r.alt==n.altKey&&r.shift==n.shiftKey&&a.push(t[i]);return a},isTypingKey:function(e){var t=e.keyCode;return this.isCharacter(t)&&!e.ctrlKey&&!e.altKey||32==t||13==t||8==t||46==t&&!e.shiftKey&&!e.ctrlKey&&!e.altKey},isModifierKey:function(e){var t=e.keyCode;return 17==t&&!e.shiftKey&&!e.altKey||16==t&&!e.ctrlKey&&!e.altKey||18==t&&!e.ctrlKey&&!e.shiftKey},isSystem:function(e){return 46==e.keyCode&&e.ctrlKey&&!e.altKey&&!e.shiftKey},startTyping:function(e){this.onEndTyping=e,this.typingInProgress=!0},stopTyping:function(){this.typingInProgress&&this.onEndTyping&&this.onEndTyping(),this.typingInProgress=!1},endTyping:function(e){var t=this;t.clearTimeout(),e?t.stopTyping():t.timeout=window.setTimeout(t.stopTyping.bind(t),1e3)},isTypingInProgress:function(){return this.typingInProgress},clearTimeout:function(){window.clearTimeout(this.timeout)},notify:function(e,t){var n,i=this.handlers;for(n=0;n0)for(n=0;nt.clientHeight?e.support.scrollbar():0},calculatePercentageRatio:function(e,t){return p(e)?a(e):a(e)/t*100},inPercentages:p,inPixels:function(e){return typeof e===h&&u.test(e)},toPercentages:function(e){return a(e)+"%"},toPixels:function(e){return a(e)+"px"}}})}(window.kendo),function(e,t){var n=e.jQuery,i=n.extend,r=n.noop,o=e.ui.editor,a=e.Class,s="keydown",l="mouseleave",c="mouseup",d="table",u=a.extend({init:function(e,t){var r=this;r.options=i({},r.options,t),r.options.tags=Array.isArray(r.options.tags)?r.options.tags:[r.options.tags],n(e).is(d)&&(r.element=e,r._attachEventHandlers())},destroy:function(){var e=this,t=e.options.eventNamespace;e.element&&(n(e.element).off(t),e.element=null),n(e.options.rootElement).off(s+t),e._destroyResizeHandle()},options:{tags:[],min:0,rootElement:null,eventNamespace:"",rtl:!1,handle:{dataAttribute:"",height:0,width:0,classNames:{},template:""}},_attachEventHandlers:function(){var e=this,t=e.options;n(e.element).on("mousemove"+t.eventNamespace,t.tags.join(","),e.detectElementBorderHovering.bind(e))},resizingInProgress:function(){var e=this._resizable;return!!e&&!!e.resizing},resize:r,detectElementBorderHovering:function(e){var t=this,i=t.options.handle,r=n(e.currentTarget),o=t.resizeHandle,a=i.dataAttribute;t.resizingInProgress()||(!r.is(":last-child")&&t.elementBorderHovered(r,e)?o?o.data(a)&&o.data(a)!==r[0]&&t.showResizeHandle(r,e):t.showResizeHandle(r,e):o&&t._destroyResizeHandle())},elementBorderHovered:r,showResizeHandle:function(e,t){var n=this;0===t.buttons&&(n._initResizeHandle(),n.setResizeHandlePosition(e),n.setResizeHandleDimensions(),n.setResizeHandleDataAttributes(e[0]),n._attachResizeHandleEventHandlers(),n._initResizable(e),n._hideResizeMarker(),n.resizeHandle.show())},_initResizeHandle:function(){var e=this,t=e.options;e._destroyResizeHandle(),e.resizeHandle=n(t.handle.template).appendTo(t.rootElement)},setResizeHandlePosition:r,setResizeHandleDimensions:r,setResizeHandleDataAttributes:function(e){this.resizeHandle.data(this.options.handle.dataAttribute,e)},_attachResizeHandleEventHandlers:function(){var e=this,t=e.options,n=t.eventNamespace,i=t.handle.classNames.marker,r=e.resizeHandle;e.resizeHandle.on("mousedown"+n,(function(){r.find("."+i).show()})).on(c+n,(function(){r.find("."+i).hide()}))},_hideResizeMarker:function(){this.resizeHandle.find("."+this.options.handle.classNames.marker).hide()},_destroyResizeHandle:function(){var e=this;e.resizeHandle&&(e._destroyResizable(),e.resizeHandle.off(e.options.eventNamespace).remove(),e.resizeHandle=null)},_initResizable:function(t){var n=this;n.resizeHandle&&(n._destroyResizable(),n._resizable=new e.ui.Resizable(t,{draggableElement:n.resizeHandle[0],start:n.onResizeStart.bind(n),resize:n.onResize.bind(n),resizeend:n.onResizeEnd.bind(n)}))},_destroyResizable:function(){var e=this;e._resizable&&(e._resizable.destroy(),e._resizable=null)},onResizeStart:function(){this._disableKeyboard()},onResize:function(e){this.setResizeHandleDragPosition(e)},setResizeHandleDragPosition:r,onResizeEnd:function(e){var t=this;t.resize(e),t._destroyResizeHandle(),t._enableKeyboard()},_enableKeyboard:function(){var e=this.options;n(e.rootElement).off(s+e.eventNamespace)},_disableKeyboard:function(){var e=this.options;n(e.rootElement).on(s+e.eventNamespace,(function(e){e.preventDefault()}))},_forceResizing:function(e){var t=this._resizable;t&&t.userEvents&&t.userEvents._end(e)}}),h=a.extend({create:function(e,t){var i=this,r=t.name,o=t.eventNamespace;n(e.body).on("mouseenter"+o,d,(function(n){var o=n.currentTarget,a=e[r];n.stopPropagation(),a?a.element===o||a.resizingInProgress()||(i._destroyResizing(e,t),i._initResizing(e,o,t)):i._initResizing(e,o,t)})).on(l+o,d,(function(o){var a,s=e[r];o.stopPropagation(),!s||s.resizingInProgress()||s.resizeHandle||(a=n(s.element).parents(d)[0])&&(i._destroyResizing(e,t),i._initResizing(e,a,t))})).on(l+o,(function(){var n=e[r];n&&!n.resizingInProgress()&&i._destroyResizing(e,t)})).on(c+o,(function(o){var a,s=e[r];s&&s.resizingInProgress()&&(a=n(o.target).parents(d)[0])&&(s._forceResizing(o),i._destroyResizing(e,t),i._initResizing(e,a,t))}))},dispose:function(e,t){n(e.body).off(t.eventNamespace)},_initResizing:function(t,n,i){var r=i.name,o=i.type;t[r]=new o(n,{rtl:e.support.isRtl(t.element),rootElement:t.body})},_destroyResizing:function(e,t){var n=t.name;e[n]&&(e[n].destroy(),e[n]=null)}});h.current=new h,u.create=function(e,t){h.current.create(e,t)},u.dispose=function(e,t){h.current.dispose(e,t)},i(o,{TableElementResizing:u})}(window.kendo),function(e,t){var n=window.Math.abs,i=e.jQuery,r=i.extend,o=e.ui.editor,a=o.Dom,s=o.TableElementResizing,l=o.ResizingUtils,c=l.constrain,d=l.calculatePercentageRatio,u=l.getScrollBarWidth,h=l.inPercentages,p=l.toPercentages,f=l.toPixels,m=e._outerWidth,g=".kendoEditorColumnResizing",v="k-column-resize-handle",_="k-column-resize-marker",b="body",w="tbody",y="thead",k="tr",x="col-index",C=",",S=s.extend({options:{tags:["td","th"],min:20,rootElement:null,eventNamespace:g,rtl:!1,handle:{dataAttribute:"column",width:10,height:0,classNames:{handle:v,marker:_},template:'
        '}},elementBorderHovered:function(e,t){var n=this.options,r=n.handle.width,o=e.offset().left+(n.rtl?0:m(e)),a=t.clientX+i(e[0].ownerDocument).scrollLeft();return a>o-r&&a=85)&&(d*=-1),n.resizeHandle.css({top:g+c,left:f+h+(d-p)-s/2,position:"absolute"})},setResizeHandleDimensions:function(){var e=this,t=i(e.element).children(y),n=i(e.element).children(w),r=t.length>0?t.height()+n.height():n.height();e.resizeHandle.css({width:e.options.handle.width,height:r})},setResizeHandleDragPosition:function(t){var n=this,r=i(i(t.currentTarget).data(n.options.handle.dataAttribute)),o=n.options,a=i(o.rootElement),s=o.handle?o.handle.width:0,l=o.min,d=o.rtl,h=m(r),p=r.offset().left-(a.offset().left+parseFloat(a.css("borderLeftWidth")))-parseFloat(r.css("marginLeft")),f=m(r.next()),g=i(n.resizeHandle),v=a.is(b)?0:e.scrollLeft(a),_=d?u(a[0]):0,w=g.offset().left-(a.offset().left+parseFloat(a.css("borderLeftWidth")))-parseFloat(g.css("marginLeft")),y=e.support.browser;d&&(y.mozilla||y.webkit&&y.version>=85)&&(v*=-1);var k=c({value:w+(v-_)+t.x.delta,min:p+(v-_)-(d?f:0)+l,max:p+h+(v-_)+(d?0:f)-s-l});g.css({left:k})},resize:function(e){var t,n,r,o,s,l=this,d=i(i(e.currentTarget).data(l.options.handle.dataAttribute)),u=l.options,h=u.rtl?-1:1,p=u.min,f=h*e.x.initialDelta;a.reMapTableColumns(l.element,x),o=parseInt(d.attr(x),10),d.prop("colSpan")>1&&(d=i(l.element).find("[col-index="+(o+d.prop("colSpan")-1)+"]").eq(0),o=parseInt(d.attr(x),10)),s=i(l.element).find("[col-index="+(o+1)+"]:not([colspan])"),l._setTableComputedWidth(),l._setColumnsComputedWidth(),r=m(d),n=m(s),t=c({value:r+f,min:p,max:r+n-p}),l._resizeColumn(d[0],t),l._resizeTopAndBottomColumns(d[0],t),l._resizeAdjacentColumns(parseInt(d.attr(x),10),n,r,r-t),a.clearTableMappings(l.element,x)},_setTableComputedWidth:function(){var e=this.element;""===e.style.width&&(e.style.width=f(m(i(e))))},_setColumnsComputedWidth:function(){var e,t=i(this.element.tHead||this.element.tBodies[0]),n=m(t),r=t.children(k).children("td"),o=r.length,a=r.map((function(){return m(i(this))}));for(e=0;e
        '}},elementBorderHovered:function(e,t){var n=this.options.handle.height,r=e.offset().top+f(e),o=t.clientY+i(e[0].ownerDocument).scrollTop();return o>r-n&&o=85)&&(s*=-1),this.resizeHandle.css({top:u+f(t)+a-r/2,left:d+(s-c),position:"absolute"})},setResizeHandleDimensions:function(){var e=this,t=i(e.element.tHead||e.element.tBodies[0]);e.resizeHandle.css({width:t.width(),height:e.options.handle.height})},setResizeHandleDragPosition:function(e){var t=this,n=t.options,r=n.min,o=i(t.element).children(y),a=i(t.element).children(w),s=o.length>0?o:a,l=i(t.resizeHandle),d=i(e.currentTarget).data(n.handle.dataAttribute),u=i(d),h=i(n.rootElement),p=h.is(_)?0:h.scrollTop(),m=s.offset().top-(h.offset().top+parseFloat(h.css("borderTopWidth")))-parseFloat(s.css("marginTop")),g=u.offset().top-(h.offset().top+parseFloat(h.css("borderTopWidth")))-parseFloat(u.css("marginTop")),v=l.offset().top-(Math.max(0,h.offset().top)+parseFloat(h.css("borderTopWidth")))-parseFloat(l.css("marginTop")),b=c({value:v+p+e.y.delta,min:g+p+r,max:m+f(o)+f(a)+p-n.handle.height-r});l.css({top:b})},resize:function(e){var t=this,r=t.options,o=i(e.currentTarget).data(r.handle.dataAttribute),a=f(i(o)),s=i(t.element),l=f(s),d=s.children(y),h=d.length>0?d.height():0,m=s.children(w).height(),g=o.style.height,v=c({value:a+e.y.initialDelta,min:r.min,max:n(h+m-r.min)});t._setRowsHeightInPixels(),o.style.height=p(v),t._setTableHeight(l+(v-a)),u(g)&&t._setRowsHeightInPercentages()},_setRowsHeightInPixels:function(){var e,t=i(this.element).children("tbody,thead").children(b),n=t.length,r=t.map((function(){return f(i(this))}));for(e=0;e0?n.height():0,o=i(t.element).children(w).height(),a=i(t.element).children("thead,tbody").children(b),s=a.length,l=a.map((function(){return f(i(this))}));for(e=0;e
        "},events:[f,m,g,_,b],show:function(){this._setPosition()},_setPosition:function(){var e=this._positioningStrategy.getPosition();n(this.element).css({top:e.top,left:e.left,position:"absolute"})},_attachEventHandlers:function(){var e=this;n(e.element).on(_+h,e._onMouseOver.bind(e)).on(b+h,e._onMouseOut.bind(e))},_onMouseOver:function(){this.trigger(_)},_onMouseOut:function(){this.trigger(b)},_addStyles:function(){n(this.element).children("."+p).addClass("k-resize-"+this.options.direction)},_initPositioningStrategy:function(){var e=this,t=e.options;e._positioningStrategy=E.create({name:t.direction,handle:e.element,resizableElement:t.resizableElement,rootElement:t.rootElement,rtl:t.rtl})},_initDraggable:function(){var e=this,t=e.element;!e._draggable&&t&&(e._draggable=new s(t,{dragstart:e._onDragStart.bind(e),drag:e._onDrag.bind(e),dragend:e._onDragEnd.bind(e)}))},_onDragStart:function(){this.trigger(f)},_onDrag:function(e){this.trigger(m,this._draggingStrategy.adjustDragDelta({deltaX:e.x.delta,deltaY:e.y.delta,initialDeltaX:e.x.initialDelta,initialDeltaY:e.y.initialDelta}))},_onDragEnd:function(){this.trigger(g)},_destroyDraggable:function(){var e=this;e._draggable&&(e._draggable.destroy(),e._draggable=null)},_initDraggingStrategy:function(){this._draggingStrategy=N.create({name:this.options.direction})}}),z=a.extend({init:function(){this._items=[]},register:function(e,t){this._items.push({name:e,type:t})},create:function(e){var t,n,i,r=this._items,o=r.length,a=e.name?e.name.toLowerCase():"";for(i=0;i=85)&&(i*=-1),{top:t.top+(o.scrollTop()||0),left:t.left+i-a})}});E.create=function(e){return M.current.create(e)};var A=E.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top+u(e)/2,left:t.left+d(e)+i}}});M.current.register(w,A);var H=E.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top,left:t.left+d(e)/2+i}}});M.current.register(y,H);var R=E.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top,left:t.left+d(e)+i}}});M.current.register(k,R);var F=E.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top,left:t.left+i}}});M.current.register(x,F);var P=E.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top+u(e),left:t.left+d(e)/2+i}}});M.current.register(C,P);var B=E.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top+u(e),left:t.left+d(e)+i}}});M.current.register(S,B);var L=E.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top+u(e),left:t.left+i}}});M.current.register(T,L);var V=E.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top+u(e)/2,left:t.left+i}}});M.current.register(D,V);var O=z.extend({});O.current=new O;var N=a.extend({init:function(e){this.options=i({},this.options,e)},options:{deltaX:{adjustment:null,modifier:null},deltaY:{adjustment:null,modifier:null}},adjustDragDelta:function(e){var t=this.options,n=t.deltaX.adjustment*t.deltaX.modifier,i=t.deltaY.adjustment*t.deltaY.modifier;return{deltaX:e.deltaX*n,deltaY:e.deltaY*i,initialDeltaX:e.initialDeltaX*n,initialDeltaY:e.initialDeltaY*i}}});N.create=function(e){return O.current.create(e)};var W=N.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:0,modifier:0}}}),U=W.extend({options:{deltaX:{modifier:1}}});O.current.register(w,U);var j=W.extend({options:{deltaX:{modifier:-1}}});O.current.register(D,j);var q=N.extend({options:{deltaX:{adjustment:0,modifier:0},deltaY:{adjustment:1,modifier:1}}}),G=q.extend({options:{deltaY:{modifier:-1}}});O.current.register(y,G);var K=q.extend({options:{deltaY:{modifier:1}}});O.current.register(C,K);var Y=N.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:1,modifier:1}}}),$=Y.extend({options:{deltaX:{modifier:1},deltaY:{modifier:-1}}});O.current.register(k,$);var Q=Y.extend({options:{deltaX:{modifier:-1},deltaY:{modifier:-1}}});O.current.register(x,Q);var X=Y.extend({options:{deltaX:{modifier:1},deltaY:{modifier:1}}});O.current.register(S,X);var Z=Y.extend({options:{deltaX:{modifier:-1},deltaY:{modifier:1}}});O.current.register(T,Z),i(o,{ElementResizeHandle:I})}(window.kendo),function(e,t){var n=window.Math,i=n.min,r=n.max,o=e.jQuery,a=o.contains,s=o.extend,l=e.support.browser,c=e.ui.editor,d=e.Class,u=c.ElementResizeHandle,h=c.ResizingUtils,p=h.calculatePercentageRatio,f=h.constrain,m=h.inPercentages,g=h.inPixels,v=h.toPercentages,_=h.toPixels,b=e._outerWidth,w=e._outerHeight,y=c.RangeUtils,k=".kendoEditorElementResizing",x="k-element-resize-handle-wrapper",C="k-element-resizing",S="dragStart",T="drag",D="dragEnd",I="keydown",z="mousedown",M="select",E="tr",A="tbody",H="thead",R="table",F=["TABLE","IMG"],P="width",B="height";function L(e){return void 0===e}var V=d.extend({init:function(e,t){var n=this;n.options=s({},n.options,t),n.handles=[],F.indexOf(e.nodeName)>=0&&(n.element=e)},destroy:function(){var e=this;o(e.element).off(k),e.element=null,o(e.options.rootElement).off(I+k),e._destroyResizeHandles()},options:{appendHandlesTo:null,rtl:!1,rootElement:null,minWidth:10,minHeight:10,handles:[{direction:"northwest"},{direction:"north"},{direction:"northeast"},{direction:"east"},{direction:"southeast"},{direction:"south"},{direction:"southwest"},{direction:"west"}]},resize:function(e){var t=this,n=s({},{deltaX:0,deltaY:0,initialDeltaX:0,initialDeltaY:0},e);t._resizeWidth(n.deltaX,n.initialDeltaX),t._resizeHeight(n.deltaY,n.initialDeltaY),t.showResizeHandles()},_resizeWidth:function(){return!1},_resizeHeight:function(){return!1},_getMaxDimensionValue:function(t){var n=this,i=o(n.element),r=t.toLowerCase(),a=n.options.rtl?-1:1,s=o(n.element).parent(),l=s[0],c=s[r](),d=a*(t===P?e.scrollLeft(s):s.scrollTop());return l&&l===i.closest("td")[0]?""!==l.style[r]||m(n.element.style[r])?c+d:1/0:c+d},showResizeHandles:function(){this._initResizeHandles(),this._showResizeHandles()},_initResizeHandles:function(){var e,t=this,n=t.handles,i=t.options,r=t.options.handles,o=r.length;if(!(n&&n.length>0)){for(e=0;eg?(a=r(l,g),s=i(l,g)):(a=i(l,g),s=r(l,g)),n=v(p(a,s))):n=_(l),c._setColumnsWidth(),d[0].style.width=n)},_resizeHeight:function(e,t){var n,a,s,l,c=this,d=o(c.element),u=d[0].style.height,h=w(d),g=d.parent().height(),b=c._getMaxDimensionValue(B),y=c.options.minHeight,k=c._hasRowsInPixels();0!==e&&(L(c._initialElementHeight)&&(c._initialElementHeight=h),l=f({value:c._initialElementHeight+t,min:y,max:b}),k&&e<0&&c._setRowsHeightInPercentages(),m(u)?(h+e>g?(a=r(l,g),s=i(l,g)):(a=i(l,g),s=r(l,g)),n=v(p(a,s))):n=_(l),d[0].style.height=n,k&&e<0&&c._setRowsHeightInPixels())},_setColumnsWidth:function(){var e,t=o(this.element),n=t.parent()[0],i=t.closest("td"),r=i.closest(E).children(),a=r.length;if(function(e){var t=e.style.width;return""!==t?!!m(t):!!o(e).hasClass("k-table")}(t[0])&&n===i[0]&&""===n.style.width)for(e=0;e0?n.height():0,r=o(t.element).children(A).height(),a=o(t.element).children("thead,tbody").children(E),s=a.length,l=a.map((function(){return w(o(this))}));for(e=0;e1&&e.elementResizing._destroyResizeHandles()})).on("drop"+k,(function(){setTimeout((function(){var t=y.image(e.getRange());t&&(e.elementResizing._destroyResizeHandles(),e.elementResizing.element=t,e.elementResizing.showResizeHandles())}))})).on(z+k,"table,img",(function(n){var i=n.target,r=n.currentTarget,o=e.elementResizing,s=o?o.element:null;if(o){if(s&&r!==s){if(a(r,s)&&s!==i&&a(s,i))return;s!==i&&(e._destroyElementResizing(),t._initResizing(e,r))}}else t._initResizing(e,r);e._showElementResizeHandles()})).on(z+k,(function(t){var n=e.elementResizing,i=n?n.element:null,r=t.target,s=o(r).hasClass(x)||o(r).parents("."+x).length>0;!n||i===r||a(i,r)||s||e._destroyElementResizing()}))},dispose:function(e){o(e.body).off(k)},_initResizing:function(t,n){l.msie||(o(n).is(R)?t.elementResizing=t.tableResizing=new O(n,{appendHandlesTo:t.body,rtl:e.support.isRtl(t.element),rootElement:t.body}):o(n).is("img")&&(t.elementResizing=new N(n,{appendHandlesTo:t.body,rtl:e.support.isRtl(t.element),rootElement:t.body})),t._showElementResizeHandlesProxy&&(t.unbind(M,t._showElementResizeHandlesProxy),t.bind(M,t._showElementResizeHandlesProxy)))}});W.current=new W,s(c,{TableResizing:O,ImageResizing:N,ElementResizing:V,ElementResizingFactory:W})}(window.kendo),function(e,t){var n=window.kendo,i=n.ui.editor,r=i.EditorUtils,o=i.RangeUtils,a=i.Dom,s=r.registerTool,l=i.Command,c=new i.BlockFormatFinder([{tags:["table"]}]),d=new i.BlockFormatFinder([{tags:["td","th"]}]),u=/([a-z]+|%)$/i,h="scope",p="col-index",f="th",m="td",g=l.extend({exec:function(){var e=this,r=e.editor,o=e.range=e.lockRange(),a=e.options.tableCellWizard,s=e._sourceTable=e.options.insertNewTable?t:e._selectedTable(o),l=e._selectedTableCells=s?e._selectedCells(o):t,c={visible:!1,messages:r.options.messages,closeCallback:e.onDialogClose.bind(e),table:e.parseTable(s,l),dialogOptions:r.options.dialogOptions,isRtl:n.support.isRtl(r.wrapper)};new i.TableWizardDialog(c).open(a)},onDialogClose:function(e){var t=this;t.releaseRange(t.range),e&&(t.options.insertNewTable?t.insertTable(t.createNewTable(e)):t.updateTable(e,t._sourceTable,t._selectedTableCells))},releaseRange:function(e){var t=this.editor.document;a.windowFromDocument(t).focus(),l.fn.releaseRange.call(this,e)},insertTable:function(e){var t=this.range;t.insertNode(e),t.collapse(!0),this.editor.selectRange(t),this._ensureFocusableAfterTable(e)},_ensureFocusableAfterTable:function(t){for(var n=e(t).parent().contents(),i=n.length-1,r=n.get(i);null!==r.nodeValue&&(" "===r.nodeValue||""===r.nodeValue);)i-=1,r=n.get(i);r===t&&a.insertAfter(a.createEmptyNode(this.editor.document,"p"),t)},updateTable:function(t,n,i){for(var r,o,s=this,l=e(n.rows).toArray(),c=t.tableProperties,d=c.rows,u=n.tHead,h=s._lastInCollection;i.length>1;)i.pop();r=i.length?h(i).parentNode:h(l),s._deleteTableRows(l,l.length-d),l.length-1};return n.each((function(e,t){t.id&&a.is(t,f)&&i.push(t.id)})),!!n.filter((function(e,t){var n,i=t.getAttribute("headers");return!!(i&&!a.is(t,f)&&(n=i.split(" "))&&n.length>0)&&n.some(r)})).length},_insertCells:function(e,t,n){n=isNaN(n)?-1:n;for(var i=0;i0&&(t=o.createTHead(),n._createTableRows(e,t,s,!0),s+=r.headerRows);var l=o.createTBody();return n._createTableRows(e,l,s,!1),a.reMapTableColumns(o,p),"ids"===r.cellsWithHeaders?a.associateWithIds(o):"scope"===r.cellsWithHeaders&&n._addScopes(o,r.headerRows,r.headerColumns),a.clearTableMappings(o,p),o},_createTableRows:function(e,t,n,i){for(var r,o=e.tableProperties,a=e.cellProperties,s=o.columns,l=i?o.headerRows:o.rows,c=o.headerColumns,d=n;dh?document.createElement(f):document.createElement(m),r.appendChild(u),u.innerHTML=" ",a&&0===d&&0===h&&a.id&&(u.id=a.id),this._updateCellProperties(u,a&&(a.selectAllCells||0===d&&0===h)?a:{})}},_addRows:function(t,n,i){for(var r,o=e(t).index(),a=t.cells.length,s=n-i.length,l=t.parentNode;s;)r=l.insertRow(o+1),this._insertCells(a-r.cells.length,r),s--},_updateColumns:function(t,n,i,r){var o=this,a=o._lastInCollection,s=a(t[0].cells),l=Number(s.getAttribute(p))+s.colSpan;if(l>n&&e(t).each((function(e,t){for(var i=a(t.cells),r=Number(i.getAttribute(p))+i.colSpan;r>n;)i.colSpan&&i.colSpan>1?i.colSpan-=1:t.deleteCell(-1),i=a(t.cells),r=Number(i.getAttribute(p))+i.colSpan})),li.getAttribute(p))?a.changeTag(i,f,!1):this._isHeadingCell(i)&&r>=s.headerRows&&s.headerColumns<=i.getAttribute(p)&&a.changeTag(i,m,!1)},_updateHeadersWithThead:function(e,t){var n,i,r,o=this,s=t.tableProperties,l=e.tHead,c=0,d=e.tBodies[0];if(d||(d=e.createTBody()),s.headerRows&&s.headerRows>0){for(l||(l=e.createTHead());l.rows.lengths.headerRows;)d.appendChild(l.rows[0]);o._swapToHeaderCells(l)}else if(l){for(;l.rows.length>0;)d.appendChild(l.rows[l.rows.length-1]);e.deleteTHead()}for(;d.rows.length>c;){for(n=d.rows[c],r=0;ri.getAttribute(p)&&a.changeTag(i,f,!1);c+=1}},_updateHeaderAssociates:function(e,t){var n=this;"ids"===t.cellsWithHeaders?(n.cellsWithHeadersAssociated(e)||n._removeScopes(e),a.associateWithIds(e)):"scope"===t.cellsWithHeaders?(n.cellsWithHeadersAssociated(e)&&n._removeAssociates(e),n._addScopes(e,t.headerRows,t.headerColumns)):n.cellsWithHeadersAssociated(e)?n._removeAssociates(e):n._removeScopes(e)},_addScopes:function(e,t,n){var i,r,o,a,s=e.rows;for(i=0;i0?"scope":"none",a.reMapTableColumns(n,p);var v=a._getNumberOfColumns(n),_=a._getNumberOfHeaderColumns(n,g);a.clearTableMappings(n,p);var b={tableProperties:{width:o.width||n.width?parseFloat(o.width||n.width):null,height:o.height||n.height?parseFloat(o.height||n.height):null,columns:v,rows:s.length,widthUnit:r._getUnit(o.width),heightUnit:r._getUnit(o.height),cellSpacing:n.cellSpacing,cellPadding:n.cellPadding,alignment:h.textAlign,position:f,bgColor:o.backgroundColor||n.bgColor,className:d,id:n.id,borderWidth:o.borderWidth||n.border,borderColor:o.borderColor,borderStyle:o.borderStyle||"",collapseBorders:!!o.borderCollapse,summary:n.summary,captionContent:l?c.html():"",captionAlignment:l&&m.textAlign?m.textAlign+" "+m.verticalAlign:"",headerRows:g,headerColumns:_,cellsWithHeaders:u},selectedCells:[]};return b.rows=r.parseTableRows(s,i,b),b},parseTableRows:function(t,n,i){for(var r,o,a,s,l=[],c=0;c"+e.content(e.item)+"
        "},itemWrapper:function(e){var t=e.tag,n=e.item,i=e.contentUrl,r=e.textAttributes,o=e.image,a=e.sprite,s=e.text;return"<"+t(n)+" class='k-link' "+i(n)+" "+r(n)+">"+o(n)+a(n)+s(n)+""},item:function(e){return""},image:function(e){return""},sprite:function(e){return""},empty:function(){return""}},U={wrapperCssClass:function(e,t){var n=["k-tabstrip-item","k-item"],i=t.index;return!1===t.enabled&&n.push("k-disabled"),0===i&&n.push("k-first"),i==e.length-1&&n.push("k-last"),n.join(" ")},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},text:function(e){return!1===e.encoded?e.text:n.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},contentAttributes:function(e){return!0!==e.active?" "+n.attr("style-display")+"=\"none\" aria-hidden='true'":""},content:function(e){return e.content?e.content:e.contentUrl?"":" "},contentUrl:function(e){return e.contentUrl?n.attr("content-url")+'="'+e.contentUrl+'"':""}};function j(t){t.children("img").addClass(k),t.children("a").addClass(b).children("img").addClass(k),t.filter("li[disabled]").addClass(M).attr(V,"true").prop("disabled",!1),t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass("k-active "+R),t.attr("role","tab"),t.filter(".k-active").attr(O,!0),t.each((function(){var t=e(this);t.children("."+b).length||t.contents().filter((function(){return!(this.nodeName.match(p)||3==this.nodeType&&!s(this.nodeValue))})).wrapAll("")}))}function q(e){var t=e.children(".k-item");t.filter(".k-first:not(:first-child)").removeClass(x),t.filter(".k-last:not(:last-child)").removeClass(w),t.filter(":first-child").addClass(x),t.filter(":last-child").addClass(w)}function G(e,t){return""}var K=h.extend({init:function(e,t){var i,r=this;h.fn.init.call(r,e,t),r._animations(r.options),t=r.options,r._contentUrls=t.contentUrls||[],r._wrapper(),r._isRtl=n.support.isRtl(r.wrapper),r._tabindex(),r._updateClasses(),r._dataSource(),r.tabGroup.attr("role","tablist"),t.dataSource&&r.dataSource.fetch(),r._tabPosition(),r._scrollable(),r._processContentUrls(),r._attachEvents(),r.options.value&&(i=r.options.value),r._initialActivate(),r.value(i),n.notify(r)},events:[C,S,_,"error",z,"change","dataBinding","dataBound"],options:{name:"TabStrip",dataEncodedField:"",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}},setDataSource:function(e){var t=this;t.options.dataSource=e,t._dataSource(),t.dataSource.fetch()},setOptions:function(e){var t=this,n=t.options.animation;t._animations(e),e.contentUrls&&(t._contentUrls=e.contentUrls),e.animation=l(!0,n,e.animation),e.navigatable?t.wrapper.on("keydown"+f,t._keyDownProxy):t.wrapper.off("keydown"+f,t._keyDownProxy),h.fn.setOptions.call(t,e)},activateTab:function(e){if(!this.tabGroup.children("[data-animating]").length){e=this.tabGroup.find(e);var t=this,i=t.options.animation,r=i.open,o=l({},i.close),a=o&&"effects"in o,s=e.parent().children(),c=s.filter(".k-active"),d=s.index(e),h=r&&"duration"in r&&"effects"in r;o=l(a?o:l({reverse:!0},r),{hide:!0}),n.size(r.effects)?(c.kendoRemoveClass(E,{duration:o.duration}),e.kendoRemoveClass(H,{duration:o.duration})):(c.removeClass(E),e.removeClass(H));var p=t.contentAnimators;if(t.inRequest&&(t.xhr.abort(),t.inRequest=!1),0===p.length)return t.tabGroup.find("."+R).removeClass(R),e.addClass(R).css("z-index"),e.addClass(E),t._current(e),t.trigger("change"),t._scrollableModeActive&&t._scrollTabsToItem(e),!1;var f=p.filter(".k-active"),m=t.contentHolder(d),g=m.closest(".k-content");if(t.tabsHeight=u(t.tabGroup)+parseInt(t.wrapper.css("border-top-width"),10)+parseInt(t.wrapper.css("border-bottom-width"),10),0===m.length)return f.removeClass(E).attr(B,!0).kendoStop(!0,!0).kendoAnimate(o),!1;e.attr("data-animating",!0);var v=!(!e.children("."+b).data(D)&&!t._contentUrls[d])&&m.is(":empty"),w=function(){c.removeAttr(O),e.attr(O,!0),t._current(e),g.addClass(E).removeAttr(B).kendoStop(!0,!0).kendoAnimate(l({init:function(){t.trigger(_,{item:e[0],contentElement:m[0]}),n.resize(m)}},r,{complete:function(){t.element.css("min-height",k),e.removeAttr("data-animating"),t.trigger(S,{item:e[0],contentElement:m[0]}),n.resize(m),h&&(n.support.browser.msie||n.support.browser.edge)&&m.finish().animate({opacity:.9},"fast","linear",(function(){m.finish().animate({opacity:1},"fast","linear")}))}}))},y=function(){v?(e.removeAttr("data-animating"),t.ajaxRequest(e,m,(function(){e.attr("data-animating",!0),w(),t.trigger("change")}))):(w(),t.trigger("change")),t._scrollableModeActive&&t._scrollTabsToItem(e)},k=t.element.css("min-height");return t.element.css("min-height",t.element.outerHeight()),f.removeClass(E),t.tabGroup.find("."+R).removeClass(R),e.addClass(R).css("z-index"),n.size(r.effects)?e.kendoAddClass(E,{duration:r.duration}):e.addClass(E),f.attr(B,!0),f.length?f.kendoStop(!0,!0).kendoAnimate(l({complete:y},o)):y(),!0}},ajaxRequest:function(t,i,r,o){t=this.tabGroup.find(t);var a=this,s=e.ajaxSettings.xhr,l=t.find("."+b),d=t.width()/2,u=!1,h=t.find(".k-loading").removeClass("k-complete");h[0]||(h=e("").prependTo(t));var p=2*d-h.width(),f=function(){h.animate({marginLeft:(parseInt(h.css("marginLeft"),10)||0) .k-item:not(.k-disabled):not(.k-active)",e._toggleHover).on("focus"+f,e._active.bind(e)).on("blur"+f,(function(){e._current(null)})),e._keyDownProxy=e._keydown.bind(e),t.navigatable&&e.wrapper.on("keydown"+f,e._keyDownProxy),e.tabGroup.on(y+f,".k-disabled .k-link",!1).on(y+f," > "+F,e._itemClick.bind(e))},_click:function(e){var t,n,i=this,r=e.find("."+b),o=r.attr(m),a=i.options.collapsible,s=e.index(),l=i.contentHolder(s),c=e.parent().children().filter(".k-focus");if(e.closest(".k-widget")[0]==i.wrapper[0]){if(e.is(".k-disabled"+(a?"":",.k-active")))return c.removeClass(A),i._focused=e,e.addClass(A),i._current(e),i._scrollableModeActive&&i._scrollTabsToItem(e),!0;if(n=r.data(D)||i._contentUrls[s]||o&&("#"==o.charAt(o.length-1)||-1!=o.indexOf("#"+i.element[0].id+"-")),t=!o||n,i.tabGroup.children("[data-animating]").length)return t;if(i.trigger(C,{item:e[0],contentElement:l[0]}))return!0;if(!1!==t)return a&&e.is(".k-active")?(i.deactivateTab(e),!0):(i.activateTab(e)&&(t=!0),t)}},_create:function(t){var i,r,a,s=this,c=!1;return t=t instanceof n.data.ObservableArray?t.toJSON():t,e.isPlainObject(t)||Array.isArray(t)?(t=Array.isArray(t)?t:[t],c=!0,i=o(t,(function(n,i){return s._appendUrlItem(t[i].contentUrl||null),e(K.renderItem({group:s.tabGroup,item:l(n,{index:i})}))})),r=o(t,(function(t,i){if("string"==typeof t.content||t.contentUrl){var r=e(K.renderContent({item:l(t,{index:i})}));return n.applyStylesFromKendoAttributes(r,["display"]),r}}))):(i="string"==typeof t&&"<"!=t[0]?s.element.find(t):e(t),r=e(),i.each((function(){if(/k-tabstrip-items/.test(this.parentNode.className)){var t=s.element.find("[id='"+this.getAttribute(L)+"']");a=t}else a=e("
        ");r=r.add(a)})),j(i)),{tabs:i,contents:r,newTabsCreated:c}},_current:function(e){var n=this._focused;if(e===t)return n;n&&n.removeClass(A),e&&(e.hasClass(E)||e.addClass(A)),this._focused=e},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e.dataSource.unbind("change",e._refreshHandler):e._refreshHandler=e.refresh.bind(e),e.dataSource=n.data.DataSource.create(e.options.dataSource).bind("change",e._refreshHandler)},_elementId:function(e,t,i){var r=e.attr("id"),o=this.element.attr("id"),a=n.guid();if(!r||r.indexOf(o+"-")>-1){var s=(o||a)+"-";return i&&(s+="tab-"),s+(t+1)}return r},_endItem:function(e){return this.tabGroup.children(F)[e]()},_getItem:function(e){return this.tabGroup.children(P)[e]()},_initialActivate:function(){var e=this,t=e.tabGroup.children("li.k-active"),n=e.contentHolder(t.index());t[0]&&n.length>0&&0===n[0].childNodes.length&&e.activateTab(t.eq(0))},_item:function(e,t){var n;return n=t===g?"last":"first",e?((e=e[t]())[0]||(e=this.tabGroup.children(P)[n]()),e.hasClass(M)&&e.addClass(A),(e.hasClass(M)||e.hasClass(E))&&(this._focused=e),e):this._endItem(n)},_itemClick:function(t){var i=this.wrapper[0];if(i!==document.activeElement)if(n.support.browser.msie)try{i.setActive()}catch(e){i.focus()}else i.focus();this._click(e(t.currentTarget))&&t.preventDefault()},_keydown:function(e){var t,n=this,i=e.keyCode,o=n._current(),a=n._isRtl,s=/top|bottom/.test(n.options.tabPosition);if(e.target==e.currentTarget&&o){if(i!==r.DOWN||s)if(i!==r.UP||s)if(i===r.RIGHT&&s)t=a?g:v;else if(i===r.LEFT&&s)t=a?v:g;else if(i==r.ENTER||i==r.SPACEBAR)n._click(o),e.preventDefault();else{if(i==r.HOME)return n._click(n._getItem("first")),void e.preventDefault();if(i==r.END)return n._click(n._getItem("last")),void e.preventDefault()}else t=g;else t=v;t&&(n._click(n._item(o,t)),e.preventDefault())}},_moveUrlItem:function(e,t){this._contentUrls.splice(t,0,this._contentUrls.splice(e,1)[0])},_processContentUrls:function(){var t=this;t._contentUrls.length?t.tabGroup.children(".k-item").each((function(n,i){var r=t._contentUrls[n];"string"==typeof r&&e(i).find(">."+b).data(D,r)})):t._contentUrls.length=t.tabGroup.find("li.k-item").length},_removeUrlItem:function(e){this._contentUrls.splice(e,1)},_resize:function(){this._scrollable()},_scrollable:function(){var e,t,i,r,o=this,a=o.options;if(o._scrollableAllowed())if(o.wrapper.addClass("k-tabstrip-scrollable"),e=o.wrapper[0].offsetWidth,(t=o.tabGroup[0].scrollWidth)>e&&!o._scrollableModeActive){o._nowScrollingTabs=!1,o._isRtl=n.support.isRtl(o.element);var s=n.support.touch?"touchstart":"mousedown",l=n.support.touch?"touchend":"mouseup",c=n.support.browser,d=o._isRtl&&!c.msie&&!c.edge;o.tabWrapper.prepend(G("prev","caret-alt-left")),o.tabWrapper.append(G("next","caret-alt-right")),i=o._scrollPrevButton=o.tabWrapper.children(".k-tabstrip-prev"),r=o._scrollNextButton=o.tabWrapper.children(".k-tabstrip-next"),i.on(s+f,(function(){o._nowScrollingTabs=!0,o._scrollTabsByDelta(a.scrollable.distance*(d?1:-1))})),r.on(s+f,(function(){o._nowScrollingTabs=!0,o._scrollTabsByDelta(a.scrollable.distance*(d?-1:1))})),i.add(r).on(l+f,(function(){o._nowScrollingTabs=!1})),o._scrollableModeActive=!0,o._toggleScrollButtons()}else o._scrollableModeActive&&t<=e?(o._scrollableModeActive=!1,o.wrapper.removeClass("k-tabstrip-scrollable"),o._scrollPrevButton.off().remove(),o._scrollNextButton.off().remove()):o._scrollableModeActive?o._toggleScrollButtons():o.wrapper.removeClass("k-tabstrip-scrollable")},_scrollableAllowed:function(){var e=this.options;return e.scrollable&&!e.scrollable.distance&&(e.scrollable={distance:200}),e.scrollable&&!isNaN(e.scrollable.distance)&&("top"==e.tabPosition||"bottom"==e.tabPosition)},_scrollTabsToItem:function(e){var t,i=this,r=i.tabGroup,o=n.scrollLeft(r),a=d(e),s=i._isRtl?e.position().left:e.position().left-r.children().first().position().left,l=r[0].offsetWidth,c=n.support.browser;i._isRtl&&(c.mozilla||c.webkit&&c.version>=85)&&(o*=-1),i._isRtl?s<0?t=o+s-(l-o):s+a>l&&(t=o+s-a):o+ls&&(t=s),r.finish().animate({scrollLeft:t},"fast","linear",(function(){i._toggleScrollButtons()}))},_scrollTabsByDelta:function(e){var t=this,i=t.tabGroup,r=n.scrollLeft(i),o=n.support.browser;t._isRtl&&(o.mozilla||o.webkit&&o.version>=85)&&(r*=-1),i.finish().animate({scrollLeft:r+e},"fast","linear",(function(){t._nowScrollingTabs&&!jQuery.fx.off?t._scrollTabsByDelta(e):t._toggleScrollButtons()}))},_tabPosition:function(){var e=this,t=e.options.tabPosition;e.wrapper.addClass("k-tabstrip-"+t),"bottom"==t&&e.tabWrapper.appendTo(e.wrapper),"left"!==t&&"right"!==t||e.tabGroup.attr("aria-orientation","vertical"),e.resize(!0)},_toggleHover:function(t){e(t.currentTarget).toggleClass(H,t.type==I)},_toggleDisabled:function(t,n){(t=this.tabGroup.find(t)).each((function(){e(this).toggleClass(M,!n).attr(V,!n)}))},_toggleScrollButtons:function(){var e=this,t=e.tabGroup,i=n.scrollLeft(t);e._scrollPrevButton.toggleClass("k-disabled",0===i),e._scrollNextButton.toggleClass("k-disabled",i===t[0].scrollWidth-t[0].offsetWidth)},_updateClasses:function(){var n,i,r,o=this,a=/top|bottom/.test(o.options.tabPosition);o.wrapper.addClass("k-widget k-tabstrip"),o.tabGroup||(o.tabGroup=o.wrapper.children("ul"),o.tabGroup.wrap("
        "),o.tabWrapper=o.tabGroup.parent()),o.tabGroup[0]||(o.tabGroup=e("
          ").prependTo(o.wrapper),o.tabGroup.wrap("
          "),o.tabWrapper=o.tabGroup.parent()),o.tabWrapper.addClass("k-tabstrip-items-wrapper"),o.tabWrapper.addClass(a?"k-hstack":"k-vstack"),o.tabGroup.addClass("k-tabstrip-items k-reset"),(n=o.tabGroup.find("li").addClass("k-tabstrip-item k-item")).length&&(r=(i=n.filter(".k-active").index())>=0?i:t,o.tabGroup.contents().filter((function(){return 3==this.nodeType&&!s(this.nodeValue)})).remove()),i>=0&&n.eq(i).addClass(R),o.contentElements=o.wrapper.children("div:not(.k-tabstrip-items-wrapper)"),o.contentElements.addClass(T).eq(r).addClass(E).css({display:"block"}),n.length&&(j(n),q(o.tabGroup),o._updateContentElements(!0))},_updateContentElements:function(t){var i=this,r=i._contentUrls,o=i.tabGroup.children(".k-item"),a=i.wrapper.children("div:not(.k-tabstrip-items-wrapper)"),s=i._elementId.bind(i);a.length&&o.length>a.length?a.each((function(n){var i,r=s(e(this),n),a=o.filter("[aria-controls="+(r||0)+"]")[0];!a&&t&&(a=o[n]),a&&(a.setAttribute(L,r),i=a.id=s(e(a),n,!0),this.setAttribute(N,i)),this.setAttribute("id",r)})):o.each((function(t){var n,o=a.eq(t),l=s(o,t);this.setAttribute(L,l),n=this.id=s(e(this),t,!0),!o.length&&r[t]?e("
          ").appendTo(i.wrapper).attr("id",l):(o.attr("id",l),e(this).children(".k-loading")[0]||r[t]||e("").prependTo(this)),o.attr("role","tabpanel"),o.attr("tabindex","0"),o.attr(N,n),o.filter(":not(.k-active)").attr(B,!0)})),i.contentElements=i.contentAnimators=i.wrapper.children("div:not(.k-tabstrip-items-wrapper)"),i.tabsHeight=u(i.tabGroup)+parseInt(i.wrapper.css("border-top-width"),10)+parseInt(i.wrapper.css("border-bottom-width"),10),n.kineticScrollNeeded&&n.mobile.ui.Scroller&&(n.touchScroller(i.contentElements),i.contentElements=i.contentElements.children(".km-scroll-container"))},_wrapper:function(){var e=this;e.element.is("ul")?e.wrapper=e.element.wrapAll("
          ").parent():e.wrapper=e.element}});l(K,{renderItem:function(e){e=l({tabStrip:{},group:{}},e);var t=W.empty,n=e.item;return W.item(l(e,{image:n.imageUrl?W.image:t,sprite:n.spriteCssClass?W.sprite:t,itemWrapper:W.itemWrapper},U))},renderContent:function(e){return W.content(l(e,U))}}),n.ui.plugin(K)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.htmlEncode,r={format:"0",min:0},o=["px","em"],a=["solid","dotted","dashed","double","groove","ridge","inset","outset","initial","inherit","none","hidden"],s={dataSource:[{className:"text-wrap",value:"wrap"},{className:"parameter-string",value:"nowrap"}],dataTextField:"className",dataValueField:"value",template:function(t){var r=t.className,o=t.tooltip;return n.ui.icon(e(''),{icon:i(r)})+i(o)},valueTemplate:function(t){var r=t.className,o=t.tooltip;return n.ui.icon(e(''),{icon:i(r),iconClass:"k-text-wrap"})+i(o)}},l={dataSource:[{className:"table-position-start",value:"left"},{className:"table-position-center",value:"center"},{className:"table-position-end",value:"right"}],dataTextField:"className",dataValueField:"value",template:function(t){var r=t.className,o=t.tooltip;return n.ui.icon(e(''),{icon:i(r)})+i(o)},valueTemplate:function(t){var r=t.className,o=t.tooltip;return n.ui.icon(e(''),{icon:i(r),iconClass:"k-align-group"})+i(o)}},c={dataSource:[{className:"table-align-middle-left",value:"left"},{className:"table-align-middle-center",value:"center"},{className:"table-align-middle-right",value:"right"},{className:"align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:function(t){var r=t.className,o=t.tooltip;return n.ui.icon(e(''),{icon:i(r)})+i(o)},valueTemplate:function(t){var r=t.className,o=t.tooltip;return n.ui.icon(e(''),{icon:i(r),iconClass:"k-align-group"})+i(o)}},d={dataSource:[{className:"table-align-top-left",value:"left top"},{className:"table-align-top-center",value:"center top"},{className:"table-align-top-right",value:"right top"},{className:"table-align-middle-left",value:"left middle"},{className:"table-align-middle-center",value:"center middle"},{className:"table-align-middle-right",value:"right middle"},{className:"table-align-bottom-left",value:"left bottom"},{className:"table-align-bottom-center",value:"center bottom"},{className:"table-align-bottom-right",value:"right bottom"},{className:"align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:function(t){var r=t.className,o=t.tooltip;return n.ui.icon(e(''),{icon:i(r)})+i(o)},valueTemplate:function(t){var r=t.className,o=t.tooltip;return n.ui.icon(e(''),{icon:i(r),iconClass:"k-align-group"})+i(o)}},u={dataSource:[{className:"table-align-top-left",value:"left top"},{className:"table-align-top-center",value:"center top"},{className:"table-align-top-right",value:"right top"},{className:"table-align-bottom-left",value:"left bottom"},{className:"table-align-bottom-center",value:"center bottom"},{className:"table-align-bottom-right",value:"right bottom"},{className:"align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:function(t){var r=t.className,o=t.tooltip;return n.ui.icon(e(''),{icon:i(r)})},valueTemplate:function(t){var r=t.className,o=t.tooltip;return n.ui.icon(e(''),{icon:i(r),iconClass:"k-align-group"})}},h=function(e){var t=e.messages;return'
          • '+t.tableTab+"
          • "+t.accessibilityTab+'
          '+n.html.renderButton('",{icon:"check",themeColor:"primary"})+n.html.renderButton('",{icon:"cancel-outline"})+"
          "},p=function(e){var t=e.messages;return'
          '+n.html.renderButton('",{icon:"check",themeColor:"primary"})+n.html.renderButton('",{icon:"cancel-outline"})+"
          "},f=n.Class.extend({init:function(e){this.options=e},_openTablePropertiesDialog:function(){var t,i=this,r=i.options,o=r.dialogOptions,a=r.table,s=r.messages,l=n.support.browser.msie;function c(e){e.preventDefault(),i.destroy(),t.destroy()}function d(e){c(e),r.closeCallback()}o.close=d,o.minWidth=400,o.title=s.tableProperties,o.visible=r.visible;var u=(t=e(i._dialogTemplate(s)).appendTo(document.body).kendoWindow(o).addClass("k-editor-window").closest(".k-window").toggleClass("k-rtl",r.isRtl).end().find(".k-dialog-ok").on("click",(function(e){i.collectTableDialogValues(a),c(e),i.change&&i.change(),r.closeCallback(a)})).end().find(".k-dialog-close").on("click",d).end().data("kendoWindow")).element;if(this.components={},i._initTabStripComponent(u),i._tablePropertiesForm=i._createTablePropertiesForm(t,s),i._accessibilityPropertiesForm=i._createAccessibilityPropertiesForm(t,s),t.center(),t.open(),l){var h=u.closest(".k-window").height();u.css("max-height",h)}},_openCellPropertiesDialog:function(){var t,i=this,r=i.options,o=r.dialogOptions,a=r.table,s=r.messages,l=n.support.browser.msie;function c(e){e.preventDefault(),i.destroy(),t.destroy()}function d(e){c(e),r.closeCallback()}o.close=d,o.minWidth=400,o.title=s.tableCellProperties,o.visible=r.visible;var u=(t=e(i._dialogTemplate(s,p)).appendTo(document.body).kendoWindow(o).addClass("k-editor-window").closest(".k-window").toggleClass("k-rtl",r.isRtl).end().find(".k-dialog-ok").on("click",(function(e){i.collectCellDialogValues(a),c(e),i.change&&i.change(),r.closeCallback(a)})).end().find(".k-dialog-close").on("click",d).end().data("kendoWindow")).element;if(i._cellPropertiesForm=i._createCellPropertiesForm(t,s),t.center(),t.open(),l){var h=u.closest(".k-window").height();u.css("max-height",h)}},open:function(e){e?this._openCellPropertiesDialog():this._openTablePropertiesDialog()},_initTabStripComponent:function(e){(this.components={}).tabStrip=e.find("#k-table-wizard-tabs").kendoTabStrip({animation:!1}).data("kendoTabStrip")},collectTableDialogValues:function(){var e=this,t=e.options.table;e._collectTableViewValues(t),e._collectAccessibilityViewValues(t)},collectCellDialogValues:function(){var e=this.options.table;this._collectCellViewValues(e)},_collectTableViewValues:function(e){var t=this.components.tableView,n=e.tableProperties,i=e.cellProperties=e.cellProperties||{};n.width=t.width.value(),n.widthUnit=t.widthUnit.value(),n.height=t.height.value(),n.columns=t.columns.value(),n.rows=t.rows.value(),n.heightUnit=t.heightUnit.value(),n.cellSpacing=t.cellSpacing.value(),n.cellPadding=t.cellPadding.value(),n.alignment=t.alignment.value(),n.position=t.position.value(),n.bgColor=t.bgColor.value(),n.borderWidth=t.borderWidth.value(),n.borderColor=t.borderColor.value(),n.borderStyle=t.borderStyle.value(),n.collapseBorders=t.collapseBorders.check(),i.width||(i.selectAllCells=!0,i.width=100/e.tableProperties.columns,i.widthUnit="%")},_collectCellViewValues:function(e){var t=e.cellProperties=e.cellProperties||{},n=this.components.cellView;t.selectAllCells=n.selectAllCells.check(),t.width=n.width.value(),t.widthUnit=n.widthUnit.value(),t.height=n.height.value(),t.heightUnit=n.heightUnit.value(),t.cellMargin=n.cellMargin.value(),t.cellPadding=n.cellPadding.value(),t.alignment=n.alignment.value(),t.bgColor=n.bgColor.value(),t.className=n.className.value(),t.id=n.id.value(),t.borderWidth=n.borderWidth.value(),t.borderColor=n.borderColor.value(),t.borderStyle=n.borderStyle.value(),t.wrapText="wrap"==n.wrapTextValue.value(),t.width||(t.selectAllCells=!0,t.width=100/e.tableProperties.columns,t.widthUnit="%")},_collectAccessibilityViewValues:function(e){var t=e.tableProperties,n=this.components.accessibilityView;t.captionContent=n.captionContent.value(),t.captionAlignment=n.captionAlignment.value(),t.summary=n.summary.value(),t.cellsWithHeaders=n.cellsWithHeaders.value(),t.className=n.className.value(),t.id=n.id.value(),t.headerRows=n.headerRows.value(),t.headerColumns=n.headerColumns.value()},_addUnit:function(t,n){n&&-1==e.inArray(n,t)&&t.push(n)},_initNumericTextbox:function(t,n,i,o,a){var s=o[n]=t.kendoNumericTextBox(a?e.extend({},r,a):r).data("kendoNumericTextBox");n in i&&s.value(parseInt(i[n],10))},_initDropDownList:function(e,t,n,i,r){var o=i[t]=e.kendoDropDownList({dataSource:r}).data("kendoDropDownList");this._setComponentValue(o,n,t)},_initBorderStyleDropDown:function(e,t,n,i,r){var o=i[t]=e.kendoDropDownList({dataSource:r,optionLabel:this.options.messages.borderNone}).data("kendoDropDownList");this._setComponentValue(o,n,t)},_initTablePositionDropDown:function(e,t){var n=this.options.messages,i=this.components.tableView,r=l.dataSource;r[0].tooltip=n.tableAlignLeft,r[1].tooltip=n.tableAlignCenter,r[2].tooltip=n.tableAlignRight,this._initPositionDropDown(e,l,"position",t,i)},_initTableAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.tableView,r=c.dataSource;r[0].tooltip=n.alignLeft,r[1].tooltip=n.alignCenter,r[2].tooltip=n.alignRight,r[3].tooltip=n.alignRemove,this._initAlignmentDropDown(e,c,"alignment",t,i)},_initCellAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.cellView,r=d.dataSource;r[0].tooltip=n.alignLeftTop,r[1].tooltip=n.alignCenterTop,r[2].tooltip=n.alignRightTop,r[3].tooltip=n.alignLeftMiddle,r[4].tooltip=n.alignCenterMiddle,r[5].tooltip=n.alignRightMiddle,r[6].tooltip=n.alignLeftBottom,r[7].tooltip=n.alignCenterBottom,r[8].tooltip=n.alignRightBottom,r[9].tooltip=n.alignRemove,this._initAlignmentDropDown(e,d,"alignment",t,i)},_initAccessibilityAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.accessibilityView,r=u.dataSource;r[0].tooltip=n.alignLeftTop,r[1].tooltip=n.alignCenterTop,r[2].tooltip=n.alignRightTop,r[3].tooltip=n.alignLeftBottom,r[4].tooltip=n.alignCenterBottom,r[5].tooltip=n.alignRightBottom,r[6].tooltip=n.alignRemove,this._initAlignmentDropDown(e,u,"captionAlignment",t,i)},_initTextWrapDropDown:function(e,t){var n=this.options.messages,i="wrapTextValue";t.wrapTextValue=t.wrapText?"wrap":"nowrap";var r=this.components.cellView,o=s.dataSource;o[0].tooltip=n.wrapText,o[1].tooltip=n.fitToCell;var a=r[i]=e.kendoDropDownList(s).data("kendoDropDownList");a.list.addClass("k-text-wrap"),this._setComponentValue(a,t,i)},_initPositionDropDown:function(e,t,n,i,r){var o=r[n]=e.kendoDropDownList(t).data("kendoDropDownList");o.list.addClass("k-position"),this._setComponentValue(o,i,n)},_initAlignmentDropDown:function(e,t,n,i,r){var o=r[n]=e.kendoDropDownList(t).data("kendoDropDownList");o.list.addClass("k-align"),this._setComponentValue(o,i,n)},_initAssociationDropDown:function(e,t,n,i,r){var o=r[t]=e.kendoDropDownList(n).data("kendoDropDownList");this._setComponentValue(o,i,t)},_setComponentValue:function(e,t,n){n in t&&e.value(t[n])},_initColorPicker:function(e,t,n,i){var r=i[t]=e.kendoColorPicker({buttons:!1,clearButton:!0}).data("kendoColorPicker");n[t]&&r.value(n[t])},_initInput:function(e,t,n,i,r){var o=i[t]=e.kendoTextBox(r||{}).data("kendoTextBox");t in n&&o.value(n[t])},_initCheckbox:function(e,t,n,i,r){var o=i[t]=e.kendoCheckBox(r||{}).data("kendoCheckBox");t in n&&o.check(n[t])},_initTextArea:function(e,t,n,i,r){var o=i[t]=e.kendoTextArea(r||{}).data("kendoTextArea");t in n&&o.value(n[t])},destroy:function(){this._destroyComponents(this.components),delete this.components},_destroyComponents:function(e){for(var t in e)e[t].destroy&&e[t].destroy(),delete e[t]},_dialogTemplate:function(e,t){return n.template(t||h)({messages:e})},_onColumnsNumberChange:function(e){var t=this.components.accessibilityView.headerColumns,n=t.value(),i=e.sender.value();i').appendTo(t),"columns",u,d,{min:1,value:4,change:s._onColumnsNumberChange.bind(s)})}},{colSpan:2,field:"k-editor-table-rows",label:i(n.rows),editor:function(t,n){s._initNumericTextbox(e('').appendTo(t),"rows",u,d,{min:1,value:4,change:s._onRowsNumberChange.bind(s)})}},{colSpan:1,field:"k-editor-table-width",label:i(n.width),editor:function(t,r){s._initNumericTextbox(e('').appendTo(t),"width",u,d,{placeholder:i(n.auto)})}},{colSpan:1,field:"k-editor-table-width-type",label:{encoded:!1,text:" "},editor:function(t,i){s._initDropDownList(e('').appendTo(t),"widthUnit",u,d,o)}},{colSpan:1,field:"k-editor-table-height",label:i(n.height),editor:function(t,r){s._initNumericTextbox(e('').appendTo(t),"height",u,d,{placeholder:i(n.auto)})}},{colSpan:1,field:"k-editor-table-height-type",label:{encoded:!1,text:" "},editor:function(t,i){s._initDropDownList(e('').appendTo(t),"heightUnit",u,d,o)}},{colSpan:2,field:"k-editor-table-position",label:i(n.position),editor:function(t,n){s._initTablePositionDropDown(e('').appendTo(t),u)}},{colSpan:2,field:"k-editor-table-alignment",label:i(n.alignment),editor:function(t,n){s._initTableAlignmentDropDown(e('').appendTo(t),u)}},{colSpan:2,field:"k-editor-table-cell-spacing",label:i(n.cellSpacing),editor:function(t,r){s._initNumericTextbox(e('').appendTo(t),"cellSpacing",u,d,{placeholder:i(n.auto)})}},{colSpan:2,field:"k-editor-table-cell-padding",label:i(n.cellPadding),editor:function(t,r){s._initNumericTextbox(e('').appendTo(t),"cellPadding",u,d,{placeholder:i(n.auto)})}},{colSpan:"full",field:"k-editor-table-bg",label:i(n.tableBackground),editor:function(t,n){s._initColorPicker(e('').appendTo(t),"bgColor",u,d)}},{colSpan:1,field:"k-editor-border-width",label:i(n.borderWidth),editor:function(t,n){s._initNumericTextbox(e('').appendTo(t),"borderWidth",u,d)}},{colSpan:1,field:"k-editor-border-color",label:i(n.borderColor),editor:function(t,n){s._initColorPicker(e('').appendTo(t),"borderColor",u,d)}},{colSpan:2,field:"k-editor-border-style",label:i(n.borderStyle),editor:function(t,n){s._initBorderStyleDropDown(e('').appendTo(t),"borderStyle",u,d,a)}},{colSpan:"full",field:"k-editor-collapse-borders",label:"",editor:function(t,r){s._initCheckbox(e('').appendTo(t),"collapseBorders",u,d,{label:i(n.collapseBorders)})}}]}).data("kendoForm")).layoutWrapper.addClass("k-gap-x-4"),r},_createCellPropertiesForm:function(t,n){var r,s=this,l=s.options.table,c=t.element.find("#k-cell-properties"),d=(s.components=s.components||{}).cellView={},u=l.selectedCells&&l.selectedCells[0]||{borderStyle:"",wrapText:!0};return s._addUnit(o,u.widthUnit),s._addUnit(o,u.heightUnit),(r=c.kendoForm({renderButtons:!1,layout:"grid",grid:{cols:4},items:[{colSpan:"full",field:"k-editor-selectAllCells",label:"",editor:function(t,r){s._initCheckbox(e('').appendTo(t),"selectAllCells",l.tableProperties,d,{label:i(n.selectAllCells)})}},{colSpan:1,field:"k-editor-cell-width",label:i(n.width),hint:i(n.applyToColumn),editor:function(t,r){s._initNumericTextbox(e('').appendTo(t),"width",u,d,{placeholder:i(n.auto)})}},{colSpan:1,field:"k-editor-cell-width-type",label:{encoded:!1,text:" "},editor:function(t,i){s._initDropDownList(e('').appendTo(t),"widthUnit",u,d,o)}},{colSpan:1,field:"k-editor-cell-height",label:i(n.height),hint:i(n.applyToRow),editor:function(t,r){s._initNumericTextbox(e('').appendTo(t),"height",u,d,{placeholder:i(n.auto)})}},{colSpan:1,field:"k-editor-cell-height-type",label:{encoded:!1,text:" "},editor:function(t,i){s._initDropDownList(e('').appendTo(t),"heightUnit",u,d,o)}},{colSpan:2,field:"k-editor-cell-alignment",label:i(n.alignment),editor:function(t,n){s._initCellAlignmentDropDown(e('').appendTo(t),u)}},{colSpan:2,field:"k-editor-wrap-text",label:"Text control",editor:function(t,n){s._initTextWrapDropDown(e('').appendTo(t),u)}},{colSpan:"full",field:"k-editor-cell-bg",label:i(n.background),editor:function(t,n){s._initColorPicker(e('').appendTo(t),"bgColor",u,d)}},{colSpan:2,field:"k-editor-table-cell-margin",label:i(n.cellMargin),editor:function(t,r){s._initNumericTextbox(e('').appendTo(t),"cellMargin",u,d,{placeholder:i(n.auto)})}},{colSpan:2,field:"k-editor-table-cells-padding",label:i(n.cellPadding),editor:function(t,r){s._initNumericTextbox(e('').appendTo(t),"cellPadding",u,d,{placeholder:i(n.auto)})}},{colSpan:1,field:"k-editor-cell-border-width",label:i(n.borderWidth),editor:function(t,r){s._initNumericTextbox(e('').appendTo(t),"borderWidth",u,d,{placeholder:i(n.auto)})}},{colSpan:1,field:"k-editor-cell-border-color",label:i(n.borderColor),editor:function(t,r){s._initColorPicker(e('').appendTo(t),"borderColor",u,d,{placeholder:i(n.auto)})}},{colSpan:2,field:"k-editor-cell-border-style",label:i(n.borderStyle),editor:function(t,n){s._initBorderStyleDropDown(e('').appendTo(t),"borderStyle",u,d,a)}},{colSpan:"full",field:"k-editor-cell-id",label:{text:i(n.id),optional:!0},editor:function(t,n){s._initInput(e('').appendTo(t),"id",u,d)}},{colSpan:"full",field:"k-editor-cell-css-class",label:{text:i(n.cssClass),optional:!0},editor:function(t,n){s._initInput(e('').appendTo(t),"className",u,d)}}]}).data("kendoForm")).layoutWrapper.addClass("k-gap-x-4"),r},_createAccessibilityPropertiesForm:function(t,n){var r,o=this,a=o.options.table,s=t.element.find("#k-accessibility-properties"),l=o.components.accessibilityView={},c=a.tableProperties;return(r=s.kendoForm({renderButtons:!1,layout:"grid",grid:{cols:4},items:[{colSpan:"full",field:"k-editor-id",label:{text:i(n.id),optional:!0},editor:function(t,n){o._initInput(e('').appendTo(t),"id",c,l)}},{colSpan:"full",field:"k-editor-css-class",label:{text:i(n.cssClass),optional:!0},editor:function(t,n){o._initInput(e('').appendTo(t),"className",c,l)}},{layout:"grid",grid:{cols:4,gutter:16},colSpan:"full",type:"group",label:"Accessibility",items:[{colSpan:2,field:"k-editor-table-caption",label:{text:i(n.caption),optional:!0},editor:function(t,n){o._initInput(e('').appendTo(t),"captionContent",c,l)}},{colSpan:2,field:"k-editor-accessibility-alignment",label:i(n.captionAlignment),editor:function(t,n){o._initAccessibilityAlignmentDropDown(e('').appendTo(t),c)}},{colSpan:1,field:"k-editor-table-header-rows",label:i(n.headerRows),editor:function(t,n){o._initNumericTextbox(e('').appendTo(t),"headerRows",c,l,{max:c.rows||4})}},{colSpan:1,field:"k-editor-table-header-columns",label:i(n.headerColumns),editor:function(t,n){o._initNumericTextbox(e('').appendTo(t),"headerColumns",c,l,{max:c.columns||4})}},{colSpan:2,field:"k-editor-cells-headers",label:i(n.associateCellsWithHeaders),editor:function(t,i){var r=e('").appendTo(t);o._initAssociationDropDown(r,"cellsWithHeaders",{valuePrimitive:!0},c,l)}},{colSpan:"full",field:"k-editor-accessibility-summary",label:{text:i(n.summary),optional:!0},editor:function(t,i){o._initTextArea(e('').appendTo(t),"summary",c,l,{rows:5,placeholder:n.tableSummaryPlaceholder})}}]}]}).data("kendoForm")).layoutWrapper.addClass("k-gap-x-4"),r}});n.ui.editor.TableWizardDialog=f}(window.kendo.jQuery);kendo;!function(e,t){var n=window,i=n.Math.min,r=n.kendo,o=r.caret,a=r.keys,s=r.ui,l=s.Widget,c=".kendoMaskedTextBox",d=e.isPlainObject,u=window.setTimeout,h="k-disabled",p="k-invalid",f="k-focus",m="disabled",g="readonly",v="change",_="mouseup",b="drop",w="keydown",y="paste",k="input";function x(e){return e+c}var C=x(r.support.propertyChangeEvent?"propertychange":k);var S=l.extend({init:function(t,n){var i,a=this;l.fn.init.call(a,t,n),a._rules=e.extend({},a.rules,a.options.rules),t=a.element,i=t[0],a._wrapper(),a._tokenize(),a._form(),a.element.addClass("k-input-inner").attr("autocomplete","off").on("focus"+c,(function(){var e=i.value;e?a._togglePrompt(!0):i.value=a._old=a._emptyMask,a._oldValue=e,a.wrapper.addClass(f),a._timeoutId=u((function(){o(t,0,e?a._maskLength:0)}))})).on("focusout"+c,(function(){var e=t.val();clearTimeout(a._timeoutId),i.value=a._old="",e!==a._emptyMask&&(i.value=a._old=e),a.wrapper.removeClass(f),a._change(),a._togglePrompt()})),a.options.mask&&a.options.mask.length>0&&a.element.attr("aria-placeholder",a.options.mask),t.is("[disabled]")||e(a.element).parents("fieldset").is(":disabled")?a.enable(!1):a.readonly(t.is("[readonly]")),a._validationIcon=e(r.ui.icon({icon:"exclamation-circle",iconClass:"k-input-validation-icon k-hidden"})).insertAfter(t),a.value(a.options.value||t.val()),a._label(),a._applyCssClasses(),r.notify(a)},options:{name:"MaskedTextBox",clearPromptChar:!1,unmaskOnPost:!1,promptChar:"_",culture:"",rules:{},value:"",mask:"",label:null,size:"medium",fillMode:"solid",rounded:"medium"},events:[v],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 n=this;l.fn.setOptions.call(n,t),n._rules=e.extend({},n.rules,n.options.rules),n._tokenize(),this._unbindInput(),this._bindInput(),n.value(n.element.val())},destroy:function(){var e=this;e.floatingLabel&&e.floatingLabel.destroy(),e.element.off(c),e._formElement&&(e._formElement.off("reset",e._resetHandler),e._formElement.off("submit",e._submitHandler)),l.fn.destroy.call(e)},raw:function(){return this._unmask(this.element.val(),0).replace(new RegExp(T(this.options.promptChar),"g"),"")},value:function(e){var n=this.element,i=this._emptyMask;return e===t?this.element.val():(null===e&&(e=""),i?(e=this._unmask(e+""),n.val(e?i:""),this._mask(0,this._maskLength,e),this._unmaskedValue=null,e=n.val(),this._oldValue=e,r._activeElement()!==n&&(e===i?n.val(""):this._togglePrompt()),void(this.floatingLabel&&this.floatingLabel.refresh())):(this._oldValue=e,void n.val(e)))},_togglePrompt:function(e){var t=this.element[0],n=t.value;this.options.clearPromptChar&&(n=e?this._oldValue:n.replace(new RegExp(T(this.options.promptChar),"g")," "),t.value=this._old=n)},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.floatingLabel&&this.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.floatingLabel&&this.floatingLabel.enable(e=e===t||e)},_bindInput:function(){var e=this;if(e._maskLength&&(e.options.$angular&&e.element.off(k),e.element.on(x(w),e._keydown.bind(e)).on(x(b),e._drop.bind(e)).on(x(v),e._trackChange.bind(e)).on(C,e._inputHandler.bind(e)),r.support.browser.msie)){var t=r.support.browser.version;if(t>8&&t<11){var n=[x(_),x(b),x(w),x(y)].join(" ");e.element.on(n,e._legacyIEInputHandler.bind(e))}}},_unbindInput:function(){var e=[C,x(w),x(_),x(b),x(y)].join(" ");this.element.off(e)},_editable:function(e){var t=this,n=t.element,i=t.wrapper,r=e.disable,o=e.readonly;t._unbindInput(),o||r?(n.attr(m,r).attr(g,o),i.toggleClass(h,r)):(n.prop(m,!1).prop(g,!1),i.removeClass(h),t._bindInput())},_change:function(){var e=this,t=e.value();t!==e._oldValue?(e._oldValue=t,e.trigger(v),e.element.trigger(v)):""===t&&e.__changing&&e.element.trigger(v)},inputChange:function(e){var t=this,n=t._old,a=t.element[0],s=a.value,l=o(a)[1],c=s.length-n.length,d=r.support.mobileOS;if(!(t.__dropping&&c<0)){-1===c&&d.android&&"chrome"===d.browser&&(e=!0);var u=i(l,function(e,t){for(var n=0;n0&&0===e.indexOf(n);)e=e.substring(1);return e},_findCaretPosBackwards:function(e){var t=this._find(e,!0);return t-1||e<=this._maskLength;){if(n.charAt(e)!==this.tokens[e])return e;e+=i}return-1},_mask:function(e,n,i,a){var s,l,c,d,u=this.element[0],h=u.value||this._emptyMask,p=this.options.promptChar,f=0;for((e=this._find(e,a))>n&&(n=e),l=this._unmask(h.substring(n),n),s=(i=this._unmask(i,e)).length,i&&(l=l.replace(new RegExp("^_{0,"+s+"}"),"")),i+=l,h=h.split(""),c=i.charAt(f);es&&(d=e),e=this._find(e+1);return u.value=this._old=h.join(""),r._activeElement()===u&&(d===t&&(d=this._maskLength),o(u,d)),d},_unmask:function(e,t){if(!e)return"";if(this._unmaskedValue===e)return this._unmaskedValue;var n,i;e=(e+"").split("");for(var o=0,a=t||0,s=this.options.promptChar,l=e.length,c=this.tokens.length,d="";a=l)););return this._unmaskedValue=d,d},_label:function(){var t,n,i=this,o=i.element,a=i.options,s=o.attr("id");null!==a.label&&(t=!!d(a.label)&&a.label.floating,n=d(a.label)?a.label.content:a.label,t&&(i._floatingLabelContainer=i.wrapper.wrap("").parent(),i.floatingLabel=new r.ui.FloatingLabel(i._floatingLabelContainer,{widget:i})),r.isFunction(n)&&(n=n.call(i)),n||(n=""),s||(s=a.name+"_"+r.guid(),o.attr("id",s)),i._inputLabel=e("'").insertBefore(i.wrapper))},_wrapper:function(){var e=this.element,t=e[0],n=e.wrap("").parent();n[0].style.cssText=t.style.cssText,t.style.width="100%",this.wrapper=n.addClass(t.className).removeClass("input-validation-error")},_blinkInvalidState:function(){var e=this;e._addInvalidState(),clearTimeout(e._invalidStateTimeout),e._invalidStateTimeout=u(e._removeInvalidState.bind(e),100)},_addInvalidState:function(){this.wrapper.addClass(p),this._validationIcon.removeClass("k-hidden")},_removeInvalidState:function(){var e=this;e.wrapper.removeClass(p),e._validationIcon.addClass("k-hidden"),e._invalidStateTimeout=null},_tokenize:function(){for(var e,t,n=[],i=0,o=(this.options.mask||"").split(""),a=o.length,s=0,l="",c=this.options.promptChar,d=r.getCulture(this.options.culture).numberFormat,u=this._rules;s "},titleBar:F((function(){return"
          Video Title
          "})),toolBar:function(){return"
          "},youtubePlayer:function(){return"
          "},toolBarTime:function(){return"00:00:00 / 00:00:00"},slider:function(){return""},volumeSlider:function(){return""},qualityDropDown:function(){return""},toolTip:function(e){var t=e.value;return""+n.toString(new Date(t),"HH:mm:ss")}},L=E.extend({init:function(t,i){this.wrapper=e(t),E.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.fullScreen&&this.fullScreen(!0),i.media&&this.media(this.options.media),n.notify(this)},events:[i,r,o,a,s,l],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(e){var t=new Date(z.getTime());return t.setSeconds(e),t},_timeToSec:function(e){return new Date(e).getTime()/1e3},_createTitlebar:function(){this._titleBar=this.wrapper.find(C+v),0===this._titleBar.length&&(this.wrapper.append(B.titleBar),this._titleBar=this.wrapper.find(C+v))},_createSlider:function(){var e=this.wrapper.find(C+b);this._slider||(this._sliderDragChangeHandler=this._sliderDragChange.bind(this),this._sliderDraggingHandler=this._sliderDragging.bind(this),e=this.wrapper.find(C+b),this._slider=new D.Slider(e[0],{smallStep:1e3,tickPlacement:"none",showButtons:!1,change:this._sliderDragChangeHandler,slide:this._sliderDraggingHandler,tooltip:{template:B.toolTip},dragHandleTitle:this.options.messages.time}))},_createVolumeSlider:function(){var e=this.wrapper.find(C+w);this._volumeSlider||(this._volumeDraggingHandler=this._volumeDragging.bind(this),this._volumeChangeHandler=this._volumeChange.bind(this),e.width(87),this._volumeSlider=new D.Slider(e[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:this.options.messages.volume}))},_resetTime:function(){this._youTubeVideo?this._ytmedia.seekTo(0,!0):this._media.currentTime=0,this._mediaTimeUpdate(),e.grep(this._toolBar.options.items,(function(e){return!!e.template})).template=B.toolBarTime},_currentUrl:function(){var e=this.media();return A(e.source)?e.source[this._currentIndex].url:e.source},_isYouTubeUrl:function(){return!!this._currentUrl().match("youtube.com/|youtu.be/")},_setPlayerUrl:function(){var e=this._youTubeVideo;this.stop(),this._youTubeVideo=this._isYouTubeUrl(),e!==this._youTubeVideo&&(this.wrapper.find(C+x).toggle(),this.wrapper.find(C+y).toggle());var t=this._media||this._ytmedia;this._initializePlayer(),t&&(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(C+y+" > source").remove(),this.wrapper.find(C+y).attr("src",this._currentUrl()),this.options.autoPlay&&this.play())},_createToolbar:function(){var t=this.wrapper.find(C+_);0===t.length&&(this._toolbarClickHandler=this._toolbarClick.bind(this),this.wrapper.append(B.toolBar),(t=this.wrapper.find(C+_)).width(this.wrapper.find(C+y).width()),this._toolBar=new D.ToolBar(t,{click:this._toolbarClickHandler,resizable:!1,items:[{type:"button",attributes:{class:"k-play-button"},icon:"play",fillMode:"flat"},{template:B.toolBarTime,attributes:{class:"k-mediaplayer-currenttime-wrap"}},{type:"spacer"},{type:"button",attributes:{class:"k-volume-button"},icon:"volume-up",fillMode:"flat"},{template:B.volumeSlider,attributes:{class:"k-mediaplayer-volume-wrap"}},{template:B.qualityDropDown,attributes:{class:"k-mediaplayer-quality-wrap"}},{type:"button",attributes:{class:"k-fullscreen-button"},icon:"fullscreen",fillMode:"flat"}]}),this._toolBar.wrapper.off("keydown"),t.before(B.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(S),this.options.autoPlay&&this._playStateToggle(!0),!1===n.support.cssFlexbox&&e([this._volumeButton[0],t.find(".k-mediaplayer-volume-wrap")[0],t.find(".k-mediaplayer-quality-wrap")[0],this._fullscreenButton[0]]).wrapAll("
          "))},_createDropDown:function(){var e=n.ui.icon("hd"),t=this.wrapper.find(C+f),i=this.media();void 0===t.data("kendoDropDownList")&&(this._dropDownSelectHandler=this._dropDownSelect.bind(this),this._dropDown=new D.DropDownList(t,{dataTextField:"quality",dataValueField:"url",popup:{position:"bottom",origin:"top",appendTo:this.wrapper},animation:{open:{effects:"slideIn:up",duration:1}},select:this._dropDownSelectHandler}),i&&A(i.source)&&(this._dropDown.setDataSource(i.source),this._dropDown.select(0)),this._dropDown.wrapper.addClass("k-button k-button-md k-rounded-md k-button-flat k-button-flat-base"),this._dropDown.wrapper.attr("title",this.options.messages.quality).hide(),this._dropDown.wrapper.find('span[class*="i-caret-alt-down"]').replaceWith(e),this._dropDown.list.addClass("k-quality-list"))},_dropDownSelect:function(e){this._currentIndex!==e.item.index()&&(this._currentIndex=e.item.index(),this._setPlayerUrl())},_toolbarClick:function(t){var i=e(t.target).children().first(),r=i.is(S);if(this.media()&&((i.is(S)||i.is('span[class*="i-pause"]'))&&(r?this.play():this.pause()),(i.is(T)||i.is('span[class*="i-fullscreen-exit"]'))&&(this._isInFullScreen?(n.ui.icon(i,{icon:c}),this.fullScreen(!1)):(n.ui.icon(i,{icon:d}),this.fullScreen(!0))),i.is('span[class*="i-volume-mute"]')||i.is('span[class*="i-volume-down"]')||i.is('span[class*="i-volume-up"]'))){var o=this.mute();this.mute(!o)}},_sliderDragging:function(){this.media()&&(this._isDragging=!0)},_sliderDragChange:function(e){var t=this,n=e.sender,i=1e3*M;this.media()&&(t._sliderChangeFired=!0,t._isDragging=!1,!this.options.forwardSeek&&n.value()>this._seekBarLastPosition?setTimeout((function(){n.value(t._seekBarLastPosition)}),1):this._youTubeVideo?t._ytmedia.seekTo(t._timeToSec(e.value-i)):t._media.currentTime=t._timeToSec(e.value-i),t.trigger(s),t._preventPlay=!0)},_changeVolumeButtonImage:function(e){var t=this._volumeButton,i=t.find("span");0===e?(n.ui.icon(i,{icon:u}),t.attr("title",this.options.messages.unmute),t.attr("aria-label",this.options.messages.unmute)):e>0&&e<51?(n.ui.icon(i,{icon:h}),t.attr("title",this.options.messages.mute),t.attr("aria-label",this.options.messages.mute)):(n.ui.icon(i,{icon:p}),t.attr("title",this.options.messages.mute),t.attr("aria-label",this.options.messages.mute))},_volumeDragging:function(e){this.media()&&(this.volume(e.value),this._changeVolumeButtonImage(e.value),this.trigger(l))},_volumeChange:function(e){this.media()&&(this.volume(e.value),this._changeVolumeButtonImage(e.value),this.trigger(l))},_mediaTimeUpdate:function(){var e=this._youTubeVideo?this._ytmedia.getCurrentTime():this._media.currentTime;e=e||0;var t=this._msToTime(e);return this._currentTimeElement.text(n.toString(t,this._timeFormat)),this._isDragging||(this._seekBarLastPosition=1e3*(e+M),this._slider.value(this._seekBarLastPosition)),this.isPlaying()},_playStateToggle:function(e){void 0===e&&(e=this._playButtonSpan.is(S)),e?(n.ui.icon(this._playButtonSpan,{icon:g}),this._playButton.attr("title",this.options.messages.pause),this._playButton.attr("aria-label",this.options.messages.pause)):(n.ui.icon(this._playButtonSpan,{icon:m}),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(n.toString(this._msToTime(0),this._timeFormat)),this._slider.value(1e3*(0+M)),this.trigger(i)},_mediaPlay:function(){this.trigger(o)},_mediaReady:function(){this.trigger(a)},_mediaDurationChange:function(){var e=this._msToTime(this._youTubeVideo?this._ytmedia.getDuration():this._media.duration);this._timeFormat=0===e.getHours()?H:R,this._durationElement.text(n.toString(e,this._timeFormat)),this._slider.setOptions({min:z.getTime(),max:e.getTime()}),this._isFirstRun||(this._resetTime(),this._isFirstRun=!0)},_createYoutubePlayer:function(){this._mediaTimeUpdateHandler=this._mediaTimeUpdate.bind(this),this._mediaDurationChangeHandler=this._mediaDurationChange.bind(this),this.wrapper.prepend(B.youtubePlayer),this._ytPlayer=this.wrapper.find(C+x)[0],e(this._ytPlayer).css({width:this.wrapper.width(),height:this.wrapper.height()}),window.YT&&window.YT.Player?this._configurePlayer():(window.onYouTubeIframeAPIReadyRegister||(window.onYouTubeIframeAPIReadyRegister=[],e.getScript("https://www.youtube.com/iframe_api"),window.onYouTubeIframeAPIReady=function(){if(window.onYouTubeIframeAPIReadyRegister)for(var e=0;e
          "),this._videoOverlay=this.wrapper.find(".k-mediaplayer-overlay").on("click"+I,this._mouseClickHanlder)),this._mediaTimeUpdateHandler=this._mediaTimeUpdate.bind(this),this._mediaDurationChangeHandler=this._mediaDurationChange.bind(this),this._mediaEndedHandler=this._mediaEnded.bind(this),this._mediaCanPlayHandler=this._mediaReady.bind(this),this._mediaPlayHandler=this._mediaPlay.bind(this),this._videoOverlay.after(B.htmlPlayer),this._media=this.wrapper.find(C+y)[0],e(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,this._media.loop=this.options.autoRepeat},_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(e){var t="slow",n=this._titleBar.add(this._toolBar.element.parent());e?n.fadeIn(t):(n.fadeOut(t),this.options.navigatable&&this.wrapper.trigger("focus"))},setOptions:function(e){E.fn.setOptions.call(this,e)},destroy:function(){E.fn.destroy.call(this),this.isPaused()||this.pause(),this.element.off(I),this.element.find(C+k).off(I),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),n.destroy(this.element)},seek:function(e){if(void 0===e)return 1e3*this._youTubeVideo?this._ytmedia.getCurrentTime():this._media?this._media.currentTime:0;var t=e/1e3;return this._youTubeVideo?t+3>=this._ytmedia.getDuration()|0?this._ytmedia.seekTo(this._ytmedia.getDuration()-3|0,!0):this._ytmedia.seekTo(t,!0):this._media.currentTime=t,this},play:function(){return this._youTubeVideo?this._ytmedia.playVideo():(n.support.mobileOS&&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&&(n.support.mobileOS&&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():(n.support.mobileOS&&this._uiDisplay(!0),this._media.pause()),this._paused=!0,this._playStateToggle(!1),this.trigger(r),this},toolbar:function(){return this._toolBar},dropdown:function(){return this._dropDown},titlebar:function(){return this._titleBar},fullScreen:function(e){if(void 0===e)return this._isInFullScreen||!1;var t=this.element.get(0);e?(this.element.addClass("k-mediaplayer-fullscreen"),t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.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(e){if(void 0===e)return void 0!==this._volume?this._volume:this._volume=this.options.volume;this._volume=e,this.mute(e<=0),this._youTubeVideo?this._ytmedia.setVolume(this._volume):this._media.volume=this._volume/100,this._volumeSlider.value(e)},mute:function(e){var t=this._youTubeVideo?this._ytmedia&&this._ytmedia.isMuted():this._media&&this._media.muted;if(void 0===e||e===t)return t;this._youTubeVideo?e?this._ytmedia.mute():this._ytmedia.unMute():this._media.muted=e,e?this._volumeSlider.value(0):this._volumeSlider.value(this._media&&100*this._media.volume||this._ytmedia&&this._ytmedia.getVolume()),this.trigger(l),this._changeVolumeButtonImage(this._volumeSlider.value())},isEnded:function(){return this._youTubeVideo?0===this._ytmedia.getPlayerState():this._media.ended},media:function(e){var t=this.dropdown();if(void 0===e)return void 0!==this._mediaData?this._mediaData:this._mediaData=this.options.media;A(e.source)?(t.setDataSource(e.source),t.wrapper.show()):t.wrapper.hide(),this._mediaData=e,this._updateTitle(),this._setPlayerUrl()},isPaused:function(){return this._paused},isPlaying:function(){return!this.isEnded()&&!this._paused},_aria:function(){this.wrapper.attr("role","region")},_navigatable:function(){this._fullscreenHandler=this._fullscreen.bind(this),e(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange"+I,this._fullscreenHandler),this.options.navigatable&&(this.wrapper.attr("tabIndex",0),this._keyDownHandler=this._keyDown.bind(this),this.wrapper.on("keydown"+I,this._keyDownHandler))},_fullscreen:function(){var e=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen,t=this.wrapper.find(T);this._uiDisplay(!0),this._slider.resize(),e||(n.ui.icon(t,{icon:c}),this.fullScreen(!1))},_keyDown:function(e){e.preventDefault();var t=this.wrapper.find(T);if(e.keyCode===P.SPACEBAR)this.isPlaying()?this.pause():this.play();else if(e.keyCode!==P.ENTER||this._isInFullScreen)if(77===e.keyCode){var i=this.mute();this.mute(!i)}else e.keyCode===P.ESC&&this._isInFullScreen&&(n.ui.icon(t,{icon:c}),this.fullScreen(!1));else n.ui.icon(t,{icon:d}),this.fullScreen(!0)},_error:function(){},_progress:function(){}});D.plugin(L)}(window.kendo.jQuery);kendo;window.kendo.pivotgrid=window.kendo.pivotgrid||{},window.kendo.pivotgrid.common=function(e){var t={contains:', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}") > 0',doesnotcontain:', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}")',endswith:', Right({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',eq:', {0}.CurrentMember.MEMBER_CAPTION = "{1}"',neq:', {0}.CurrentMember.MEMBER_CAPTION = "{1}"',startswith:', Left({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"'},n="doesnotcontain",i="in",r="neq";function o(e){var o="",a=String(e.value),s=e.field,l=e.operator;return l===i?(o+="{",o+=a,o+="}"):(o+=l===r||l===n?"-":"",o+="Filter(",o+=s+".MEMBERS",o+=function(e){for(var t=arguments,n=[],i=1;i1)i.push(a);else{for(var l=u(s[0]),c=0,d=r.length;c1||t.length>1){for(h.push(c(s,t));f1&&n.push("{"+s(t).join(",")+"}"),h(n)}function d(e,t){var n=e.length-1,i=e[n],r=function(e,t){for(var n=0,i=e.length;n2?t[0]+"."+t[1]:e}function h(e){var t,n="CROSSJOIN({";return e.length>2?(t=e.pop(),n+=h(e)):(n+=e.shift(),t=e.pop()),n+="},{",n+=t,n+="})"}function p(e){var t='
          ',n=e.columnAxes,i=void 0===n?[]:n,r=e.rowAxes,l=void 0===r?[]:r,c=e.measureAxes,d=void 0===c?[]:c,u=e.sort,h=void 0===u?[]:u,p=e.filter,f=void 0===p?[]:p,m="rows"===e.measuresAxis;return t+="SELECT NON EMPTY {",!i.length&&l.length&&(!d.length||d.length&&m)&&(i=l,l=[],m=!1),i.length||l.length||(m=!1),i.length?t+=a(i,m?[]:d,h):d.length&&!m&&(t+=s(d).join(",")),t+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS",(l.length||m&&d.length>1)&&(t+=", NON EMPTY {",l.length?t+=a(l,m?d:[],h):t+=s(d).join(","),t+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON ROWS"),f.length?(t+=" FROM ",t+="(",t+=function(e,t){for(var n="",i="",r=e.length-1;r>=0;r--)i="SELECT (",i+=o(e[r]),i+=") ON 0",n=r===e.length-1?i+=" FROM ["+t+"]":i+" FROM ( "+n+" )";return n}(f,e.connection.cube),t+=")"):t+=" FROM ["+e.connection.cube+"]",1===d.length&&i.length&&(t+=" WHERE ("+s(d).join(",")+")"),(t+=""+e.connection.catalog+"Multidimensional").replace(/&/g,"&")}var f=function(){return f=Object.assign||function(e){for(var t,n=arguments,i=1,r=arguments.length;i0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1] Cell")).map((function(e){return{fmtValue:b(e,"FmtValue"),ordinal:parseInt(e.getAttribute("CellOrdinal"),10),value:b(e,"Value")}})),r={tuples:[]},o={tuples:[]},a=[];n.forEach((function(e){if("SlicerAxis"!==e.getAttribute("name")){var t=0===r.tuples.length?r.tuples:o.tuples;Array.prototype.push.apply(t,function(e){return Array.from(e.querySelectorAll("Tuple")).map((function(e){return{members:Array.from(e.querySelectorAll("Member")).map((function(e){var t=parseInt(b(e,"LNum")||"0",10),n=parseInt(b(e,"CHILDREN_CARDINALITY")||"0",10)>0;return{caption:b(e,"Caption"),children:[],hasChildren:n,hierarchy:e.getAttribute("Hierarchy"),levelName:b(e,"LName"),levelNum:t,name:b(e,"UName"),parentName:b(e,"PARENT_UNIQUE_NAME")}}))}}))}(e))}}));var s=new Array(o.tuples.length*r.tuples.length).fill(null);i.forEach((function(e){s[e.ordinal]=e}));var l=0;return o.tuples.forEach((function(e){r.tuples.forEach((function(t){a.push({columnTuple:t,data:s[l],rowTuple:e}),l++}))})),{columns:r,data:a,rows:o}}function b(e,t){var n=e.querySelector(t);return n?n.textContent:""}var w={schemaCatalogs:"DBSCHEMA_CATALOGS",schemaCubes:"MDSCHEMA_CUBES",schemaDimensions:"MDSCHEMA_DIMENSIONS",schemaHierarchies:"MDSCHEMA_HIERARCHIES",schemaKPIs:"MDSCHEMA_KPIS",schemaLevels:"MDSCHEMA_LEVELS",schemaMeasures:"MDSCHEMA_MEASURES",schemaMembers:"MDSCHEMA_MEMBERS"};function y(e){var t={},n='
          ';return n+=""+(w[e.command]||e.command)+"",n+=""+k("RestrictionList",e.restrictions,!0)+"",e.connection&&e.connection.catalog&&(t.Catalog=e.connection.catalog),n+=""+k("PropertyList",t,!1)+"",n+=""}function k(e,t,n){var i="";if(t){i+="<"+e+">";var r=void 0;for(var o in t)t[o]&&(r=t[o],n&&(o=o.replace(/([A-Z]+(?=$|[A-Z][a-z])|[A-Z]?[a-z]+)/g,"$1_").toUpperCase().replace(/_$/,"")),i+="<"+o+">"+r+"");i+=""}else i+="<"+e+"/>";return i}var x={schemaCatalogs:function(e){var t=(new DOMParser).parseFromString(e,"text/xml");return Array.from(t.querySelectorAll("DiscoverResponse > return > root > row")).map((function(e){return{name:b(e,"CATALOG_NAME"),description:b(e,"DESCRIPTION")}}))},schemaCubes:function(e){var t=(new DOMParser).parseFromString(e,"text/xml");return Array.from(t.querySelectorAll("DiscoverResponse > return > root > row")).map((function(e){return{name:b(e,"CUBE_NAME"),caption:b(e,"CUBE_CAPTION"),description:b(e,"DESCRIPTION"),type:b(e,"CUBE_TYPE")}}))},schemaDimensions:function(e){var t=(new DOMParser).parseFromString(e,"text/xml");return Array.from(t.querySelectorAll("DiscoverResponse > return > root > row")).map((function(e){return{caption:b(e,"DIMENSION_CAPTION"),defaultHierarchy:b(e,"DEFAULT_HIERARCHY"),description:b(e,"DESCRIPTION"),name:b(e,"DIMENSION_NAME"),type:parseInt(b(e,"DIMENSION_TYPE"),10),uniqueName:b(e,"DIMENSION_UNIQUE_NAME")}}))},schemaHierarchies:function(e){var t=(new DOMParser).parseFromString(e,"text/xml");return Array.from(t.querySelectorAll("DiscoverResponse > return > root > row")).map((function(e){return{name:b(e,"HIERARCHY_NAME"),caption:b(e,"HIERARCHY_CAPTION"),description:b(e,"DESCRIPTION"),uniqueName:b(e,"HIERARCHY_UNIQUE_NAME"),dimensionUniqueName:b(e,"DIMENSION_UNIQUE_NAME"),displayFolder:b(e,"HIERARCHY_DISPLAY_FOLDER"),origin:b(e,"HIERARCHY_ORIGIN"),defaultMember:b(e,"DEFAULT_MEMBER")}}))},schemaKPIs:function(e){var t=(new DOMParser).parseFromString(e,"text/xml");return Array.from(t.querySelectorAll("DiscoverResponse > return > root > row")).map((function(e){return{name:b(e,"KPI_NAME"),uniqueName:b(e,"KPI_NAME"),caption:b(e,"KPI_CAPTION"),value:b(e,"KPI_VALUE"),goal:b(e,"KPI_GOAL"),status:b(e,"KPI_STATUS"),trend:b(e,"KPI_TREND"),statusGraphic:b(e,"KPI_STATUS_GRAPHIC"),trendGraphic:b(e,"KPI_TREND_GRAPHIC"),description:b(e,"KPI_DESCRIPTION"),groupName:b(e,"MEASUREGROUP_NAME"),type:"kpi"}}))},schemaLevels:function(e){var t=(new DOMParser).parseFromString(e,"text/xml");return Array.from(t.querySelectorAll("DiscoverResponse > return > root > row")).map((function(e){return{name:b(e,"LEVEL_NAME"),caption:b(e,"LEVEL_CAPTION"),description:b(e,"DESCRIPTION"),uniqueName:b(e,"LEVEL_UNIQUE_NAME"),dimensionUniqueName:b(e,"DIMENSION_UNIQUE_NAME"),displayFolder:b(e,"LEVEL_DISPLAY_FOLDER"),orderingProperty:b(e,"LEVEL_ORDERING_PROPERTY"),origin:b(e,"LEVEL_ORIGIN"),hierarchyUniqueName:b(e,"HIERARCHY_UNIQUE_NAME")}}))},schemaMeasures:function(e){var t=(new DOMParser).parseFromString(e,"text/xml");return Array.from(t.querySelectorAll("DiscoverResponse > return > root > row")).map((function(e){return{name:b(e,"MEASURE_NAME"),caption:b(e,"MEASURE_CAPTION"),uniqueName:b(e,"MEASURE_UNIQUE_NAME"),description:b(e,"DESCRIPTION"),aggregator:b(e,"MEASURE_AGGREGATOR"),groupName:b(e,"MEASUREGROUP_NAME"),displayFolder:b(e,"MEASURE_DISPLAY_FOLDER"),defaultFormat:b(e,"DEFAULT_FORMAT_STRING")}}))},schemaMembers:function(e){var t=(new DOMParser).parseFromString(e,"text/xml");return Array.from(t.querySelectorAll("DiscoverResponse > return > root > row")).map((function(e){return{name:b(e,"MEMBER_NAME"),caption:b(e,"MEMBER_CAPTION"),uniqueName:b(e,"MEMBER_UNIQUE_NAME"),dimensionUniqueName:b(e,"DIMENSION_UNIQUE_NAME"),hierarchyUniqueName:b(e,"HIERARCHY_UNIQUE_NAME"),levelUniqueName:b(e,"LEVEL_UNIQUE_NAME"),childrenCardinality:b(e,"CHILDREN_CARDINALITY")}}))}},C=function(e,t){return void 0===t&&(t=new Set),(e.children||[]).forEach((function(e){t.add(e.levelName),C(e,t)})),t.size},S=function(e){var t=0;return(e.children||[]).forEach((function(e){t+=S(e)||1})),t},T=function(e,t){return(t&&t.hierarchy===e.hierarchy?v((t.normalizedPath||[]).slice(0,-1),[e.name||null]):v(t&&t.normalizedPath?t.normalizedPath:[],[e.name])).filter(Boolean)},D=function(e,t,n,i,r,o,a,s){void 0===t&&(t=-1),void 0===n&&(n=0),void 0===i&&(i=void 0),void 0===r&&(r=void 0),void 0===o&&(o=void 0),void 0===a&&(a=void 0),void 0===s&&(s=void 0);var l=C(e),c=S(e),d=i||l,u=r||c,h=o?o.slice():[],p=a?a.slice():new Array(u),f=h.findIndex((function(t){return t&&t.name===e.levelName&&t.level===e.levelNum})),m=h[f],g={name:e.levelName,level:e.levelNum,index:t,cells:new Array(u).fill(null)},v=-1!==t&&-1!==n,_={caption:e.caption,name:e.name,levelName:e.levelName,levelNum:e.levelNum,hasChildren:e.hasChildren,parentName:e.parentName,hierarchy:e.hierarchy,total:void 0!==e.total&&e.total||s&&s.children.length<=1&&s.total,parent:s,rowIndex:t,colIndex:n,depth:1,breadth:1,path:e.path||[],normalizedPath:e.normalizedPath||[],children:e.children.filter((function(t){return t.hierarchy===e.hierarchy}))};if(v)if(m)m.cells[n]=_,m.index>=t&&(t=m.index);else if(h[t]&&h[t].cells.length){for(var b=t;b=1&&t&&!t.children.some((function(e){return e.total&&e.name===r.name}))&&!e.total){var s=e.children[0].hierarchy;e.hierarchy===s&&t.children.splice(n+1,0,r)}return e};function z(e){return JSON.parse(JSON.stringify(e))}var M=function(e,t,n){return{hierarchyUniqueName:e,uniqueName:t,caption:t,measure:t,name:t,type:n,kpi:!0}};function E(e){var t=e.name;return[M(t,e.value,"value"),M(t,e.goal,"goal"),M(t,e.status,"status"),M(t,e.trend,"trend")]}var A,H=function(e,t){return String(e.name)===String([t.defaultHierarchy?t.defaultHierarchy:t.uniqueName])},R=function(e,t){return String(e.name)===String(t.name)},F=function(e,t){for(var n=function(n){var i=e[n],r=i.name.findIndex((function(e){return H({name:[e]},t)||String(e).startsWith(t.uniqueName)}));if(-1!==r)if(r===i.name.length-1||1===i.name.length)e.splice(n,1);else{i.name.splice(r,1);var o=e.findIndex((function(e){return e!==i&&String(e.name)===String(i.name)}));-1!==o&&(e[o]=f(f(f({},e[o]),i),e[o].expand||i.expand?{expand:!0}:{}),e.splice(n,1))}},i=e.length-1;i>=0;i--)n(i)},P=function(e,t,n){var i=-1;if(n.dropTarget&&n.dropDirection){var r=n.dropDirection?"before"===n.dropDirection?0:1:0;i=e.findIndex((function(e){return R(e,n.dropTarget)}))+r}-1!==i?(e.forEach((function(e){var n;e.expand&&e.name.length>1&&e.name.length>i&&(n=e.name).splice.apply(n,v([i,0],t.name))})),e.splice(i,0,t)):e.push(t)};e.HEADERS_ACTION=void 0,(A=e.HEADERS_ACTION||(e.HEADERS_ACTION={})).toggle="HEADERS_ACTION_TOGGLE",A.expand="HEADERS_ACTION_EXPAND",A.collapse="HEADERS_ACTION_COLLAPSE";var B,L=function(e,t,n){var i=new Set;return e.children.forEach((function(e){var r=t(e);n&&i.add(String(e.path)),L(e,t,n||r).map((function(e){i.add(e)}))})),Array.from(i.values())},V=function(t,n){switch(n.type){case e.HEADERS_ACTION.toggle:var i=t.find((function(e){return String(e.name)===String(n.payload)}));return V(t,f(f({},n),{type:i&&i.expand?e.HEADERS_ACTION.collapse:e.HEADERS_ACTION.expand}));case e.HEADERS_ACTION.expand:var r=t.find((function(e){return String(e.name)===String(n.payload)}));if(r&&!0===r.expand)return t;if(!r||!1!==r.expand&&void 0!==r.expand){var o=t.slice();return o.push({name:n.payload,expand:!0}),o}return t.map((function(e){return e===r?f(f({},r),{expand:!0}):e}));case e.HEADERS_ACTION.collapse:var a=L(n.tree,(function(e){return!e.total&&String(e.path)===String(n.payload)}));return t.slice().filter((function(e){return!a.some((function(t){return t===String(e.name)}))})).map((function(e){return f(f({},e),{expand:Boolean(e.expand)})})).map((function(e){return String(e.name)===String(n.payload)?n.payload.length>1?void 0:{name:n.payload,expand:!1}:e})).filter(Boolean);default:return t}};e.PIVOT_CONFIGURATOR_ACTION=void 0,(B=e.PIVOT_CONFIGURATOR_ACTION||(e.PIVOT_CONFIGURATOR_ACTION={})).toggleSelection="PIVOT_CONFIGURATOR_ACTION_TOGGLE_SELECTION",B.addColumnAxis="PIVOT_CONFIGURATOR_ACTION_ADD_COLUMN_AXIS",B.addColumnAxes="PIVOT_CONFIGURATOR_ACTION_ADD_COLUMN_AXES",B.removeColumnAxis="PIVOT_CONFIGURATOR_ACTION_REMOVE_COLUMN_AXIS",B.removeColumnAxes="PIVOT_CONFIGURATOR_ACTION_REMOVE_COLUMN_AXES",B.addRowAxis="PIVOT_CONFIGURATOR_ACTION_ADD_ROW_AXIS",B.addRowAxes="PIVOT_CONFIGURATOR_ACTION_ADD_ROW_AXES",B.removeRowAxis="PIVOT_CONFIGURATOR_ACTION_REMOVE_ROW_AXIS",B.removeRowAxes="PIVOT_CONFIGURATOR_ACTION_REMOVE_ROW_AXES",B.addMeasureAxis="PIVOT_CONFIGURATOR_ACTION_ADD_MEASURE_AXIS",B.addMeasureAxes="PIVOT_CONFIGURATOR_ACTION_ADD_MEASURE_AXES",B.removeMeasureAxis="PIVOT_CONFIGURATOR_ACTION_REMOVE_MEASURE_AXIS",B.removeMeasureAxes="PIVOT_CONFIGURATOR_ACTION_REMOVE_MEASURE_AXES",B.remove="PIVOT_CONFIGURATOR_ACTION_REMOVE",B.setSort="PIVOT_CONFIGURATOR_ACTION_SET_SORT",B.setFilter="PIVOT_CONFIGURATOR_ACTION_SET_FILTER",B.addFilter="PIVOT_CONFIGURATOR_ACTION_ADD_FILTER",B.changeFilter="PIVOT_CONFIGURATOR_ACTION_CHANGE_FILTER",B.removeFilter="PIVOT_CONFIGURATOR_ACTION_REMOVE_FILTER",B.setDragItem="PIVOT_CONFIGURATOR_ACTION_SET_DRAGITEM",B.drop="PIVOT_CONFIGURATOR_ACTION_DROP",B.setDropZone="PIVOT_CONFIGURATOR_ACTION_SET_DROP_ZONE",B.setDropTarget="PIVOT_CONFIGURATOR_ACTION_SET_DROP_TARGET",B.setDropDirection="PIVOT_CONFIGURATOR_ACTION_SET_DROP_DIRECTION";var O=function(t,n){var i,r,o,a,s,l,c,d,u;switch(n.type){case e.PIVOT_CONFIGURATOR_ACTION.toggleSelection:if(!Array.isArray(n.payload)){var h=n.payload;if(2===h.type||"aggregator"in h)return t.measureAxes.some((function(e){return H(e,h)}))?O(t,f(f({},n),{type:e.PIVOT_CONFIGURATOR_ACTION.removeMeasureAxis})):O(t,f(f({},n),{type:e.PIVOT_CONFIGURATOR_ACTION.addMeasureAxis}));if("kpi"===h.type){var p=E(h);return p.every((function(e){return t.measureAxes.some((function(t){return H(t,e)}))}))?O(t,f(f({},n),{type:e.PIVOT_CONFIGURATOR_ACTION.removeMeasureAxes,payload:p})):O(t,f(f({},n),{type:e.PIVOT_CONFIGURATOR_ACTION.addMeasureAxes,payload:p.filter((function(e){return!t.measureAxes.some((function(t){return H(t,e)}))}))}))}return n.payload.kpi?t.measureAxes.some((function(e){return H(e,h)}))?O(t,f(f({},n),{type:e.PIVOT_CONFIGURATOR_ACTION.removeMeasureAxis})):O(t,f(f({},n),{type:e.PIVOT_CONFIGURATOR_ACTION.addMeasureAxis})):t.columnAxes.some((function(e){return H(e,h)}))?O(t,f(f({},n),{type:e.PIVOT_CONFIGURATOR_ACTION.removeColumnAxis})):t.rowAxes.some((function(e){return H(e,h)}))?O(t,f(f({},n),{type:e.PIVOT_CONFIGURATOR_ACTION.removeRowAxis})):!t.columnAxes||!t.columnAxes.length||t.rowAxes&&t.rowAxes.length?O(t,f(f({},n),{type:e.PIVOT_CONFIGURATOR_ACTION.addColumnAxis})):O(t,f(f({},n),{type:e.PIVOT_CONFIGURATOR_ACTION.addRowAxis}))}break;case e.PIVOT_CONFIGURATOR_ACTION.addColumnAxis:r=v(t.columnAxes||[],[{name:[n.payload.defaultHierarchy||n.payload.uniqueName]}]);break;case e.PIVOT_CONFIGURATOR_ACTION.addColumnAxes:break;case e.PIVOT_CONFIGURATOR_ACTION.removeColumnAxis:r=v((t.columnAxes||[]).filter((function(e){return!H(e,n.payload)}))),F(r,n.payload);break;case e.PIVOT_CONFIGURATOR_ACTION.removeColumnAxes:break;case e.PIVOT_CONFIGURATOR_ACTION.addRowAxis:i=v(t.rowAxes||[],[{name:[n.payload.defaultHierarchy||n.payload.uniqueName]}]);break;case e.PIVOT_CONFIGURATOR_ACTION.addRowAxes:break;case e.PIVOT_CONFIGURATOR_ACTION.removeRowAxis:i=v((t.rowAxes||[]).filter((function(e){return!H(e,n.payload)}))),F(i,n.payload);break;case e.PIVOT_CONFIGURATOR_ACTION.removeRowAxes:break;case e.PIVOT_CONFIGURATOR_ACTION.addMeasureAxis:o=v(t.measureAxes||[],[{name:[n.payload.defaultHierarchy||n.payload.uniqueName]}]);break;case e.PIVOT_CONFIGURATOR_ACTION.removeMeasureAxis:o=v((t.measureAxes||[]).filter((function(e){return!H(e,n.payload)})));break;case e.PIVOT_CONFIGURATOR_ACTION.addMeasureAxes:o=v(t.measureAxes||[],(n.payload||[]).map((function(e){return{name:[e.defaultHierarchy||e.uniqueName]}})));break;case e.PIVOT_CONFIGURATOR_ACTION.removeMeasureAxes:o=v((t.measureAxes||[]).filter((function(e){return!n.payload.some((function(t){return H(e,t)}))})));break;case e.PIVOT_CONFIGURATOR_ACTION.remove:t.columnAxes.some((function(e){return R(e,n.payload)}))&&(r=v(t.columnAxes.filter((function(e){return!R(e,n.payload)}))),F(r,{uniqueName:n.payload.name})),t.rowAxes.some((function(e){return R(e,n.payload)}))&&(i=v(t.rowAxes.filter((function(e){return!R(e,n.payload)}))),F(i,{uniqueName:n.payload.name})),t.measureAxes.some((function(e){return R(e,n.payload)}))&&(o=v(t.measureAxes.filter((function(e){return!R(e,n.payload)}))));break;case e.PIVOT_CONFIGURATOR_ACTION.setDragItem:l=n.payload;break;case e.PIVOT_CONFIGURATOR_ACTION.setDropZone:c=n.payload;break;case e.PIVOT_CONFIGURATOR_ACTION.setDropTarget:u=n.payload;break;case e.PIVOT_CONFIGURATOR_ACTION.setDropDirection:d=n.payload;break;case e.PIVOT_CONFIGURATOR_ACTION.drop:if(t.dragItem&&t.dropZone){var m=t.columnAxes.find((function(e){return R(e,n.payload)})),g=t.rowAxes.find((function(e){return R(e,n.payload)})),_=t.measureAxes.find((function(e){return R(e,n.payload)})),b=void 0;switch(m&&(b=m,r=v(t.columnAxes.filter((function(e){return!R(e,n.payload)}))),F(r,{uniqueName:n.payload.name})),g&&(b=g,i=v(t.rowAxes.filter((function(e){return!R(e,n.payload)}))),F(i,{uniqueName:n.payload.name})),_&&(b=_,o=v(t.measureAxes.filter((function(e){return!R(e,n.payload)})))),t.dropZone){case"columnAxes":r=r||t.columnAxes.slice(),P(r,b,t);break;case"rowAxes":i=i||t.rowAxes.slice(),P(i,b,t);break;case"measureAxes":o=o||t.measureAxes.slice(),P(o,b,t)}}l=null,c=null,u=null;break;case e.PIVOT_CONFIGURATOR_ACTION.setSort:a=n.payload;break;case e.PIVOT_CONFIGURATOR_ACTION.setFilter:s=Array.isArray(n.payload)?n.payload:[n.payload];break;case e.PIVOT_CONFIGURATOR_ACTION.addFilter:s=(t.filter||[]).slice(),Array.isArray(n.payload)?s.push.apply(s,n.payload):s.push(n.payload);break;case e.PIVOT_CONFIGURATOR_ACTION.changeFilter:s=Array.isArray(n.payload)?(t.filter||[]).map((function(e){return n.payload.some((function(t){return t.field===e.field}))?n.payload.find((function(t){return t.field===e.field})):e})):(t.filter||[]).map((function(e){return e.field===n.payload.field?n.payload:e}));break;case e.PIVOT_CONFIGURATOR_ACTION.removeFilter:s=(t.filter||[]).slice(),s=Array.isArray(n.payload)?s.filter((function(e){return!n.payload.some((function(t){return t.field===e.field&&t.operator===e.operator}))})):s.filter((function(e){return!(e.field===n.payload.field&&e.operator===n.payload.operator)}))}return{dragItem:l,dropTarget:u,dropDirection:d,dropZone:c,columnAxes:r,rowAxes:i,measureAxes:o,filter:s,sort:a}},N={init:function(e){"min"in e==0&&(e.min=Number.POSITIVE_INFINITY)},merge:function(e,t){t.min=Math.min(e.min,t.min)},accumulate:function(e,t){e.min=Math.min(t,e.min)},result:function(e){return Number.isFinite(e.min)?e.min:NaN},format:function(e){return e.toFixed(2)}},W={init:function(e){"max"in e==0&&(e.max=Number.NEGATIVE_INFINITY)},merge:function(e,t){t.max=Math.max(e.max,t.max)},accumulate:function(e,t){e.max=Math.max(t,e.max)},result:function(e){return Number.isFinite(e.max)?e.max:NaN},format:function(e){return e.toFixed(2)}},U=function(e){return null!=e},j=function(e){return null==e},q=function(e){return"function"==typeof e},G=function(e){return"string"==typeof e},K=function(e){return!function(e){return j(e)||0===e.trim().length}(e)},Y=function(e){return e&&e.getTime},$=function(e,t,n){return function(i){return e(i)?t(i):n(i)}},Q=function(){for(var e=arguments,t=[],n=0;n0},re=function(e,t){return function(n){return e(n).map(t).join("~")}},oe=Q.apply(void 0,[['"',""],[":","-"]].map((function(e){var t=e[0],n=e[1];return function(e){return e.replace(new RegExp(t,"g"),n)}}))),ae=(J=".",function(e){return e.slice(0,e.indexOf(J))}),se=function(e){var t=e.field,n=e.dir;return t+"-"+(void 0===n?"asc":n)},le=ee("take"),ce=ee("aggregates");ee("skip");var de=ee("group"),ue=ee("sort",!0),he=re(ue,se),pe=re(de,se),fe=re(ce,(function(e){return e.field+"-"+e.aggregate})),me=Q((function(e){return"datetime'"+e+"'"}),ae,oe,JSON.stringify,(function(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}));Q(te("page"),(function(e){var t=e.skip,n=e.take;return Math.floor((t||0)/n)+1})),Q(te("pageSize"),le),Q(te("group"),pe);var ge,ve=Q(te("sort"),he);Q(te("aggregate"),fe),Q((ge=ue,$((function(e){return ie(ge(e))}),ve,ne)),(function(e){return Object.assign({},e,{sort:(ue(e)||[]).filter((function(e){var t=e.dir;return K(t)}))})}));var _e=function(e){return e.field+"~"+e.operator+"~"+e.value};$((function(e){return Y(e.value)}),Q(_e,(function(e){var t=e.field,n=e.value,i=e.ignoreCase,r=e.operator;return{value:me(n),field:t,ignoreCase:i,operator:r}})),_e);var be=function(e,t,n){return t[e]=n,t},we=function(e){return function(t){return Object.keys(t).reduce(e.bind(null,t),{})}},ye=we((function(e,t,n){return be(n.toLowerCase(),t,e[n])})),ke=we((function(e,t,n){return be(n,t,ye(e[n]))})),xe=function(e,t){return U(e)?e:t},Ce=Q((function(e){var t=e.field,n=e.hasSubgroups,i=e.value,r=e.aggregates,o=e.items;return{aggregates:ke(r),field:t,items:n?o.map(Ce):o,value:i}}),(function(e){return{aggregates:e.Aggregates||e.aggregates,field:e.Member||e.member||e.field,hasSubgroups:e.HasSubgroups||e.hasSubgroups||!1,items:e.Items||e.items,value:xe(e.Key,xe(e.key,e.value))}})),Se={or:{concat:function(e,t){return function(n){return e(n)||t(n)}},identity:function(){return!1}},and:{concat:function(e,t){return function(n){return e(n)&&t(n)}},identity:function(){return!0}}},Te={contains:function(e,t){return(e||"").indexOf(t)>=0},doesnotcontain:function(e,t){return-1===(e||"").indexOf(t)},doesnotendwith:function(e,t){return(e||"").indexOf(t,(e||"").length-(t||"").length)<0},doesnotstartwith:function(e,t){return-1===(e||"").lastIndexOf(t,0)},endswith:function(e,t){return(e||"").indexOf(t,(e||"").length-(t||"").length)>=0},eq:function(e,t){return e===t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t},isempty:function(e){return""===e},isnotempty:function(e){return""!==e},isnotnull:function(e){return U(e)},isnull:function(e){return j(e)},lt:function(e,t){return e0){var c=Array.from(new Set(s).values()),d=a.filter((function(e){return c.indexOf(e.key)>=0}));l.filteringAxes=d}return l.hasFilter=l.filteringAxes.length>0,l},Re=function(e,t,n){var i=e.get(t);return i||(i=n||new Map,e.set(t,i)),i},Fe=function(e){var t=e.indexOf("&");return-1!==t?[e.substring(0,t),e.substring(t+1)]:[e,void 0]},Pe=function(e,t,n){e.forEach((function(i,r){if(r!==n){i.size>0&&Pe(i,t,n);var o=i.get(n),a=Re(e,n,{});t.forEach((function(e){e.aggregate.init(a),e.aggregate.merge(o,a)}))}}))},Be=function(e,t,n,i){e.forEach((function(e,r){var o;r!==i?(o=Re(t,r),Be(e,o,n,i)):(o=Re(t,r,{}),n.forEach((function(t){t.aggregate.init(o),t.aggregate.merge(e,o)})))}))},Le=function(e,t,n,i){e.forEach((function(r,o){if(o!==n){r.size>0&&Le(r,t,n,i);var a=Re(r,n),s=Re(e,n);Be(a,s,t,i)}}))},Ve=function(e,t,n){var i=Fe(e),r=i[0],o=i[1],a=n.slice();if(r&&o){var s=t.find((function(e){return e.key===r})),l=s?s.caption:"";return a.map((function(t){return t===l?e:t}))}return a},Oe=function(e,t,n,i,r,o,a){for(var s=a||new Map,l=i.map((function(e){return e.caption}));t.length>1&&i.some((function(e){return e.caption===t[t.length-1].caption}));)t.pop(),l.pop();var c=e;return t.forEach((function(e,t){if(l=Ve(e.name,i,l),c&&!i.some((function(t){return t.caption===e.name}))){if(!c.has(e.name)&&!s.has(l.slice(0,l.indexOf(e.name)+1).join("-")))for(var a=Array.from(c).find((function(e){return e[0]!==n})),d=a&&a[0],u=d&&Fe(d)[0],h=u?t-i.findIndex((function(e){return e.key===u})):0,p=function(t){var a=[];c.forEach((function(e,t){t!==n&&a.push.apply(a,Array.from(e).filter((function(e){return e[0]!==n})))}));var d=new Map;a.forEach((function(e){if(d.has(e[0])){var t=d.get(e[0]),n=e[1],i=new Map;Be(t,i,r,o),Be(n,i,r,o),d.set(e[0],i)}else d.set(e[0],new Map(e[1]))}));var u=l.slice(0,l.indexOf(e.name));d.forEach((function(e,t){s.set(Ve(t,i,u.concat([t])).join("-"),e)})),d.set(n,c.get(n)),c=d},f=0;fa?"asc"===r?1:-1:0}}(b,c));for(var w=0;w<_.length;w++){var y=_[w][0],k={members:[]};p.push(k);var x=Fe(y)[1];c=e.find((function(e){return e.key===t})),v={caption:x,children:[],levelName:t+" "+t,levelNum:1,parentName:c?c.caption:"",hierarchy:t,name:y},(s=k.members).push.apply(s,u),k.members.push(v)}}else if(l.expand){var C=(c=e.find((function(e){return e.key===t})))?c.caption:"";d.delete(t),h.push(t),v={children:[],caption:C,hierarchy:t,levelName:C,levelNum:0,name:C,parentName:""},u.push(v)}d.forEach((function(t){p.forEach((function(n){var i=(c=e.find((function(e){return e.key===t})))?c.caption:"",r={children:[],hasChildren:!0,caption:i,hierarchy:t,levelName:i,levelNum:0,name:i,parentName:""};n.members.push(r)}))})),a.push.apply(a,p)}))},c=0;c=0;i--){var r=n[i];n[i]=qe(n[i],t[0]);for(var o=1;o0&&!n[o+l.parentName+l.name])i=n[o+l.parentName];else if(!n[o+l.parentName]&&l.levelNum>0&&!n[o+l.parentName+l.name]){var c=Object.keys(n).find((function(e){return l.parentName===n[e].name}));c&&(i=n[c])}if(i){l.path=(a=l,((s=i)&&s.hierarchy===a.hierarchy?v((s.path||[]).slice(0,-1),[(0===a.levelNum?a.hierarchy:a.name)||null]):v(s&&s.path?s.path:[],[0===a.levelNum?a.hierarchy:a.name])).filter(Boolean)),l.normalizedPath=T(l,i);var d=i.children.findIndex((function(e){return e.hierarchy!==i.hierarchy}));-1!==d?i.children.splice(d,0,l):i.children.push(l)}l.parentName+=l.name,o+=l.parentName,n[o]||(n[o]=l)},s=0;st.scrollLeft+t.offsetWidth&&e.offsetWidtht.scrollTop+t.offsetHeight&&e.offsetHeight=n&&!e}));i[t+o][a]=e}n++}}))})),i},Et=function(e){for(var t=Mt(e.querySelector([vt,wt].join(" "))),n=Mt(e.querySelector([_t,wt].join(" "))),i=Mt(e.querySelector([gt,wt].join(" "))),r=e.querySelector(bt),o=new Array(n[0].length).fill(r),a=[],s=0;s=0}));o instanceof HTMLElement&&(o.focus(),r instanceof HTMLElement&&r.click())}},Delete:Vt,Backspace:Vt}},Nt={click:function(e,t){if(e&&e instanceof HTMLElement){var n=t.elements.find((function(e){return e.hasAttribute("tabindex")}))||null;t.focusElement(e,n)}}},Wt=function(e){function t(){e.apply(this,arguments),this.selectors=Bt,this.mouseEvents=Nt,this.keyboardEvents=Ot}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(ft);!function(e,t){var n=window.kendo,i=n.ui,r=n.htmlEncode,o=n.Class,a=n.data.Comparer,s=i.Widget,l=n.data.DataSource,c=n._outerWidth,d=n._outerHeight,u=window.kendo.pivotgrid.common,h=u.fetchDiscover,p=n.data.Query.normalizeFilter,f=n.data.Query.normalizeSort,m={}.toString,g=function(e){return e},v=e.map,_=e.extend,b=n.keys,w=n.isFunction,y=u.fetchData,k=u.createLocalDataState,x=u.createDataTree,C=u.sumAggregate,S=u.averageAggregate,T=u.minAggregate,D=u.maxAggregate,I=u.createDataState,z=u.toColumns,M=u.toRows,E=u.toTree,A=u.toData,H=u.headersReducer,R="resize",F="read",P="change",B="error",L="progress",V="Measures",O="stateReset",N="auto",W="
          ",U=".kendoPivotGrid",j="__row_total__",q="dataBinding",G="dataBound",K="expandMember",Y=function(t){var i=t.id,o=t.key,a=t.headerClass,s=t.colspan,l=t.rowspan,c=t.expandable,d=t.iconClass,u=t.role,h=t.expanded;return'"+(c?n.ui.icon(e(''),{icon:"chevron-"+r(d)}):"")+""},$="collapseMember",Q="caret-alt-down",X="caret-alt-right",Z=function(e){var t=e.member;return""+r(t.caption||t.name)+""},J={"kpi-trend-decrease":"caret-alt-down","kpi-trend-increase":"caret-alt-up","kpi-trend-equal":"minus"},ee=function(t){var i=t.dataItem;return n.ui.icon(e(''),{icon:"kpi-status-"+(i.value>0?"open":i.value<0?"deny":"hold")})},te=function(t){var i=t.dataItem;return n.ui.icon(e(''),{icon:J["kpi-trend-"+(i.value>0?"increase":i.value<0?"decrease":"equal")]})},ne=function(e){var t=e.dataItem;return""+(t&&r(t.fmtValue||t.value)||" ")},ie="k-table-row",re="k-header k-table-th",oe="k-grid-header-table k-table k-table-md",ae="k-table k-table-md",se="k-grid-table k-table k-table-md",le="k-table-tbody",ce="k-table-td";function de(n){var i="string"==typeof n?[{name:n}]:n,r="[object Array]"===m.call(i)?i:i!==t?[i]:[];return v(r,(function(t){return"string"==typeof t?{name:t}:e.extend(!0,t,{name:t.name,type:t.type})}))}function ue(e){var n="string"==typeof e?[{name:[e],expand:!1}]:e,i="[object Array]"===m.call(n)?n:n!==t?[n]:[];return v(i,(function(e){return"string"==typeof e?{name:[e],expand:!1}:{name:"[object Array]"===m.call(e.name)?e.name.slice():[e.name],expand:e.expand}}))}function he(e){return-1!==e.indexOf(" ")&&(e='["'+e+'"]'),e}function pe(e,t,i,r){var o,a,s,l;if(i||(i=t),r||(r=0),(l=i.members[r])&&!l.measure){if(a=(s=l.children).length,i===t?e[n.stringify([l.name])]=!!a:a&&(e[n.stringify(wt(i,r))]=!0),a)for(o=0;o1&&t.push({name:V,measure:!0,children:ue(n)});var i={members:t};if(e.tuples){var r=Be(e.tuples,i);r.tuple&&(t=function(e){for(var t=[],n=e.members,i=0;i0});return t}(r.tuple))}return t}function ge(e){var t=n.getter(e.field,!0);return function(n,i){return e.aggregate(t(n.dataItem),i,n)}}function ve(e){return"number"==typeof e&&!isNaN(e)}function _e(e){return e&&e.getTime}function be(e){for(var t=[],n=0;ne&&(ve(e)||_e(e))&&(n=e),n}},ke=o.extend({init:function(e){this.options=_({},this.options,e),this.dimensions=this._normalizeDescriptors("field",this.options.dimensions),this.measures=this._normalizeDescriptors("name",this.options.measures)},_normalizeDescriptors:function(e,t){t=t||{};var n,i={};if("[object Array]"===m.call(t)){for(var r=0,o=t.length;r1?o[0]:t,hierarchy:r};s>1&&(i.members[i.members.length]={children:[],caption:n[c].caption,name:n[c].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!1,parentName:t,hierarchy:"MEASURES"}),u[u.length]=i}h.push(j)}return{keys:h,tuples:u}},_sortMap:function(t,n){var i,r,o,s=[],l=[];for(o in t)t[o].directParentName||l.push(e.extend({},{name:o,parentName:t[o].parentName}));if(!l.length)for(o in t)l.push(e.extend({},{name:o,parentName:t[o].parentName}));Ie(l,t);for(var c=0;c1?f[0]:t,hierarchy:m});v>1&&(s.members[s.members.length]={children:[],caption:r[a].caption,name:r[a].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!0,parentName:t,hierarchy:"MEASURES"}),d[d.length]=s}b[h.index]=d,w[h.index]=u}return{keys:w,tuples:b}},_findExpandedMember:function(e,t){for(var n=0;n0;)if((r=l[--c].split("&")).length>1&&(o=r[0],a=r[1],(s=(s=i[o](e))!==t&&null!==s?s.toString():s)!=a))return!1;return!0},_calculateAggregate:function(e,t,n){for(var i,r,o={},a=0;a1?r[t[0]]=n.getter(t[0],!0):r[i]=n.getter(he(i),!0);return r},_parseDescriptors:function(e){for(var t=Ze(e),n=Qe(t.root),i=t.expanded,r=[],o=0;o1)||n.columns&&n.columns.length||(o={root:[],expanded:[]}),_=this._asTuples(y,o,r?[]:C,n.sort?n.sort:[]),b=this._asTuples(k,a,r?C:[],n.sort?n.sort:[]),y=_.tuples,k=b.tuples,w=this._toDataArray(w,this._measuresInfo(C,r),b.keys,_.keys)):w=y=k=[],{axes:{columns:{tuples:y},rows:{tuples:k}},data:w}}}),xe=o.extend({init:function(e,t){this.transport=t,this.options=t.options||{},this.transport.discover||w(e.discover)&&(this.discover=e.discover)},read:function(e){return this.transport.read(e)},update:function(e){return this.transport.update(e)},create:function(e){return this.transport.create(e)},destroy:function(e){return this.transport.destroy(e)},discover:function(e){if(this.transport.discover)return this.transport.discover(e);e.success({})},catalog:function(n){var i=this.options||{};if(n===t)return(i.connection||{}).catalog;var r=i.connection||{};r.catalog=n,this.options.connection=r,e.extend(this.transport.options,{connection:r})},cube:function(e){var n=this.options||{};if(e===t)return(n.connection||{}).cube;var i=n.connection||{};i.cube=e,this.options.connection=i,_(!0,this.transport.options,{connection:i})}}),Ce=l.extend({init:function(t){var n=((t||{}).schema||{}).cube,i={axes:g,cubes:g,catalogs:g,measures:g,dimensions:g,hierarchies:g,levels:g,members:g};n&&(this.cubeSchema=e.extend(i,this._cubeSchema(n))),l.fn.init.call(this,_(!0,{},{},t));var r=this.options.transport||{};"xmla"===(this.options.type||"xmla").toLowerCase()&&(this._online=!0,this.transport=new at(r)),this._columns=ue(this.options.columns),this._rows=ue(this.options.rows);var o=this.cubeSchema?this.cubeSchema.measures():this.options.measures||[];"[object Object]"===m.call(o)&&(this._measuresAxis=o.axis||"columns",o=o.values||[]),this._measures=de(o)},options:{serverSorting:!0,serverPaging:!0,serverFiltering:!0,serverGrouping:!0,serverAggregates:!0},axes:function(){return{columns:He(this.columns()),rows:He(this.rows())}},catalog:function(e){if(e===t)return this.transport.catalog();this.transport.catalog(e),this._mergeState({}),this.read()},cube:function(e){if(e===t)return this.transport.cube();this.transport.cube(e),this._mergeState({}),this.read()},measuresAxis:function(){return this._measuresAxis||"columns"},fetch:function(e){var n=this;if(this._data===t||0===this._data.length){return this._query().done((function(){w(e)&&e.call(n)}))}},_createSettings:function(e){for(var t,n=[],i=this.cubeSchema.dimensionsSettings(),r=function(e){return e[this.key]},o=function(e){return e},a=0;a0&&(this._skipNormalize-=1),this.cubeBuilder||(e=this._normalizeData({columnsLength:t.columns.tuples.length,rowsLength:t.rows.tuples.length,columnIndexes:i,rowIndexes:r,data:e})),"rows"==this._lastExpanded?(o=t.columns.tuples,s=this._columnMeasures(),(a=Me(t.columns,this._axes.columns,s))&&(l="columns",t.columns=a,function(e,t,n,i,r){var o,a,s,l=e.length,c=Ae(t,i),d=i.length||1;for(a=0;a0&&(c=d,r-=d),o=0;o0&&(n-=l,e.splice(0,i*l)),r=0;r1)&&(t=e),t},_rowMeasures:function(){var e=this.measures(),t=[];return"rows"===this.measuresAxis()&&(0===this.rows().length||e.length>1)&&(t=e),t},_updateLocalData:function(e,t){this.cubeBuilder&&(t&&(this._requestData=t),e=this._processResult(e)),this._data=this._observe(e),this._ranges=[],this._addRange(this._data),this._total=this._data.length,this._pristineTotal=this._total,this._process(this._data)},data:function(e){if(e===t)return this._data;this._pristineData=e.slice(0),this._updateLocalData(e,{columns:this.columns(),rows:this.rows(),measures:this.measures()})},_normalizeTuples:function(e,t,n,i){var r,o,a,s=i.length||1,l=0,c=[],d={},u=0;if(e.length){if(this._skipNormalize<=0&&!this._hasRoot(e[0],t,n)){for(this._skipNormalize=0;l=s&&(u=0),r.members[o].name!==i[u].name&&(e.splice(l,0,this._createTuple(r,i[u])),d[l]=l),u+=1,r=e[l+=1],s>u&&(!r||yt(a,o-1)!==yt(r,o-1))){for(;u1)for(i+=1;i2?t[0]+"."+t[1]:e}function je(e,t){var n,i=e.length-1,r=e[i];return n=function(e,t){for(var n=0,i=e.length;n2?(t=e.pop(),n+=qe(e)):(n+=e.shift(),t=e.pop()),n+="},{",n+=t,n+="})"}function Ge(e,t){var n=e.slice(0);return t.length>1&&n.push("{"+Ke(t).join(",")+"}"),qe(n)}function Ke(e){for(var n,i=0,r=e.length,o=[];i1)l.push(t);else{for(o=Ue(r[0]),n=0,i=c.length;n1||t.length>1){for(s.push(Ge(a,t));c 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}"'};function tt(e){var t="",i=e.value,r=e.field,o=e.operator;return"in"==o?(t+="{",t+=i,t+="}"):(t+="neq"==o||"doesnotcontain"==o?"-":"",t+="Filter(",t+=r+".MEMBERS",t+=n.format(et[o],r,i),t+=")"),t}function nt(e,t,n){var i="";if(t){var r;for(var o in i+="<"+e+">",t)r=t[o],n&&(o=o.replace(/([A-Z]+(?=$|[A-Z][a-z])|[A-Z]?[a-z]+)/g,"$1_").toUpperCase().replace(/_$/,"")),i+="<"+o+">"+r+"";i+=""}else i+="<"+e+"/>";return i}var it={schemaCubes:"MDSCHEMA_CUBES",schemaCatalogs:"DBSCHEMA_CATALOGS",schemaMeasures:"MDSCHEMA_MEASURES",schemaDimensions:"MDSCHEMA_DIMENSIONS",schemaHierarchies:"MDSCHEMA_HIERARCHIES",schemaLevels:"MDSCHEMA_LEVELS",schemaMembers:"MDSCHEMA_MEMBERS",schemaKPIs:"MDSCHEMA_KPIS"},rt={read:function(e){var t='
          ';t+="SELECT NON EMPTY {";var n=e.columns||[],i=e.rows||[],r=e.measures||[],o="rows"===e.measuresAxis,a=e.sort||[];return!n.length&&i.length&&(!r.length||r.length&&o)&&(n=i,i=[],o=!1),n.length||i.length||(o=!1),n.length?t+=Je(n,o?[]:r,a):r.length&&!o&&(t+=Ke(r).join(",")),t+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS",(i.length||o&&r.length>1)&&(t+=", NON EMPTY {",i.length?t+=Je(i,o?r:[],a):t+=Ke(r).join(","),t+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON ROWS"),e.filter?(t+=" FROM ",t+="(",t+=function(e,t){var n,i,r="",o=e.filters,a=o.length;for(i=a-1;i>=0;i--)n="SELECT (",n+=tt(o[i]),n+=") ON 0",r=i==a-1?n+=" FROM ["+t+"]":n+" FROM ( "+r+" )";return r}(e.filter,e.connection.cube),t+=")"):t+=" FROM ["+e.connection.cube+"]",1==r.length&&n.length&&(t+=" WHERE ("+Ke(r).join(",")+")"),(t+=""+e.connection.catalog+"Multidimensional").replace(/\&/g,"&")},discover:function(t){var n='
          ';return n+=""+(it[(t=t||{}).command]||t.command)+"",n+=""+nt("RestrictionList",t.restrictions,!0)+"",t.connection&&t.connection.catalog&&(t.properties=e.extend({},{Catalog:t.connection.catalog},t.properties)),n+=""+nt("PropertyList",t.properties)+"",n+=""}},ot=n.data.RemoteTransport.extend({init:function(e){var t=e;e=this.options=_(!0,{},this.options,e),n.data.RemoteTransport.call(this,e),w(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,i){return t.data=t.data||{},e.extend(!0,t.data,{connection:this.options.connection}),n.data.RemoteTransport.fn.setup.call(this,t,i)},options:{read:{dataType:"text",contentType:"text/xml",type:"POST"},discover:{dataType:"text",contentType:"text/xml",type:"POST"},parameterMap:function(e,t){return rt[t](e,t)}},discover:function(t){return e.ajax(this.setup(t,"discover"))}}),at=o.extend({init:function(e){e=this.options=_(!0,{},this.options,e)},setup:function(t){return e.extend(!0,t||{},{connection:this.options.connection})},read:function(t){var n,i,r=this,o=r.setup(t.data,F);n=t.success||e.noop,i=t.error||e.noop,t.parameterMap&&(o=r.parameterMap(o,F)),y({url:r.options.read},o).then(I).then((function(e){n(e)})).catch((function(e){i(e)}))},catalog:function(n){var i=this.options||{};if(n===t)return(i.connection||{}).catalog;var r=i.connection||{};r.catalog=n,this.options.connection=r,e.extend(this.transport.options,{connection:r})},cube:function(e){var n=this.options||{};if(e===t)return(n.connection||{}).cube;var i=n.connection||{};i.cube=e,this.options.connection=i,_(!0,this.transport.options,{connection:i})},discover:function(e){return h({url:this.options.read},e)}});function st(e){return null==e?[]:"[object Array]"!==m.call(e)?[e]:e}function lt(e){for(var t={tuples:[]},i=st(n.getter("Tuples.Tuple",!0)(e)),r=n.getter("Caption['#text']"),o=n.getter("UName['#text']"),a=n.getter("LName['#text']"),s=n.getter("LNum['#text']"),l=n.getter("CHILDREN_CARDINALITY['#text']",!0),c=n.getter("['@Hierarchy']"),d=n.getter("PARENT_UNIQUE_NAME['#text']",!0),u=0;u0,parentName:d(p[f]),hierarchy:c(p[f])});t.tuples.push({members:h})}return t}var ct={cubes:{name:n.getter("CUBE_NAME['#text']",!0),caption:n.getter("CUBE_CAPTION['#text']",!0),description:n.getter("DESCRIPTION['#text']",!0),type:n.getter("CUBE_TYPE['#text']",!0)},catalogs:{name:n.getter("CATALOG_NAME['#text']",!0),description:n.getter("DESCRIPTION['#text']",!0)},measures:{name:n.getter("MEASURE_NAME['#text']",!0),caption:n.getter("MEASURE_CAPTION['#text']",!0),uniqueName:n.getter("MEASURE_UNIQUE_NAME['#text']",!0),description:n.getter("DESCRIPTION['#text']",!0),aggregator:n.getter("MEASURE_AGGREGATOR['#text']",!0),groupName:n.getter("MEASUREGROUP_NAME['#text']",!0),displayFolder:n.getter("MEASURE_DISPLAY_FOLDER['#text']",!0),defaultFormat:n.getter("DEFAULT_FORMAT_STRING['#text']",!0)},kpis:{name:n.getter("KPI_NAME['#text']",!0),caption:n.getter("KPI_CAPTION['#text']",!0),value:n.getter("KPI_VALUE['#text']",!0),goal:n.getter("KPI_GOAL['#text']",!0),status:n.getter("KPI_STATUS['#text']",!0),trend:n.getter("KPI_TREND['#text']",!0),statusGraphic:n.getter("KPI_STATUS_GRAPHIC['#text']",!0),trendGraphic:n.getter("KPI_TREND_GRAPHIC['#text']",!0),description:n.getter("KPI_DESCRIPTION['#text']",!0),groupName:n.getter("MEASUREGROUP_NAME['#text']",!0)},dimensions:{name:n.getter("DIMENSION_NAME['#text']",!0),caption:n.getter("DIMENSION_CAPTION['#text']",!0),description:n.getter("DESCRIPTION['#text']",!0),uniqueName:n.getter("DIMENSION_UNIQUE_NAME['#text']",!0),defaultHierarchy:n.getter("DEFAULT_HIERARCHY['#text']",!0),type:n.getter("DIMENSION_TYPE['#text']",!0)},hierarchies:{name:n.getter("HIERARCHY_NAME['#text']",!0),caption:n.getter("HIERARCHY_CAPTION['#text']",!0),description:n.getter("DESCRIPTION['#text']",!0),uniqueName:n.getter("HIERARCHY_UNIQUE_NAME['#text']",!0),dimensionUniqueName:n.getter("DIMENSION_UNIQUE_NAME['#text']",!0),displayFolder:n.getter("HIERARCHY_DISPLAY_FOLDER['#text']",!0),origin:n.getter("HIERARCHY_ORIGIN['#text']",!0),defaultMember:n.getter("DEFAULT_MEMBER['#text']",!0)},levels:{name:n.getter("LEVEL_NAME['#text']",!0),caption:n.getter("LEVEL_CAPTION['#text']",!0),description:n.getter("DESCRIPTION['#text']",!0),uniqueName:n.getter("LEVEL_UNIQUE_NAME['#text']",!0),dimensionUniqueName:n.getter("DIMENSION_UNIQUE_NAME['#text']",!0),displayFolder:n.getter("LEVEL_DISPLAY_FOLDER['#text']",!0),orderingProperty:n.getter("LEVEL_ORDERING_PROPERTY['#text']",!0),origin:n.getter("LEVEL_ORIGIN['#text']",!0),hierarchyUniqueName:n.getter("HIERARCHY_UNIQUE_NAME['#text']",!0)},members:{name:n.getter("MEMBER_NAME['#text']",!0),caption:n.getter("MEMBER_CAPTION['#text']",!0),uniqueName:n.getter("MEMBER_UNIQUE_NAME['#text']",!0),dimensionUniqueName:n.getter("DIMENSION_UNIQUE_NAME['#text']",!0),hierarchyUniqueName:n.getter("HIERARCHY_UNIQUE_NAME['#text']",!0),levelUniqueName:n.getter("LEVEL_UNIQUE_NAME['#text']",!0),childrenCardinality:n.getter("CHILDREN_CARDINALITY['#text']",!0)}},dt=["axes","catalogs","cubes","dimensions","hierarchies","levels","measures"],ut=n.data.XmlDataReader.extend({init:function(e){n.data.XmlDataReader.call(this,e),this._extend(e)},_extend:function(e){for(var t,n,i=0,r=dt.length;i"),o.options.template=function(e){return''+(e.name||e)+''+a+""}}o.template=n.template(o.options.template),o.emptyTemplate=n.template(o.options.emptyTemplate),o._sortable(),o.element.on("click"+U,".k-chip, .k-button",(function(t){var i=e(t.target).closest(":not(path,svg)"),r=i.closest(".k-chip-action"),a=i.closest("["+n.attr("name")+"]").attr(n.attr("name"));if(a)if(r.hasClass("k-setting-delete"))o.remove(a);else if(!(i.closest(".k-chip-actions").length>0)&&o.options.sortable){var s=e(t.currentTarget).closest(":not(path,svg)").find(".k-i-sort-asc-small,.k-svg-i-sort-asc-small").length?"desc":"asc";o.sort({field:a,dir:s})}})),(r.filterable||r.sortable)&&(o.fieldMenu=new i.PivotFieldMenu(o.element,{messages:o.options.messages.fieldMenu,filter:".k-setting-fieldmenu",filterable:r.filterable,sortable:r.sortable,dataSource:o.dataSource})),o.refresh()},options:{name:"PivotSettingTarget",template:null,filterable:!1,sortable:!1,emptyTemplate:function(e){return"
          "+e+"
          "},setting:"columns",enabled:!0,messages:{empty:"Drop Fields Here"}},setDataSource:function(e){this.dataSource.unbind(P,this._refreshHandler),this.dataSource=this.options.dataSource=e,this.fieldMenu&&this.fieldMenu.setDataSource(e),e.first(P,this._refreshHandler),this.refresh()},_sortable:function(){var e=this;e.options.enabled&&(this.sortable=this.element.kendoSortable({connectWith:this.options.connectWith,hint:e.options.hint,filter:">*:not(.k-empty)",cursor:"move",start:function(e){e.item.trigger("focus").trigger("blur")},change:function(t){var i=t.item.attr(n.attr("name"));"receive"==t.action?e.add(i):"remove"==t.action?e.remove(i):"sort"==t.action&&e.move(i,t.newIndex)}}).data("kendoSortable"))},_isKPI:function(e){return"kpi"===e.type||e.measure},validate:function(e){var t=2==e.type||"aggregator"in e||this._isKPI(e);if(t)return"measures"===this.options.setting;if("measures"===this.options.setting)return t;var n=this.dataSource[this.options.setting](),i=e.defaultHierarchy||e.uniqueName;return!(Ye(i,n)>-1)&&!(Ye(i,n=this.dataSource["columns"===this.options.setting?"rows":"columns"]())>-1)},add:function(e){var t,n,i=this.dataSource[this.options.setting]();for(t=0,n=(e=Array.isArray(e)?e.slice(0):[e]).length;t-1&&(e=n.splice(i,1)[0],n.splice(t,0,e),this.dataSource[this.options.setting](n))},remove:function(e){var t=this.dataSource[this.options.setting](),n=Ye(e,t),i=this.dataSource.sort(),r=this.dataSource.filter();n>-1&&(r&&(r.filters=ht(r.filters,e),this.dataSource._filter.filters=r.filters,r.filters.length||(this.dataSource._filter=null)),i&&(i=ht(i,e),this.dataSource._sort=i),t.splice(n,1),this.dataSource[this.options.setting](t))},sort:function(e){var t=this.options.sortable,n=(!0===t||t.allowUnsort)&&"asc"===e.dir,i=this.dataSource.sort()||[],r=ht(i,e.field);n&&i.length!==r.length&&(e=null),e&&r.push(e),this.dataSource.sort(r)},refresh:function(){var e,n="",i=this.dataSource[this.options.setting](),r=i.length,o=0;if(r)for(;o .k-chip").length-1)),!o.options.configuratorNavigation)return;o.options.configuratorNavigation.focusElement(o.element.find(".k-chip .k-chip-label").filter((function(t,n){return e(n).text()==r})).closest(".k-chip")[0])}else if(i==b.UP&&"rows"==o.options.setting||i==b.DOWN&&"columns"==o.options.setting){var s=o.sortable.options.connectWith.data("kendoPivotSettingTargetV2");if(!s)return;if(o.remove(r),s.add(r),!o.options.configuratorNavigation)return;o.options.configuratorNavigation.focusElement(s.element.find(".k-chip").last()[0])}})),(r.filterable||r.sortable)&&(o.fieldMenu=new i.PivotFieldMenuV2(o.element,{messages:o.options.messages.fieldMenu,filterable:r.filterable,filter:".k-i-more-vertical,.k-svg-i-more-vertical",sortable:r.sortable,dataSource:o.dataSource})),o.refresh()},events:["remove"],options:{name:"PivotSettingTargetV2",template:null,filterable:!1,sortable:!1,setting:"columns",enabled:!0,messages:{empty:"Drop Fields Here"}},setDataSource:function(e){this.dataSource.unbind(P,this._refreshHandler),this.dataSource=this.options.dataSource=e,this.fieldMenu&&this.fieldMenu.setDataSource(e),e.first(P,this._refreshHandler),this.refresh()},_applyState:function(){this._sortState!==t&&(this.dataSource._sort=this._sortState,this._sortState=t),this._stateFilter!==t&&(this.dataSource._filter=this._stateFilter,this._stateFilter=t),this.dataSource["_"+this.options.setting]="measures"===this.options.setting?de(this._savedState):ue(this._savedState)},_cancelChanges:function(){this._sortState=t,this._stateFilter=t,this._savedState=n.deepExtend([],this._initialState),this._redraw()},_state:function(e,t){var i=this;if(!e)return i._savedState||[];i._savedState&&!t||(i._initialState=n.deepExtend([],e)),i._savedState=n.deepExtend([],e)},_sortable:function(){var e=this;this.sortable=this.element.kendoSortable({connectWith:this.options.connectWith,hint:e.options.hint,filter:">*:not(.k-empty)",cursor:"move",start:function(e){e.item.focus().blur()},change:function(t){var n=t.item.find(".k-chip-label").text();"receive"==t.action?e.add(n):"remove"==t.action?e.remove(n):"sort"==t.action&&e.move(n,t.newIndex)}}).data("kendoSortable")},add:function(e){var t,n,i=this._state();for(t=0,n=(e=Array.isArray(e)?e.slice(0):[e]).length;t-1&&(e=n.splice(i,1)[0],n.splice(t,0,e),this._state(n),this._redraw())},remove:function(e){var t=this._state(),n=Ye(e,t),i=this.dataSource.sort(),r=this.dataSource.filter();n>-1&&(r&&(r.filters=ht(r.filters,e),this._savedFilter=this.dataSource._filter,this._savedFilter.filters=r.filters,r.filters.length||(this._savedFilter=null)),i&&(i=ht(i,e),this._sortState=i),t.splice(n,1),this._state(t),this._redraw())},_emptyState:function(e){e?this.element.html(this.options.messages.empty).addClass("k-settings-description").removeClass("k-chip-list"):this.element.removeClass("k-settings-description").addClass("k-chip-list")},_redraw:function(){var e=this._state()||[];this._emptyState(!e.length),e.length&&this.element.html(this._targetsHTML(e))},_targetsHTML:function(e){var n,i="",r=0,o=this.options,a=!1;if("measures"!=this.options.setting&&(a=o.filterable||o.sortable),e.length)for(;r{0}",e.text))}}),ft=s.extend({init:function(t,n){var i=this;s.fn.init.call(i,t,n),i.element=e(t),i.options=n,i._addClasses()},options:{name:"PivotContainer",configuratorPosition:"left"},setOptions:function(e){n.deepExtend(this.options,e),this.init(this.element,this.options)},_addClasses:function(){var e,t=this.options;switch(this.element.removeClass("k-flex-row k-flex-row-reverse k-flex-column k-flex-column-reverse"),t.configuratorPosition){case"right":default:e="k-flex-row";break;case"left":e="k-flex-row-reverse";break;case"bottom":e="k-flex-column";break;case"top":e="k-flex-column-reverse"}this.element.addClass("k-d-flex k-pos-relative").addClass(e)}}),mt=s.extend({init:function(t,i){var r=this;s.fn.init.call(r,t,i),r._dataSource(),r._bindConfigurator(),r._ariaId=r.element.attr("id")||n.guid(),r._wrapper(),r._columnHeadersWrapper=e('
          '),r._rowHeadersWrapper=e('
          '),r._contentWrapper=e('
          '),r.wrapper.append(r._columnHeadersWrapper),r.wrapper.append(r._rowHeadersWrapper),r.wrapper.append(r._contentWrapper),r._columnBuilder=new xt({template:this.options.columnHeaderTemplate,axes:"columns",ariaId:r._ariaId}),r._rowBuilder=new xt({template:this.options.rowHeaderTemplate,axes:"rows",ariaId:r._ariaId}),r._contentBuilder=new kt({template:this.options.dataCellTemplate||ne,ariaId:r._ariaId}),r._scrollable(),r._rowHeadersWrapper.add(r._columnHeadersWrapper).on("click","span.k-icon,span.k-svg-icon",(function(){var t=e(this),i=t.parent().attr(n.attr("key")),o=t.is(".k-i-chevron-up,.k-svg-i-chevron-up"),a=0!==t.closest(".k-pivotgrid-row-headers").length,s=i.split(","),l=o?$:K;if(!r.trigger(l,{path:s,axis:a?"rows":"columns"})){var c={type:"HEADERS_ACTION_TOGGLE",payload:s,tree:a?r._rowBuilder.getTree():r._columnBuilder.getTree()},d=a?r.dataSource._rows:r.dataSource._columns,u=H(d,c);r.dataSource._preventRefresh=!0,a?r.dataSource.rows(u):r.dataSource.columns(u)}})),r.options.autoBind&&r.dataSource.fetch(),r._aria(),r.options.navigatable&&r._initPivotGridNavigation(),n.notify(r)},events:[q,G,K,$],options:{name:"PivotGridV2",autoBind:!0,height:null,columnWidth:null,configurator:"",columnHeaderTemplate:null,rowHeaderTemplate:null,dataCellTemplate:null,messages:{emptyCellLabel:"PivotGrid Empty Cell"}},destroy:function(){var t=this;s.fn.destroy.call(t),t._windowResizeHandler&&(e(window).off(R+U,t._windowResizeHandler),t._windowResizeHandler=null)},_aria:function(){this.element.attr("role","grid")},_initPivotGridNavigation:function(){var e=this;e.navigation=new Pt({tabIndex:0}),e.navigation.start(e.element[0]);var t=e.navigation.first;t&&t.setAttribute("tabindex","0")},_matchAriaAttributes:function(e){var t=this,n=e.querySelectorAll(".k-pivotgrid-row-headers .k-pivotgrid-row"),i=n[0]?Array.from(n[0].children).reduce((function(e,t){return e+(null!==t.getAttribute("colspan")?+t.getAttribute("colspan"):1)}),0):[],r=e.querySelectorAll(".k-pivotgrid-column-headers tr"),o=e.querySelectorAll(".k-pivotgrid-column-headers th"),a=e.querySelectorAll(".k-pivotgrid-values td"),s=e.querySelector(".k-pivotgrid-empty-cell");s.setAttribute("aria-rowspan",r.length.toString()),s.setAttribute("aria-colspan",i.toString());var l=r[0],c=l?Array.from(l.children).map((function(e){return e.getAttribute("id")})).join(" "):[];l.setAttribute("aria-owns",s.getAttribute("id")+" "+c),n.forEach((function(e,n){var i=t.filterAndMap(Array.from(a),(function(e){var t=e.getAttribute("id").split("-");return t[t.length-2]===(n+1).toString()}),(function(e){return e.getAttribute("id")}));e.setAttribute("aria-owns",i.join(" "))})),a.forEach((function(e){var n=e.getAttribute("id").split("-"),i=+n[n.length-1],r=t.filterAndMap(Array.from(o),(function(e){var t=e.getAttribute("id").split("-"),n=+t[t.length-1],r=+e.getAttribute("colspan");return i===n||r>1&&n=i}),(function(e){return e.getAttribute("id")}));e.setAttribute("aria-describedby",r.join(" "))}))},filterAndMap:function(e,t,n){return e.reduce((function(e,i){return t(i)?e.concat([n(i)]):e}),[])},_dataSource:function(){var e=this,t=e.options.dataSource;t=Array.isArray(t)?{data:t}:t,e.dataSource&&this._refreshHandler?e.dataSource.unbind(P,e._refreshHandler).unbind(L,e._progressHandler).unbind(B,e._errorHandler):(e._refreshHandler=e.refresh.bind(e),e._progressHandler=e._requestStart.bind(e),e._errorHandler=e._error.bind(e)),e.dataSource=n.data.PivotDataSourceV2.create(t).bind(P,e._refreshHandler).bind(L,e._progressHandler).bind(B,e._errorHandler)},_resize:function(){var e,t;this.wrapper[0].style.setProperty("--kendo-scrollbar-width",n.format("{0}px",(t=0,document&&document.createElement&&((e=document.createElement("div")).style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",e.innerHTML=" ",document.body.appendChild(e),t=e.offsetWidth-e.scrollWidth,document.body.removeChild(e)),t)))},_scrollable:function(){var t=this,i=t._columnHeadersWrapper,r=t._rowHeadersWrapper;t._resize(),t._windowResizeHandler=t._resize.bind(t),t._contentWrapper.scroll((function(){n.scrollLeft(i,this.scrollLeft),r.scrollTop(this.scrollTop)})),r.bind("DOMMouseScroll"+U+" mousewheel"+U,t._wheelScroll.bind(t)),e(window).on(R+U,t._windowResizeHandler)},_wheelScroll:function(t){if(!t.ctrlKey){var i=n.wheelDeltaY(t),r=this._contentWrapper.scrollTop();i&&(t.preventDefault(),e(t.currentTarget).one("wheel"+U,!1),this._rowHeadersWrapper.scrollTop(r+-i),this._contentWrapper.scrollTop(r+-i))}},_wrapper:function(){var t=this.options.height;this.wrapper=this.element.addClass("k-pivotgrid");var n=e(''+this.options.messages.emptyCellLabel+"");this.wrapper.append(n),t&&this.wrapper.css("height",t)},_progress:function(e){n.ui.progress(this.wrapper,e)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_updateDimensions:function(){var e=this;e.wrapper.css({"grid-template-columns":n.format("{0}px 1fr",e._rowHeadersWrapper.find(".k-pivotgrid-table")[0].offsetWidth),"grid-template-rows":n.format("{0}px 1fr",e._columnHeadersWrapper.find(".k-pivotgrid-table")[0].offsetHeight)})},_setContentWidth:function(){if(this.options.columnWidth){var e=this._contentWrapper.find("table"),t=this._columnHeadersWrapper.children("table"),n=this._rowHeadersWrapper.children("table");e.add(t).add(n).find("col").width(this.options.columnWidth)}},_bindConfigurator:function(){var t=this.options.configurator;t&&e(t).kendoPivotConfiguratorV2("setDataSource",this.dataSource)},cellInfoByElement:function(t){return t=e(t),this.cellInfo(t.index(),t.parent("tr").index())},cellInfo:function(e,t){var n,i,r=this._contentBuilder;return e>=r.columnsCount||e<0||t>=r.rowsCount||t<0?null:(n=t*r.columnsCount+e,{columnTuple:(i=r.hash[n<0?0:n]).columnTuple,rowTuple:i.rowTuple,dataItem:i.data})},refresh:function(){var e=this,t=e.dataSource;if(!e.trigger(q,{action:"rebind"})){var i=n._activeElement()?n._activeElement().id:null,r=e.wrapper.find("[tabindex=0]").attr("id");if(e._columnBuilder.setTuples(t._columnTuples),e._columnHeadersWrapper.html(e._columnBuilder.build()),e._rowBuilder.setTuples(t._rowTuples),e._rowHeadersWrapper.html(e._rowBuilder.build()),e._contentBuilder.setRowColumnInfo({columnHeaderLeafs:e._columnBuilder.getHeaderLeafs(),rowHeaderLeafs:e._rowBuilder.getHeaderLeafs(),columnHeaderBreadth:e._columnBuilder.getBreadth(),rowHeaderDepth:e._rowBuilder.getBreadth(),data:t._view}),e._contentWrapper.html(e._contentBuilder.build()),e._setContentWidth(),e._updateDimensions(),e._progress(!1),e.trigger(G),e._matchAriaAttributes(e.wrapper[0]),e.navigation){if(r&&e.element.find("#"+r).length>0)e.element.find("#"+r).attr("tabindex","0");else{var o=e.navigation.first;o&&o.setAttribute("tabindex","0")}i&&0==i.indexOf(e._ariaId)&&e.navigation.focusElement(e.element.find("#"+i)[0])}}}});i.plugin(pt),i.plugin(ft),i.plugin(mt);var gt=s.extend({init:function(i,r){var o,a,l=this;s.fn.init.call(l,i,r),X=n.support.isRtl(l.element)?"caret-alt-left":"caret-alt-right",l._dataSource(),l._bindConfigurator(),l._wrapper(),l._createLayout(),l._columnBuilder=o=new Ct,l._rowBuilder=a=new St,l._contentBuilder=new Tt,l._templates(),l.columnsHeader.add(l.rowsHeader).on("click","span.k-icon,span.k-svg-icon",(function(){var i,r=e(this),s=o,c="expandColumn",d=r.attr(n.attr("path")),u={axis:"columns",path:e.parseJSON(d)};r.parent().is("td")&&(s=a,c="expandRow",u.axis="rows");var h=r.is(".k-i-caret-alt-down,.k-svg-i-caret-alt-down"),p=s.metadata[d],f=p.expanded===t;i=h?$:K,u.childrenLoaded=p.maxChildren>p.children,l.trigger(i,u)||(s.metadata[d].expanded=!h,n.ui.icon(r,{icon:h?X:Q}),!h&&f?l.dataSource[c](u.path):l.refresh())})),l._scrollable(),l.options.autoBind&&l.dataSource.fetch(),n.notify(l)},events:[q,G,K,$],options:{name:"PivotGrid",autoBind:!0,reorderable:!0,filterable:!1,sortable:!1,navigatable:!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 e=this.options.columnHeaderTemplate,t=this.options.rowHeaderTemplate,i=this.options.dataCellTemplate,r=this.options.kpiStatusTemplate,o=this.options.kpiTrendTemplate;this._columnBuilder.template=n.template(e||Z,{useWithBlock:!!e}),this._contentBuilder.dataTemplate=n.template(i||ne,{useWithBlock:!!i}),this._contentBuilder.kpiStatusTemplate=n.template(r||ee,{useWithBlock:!!r}),this._contentBuilder.kpiTrendTemplate=n.template(o||te,{useWithBlock:!!o}),this._rowBuilder.template=n.template(t||Z,{useWithBlock:!!t})},_bindConfigurator:function(){var t=this.options.configurator;t&&e(t).kendoPivotConfigurator("setDataSource",this.dataSource)},cellInfoByElement:function(t){return t=e(t),this.cellInfo(t.index(),t.parent("tr").index())},cellInfo:function(e,t){var n,i=this._contentBuilder,r=i.columnIndexes[e||0],o=i.rowIndexes[t||0];return r&&o?(n=o.index*i.rowLength+r.index,{columnTuple:r.tuple,rowTuple:o.tuple,measure:r.measure||o.measure,dataItem:this.dataSource.view()[n]}):null},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.measuresTarget&&this.measuresTarget.setDataSource(e),this.rowsTarget&&this.rowsTarget.setDataSource(e),this.columnsTarget&&this.columnsTarget.setDataSource(e),this._bindConfigurator(),this.options.autoBind&&e.fetch()},setOptions:function(e){s.fn.setOptions.call(this,e),this._templates()},destroy:function(){s.fn.destroy.call(this),clearTimeout(this._headerReflowTimeout)},_dataSource:function(){var e=this,t=e.options.dataSource;t=Array.isArray(t)?{data:t}:t,e.dataSource&&this._refreshHandler?e.dataSource.unbind(P,e._refreshHandler).unbind(O,e._stateResetHandler).unbind(L,e._progressHandler).unbind(B,e._errorHandler):(e._refreshHandler=e.refresh.bind(e),e._progressHandler=e._requestStart.bind(e),e._stateResetHandler=e._stateReset.bind(e),e._errorHandler=e._error.bind(e)),e.dataSource=n.data.PivotDataSource.create(t).bind(P,e._refreshHandler).bind(L,e._progressHandler).bind(O,e._stateResetHandler).bind(B,e._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_stateReset:function(){this._columnBuilder.reset(),this._rowBuilder.reset()},_wrapper:function(){var e=this.options.height;this.wrapper=this.element.addClass("k-pivot"),e&&this.wrapper.css("height",e)},_measureFields:function(){this.measureFields=e(W).addClass("k-pivot-toolbar k-toolbar k-toolbar-md k-settings-measures"),this.measuresTarget=this._createSettingTarget(this.measureFields,{setting:"measures",messages:{empty:this.options.messages.measureFields}})},_createSettingTarget:function(t,i){var r,o=this.options;return r=function(e){var t=e.sortIcon,r=e.name;return''+r+''+function(e,t,i){var r=t.sortable,o=t.filterable,a=i.reorderable,s="";return r&&(s+=e?''+n.ui.icon(e+"-sm")+"":""),(o||r)&&(s+=''+n.ui.icon("more-vertical")+""),a&&(s+=''+n.ui.icon("x")+""),s}(t,i,o)+""},new n.ui.PivotSettingTarget(t,e.extend({dataSource:this.dataSource,template:r,emptyTemplate:function(e){return''+e+""},enabled:this.options.reorderable},i))},_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,i=e('
          '),r=i.find(".k-pivot-rowheaders"),o=i.find(".k-pivot-table"),a=e(W).addClass("k-grid");t._measureFields(),t.columnFields=e(W).addClass("k-pivot-toolbar k-toolbar k-toolbar-md k-settings-columns"),t.rowFields=e(W).addClass("k-pivot-toolbar k-toolbar k-toolbar-md k-settings-rows"),t.columnsHeader=e('
          ').wrap('
          '),t.columnsHeader.parent().css("padding-right",n.support.scrollbar()),t.rowsHeader=e('
          '),t.content=e('
          '),r.append(t.measureFields),r.append(t.rowFields),r.append(t.rowsHeader),a.append(t.columnsHeader.parent()),a.append(t.content),o.append(t.columnFields),o.append(a),t.wrapper.append(i),t.columnsHeaderTree=new n.dom.Tree(t.columnsHeader[0]),t.rowsHeaderTree=new n.dom.Tree(t.rowsHeader[0]),t.contentTree=new n.dom.Tree(t.content[0]),t._initSettingTargets()},_progress:function(e){n.ui.progress(this.wrapper,e)},_resize:function(){this.content[0].firstChild&&(this._setSectionsWidth(),this._setSectionsHeight(),this._setContentWidth(),this._setContentHeight(),this._columnHeaderReflow())},_columnHeaderReflow:function(){var e=this.columnsHeader.children("table");n.support.browser.mozilla&&(clearTimeout(this._headerReflowTimeout),e.css("table-layout","auto"),this._headerReflowTimeout=setTimeout((function(){e.css("table-layout","")})))},_setSectionsWidth:function(){var e,t=this.rowsHeader,n=t.parent(".k-pivot-rowheaders").width(N);e=Math.max(c(this.measureFields),c(this.rowFields)),e=Math.max(t.children("table").width(),e),n.width(e)},_setSectionsHeight:function(){var e=this.measureFields.height(N).height(),t=this.columnFields.height(N).height(),n=this.rowFields.height(N).innerHeight(),i=this.columnsHeader.height(N).innerHeight(),r=n-this.rowFields.height(),o=t>e?t:e,a=i>n?i:n;this.measureFields.height(o),this.columnFields.height(o),this.rowFields.height(a-r),this.columnsHeader.height(a)},_setContentWidth:function(){var e=this.content.find("table"),t=this.columnsHeader.children("table"),n=e.children("colgroup").children().length*this.options.columnWidth,i=Math.ceil(n/this.content.width()*100);i<100&&(i=100),e.add(t).css("width",i+"%"),this._resetColspan(t)},_setContentHeight:function(){var e=this,t=e.content,i=e.rowsHeader,r=e.wrapper.innerHeight(),o=n.support.scrollbar(),a=t[0].offsetHeight===t[0].clientHeight,s=e.options.height;if(e.wrapper.is(":visible")){if(!r||!s)return a&&(o=0),t.height("auto"),void i.height(t.height()-o);r-=d(e.columnFields),(r-=d(e.columnsHeader.parent()))<=2*o&&(r=2*o+1,a||(r+=o)),t.height(r),a&&(o=0),i.height(r-o)}},_resetColspan:function(e){var n=this,i=e.children("tbody").children().first().children().first();n._colspan===t&&(n._colspan=i.attr("colspan")),i.attr("colspan",1),clearTimeout(n._layoutTimeout),n._layoutTimeout=setTimeout((function(){i.attr("colspan",n._colspan),n._colspan=t}))},_axisMeasures:function(e){var t=[],n=this.dataSource,i=n.measures(),r=i.length>1||i[0]&&i[0].type;return n.measuresAxis()===e&&(0===n[e]().length||r)&&(t=i),t},items:function(){return[]},refresh:function(){var e,t,i=this,r=i.dataSource,o=r.axes(),a=(o.columns||{}).tuples||[],s=(o.rows||{}).tuples||[],l=i._columnBuilder,c=i._rowBuilder;if(!i.trigger(q,{action:"rebind"})){if(l.measures=i._axisMeasures("columns"),c.measures=i._axisMeasures("rows"),i.columnsHeaderTree.render(l.build(a)),i.rowsHeaderTree.render(c.build(s)),e={indexes:l._indexes,measures:l.measures,metadata:l.metadata},t={indexes:c._indexes,measures:c.measures,metadata:c.metadata},i.contentTree.render(i._contentBuilder.build(r.view(),e,t)),i._resize(),i.touchScroller)i.touchScroller.contentResized();else{var d=n.touchScroller(i.content);d&&d.movable&&(i.touchScroller=d,d.movable.bind("change",(function(e){n.scrollLeft(i.columnsHeader,-e.sender.x),i.rowsHeader.scrollTop(-e.sender.y)})))}i._progress(!1),i.trigger(G)}},_scrollable:function(){var e=this,t=e.columnsHeader,i=e.rowsHeader;e.content.on("scroll",(function(){n.scrollLeft(t,this.scrollLeft),i.scrollTop(this.scrollTop)})),i.on("DOMMouseScroll"+U+" mousewheel"+U,e._wheelScroll.bind(e))},_wheelScroll:function(t){if(!t.ctrlKey){var i=n.wheelDeltaY(t),r=this.content.scrollTop();i&&(t.preventDefault(),e(t.currentTarget).closest(":not(path,svg)").one("wheel"+U,!1),this.rowsHeader.scrollTop(r+-i),this.content.scrollTop(r+-i))}}}),vt=n.dom.element,_t=n.dom.html,bt=function(e,t){return{maxChildren:0,children:0,maxMembers:0,members:0,measures:1,levelNum:e,parentMember:0!==t}},wt=function(e,t){for(var n=[],i=0;i<=t;i++)n.push(e.members[i].name);return n},yt=function(e,t){for(var n="",i=0;i<=t;i++)n+=e.members[i].name;return n},kt=o.extend({init:function(e){this.template=n.template(e.template),this.ariaId=e.ariaId,this.hash=[]},setRowColumnInfo:function(e){this.data=e.data,this.columnHeaderLeafs=e.columnHeaderLeafs,this.rowHeaderLeafs=e.rowHeaderLeafs,this.columnHeaderBreadth=e.columnHeaderBreadth,this.rowHeaderDepth=e.rowHeaderDepth,this.hash.length=0},addColElements:function(e){for(var t="",n=0;n";this.table.find("colgroup").append(t)},addRowElements:function(t){for(var n,i=this.table.find("tbody"),r=0;r"),i.append(n),this.addColumCell(n,t[r],r);this.rowsCount=t.length},addColumCell:function(t,n,i){for(var r=0;r');(this.rowHeaderLeafs[i].total||this.columnHeaderLeafs[r].total)&&a.addClass("k-pivotgrid-header-total"),a.append(this.template({dataItem:o.data,rowTuple:o.rowTuple,columnTuple:o.columnTuple})),this.hash.push(o),t.append(a)}}},build:function(){var t=A((this.data||[]).slice(),this.columnHeaderLeafs,this.rowHeaderLeafs,this.columnHeaderBreadth,this.rowHeaderDepth),n=this,i=e("");return n.table=i,n.addColElements(this.columnHeaderLeafs.length),n.addRowElements(t),this.rowsCount=t.length,this.columnsCount=this.columnHeaderLeafs.length,n.table}}),xt=o.extend({init:function(e){this.tuples=e.tuples,this.axes=e.axes,this.ariaId=e.ariaId,this.headerTemplate=n.template(Y),e.template&&(this.template=n.template(e.template))},setTuples:function(e){this.tuples=e},addColElements:function(e){for(var t="",n=0;n";this.table.find("colgroup").append(t)},addRowElements:function(t){for(var n,i=this.table.find("tbody"),r=0;r'),i.append(n),this.addColumCell(n,t[r],r)},addColumCell:function(t,i,r){for(var o,a,s=this,l=0;l");return s.table=l,s.addColElements("columns"==this.axes?r.length:a),s.addRowElements(i),s.table},getTree:function(){return this._tree},getBreadth:function(){return this._breadth},getHeaderLeafs:function(){return this._headerLeafs}}),Ct=o.extend({init:function(){this.measures=1,this.metadata={}},build:function(e){var t=this._tbody(e),n=this._colGroup();return[vt("table",{className:oe},[n,t])]},reset:function(){this.metadata={}},_colGroup:function(){for(var e=this._rowLength(),t=[],n=0;n");y.attr(n.attr("path"),u),v.push(n.dom.html(n.ui.icon(y,{icon:l?Q:X})))}if(v.push(this._content(m,t)),c=this._cell(o.notFirst?" k-first":"",v,m),o.children.push(c),o.colSpan+=1,l){for(d=this._cell(" k-alt",[this._content(m,t)],m),o.children.push(d);_1&&(c.attr.colSpan=p,o.colSpan+=p-1));return h.maxMembers");T.attr(n.attr("path"),r),S.push(n.dom.html(n.ui.icon(T,{icon:v?Q:X})))}if(S.push(this._content(f,t)),d=x.allCell&&!v?"k-grid-footer":"",(o=this._cell(d,S,f)).colSpan=C,x.children.push(o),x.colSpan["dim"+i]=o,(!this[b]||this[b]1&&(o.attr.rowSpan=x.rowSpan),c.children=x.rowSpan,(a=this._cell("k-grid-footer",[this._content(f,t)],f)).colSpan=C,(l=this._row([a])).colSpan["dim"+i]=a,l.allCell=!0,h[w+f.name+"all"]=l,m&&(s=this._buildRows(t,i+1),a.attr.rowSpan=s.rowSpan),x.rowSpan+=l.rowSpan,c.members=l.rowSpan}else m&&(x.hasChild=!1,this._buildRows(t,i+1),(a||o).attr.rowSpan=x.rowSpan,c.members=x.rowSpan);return c.maxChildren-1){for(o=0;o"+o(i.messages.include)+""})),t.wrapper.find(".k-column-menu-filter")[h](e.extend(!0,{},r,{title:n.ui.icon("filter")+""+o(i.messages.filterFields)+""}))},_createTreeView:function(e){var t=this;t._includesCache={},t.treeView=new i.TreeView(e,{autoBind:!1,dataSource:t._treeViewDataSource(),dataTextField:"caption",template:function(e){var t=e.item;return""+o(t.caption||t.name)},check:function(e){var n=e.sender.dataItem(e.node);t._includesCache[n.uniqueName]?delete t._includesCache[n.uniqueName]:t._includesCache[n.uniqueName]=e.node},checkboxes:{checkChildren:!0}})},_dataSource:function(){this.dataSource=n.data.PivotDataSourceV2.create(this.options.dataSource)},_layout:function(){var t=this,i=t.options;t.wrapper=e(n.template(y)({ns:n.ns,filterable:i.filterable,sortable:i.sortable,messages:i.messages})),n.applyStylesFromKendoAttributes(t.wrapper,["overflow"]),t._createExpanders(),t.wrapper.on("keydown"+l,(function(i){var o,a=i.keyCode,s=t.menu,l=".k-columnmenu-item:visible,.k-treeview:visible,button.k-button:visible,.k-picker:visible,.k-input input.k-input-inner:visible",c=t.menu.element.find(l),d=n._activeElement()==t.menu.element[0],u=e(n._activeElement()).parents(".k-pivotgrid-column-menu")[0]==t.menu.element[0]?e(n._activeElement()).closest(l):t.menu.element.find(".k-focus:not(.k-expander):not(.k-treeview-item)").last();a==r.TAB?(o=i.shiftKey?c.eq(u[0]?(c.index(u)+c.length-1)%c.length:0):c.eq(u[0]?(c.index(u)+1)%c.length:0),s.element.find(".k-focus").removeClass("k-focus"),o.is(".k-item")?(d||s.element.trigger("focus"),s.element.find(".k-focus").removeClass("k-focus"),s._moveHover(u,o)):o.trigger("focus"),i.preventDefault(),i.stopImmediatePropagation()):a==r.ENTER&&(u.trigger("click"),i.preventDefault(),i.stopImmediatePropagation())})),t.menu=t.wrapper[a]({filter:i.filter,target:t.element,orientation:"vertical",showOn:"click",closeOnClick:!1,open:this._menuOpen.bind(this),close:this._closeMenu.bind(this),activate:this._activateMenu.bind(this),deactivate:this._deactivateMenu.bind(this),copyAnchorStyles:!1}).data(a),t.menu.element.off("blur.kendoMenu","[tabindex]",t.menu._checkActiveProxy),t.menu.element.on("focus"+l,(function(n){var i=e("#"+t.menu._ariaId);if(i.is(".k-pivotgrid-column-menu-popup")&&t.menu.element.find(".k-columnmenu-item:visible").length){var r=t.menu.element.find(".k-columnmenu-item:visible").first();t.menu._moveHover(i,r)}})),i.filterable&&(t._initFilterForm(),t._attachFilterHandlers(),t._createTreeView(t.wrapper.find(".k-treeview"))),t._clickHandler=t._click.bind(t),t.wrapper.on("click",".k-item:not([role='treeitem'])",t._clickHandler)},_activateMenu:function(e){var t=this;if(t.menu.element.find(".k-columnmenu-item:visible").length){var n=t.menu.element.find(".k-columnmenu-item:visible").first();t.menu._moveHover([],n)}},_deactivateMenu:function(e){this.menu.target.find("[tabindex=0]").trigger("focus")},_closeMenu:function(t){var i=e(n._activeElement());(i[0]===this._filterOperator.wrapper[0]||i.closest(".k-treeview")[0]===this.treeView.wrapper[0]||i.hasClass("k-button-includes-reset"))&&t.preventDefault()},_treeViewDataSource:function(){var t=this;return n.data.HierarchicalDataSource.create({schema:{model:{id:"uniqueName",hasChildren:function(e){return parseInt(e.childrenCardinality,10)>0}}},transport:{read:function(n){var i,r,o,a,s,l=t.treeView.dataSource.get(n.data.uniqueName),c=n.data.uniqueName,d=[];t.dataSource.cubeSchema?(d=c?t.dataSource.cubeSchema.members(t.currentMember):t.dataSource.cubeSchema.members(t.currentMember+".[(ALL)]"),i=t.dataSource.filter(),t._getFilterStorage(t.currentMember)&&1==_({filter:i,member:t.currentMember}).length&&!c?d[0].checked=!0:function(t,n,i){var r,o=0,a=i.length,s=_({filter:t,member:n,operator:"neq"});if(i[0].name.indexOf("[(ALL)]")>=0)return void(i[0].checked=!s.length);if(s.length)for(r=s.map((function(e){return e.value}));o=0;n--)e[n].value===t.value&&e[n].operator===t.operator&&e.splice(n,1)}(i,t._getFilterStorage(t.currentMember)):i={logic:"and",filters:[]},t._storeFilterForm(t.currentMember),i.filters.push(r),t.dataSource._preventRefresh=!0,t.dataSource.filter(i),t.menu.close()}else t.menu.close()},_reset:function(e){var t=this,n=t.dataSource.filter();v(n,t.currentMember),e.preventDefault(),n.filters[0]||(n={}),t.dataSource._preventRefresh=!0,t.dataSource.filter(n),t._clearFilterStorage(t.currentMember),t._setFilterForm(null),t.menu.close()},_setFilterForm:function(e){var t=this._filterOperator,n="",i="";e&&(n=e.operator,i=e.value),t.value(n),t.value()||t.select(0),this._filterValue.val(i)},_collapseItems:function(t){t.find(".k-expander-indicator span").each((function(t,i){return n.ui.icon(e(i),{icon:"chevron-up"})})),t.nextAll().hide()},_sort:function(e){var t=this.currentMember,n=this.dataSource.sort()||[];(n=g(n,t)).push({field:t,dir:e}),this.dataSource._preventRefresh=!0,this.dataSource.sort(n),this.menu.close()},_menuOpen:function(t){if(t.event){var n,i=this,r=i.dataSource.cubeSchema;i.currentMember=e(t.event.target).closest(".k-chip-actions").prev().text(),i.menu.popup._hovered=!0,i.options.filterable&&(i._setFilterForm(i._getFilterStorage(i.currentMember)),n=i.wrapper.find(".k-columnmenu-item-wrapper").last(),r&&"string"!==r.memberType(i.currentMember).toLowerCase()?n.hide():n.show(),i.currentMember!==i._oldCurrentmember&&(i._oldCurrentmember&&i._collapseItems(i.menu.element.find(".k-item.k-expander")),i._oldCurrentmember=i.currentMember,i._includesCache={},this.treeView.dataSource.read()))}}}),f=c.extend({init:function(e,t){c.fn.init.call(this,e,t),this._dataSource(),this._layout(),n.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=e(n.template(x)({ns:n.ns,filterable:t.filterable,sortable:t.sortable,messages:t.messages})),this.menu=this.wrapper[a]({filter:t.filter,target:this.element,orientation:"vertical",showOn:"click",closeOnClick:!1,open:this._menuOpen.bind(this),select:this._select.bind(this),copyAnchorStyles:!1}).data(a),this._createWindow(),t.filterable&&this._initFilterForm()},_initFilterForm:function(){var e=this.menu.element.find("."+d),t=this._filter.bind(this);this._filterOperator=new n.ui.DropDownList(e.find("select")),this._filterValue=e.find("input.k-input-inner"),this._updateFilterAriaLabel(),e.on("submit"+s,t).on("click"+s,".k-button-filter",t).on("click"+s,".k-button-clear",this._reset.bind(this))},_setFilterForm:function(e){var t=this._filterOperator,n="",i="";e&&(n=e.operator,i=e.value),t.value(n),t.value()||t.select(0),this._filterValue.val(i)},_clearFilters:function(e){var t,n,i=this.dataSource.filter()||{},r=0;for(i.filters=i.filters||[],n=(t=_({filter:i,member:e})).length;r0}}},transport:{read:function(t){var n={},i=e.treeView.dataSource.get(t.data.uniqueName);t.data.uniqueName?(n.memberUniqueName=i.uniqueName.replace(/\&/g,"&"),n.treeOp=1):n.levelUniqueName=e.currentMember+".[(ALL)]",e.dataSource.schemaMembers(n).done((function(n){b(e.dataSource.filter(),e.currentMember,n),t.success(n)})).fail(t.error)}}})},_createTreeView:function(e){var t=this;t.treeView=new i.TreeView(e,{autoBind:!1,dataSource:t._treeViewDataSource(),dataTextField:"caption",template:function(e){var t=e.item;return""+o(t.caption||t.name)},checkboxes:{checkChildren:!0},dataBound:function(){i.progress(t.includeWindow.element,!1)}})},_menuOpen:function(t){if(t.event){var i=n.attr("name");this.currentMember=e(t.event.target).closest("["+i+"]").attr(i),this.options.filterable&&this._setFilterForm(_({filter:this.dataSource.filter(),member:this.currentMember})[0])}},_select:function(t){var n=e(t.item);e(".k-pivot-filter-window").not(this.includeWindow.element).kendoWindow("close"),n.hasClass("k-include-item")?this.includeWindow.center().open():n.hasClass("k-sort-asc")?this._sort("asc"):n.hasClass("k-sort-desc")?this._sort("desc"):n.hasClass(d)&&this._updateFilterAriaLabel()},_windowOpen:function(){this.treeView||this._createTreeView(this.includeWindow.element.find(".k-treeview")),i.progress(this.includeWindow.element,!0),this.treeView.dataSource.read()},destroy:function(){c.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}});function m(t,n,i){var r=((n.options.schema.model||{}).fields||{})[i];return r&&("number"===r.type?t=parseFloat(t):"boolean"===r.type&&(t=Boolean(e.parseJSON(t)))),t}function g(e,t){for(var n=[],i=0,r=e.length;i=0;r--)i=e[r].operator,n&&i!==n||e[r].field!==t||e.splice(r,1)}}function _(e){if(!e.filter)return[];for(var t,n=e.filter.filters,i=0,r=[],o=n.length,a=e.isLocal?"neq":"in";i=0;else for(;o
          '+n.ui.icon("sort-asc-small")+o(t.sortAscending)+'
          '+n.ui.icon("sort-desc-small")+o(t.sortDescending)+'
          '+n.html.renderButton('")+n.html.renderButton('",{themeColor:"primary"})+'
          '+n.html.renderButton('")+n.html.renderButton('",{themeColor:"primary"})+"
          "},k=function(e,t){var i="";return t&&(i+='
        • '+n.ui.icon("filter")+''+o(e.include)+'
        • '+n.ui.icon("filter")+''+o(e.filterFields)+"
          • "+function(e){return'
            '+o(e.info)+"
            "}(e)+"
        • "),i},x=function(e){var t=e.messages,i=e.filterable;return'
            '+function(e,t,i){var r="";return t&&(r+='
          • '+n.ui.icon("sort-asc-small")+''+o(e.sortAscending)+'
          • '+n.ui.icon("sort-desc-small")+''+o(e.sortDescending)+"
          • ",i&&(r+='
          • ')),r}(t,e.sortable,i)+k(t,i)+"
          "},C=function(e){var t=e.messages;return'
          "};i.plugin(f),i.plugin(p)}(window.kendo.jQuery);kendo;var Ut={number:0,boolean:!1,string:"",date:""},jt=function(e){var t=e.ns,n=e.operators;return{type:"component",element:"
          ',component:"FilterButtonGroup",componentOptions:{items:Object.keys(n||{}).map((function(e){return{value:e,text:n[e].text||n[e],attributes:{value:e}}}))},attributes:{"data-bind":"value: logic",title:"logic"}}},qt=function(e){var t=e.mainFilterLogicLabel,n=e.uid;e.addExpression,e.addGroup,e.close,e.ns,e.operators;return"
          "},Gt=function(e){var t=e.filterLogicLabel;e.addExpression,e.addGroup,e.close,e.ns,e.operators;return"
        • "},Kt=function(e){return"
        • "};!function(e){var t=window.kendo,n=t.ui,i=t.guid,r=t.ns,o=t.keys,a=n.Widget,s=n.ButtonGroup,l=":kendoFocusable",c="change",d="tabindex",u=".kendoFilter",h="Is equal to",p="Is not equal to",f={number:function(t,n){var o=n.field;e("").appendTo(t)},string:function(n,r){var o=r.field;e("").appendTo(n)},boolean:function(t,n){var o=n.field;e("").appendTo(t)},date:function(t,n){var o=n.field;e("").appendTo(t)}},m=s.extend({init:function(e,t){s.fn.init.call(this,e,t)},options:{name:"FilterButtonGroup"},value:function(e){if(void 0===e)return this._value;this._value=e,s.fn._select.call(this,this.wrapper.find("[value='"+e+"']")),this.trigger(c)},_select:function(t){-1!==t&&this.value(e(t).attr("value"))}}),g=a.extend({init:function(t,n){var i,r=this;a.fn.init.call(r,t,n),r.element=e(t).addClass("k-filter"),r.dataSource=n.dataSource,r.operators=e.extend(r.options.operators,n.operators),r._getFieldsInfo(),r._modelChangeHandler=r._modelChange.bind(r),r._renderMain(),n.expression&&r._addExpressionTree(r.filterModel),r._renderApplyButton(),r.options.expressionPreview&&(r._previewContainer||(r._previewContainer=e('
          ').insertAfter(r.element.children().eq(0))),i=r._createPreview(r.filterModel.toJSON()),r._previewContainer.html(i)),r._attachEvents(),r.hasCustomOperators();var o=e(r.element).find(".k-filter-toolbar > .k-toolbar");o.attr(d,-1),o.find(l).attr(d,-1),o.eq(0).attr(d,0)},events:[c],options:{name:"Filter",dataSource:null,expression:null,applyButton:!1,fields:[],mainLogic:"and",messages:{and:"And",or:"Or",apply:"Apply",close:"Close",addExpression:"Add Expression",fields:"Fields",filterExpressionLabel:"filter expression",filterLogicLabel:"filter logic",filterAriaLabel:"filter component",mainFilterLogicLabel:"main filter logic",operators:"Operators",addGroup:"Add Group"},operators:{string:{eq:h,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",isnullorempty:"Has no value",isnotnullorempty:"Has value"},number:{eq:h,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:h,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"},boolean:{eq:h,neq:p}}},applyFilter:function(){var e=this.filterModel.toJSON();this._hasCustomOperators&&this._mapOperators(e),this._hasFieldsFilter(e.filters||[])?(this._removeEmptyGroups(e.filters),this.dataSource.filter(e)):this.dataSource.filter({})},destroy:function(){this.element.off(u),t.destroy(this.element.find(".k-filter-group-main")),this._previewContainer=null,this._applyButton=null,this._modelChangeHandler=null,a.fn.destroy.call(this)},setOptions:function(e){t.deepExtend(this.options,e),this.destroy(),this.element.empty(),this.init(this.element,this.options)},getOptions:function(){var t=e.extend(!0,{},this.options);return delete t.dataSource,t.expression=this.filterModel.toJSON(),t},_addExpressionTree:function(e){if(e.filters)for(var t=this.element.find("[id="+e.uid+"]"),n=0;n .k-toolbar, .k-filter-toolbar > .k-toolbar .k-toolbar-item",n)},_focusToolbar:function(t,n,i){var r=t,o=e(this.element).find(".k-filter-toolbar > .k-toolbar");if(o.attr(d,-1),o.find(l).attr(d,-1),"next"==n){var a=Math.min(o.length-1,i||o.index(t)+1);r=o.eq(a)}else if("prev"==n){var s=Math.max(0,i||o.index(t)-1);r=o.eq(s)}r.attr(d,0).trigger("focus")},_addExpression:function(n,i){var o,a=this,s=n.attr("id"),l=n.closest(".k-filter-toolbar").next("ul.k-filter-lines"),c=i?a._fields[i.field]:a._defaultField,d="";i?o=i:((o=_(a.filterModel,s)).filters||o.set("filters",[]),o=a._addNewModel(o.filters,c)),l.length||(l=e("
            ").appendTo(n.closest("li")));var u={fields:a._fields,operators:a.operators[c.type],close:a.options.messages.close,fieldsLabel:a.options.messages.fields,uid:o.uid,ns:t.ns,filterExpressionLabel:a.options.messages.filterExpressionLabel},h=(d=e(t.template(Kt)(u)).appendTo(l)).find(".k-toolbar").first(),p=c.operators&&c.operators[c.type]?c.operators[c.type]:this.operators[c.type];h.kendoToolBar({resizable:!1,items:[{type:"component",component:"DropDownList",element:"",attributes:{class:"k-filter-field"},componentOptions:{title:a.options.messages.fields,dataTextField:"text",dataValueField:"value",dataSource:Object.keys(a._fields||{}).map((function(e){return{value:a._fields[e].name,text:a._fields[e].label}}))}},{type:"component",component:"DropDownList",element:"",attributes:{class:"k-filter-operator"},componentOptions:{title:a.options.messages.operators,dataTextField:"text",dataValueField:"value",dataSource:Object.keys(p||{}).map((function(e){return{value:e,text:p.text||p[e]}}))}},{attributes:{class:"k-filter-value"},template:" "},{type:"button",icon:"x",fillMode:"flat",attributes:{"data-command":"x",title:u.close,"aria-label":u.close}}]}),a._addExpressionControls(d.find(".k-toolbar"),c,o),i||a._expressionChange()},_addExpressionControls:function(e,n,i){var r=e.find(".k-toolbar-item.k-filter-operator"),o=e.find(".k-toolbar-item.k-filter-value");o.addClass("k-toolbar-tool"),t.destroy(o),o.empty(),this._bindOperators(r,n),this._appendEditor(o,n),this._bindModel(e,i),this._showHideEditor(e,i),e.find(l).attr(d,-1)},_bindOperators:function(e,t){var n=t.operators&&t.operators[t.type]?t.operators[t.type]:this.operators[t.type],i=e.find("select[data-role=dropdownlist]").getKendoDropDownList();i&&i.setDataSource(Object.keys(n||{}).map((function(e){return{value:e,text:n.text||n[e]}})))},_appendEditor:function(n,i){t.isFunction(i.editor)?i.editor(n,e.extend(!0,{},{field:i.name})):e(t.template(i.editor)({ns:t.ns,field:i.name,id:t.guid()})).appendTo(n)},_addNewModel:function(e,t){var n,i,r=t.type,o=t.operators;return o||(o=this.options.operators),i=Object.keys(o[r])[0],e.push({field:t.name}),(n=e[e.length-1]).set("value",t.defaultValue),n.set("operator",i),n},_addGroup:function(n,i){var r=this,o=r.filterModel,a=n.attr("id"),s=n.closest(".k-filter-toolbar").next("ul.k-filter-lines");i?o=i:((o=_(o,a)).filters||o.set("filters",[]),o.filters.push({logic:r.options.mainLogic}),o=o.filters[o.filters.length-1]),s.length||(s=e("
              ").appendTo(n.closest("li")));var l={operators:{and:r.options.messages.and,or:r.options.messages.or},addExpression:r.options.messages.addExpression,addGroup:r.options.messages.addGroup,close:r.options.messages.close,ns:t.ns,filterLogicLabel:r.options.messages.filterLogicLabel},c=e(t.template(Gt)(l)).appendTo(s).find(".k-toolbar");r._initGroupToolBar(c,l),r._bindModel(c,o),i||r._expressionChange()},_bindModel:function(e,n){e.attr("id",n.uid),n.bind("change",this._modelChangeHandler),t.bind(e,n),e.parent().attr(t.attr("stop"),!0)},_createPreview:function(e){var n,i,r="",o=!1,a=this._hasFieldsFilter(e.filters||[]),s="";if(!e.filters||!e.filters.length||!a)return"";r+='(';for(var l=0;l '+e.logic.toLocaleUpperCase()+" "),o=!0),r+=s),n.field&&(i=this._fields[n.field],o&&(r+=' '+e.logic.toLocaleUpperCase()+" "),o=!0,r+=''+i.label+"",r+=' '+this._getOperatorText(n.field,n.operator),n.operator.indexOf("is")<0?(r+=" ",r+="'"+t.htmlEncode(i.previewFormat?t.toString(n.value,i.previewFormat):n.value)+"'"):r+="");return r+=')'},_expressionChange:function(){var e=this,t=e.filterModel.toJSON(),n="";e.options.expressionPreview&&(n=e._createPreview(t),e._previewContainer.html(n)),e.trigger(c,{expression:t})},_getOperatorText:function(e,t){var n=this._fields[e].type,i=this._fields[e].operators;return i||(i=this.options.operators),i[n][t].text||i[n][t]},_addField:function(t,n){var i=this;t=e.extend(!0,{},{name:t.name||n,editor:t.editorTemplate||f[t.type||"string"],defaultValue:t.defaultValue||!1===t.defaultValue||0===t.defaultValue?t.defaultValue:Ut[t.type||"string"],type:t.type||"string",label:t.label||t.name||n,operators:t.operators,previewFormat:t.previewFormat}),i._fields[t.name]=t,i._defaultField||(i._defaultField=t)},_getFieldsInfo:function(){var e,t=this,n=t.options.fields.length?t.options.fields:(t.options.dataSource.options.schema.model||{}).fields;if(t._fields={},Array.isArray(n))for(var i=0;i=0;t--)e[t].logic&&!e[t].filters||e[t].filters&&!this._hasFieldsFilter(e[t].filters)?e.splice(t,1):e[t].filters&&this._removeEmptyGroups(e[t].filters)},_modelChange:function(e){var t=this,n=t.element.find("[id="+e.sender.uid+"]");if(t._showHideEditor(n,e.sender),"field"===e.field){var i=e.sender.field,r=e.sender.parent(),o=t._fields[i],a=t._addNewModel(r,o);e.sender.unbind("change",t._modelChangeHandler),r.remove(e.sender),t._addExpressionControls(n,o,a),t._expressionChange()}else"filters"!==e.field&&t._expressionChange()},_renderMain:function(){var n,i=this;e((n=i.options.messages.filterAriaLabel,"
              ")).appendTo(i.element),i.options.expression?i.filterModel=t.observable(i.options.expression):i.filterModel=t.observable({logic:i.options.mainLogic});var r={operators:{and:i.options.messages.and,or:i.options.messages.or},addExpression:i.options.messages.addExpression,addGroup:i.options.messages.addGroup,close:i.options.messages.close,uid:i.filterModel.uid,ns:t.ns,mainFilterLogicLabel:i.options.messages.mainFilterLogicLabel},o=e(t.template(qt)(r));o.appendTo(i.element.find("li").first());var a=o.find(".k-toolbar").first();i._initGroupToolBar(a,r),i._bindModel(a,i.filterModel)},_initGroupToolBar:function(e,t){e.kendoToolBar({resizable:!1,items:[jt(t),{type:"button",icon:"filter-add-expression",attributes:{"data-command":"expression",title:t.addExpression,"aria-label":t.addExpression}},{type:"button",icon:"filter-add-group",attributes:{"data-command":"group",title:t.addGroup,"aria-label":t.addGroup}},{type:"button",icon:"x",fillMode:"flat",attributes:{"data-command":"x",title:t.close,"aria-label":t.close}}]})},_removeExpression:function(n){var i,r,o=this,a=n.attr("id"),s=n.closest("li"),l=-1;s.hasClass("k-filter-group-main")?(s=s.find(".k-filter-lines"),o.filterModel.filters&&(o.filterModel.filters.empty(),delete o.filterModel.filters)):(l=e(o.element).find(".k-filter-toolbar > .k-toolbar").index(n),i=(r=_(o.filterModel,a)).parent(),r.unbind("change",o._modelChangeHandler),i.remove(r),i.length||delete i.parent().filters,s.siblings().length||(s=s.parent()));t.destroy(s),s.remove(),o._expressionChange(),l>-1&&o._focusToolbar(n,"next",l)},_renderApplyButton:function(){var n=this;n.options.applyButton&&(n._applyButton||(n._applyButton=e(t.format('',n.options.messages.apply)).appendTo(n.element)))},_showHideEditor:function(e,t){if(!t.logic){var n=t.operator,i=e.find(".k-toolbar-item.k-filter-value");"isnull"==n||"isnotnull"==n||"isempty"==n||"isnotempty"==n||"isnullorempty"==n||"isnotnullorempty"==n?i.hide():i.show()}},_mapOperators:function(e){var t=this;e.filters&&e.filters.forEach((function(e){if(e.filters)t._mapOperators(e);else{var n,i=t._fields[e.field],r=i.type;(n=i.operators&&i.operators[r][e.operator]?i.operators[r][e.operator]:t.operators[r][e.operator])&&(e.operator=n.handler||e.operator)}}))},hasCustomOperators:function(){var t=e.extend(!0,{},this.operators);for(var n in this._fields)t=e.extend(!0,{},t,this._fields[n].operators);this._hasCustomOperators=v(t)}});function v(e){for(var t in e){var n=e[t];if(n.handler&&"function"==typeof n.handler||"object"==typeof n&&null!==n&&v(n))return!0}return!1}function _(e,t){if(e.uid===t)return e;if(e.filters)for(var n=0;n .k-panel",B="> .k-content",L="k-focus",V="k-disabled",O="k-selected",N=".k-selected",W="k-highlight",U=w+":not(.k-disabled)",j="> "+U+" > "+".k-link, .k-panel > "+U+" > "+_,q="> li > .k-selected, .k-panel > li > .k-selected",G="aria-disabled",K="aria-expanded",Y="aria-hidden",$="aria-selected",Q=":visible",X="single",Z={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},J={aria:function(e){var t="";return(e.items||e.content||e.contentUrl||e.expanded)&&(t+="aria-expanded='"+(e.expanded?"true":"false")+"' "),!1===e.enabled&&(t+="aria-disabled='true'"),t},wrapperCssClass:function(e,t){var n="k-panelbar-item",i=t.index;return e.firstLevel&&(n+=" k-panelbar-header"),!1===t.enabled?n+=" k-disabled":!0===t.expanded&&(n+=" k-active",n+=" k-expanded"),0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),t.cssClass&&(n+=" "+t.cssClass),t.level&&(n+=" k-level-"+t.level()),n},textClass:function(e){var t=v;return e.selected&&(t+=" k-selected"),t},textAttributes:function(e){return e?" href='"+e+"'":""},arrowIconOptions:function(e){return{icon:e.expanded?"chevron-up":"chevron-down",iconClass:"k-panelbar-toggle k-panelbar-"+(e.expanded?"collapse":"expand")}},text:function(e){return!1===e.encoded?e.text:i.htmlEncode(e.text)},groupAttributes:function(e){return!0!==e.expanded?" "+i.attr("style-display")+'="none"':""},ariaHidden:function(e){return!0!==e.expanded},groupCssClass:function(){return"k-panelbar-group k-group k-panel"},contentAttributes:function(e){return!0!==e.item.expanded?" "+i.attr("style-display")+'="none"':""},content:function(e){return e.content?e.content:e.contentUrl?"":" "},contentUrl:function(e){return e.contentUrl?'href="'+e.contentUrl+'"':""}};function ee(t){(t=e(t)).filter(".k-first:not(:first-child)").removeClass(x),t.filter(".k-last:not(:last-child)").removeClass(g),t.filter(":first-child").addClass(x),t.filter(":last-child").addClass(g)}function te(t){(t=e(t)).addClass("k-level-"+t.parentsUntil(".k-panelbar","ul").length)}n=function(e){return e.children("span").children(".k-panelbar-toggle")};var ne=i.ui.DataBoundWidget.extend({init:function(e,t){var n,r,o=this;c(t)&&(t={dataSource:t}),r=t&&!!t.dataSource,u.fn.init.call(o,e,t),e=o.wrapper=o.element.addClass("k-panelbar"),t=o.options,e[0].id&&(o._itemId=e[0].id+"_pb_active"),o._tabindex(),o._accessors(),o._dataSource(),o._templates(),o._initData(r),o._updateClasses(),o._animations(t),e.on(D+f,j,o._click.bind(o)).on(A+f+" mouseleave"+f,j,o._toggleHover).on(D+f,".k-panelbar-item.k-disabled > .k-link",!1).on(D+f,".k-request-retry",o._retryRequest.bind(o)).on("keydown"+f,o._keydown.bind(o)).on("focus"+f,(function(){var e=o.select();o._current(e[0]?e:o._first())})).on("blur"+f,(function(){o._current(null)})).attr("role","tree"),(n=e.find("li.k-active > ."+I))[0]&&o.expand(n.parent(),!1),t.dataSource||o._angularCompile(),i.notify(o)},events:[S,M,T,z,C,b,E,H],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",template:null,dataTextField:null},_angularCompile:function(){var e=this;e.angular("compile",(function(){return{elements:e.element.children("li"),data:[{dataItem:e.options.$angular}]}}))},_angularCompileElements:function(t,n){this.angular("compile",(function(){return{elements:t,data:e.map(n,(function(e){return[{dataItem:e}]}))}}))},_angularCleanup:function(){var e=this;e.angular("cleanup",(function(){return{elements:e.element.children("li")}}))},destroy:function(){u.fn.destroy.call(this),this.element.off(f),this._angularCleanup(),i.destroy(this.element)},_initData:function(e){var t=this;e&&(t.element.empty(),t.options.autoBind&&(t._progress(!0),t.dataSource.fetch()))},_templates:function(){var e=this,t=e.options,n=e._fieldAccessor.bind(e);t.template&&"string"==typeof t.template?t.template=d(t.template):t.template||(t.template=d((function(e){var t=n("text")(e.item);return void 0!==e.item.encoded&&!1===e.item.encoded?""+t+"":""+s(t)+""}))),e.templates={content:d((function(e){var t=e.data,n=e.item,i=e.contentAttributes,r=e.content;return"
              "+r(n)+"
              "})),group:d((function(e){var t=e.data,n=e.items,i=e.group,r=e.renderItems,o=e.panelBar,a=e.ariaHidden,s=e.groupCssClass,l=e.groupAttributes;return"
                "+r({data:t,items:n,group:i,renderItems:r,panelBar:o,ariaHidden:a,groupCssClass:s,groupAttributes:l})+"
              "})),itemWrapper:d((function(e){var t=e.panelBar,i=e.item,r=e.arrow,o=e.textClass,a=e.arrowIconOptions,s=e.textAttributes,l=e.contentUrl,c=n("url")(i),d=n("imageUrl")(i),u=n("spriteCssClass")(i),h=(l=l(i),c||l?"a":"span");return"<"+h+" class='"+o(i)+"' "+l+s(c)+">"+(d?"":"")+(u?"":"")+t.options.template({panelBar:t,item:i,arrow:r,textClass:o,textAttributes:s,contentUrl:l})+r({panelBar:t,item:i,arrow:r,textClass:o,arrowIconOptions:a,textAttributes:s,contentUrl:l})+""})),item:d((function(e){var t=e.data,n=e.group,r=e.item,o=e.panelBar,a=e.itemWrapper,s=e.renderContent,l=e.arrow,c=e.arrowIconOptions,d=e.subGroup,u=e.aria,h=e.wrapperCssClass,p=e.contentUrl,f=e.textClass,m=e.textAttributes;return"
            • "+a({data:t,group:n,item:r,panelBar:o,itemWrapper:a,renderContent:s,arrow:l,arrowIconOptions:c,subGroup:d,aria:u,wrapperCssClass:h,contentUrl:p,textClass:f,textAttributes:m})+(r.items&&r.items.length>0?d({items:r.items,panelBar:o,group:{expanded:r.expanded}}):r.content||r.contentUrl?s({data:t,group:n,item:r,panelBar:o,itemWrapper:a,renderContent:s,arrow:l,arrowIconOptions:c,subGroup:d,aria:u,wrapperCssClass:h,contentUrl:p,textClass:f,textAttributes:m}):"")+"
            • "})),loading:d((function(e){var t=e.messages;return"
            • "+s(t.loading)+"
            • "})),retry:d((function(e){var t=e.messages;return"
            • "+s(t.requestFailed)+"
            • "})),arrow:d((function(e){var t=e.item,n=e.arrowIconOptions;return i.ui.icon(n(t))})),empty:d((function(){return""}))}},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=a(!0,t,e.animation),"dataSource"in e&&this.setDataSource(e.dataSource),u.fn.setOptions.call(this,e)},expand:function(t,n){var i=this,r={};if(t=this.element.find(t),!i._animating||!t.find("ul").is(":visible"))return i._animating=!0,n=!1!==n,t.each((function(o,a){a=e(a);var s=t.children(".k-group,.k-content");s.length||(s=i._addGroupElement(t));var l=s.add(a.find(B));if(!a.hasClass(V)&&l.length>0){if(i.options.expandMode==X&&i._collapseAllExpanded(a))return i;t.find(".k-highlight").removeClass(W),a.addClass(W),n||(r=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(S,a)||i._toggleItem(a,!1,!1),n||(i.options.animation=r)}})),i;i.one("complete",(function(){setTimeout((function(){i.expand(t)}))}))},collapse:function(t,n){var i=this,r={};return i._animating=!0,n=!1!==n,(t=i.element.find(t)).each((function(t,o){var a=(o=e(o)).find(P).add(o.find(B));!o.hasClass(V)&&a.is(Q)&&(o.removeClass(W),n||(r=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(M,o)||i._toggleItem(o,!0),n||(i.options.animation=r))})),i},updateArrow:function(t){var n=this;(t=e(t)).children(_).children(".k-panelbar-collapse, .k-panelbar-expand").remove(),t.filter((function(){var t=n.dataItem(this);return t?t.hasChildren||t.content||t.contentUrl:e(this).find(".k-panel").length>0||e(this).find(".k-content").length>0})).children(".k-link:not(:has([class*=-i-chevron]))").each((function(){var t=e(this),n=t.parent(),r=i.ui.icon({icon:n.hasClass(R)?"chevron-up":"chevron-down",iconClass:"k-panelbar-toggle k-panelbar-"+(n.hasClass(R)?"collapse":"expand")});t.append(r)}))},_accessors:function(){var e,t,n,r=this.options,o=this.element;for(e in Z)t=r[Z[e]],n=o.attr(i.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),c(t)||(t=[t]),r[Z[e]]=t},_progress:function(e,t){var i=this.element,r=this.templates.loading({messages:this.options.messages});1==arguments.length?(t=e)?i.html(r):i.empty():n(e).empty().removeClass("k-i-arrow-rotate-cw k-svg-i-arrow-rotate-cw").toggleClass("k-i-loading",t)},_refreshRoot:function(t){var n=this,o={firstLevel:!0,expanded:!0,length:n.element.children().length};this.element.empty();var s=e.map(t,(function(t,r){if("string"==typeof t)return e(t);t.items=[];var s=e(n.renderItem({group:o,item:a(t,{index:r})}));return i.applyStylesFromKendoAttributes(s,["display"]),s}));this.element.append(s);for(var l=this.element.children(".k-panelbar-item"),c=0;c").appendTo(n):i.length&&i.children().length||(r.remove(),i.remove()))}(n),o=n.children(".k-group").children("li"),this._angularCompileElements(o,s)},findByUid:function(t){for(var n,r=this.element.find(".k-panelbar-item"),o=i.attr("uid"),a=0;a span:first-child")},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&(this._progress(!0),this.dataSource.fetch())},_bindDataSource:function(){this._refreshHandler=this.refresh.bind(this),this._errorHandler=this._error.bind(this),this.dataSource.bind(C,this._refreshHandler),this.dataSource.bind(b,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(C,this._refreshHandler),e.unbind(b,this._errorHandler))},_fieldAccessor:function(t){var n=this.options[Z[t]]||[],r=n.length;return 0===r?function(e){return e[t]}:function(t){var o=e.map(n,i.getter);return t.level?o[Math.min(t.level(),r-1)](t):o[r-1](t)}},_dataSource:function(){var e=this,t=e.options.dataSource;t&&(t=c(t)?{data:t}:t,e._unbindDataSource(),t.fields||(t.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),e.dataSource=h.create(t),e._bindDataSource())},_appendItems:function(t,n,r){var o,s,l=this;r.hasClass("k-panelbar")?(o=r.children("li"),s=r):((s=r.children(".k-group")).length||(s=l._addGroupElement(r)),o=s.children("li"));var c={firstLevel:r.hasClass("k-panelbar"),expanded:!0,length:o.length},d=e.map(n,(function(t,n){if("string"==typeof t)return e(t);var r=e(l.renderItem({group:c,item:a(t,{index:n})}));return i.applyStylesFromKendoAttributes(r,["display"]),r}));void 0===t&&(t=o.length);for(var u=0;u ul").not((function(){return e(this).parentsUntil(".k-panelbar","div").length})).addClass("k-panelbar-group k-group k-panel").attr("role","group")).parent(),i=(o=a.dataItem(r))&&o.expanded||!1,t.parent().not("[aria-expanded]").attr(K,i).not(".k-active").children("ul").attr(Y,!i).hide(),n=a.element.add(t).children(),a._updateItemsClasses(n),a.updateArrow(n),ee(n)},_updateItemsClasses:function(e){for(var t=e.length,n=0;n",s&&s[n]&&t[0].parentNode==c&&(r=''),t.contents().filter((function(){return!(this.nodeName.match(p)||3==this.nodeType&&!i.trim(this.nodeValue.trim))})).wrapAll(r)),t.parent(".k-panelbar")[0]?t.addClass("k-panelbar-header"):t.addClass("k-panelbar-item"),/k\-level\-\d+/i.test(t.attr("class"))||t.addClass("k-level-"+t.parentsUntil(this.element,"ul").length)},_click:function(t){var n,i,r,o=this,a=t.type==D?e(t.target):o._current().children(_),s=o.element;if(!a.parents("li.k-disabled").length&&a.closest(".k-panelbar")[0]==s[0]&&(!a.is(":kendoFocusable")||a.hasClass(v))){var l=a.closest(_),c=l.closest(w);o._updateSelected(l);var d=c.children(".k-group,.k-content"),u=this.dataItem(c);if(!d.length&&(o.options.loadOnDemand&&u&&u.hasChildren||this._hasChildItems(c)||c.content||c.contentUrl)&&(d=o._addGroupElement(c)),i=c.find(P).add(c.find(B)),n=!(!((r=l.attr(m))&&("#"==r.charAt(r.length-1)||-1!=r.indexOf("#"+o.element[0].id+"-")))&&!i.length),i.data("animating")&&n)t.preventDefault();else if(o._triggerEvent(T,c)&&(n=!0),!1!==n)if(o.options.expandMode==X&&o._collapseAllExpanded(c)&&n)t.preventDefault();else{if(i.length){var h=i.is(Q);o._triggerEvent(h?M:S,c)||(n=o._toggleItem(c,h))}n&&t.preventDefault()}}},_hasChildItems:function(e){return e.items&&e.items.length>0||e.hasChildren},_toggleItem:function(e,n,i){var r,o,a=this,s=e.find(P),l=e.find(_).attr(m),c=a.dataItem(e),d=!n,u=c&&c.loaded();return c&&!i&&c.expanded!==d?(c.set("expanded",d),r=c.hasChildren||!!c.content||!!c.contentUrl):(!c||i&&"true"!==i||u||c.content||c.contentUrl?s.length?(this._toggleGroup(s,n),r=!0):(o=e.children("."+I)).length&&(r=!0,o.is(":empty")&&l!==t?a._ajaxRequest(e,o,n):a._toggleGroup(o,n)):(a.options.loadOnDemand&&this._progress(e,!0),e.children(".k-group,.k-content").remove(),r=c.hasChildren,c.load()),r)},_toggleGroup:function(t,n){var r=this,o=r.options.animation,s=o.expand,l=o.collapse&&"effects"in o.collapse,c=a({},o.expand,o.collapse);l||(c=a(c,{reverse:!0})),t.is(Q)==n?(t.attr(Y,!!n),t.parent().attr(K,!n).toggleClass(R,!n).toggleClass(F,!n).find("> .k-link > .k-panelbar-collapse,> .k-link > .k-panelbar-expand").each((function(t,r){var o=e(r);o.removeClass("k-panelbar-expand k-panelbar-collapse"),i.ui.icon(o,{icon:n?"chevron-down":"chevron-up",iconClass:n?"k-panelbar-expand":"k-panelbar-collapse"})})),n?(s=a(c,{hide:!0})).complete=function(){r._animationCallback()}:s=a({complete:function(e){r._triggerEvent(z,e.closest(w)),r._animationCallback()}},s),t.toggle(0).kendoStop(!0,!0).kendoAnimate(s)):r._animating=!1},_animationCallback:function(){this.trigger("complete"),this._animating=!1},_addGroupElement:function(t){var n=e('').hide();return t.append(n),n},_collapseAllExpanded:function(t){var n,i=this,r=!1,o=t.find(P).add(t.find(B));return o.is(Q)&&(r=!0),o.is(Q)||0===o.length||((n=t.siblings()).find(P).add(n.find(B)).filter((function(){return e(this).is(Q)})).each((function(t,n){n=e(n),(r=i._triggerEvent(M,n.closest(w)))||i._toggleGroup(n,!0)})),i.one("complete",(function(){setTimeout((function(){n.each((function(e,t){var n=i.dataItem(t);n&&n.set("expanded",!1)}))}))}))),r},_ajaxRequest:function(t,n,r){var o=this,a=t.find(".k-panelbar-collapse, .k-panelbar-expand"),s=t.find(_),l=setTimeout((function(){a.empty().removeClass("k-i-chevron-up k-i-chevron-down k-svg-i-chevron-up k-svg-i-chevron-down").addClass("k-i-loading")}),100),c=s.attr(m);e.ajax({type:"GET",cache:!1,url:c,dataType:"html",data:{},error:function(e,t){a.removeClass("k-i-loading"),i.ui.icon(a,{icon:a.hasClass("k-panelbar-expand")?"chevron-down":"chevron-up"}),o.trigger(b,{xhr:e,status:t})&&this.complete()},complete:function(){clearTimeout(l),i.ui.icon(a,{icon:a.hasClass("k-panelbar-expand")?"chevron-down":"chevron-up"}),a.removeClass("k-i-loading")},success:function(e){function i(){return{elements:n.get()}}try{o.angular("cleanup",i),n.html(e),o.angular("compile",i)}catch(e){var a=window.console;a&&a.error&&a.error(e.name+": "+e.message+" in "+c),this.error(this.xhr,"error")}o._toggleGroup(n,r),o.trigger(H,{item:t[0],contentElement:n[0]})}})},_triggerEvent:function(e,t){return this.trigger(e,{item:t[0]})},_updateSelected:function(e,t){var n=this,i=n.element,r=e.parent(w),o=n._selected,a=n.dataItem(r);o&&o.attr($,!1),n._selected=r.attr($,!0),i.find(q).removeClass(O),i.find("> .k-highlight, .k-panel > .k-highlight").removeClass(W),e.addClass(O),e.parentsUntil(i,w).filter(":has(.k-link)").addClass(W),n._current(r[0]?r:null),a&&a.set("selected",!0),t||n.trigger(C)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}})},renderItem:function(e){var t=this;e=a({panelBar:t,group:{}},e);var n=t.templates.empty,i=e.item;return t.templates.item(a(e,{itemWrapper:t.templates.itemWrapper,renderContent:t.renderContent,arrow:t._hasChildItems(i)||i.content||i.contentUrl?t.templates.arrow:n,subGroup:!e.loadOnDemand||i.expanded?t.renderGroup:n},J))},renderGroup:function(e){return(this.templates||e.panelBar.templates).group(a({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,o=a({length:r},e.group);n
              '+n.html.renderButton('",{fillMode:"flat",size:r})+'
              '+N(r,i)+"
              "},N=function(e,t){return'"};V=new Date(V.getFullYear(),V.getMonth(),V.getDate(),0,0,0);var W=function(e){var t=this,i=e.id;t.options=e,t._dates=[],t.bigScreenMQL=u("large"),t.smallScreenMQL=u("small"),"auto"==t.options.adaptiveMode&&t.smallScreenMQL.onChange((function(){t.popup&&n.isFunction(t.popup.fullscreen)&&(t.popup.fullscreen(t.smallScreenMQL.mediaQueryList.matches),t.options.timeView&&"scroll"===t.options.timeView.list&&(t.addTranslate(),t._updateRanges()))})),t._createList(e.timeView&&"scroll"===e.timeView.list),i&&(t._timeViewID=i+"_timeview",t._optionID=i+"_option_selected",t.ul.attr(F,t._timeViewID)),t._heightHandler=t._height.bind(t),t._popup()};function U(e){return 60*e.getHours()*S+e.getMinutes()*S+1e3*e.getSeconds()+e.getMilliseconds()}function j(e,t,n){var i,r=U(t),o=U(n);return!e||r==o||(r>(i=U(e))&&(i+=T),o=r&&i<=o)}W.prototype={_createList:function(e){e?this._createScrollList():this._createClassicRenderingList()},_createScrollList:function(){var t="auto"!=this.options.adaptiveMode||this.bigScreenMQL.mediaQueryList.matches?this.options.size||"medium":"large",i=e.extend({},this.options,{mainSize:n.getValidCssClass("k-timeselector-","size",t),buttonSize:t});this.popupContent=e(n.template(O)(i)).on(C,K),this.list=this.popupContent.find(".k-timeselector"),this.ul=this.list.find(".k-time-list-container"),this.list.on("click"+v,".k-time-header button.k-time-now",this._nowClickHandler.bind(this)),this.popupContent.on("click"+v,".k-time-footer button.k-time-cancel",this._cancelClickHandler.bind(this)),this.popupContent.on("click"+v,".k-time-footer button.k-time-accept",this._setClickHandler.bind(this)),this.list.on("mouseover"+v,".k-time-list-wrapper",this._mouseOverHandler.bind(this)),this.list.on("keydown"+v,this._scrollerKeyDownHandler.bind(this))},_scrollerKeyDownHandler:function(t){var r=this,o=t.keyCode,a=e(t.currentTarget).find(".k-time-list-wrapper.k-focus"),s=r.list.find(".k-time-list-wrapper"),l=s.length,c=s.index(a),d=n.support.isRtl(r.wrapper),u=X(a.find(".k-item:visible").eq(0)),h=a.find(".k-time-container.k-content.k-scrollable");a.length&&(o==i.RIGHT&&!d||o==i.LEFT&&d?c+1=0&&r._focusList(s.eq(c-1)):o==i.UP?(h.scrollTop(h.scrollTop()-u),t.preventDefault()):o==i.DOWN?(h.scrollTop(h.scrollTop()+u),t.preventDefault()):o===i.ENTER?r._setClickHandler(t):o===i.ESC&&r._cancelClickHandler(t))},_mouseOverHandler:function(t){this._focusList(e(t.currentTarget))},_focusList:function(e){this.list.find(".k-time-list-wrapper").removeClass(k),e.addClass(k),this.list.trigger("focus"),this._scrollTop=e.find(".k-scrollable").scrollTop()},_createClassicRenderingList:function(){var t=this,i=e('
              ');t.ul=i.find("ul").css({overflow:c.kineticScrollNeeded?"":"auto"}).on(_,y,t._click.bind(t)).on("mouseenter"+v,y,(function(){e(this).addClass(x)})).on("mouseleave"+v,y,(function(){e(this).removeClass(x)})),t.list=e("
              ").append(i).on(C,K),t.template=function(e){return'
            • '+e+"
            • "}},current:function(n){var i=this,r=i.options.active;if(n===t)return i._current;i._current&&(i._current.removeClass(D),i._current&&i._current.length&&(i._current[0].removeAttribute(F),i._current[0].removeAttribute(z))),n&&(n=e(n).addClass(D).attr(F,i._optionID).attr(z,!0),i.scroll(n[0])),i._current=n,r&&r(n)},_updateTitle:function(){this.list.find(".k-time-header > .k-title").html(n.toString(this._value,this.options.format,this.options.culture))},applyValue:function(e){if(e){var t,i=$(this.options.format.toLowerCase(),"t"),r=e.getHours(),o=e.getMinutes(),a=e.getSeconds(),s=n.attr("index"),l=this.ul.find("["+s+'="1"]'),c=this.ul.find("["+s+'="2"]'),d=this.ul.find("["+s+'="3"]'),u=this.ul.find("["+s+'="4"]');i&&(r>=12?(t="PM",r>12&&(r-=12)):(t="AM",0===r&&(r=12))),this._internalScroll=!0,l.length&&this._scrollListToPosition(l,r),c.length&&this._scrollListToPosition(c,o),d.length&&this._scrollListToPosition(d,a),u.length&&this._scrollListToPosition(u,t),this._internalScroll=!1}},_scrollListToPosition:function(e,t){var n=e.find('.k-item[data-value="'+Q(t)+'"]'),i=X(n);e.scrollTop(e.find(".k-item:visible").index(n)*i)},close:function(){this.popup&&this.popup.close()},destroy:function(){var e=this;e.ul.off(v),e.list.off(v),e.popupContent&&e.popupContent.off(v),e.popup&&e.popup.destroy(),e.bigScreenMQL&&e.bigScreenMQL.destroy(),e.smallScreenMQL&&e.smallScreenMQL.destroy()},open:function(){var e,t=this;(!t.ul[0].firstChild||t.ul.find("li").length<1)&&t.bind(),e=t.popup._hovered,t.popup._hovered=!0,t.popup.open(),setTimeout((function(){t.popup._hovered=e}),1),t._current&&t.scroll(t._current[0])},dataBind:function(e){for(var t,i=this,r=i.options,o=r.format,a=n.toString,s=i.template,l=e.length,c=0,d="";cg&&(g+=T),s.timeView&&"scroll"===s.timeView.list?x=a._createListContent(n.date.splitDateFormat(l)):a.getDatesInRange(undefined,g,k,f,_,y).forEach((function(e){x+=w(b(e,l,s.culture))})),a._html(x)},_showAllHiddenItems:function(){for(var t,n=this.list.find(".k-time-container"),i=n.length,r=0;r12&&(i=!0,s-=12),l>12&&(t=!0,l-=12)),a.find(".k-item").each((function(n,o){var a=+(o=e(o)).attr("data-value");r._validateMin&&i&&al?o.hide():o.show()}))):a.find(".k-item").each((function(t,n){var i=+(n=e(n)).attr("data-value");r._validateMin&&il?n.hide():n.show()})),this._updateListBottomOffset(a))},_updateMinutesRange:function(){var t=this,i=n.attr("index"),r=this.ul.find("["+i+'="2"]'),o=this._minHours,a=this._maxHours,s=this._minMinutes,l=this._maxMinutes,c=+this._findSelectedValue(this.ul.find("["+i+'="1"]')),d=$(this.options.format.toLowerCase(),"t"),u=this._findSelectedValue(this.ul.find("["+i+'="4"]'));d&&"PM"===u&&(c+=12),r.length&&(r.find(".k-item").each((function(n,i){var r=+(i=e(i)).attr("data-value");t._validateMin&&rl&&a&&c===a?i.hide():i.show()})),this._updateListBottomOffset(r))},_updateSecondsRange:function(){var t=this,i=n.attr("index"),r=this.ul.find("["+i+'="3"]'),o=this._minSeconds,a=this._minSeconds,s=this._minMinutes,l=this._maxMinutes,c=+this._findSelectedValue(this.ul.find("["+i+'="2"]'));r.length&&(r.find(".k-item").each((function(n,i){var r=+(i=e(i)).attr("data-value");t._validateMin&&ra&&l&&c===l?i.hide():i.show()})),this._updateListBottomOffset(r))},_updateDesignatorRange:function(){var e=this._minHours,t=this._maxHours,i=n.attr("index"),r=this.ul.find("["+i+'="4"]');r.length&&(this._validateMin&&e>=12?r.find('.k-item[data-value="AM"]').hide():r.find('.k-item[data-value="AM"]').show(),this._validateMax&&t<12?r.find('.k-item[data-value="PM"]').hide():r.find('.k-item[data-value="PM"]').show())},_updateRanges:function(){if(this.options.specifiedRange){this._currentlySelected||(this._currentlySelected=new Date);var e=this.options.endTime?this.options.endTime:this.options.max,t=this.options.startTime?this.options.startTime:this.options.min;if(this.options.validateDate){if(e.getFullYear()===this._currentlySelected.getFullYear()&&e.getMonth()===this._currentlySelected.getMonth()&&e.getDate()===this._currentlySelected.getDate()?this._validateMax=!0:this._validateMax=!1,t.getFullYear()===this._currentlySelected.getFullYear()&&t.getMonth()===this._currentlySelected.getMonth()&&t.getDate()===this._currentlySelected.getDate()?this._validateMin=!0:this._validateMin=!1,!this._validateMax&&!this._validateMin)return void this._showAllHiddenItems()}else this._validateMax=!0,this._validateMin=!0;this._minMinutes=t.getMinutes(),this._maxMinutes=e.getMinutes(),this._minHours=t.getHours(),this._maxHours=e.getHours(),this._minSeconds=t.getSeconds(),this._maxSeconds=e.getSeconds(),this._updateDesignatorRange(),this._updateHoursRange(),this._updateMinutesRange(),this._updateSecondsRange()}},addTranslate:function(){for(var e,t,n,i,r,o=this.ul.find(".k-time-container.k-content.k-scrollable"),a=o.length,s=0;s1&&(t.currentTarget.scrollTop+=i-t.currentTarget.scrollTop%i),n._scrollTop=t.currentTarget.scrollTop,n._updateCurrentlySelected(),n._updateRanges()}),100))},_updateCurrentlySelected:function(){var e,i,r,o,a=$(this.options.format.toLowerCase(),"t"),s=n.attr("index"),l=this.ul.find("["+s+'="1"]'),c=this.ul.find("["+s+'="2"]'),d=this.ul.find("["+s+'="3"]'),u=this.ul.find("["+s+'="4"]');this.ul.is(":visible")&&(this._currentlySelected||(this._currentlySelected=this._value?new Date(this._value):new Date),l.length&&(e=+this._findSelectedValue(l)),c.length&&(i=+this._findSelectedValue(c)),d.length&&(r=+this._findSelectedValue(d)),u.length&&(o=this._findSelectedValue(u)),a&&("PM"==o&&24==(e+=12)&&(e=12),"AM"===o&&12===e&&(e=0)),e!==t&&this._currentlySelected.setHours(e),i!==t&&this._currentlySelected.setMinutes(i),r!==t&&this._currentlySelected.setSeconds(r))},_findSelectedValue:function(e){var t,n,i=(t=e.scrollTop(),n=X(e.find(".k-item:visible").eq(0)),Math.max(Math.round(t/n),0));return e.find(".k-item:visible").eq(i).attr("data-value")},_itemClickHandler:function(t){var n=e(t.originalEvent.currentTarget),i=n.find(".k-item:visible").index(e(t.currentTarget)),r=X(n.find(".k-item:visible").eq(0));n.scrollTop(i*r)},getDatesInRange:function(e,t,n,i,r,o){for(var a=[];;){if(t&&(U(o)>=t||n.getDate()!=o.getDate())){e=U(o),nt&&(o=new L(+i)),U(o)>0&&a.push(new Date(o));break}if(n.getDate()!=o.getDate())break;if(a.push(new Date(o)),o.setTime(o.getTime()+r),!t&&this.options.maxSet)break}return a},_createListContent:function(e){for(var t,n,i=e.length,r="",o=0;o'+(i||t.type)+'
              '},_getValues:function(e,t){var n,i,r=[],o=0;for("hour"===e.type?(o=e.hour12?1:0,n=1,i=e.hour12?12:23):"minute"===e.type?(n=2,i=59):"second"===e.type&&(n=3,i=59);o<=i;o++)r.push(t?Q(o):o);return{values:r,index:n}},_literalTemplate:function(e){var t=" tt"===e.pattern||"aa"===e.pattern,n='
              '+(t?":":e.pattern)+"
              ";return t&&(n+=this._itemTemplate(["AM","PM"],e,"AM/PM",4)),n},bind:function(){var e=this,t=e.options.dates;t&&t[0]?e.dataBind(t):(e.refresh(),e.addTranslate(),e._value&&e.applyValue(e._value))},_html:function(e){var t=this;t.options.timeView&&"scroll"===t.options.timeView.list?(e=''+e,t.ul.html(e)):(t.ul[0].innerHTML=e,t.popup.unbind(f,t._heightHandler),t.popup.one(f,t._heightHandler),t.current(null),t.select(t._value))},scroll:function(e){e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded():function(e,t){function n(e,t){return{start:e,length:t,end:e+t}}function i(e,n){return!1===t||n.start1&&(n=U(r._value),i=e.inArray(n,r._dates),t=r.ul.children()[i]),t},setOptions:function(e){var t=this.options;e.min=o(e.min),e.max=o(e.max),this.options=B(t,e,{active:t.active,change:t.change,close:t.close,open:t.open}),this.bind()},toggle:function(){var e=this;e.popup.visible()?e.close():e.open()},value:function(e){var t=this;t._value=e,t.ul[0].firstChild&&(t.options.timeView&&"scroll"===t.options.timeView.list?t.applyValue(e):t.select(e))},_click:function(t){var n=this,i=e(t.currentTarget),r=i.text(),o=n.options.dates;o&&o.length>0&&(r=o[i.index()]),t.isDefaultPrevented()||(n.select(i),n.options.change(r,!0),n.close())},_height:function(){var e=this,t=e.list,n=t.parent(".k-child-animation-container"),i=n.closest(".k-animation-container"),r=e.options.height,o=t.add(i),a=e.ul[0];a.children.length&&(o.add(n).show(),t.add(n).height(a.scrollHeight>r&&("auto"!=e.options.adaptiveMode||e.bigScreenMQL.mediaQueryList.matches)?r:"auto"),o.hide())},_parse:function(e){var t=this.options,n=U(t.min)!=U(V)?t.min:null,i=U(t.max)!=U(V)?t.max:null,r=this._value||n||i||V;return e instanceof L||(e=o(e,t.parseFormats,t.culture))&&(e=new L(r.getFullYear(),r.getMonth(),r.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())),e},_adjustListWidth:function(){var e,t,i=this.list,r=i[0].style.width,o=this.options.anchor,a=n._outerWidth;!i.data("width")&&r||(t=(e=window.getComputedStyle?window.getComputedStyle(o[0],null):0)?parseFloat(e.width):a(o),e&&(d.mozilla||d.msie)&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),r=t-(a(i)-i.width()),i.css({fontFamily:o.css("font-family"),width:"auto"!=this.options.adaptiveMode||this.bigScreenMQL.mediaQueryList.matches?r:"100%"}).data("width",r))},_popup:function(){var e=this,t=e.list,n=e.options,i=n.anchor;if(this.options.omitPopup)t.appendTo(n.timeDiv);else if("auto"!=n.adaptiveMode||e.bigScreenMQL.mediaQueryList.matches)e.popup=new h.Popup(e.popupContent||t,B(n.popup,{anchor:i,open:n.open,close:n.close,animation:n.animation,isRtl:c.isRtl(n.anchor),activate:function(){e.options.timeView&&"scroll"===e.options.timeView.list&&(e.addTranslate(),e._value?e.applyValue(e._value):e._updateCurrentlySelected(),e._updateRanges(),e._focusList(e.list.find(".k-time-list-wrapper").eq(0)))}}));else{var r=e.popupContent||t;r.appendTo(document.body),e.popup=new h.ActionSheet(r,{adaptive:!0,focusOnActivate:!1,title:"Set time",subtitle:"00/00/00",closeButton:!0,fullscreen:e.smallScreenMQL.mediaQueryList.matches,popup:B(n.popup,{anchor:i,open:n.open,close:n.close,animation:n.animation,isRtl:c.isRtl(n.anchor)}),activate:function(){e.options.timeView&&"scroll"===e.options.timeView.list&&(e.addTranslate(),e._value?e.applyValue(e._value):e._updateCurrentlySelected(),e._updateRanges(),e._focusList(e.list.find(".k-time-list-wrapper").eq(0)))}}),e._updateCurrentlySelected(),e._updateRanges(),r.find(".k-time-footer").appendTo(r)}},move:function(e){var t=this,n=e.keyCode,r=t.ul[0],o=t._current,a=n===i.DOWN;if(n===i.UP||a){if(e.altKey)return void t.toggle(a);(o=a?o?o[0].nextSibling:r.firstChild:o?o[0].previousSibling:r.lastChild)&&t.select(o),t.options.change(t._current.text()),e.preventDefault()}else n!==i.ENTER&&n!==i.TAB&&n!==i.ESC||(e.preventDefault(),o&&t.options.change(o.text(),!0),t.close())}},W.getMilliseconds=U,n.TimeView=W;var q=p.extend({init:function(t,i){var r=this;(i=i||{}).componentType=i.componentType||"classic",p.fn.init.call(r,t,i),t=r.element,(i=r.options).min=o(t.attr("min"))||o(i.min),i.max=o(t.attr("max"))||o(i.max),+i.max==+V&&+i.min==+V||(this._specifiedRange=!0),G(i),r._initialOptions=B({},i),r._wrapper(),r.options.timeView&&"scroll"===r.options.timeView.list&&(r.options.height=null),r.bigScreenMQL=u("large"),"auto"==r.options.adaptiveMode&&r.bigScreenMQL.onChange((function(){r._createTimeViewProxy(),r._update(r.element.val())})),r._createTimeView(),r._createTimeViewProxy=r._createTimeView.bind(r),r._icon(),r._reset();try{t[0].setAttribute("type","text")}catch(e){t[0].type="text"}if(t.addClass("k-input-inner").attr({role:"combobox","aria-expanded":!1,"aria-controls":r.timeView._timeViewID,autocomplete:"off"}),t.is("[disabled]")||e(r.element).parents("fieldset").is(":disabled")?r.enable(!1):r.readonly(t.is("[readonly]")),i.dateInput){var a=i.min,s=i.max,l=new L;U(a)==U(s)&&(a=new L(l.getFullYear(),l.getMonth(),l.getDate(),0,0,0),s=new L(l.getFullYear(),l.getMonth(),l.getDate(),24,0,0)),r._dateInput=new h.DateInput(t,{culture:i.culture,format:i.format,min:a,max:s,value:i.value,interval:i.interval,size:i.size,fillMode:i.fillMode,rounded:i.rounded,messages:i.messages.dateInput})}r._old=r._update(i.value||r.element.val()),r._oldText=t.val(),r._applyCssClasses(),i.label&&r._label(),n.notify(r)},options:{name:"TimePicker",min:V,max:V,format:"",dates:[],parseFormats:[],value:null,interval:30,height:200,animation:{},dateInput:!1,messages:{set:"Set",cancel:"Cancel",hour:"hour",minute:"minute",second:"second",millisecond:"millisecond",now:"Now"},adaptiveMode:"none",componentType:"classic",size:"medium",fillMode:"solid",rounded:"medium",label:null},events:[f,m,g],componentTypes:{classic:{timeView:{list:"list"}},modern:{timeView:{list:"scroll"}}},setOptions:function(e){var t=this,i=t._value;p.fn.setOptions.call(t,e),+(e=t.options).max==+V&&+e.min==+V||(this._specifiedRange=!0),t._arrow.off(v),t._arrow.remove(),G(e),t.timeView.setOptions(e),t._icon(),t._editable(e),i&&t.element.val(n.toString(i,e.format,e.culture)),e.label&&t._inputLabel?t.label.setOptions(e.label):!1===e.label?(t.label._unwrapFloating(),t._inputLabel.remove(),delete t._inputLabel):e.label&&t._label()},dataBind:function(e){P(e)&&this.timeView.dataBind(e)},_editable:function(e){var t=this,n=e.disable,i=e.readonly,r=t._arrow.off(v),o=t.element.off(v),a=t.wrapper.off(v);t._dateInput&&t._dateInput._unbindInput(),i||n?(a.addClass(n?I:"").removeClass(n?"":I),o.attr(b,n).attr(w,i).attr(A,n).attr(H,i)):(a.removeClass(I).on("mouseenter.kendoTimePicker mouseleave.kendoTimePicker",t._toggleHover),o&&o.length&&(o[0].removeAttribute(b),o[0].removeAttribute(w)),o.attr(A,!1).attr(H,!1).on("keydown"+v,t._keydown.bind(t)).on("focusout"+v,t._blur.bind(t)).on("focus"+v,(function(){t.wrapper.addClass(k)})),t._dateInput&&t._dateInput._bindInput(),r.on(_,t._click.bind(t)).on(C,K))},_label:function(){var t=this,i=t.options,r=e.isPlainObject(i.label)?i.label:{content:i.label};t._dateInput&&(r.floatCheck=function(){return!t.value()&&!t._dateInput._hasDateInput()&&document.activeElement!==t.element[0]&&(t.element.val(""),!0)}),t.label=new n.ui.Label(null,e.extend({},r,{widget:t})),t._inputLabel=t.label.element},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e=e===t||e)},destroy:function(){var e=this;p.fn.destroy.call(e),e.timeView.destroy(),e.element.off(v),e._arrow.off(v),e.wrapper.off(v),e._form&&e._form.off("reset",e._resetHandler),e.label&&e.label.destroy(),e.bigScreenMQL&&e.bigScreenMQL.destroy(),e._createTimeViewProxy=null},close:function(){this.timeView.close()},open:function(){this.timeView.open()},min:function(e){return e&&(this._specifiedRange=!0),this._option("min",e)},max:function(e){return e&&this.timeView?(this._specifiedRange=!0,this.timeView.options.maxSet=!0):this.timeView&&(this.timeView.options.maxSet=!1),this._option("max",e)},value:function(e){var n=this;if(e===t)return n._value;n._old=n._update(e),null===n._old&&n.element.val(""),n._oldText=n.element.val(),n.label&&n.label.floatingLabel&&n.label.floatingLabel.refresh()},_blur:function(){var e=this,t=e.element.val();e.options.timeView&&"scroll"===e.options.timeView.list||e.close(),t!==e._oldText&&e._change(t),e.wrapper.removeClass(k)},_click:function(){var e=this,t=e.element;e.timeView.toggle(),c.touch||t[0]===s()||e.options.timeView&&"scroll"===e.options.timeView.list||t.trigger("focus")},_change:function(e){var t,i=this,r=i.element.val();e=i._update(e);var o=(t=!n.calendar.isEqualDate(i._old,e))&&!i._typing,a=r!==i.element.val();(o||a)&&i.element.trigger(g),t&&(i._old=e,i._oldText=i.element.val(),i.trigger(g)),i._typing=!1},_createTimeView:function(){var e,t,n=this,i=n.options,r=n.element;n.timeView&&(n.timeView.destroy(),n.timeView=null),n.timeView=e=new W(B({},i,{id:r.attr(F),size:"auto"!=i.adaptiveMode||n.bigScreenMQL.mediaQueryList.matches?i.size:"large",anchor:n.wrapper,format:i.format,change:function(e,t){t?n._change(e):r.val(e)},open:function(i){n.options.timeView&&"scroll"!==n.options.timeView.list?n.timeView._adjustListWidth():n.timeView._updateTitle(),n.trigger(f)?i.preventDefault():(r.attr(M,!0),t.attr(E,!1),e.current()&&r.attr(R,e._optionID))},close:function(e){n.trigger(m)?e.preventDefault():(r.attr(M,!1),t.attr(E,!0),r[0].removeAttribute(R))},active:function(t){r&&r.length&&r[0].removeAttribute(R),t&&r.attr(R,e._optionID)},specifiedRange:n._specifiedRange,maxSet:+i.max!=+V})),t=e.ul,n._ariaLabel(t)},_icon:function(){var t,n=this,i=n.element,o=n.options;(t=i.next("button.k-input-button"))[0]||(t=e(r.renderButton('',{icon:"clock",size:o.size,fillMode:o.fillMode,shape:"none",rounded:"none"})).insertAfter(i)),n._arrow=t.attr({role:"button"})},_keydown:function(e){var t=this,n=e.keyCode,r=t.timeView,o=t.element.val();r.popup.visible()||e.altKey?(r.move(e),t._dateInput&&e.stopImmediatePropagation&&e.stopImmediatePropagation()):n===i.ENTER&&o!==t._oldText?t._change(o):t._typing=!0},_option:function(e,n){var i=this,r=i.options;if(n===t)return r[e];(n=i.timeView._parse(n))&&(n=new L(+n),r[e]=n,i.timeView.options[e]=n,i.timeView.bind())},_toggleHover:function(t){e(t.currentTarget).toggleClass(x,"mouseenter"===t.type)},_update:function(e){var t=this,i=t.options,r=t.timeView,o=r._parse(e);return j(o,i.min,i.max)||(o=null),t._value=o,t._currentlySelected=o,t._dateInput&&o?t._dateInput.value(o||e):t.element.val(n.toString(o||e,i.format,i.culture)),r.value(o),o},_wrapper:function(){var e,t=this.element;(e=t.parents(".k-timepicker"))[0]||(e=t.wrap("").parent()),e[0].style.cssText=t[0].style.cssText,this.wrapper=e.addClass("k-timepicker k-input").addClass(t[0].className),t.css({height:t[0].style.height})},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=r.on("reset",t._resetHandler))}});function G(e){var t=e.parseFormats;e.format=l(e.format||n.getCulture(e.culture).calendars.standard.patterns.t),(t=P(t)?t:[t]).splice(0,0,e.format),e.parseFormats=t}function K(e){e.preventDefault()}function Y(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function $(e,t){var n=!1;return-1!==e.indexOf(t)&&(n=!0),n}function Q(e,t){for(var n=String(e);n.length<(t||2);)n="0"+n;return n}function X(e){return e.length&&e[0].getBoundingClientRect().height}n.cssProperties.registerPrefix("TimePicker","k-input-"),n.cssProperties.registerValues("TimePicker",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),h.plugin(q)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.TimeView,r=n.html,o=n.parseDate,a=n.support,s=n.mediaQuery,l=n._activeElement,c=n._extractFormat,d=n.calendar,u=d.isInRange,h=d.restrictValue,p=d.isEqualDatePart,f=i.getMilliseconds,m=n.ui,g=m.Widget,v="open",_="close",b="change",w=".kendoDateTimePicker",y="click"+w,k=a.mouseAndTouchPresent?n.applyEventMap("up",w.slice(1)):y,x="disabled",C="readonly",S="k-focus",T="k-disabled",D="mousedown"+w,I="month",z="aria-activedescendant",M="aria-expanded",E="aria-hidden",A="aria-disabled",H="aria-readonly",R=Date,F=new R(1800,0,1),P=new R(2099,11,31),B={view:"date"},L={view:"time"},V=e.extend,O=function(e){var t=e.buttonSize,i=e.messages;return'
              '+n.html.renderButton('",{size:t})+n.html.renderButton('",{size:t})+'
              "},N="k-selected",W=g.extend({init:function(t,i){var r,a=this;(i=i||{}).componentType=i.componentType||"classic",g.fn.init.call(a,t,i),t=a.element,(i=a.options).disableDates=n.calendar.disabled(i.disableDates),i.min=o(t.attr("min"))||o(i.min),i.max=o(t.attr("max"))||o(i.max),+i.max==+P&&+i.min==+F&&+i.startTime==+F&&i.endTime==+P||(this._specifiedRange=!0),q(i),a._initialOptions=V({},i),a._wrapper(),a.bigScreenMQL=s("large"),"auto"==a.options.adaptiveMode&&a.bigScreenMQL.onChange((function(){a.dateView&&a.dateView.destroy(),a.timeView&&a.timeView.destroy(),i.singlePopup&&a._popup(),a._views()})),a.smallScreenMQL=s("small"),"auto"==a.options.adaptiveMode&&a.smallScreenMQL.onChange((function(){a.popup&&n.isFunction(a.popup.fullscreen)&&(a.popup.fullscreen(a.smallScreenMQL.mediaQueryList.matches),a.options.timeView&&"scroll"===a.options.timeView.list&&(a.timeView.addTranslate(),a.timeView._updateRanges()))})),i.singlePopup&&a._popup(),a._views(),a._icons(),a._reset(),a._template();try{t[0].setAttribute("type","text")}catch(e){t[0].type="text"}t.addClass("k-input-inner").attr({role:"combobox","aria-expanded":!1,"aria-haspopup":"dialog","aria-controls":a.dateView._dateViewID+" "+a.timeView._timeViewID,autocomplete:"off"}),a._midnight=a._calculateMidnight(i.min,i.max),t.is("[disabled]")||e(a.element).parents("fieldset").is(":disabled")?a.enable(!1):a.readonly(t.is("[readonly]")),r=o(i.value||a.element.val(),i.parseFormats,i.culture),a._createDateInput(i),a._old=a._update(r||a.element.val()),a._oldText=t.val(),a._applyCssClasses(),i.label&&a._label(),n.notify(a)},options:{name:"DateTimePicker",value:null,format:"",timeFormat:"",culture:"",parseFormats:[],dates:[],disableDates:null,startTime:null,endTime:null,min:new R(F),max:new R(P),interval:30,height:200,footer:"",start:I,depth:I,animation:{},month:{},ARIATemplate:function(e){return"Current focused "+e.valueType+" is "+e.text},dateButtonText:"Open the date view",timeButtonText:"Open the time view",dateInput:!1,weekNumber:!1,messages:{set:"Set",cancel:"Cancel",hour:"hour",minute:"minute",second:"second",millisecond:"millisecond",now:"Now",date:"Date",time:"Time",today:"Today",weekColumnHeader:""},adaptiveMode:"none",componentType:"classic",size:"medium",fillMode:"solid",rounded:"medium",label:null},events:[v,_,b],componentTypes:{classic:{singlePopup:!1,timeView:{list:"list"}},modern:{singlePopup:!0,timeView:{list:"scroll"}}},setOptions:function(e){var t,i,r,a=this,s=a._value;g.fn.setOptions.call(a,e),(e=a.options).min=t=o(e.min),e.max=i=o(e.max),q(e),a._midnight=a._calculateMidnight(e.min,e.max),r=e.value||a._value||a.dateView._current,t&&!p(t,r)&&(t=new R(F)),i&&!p(i,r)&&(i=new R(P)),a._dateIcon.off(w),a._dateIcon.remove(),a._timeIcon.off(w),a._timeIcon.remove(),a.dateView.setOptions(e),a.timeView.setOptions(V({},e,{format:e.timeFormat,min:t,max:i})),a._icons(),a._editable(e),a._createDateInput(e),a._dateInput||a.element.val(n.toString(s,e.format,e.culture)),s&&a._updateARIA(s),e.label&&a._inputLabel?a.label.setOptions(e.label):!1===e.label?(a.label._unwrapFloating(),a._inputLabel.remove(),delete a._inputLabel):e.label&&a._label()},_editable:function(e){var t=this,i=t.element.off(w),r=t._dateIcon.off(w),o=t._timeIcon.off(w),a=t.wrapper.off(w),s=e.readonly,l=e.disable;s||l?(a.addClass(l?T:"").removeClass(l?"":T),i.attr(x,l).attr(C,s).attr(A,l).attr(H,s)):(a.removeClass(T).on("mouseenter.kendoDateTimePicker mouseleave.kendoDateTimePicker",t._toggleHover),i&&i.length&&(i[0].removeAttribute(x),i[0].removeAttribute(C,!1),i[0].removeAttribute(A,!1),i[0].removeAttribute(H,!1)),i.on("keydown"+w,t._keydown.bind(t)).on("focus"+w,(function(){t.wrapper.addClass(S)})).on("focusout"+w,(function(){t.wrapper.removeClass(S),i.val()!==t._oldText&&(t._change(i.val()),i.val()||t.dateView.current(n.calendar.getToday())),t.options.singlePopup||(t.close("date"),t.close("time"))})),r.on(D,j).on(k,(function(e){t.toggle("date"),t._focusElement(e.type)})),o.on(D,j).on(k,(function(e){t.toggle("time"),t._focusElement(e.type)})))},_label:function(){var t=this,i=t.options,r=e.isPlainObject(i.label)?i.label:{content:i.label};t._dateInput&&(r.floatCheck=function(){return!t.value()&&!t._dateInput._hasDateInput()&&document.activeElement!==t.element[0]&&(t.element.val(""),!0)}),t.label=new n.ui.Label(null,e.extend({},r,{widget:t})),t._inputLabel=t.label.element},_focusElement:function(e){var t=this.element;a.touch&&(!a.mouseAndTouchPresent||(e||"").match(/touch/i))||t[0]===l()||t.trigger("focus")},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e=e===t||e)},destroy:function(){var e=this;g.fn.destroy.call(e),e.dateView.destroy(),e.timeView.destroy(),e.label&&e.label.destroy(),e.options.singlePopup&&(e.popup.element.off(w),e.popup.destroy()),e.element.off(w),e._dateIcon.off(w),e._timeIcon.off(w),e.wrapper.off(w),e._form&&e._form.off("reset",e._resetHandler),e.bigScreenMQL&&(e.bigScreenMQL.destroy(),e.bigScreenMQL=null),e.smallScreenMQL&&(e.smallScreenMQL.destroy(),e.smallScreenMQL=null)},close:function(e){var t=this;t.options.singlePopup?t.popup.close():("time"!==e&&(e="date"),t[e+"View"].close()),setTimeout((function(){t.element.removeAttr("aria-activedescendant")}))},open:function(e){var t,n=this;n.options.singlePopup?(n.dateView._calendar(),n.timeView.ul.find("li").length<1&&n.timeView.bind(),t=n.popup._hovered,n.popup._hovered=!0,n.popup.open(),"time"===e?n._switchToTimeView():n._switchToDateView(),this._dateIcon.toggle("time"!==e),this._timeIcon.toggle("time"===e),setTimeout((function(){n.popup._hovered=t}),1)):("time"!==e&&(e="date"),this[e+"View"].open())},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},toggle:function(e){if(this.options.singlePopup)this.popup.visible()?this.close():this.open(e);else{var t="timeView";"time"!==e?e="date":t="dateView",this[e+"View"].toggle(),this[t].close()}},value:function(e){var n=this;if(e===t)return n._value;n._old=n._update(e),null===n._old&&(n._dateInput?n._dateInput.value(n._old):n.element.val("")),n._oldText=n.element.val(),n.label&&n.label.floatingLabel&&n.label.floatingLabel.refresh()},_change:function(e){var t,n=this,i=n.element.val();e=n._update(e);var r=(t=+n._old!=+e)&&!n._typing,o=i!==n.element.val();(r||o)&&n.element.trigger(b),t&&(n._old=e,n._oldText=n.element.val(),n.trigger(b)),n._typing=!1},_option:function(e,n){var i,r,a=this,s=a.options,l=a.timeView,c=l.options,d=a._value||a._old;if(n===t)return s[e];if(n=o(n,s.parseFormats,s.culture),c.maxSet=!1,n){if(s.min.getTime()===s.max.getTime()&&(c.dates=[]),s[e]=new R(n.getTime()),a.dateView[e](n),a._midnight=a._calculateMidnight(s.min,s.max),d&&(i=p(s.min,d),r=p(s.max,d)),i||r){if(c[e]=n,i&&!r&&(c.max=U(s.interval)),r){if(a._midnight)return void l.dataBind([P]);i||(c.min=F,c.maxSet=!0)}}else c.max=P,c.min=F;l.bind()}},_toggleHover:function(t){e(t.currentTarget).toggleClass("k-hover","mouseenter"===t.type)},_update:function(t){var i,r,a,s,l,c=this,d=c.options,f=d.min,m=d.max,g=d.startTime,v=d.endTime,_=d.dates,w=c.timeView,y=c._value,k=o(t,d.parseFormats,d.culture),x=null===k&&null===y||k instanceof Date&&y instanceof Date;return d.disableDates&&d.disableDates(k)&&(k=null,c._old||c.element.val()||(t=null)),+k==+y&&x?((l=n.toString(k,d.format,d.culture))!==t&&(c.element.val(null===k?t:l),t instanceof String&&c.element.trigger(b)),k):(null!==k&&p(k,f)?k=h(k,f,m):u(k,f,m)||(k=null),c._value=k,w.value(k),c.dateView.value(k),k&&(a=c._old,(r=w.options).maxSet=!1,_[0]&&(_=e.grep(_,(function(e){return p(k,e)})))[0]&&(w.dataBind(_),s=!0),s||(p(k,f)&&(r.min=g||f,r.max=v||U(d.interval),i=!0),p(k,m)&&(c._midnight?(w.dataBind([P]),s=!0):(r.max=v||m,r.maxSet=!0,i||(r.min=F),i=!0))),!s&&(!a&&i||a&&!p(a,k))&&(i||(r.max=v||P,r.min=g||F),w.bind())),c._dateInput?k&&c._dateInput.value(k):c.element.val(n.toString(k||t,d.format,d.culture)),c._updateARIA(k),k)},_keydown:function(e){var t=this,i=t.dateView,r=t.timeView,o=t.element.val(),a=t.options.singlePopup?t.popup.visible():i.popup.visible(),s=t._dateInput&&e.stopImmediatePropagation;e.altKey&&e.keyCode===n.keys.DOWN?t.toggle(a?"time":"date"):a?(i.move(e),t._updateARIA(i._current),e.keyCode===n.keys.ENTER&&t.toggle("time")):!t.options.singlePopup&&r.popup.visible()?r.move(e):e.keyCode===n.keys.ENTER&&o!==t._oldText?t._change(o):(t._typing=!0,s=!1),s&&e.stopImmediatePropagation()},_timeOption:function(e){var t,n=this,i=n.options,r=i[e],o="startTime"==e?i.min:i.max,a=new R("startTime"==e?F:P);return r&&(a=new R(r)),r&&o&&(t=new Date(o.getFullYear(),o.getMonth(),o.getDate(),r.getHours(),r.getMinutes(),r.getSeconds()),"startTime"==e?n.options.min=t:n.options.max=t),"modern"===i.componentType&&(a=o),a},_views:function(){var e,t,r,a,s,l,c,d,u,h=this,p=h.element,f=h.options,m=p.attr("id");f.singlePopup&&(f.dateDiv=h.popup.element.find(".k-datetime-calendar-wrap"),c=h.popup.element.find(".k-datetime-time-wrap"),f.omitPopup=d=!0,u=f.timeView),h.dateView=e=new n.DateView(V({},f,{id:m,anchor:h.wrapper,change:function(){var e=h._applyDateValue();f.singlePopup?(h.timeView._currentlySelected||(h.timeView._currentlySelected=new Date),h.timeView._currentlySelected.setFullYear(e.getFullYear()),h.timeView._currentlySelected.setMonth(e.getMonth()),h.timeView._currentlySelected.setDate(e.getDate()),h._switchToTimeView(),h._toggleIcons("time")):(h._change(e),h.close("date"))},close:function(e){h.trigger(_,B)?e.preventDefault():(p.attr(M,!1),r.attr(E,!0))},open:function(e){h.trigger(v,B)?e.preventDefault():(p.val()!==h._oldText&&(l=o(p.val(),f.parseFormats,f.culture),h.dateView[l?"current":"value"](l)),r.attr(E,!1),p.attr(M,!0),h._updateARIA(l))}})),r=e.div,s=f.min.getTime(),h.timeView=t=new i({id:m,adaptiveMode:f.adaptiveMode,value:f.value,size:"auto"!=f.adaptiveMode||h.bigScreenMQL.mediaQueryList.matches?f.size:"large",anchor:h.wrapper,animation:f.animation,format:f.timeFormat,culture:f.culture,height:"modern"===f.componentType?null:f.height,interval:f.interval,startTime:f.startTime,endTime:f.endTime,min:h._timeOption("startTime"),max:h._timeOption("endTime"),dates:s===f.max.getTime()?[new Date(s)]:[],parseFormats:f.parseFormats,validateDate:!f.startTime&&!f.endTime,change:function(t,i){t=h._applyTimeValue(t),i?(h._timeSelected=!0,h._change(t)):(p.val(n.toString(t,f.format,f.culture)),e.value(t),h._updateARIA(t))},close:function(e){h.trigger(_,L)?e.preventDefault():(a.attr(E,!0),p.attr(M,!1))},open:function(e){"modern"!==h.options.componentType?t._adjustListWidth():h.timeView._updateTitle(),h.trigger(v,L)?e.preventDefault():(p.val()!==h._oldText&&(l=o(p.val(),f.parseFormats,f.culture),h.timeView.value(l)),a.attr(E,!1),p.attr(M,!0),t.options.active(t.current()))},active:function(e){p&&p.length&&p[0].removeAttribute(z),e&&p.attr(z,t._optionID)},popup:f.popup,useValueToRender:!0,specifiedRange:h._specifiedRange,omitPopup:d,timeDiv:c,timeView:u,messages:h.options.messages}),a=t.ul},_applyDateValue:function(){var e,t,i=this,r=i.options,o=i.dateView.calendar.value(),a=+o,s=+r.min,l=+r.max;return a!==s&&a!==l||(e=a===s?s:l,(e=new R(i._value||e)).setFullYear(o.getFullYear(),o.getMonth(),o.getDate()),u(e,s,l)&&(o=e)),i._value&&(t=n.date.setHours(new Date(o),i._value),u(t,s,l)&&(o=t)),o},_applyTimeValue:function(e){var t=this.timeView,n=this.options;return(e=t._parse(e))n.max&&(e=new R(+n.max),t.options.max=e),e},_icons:function(){var t=this,n=t.element,i=t.options;t.wrapper.find("button.k-input-button")[0]||(t._dateIcon=e(r.renderButton('',{icon:"calendar",size:i.size,fillMode:i.fillMode,shape:"none",rounded:"none"})).insertAfter(n),t._timeIcon=e(r.renderButton('',{icon:"clock",size:i.size,fillMode:i.fillMode,shape:"none",rounded:"none"})).insertAfter(t._dateIcon)),i.singlePopup&&t._timeIcon.hide()},_wrapper:function(){var e,t=this.element;(e=t.parents(".k-datetimepicker"))[0]||(e=t.wrap("").parent()),e[0].style.cssText=t[0].style.cssText,t.css({height:t[0].style.height}),this.wrapper=e.addClass("k-datetimepicker k-input").addClass(t[0].className).removeClass("input-validation-error")},_reset:function(){var t=this,i=t.element,r=i.attr("form"),o=r?e("#"+r):i.closest("form"),a=t.options,s=a.disableDates,l=a.parseFormats.length?a.parseFormats:null,c=t._initialOptions.value,d=i[0].defaultValue;c&&s&&s(c)&&(c=null),d&&n.parseDate(d,l,a.culture)||!c||i.attr("value",n.toString(c,a.format,a.culture)),o[0]&&(t._resetHandler=function(){t.value(c||i[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=o.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=n.template(this.options.ARIATemplate).bind(this)},_createDateInput:function(e){this._dateInput&&(this._dateInput.destroy(),this._dateInput=null),e.dateInput&&(this._dateInput=new m.DateInput(this.element,{culture:e.culture,format:e.format,size:e.size,fillMode:e.fillMode,rounded:e.rounded,min:e.min,max:e.max,interval:e.interval,messages:e.messages.dateInput}))},_calculateMidnight:function(e,t){return f(e)+f(t)===0},_updateARIA:function(e){var t=this,n=t.dateView.calendar;t.element&&t.element.length&&t.element[0].removeAttribute(z),n&&t.element.attr(z,n._updateAria(t._ariaTemplate,e))},_popup:function(){var t=this,i=t.options,r=e("
              ").attr(E,"true").addClass("k-datetime-container k-group k-reset").appendTo(document.body);r.append(n.template(O)(V({},t.options,{buttonSize:"auto"!=i.adaptiveMode||t.bigScreenMQL.mediaQueryList.matches?i.size:"large"}))),t.popup&&(t.popup.destroy(),t.popup.element.remove(),t.popup=null),"auto"!=t.options.adaptiveMode||t.bigScreenMQL.mediaQueryList.matches?t.popup=new m.Popup(r,V(i.popup,i,{name:"Popup",isRtl:n.support.isRtl(t.wrapper),anchor:t.wrapper,activate:function(){t.options.timeView&&"scroll"===t.options.timeView.list&&(t.timeView.addTranslate(),t.timeView.applyValue(t._value),t.timeView._updateRanges())},open:function(e){t.trigger(v,{view:this.element.find(".k-date-tab").length?"date":"time",sender:t})?e.preventDefault():(this.element.attr(E,!1),t.element.attr(M,!0)),t.timeView._updateTitle()},close:function(e){t.trigger(_,{view:this.element.find(".k-date-tab").length?"date":"time",sender:t})?e.preventDefault():(t.element.attr(M,!1),this.element.attr(E,!0))}})):t.popup=new m.ActionSheet(r,{adaptive:!0,title:"Select Date and Time",subtitle:"DD / MM / YY - 00:00:00",closeButton:!0,focusOnActivate:!1,fullscreen:t.smallScreenMQL.mediaQueryList.matches,popup:V(i.popup,i,{name:"Popup",isRtl:n.support.isRtl(t.wrapper),anchor:t.wrapper,activate:function(){t.options.timeView&&"scroll"===t.options.timeView.list&&(t.timeView.addTranslate(),t.timeView.applyValue(t._value),t.timeView._updateRanges())},open:function(e){t.trigger(v,{view:this.element.find(".k-date-tab").length?"date":"time",sender:t})?e.preventDefault():(this.element.attr(E,!1),t.element.attr(M,!0)),t.timeView._updateTitle()},close:function(e){t.trigger(_,{view:this.element.find(".k-date-tab").length?"date":"time",sender:t})?e.preventDefault():(t.element.attr(M,!1),this.element.attr(E,!0))}})}),r.on(y+w,".k-datetime-buttongroup .k-button",t._groupChangeClick.bind(t)),r.on(y+w,".k-datetime-footer button.k-time-cancel",t._cancelClickHandler.bind(t)),r.on(y+w,".k-datetime-footer button.k-time-accept",t._setClickHandler.bind(t))},_groupChangeClick:function(t){j(t),e(t.currentTarget).index()?(this._switchToTimeView(),this._toggleIcons("time")):(this._switchToDateView(),this._toggleIcons("date"))},_switchToDateView:function(){this.popup.element.find(".k-group-start, .k-group-end").removeClass(N).eq(0).addClass(N),this.popup.element.find(".k-datetime-wrap").removeClass("k-time-tab").addClass("k-date-tab")},_switchToTimeView:function(){this.timeView.addTranslate(),this.timeView.applyValue(this._value),this.timeView._updateRanges(),this.popup.element.find(".k-group-start, .k-group-end").removeClass(N).eq(1).addClass(N),this.popup.element.find(".k-datetime-wrap").removeClass("k-date-tab").addClass("k-time-tab")},_toggleIcons:function(e){if(!e)return this._dateIcon.toggle(),void this._timeIcon.toggle();this._dateIcon.toggle("time"!==e),this._timeIcon.toggle("time"===e)},_cancelClickHandler:function(e){j(e),this._value&&(this.value(this._value),this.dateView.value(this._value)),this.popup.close()},_setClickHandler:function(e){j(e);var t,n=this._applyDateValue();n=n||new Date,t=this.timeView._currentlySelected||n,this.timeView._updateCurrentlySelected(),n.setHours(t.getHours()),n.setMinutes(t.getMinutes()),n.setSeconds(t.getSeconds()),n=this._applyTimeValue(n),this._change(n),this.popup.close()}});function U(e){var t=new Date(2100,0,1);return t.setMinutes(-e),t}function j(e){e.preventDefault()}function q(t){var i,r=n.getCulture(t.culture).calendars.standard.patterns,o=!t.parseFormats.length;t.format=c(t.format||r.g),t.timeFormat=i=c(t.timeFormat||r.t),n.DateView.normalize(t),o&&t.parseFormats.unshift("yyyy-MM-ddTHH:mm:ss"),-1===e.inArray(i,t.parseFormats)&&t.parseFormats.push(i)}n.cssProperties.registerPrefix("DateTimePicker","k-input-"),n.cssProperties.registerValues("DateTimePicker",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),m.plugin(W)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=n.keys,o=n.mediaQuery,a=i.Widget,s="month",l="open",c="close",d="change",u=n.template,h=e.extend,p=n.support,f=p.mobileOS,m="aria-expanded",g="aria-disabled",v="aria-activedescendant",_="k-disabled",b="disabled",w="readonly",y="aria-hidden",k=".kendoDateRangePicker",x="click"+k,C=p.mouseAndTouchPresent?n.applyEventMap("up",k.slice(1)):x,S=n.parseDate,T=function(e){n.DateView.call(this,e)};function D(e){e.preventDefault()}(T.prototype=Object.create(n.DateView.prototype))._calendar=function(){var t,r=this,o=r.calendar,a=r.options;if(!o){var s=r.popup._content||r.popup.element;"auto"!=a.adaptiveMode||r.bigScreenMQL.mediaQueryList.matches||(s=s.append(e('
              ')).find(".k-scrollable-wrap")),t=e("
              ").attr("id",n.guid()).appendTo(s),r.calendar=o=new i.MultiViewCalendar(t,{size:"auto"!=a.adaptiveMode||r.bigScreenMQL.mediaQueryList.matches?a.size||"medium":"large",orientation:"auto"!=a.adaptiveMode||r.bigScreenMQL.mediaQueryList.matches?"horizontal":"vertical",views:"auto"!=a.adaptiveMode||r.bigScreenMQL.mediaQueryList.matches?2:1}),r._setOptions(a),o.navigate(r._value||r._current,a.start),r._range=r._range||a.range||{},t.on("mousedown.kendoDateRangePicker",D).on(x,"td:has(.k-link)",r._click.bind(r)),r.calendar.selectRange(r._range)}},T.prototype._setOptions=function(e){this.calendar.setOptions({focusOnNav:!1,change:e.change,culture:e.culture,dates:e.dates,depth:e.depth,footer:e.footer,format:e.format,selectable:e.selectable,max:e.max,min:e.min,month:e.month,weekNumber:e.weekNumber,start:e.start,disableDates:e.disableDates,range:e.range,size:"auto"!=e.adaptiveMode||this.bigScreenMQL.mediaQueryList.matches?e.size||"medium":"large"})},T.prototype.range=function(e){this._range=e,this.calendar&&(e.start||e.end?this.calendar.selectRange(e):(this.calendar.selectRange(e),this.calendar.rangeSelectable.clear(!0)))},T.prototype.move=function(e){var t=this,n=e.keyCode,i=t.calendar,o=e.ctrlKey&&n==r.DOWN||n==r.ENTER,a=!1;if(e.altKey)n==r.DOWN?(t.open(),e.preventDefault(),a=!0):n==r.UP&&(t.close(),e.preventDefault(),a=!0);else if(t.popup.visible()){if(n==r.ESC||o&&i._cell.hasClass("k-selected"))return t.close(),e.preventDefault(),!0;t._current=i._move(e),a=!0}return a},T.prototype._click=function(e){f.ios||f.android&&("firefox"==f.browser||"chrome"==f.browser)?this._range&&this._range.end&&this.close():this._range&&this._range.end&&-1!==e.currentTarget.className.indexOf("k-range-end")&&this.close()},n.DateRangeView=T;var I=a.extend({init:function(e,t){var i=this;a.fn.init.call(i,e,t),e=i.element,(t=i.options).disableDates=n.calendar.disabled(t.disableDates),t.min=S(e.attr("min"))||S(t.min),t.max=S(e.attr("max"))||S(t.max),i._initialOptions=h({},t),i._buildHTML(),i._range=i.options.range,i._changeTriggered=!1,i._initializeDateView(),i._initializeDateViewProxy=i._initializeDateView.bind(i),i.bigScreenMQL=o("large"),i.bigScreenMQL.onChange((function(){i._initializeDateViewProxy()})),i._ariaTemplate=u(this.options.ARIATemplate).bind(i),i._reset(),i._aria(),i._inputs.on(C+k,i._click.bind(i)).on("keydown"+k,i._keydown.bind(i)),i._initializeDateInputs(),e.is("[disabled]")?i.enable(!1):i.readonly(e.is("[readonly]"))},options:{name:"DateRangePicker",labels:!0,footer:"",format:"",culture:"",min:new Date(1900,0,1),max:new Date(2099,11,31),start:s,depth:s,adaptiveMode:"none",animation:{},month:{},startField:"",endField:"",dates:[],disableDates:null,range:null,ARIATemplate:function(e){return"Current focused "+e.valueType+" is "+e.text},weekNumber:!1,messages:{startLabel:"Start",endLabel:"End"},size:"medium",fillMode:"solid",rounded:"medium"},events:[l,c,d],setOptions:function(e){var t=this;a.fn.setOptions.call(t,e),(e=t.options).min=S(e.min),e.max=S(e.max),t._inputs.off(k),this._initializeDateInputs(),t.dateView.setOptions(e),t._range=e.range},_aria:function(){this._inputs.attr({role:"combobox","aria-haspopup":"grid","aria-expanded":!1,"aria-controls":this.dateView._dateViewID,autocomplete:"off"})},_click:function(){var e=this;e._preventInputAction||e.dateView.popup.visible()||e.dateView.open()},_keydown:function(e){var t,n=this,i=n.dateView;n._preventInputAction?e.stopImmediatePropagation():(t=i.move(e),n._updateARIA(i._current),t&&e.stopImmediatePropagation&&e.stopImmediatePropagation())},_updateARIA:function(t){var n=this,i=n.dateView.calendar;n._inputs&&n._inputs.length&&n._inputs.removeAttr(v),i&&(t&&!i._dateInViews(t)&&i.navigate(t),e.contains(n.element[0],document.activeElement)&&n._inputs.attr(v,i._updateAria(n._ariaTemplate,t)))},_startChange:function(e){var t=this,n=e.sender.value(),i=t._endDateInput.value();t.options.disableDates(n)&&(e.sender.value(null),n=null),t.range({start:n,end:i}),t._changeTriggered||t.trigger(d)},_endChange:function(e){var t=this,n=e.sender.value(),i=t._startDateInput.value();t.options.disableDates(n)&&(e.sender.value(null),n=null),t.range({start:i,end:n}),t._changeTriggered||t.trigger(d)},_initializeDateView:function(){var e,t=this;t.dateView&&(t.dateView.destroy(),t.dateView=null),t.dateView=new T(h({},t.options,{id:t.element.attr("id"),anchor:t.wrapper,views:2,selectable:"range",range:t._range,change:function(){var e=this.selectRange();t.range(e),t.trigger(d),t._changeTriggered=!0,t._startDateInput.trigger(d),t._endDateInput.trigger(d),t._changeTriggered=!1},close:function(n){t.trigger(c)?n.preventDefault():(t._inputs.attr(m,!1),e.attr(y,!0),setTimeout((function(){t._inputs&&t._inputs.removeAttr(v)})))},open:function(n){t.trigger(l)?n.preventDefault():(t._inputs.attr(m,!0),e.attr(y,!1),t._updateARIA())}})),e=t.dateView.div},_initializeDateInputs:function(){var e=this,t=e.options,n=t.range||{},i={footer:t.footer,format:t.format,culture:t.culture,min:t.min,max:t.max,start:t.start,startField:t.startField,endField:t.endField,depth:t.depth,animation:t.animation,month:t.month,dates:t.dates,disableDates:t.disableDates,ARIATemplate:t.ARIATemplate,weekNumber:t.weekNumber,size:t.size,fillMode:t.fillMode,rounded:t.rounded};e._startDateInput&&(e._startDateInput.destroy(),e._endDateInput.destroy(),e.wrapper.empty(),e._buildHTML(),e._inputs.on(C+k,e._click.bind(e)).on("keydown"+k,e._keydown.bind(e))),e._startDateInput=e._startInput.kendoDateInput(h(!0,i,{value:n.start})).getKendoDateInput(),e._endDateInput=e._endInput.kendoDateInput(h(!0,i,{value:n.end})).getKendoDateInput(),e._startChangeHandler=e._startChange.bind(e),e._startDateInput.bind(d,e._startChangeHandler),e._endChangeHandler=e._endChange.bind(e),e._endDateInput.bind(d,e._endChangeHandler)},_buildHTML:function(){var t,i=this,r=i.element;i.wrapper||(i.wrapper=r.addClass("k-daterangepicker")),i.options.labels?(t=n.guid(),e('").appendTo(i.wrapper),t=n.guid(),e(' ").appendTo(i.wrapper)):e(" ").appendTo(i.wrapper),i._startInput=i.wrapper.find("input").eq(0),i._endInput=i.wrapper.find("input").eq(1),""!==i.options.startField&&(i._startInput.attr(n.attr("bind"),"value: "+i.options.startField),i._startInput.attr("name",i.options.startField)),""!==i.options.endField&&(i._endInput.attr(n.attr("bind"),"value: "+i.options.endField),i._endInput.attr("name",i.options.endField)),i._inputs=i._startInput.add(i._endInput)},_option:function(e,n){var i=this.options;if(n===t)return i[e];(n=S(n,i.parseFormats,i.culture))&&(i[e]=new Date(+n),this.dateView[e](n))},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=r.on("reset",t._resetHandler))},_editable:function(t){var n=this,i=n._inputs,r=t.readonly,o=t.disable;r||o?(n.wrapper.addClass(o?_:"").removeClass(o?"":_),i.attr(b,o).attr(w,r).attr(g,o),n._preventInputAction=!0):(n.wrapper.removeClass(_),e.each(i,(function(e,t){t.removeAttribute(b),t.removeAttribute(w)})),i.attr(g,!1),n._preventInputAction=!1)},destroy:function(){var e=this;e._startDateInput&&(e._startDateInput.unbind(d,e._startChangeHandler),e._startDateInput.destroy(),e._startChangeHandler=null),e._endDateInput&&(e._endDateInput.unbind(d,e._endChangeHandler),e._endDateInput.destroy(),e._endChangeHandler=null),e._form&&e._form.off("reset",e._resetHandler),e._inputs.off(k),e._inputs=null,e.bigScreenMQL&&e.bigScreenMQL.destroy(),e._createDateViewProxy=null,e.dateView.destroy(),e.element.off(k),a.fn.destroy.call(e)},range:function(e){var n=this;if(e===t)return n._range;n._range=e,n.dateView.range({start:null,end:null}),e||(n._startDateInput.value(null),n._endDateInput.value(null)),n._startDateInput.value(e.start?e.start:null),n._endDateInput.value(e.end?e.end:null),e.start&&!e.end?n.dateView.range({start:e.start,end:null}):e.start&&e.end&&+e.start<=+e.end&&n.dateView.range({start:e.start,end:e.end})},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},readonly:function(e){this._startDateInput.readonly(e),this._endDateInput.readonly(e),this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._startDateInput.enable(e),this._endDateInput.enable(e),e||this.close(),this._editable({readonly:!1,disable:!(e=e===t||e)})}});n.ui.plugin(I)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=n.effects.Transition,o=n.ui.Pane,a=n.keys,s=n.ui.PaneDimensions,l=i.DataBoundWidget,c=n.data.DataSource,d=Math,u=d.abs,h=d.ceil,p=d.round,f=d.max,m=d.min,g=d.floor,v="change",_="click",b="refresh",w="primary",y="scrollview-page",k="function",x="itemChange",C=".ScrollView",S="keydown",T="focus",D="focusout",I="k-focus",z="tabindex";function M(e){return"k-"+e}var E=n.Observable.extend({init:function(e){var t=this;this.dataSource=e,this.pendingRequestArray=[],this.initialFetch=!1,this.useRanges=e.options.serverPaging,n.Observable.fn.init.call(this),e.bind("change",(function(){t._change()}))},_change:function(){this.trigger("reset",{offset:this.offset})},page:function(e,t){var n=this;this.useRanges||(this.dataSource.page(e+1),t?t(n.dataSource.view()):n.trigger("page",{page:e})),this.useRanges&&this.dataSource.range(e*this.dataSource.pageSize(),this.dataSource.pageSize(),(function(){t?t(n.dataSource.view()):n.trigger("page",{page:e})}))},scrollTo:function(e){var t=Math.ceil(this.dataSource.total()/this.dataSource.pageSize()||1),n=e-1,i=n-1,r=e,o=t>0&&e+1>=t?-1:e+1,a=t>0&&o+1>=t?-1:o+1;o>=0&&this.pendingRequestArray.push(o),n>=0&&this.pendingRequestArray.push(n),i>=0&&this.pendingRequestArray.push(i),a>=0&&this.pendingRequestArray.push(a),this.page(r)},getViewData:function(){var e,t=this.dataSource.view();if(this.dataSource.options.pageSize>1){e=[];for(var n=0;n"),r=e("
              ");r.append(i),t._navigationContainer.append(r),this._changeProxy=n._change.bind(n),this._refreshProxy=n._refresh.bind(n),t.bind(v,this._changeProxy),t.bind(b,this._refreshProxy),i.on(_+C,".k-link",this._click.bind(t)),e.extend(n,{element:i,scrollView:t}),n._navigatable()},items:function(){return this.element.children()},_focus:function(){var e=this;e._focused=!0,e._setCurrent(e.element.find("."+M(w)))},_blur:function(){var e=this;e._focused=!1,e._current&&(e._current.removeClass(I),e._current.removeAttr("id"),e.element.removeAttr("aria-activedescendant"))},_keyDown:function(e){var t,n,i=this,r=i._current,o=e.keyCode;o==a.LEFT&&(t=!0,(n=r.prev(".k-link")).length&&i._setCurrent(n)),o==a.RIGHT&&(t=!0,(n=r.next(".k-link")).length&&i._setCurrent(n)),e.keyCode!=a.SPACEBAR&&e.keyCode!=a.ENTER||(t=!0,i._current.trigger("click")),t&&(e.preventDefault(),e.stopPropagation())},_setCurrent:function(t){if(this._focused){var i=this,r=n.guid(),o=e(t);i._current&&(e(i._current).removeClass(I).removeAttr("id"),i.element.removeAttr("aria-activedescendant")),o.attr("id",r).addClass(I),i.element.attr("aria-activedescendant",r),i._current=o}},_navigatable:function(){var e=this,t=e.scrollView.options.pageable||{};e.element.attr({tabindex:0,"aria-label":e.scrollView.options.messages.pagerLabel,role:"group"}),e.scrollView.itemsWrapper&&e.element.attr("aria-controls",e.scrollView.itemsWrapper.attr("id")),e._ariaTemplate=n.template(t.ARIATemplate||function(e){return"Item "+(e.index+1)}),e.scrollView.options.navigatable&&(e.element.on(S+C,e,e._keyDown.bind(e)),e.element.on(T+C,e._focus.bind(e)),e.element.on(D+C,e._blur.bind(e)))},_refresh:function(e){for(var t,n="",i=0;i';this.element.html(n),(t=this.items().eq(e.page)).addClass(M(w)),t.attr("aria-pressed",!0),this.scrollView._toggleNavigation({currentPage:e.page})},_change:function(e){if(!e.isDefaultPrevented()){var t,i=this.scrollView._navigationContainer.find(".k-scrollview-nav"),r=this.scrollView.element.width(),o=(r-i.width())/2,a=i.find(".k-link").eq(0).outerWidth(!0)/2,s=this.items();s.removeClass(M(w)),t=s.eq(e.nextPage).addClass(M(w)),s.attr("aria-pressed",!1),this._setCurrent(t),t.attr("aria-pressed",!0);var l=this.items().eq(e.nextPage).length>0?this.items().eq(e.nextPage).position().left:0;if(l>r/2||lr/2?n.scrollLeft(i)+l-r/2:n.scrollLeft(i)-(r/2-l),c+=o+a,i.animate({scrollLeft:c},300)}this.scrollView._toggleNavigation({currentPage:e.currentPage,nextPage:e.nextPage})}},_click:function(t){var n=e(t.currentTarget).index();this.scrollTo(n)},destroy:function(){this.scrollView.unbind(v,this._changeProxy),this.scrollView.unbind(b,this._refreshProxy),this.element.off(C),this.element.remove()}});n.ui.ScrollViewPager=A;var H="transitionEnd",R="dragStart",F="dragEnd",P=n.Observable.extend({init:function(t,i){var a,l,c,d,h,p,f=this;n.Observable.fn.init.call(this),this.element=t,this.container=t.parent(),a=new n.ui.Movable(f.element),l=new r({axis:"x",movable:a,onEnd:function(){f.trigger(H)}}),c=new n.UserEvents(t,{fastTap:!0,start:function(e){2*u(e.x.velocity)>=u(e.y.velocity)?c.capture():c.cancel(),f.trigger(R,e),l.cancel()},allowSelection:!0,end:function(e){f.trigger(F,e)}}),(h=(d=new s({element:f.element,container:f.container})).x).bind(v,(function(){f.trigger(v)})),p=new o({dimensions:d,userEvents:c,movable:a,elastic:!0}),e.extend(f,{duration:i&&i.duration||1,movable:a,transition:l,userEvents:c,dimensions:d,dimension:h,pane:p}),this.bind([H,R,F,v],i)},size:function(){return{width:this.dimensions.x.getSize(),height:this.dimensions.y.getSize()}},total:function(){return this.dimension.getTotal()},offset:function(){return-this.movable.x},updateDimension:function(){this.dimension.update(!0)},refresh:function(){this.dimensions.refresh(),this.dimensions.y.enabled=!1},moveTo:function(e){this.movable.moveAxis("x",-e)},transitionTo:function(e,t,n){n?this.moveTo(-e):this.transition.moveTo({location:e,duration:this.duration,ease:t})},destroy:function(){var e=this;e.userEvents.destroy(),e.unbind(),e.movable=e.tansition=e.dimensions=e.dimension=e.pane=null,e.element.remove()}});n.ui.ScrollViewElasticPane=P;var B=n.Observable.extend({init:function(e,t,i){var r=this;n.Observable.fn.init.call(this),r.element=e,r.pane=t,r._getPages(),this.page=0,this.pageSize=i.pageSize||1,this.contentHeight=i.contentHeight,this.enablePager=i.enablePager,this.pagerOverlay=i.pagerOverlay,r.pane.dimension.forceEnabled()},scrollTo:function(e,n){var i=this;(e!=i.page||n)&&(i.trigger("resize",{currentPage:this.page,nextPage:e,data:t})||(i.page=e,i.pane.transitionTo(-e*i.pane.size().width,r.easeOutExpo,n)))},paneMoved:function(e,t,n,i){var o,a,s=this,l=s.pane,c=l.size().width*s.pageSize,d=p,u=t?r.easeOutBack:r.easeOutExpo;if(-1===e?d=h:1===e&&(d=g),(a=d(l.offset()/c))<0||a>=s.pageCount){var v=a<0?0:-this.page*this.pane.size().width;return this.pane.transitionTo(v,u,i)}o=f(s.minSnap,m(-a*c,s.maxSnap)),a!=s.page&&n&&n({currentPage:s.page,nextPage:a})&&(o=-s.page*l.size().width),l.transitionTo(o,u,i)},updatePage:function(){var e=this.pane,t=p(e.offset()/e.size().width);return t!=this.page&&(this.page=t,!0)},forcePageUpdate:function(){return this.updatePage()},resizeTo:function(e){var t=this.pane,i=e.width;if(this.pageElements.width(i),"100%"===this.contentHeight){var r=this.element.parent().height();if(!0===this.enablePager){var o=this.element.parent().find("div.k-scrollview-nav");!this.pagerOverlay&&o.length&&(r-=n._outerHeight(o,!0))}this.element.css("height",r),this.pageElements.css("height",r)}t.updateDimension(),this._paged||(this.page=g(t.offset()/i)),this.scrollTo(this.page,!0,!0),this.pageCount=this.pageElements.length,this.minSnap=-(this.pageCount-1)*i,this.maxSnap=0},_getPages:function(){this.pageElements=this.element.find(n.roleSelector("page")),this._paged=this.pageElements.length>0},destroy:function(){this.pane=null,this.element.remove()}});n.ui.ScrollViewContent=B;var L=n.Observable.extend({init:function(e,t,i){var r=this;n.Observable.fn.init.call(this),r.element=e,r.pane=t,r.options=i,r._templates(),r.page=i.page||0,r.pages=[],r._initPages(),r.resizeTo(r.pane.size()),r.pane.dimension.forceEnabled()},setDataSource:function(e){this.dataSource=c.create(e),this._dataReader(),this._pendingPageRefresh=!1,this._pendingWidgetRefresh=!1},_viewShow:function(){var e=this;e._pendingWidgetRefresh&&(setTimeout((function(){e._resetPages()}),0),e._pendingWidgetRefresh=!1)},_dataReader:function(){this.dataReader=new E(this.dataSource),this._pageProxy=this._onPage.bind(this),this._resetProxy=this._onReset.bind(this),this.dataReader.bind({page:this._pageProxy,reset:this._resetProxy})},_templates:function(){var e=this.options.template,t=this.options.emptyTemplate,i={},r={};typeof e===k&&(i.template=e,e=function(e){return i.template(e)}),this.template=n.template(e).bind(i),typeof t===k&&(r.emptyTemplate=t,t=function(e){return r.emptyTemplate(e)}),this.emptyTemplate=n.template(t).bind(r)},_initPages:function(){for(var e,t=this.pages,n=this.element,i=0;i<3;i++)e=new V(n),t.push(e);this.pane.updateDimension()},resizeTo:function(e){for(var t=this.pages,i=this.pane,r=0;ri.page?-1:1,i.page=e+r.pagerScroll),r.scrollTo(e))}))},paneMoved:function(e,i,r,o){var a,s,l,c=this,d=c.pane,u=d.size().width,h=d.offset(),p=Math.abs(h)>=u/3,f=i?n.effects.Transition.easeOutBack:n.effects.Transition.easeOutExpo,m=c.page+2>c.pageCount,g=0;1===e?0!==c.page&&(g=-1):-1!==e||m?h>0&&p&&!m?g=1:h<0&&p&&0!==c.page&&(g=-1):g=1,a=c.page,g&&(a=g>0?a+1:a-1,c instanceof n.ui.VirtualScrollViewContent?(c.dataReader.page(a),s=c.dataReader.getViewData()):s=t,s instanceof Array||(s=[s]),l=c.pages?c.pages[1].element:t),r&&c.page!=a&&r({currentPage:c.page,nextPage:a,element:l,data:s})&&(g=0),0===g?c._cancelMove(f,o):-1===g?c._moveBackward(o):1===g&&c._moveForward(o)},updatePage:function(){var e=this.pages;return 0!==this.pane.offset()&&(this.pane.offset()>0?(e.push(this.pages.shift()),this.page++,this.page+2=0&&this.dataReader.pendingRequestArray.push(this.page-2),this.page-1>=0&&this.dataReader.page(this.page-1)),this._repositionPages(),this._resetMovable(),!0)},forcePageUpdate:function(){var e=this.pane.offset(),t=3*this.pane.size().width/4;return u(e)>t&&this.updatePage()},_resetMovable:function(){this.pane.moveTo(0)},_moveForward:function(e){this.pane.transitionTo(-this.width,n.effects.Transition.easeOutExpo,e)},_moveBackward:function(e){this.pane.transitionTo(this.width,n.effects.Transition.easeOutExpo,e)},_cancelMove:function(e,t){this.pane.transitionTo(0,e,t)},_resetPages:function(){this.page=this.options.page||0,this._repositionPages(),this.trigger("reset")},_onPage:function(e){if(e.page>=this.pageCount&&this.setPageContent(this.pages[2],null),this.page==e.page?(!this.dataReader.pagerScroll||0===this.dataReader.pagerScroll&&this.dataReader.initialFetch||(this.dataReader.pagerScroll<0?this._moveForward():this._moveBackward(),this.dataReader.pagerScroll=0),this.setPageContent(this.pages[1],this.dataReader.getViewData())):this.page+1==e.page?this.setPageContent(this.pages[2],this.dataReader.getViewData()):this.page-1==e.page&&this.setPageContent(this.pages[0],this.dataReader.getViewData()),this.dataReader.pendingRequestArray.length>0&&this.dataReader.initialFetch){var t=this.dataReader.pendingRequestArray.shift();this.dataReader.page(t)}},_onReset:function(){this.pageCount=h(this.dataSource.total()/this.dataSource.pageSize())},_repositionPages:function(){var e=this.pages;e[0].position(-1),e[1].position(0),e[2].position(1)},setPageContent:function(e,n){var i=this.template,r=this.emptyTemplate;null!==n&&n!==t?e.content(i(n)):e.content(r({}))},destroy:function(){var e=this,t=e.pages;e.dataReader.unbind(),e.dataSource.unbind(),e.dataReader=e.dataSource=e.pane=null;for(var n=0;n"),this.element.css({position:"absolute",top:"0",left:"0"}),this.width=t.width(),this.element.width(this.width),t.append(this.element)},content:function(e){this.element.html(e)},position:function(e){this.element.css("transform","translate3d("+this.width*e+"px, 0, 0)")},setWidth:function(e){this.width=e,this.element.width(e)},destroy:function(){this.element.remove(),this.element=null}});n.ui.VirtualPage=V;var O=l.extend({init:function(t,i){var r=this;l.fn.init.call(r,t,i),i=r.options,t=r.element,n.stripWhitespace(t[0]);var o=e("<"+(0===t.children().length?"ul":"div")+' class="k-scrollview-wrap" />');t.wrapInner(o),r.itemsWrapper=t.find(".k-scrollview-wrap"),t.addClass(M("scrollview")),r._initNavigation(),this.options.pageable||this.options.enablePager?(this.pager=new A(this),this.options.pagerOverlay&&t.addClass(M("scrollview-overlay"))):(this._changeProxy=r._toggleNavigation.bind(r),this.bind(v,this._changeProxy)),r.inner=t.children().first(),r.page=0,r.inner.css("height",i.contentHeight),r.pane=new P(r.inner,{duration:this.options.duration,transitionEnd:this._transitionEnd.bind(this),dragStart:this._dragStart.bind(this),dragEnd:this._dragEnd.bind(this),change:this.refresh.bind(this)}),r.bind("resize",(function(){r.pane.refresh()})),r.page=i.page;var a=0===this.inner.children().length?new L(r.inner,r.pane,i):new B(r.inner,r.pane,i);a.page=r.page,a.bind("reset",(function(){this._pendingPageRefresh=!1,r.trigger(b,{pageCount:a.pageCount,page:a.page}),r._toggleNavigation({currentPage:a.page,nextPage:a.page})})),a.bind("resize",(function(e){a.page!=e.nextPage&&(e._defaultPrevented=r.trigger(v,{currentPage:a.page,nextPage:e.nextPage,data:e.data})),r._toggleNavigation({currentPage:a.page,nextPage:e.nextPage})})),a.bind(x,(function(e){r.trigger(x,e),r.angular("compile",(function(){return{elements:e.item,data:[{dataItem:e.data}]}}))})),a.bind("cleanup",(function(e){r.angular("cleanup",(function(){return{elements:e.item}}))})),r._content=a,r.setDataSource(i.dataSource),r.viewInit(),r.viewShow(),r._navigatable()},options:{name:"ScrollView",ARIATemplate:function(e){return"Item "+e.index+" of "+e.total},page:0,duration:400,velocityThreshold:.8,contentHeight:"auto",pageSize:1,bounceVelocityThreshold:1.6,enablePager:!0,enableNavigationButtons:!0,pagerOverlay:!0,navigatable:!1,autoBind:!0,pageable:!1,template:function(){return""},emptyTemplate:function(){return""},messages:{previousButtonLabel:"Previous",nextButtonLabel:"Next",pagerLabel:"ScrollView pager"}},events:["changing",v,b],destroy:function(){l.fn.destroy.call(this),this._content.destroy(),this.pane.destroy(),this.pager&&this.pager.destroy(),this._navigationContainer.off(C),this._navigationContainer=null,this.itemsWrapper.off(C),this.itemsWrapper=null,this.ariaLiveEl=this._current=null,this.inner=null,n.destroy(this.element)},viewInit:function(){this.options.autoBind&&this._content.scrollTo(this._content.page,!0,!0)},viewShow:function(){this.pane.refresh()},refresh:function(){var e=this._content,t=this.options;e.resizeTo(this.pane.size()),this.page=e.page,(e instanceof B||e.dataReader.initialFetch)&&(t.enablePager?this.trigger(b,{pageCount:e.pageCount,page:e.page}):this.trigger(v,{pageCount:e.pageCount,currentPage:e.page}))},content:function(e){this.element.children().first().html(e),this._content._getPages(),this.pane.refresh()},scrollTo:function(e,t,n){this._content.scrollTo(e,t,n)},prev:function(){var e=this,n=e._content.page-1;e._content instanceof L?e._content.paneMoved(1,t,(function(t){return e.trigger(v,t)})):n>-1&&e.scrollTo(n)},next:function(){var e=this,n=e._content.page+1;e._content instanceof L?e._content.paneMoved(-1,t,(function(t){return e.trigger(v,t)})):nthis.options.bounceVelocityThreshold;n>i?r=1:n<-i&&(r=-1),this._content.paneMoved(r,o,(function(e){return t.trigger(v,e)}))},_transitionEnd:function(){this._content.updatePage(),this._setCurrent()},_initNavigation:function(){var t,i,r=this,o=r.options.messages,a=r._navigationContainer=e("
              "),s=r.itemsWrapper,l=s.attr("id")||n.guid();s.attr("id",l),t=e(''+n.ui.icon({icon:"chevron-left",size:"xxxlarge"})+""),i=e(''+n.ui.icon({icon:"chevron-right",size:"xxxlarge"})+""),t.hide(),i.hide(),a.append(t),a.append(i),r.element.append(a),r.ariaLiveEl=e("
              "),r.element.append(r.ariaLiveEl),a.on(_+C,"span.k-scrollview-prev",r.prev.bind(r)),a.on(_+C,"span.k-scrollview-next",r.next.bind(r))},_navigatable:function(){var t=this,i=t._navigationContainer;t._ariaTemplate=n.template(t.options.ARIATemplate),i.on(S+C,t,(function(t){var n=e(t.target);t.keyCode!=a.SPACEBAR&&t.keyCode!=a.ENTER||(t.preventDefault(),n.click())})),t.element.attr({tabindex:0,role:"application","aria-roledescription":"carousel"}),t.itemsWrapper.attr("role","list").children().addClass("k-scrollview-view").attr({role:"listitem","aria-roledescription":"slide"}),t.options.navigatable&&(i.find(">span.k-scrollview-prev").attr(z,0),i.find(">span.k-scrollview-next").attr(z,0),t.element.on(S+C,t,t._keyDown.bind(t)),t.element.on(T+C,t._focus.bind(t)),t.element.on(D+C,t._blur.bind(t)))},_focus:function(){this._focused=!0,this._setCurrent()},_blur:function(){this._current&&this._current.removeClass(I)},_keyDown:function(e){var t,n=e.keyCode;n==a.LEFT&&(t=!0,this.prev()),n==a.RIGHT&&(t=!0,this.next()),t&&(e.preventDefault(),e.stopPropagation())},_toggleNavigation:function(e){var t=e.nextPage||0===e.nextPage?e.nextPage:e.currentPage,n=this._navigationContainer,i=n.find(">span.k-scrollview-prev"),r=n.find(">span.k-scrollview-next");i.hide(),r.hide(),(t||0===t)&&(0!==t&&i.show(),t!=this._content.pageCount-1&&r.show())}});i.plugin(O)}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=n.keys,o=e.extend,a=i.Widget,s=/^\d+(\.\d+)?px$/i,l=/^\d+(\.\d+)?%$/i,c=".kendoSplitter",d="expand",u="collapse",h="contentLoad",p="error",f="layoutChange",m="horizontal",g="vertical",v="click",_="pane",b="k-focus",w="k-pane",y=".k-pane";function k(e){return l.test(e)}function x(e){return s.test(e)||/^\d+$/.test(e)}function C(e){return!k(e)&&!x(e)}function S(e,t){var n=parseInt(e,10);return k(e)&&(n=Math.floor(n*t/100)),n}function T(e,t){return function(n,i){var r=this.element.find(n).data(_);if(1==arguments.length)return r[e];if(r[e]=i,t){var o=this.element.data("kendo"+this.options.name);o.resize(!0)}}}var D=a.extend({init:function(e,t){var i,o=this;a.fn.init.call(o,e,t),o.wrapper=o.element,o.options.orientation&&(i=o.options.orientation.toLowerCase()!=g),o.orientation=i?m:g,o._dimension=i?"width":"height",o._keys={decrease:i?r.LEFT:r.UP,increase:i?r.RIGHT:r.DOWN},o._resizeStep=10,o._marker=n.guid().substring(0,8),o._initPanes(),o.resizing=new M(o),o.element.triggerHandler("init"+c)},events:[d,u,h,p,"resize",f],_addOverlays:function(){this._panes().append("
              ")},_removeOverlays:function(){this._panes().children(".k-splitter-overlay").remove()},_attachEvents:function(){var t=this,n=t.options.orientation;t.element.children(".k-splitbar-draggable-"+n).on("keydown"+c,t._keydown.bind(t)).on("mousedown"+c,(function(e){e.currentTarget.focus()})).on("focus"+c,(function(t){e(t.currentTarget).addClass(b)})).on("blur"+c,(function(n){e(n.currentTarget).removeClass(b),t.resizing&&t.resizing.end()})).on("mouseenter"+c,(function(){e(this).addClass("k-splitbar-"+t.orientation+"-hover")})).on("mouseleave"+c,(function(){e(this).removeClass("k-splitbar-"+t.orientation+"-hover")})).on("mousedown"+c,t._addOverlays.bind(t)).end().children(".k-splitbar").on("dblclick"+c,t._togglePane.bind(t)).children(".k-collapse-next, .k-collapse-prev").on(v+c,t._arrowClick(u)).end().children(".k-expand-next, .k-expand-prev").on(v+c,t._arrowClick(d)).end().end(),e(window).on("resize"+c+t._marker,t.resize.bind(t,!1)),e(document).on("mouseup"+c+t._marker,t._removeOverlays.bind(t))},_detachEvents:function(){var t=this;t.element.children(".k-splitbar-draggable-"+t.orientation).off(c).end().children(".k-splitbar").off("dblclick"+c).children(".k-collapse-next, .k-collapse-prev, .k-expand-next, .k-expand-prev").off(c),e(window).off(c+t._marker),e(document).off(c+t._marker)},options:{name:"Splitter",clickMoveClick:!0,orientation:m,panes:[]},destroy:function(){a.fn.destroy.call(this),this._detachEvents(),this.resizing&&this.resizing.destroy(),n.destroy(this.element),this.wrapper=this.element=null},_keydown:function(t){var n,i=this,o=t.keyCode,a=i.resizing,s=e(t.currentTarget),l=i._keys,c=o===l.increase,h=o===l.decrease;c||h?(t.ctrlKey?(n=s[h?"next":"prev"](),a&&a.isResizing()&&a.end(),n[i._dimension]()?i._triggerAction(u,s[h?"prev":"next"]()):i._triggerAction(d,n)):a&&a.move((h?-1:1)*i._resizeStep,s),t.preventDefault()):o===r.HOME?(n=s.prev(),i.collapse(n),t.preventDefault()):o===r.END?(n=s.prev(),i.expand(n),t.preventDefault()):o===r.ENTER&&a&&(a.end(),t.preventDefault())},_initPanes:function(){var e=this.options.panes||[],t=this;this.element.addClass("k-widget").addClass("k-splitter").children().each((function(n,i){"script"!=i.nodeName.toLowerCase()&&t._initPane(i,e[n])})),this.resize()},_initPane:function(t,n){(t=e(t).attr("role","group").addClass(w)).data(_,n||{}).toggleClass("k-scrollable",!n||!1!==n.scrollable),this.ajaxRequest(t)},ajaxRequest:function(e,t,i){var r,o=this;r=(e=o.element.find(e)).data(_),(t=t||r.contentUrl)&&(e.append(""),n.isLocalUrl(t)?jQuery.ajax({url:t,data:i||{},type:"GET",dataType:"html",success:function(t){o.angular("cleanup",(function(){return{elements:e.get()}})),e.html(t),o.angular("compile",(function(){return{elements:e.get()}})),o.trigger(h,{pane:e[0]})},error:function(t,n){o.trigger(p,{pane:e[0],status:n,xhr:t})}}):e.removeClass("k-scrollable").html(""))},_triggerAction:function(e,t){var n=t.data(_),i=n.collapsed&&e==d||!n.collapsed&&e==u;n.collapsible&&i&&!this.trigger(e,{pane:t[0]})&&this[e](t[0])},_togglePane:function(t){var n,i=this,r=e(t.target);r.closest(".k-splitter")[0]==i.element[0]&&1===(n=r.children("span:not(.k-resize-handle)")).length&&(n.is(".k-collapse-prev")?i._triggerAction(u,r.prev()):n.is(".k-collapse-next")?i._triggerAction(u,r.next()):n.is(".k-expand-prev")?i._triggerAction(d,r.prev()):n.is(".k-expand-next")&&i._triggerAction(d,r.next()))},_arrowClick:function(t){var n=this;return function(i){var r,o=e(i.currentTarget);o.closest(".k-splitter")[0]==n.element[0]&&(r=o.is(".k-"+t+"-prev")?o.parent().prev():o.parent().next(),n._triggerAction(t,r))}},_updateSplitBar:function(e,t,r,o){var a=function(e,t,n){var r=t?i.icon({icon:t,size:"xsmall"}):"";return n?""+r+"":""},s=this.orientation,l=!1!==t.resizable&&!1!==r.resizable,c=t.collapsible,d=t.collapsed,u=r.collapsible,h=r.collapsed,p=o.attr("id");p||(p=n.guid(),o.attr("id",p)),e.addClass("k-splitbar k-splitbar-"+s).attr("role","separator").attr("aria-valuemin","0").attr("aria-valuemax","100").attr("aria-controls",p).removeClass("k-splitbar-"+s+"-hover").toggleClass("k-splitbar-draggable-"+s,l&&!d&&!h).toggleClass("k-splitbar-static-"+s,!l&&!c&&!u).html(a("collapse-prev","caret-alt-up",c&&!d&&!h&&s==g)+a("collapse-prev","caret-alt-left",c&&!d&&!h&&s==m)+a("expand-prev","caret-alt-down",c&&d&&!h&&s==g)+a("expand-prev","caret-alt-right",c&&d&&!h&&s==m)+a("resize-handle",null,l&&s==g)+a("resize-handle",null,l&&s==m)+a("collapse-next","caret-alt-down",u&&!h&&!d&&s==g)+a("collapse-next","caret-alt-right",u&&!h&&!d&&s==m)+a("expand-next","caret-alt-up",u&&h&&!d&&s==g)+a("expand-next","caret-alt-left",u&&h&&!d&&s==m)),t.labelId?e.attr("aria-labelledby",t.labelId):t.label&&e.attr("aria-label",t.label),s==m&&e.attr("aria-orientation",g),l||c||u||e.removeAttr("tabindex")},_updateSplitBars:function(){var t=this;this.element.children(".k-splitbar").each((function(){var n=e(this),i=n.prevAll(y).first(),r=i.data(_),o=n.nextAll(y).first().data(_);o&&t._updateSplitBar(n,r,o,i)}))},_removeSplitBars:function(){this.element.children(".k-splitbar").remove()},_panes:function(){return this.element?this.element.children(y):e()},_resetAriaValueNow:function(e,t){var n,i,r;for(n=0;n"),t._updateSplitBars(),a=i.children(".k-splitbar")):t._updateSplitBars(),a.each((function(){c-=this[o?"offsetWidth":"offsetHeight"]}));var u=0,h=e();r.css({position:"absolute",top:0})[l]((function(){var t,n=e(this),i=n.data(_)||{};if(n.removeClass("k-collapsed"),i.collapsed)t=i.collapsedSize?S(i.collapsedSize,c):0,n.css("overflow","hidden").addClass("k-collapsed");else{if(C(i.size))return h=h.add(this),void d.push(!1);t=S(i.size,c)}return u+=t,d.push(t),t})),c-=u;var p=h.length,g=Math.floor(c/p);h.slice(0,p-1).css(l,g).end().eq(p-1).css(l,c-(p-1)*g),d.forEach((function(e,t){!1===e&&(d[t]=g)})),t._resetAriaValueNow(a,d);var v=0,b=o?"height":"width",w=o?"left":"top",k=o?"offsetWidth":"offsetHeight";if(0===p){var x=r.filter((function(){return!(e(this).data(_)||{}).collapsed})).last();x[l](c+x[0][k])}i.children().css(b,i[b]()).each((function(e,t){"script"!=t.tagName.toLowerCase()&&(t.style[w]=Math.floor(v)+"px",v+=t[k])})),t._detachEvents(),t._attachEvents(),t.wrapper.removeClass("k-splitter-resizing"),n.resize(r),t.trigger(f)}},toggle:function(e,n){var i,r=this;i=(e=r.element.find(e)).data(_),(n||i.collapsible)&&(1==arguments.length&&(n=i.collapsed!==t&&i.collapsed),i.collapsed=!n,i.collapsed?e.css("overflow","hidden"):e.css("overflow",""),r.resize(!0))},collapse:function(e){this.toggle(e,!1)},expand:function(e){this.toggle(e,!0)},_addPane:function(e,t,n){var i=this;return n.length&&(i.options.panes.splice(t,0,e),i._initPane(n,e),i._removeSplitBars(),i.resize(!0)),n},append:function(t){t=t||{};var n=this,i=e("
              ").appendTo(n.element);return n._addPane(t,n.options.panes.length,i)},insertBefore:function(t,n){n=e(n),t=t||{};var i=this.wrapper.children(".k-pane").index(n),r=e("
              ").insertBefore(e(n));return this._addPane(t,i,r)},insertAfter:function(t,n){n=e(n),t=t||{};var i=this.wrapper.children(".k-pane").index(n),r=e("
              ").insertAfter(e(n));return this._addPane(t,i+1,r)},remove:function(t){var i=this;return(t=i.wrapper.find(t)).length&&(n.destroy(t),t.each((function(t,n){i.options.panes.splice(i.wrapper.children(".k-pane").index(n),1),e(n).remove()})),i._removeSplitBars(),i.options.panes.length&&i.resize(!0)),i},size:T("size",!0),min:T("min"),max:T("max")});i.plugin(D);var I={sizingProperty:"height",sizingDomProperty:"offsetHeight",alternateSizingProperty:"width",positioningProperty:"top",mousePositioningProperty:"pageY"},z={sizingProperty:"width",sizingDomProperty:"offsetWidth",alternateSizingProperty:"height",positioningProperty:"left",mousePositioningProperty:"pageX"};function M(e){var t=this,i=e.orientation,r=".k-splitbar-draggable-"+i+"[data-marker="+e._marker+"]";e.options.clickMoveClick&&(r+=",.k-ghost-splitbar"),t.owner=e,t._element=e.element,t.orientation=i,o(t,i===m?z:I),t._resizable=new n.ui.Resizable(e.element,{orientation:i,handle:r,clickMoveClick:e.options.clickMoveClick,hint:t._createHint.bind(t),start:t._start.bind(t),max:t._max.bind(t),min:t._min.bind(t),invalidClass:"k-restricted-size-"+i,resizeend:t._stop.bind(t)})}M.prototype={press:function(e){this._resizable.press(e)},move:function(e,t){this.pressed||(this.press(t),this.pressed=!0),this._resizable.target||this._resizable.press(t),this._resizable.move(e)},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 n=this;return e("
              ").css(n.alternateSizingProperty,t[n.alternateSizingProperty]())},_start:function(t){var n=this,i=e(t.currentTarget),r=i.prev(),o=i.next();if(e(t.initialTarget).closest(".k-expand-next, .k-expand-prev, .k-collapse-next, .k-collapse-prev").length>0||!o.length||!r.length)t.preventDefault();else{var a=r.data(_),s=o.data(_),l=parseInt(r[0].style[n.positioningProperty],10),c=parseInt(o[0].style[n.positioningProperty],10)+o[0][n.sizingDomProperty]-i[0][n.sizingDomProperty],d=parseInt(n._element.css(n.sizingProperty),10),u=function(e){var t=parseInt(e,10);return(x(e)?t:d*t/100)||0};if(!a||!s)return t.preventDefault(),t.sender.draggable.clickMoveClick.cancel(),void n.owner.element.find(".k-ghost-splitbar").remove();var h=u(a.min),p=u(a.max)||c-l,f=u(s.min),m=u(s.max)||c-l;n.previousPane=r,n.nextPane=o,n._maxPosition=Math.min(c-f,l+p),n._minPosition=Math.max(l+h,c-m)}},_max:function(){return this._maxPosition},_min:function(){return this._minPosition},_stop:function(t){var i=this,r=e(t.currentTarget),o=i.owner;if(o._panes().children(".k-splitter-overlay").remove(),t.keyCode!==n.keys.ESC){var a=t.position,s=r.prev(),l=r.next();if(!l.length||!s.length)return!1;var c=s.data(_),d=l.data(_),u=a-parseInt(s[0].style[i.positioningProperty],10),h=parseInt(l[0].style[i.positioningProperty],10)+l[0][i.sizingDomProperty]-a-r[0][i.sizingDomProperty],p=i._element.children(y).filter((function(){return C(e(this).data(_).size)})).length;(!C(c.size)||p>1)&&(C(c.size)&&p--,c.size=u+"px"),(!C(d.size)||p>1)&&(d.size=h+"px"),o.resize(!0)}return!1}}}(window.kendo.jQuery);kendo;kendo.ui.scheduler={},function(e){var t=window.kendo,n=t.ui,i=t.date.getDate,r=n.Widget,o=t._outerHeight,a=t.keys,s="k-event-ongoing",l=Math,c=" ";function d(e,t){var n=[];return function e(i,r){if(r=r[t])for(var o=n[i]=n[i]||[],a=0;a'+e.join("")+"":""}var h,p=t.Class.extend({init:function(e,t,n){this._index=e,this._timeSlotCollections=[],this._daySlotCollections=[],this._isRtl=t,this._enforceAllDaySlot=n},addTimeSlotCollection:function(e,t){return this._addCollection(e,t,this._timeSlotCollections)},addDaySlotCollection:function(e,t){return this._addCollection(e,t,this._daySlotCollections)},_addCollection:function(e,t,n){var i=new v(e,t,this._index,n.length);return n.push(i),i},timeSlotCollectionCount:function(){return this._timeSlotCollections.length},daySlotCollectionCount:function(){return this._daySlotCollections.length},_refreshSlotCollections:function(){for(var e=[this._timeSlotCollections||[],this._daySlotCollections||[]],t=0;t=l.offsetLeft&&e=l.offsetTop&&t=a.slot.end&&(i=a.slot.collectionIndex+1,a=null);var s=a;if(ea.slot.collectionIndex||r>i)&&(r-=1),s=null),null===a&&null===s){if(n-e=n)return[];s={inRange:!0,slot:(o[r]||o[a.slot.collectionIndex]).last()}}return this._continuousRange(m,o,a,s)},daySlotRanges:function(e,n,i){var r=this._daySlotCollections,o=this._startSlot(e,r,i);!o.inRange&&e>=o.slot.end&&(o=null);var a=o;if(e=o.slot.end)}if(null===a){if(o.slot.start>=n)return[];do{n-=t.date.MS_PER_DAY,a=this._endSlot(n,r,i)}while(!a.inRange&&n<=a.slot.start)}return this._continuousRange(g,r,o,a)},_continuousRange:function(e,t,n,i){for(var r=n.slot,o=i.slot,a=r.collectionIndex,s=o.collectionIndex,l=[],c=a;c<=s;c++){var d=t[c],u=d.first(),h=d.last(),p=!1,f=!1;c==a&&(f=!n.inRange),c==s&&(p=!i.inRange),u.starto.start&&(h=o),a0&&i._start>e;)i=t[--o];r=!1}var a=i.slotByEndDate(e,n);return a||(a=e<=i.first().start?i.first():i.last(),r=!1),{slot:a,inRange:r}},getSlotCollection:function(e,t){return this[t?"getDaySlotCollection":"getTimeSlotCollection"](e)},getTimeSlotCollection:function(e){return this._timeSlotCollections[e]},getDaySlotCollection:function(e){return this._daySlotCollections[e]}}),f=t.Class.extend({init:function(t){e.extend(this,t)},innerHeight:function(){for(var e=this.collection,t=this.start.index,n=this.end.index,i=0,r=t;r<=n;r++)i+=e.at(r).offsetHeight;return i},events:function(){return this.collection.events()},addEvent:function(e){this.events().push(e)},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}}),m=f.extend({innerHeight:function(){for(var e=this.collection,t=this.start.index,n=this.end.index,i=0,r=t;r<=n;r++)i+=e.at(r).offsetHeight;return i},outerRect:function(e,t,n){return this._rect("offset",e,t,n)},_rect:function(e,n,i,r){var o,a,s,l,c=this.start,d=this.end,u=t.support.isRtl(c.element);if("number"!=typeof n&&(n=t.date.toUtcTime(n)),"number"!=typeof i&&(i=t.date.toUtcTime(i)),r)o=c.offsetTop,a=d.offsetTop+d[e+"Height"],u?(s=d.offsetLeft,l=c.offsetLeft+c[e+"Width"]):(s=c.offsetLeft,l=d.offsetLeft+d[e+"Width"]);else{var h=n-c.start;h<0&&(h=0);var p=c.end-c.start;o=c.offsetTop+c[e+"Height"]*h/p;var f=d.end-i;f<0&&(f=0);var m=d.end-d.start;a=d.offsetTop+d[e+"Height"]-d[e+"Height"]*f/m,u?(s=Math.round(d.offsetLeft+d[e+"Width"]*f/m),l=Math.round(c.offsetLeft+c[e+"Width"]-c[e+"Width"]*h/p)):(s=Math.round(c.offsetLeft+c[e+"Width"]*h/p),l=Math.round(d.offsetLeft+d[e+"Width"]-d[e+"Width"]*f/m))}return{top:o,bottom:a,left:0===s?s:s+1,right:l}},innerRect:function(e,t,n){return this._rect("client",e,t,n)}}),g=f.extend({innerWidth:function(){for(var e=this.collection,t=this.start.index,n=this.end.index,i=0,r=t!==n?"offsetWidth":"clientWidth",o=t;o<=n;o++)i+=e.at(o)[r];return i}}),v=t.Class.extend({init:function(e,n,i,r){this._slots=[],this._events=[],this._start=t.date.toUtcTime(e),this._end=t.date.toUtcTime(n),this._groupIndex=i,this._collectionIndex=r},refresh:function(){for(var e=0;e=0)return i[r]._slots[i[r]._slots.length-1]}else{i=o._getCollections(o.daySlotCollectionCount()),r=o.daySlotCollectionCount()?0:t.collectionIndex+1;var a=o.daySlotCollectionCount()?t.collectionIndex+1:0;if(i[r]&&i[r]._slots[a])return i[r]._slots[a]}},_changeGroupContinuously:function(){return null},_changeViewPeriod:function(){return!1},_isInRange:function(e,t){return!!(e&&t&&this.options.min&&this.options.max)&&(i(e)<=i(this.options.min)||i(t)>=i(this.options.max))},_horizontalSlots:function(e,t,n,i){var r,o=i?"leftSlot":"rightSlot",a={startSlot:t[0].start,endSlot:t[t.length-1].end},s=this.groups[e.groupIndex],l=this._isVerticallyGrouped();if(!n){var c=this._normalizeHorizontalSelection(e,t,i);c&&(a.startSlot=a.endSlot=c)}if(this._isGroupedByDate()&&!n){var d=this._changeGroup(e,i);d?a.startSlot=a.endSlot=d:a=this._getNextHorizontalRange(s,o,a)}else a.startSlot=s[o](a.startSlot),a.endSlot=s[o](a.endSlot),n||l||a.startSlot&&a.endSlot||(a.startSlot=a.endSlot=this._changeGroup(e,i));return a.startSlot&&a.endSlot||this._isGroupedByDate()||(r=this._continuousSlot(e,t,i),(r=this._changeGroupContinuously(e,r,n,i))&&(a.startSlot=a.endSlot=r)),a},_getNextHorizontalRange:function(e,t,n){return this._isVerticallyGrouped()||(n.startSlot=e[t](n.startSlot),n.endSlot=e[t](n.endSlot)),n},_verticalSlots:function(e,t,n,i){var r,o=this.groups[e.groupIndex],a={startSlot:t[0].start,endSlot:t[t.length-1].end};n||(r=this._normalizeVerticalSelection(e,t,i))&&(a.startSlot=a.endSlot=r);var s=i?"upSlot":"downSlot";return a=this._getNextVerticalRange(o,s,a,n),n||!this._isVerticallyGrouped()||a.startSlot&&a.endSlot||(this._isGroupedByDate()?a.startSlot=a.endSlot=this._changeDate(e,r,i):a.startSlot=a.endSlot=this._changeGroup(e,i)),a},_getNextVerticalRange:function(e,t,n,i){return n.startSlot=e[t](n.startSlot,i),n.endSlot=e[t](n.endSlot,i),n},_normalizeHorizontalSelection:function(){return null},_normalizeVerticalSelection:function(e,t,n){return n?t[0].start:t[t.length-1].end},_continuousSlot:function(){return null},_footerTodayClickHandler:function(e){e.preventDefault();var n,i=this,r=i.options,o=i.options.timezone,a=new Date;if(o){var s=t.timezone.offset(a,o);n=t.timezone.convert(a,a.getTimezoneOffset(),s)}else n=a;i.trigger("navigate",{view:i.name||r.name,action:"today",date:n})},_footerItems:function(){var e=this,t=[],n=this.options;return e._isMobile()&&t.push({type:"button",fillMode:"flat",text:n.messages.today,click:e._footerTodayClickHandler.bind(e),attributes:{class:"k-scheduler-today"}}),t},_footer:function(){if(!1!==this.options.footer){var t=this,n=t._footerItems();if(n.length>0){var i=e('")},_datesHeader:function(n,i){for(var r,o,a=[],s=0;s'+d.text+"")}a.push(c.join(""))}var p,f,m=[];if(i){var g=n[n.length-1],v=[],_=i.cellContent;for(r=0;r'+(_?_(r):" ")+"");m.push(v.join(""))}return o=e('
              '+u(a)+(f="k-scheduler-header-all-day",((p=m).length?"
              '+u(p,f)+"
              ":"")+"
              ")),t.applyStylesFromKendoAttributes(o,["position"]),o},_formatEventAriaLabel:function(e,n,i,r){var o,a=this.options.messages.ariaEventLabel,s=t.date.getDate(n).getTime()===t.date.getDate(i).getTime();return"string"==typeof a?t.format(a,e,n,n):(o=(a.prefix+c+e+c+a.on+c+t.toString(n,"D")).trim(),r&&s?o+c+a.allDay:r?o+c+a.to+c+t.toString(i,"D")+c+a.allDay:(o=o+c+a.at+c+t.toString(n,"t")+c+a.to+c,s?o+t.toString(i,"t"):o+t.toString(i,"D")+c+a.at+c+t.toString(i,"t")))},_ongoingEvents:function(e){var t,n=this,i=n.options.ongoingEvents;!!i&&(!0===i||i.enabled)&&(n._ongoingUpdater(e),t=i.updateInterval||6e4,n._ongoingTimer&&(clearInterval(n._ongoingTimer),n._ongoingTimer=null),isNaN(t)||(n._ongoingTimer=setInterval(this._ongoingUpdater.bind(n,e),t)))},_ongoingUpdater:function(e){var t=new Date,n=this.options.ongoingEvents.cssClass||s;this.content.find("."+n).removeClass(n),this.groups&&this.groups.length>0&&this._updateOngoing(t,e)},_updateOngoing:function(e,n){var i,r=this,o=r.element,a=r.options.ongoingEvents,l=a.cssClass||s,c=a.useLocalTimezone,d=r.options.timezone;n&&(!1===c&&d&&(i=t.timezone.offset(e,d),e=t.timezone.convert(e,e.getTimezoneOffset(),i)),n.forEach((function(t){var n,i=t.start,r=t.end;t.isAllDay&&(r=new Date(r.getTime()+864e5-1)),i<=e&&r>=e&&(n=t.uid,o.find("[data-uid="+n+"]").addClass(l))})))}});var k=function(e){var t,n,i,r,o,a=this,s=k.formats;if(1===arguments.length)for(e=a.resolveColor(e),r=0;rt[a].end||r.slotIndex>t[a].slotIndexEnd;if(r.start255?255:e},percBrightness:function(){var e=this;return l.sqrt(.241*e.r*e.r+.691*e.g*e.g+.068*e.b*e.b)},isDark:function(){return this.percBrightness()<180}},k.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],k.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"};var T=/\s*k-selected/;e.extend(n.SchedulerView,{createColumns:function(e){return x(e)},createRows:function(e){return x(e)},rangeIndex:y,collidingEvents:function(e,t,n){var i,r,o,a;for(i=e.length-1;i>=0;i--)o=(r=y(e[i])).start,a=r.end,(o<=t&&a>=t||o>=t&&a<=n||t<=o&&n>=o)&&(on&&(n=a));return function(e,t,n){for(var i=[],r=0;rt||o.start>=t&&o.end<=n)&&i.push(e[r])}return i}(e,t,n)},groupEqFilter:function(e){return function(n){if(Array.isArray(n)||n instanceof t.data.ObservableArray){for(var i=0;i
              '+r(n.format("{0:t} - {1:t}",t,i))+'
              '+o+"
              "})),v=n.template((function(e){var t=e.start,i=e.title;return'
              '+i+"
              "})),_=n.template((function(e){var t=e.isMobile,i=e.date;return""+(t?n.toString(i,"ddd")[0]:n.toString(i,"ddd M/dd"))+""})),b=function(e){return'
              '+(e.tail||e.middle?n.ui.icon("caret-alt-left"):"")+(e.isException()?n.ui.icon("arrows-no-repeat"):e.isRecurring()?n.ui.icon("arrow-rotate-cw"):"")+""+n.template(e.template)(e)+''+(e.showDelete?''+n.ui.icon("x")+"":"")+(e.head||e.middle?n.ui.icon("caret-alt-right"):"")+""+(!e.resizable||e.singleDay||e.tail||e.middle?"":'')+(!e.resizable||e.singleDay||e.head||e.middle?"":'')+"
              "},w=function(e){return'
              '+(e.isException()?n.ui.icon("arrows-no-repeat"):e.isRecurring()?n.ui.icon("arrow-rotate-cw"):"")+""+n.template(e.template)(e)+''+(e.showDelete?''+n.ui.icon("x")+"":"")+''+(e.tail||e.middle?n.ui.icon("caret-alt-up"):"")+''+(e.head||e.middle?n.ui.icon("caret-alt-down"):"")+""+(!e.resizable||e.tail||e.middle?"":'')+(!e.resizable||e.head||e.middle?"":'')+"
              "};function y(e){var t=new Date(1980,1,1,0,0,0);return o(t,f(e)),t}function k(e,t,n){return e>=t&&e<=n}function x(e,t,n,i){return i=i?e<=n:et&&i}function C(e,t,i,r){var o=e._continuousEvents,a=o[o.length-1],s=d(t.start.startDate()).getTime();if(r&&a&&d(a.start.startDate()).getTime()==s){for(var l=o.length-1;l>-1&&!(o[l].isAllDay||d(o[l].start.startDate()).getTime()6?n-=7:n++,t.push(n);return t}(n.options),n._templates(),n._editable(),n.calculateDateRange(),n._groups(),n._currentTime(!0)},_currentTimeMarkerUpdater:function(){this._updateCurrentTimeMarker(new Date)},_updateCurrentTimeMarker:function(t){var i,r,o,a,c=this.options,d="
              ";if(!1===c.currentTimeMarker.useLocalTimezone){var u=c.dataSource.options.schema.timezone;if(c.dataSource&&u){var h=n.timezone.offset(t,u);t=n.timezone.convert(t,t.getTimezoneOffset(),h)}}i=this.times.find(".k-current-time"),r=this.content.find(".k-current-time");var p=c.group&&"horizontal"!=c.group.orientation?this.groups.length:1,f=this.times.find("tr").first().find("th").first(),m=this.times.find("tr").first().find("th").last();f.length>0&&m.length>0&&(a=this._isRtl?f.position().left+l(f)-l(m):m.position().left);for(var g=0;g div")).length||(b=this.content)),this._resizeHint.appendTo(b),this._resizeHint.find(".k-label-top,.k-label-bottom").text(""),this._resizeHint.first().addClass("k-first").find(".k-label-top").text(n.toString(n.timezone.toLocalDate(i),_)),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(n.toString(n.timezone.toLocalDate(r),_))},_updateMoveHint:function(t,i,r){var o;o=this.options.enforceAllDaySlot?t.isMultiDay():t.isAllDay;var a=this.groups[i],s=n.date.toUtcTime(t.start)+r,l=s+t.duration(),c=a.ranges(s,l,o,t.isAllDay);s=n.timezone.toLocalDate(s),l=n.timezone.toLocalDate(l),this._removeMoveHint(t.uid),!o&&f(l)1&&c.pop();for(var d=e(),u=0;u div")).length||(y=this.content)),d.appendTo(y)},_appendMoveHint:function(e,t){e.addClass("k-event-drag-hint"),e.css(t),this._moveHint=this._moveHint.add(e)},_slotByPosition:function(e,t){var n,i,r;for(this._isVerticallyGrouped()?(i=this.content.offset(),t+=this.content[0].scrollTop,e+=this.content[0].scrollLeft):i=this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day)").find(">div").offset(),i&&(e-=i.left,t-=i.top),e=Math.ceil(e),t=Math.ceil(t),r=0;r"+n.toString(t,"t")+""},minorTimeHeaderTemplate:function(){return"​"},groupHeaderTemplate:function(e){return e.text},slotTemplate:function(){return" "},allDaySlotTemplate:function(){return" "},eventTemplate:g,allDayEventTemplate:v,dateHeaderTemplate:_,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},ongoingEvents:{cssClass:null,enabled:!0,updateInterval:6e4},enforceAllDaySlot:!1},events:["remove","add","edit"],_templates:function(){var e=this.options,t=c({},n.Template,e.templateSettings);this.allDayEventTemplate=n.template(b),this.eventTemplate=n.template(w),this.majorTimeHeaderTemplate=n.template(e.majorTimeHeaderTemplate,t),this.minorTimeHeaderTemplate=n.template(e.minorTimeHeaderTemplate,t),this.dateHeaderTemplate=n.template(e.dateHeaderTemplate,t),this.slotTemplate=n.template(e.slotTemplate,t),this.allDaySlotTemplate=n.template(e.allDaySlotTemplate,t),this.groupHeaderTemplate=n.template(e.groupHeaderTemplate,t)},_editable:function(){this.options.editable&&(this._isMobile()?this._touchEditable():this._mouseEditable())},_mouseEditable:function(){var t=this;t.element.on("click"+m,".k-event a:has(.k-i-x),.k-event a:has(.k-svg-i-x)",(function(i){t.trigger("remove",{uid:e(this).closest(".k-event").attr(n.attr("uid"))}),i.preventDefault()})),!1!==t.options.editable.create&&t.element.on("dblclick"+m,".k-scheduler-content > table td",(function(n){if(!e(this).parent().hasClass("k-scheduler-header-all-day")){var i=t._slotByPosition(n.pageX,n.pageY);if(i){var r=t._resourceBySlot(i);t.trigger("add",{eventInfo:c({start:i.startDate(),end:i.endDate()},r)})}n.preventDefault()}})).on("dblclick"+m,".k-scheduler-header-all-day td",(function(e){var i=t._slotByPosition(e.pageX,e.pageY);if(i){var r=t._resourceBySlot(i);t.trigger("add",{eventInfo:c({},{isAllDay:!0,start:n.date.getDate(i.startDate()),end:n.date.getDate(i.startDate())},r)})}e.preventDefault()})),!1!==t.options.editable.update&&t.element.on("dblclick"+m,".k-event",(function(i){t.trigger("edit",{uid:e(this).closest(".k-event").attr(n.attr("uid"))}),i.preventDefault()}))},_touchEditable:function(){var i=this,r=0;n.support.mobileOS.android&&(r=5),!1!==i.options.editable.create&&(i._addUserEvents=new n.UserEvents(i.element,{threshold:r,filter:".k-scheduler-content td",useClickAsTap:!n.support.browser.edge,tap:function(n){if(!i._scrolling&&!e(n.target).parent().hasClass("k-scheduler-header-all-day")){var r=n.x.location!==t?n.x.location:n.x,o=n.y.location!==t?n.y.location:n.y,a=i._slotByPosition(r,o);if(a){var s=i._resourceBySlot(a);i.trigger("add",{eventInfo:c({start:a.startDate(),end:a.endDate()},s)})}n.preventDefault()}}}),i._allDayUserEvents=new n.UserEvents(i.element,{threshold:r,useClickAsTap:!n.support.browser.edge,filter:".k-scheduler-header-all-day td",tap:function(e){if(!i._scrolling){var r=e.x.location!==t?e.x.location:e.x,o=e.y.location!==t?e.y.location:e.y,a=i._slotByPosition(r,o);if(a){var s=i._resourceBySlot(a);i.trigger("add",{eventInfo:c({},{isAllDay:!0,start:n.date.getDate(a.startDate()),end:n.date.getDate(a.startDate())},s)})}e.preventDefault()}}})),!1!==i.options.editable.update&&(i._editUserEvents=new n.UserEvents(i.element,{threshold:r,useClickAsTap:!n.support.browser.edge,filter:".k-event",tap:function(t){if(!i._scrolling){var r=e(t.target).closest(".k-event");e(t.touch.initialTouch).is(".k-i-x,.k-svg-i-x")?i.trigger("remove",{uid:r.attr(n.attr("uid"))}):r.hasClass("k-event-active")||i.trigger("edit",{uid:r.attr(n.attr("uid"))}),t.preventDefault()}}}))},_layout:function(e){for(var t=[],i=[],r=this.options,o=this,a=o._isGroupedByDate(),s=0;sl&&(l+=h),a=(l-s)/p),a=Math.round(a);vl&&(m=new Date(+t))),i&&(_+=i(m)),_},_content:function(e){var t=this,n="";n+="",n+=t._renderRows(e,t.rowLevels,t.columnLevels),n+="",this.content.find("table").append(n)},_virtualContent:function(e,t){var n=this,i="",r=n._dates;i+=n._renderRows(r,e,t),n.content.find("table tbody").append(i)},_renderRows:function(e,t,n){var i=this,r="vertical"===i._groupOrientation(),o=i._isGroupedByDate(),a=0,s=e.length,l=i.options,c=i.startTime(),d=this.endTime(),u=1,h=1,p="";if(this.groupedResources.length){var f=i._recalculateLevels(t,n);h=f.rowCount,u=f.groupsCount}for(var m=function(t,n,l){var c,d,h="",p=0;if(h="",o)for(c=0,d=s;c',a=r._isGroupedByDate(),s=a?0:t,l=r.allDaySlotTemplate,c=function(){return r._resourceBySlot({groupIndex:s})};if(a)for(;s"+l({date:e[i],resources:c})+"";else for(var d=0;d"+l({date:e[d],resources:c})+"";return o+""},_addCellsToContent:function(e,t,i,r,o,a){var s,l,c=this,d="",u=this.slotTemplate,h="vertical"===this._groupOrientation();return n.date.isToday(t[r])&&(d+="k-today"),(n.date.getMilliseconds(i)=n.date.getMilliseconds(this.options.workDayEnd)||!this._isWorkDay(t[r]))&&(d+=" k-nonwork-hour"),e+="",s=n.date.getDate(t[r]),n.date.setTime(s,n.date.getMilliseconds(i)),e+=u({date:s,resources:(l=h&&!c._isGroupedByDate()?a:o,function(){return c._resourceBySlot({groupIndex:l})})}),e+=""},_isWorkDay:function(e){for(var t=e.getDay(),n=this._workDays,i=0;il&&(this._headerColumnCount=h.length);for(var p=n.start.offsetTop,f=0,m=h.length;f0?b:f)+"px",this._isRtl&&p.clientWidth=w&&(w=f(new Date(this.endTime().getTime()+h-1))),i||t.isAllDay||(_=new Date(_.getTime()+h));var S=t.start,T=t.end;t.isAllDay&&(T=d(t.end)),!k(d(S),v,_)&&!k(T,v,_)||i&&t.start.getTime()!==t.end.getTime()&&(y=w)&&(x>w||x<=b)?a=!0:d(S)=w)?o=!0:(T>_&&!i||i&&0!==x&&t.start.getTime()!==t.end.getTime()&&(x>w||x<=b))&&(r=!0);var D=this.eventResources(t);t._startTime&&y!==n.date.getMilliseconds(t.start)&&(S=new Date(y),S=n.timezone.apply(S,"Etc/UTC")),t._endTime&&x!==n.date.getMilliseconds(t.end)&&(T=new Date(x),T=n.timezone.apply(T,"Etc/UTC"));var I=c({},{ns:n.ns,resizable:g,showDelete:m,middle:a,head:r,tail:o,singleDay:1==this._dates.length,resources:D,inverseColor:!1,messages:l.messages,ariaLabel:this._formatEventAriaLabel(t.title,S,T,t.isAllDay),template:C},t,{start:S,end:T}),z=e(s(I));return n.applyStylesFromKendoAttributes(z,["background-color","border-color"]),this.angular("compile",(function(){return{elements:z,data:[{dataItem:I}]}})),z},_isInTimeSlot:function(e){var t=this.startTime(),i=this.endTime(),r=e._startTime||e.start,a=e._endTime||e.end;if(f(i)===f(n.date.getDate(i))&&(i=n.date.getDate(i),o(i,h-1)),e._date("end")>e._date("start")&&(a=+e._date("end")+(h-1)),a=e._endTime?a-e._date("end"):f(new Date(a)),r=e._startTime?r-e._date("start"):f(new Date(r)),i=f(i),(t=f(t))===r&&r===a)return!0;var s=r!==i;return x(r,t,i,s)||x(a,t,i,s)||x(t,r,a)||x(i,r,a)||e.end.getDate()>e.start.getDate()&&a>t},_isInDateSlot:function(e){var t=this.groups[0],i=t.firstSlot().start,r=t.lastSlot().end-1,o=n.date.toUtcTime(e.start),a=n.date.toUtcTime(e.end);return(k(o,i,r)||k(a,i,r)||k(i,o,a)||k(r,o,a))&&(!k(a,i,i)||k(a,o,o)||e.isAllDay)},_updateAllDayHeaderHeight:function(e){if(this._height!==e){this._height=e;var t=this.element.find(".k-scheduler-header-all-day td");if(t.length){t.parent().add(this.element.find(".k-scheduler-times-all-day").parent()).height(e);for(var n=0;n div"),s=this._isGroupedByDate();for(r=0,o=e.length;r=h:i.isAllDay)&&!this._isVerticallyGrouped()?a:this.content,l){if(this.options.allDaySlot){if(!(g=this.groups[t]))continue;if(g._continuousEvents||(g._continuousEvents=[]),(u=g.slotRanges(i)).length){var v=(p=u[0]).start.index,_=p.end.index;if(s&&v!==_){f=p.start.start,m=p.end.end;for(var b=f,w=f,y=p.start.index;y<=p.end.index;y++){d=this._createEventElement(i,!l,y!==_,y!==v);var k=g.daySlotRanges(b,w,!0)[0];b=w+=n.date.MS_PER_DAY,this._positionAllDayEvent(d,k),C(g,k,d,!0),d.appendTo(c),this._inverseEventColor(d)}}else d=this._createEventElement(i,!l),this._positionAllDayEvent(d,u[0]),C(g,u[0],d,!0),d.appendTo(c),this._inverseEventColor(d)}}}else if(this._isInTimeSlot(i)){if(!(g=this.groups[t]))continue;g._continuousEvents||(g._continuousEvents=[]);for(var x=(u=g.slotRanges(i)).length,S=0;S1&&(0===S?m=p.end.endDate():S==x-1?f=p.start.startDate():(f=p.start.startDate(),m=p.end.endDate()));var T=i.clone({start:f,end:m,_startTime:i._startTime,_endTime:i.endTime});if(this._isInTimeSlot(T)){var D=p.head;(d=this._createEventElement(i,!l,D,p.tail)).appendTo(c),this._inverseEventColor(d),this._positionEvent(T,d,p),C(g,p,d,!1)}}}}},render:function(t){var i=this;this._headerColumnCount=0,this._cachedEvents=t,this._groups(),this.element.find(".k-event").remove(),t=new n.data.Query(t).sort([{field:"start",dir:"asc"},{field:"end",dir:"desc"}]).toArray();var r=[];this._eventsByResource(t,this.groupedResources,r);var o=e.map(this._dates,(function(t){return Math.max.apply(null,e.map(r,(function(n){return e.grep(n,(function(e){return i.options.enforceAllDaySlot?e.isMultiDay()&&k(t,d(e.start),d(e.end)):e.isAllDay&&k(t,d(e.start),d(e.end))})).length})))})),a=Math.max.apply(null,o);this._updateAllDayHeaderHeight((a+1)*this._allDayHeaderHeight);for(var s=0;s1?this._eventsByResource(u,i.slice(1),r,d):r.push(u)}}else r.push(e)},_columnOffsetForResource:function(e){return this._columnCountForLevel(e)/this._columnCountForLevel(e-1)},_columnCountForLevel:function(e){var t=this.columnLevels[e];return t?t.length:0},_rowCountForLevel:function(e,t){var n=(t=t||this.rowLevels)[e];return n?n.length:0},clearSelection:function(){this.content.add(this.datesHeader).find(".k-selected").removeAttr("id").removeClass("k-selected")},_updateDirection:function(e,t,n,i,r){var o=e.isAllDay,a=t[0].start,s=t[t.length-1].end;n&&(r?o||a.index!==s.index||a.collectionIndex!==s.collectionIndex||(e.backward=i):(o&&a.index===s.index||!o&&a.collectionIndex===s.collectionIndex)&&(e.backward=i))},_changeViewPeriod:function(e,t,n){if(!n){var i,r,a,s=t?this.previousDate():this.nextDate(),l=e.start,c=e.end,d=this._isGroupedByDate()&&this._isVerticallyGrouped(),u=this.groups[e.groupIndex],p=t?u._timeSlotCollections:u._getCollections(u.daySlotCollectionCount()),m=p[p.length-1]._slots,g=t||u.daySlotCollectionCount()?m.length-1:0;if(r=new Date(s),a=new Date(s),this._isInRange(r,a))return!1;if(e.start=r,e.end=a,d){var v=new Date(m[g].startDate()),_=new Date(m[g].endDate());i=f(_)?f(_):h,o(e.start,f(v)),o(e.end,i),u.daySlotCollectionCount()&&(e.isAllDay=!e.isAllDay)}else i=e.isAllDay||!f(c)?h:f(c),o(e.start,f(l)),o(e.end,i);return this._isVerticallyGrouped()||(e.groupIndex=t?this.groups.length-1:0),e.events=[],!0}}});c(!0,i,{MultiDayView:S,DayView:S.extend({options:{name:"DayView",title:"Day",selectedMobileDateFormat:"{0:MMM d}"},name:"day"}),WeekView:S.extend({options:{name:"WeekView",title:"Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"},name:"week",calculateDateRange:function(){var e,t=this.options.date,i=n.date.dayOfWeek(t,this.calendarInfo().firstDay,-1),r=[];for(e=0,7;e<7;e++)r.push(i),i=n.date.nextDay(i);this._render(r)}}),WorkWeekView:S.extend({options:{name:"WorkWeekView",title:"Work Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"},name:"workWeek",nextDate:function(){var e=n.date.dayOfWeek(n.date.nextDay(this.startDate()),this.calendarInfo().firstDay,1);return n.date.addDays(e,this._workDays[0])},previousDate:function(){var e=n.date.dayOfWeek(this.startDate(),this.calendarInfo().firstDay,-1),t=this._workDays;return n.date.addDays(e,t[t.length-1]-7)},calculateDateRange:function(){var e=this.options,t=e.date,i=n.date.dayOfWeek,r=i(t,this.calendarInfo().firstDay,-1),o=i(r,e.workWeekStart,1),a=i(o,e.workWeekEnd,1),s=[],l=e.workDays&&e.workDays.length?e.workDays.map((function(e){return i(r,e,1).getTime()})):null;for(l&&(a=i(o=r,this.calendarInfo().firstDay+6,1));o<=a;)l&&l.indexOf(o.getTime())>-1?s.push(o):l||s.push(o),o=n.date.nextDay(o);this._render(s)}})})}(window.kendo.jQuery);kendo;!function(e){var t=window.kendo,n=t.ui,i=t.htmlEncode,r=".kendoAgendaView",o="role",a=function(e){return'
              '+(e.resources[0]?'':"")+(e.isException()?t.ui.icon("arrows-no-repeat"):e.isRecurring()?t.ui.icon("arrow-rotate-cw"):"")+''+t.template(e.template)(e)+""+(e.showDelete?''+t.ui.icon("x")+"":"")+"
              "},s=t.Class.extend({init:function(e){this._view=e},_getColumns:function(e,t){return e.concat(t)},_getGroupsInDay:function(){return[]},_getSumOfItemsForDate:function(){return 0},_renderTaskGroupsCells:function(e,t,n,i){var r=this._view;0===n&&0===i&&t.length&&r._renderTaskGroupsCells(e,t)},_renderDateCell:function(e,n,i,r,o,a){var s=this._view,l=s._isMobile();e.push(t.format('{1}',i.length,s._dateTemplate({date:r,isMobile:l}),o!=a.length-1||n.length?"":" k-last",n.length?"":" k-first"))},_renderDates:function(){},_getParents:function(e){return e.splice(0)},_getGroupsByDate:function(){},_renderTaskGroups:function(e,t,n){var i=this._view;e.append(i._renderTaskGroups(t,n))}}),l=t.Class.extend({init:function(e){this._view=e},_getColumns:function(e,t){if(this._view._isMobile())return e.concat(t);var n=t.slice(0,1),i=t.slice(1);return n.concat(e).concat(i)},_compareDateGroups:function(e,t,n){return e[n].text==t[n].text&&(0===n||this._compareDateGroups(e,t,n-1))},_getGroupsInDay:function(e,t){for(var n=[],i=null,r=0;r{1}',a,c._dateTemplate({date:s,isMobile:d})));for(var u=0;u{1}',o[u][l],c._groupTemplate({value:n[i][u].text,isMobile:d}),n[i][u].className))}},_renderDateCell:function(){},_renderDates:function(e){for(var t=this._view,n=t._groupsByDate.sort((function(e,t){return e.array[0].value.getTime()-t.array[0].value.getTime()})),i=0;i tbody").attr(o,"rowgroup"),e.find("table tr").attr(o,"row"),e.find("table td").attr(o,"gridcell"),e.find(".k-scheduler-header-wrap th").attr(o,"columnheader"),e.find(".k-scheduler-content .k-scheduler-datecolumn, .k-scheduler-content .k-scheduler-groupcolumn").attr(o,"rowheader")},clearSelection:function(){this.element.find(".k-selected").attr("aria-selected",!1),t.ui.SchedulerView.fn.clearSelection.call(this)},_isVirtualized:function(){return!1},_getGroupedView:function(){return this._isGroupedByDate()?new t.ui.scheduler.AgendaGroupedByDateView(this):new t.ui.scheduler.AgendaGroupedView(this)},_mouseenter:function(t){e(t.currentTarget).addClass("k-hover")},_mouseleave:function(t){e(t.currentTarget).removeClass("k-hover")},_remove:function(n){n.preventDefault(),this.trigger("remove",{uid:e(n.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(e){this._startDate=e,this._endDate=t.date.addDays(e,7),this.createLayout(this._layout()),this._footer(),this.table.addClass("k-scheduler-agenda")},_layout:function(){var e=[{text:this.options.messages.time,className:"k-scheduler-timecolumn"},{text:this.options.messages.event}];this._isMobile()||e.splice(0,0,{text:this.options.messages.date,className:"k-scheduler-datecolumn"});var t=this.groupedResources;if(t.length){for(var n=[],i=0;i=this.startDate()&&n.push(d),c>1){d.end=t.date.nextDay(o),d.head=!0;for(var u=1;u=this.startDate()||t.date.getDate(d.start).getTime()==this.endDate().getTime())&&n.push(d)}}return new t.data.Query(n).sort([{field:"start",dir:"asc"},{field:"end",dir:"asc"}]).groupBy({field:"startDate"}).toArray()},_renderTaskGroups:function(e,n){for(var i=[],r=this.options.editable,o=r&&!1!==r.destroy&&!this._isMobile(),a=this._isMobile(),s=this._groupedView._getSumOfItemsForDate(e),l=this._groupedView._getGroupsInDay(e,n),c=0,d=0;d{0}',this._dateTemplate({date:u,isMobile:a}),this.groupedResources.length?"":"k-first")),i.push('':">")+v.join("")+"")):this._groupedView._renderDateCell(g,n,h,u,d,e)),m.head?m.format="{0:t}":m.tail?m.format="{1:t}":m.format="{0:t}-{1:t}",m.resources=this.eventResources(m),g.push(t.format('
              {0}{1}{2}
              {3}',m.tail||m.middle?t.ui.icon("caret-alt-left"):"",this._timeTemplate(m.clone({start:m._startTime||m.start,end:m.endTime||m.end,messages:this.options.messages})),m.head||m.middle?t.ui.icon("caret-alt-right"):"",this._eventTemplate(m.clone({showDelete:o,messages:this.options.messages,template:this.options.eventTemplate})),!this.groupedResources.length&&a?"k-first":"")),i.push('':">")+g.join("")+"")}return i.join("")},_renderTaskGroupsCells:function(e,n){for(var i=this._isMobile(),r=0;r{1}',n[r].rowSpan,this._groupTemplate({value:n[r].text,isMobile:i}),n[r].className))},render:function(n){var i=this.content.find("table").empty(),r=[];if(n.length>0){var o=this.groupedResources;if(i.append(e("")),o.length)r=this._createGroupConfiguration(n,o,null),this._groupsByDate=[],this._renderGroups(r,i.find("tbody"),[]),this._groupedView._renderDates(i.find("tbody"));else{r=this._tasks(n);var a=e(this._renderTaskGroups(r,[]));t.applyStylesFromKendoAttributes(a,["background-color"]),i.find("tbody").append(a)}}var s=this._eventsList=function(e){for(var t,n=0,i=e.length,r=[];n-1)&&(m+=" k-last");var g={text:t.getter(o.dataTextField)(s[u]),value:h,rowSpan:0,className:m};if(i.length>1)g.groups=this._createGroupConfiguration(p,i.slice(1),g),r&&(r.rowSpan+=g.rowSpan);else{g.items=f;var v=c(g.items);l&&(v+=g.items.length),g.rowSpan=v,r&&(r.rowSpan+=v)}a.push(g)}}return a},_resourceBySlot:function(){return{}},selectionByElement:function(t){var n,i;if(!(t=e(t)).hasClass("k-scheduler-datecolumn")&&this._eventsList.length){if(t.is(".k-task")&&(t=t.closest("td")),this._isMobile()){var r=t.parent();n=r.parent().children().filter((function(){return e(this).children(":not(.k-scheduler-datecolumn, .k-scheduler-groupcolumn)").length})).index(r)}else n=t.parent().index();return{index:n,start:(i=this._eventsList[n]).start,end:i.end,isAllDay:i.isAllDay,uid:i.uid}}},select:function(e){this.clearSelection();var t=this.table.find(".k-task").eq(e.index).closest("tr").addClass("k-selected").attr("aria-selected",!0)[0];this.current(t)},move:function(e,n){var i=!1,r=e.index;if(n==t.keys.UP?(r--,i=!0):n==t.keys.DOWN&&(r++,i=!0),i){var o=this._eventsList[r];o&&(e.start=o.start,e.end=o.end,e.isAllDay=o.isAllDay,e.events=[o.uid],e.index=r)}return i},moveToEvent:function(){return!1},constrainSelection:function(e){var t=this._eventsList[0];t&&(e.start=t.start,e.end=t.end,e.isAllDay=t.isAllDay,e.events=[t.uid],e.index=0)},isInRange:function(){return!0},destroy:function(){this.element&&this.element.off(r),n.SchedulerView.fn.destroy.call(this)},options:{title:"Agenda",name:"agenda",editable:!0,selectedDateFormat:"{0:D}-{1:D}",selectedShortDateFormat:"{0:d} - {1:d}",selectedMobileDateFormat:"{0: MMM} {0:dd} - {1:dd}",eventTemplate:function(e){var t=e.title;return i(t)},eventTimeTemplate:function(e){var n=e.isAllDay,i=e.messages,r=e.format,o=e.start,a=e.end;return n?i.allDay:t.format(r,o,a)},eventDateTemplate:function(e){return e.isMobile?(n=e.date,'
              '+t.toString(n,"dd")+' '+t.toString(n,"MMMM")+''+t.toString(n,"dddd")+"
              "):function(e){var n=e.date;return''+t.toString(n,"dd")+''+t.toString(n,"dddd")+''+t.toString(n,"y")+""}(e);var n},eventGroupTemplate:function(e){var t=e.isMobile,n=e.value;return t?''+n+"":''+n+""},messages:{event:"Event",date:"Date",time:"Time",allDay:"all day"}}})}(window.kendo.jQuery);kendo;!function(e){var t=window.kendo,n=t.ui,i=n.SchedulerView,r=".kendoMonthView",o=e.extend,a=t.htmlEncode,s=t.date.getDate,l=t.date.MS_PER_DAY,c="k-event-inverse",d=t.template((function(e){var n=e.date;return''+a(t.toString(n,"dd"))+""})),u=function(e){return'
              ':'class="k-event">')+''+(e.tail||e.middle?t.ui.icon("caret-alt-left"):"")+(e.isException()?t.ui.icon("arrows-no-repeat"):e.isRecurring()?t.ui.icon("arrow-rotate-cw"):"")+""+t.template(e.template)(e)+''+(e.showDelete?''+t.ui.icon("x")+"":"")+(e.head||e.middle?t.ui.icon("caret-alt-right"):"")+""+(!e.resizable||e.tail||e.middle?"":'')+(!e.resizable||e.head||e.middle?"":'')+"
              "},h=t.template((function(e){var t=e.title;return'
              '+a(t)+"
              "})),p=t.template((function(){return'
              '+t.ui.icon({icon:"more-horizontal",iconClass:"k-button-icon"})+"
              "})),f=t.Class.extend({init:function(e){this._view=e},_verticalRowCountForLevel:function(e){return this._view._rowCountForLevel(e)},_horizontalGroupCountForLevel:function(e){return this._view._columnCountForLevel(e)},_getCalendarRowsLength:function(e,t){return t/e},_createRows:function(e,t,n,i){for(var r=this._view,o=r._isVerticallyGrouped(),a="",s=0;s1&&(0===a?o=n.end.endDate():a==i-1?r=n.start.startDate():(r=n.start.startDate(),o=n.end.endDate()));var l=e.clone({start:new Date(r),end:new Date(o),head:n.head,tail:n.tail});s._positionMobileEvent(n,s._createEventElement(l),t)},_positionEvent:function(e,t,n,i,r,o,a){var s=this._view;i>1&&(0===a?o=n.end.endDate():a==i-1?r=n.start.startDate():(r=n.start.startDate(),o=n.end.endDate()));var l=e.clone({start:r,end:o,head:n.head,tail:n.tail});s._positionEvent(n,s._createEventElement(l),t)},_addDaySlotCollections:function(e,n,i){for(var r=this._view,o=0;o=t&&i<=n}t.ui.scheduler.MonthGroupedView=f,t.ui.scheduler.MonthGroupedByDateView=m,n.MonthView=i.extend({init:function(e,t){var n=this;0===t.eventsPerDay&&(t.eventsPerDay=1),0===t.eventHeight&&(t.eventHeight=1),0===t.moreButtonHeight&&(t.moreButtonHeight=1),"string"==typeof t.eventHeight&&"auto"!==t.eventHeight&&(t.eventHeight=25),"auto"===t.eventHeight&&(t.adaptiveSlotHeight=!0),i.fn.init.call(n,e,t),n._groupedView=n._getGroupedView();var r=this._isGroupedByDate(),o=this.options.adaptiveSlotHeight,a=this.options.eventHeight;if(!0===r&&!0===o)throw new Error("Incompatible options: adaptive slot height and date grouping!");if(!0===r&&"auto"===a)throw new Error("Incompatible options: auto event height and date grouping!");n.title=n.options.title,n._templates(),n._editable(),n._renderLayout(n.options.date),n._groups()},name:"month",_getGroupedView:function(){return this._isGroupedByDate()?new t.ui.scheduler.MonthGroupedByDateView(this):new t.ui.scheduler.MonthGroupedView(this)},_updateDirection:function(e,t,n,i,r){if(n){var o=t[0].start,a=t[t.length-1].end,s=o.index===a.index,l=o.collectionIndex===a.collectionIndex;(r?s&&l||l:s&&l)&&(e.backward=i)}},_changeDate:function(e,t,n){var i,r,o=this.groups[e.groupIndex];if(n){if(i=o._getCollections(o.daySlotCollectionCount()),(r=t.collectionIndex-1)>=0)return i[r]._slots[i[r]._slots.length-1]}else{if((i=o._getCollections(o.daySlotCollectionCount()))[r=t.collectionIndex+1]&&i[r]._slots[0])return i[r]._slots[0]}},_getNextHorizontalRange:function(e,t,n){var i=this._isVerticallyGrouped();return n.startSlot=e[t](n.startSlot,i),n.endSlot=e[t](n.endSlot,i),n},_getNextVerticalRange:function(e,t,n,i){var r=this._isVerticallyGrouped()&&this._isGroupedByDate();return n.startSlot=e[t](n.startSlot,i,r),n.endSlot=e[t](n.endSlot,i,r),n},_changeViewPeriod:function(e,n,i){var r,o,a=i?7:1;return n&&(a*=-1),r=t.date.addDays(e.start,a),o=t.date.addDays(e.end,a),!this._isInRange(r,o)&&(e.start=r,e.end=o,(!i||i&&this._isVerticallyGrouped())&&(e.groupIndex=this._groupedView._changePeriodGroupIndex(n,i,e.groupIndex)),e.events=[],!0)},_continuousSlot:function(e,t,n){var i=e.backward?0:t.length-1;return this.groups[e.groupIndex].continuousSlot(t[i].start,n)},_changeGroupContinuously:function(e,t,n,i){if(!n){var r=e.groupIndex,o=this.groups.length-1,a=this._isVerticallyGrouped(),s=this.groups[r];!t&&a?(t=s[i?"lastSlot":"firstSlot"](),r+=i?-1:1):t&&!a&&(r=i?o:0),(r<0||r>o)&&(r=i?o:0,t=null),e.groupIndex=r}return t},_normalizeHorizontalSelection:function(e,t,n){return n?t[0].start:t[t.length-1].end},_normalizeVerticalSelection:function(e,t){return e.backward?t[0].start:t[t.length-1].end},_templates:function(){var e=this.options,n=o({},t.Template,e.templateSettings);this.eventTemplate=t.template(u),this.dayTemplate=t.template(e.dayTemplate,n),this.groupHeaderTemplate=t.template(e.groupHeaderTemplate,n)},dateForTitle:function(){return t.format(this.options.selectedDateFormat,this._firstDayOfMonth,this._lastDayOfMonth)},shortDateForTitle:function(){return t.format(this.options.selectedShortDateFormat,this._firstDayOfMonth,this._lastDayOfMonth)},mobileDateForTitle:function(){return t.format(this.options.selectedMobileDateFormat,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(n){var i=this;this._firstDayOfMonth=t.date.firstDayOfMonth(n),this._lastDayOfMonth=t.date.lastDayOfMonth(n),this._startDate=function(e,n){var i=n.firstDay,r=new Date(e.getFullYear(),e.getMonth(),0,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());for(;r.getDay()!=i;)t.date.setTime(r,-1*l);return r}(n,this.calendarInfo()),this.createLayout(this._layout()),this._content(),this._initSlotHeight(),this._initTimesHeight(),this.refreshLayout(),this._isVirtualized()&&this._tryRenderContent(),this.content.on("click"+r,".k-nav-day,.k-more-events",(function(t){var n=e(t.currentTarget).offset(),r=i._slotByPosition(n.left,n.top);t.preventDefault(),i.trigger("navigate",{view:"day",date:r.startDate()})})),this._footer()},_editable:function(){this.options.editable&&(this._isMobile()?this._touchEditable():this._mouseEditable())},_mouseEditable:function(){var n=this;n.element.on("click"+r,".k-scheduler-monthview .k-event a:has(.k-i-x),.k-scheduler-monthview .k-event a:has(.k-svg-i-x)",(function(i){n.trigger("remove",{uid:e(this).closest(".k-event").attr(t.attr("uid"))}),i.preventDefault()})),!1!==n.options.editable.create&&n.element.on("dblclick"+r,".k-scheduler-monthview .k-scheduler-content td",(function(t){var i=e(t.currentTarget).offset(),r=n._slotByPosition(i.left,i.top);if(r){var a=n._resourceBySlot(r);n.trigger("add",{eventInfo:o({isAllDay:!0,start:r.startDate(),end:r.startDate()},a)})}t.preventDefault()})),!1!==n.options.editable.update&&n.element.on("dblclick"+r,".k-scheduler-monthview .k-event",(function(i){n.trigger("edit",{uid:e(this).closest(".k-event").attr(t.attr("uid"))}),i.preventDefault()}))},_touchEditable:function(){var n=this,i=0;t.support.mobileOS.android&&(i=5),!1!==n.options.editable.create&&(n._addUserEvents=new t.UserEvents(n.element,{threshold:i,useClickAsTap:!t.support.browser.edge,filter:".k-scheduler-monthview .k-scheduler-content td",tap:function(t){if(!n._scrolling){var i=e(t.target).offset(),r=n._slotByPosition(i.left,i.top);if(r){var a=n._resourceBySlot(r);n.trigger("add",{eventInfo:o({isAllDay:!0,start:r.startDate(),end:r.startDate()},a)})}t.preventDefault()}}}))},selectionByElement:function(t){var n=e(t).offset();return this._slotByPosition(n.left,n.top)},_columnCountForLevel:function(e){var t=this.columnLevels[e];return t?t.length:0},_rowCountForLevel:function(e){var t=this.rowLevels[e];return t?t.length:0},_content:function(){var e="",t=1,n=this._groupedView,i=this.groupedResources;i.length&&this._isVerticallyGrouped()&&(t=n._verticalRowCountForLevel(i.length-1));for(var r=0;r",this.content.find("table").html(e)},_virtualContent:function(){var e="";e+=this._createCalendar(++this._cachedGroupIndex),this.content.find("table tbody").append(e),this._initSlotHeight()},_calcSlotHeight:function(e){var t,n=this.options,i=n.eventHeight,r=n.eventSpacing,o=n.moreButtonHeight,a=this.content.find("table tr td")[0];if("auto"!==i&&a)return t=a.firstChild,Math.round(a.offsetHeight-a.clientHeight+t.offsetTop+t.offsetHeight+2+e*i+(e-1)*r+(2+o)+2)},_initSlotHeight:function(){var e,t=this.options,n=t.eventsPerDay,i=t.eventHeight,r=this._isMobile(),o=this.content.find("table");r||"number"==typeof i&&(e=this._calcSlotHeight(n),o.find("tr").height(e),o.addClass("k-scheduler-table-auto"))},_adjustSlotHeight:function(e){var t=this.options,n=t.eventHeight,i=t.eventSpacing,r=t.moreButtonHeight;if(!0===this._canAdjustSlotHeight){var o=e._daySlotCollections;this.content.find("table").addClass("k-scheduler-table-auto"),o.forEach((function(e){var t=e._events,o=0,a=e._slots,s=a[0],l=s.element.offsetTop,c=0;a.forEach((function(e){e.eventMeta?e.actualEventCount=e.eventMeta.length:(e.eventMeta=[],e.actualEventCount=0)})),a.forEach((function(e,t){e.eventMeta.forEach((function(n,i){n.startIndex===t&&n.startIndex!==n.endIndex&&a.slice(t,n.endIndex+1).forEach((function(t){var r=t.eventMeta;r.indexOf(n)>-1||(r[r.length]=e.eventMeta[i],t.actualEventCount=r.length,t.dirty=!0)}))})),!0===e.dirty&&(e.eventMeta.sort((function(e,t){return e.order-t.order})),delete e.dirty)})),"auto"===n&&a.forEach((function(e,t){var n=e.firstChildTop+e.firstChildHeight+2;e.eventMeta.forEach((function(e,t){e.top=Math.max(e.top,l+n),n=e.top-l+i+e.height}))})),a.forEach((function(e,a){var s=e.firstChildTop+e.firstChildHeight+2;e.eventMeta.forEach((function(e){e.top=Math.max(e.top,l+s),s=e.top-l+i+e.height,e.startIndex===a&&(t[o].element[0].style.top=e.top+"px",o++)})),e.eventMeta.length>0?(s-=i,s+=2):s+="auto"===n?25:n,e.more&&(e.more[0].style.top=l+s+"px",s+=2+r),c=Math.max(c,s+1)})),s.element.parentNode.style.height=c+"px",a.forEach((function(e){e.offsetTop=l,e.offsetHeight=c,e.clientHeight=c-1}))}))}},_initTimesHeight:function(){var e=this,t=e.times,n=e._isSchedulerHeightSet(),i=e.content[0];t&&!n&&t.height(i.clientHeight)},_createCalendar:function(e){var n=this.startDate(),i=[n],r="",o=1,a=this._isVerticallyGrouped(),s=this._groupedView,l=this.groupedResources;l.length&&(a||(o=s._horizontalGroupCountForLevel(l.length-1))),this._slotIndices={};for(var c=s._getCalendarRowsLength(7,42),d=0;d",i.push(n);var u=7*d;r+=s._createRows(n,u,o,e),n=s._adjustStartDate(n,d===c-1),r+=""}return this._weekStartDates=i,this._endDate=t.date.previousDay(n),r},_createRow:function(e,n,i,r){for(var o=this,a=o._firstDayOfMonth,l=o._lastDayOfMonth,c=o.dayTemplate,d="",u="",h=this._groupedView,p=function(){return o._resourceBySlot({groupIndex:r})},f=0;f",u+=h._getContent(c,e,p,f),u+="",o._slotIndices[s(e).getTime()]=n+f,e=h._nextSlotStartDate(e);return u},_layout:function(){var t,n=this.calendarInfo(),i=function(e,t){return e.slice(t).concat(e.slice(0,t))}(this._isMobile()?n.days.namesShort.map((function(e){return e[0]})):n.days.names,n.firstDay),r=e.map(i,(function(e){return{text:e}})),o=this.groupedResources,a=this._groupedView;if(o.length)if(this._isVerticallyGrouped()){for(var s=[],l=0;l<6;l++)s.push({text:"
               
              ",className:"k-hidden k-slot-cell"});t=a._createRowsLayout(o,s,this.groupHeaderTemplate,r),r=a._createVerticalColumnsLayout(o,s,this.groupHeaderTemplate,r)}else r=a._createColumnsLayout(o,r,this.groupHeaderTemplate,r);return{columns:r,rows:t}},_createEventElement:function(n){var i=this.options,r=i.editable,o=this._isMobile();n.showDelete=r&&!1!==r.destroy&&!o,n.resizable=r&&!1!==r.resize&&!o,n.ns=t.ns,n.resources=this.eventResources(n),n.inverseColor=!1,n.messages=i.messages||{destroy:"Delete"};var a=e(this.eventTemplate(e.extend({},n,{ariaLabel:this._formatEventAriaLabel(n.title,n.start,n.end,n.isAllDay),template:this.options.eventTemplate})));return t.applyStylesFromKendoAttributes(a,["background-color","border-color"]),this.angular("compile",(function(){return{elements:a,data:[{dataItem:n}]}})),a},_isInDateSlot:function(e){if(!this.groups||0===this.groups.length)return!1;var n=this.groups[0],i=n.firstSlot().start,r=n.lastSlot().end-1,o=t.date.toUtcTime(e.start),a=t.date.toUtcTime(e.end);return(g(o,i,r)||g(a,i,r)||g(i,o,a)||g(r,o,a))&&(!g(a,i,i)||g(a,o,o)||e.isAllDay)},_slotIndex:function(e){return this._slotIndices[s(e).getTime()]},_positionMobileEvent:function(n,r,o){var a,s=n.start,l=this.table.find(".k-scheduler-content .k-scheduler-table")[0],c=this.table.find(".k-scheduler-content")[0];n.start.offsetLeft>n.end.offsetLeft&&(s=n.end);var d=n.start.index,u=d,h=i.collidingEvents(n.events(),d,u);h.push({element:r,start:d,end:u});var p=i.createRows(h),f=n.collection.at(d),m=f.container;m||(a=this._isRtl&&c.clientWidth
              ').css({top:s.offsetTop+s.firstChildTop+s.firstChildHeight+"px",left:a,width:s.offsetWidth+"px"}),f.container=m,this.content[0].appendChild(m[0])),p.length<=3&&(n.addEvent({element:r,start:d,end:u,groupIndex:s.groupIndex}),o._continuousEvents.push({element:r,uid:r.attr(t.attr("uid")),start:n.start,end:n.end}),m[0].appendChild(r[0]))},_positionEvent:function(n,r,o){var a=this.options.eventHeight,s=this.options.eventSpacing,l=n.start;n.start.offsetLeft>n.end.offsetLeft&&(l=n.end);var c=n.start.index,d=n.end.index,u=l.eventCount,h=i.collidingEvents(n.events(),c,d),f=c!==d?3:2;h.push({element:r,start:c,end:d});for(var m=i.createRows(h),g=0,v=Math.min(m.length,u);gu)for(var k=c;k<=d;k++){var x=n.collection.at(k);x.more||(x.more=e(p()).css({width:x.clientWidth-2,left:x.offsetLeft+2,top:"auto"===a?"":x.offsetTop+x.firstChildTop+x.firstChildHeight+2+u*a+(u-1)*s+2}),this.content[0].appendChild(x.more[0]))}else{n.addEvent({element:r,start:c,end:d,groupIndex:l.groupIndex}),r[0].style.width=n.innerWidth()-f+"px",r[0].style.left=l.offsetLeft+2+"px",r[0].style.height="auto"===a?"":a+"px",o._continuousEvents.push({element:r,uid:r.attr(t.attr("uid")),start:n.start,end:n.end,order:parseInt(r.attr(t.attr("order")),10)}),r.appendTo(this.content),this._inverseEventColor(r);var C=n.start.collectionIndex,S=n.start.index,T=o._daySlotCollections[C]._slots[S];T.eventMeta||(T.eventMeta=[]),T.eventMeta.push({height:"auto"===a?r.outerHeight():a,top:0,startIndex:S,endIndex:n.end.index,uid:r.attr(t.attr("uid")),order:parseInt(r.attr(t.attr("order")),10)})}},_slotByPosition:function(e,t){var n=this.content.offset();e-=n.left,t-=n.top,t+=this.content[0].scrollTop,e+=this.content[0].scrollLeft,e=Math.ceil(e),t=Math.ceil(t);for(var i=0;i=t.timezone.toLocalDate(s)&&e.start<=t.timezone.toLocalDate(l);){var u=i.daySlotRanges(c.getTime(),d.getTime(),!0)[0];d.setDate(d.getDate()+1),c.setDate(c.getDate()+1),u&&(u.head=null,u.middle=null,u.tail=null,this._groupedView._positionMobileEvent(e,i,u,1,o,a,0)),s=t.date.addDays(s,1)}}.bind(this)):(e.forEach(function(e){for(var t,n=e.start,r=e.end,o=i.slotRanges(e,!0),a=o.length,s=0;s1?r=this._renderGroups(u,n.slice(1),r++,o+1,d):this._renderEvents(u,r++)}}return r},_groupCount:function(){var e=this.groupedResources,t=this._groupedView;return e.length?this._isVerticallyGrouped()?t._verticalGroupCount(e.length-1):t._horizontalGroupCount(e.length):1},_columnOffsetForResource:function(e){return this._columnCountForLevel(e)/this._columnCountForLevel(e-1)},destroy:function(){this.table&&this.table.removeClass("k-scheduler-monthview"),this.content&&this.content.off(r),this.element&&this.element.off(r),i.fn.destroy.call(this),this._isMobile()&&this.options.editable&&!1!==this.options.editable.create&&this._addUserEvents.destroy()},events:["remove","add","edit","navigate"],options:{title:"Month",name:"month",eventHeight:25,moreButtonHeight:13,editable:!0,selectedDateFormat:"{0:y}",selectedShortDateFormat:"{0:y}",selectedMobileDateFormat:"{0:MMMM}",groupHeaderTemplate:function(e){return e.text},dayTemplate:d,eventTemplate:h,eventsPerDay:2,adaptiveSlotHeight:!1,eventSpacing:3,ongoingEvents:{cssClass:null,enabled:!0,updateInterval:6e4}}})}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=n.htmlEncode,o=i.SchedulerView,a=e.extend,s=n.template,l=n.date.firstDayOfYear,c=n.date.firstDayOfMonth,d=n.date.lastDayOfMonth,u="navigate",h="keydown",p="click",f="focus",m=".kendoYearView",g={layout:"k-scheduler-layout k-scheduler-layout-flex k-scheduler-yearview",body:"k-scheduler-body",tooltip:"k-scheduler-tooltip",indicator:"k-day-indicator",event:"k-tooltip-event",hidden:"k-hidden",calendarView:"k-calendar-view",scheduler:"k-scheduler"},v=s((function(e){var t=e.date,i=e.events,o=e.messages;return"
              "+r(n.format("{0:MMM}",t))+"
              "+(i.length?"
              "+i.map((function(e){return'
              "+r(e.title)+"
              "+r(n.format("{0:t}",e.start))+"
              "})).join("")+"
              ":"
              "+r(o.noData)+"
              ")})),_=o.extend({init:function(e,t){var n=this;o.fn.init.call(n,e,t),n._yearRange(),n._templates(),n._layout(),n._initCalendar(),n._initTooltip()},options:{title:"Year",name:"year",months:12,startDate:null,messages:{noData:"No events on this date."},selectedDateFormat:"{0:yyyy}",selectedShortDateFormat:"{0:yyyy}",selectedMobileDateFormat:"{0:yyyy}",tooltipTemplate:v},name:"year",events:[u],_yearRange:function(){var e,t=this,n=t.options;t._startDate=n.startDate?c(n.startDate):l(n.date),t._startDate.setFullYear(n.date.getFullYear()),(e=new Date(t._startDate)).setMonth(e.getMonth()+n.months),t._endDate=e},_templates:function(){var e=this.options,t=a({},n.Template,e.templateSettings);this.tooltipTemplate=n.template(e.tooltipTemplate,t)},_layout:function(){var t=this,n=g;t.content=e("
              ").addClass(n.layout),t.element.append(t.content),t.body=e("
              ").addClass(n.body),t.content.append(t.body)},_initCalendar:function(){var t,n,r=this,o=r.options,a=e("
              ");r.body.append(a),r.calendar=t=new i.MultiViewCalendar(a,{views:o.months,value:r.startDate(),showViewHeader:!0,footer:!1}),n=t.element,o.selectable||r._disableCalendarSelection(),t.value(null),t.header.toggleClass(g.hidden),n.on(p+m,"td[role='gridcell']",r._calendarCellClick.bind(r)),n.on(h+m,"."+g.calendarView,r._calendarKeydown.bind(r)),t.bind(u,r._calendarNavigate.bind(r))},_calendarCellClick:function(e){var t=this.calendar.selectable.value().first();e.preventDefault(),e.stopPropagation(),this._displayTooltip(t)},_calendarKeydown:function(e){var t=n.keys,i=e.keyCode;i!=t.ENTER&&i!=t.SPACEBAR||(e.preventDefault(),this._displayTooltip(this.calendar.selectable.value().first()))},_calendarNavigate:function(e){var t=this,n=e.sender._firstViewValue .k-day",e._tooltipTitleClick.bind(e)),t.popup.element.on(h+m,e,e._tooltipKeydown.bind(e)))},_buildTooltipTemplate:function(){var e=this,t=n.parseDate(e.calendar.current()),i=e.eventsByDate||[];return(i=i.filter((function(e){return n.toString(new Date(e.value),"d")==n.toString(t,"d")})))&&i[0]&&i[0].items.map((function(t){t.resources=e.eventResources(t)||[]})),e.tooltipTemplate({date:t,events:i[0]?i[0].items:[],messages:e.options.messages})},_inverseTooltipEventsColor:function(){var t=this;e.each(t.tooltip.popup.element.find("."+g.event),(function(){t._inverseEventColor(e(this))}))},_tooltipShow:function(e){var t=e.sender;t.refresh(),this._inverseTooltipEventsColor(),t.popup.element.find(":kendoFocusable").first().trigger(f)},_tooltipHide:function(){var e=this.calendar;e&&e.focus()},_tooltipTitleClick:function(){this._navigateToDayView()},_tooltipKeydown:function(t){var i=this.tooltip.popup.element,r=e(t.target),o=n.keys,a=t.keyCode,s=t.shiftKey;if((r.is(".k-day")&&a==o.ENTER||a==o.SPACEBAR)&&(t.preventDefault(),this._navigateToDayView()),a==o.TAB){var l=i.find(":kendoFocusable").first(),c=i.find(":kendoFocusable").last();s&&r.is(l)?(c.trigger(f),t.preventDefault()):r.is(c)&&(l.trigger(f),t.preventDefault())}},_navigateToDayView:function(){e.grep(this.options.views,(function(t){return e.isPlainObject(t)&&"kendo.ui.DayView"==t.type||"day"===t})).length&&this.trigger(u,{view:"day",date:this.calendar.current()})},_displayTooltip:function(e){var t=this;e.length&&(t.options.selectable||e.removeClass("k-selected"),setTimeout((function(){t.tooltip.show(e)}),50))},_renderEventIndicators:function(){var t,n,i=this.calendar;i.element.find("."+g.indicator).remove(),this.eventsByDate.forEach((function(r){t=i._currentView.toDateString(new Date(r.value)),n=i.element[0].querySelector("[data-value='"+t+"']"),r.items.length&&e("").addClass(g.indicator).appendTo(n)}))},_groupEventsByDate:function(e){var t;return e.length?(t=e.map((function(e){return e.formattedDate=e.start.toDateString(),e})),new n.data.Query(t).sort([{field:"start",dir:"asc"},{field:"end",dir:"desc"}]).group({field:"formattedDate"}).toArray()):[]},_resourceBySlot:function(){return{}},lastDateInRange:function(){var e=new Date(this.previousDate());return e.setMonth(e.getMonth()-1+this.options.months),d(e)},nextDate:function(){return n.date.nextYear(this._startDate)},previousDate:function(){return n.date.previousYear(this._startDate)},startDate:function(){return this._startDate},endDate:function(){return this._endDate},moveToEvent:function(){return!1},constrainSelection:function(){return!1},inRange:function(){return!0},select:function(e){this.clearSelection(),e.start>=this.startDate()&&e.start0)&&s.forEach((function(t){var n=new Date(e.getFullYear(),e.getMonth()+1,1),r=L(t.day,l);n.getDay()<=r&&(!i||L(i.day,l)>r)&&(i=t)})),i||(i=s[0]),h(e,l)),r=i.day,r-=a,i.offset)for(;e<=t&&!N(e,i,l);)B(e,l)===O(e,l)?(e.setMonth(e.getMonth()+1,1),p(e,d)):(e.setDate(e.getDate()+7),p(e,d),h(e,l,-1));return e.getDay()!==r&&h(e,r),!0},hours:function(e,t,n){var i=n.hours,r=n._startTime,o=r.getHours(),a=W(i,o),s=!1;return null!==a&&(s=!0,e.setHours(o),p(e,o),a.length?(a=a[0],e.setHours(a)):(a=e.getHours(),e.setDate(e.getDate()+1),p(e,a),a=i[0],e.setHours(a),p(e,a)),n.minutes&&e.setMinutes(0),r.setHours(a,e.getMinutes())),s},minutes:function(e,t,n){var i=n.minutes,r=W(i,e.getMinutes()),o=n._startTime.getHours(),a=!1;return null!==r&&(a=!0,r.length?r=r[0]:(o+=1,r=i[0]),n.seconds&&e.setSeconds(0),e.setHours(o,r),p(e,o%=24),n._startTime.setHours(o,r,e.getSeconds())),a},seconds:function(e,t,n){var i=n.seconds,r=n._startTime.getHours(),o=W(i,e.getSeconds()),a=e.getMinutes(),s=!1;return null!==o&&(s=!0,o.length?e.setSeconds(o[0]):(a+=1,e.setMinutes(a,i[0]),a>59&&(a%=60,r=(r+1)%24)),n._startTime.setHours(r,a,e.getSeconds())),s}},S=o.extend({next:function(e,t){var n,i,r=t._startTime,o=r.getDate();if(t.seconds)i=e.getSeconds()+1,e.setSeconds(i),r.setSeconds(i),r.setDate(o);else{if(!t.minutes)return!1;n=e.getMinutes()+1,e.setMinutes(n),r.setMinutes(n),r.setDate(o)}return!0},normalize:function(e){var t=e.rule;4===e.idx&&t.hours&&(t._startTime.setHours(0),this._hour(e.date,t))},limit:function(e,n,i){for(var r,o,a,s,l,c=i.interval;e<=n;){for(a=o=t,l=e.getDate(),s=0;s.99&&(i=Math.round(n)),i},_hour:function(e,t,n){var i=t._startTime,r=i.getHours();n&&(r+=n),e.setHours(r),r%=24,i.setHours(r),p(e,r)},_date:function(e,t,n){var i=e.getHours();e.setDate(e.getDate()+n),p(e,i)||this._hour(e,t)}}),T=S.extend({next:function(e,t){S.fn.next(e,t)||this._hour(e,t,1)},normalize:function(e){var t=e.rule;4===e.idx&&(t._startTime.setHours(0),this._hour(e.date,t))}}),D=S.extend({next:function(e,t){S.fn.next(e,t)||this[t.hours?"_hour":"_date"](e,t,1)}}),I=D.extend({setup:function(e,t){e.weekDays||(e.weekDays=[{day:t.getDay(),offset:0}])}}),z=S.extend({next:function(e,t){var n,i;if(!S.fn.next(e,t))if(t.hours)this._hour(e,t,1);else if(t.monthDays||t.weekDays||t.yearDays||t.weeks)this._date(e,t,1);else{for(n=e.getDate(),i=e.getHours(),e.setMonth(e.getMonth()+1),p(e,i);e.getDate()!==n;)e.setDate(n),p(e,i);this._hour(e,t)}},normalize:function(e){var t=e.rule,n=e.date,i=n.getHours();0!==e.idx||t.monthDays||t.weekDays?S.fn.normalize(e):(n.setDate(e.day),p(n,i))},setup:function(e,t,n){e.monthDays||e.weekDays||n.setDate(t.getDate())}}),M=z.extend({next:function(e,t){var n,i=e.getHours();if(!S.fn.next(e,t))if(t.hours)this._hour(e,t,1);else if(t.monthDays||t.weekDays||t.yearDays||t.weeks)this._date(e,t,1);else if(t.months){for(n=e.getDate(),e.setMonth(e.getMonth()+1),p(e,i);e.getDate()!==n;)e.setDate(n),p(e,i);this._hour(e,t)}else e.setFullYear(e.getFullYear()+1),p(e,i),this._hour(e,t)},setup:function(){}}),E={hourly:new T,daily:new D,weekly:new I,monthly:new z,yearly:new M},A="click",H="change";function R(e,t){var n;return 0!==e&&eL(r.getDay(),n);return i<0?i=o+(i+1-(l?1:0)):s&&(i+=1),o-=l?1:0,i<(s?1:0)||i>o?null:i}function O(e,t){return B(new Date(e.getFullYear(),e.getMonth()+1,0),t)}function N(e,t,n){return B(e,n)===V(e,t,n)}function W(e,t,n){for(var i,r=0,o=e.length,a=[];rt.end||0===n&&t.start<0)return null;e[i]=n}return e.sort(K)}function j(e){for(var n,i,r,o=0,a=e.length;o=t&&a&&l.push(o);return l}function J(e,t,n){for(var i,r=[],o=0;o1&&(a+=";INTERVAL="+e.interval),e.count&&(a+=";COUNT="+e.count),d&&(d=r.convert(d,i||d.getTimezoneOffset(),"Etc/UTC"),a+=";UNTIL="+n.toString(d,"yyyyMMddTHHmmssZ")),e.months&&(a+=";BYMONTH="+e.months),e.weeks&&(a+=";BYWEEKNO="+e.weeks),e.yearDays&&(a+=";BYYEARDAY="+e.yearDays),e.monthDays&&(a+=";BYMONTHDAY="+e.monthDays),e.weekDays&&(a+=";BYDAY="+function(e){for(var t,n,i=0,r=e.length,o=[];i1||y||("daily"===k||"hourly"===k)&&!a.seconds?i=new Date(S):(p=i.getHours(),f=i.getMinutes(),g=i.getSeconds(),a.hours||(p=T.getHours()),a.minutes||(f=T.getMinutes()),a.seconds||(g=T.getSeconds()),i.setHours(p,f,g,T.getMilliseconds())),a._startPeriod=new Date(i),z&&(i=function(e,t){var n=new Date(e);switch(t.freq){case"yearly":n.setFullYear(n.getFullYear(),0,1);break;case"monthly":n.setFullYear(n.getFullYear(),n.getMonth(),1);break;case"weekly":h(n,t.weekStart,-1)}return t.hours&&n.setHours(0),t.minutes&&n.setMinutes(0),t.seconds&&n.setSeconds(0),n}(i,a),r=X(r,a),m(r)-m(i)<0&&(p=i.getHours(),r.setHours(p,i.getMinutes(),i.getSeconds(),i.getMilliseconds()),d.adjustDST(r,p)),a._startPeriod=new Date(i),a._endPeriod=X(i,a)),v=e.duration();var L,V,O,N,W=e.isAllDay?864e5:0;for(a._startTime=s=d.toInvariantTime(i),I.setup&&I.setup(a,T,i),I.limit(i,r,a);i<=r;){c=new Date(i),u(c,v);var U=new Date(i);if(u(U,v+W),(i>=_||U>_)&&!$(x,i,o)||z)if(l=(s=d.toUtcTime(d.getDate(i))+m(a._startTime))+v,S!==i.getTime()||C!==m(a._startTime)){var j=e.startTimezone||e.endTimezone,q=e.endTimezone||e.startTimezone;if(!e.isAllDay&&(o&&j||!o&&!j)){var G=ee(i,o)-ee(e.start,o),K=ee(c,o)-ee(e.end,o),te=ee(i,j)-ee(e.start,j),ne=ee(c,q)-ee(e.end,q);if(G!==te){var re=6e4*(G-te);H=new Date(i.getTime()-re),F=s-re}if(K!==ne){var oe=6e4*(K-ne);R=new Date(c.getTime()-oe),P=l-oe}}B.push(e.toOccurrence({start:H||new Date(i),end:R||c,_startTime:F||s,_endTime:P||l})),H=R=F=P=null}else e._startTime=s,e._endTime=l,B.push(e);if(z){if(I.next(i,a),I.limit(i,r,a),i>a._endPeriod&&(A=J(A=Z(B.slice(M),T,z,a.until),x,o),B=B.slice(0,M).concat(A),a._endPeriod=X(i,a),M=B.length),D&&D===M)break}else{if(D&&D===M)break;M+=1;var ae=(V=void 0,O=void 0,N=void 0,V=(L=i).getTimezoneOffset(),O=new Date(L.getTime()-36e5),N=O.getTimezoneOffset(),V
              '+i(r.interval)+"
              ":"")+("weekly"===t?'
              ':"")+("monthly"===t?'
              ':"")+("yearly"===t?'
              • '+i(r.of)+'
              ':"")+("never"!==t?'
              • '+i(o.occurrence)+'
              ':"")})),se=[{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}],le=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],ce=[{day:0,offset:0},{day:6,offset:0}],de=s.extend({init:function(e,t){var i,r=this,o=t&&t.frequencies;s.fn.init.call(r,e,t),r.wrapper=r.element,(t=r.options).start=i=t.start||d.today(),o&&(t.frequencies=o),"string"==typeof i&&(t.start=n.parseDate(i,"yyyyMMddTHHmmss")),null===t.firstWeekDay&&(t.firstWeekDay=n.culture().calendar.firstDay),r._namespace="."+t.name},options:{value:"",start:"",timezone:"",spinners:!0,firstWeekDay:null,frequencies:["never","daily","weekly","monthly","yearly"],mobile:!1,messages:{repeat:"Repeat",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 ",date:"Date"},yearly:{repeatEvery:"Repeat every: ",repeatOn:"Repeat on: ",interval:" year(s)",of:" of ",month:"month",day:"day",date:"Date"},end:{label:"End:",mobileLabel:"Ends",never:"Never",after:"After ",occurrence:" occurrence(s)",on:"On "},offsetPositions:{first:"first",second:"second",third:"third",fourth:"fourth",last:"last"},weekdays:{day:"day",weekday:"weekday",weekend:"weekend day"}}},events:["change"],_initInterval:function(){var e=this,t=e._value;e._container.find(".k-recur-interval").kendoNumericTextBox({spinners:e.options.spinners,value:t.interval||1,decimals:0,format:"#",min:1,change:function(){t.interval=this.value(),e._trigger()}})},_weekDayButtons:function(e){for(var t=this,i=n.culture().calendar.days.names,r=n.culture().calendar.days.namesAbbr,o=t.options.messages.weekly.repeatOn,a=i.length,s=0,l=[],d=[];s0&&(t._weekDayButtonGroup=new c(t._container.find(".k-recur-weekday-buttons"),{items:d,selection:"multiple",select:function(){var e=t._value,n=t._weekDayButtonGroup.current();e.weekDays=n.map((function(e,t){return{day:Number(t.getAttribute("data-value")),offset:0}})),t.options.mobile||t._trigger()}}))},_weekDayRule:function(e){var t=this,n=(t._weekDay.element||t._weekDay).val(),i=Number((t._weekDayOffset.element||t._weekDayOffset).val()),r=null,o=null;e||("day"===n?(r=se,o=i):"weekday"===n?(r=le,o=i):"weekend"===n?(r=ce,o=i):r=[{offset:i,day:Number(n)}]),t._value.weekDays=r,t._value.positions=o},_weekDayView:function(){var e,t,n,i,r=this,o=r._value.weekDays,a=r._value.positions,s=r._weekDayOffset;o&&(n=o.length,a&&(7===n?(t="day",e=a):5===n?(t="weekday",e=a):2===n&&(t="weekend",e=a)),t||(t=(o=o[0]).day,e=o.offset||""),s[i=s.value?"value":"val"](e),r._weekDay[i](t))},_initWeekDay:function(){var t,i=this,r=i.options.messages.weekdays,o=i.options.messages.offsetPositions,a=i._container.find(".k-recur-weekday"),s=function(){i._weekDayRule(),i._trigger()};a[0]&&(i._weekDayOffset=new l(i._container.find(".k-recur-weekday-offset"),{autoWidth:!0,change:s,dataTextField:"text",dataValueField:"value",dataSource:[{text:o.first,value:"1"},{text:o.second,value:"2"},{text:o.third,value:"3"},{text:o.fourth,value:"4"},{text:o.last,value:"-1"}]}),t=[{text:r.day,value:"day"},{text:r.weekday,value:"weekday"},{text:r.weekend,value:"weekend"}],i._weekDay=new l(a,{autoWidth:!0,value:i.options.start.getDay(),change:s,dataTextField:"text",dataValueField:"value",dataSource:t.concat(e.map(n.culture().calendar.days.names,(function(e,t){return{text:e,value:t}})))}),i._weekDayView())},_initWeekDays:function(){var e=this._value,t=this._weekDayButtonGroup;if(t&&e.weekDays&&e.weekDays.length){for(var n,i=e.weekDays,r=i.length,o=[],a=0;a0&&s.val()&&d<(a=n.parseDate(s.val()))&&(d=a),e._until=t.kendoDatePicker({min:a,value:o||d,change:function(){var t=this.value();t&&(r.until=new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59)),e._trigger()}}).data("kendoDatePicker"),s&&s.on("change",(function(){var t=e._until.element,n=Boolean(t.attr("readonly")),i=!Boolean(t.is("[disabled]")||t.parents("fieldset").is(":disabled"));e._until.setOptions({min:s.val(),readonly:n,enable:i})}))},_trigger:function(){this.options.mobile||this.trigger("change")}}),ue=de.extend({init:function(e,t){var n=this;de.fn.init.call(n,e,t),n._initFrequency(),n._initContainer(),n.value(n.options.value)},options:{name:"RecurrenceEditor"},events:["change"],destroy:function(){var e=this;e._frequency.destroy(),this._weekDayButtonGroup&&this._weekDayButtonGroup.destroy(),e._container.find("input[type=radio],input[type=checkbox]").off(A+e._namespace),n.destroy(e._container),de.fn.destroy.call(e)},value:function(e){var n,i,r=this,o=r.options.timezone;if(e===t)return r._value.freq?oe(r._value,o):"";r._value=ie(e,o)||{},(n=r._value.freq)?(i=r._frequency.element.find("[data-value='"+n+"']"),r._frequency.select(i)):r._frequency.select(0),r._initView(r._frequency.current().data("value"))},_initContainer:function(){var t=this.element,n=e('
              '),i=t.parent(".k-edit-field");i[0]?n.insertAfter(i):t.append(n),this._container=n},_initFrequency:function(){var t,n=this,i=n.options,r=i.frequencies,o=i.messages.frequencies,a=e('
              ').attr({title:i.messages.recurrenceEditorTitle});r=e.map(r,(function(e){return{text:o[e],attributes:{"data-value":e,"aria-label":i.messages.repeat+o[e]}}})),(t=r[0])&&t.attributes&&"never"===t.attributes["data-value"]&&(t.attributes["data-value"]=""),n.element.append(a),n._frequency=new c(a,{items:r,select:function(){n._value={},n._initView(n._frequency.current().data("value")),n.trigger("change")}})},_initView:function(t){var i,r=this,o=r._value,a=r.options,s={frequency:t||"never",firstWeekDay:a.firstWeekDay,messages:a.messages[t],end:a.messages.end};r._weekDayButtonGroup&&(r._weekDayButtonGroup.destroy(),r._container.find(".k-recur-weekday-buttons").empty(),r._weekDayButtonGroup=null),n.destroy(r._container),i=e(ae(s)),n.applyStylesFromKendoAttributes(i,["width"]),r._container.html(i),t?(o.freq=t,"weekly"!==t||o.weekDays||(o.weekDays=[{day:a.start.getDay(),offset:0}]),r._weekDayButtons(a.firstWeekDay),r._initInterval(),r._initWeekDays(),r._initMonthDay(),r._initWeekDay(),r._initMonth(),r._initCount(),r._initUntil(),r._period(),r._end()):r._value={}},_initMonth:function(){var t,i=this,r=i._value,o=r.months||[i.options.start.getMonth()+1],a=i._container.find(".k-recur-month");a[0]&&(t={autoWidth:!0,change:function(){r.months=[Number(this.value())],i.trigger("change")},dataTextField:"text",dataValueField:"value",dataSource:e.map(n.culture().calendar.months.names,(function(e,t){return{text:e,value:t+1}}))},i._month1=new l(a[0],t),i._month2=new l(a[1],t),o&&(o=o[0],i._month1.value(o),i._month2.value(o)))},_end:function(){var e,t=this,n=t._value,i=t._container,r=t._namespace,o=function(e){t._toggleEnd(e.currentTarget.value),t.trigger("change")};t._buttonNever=i.find(".k-recur-end-never").on(A+r,o),t._buttonCount=i.find(".k-recur-end-count").on(A+r,o),t._buttonUntil=i.find(".k-recur-end-until").on(A+r,o),n.count?e="count":n.until&&(e="until"),t._toggleEnd(e)},_period:function(){var e=this,t=e._value,n="monthly"===t.freq,i=n?e._toggleMonthDay:e._toggleYear,r=".k-recur-"+(n?"month":"year")+"-radio",o=e._container.find(r);(n||"yearly"===t.freq)&&(o.on(A+e._namespace,(function(t){i.call(e,t.currentTarget.value),e.trigger("change")})),e._buttonMonthDay=o.eq(0),e._buttonWeekDay=o.eq(1),i.call(e,t.weekDays?"weekday":"monthday"))},_toggleEnd:function(e){var t,n,i,r,o=this;"count"===e?(o._buttonCount.prop("checked",!0),i=!0,r=!1,t=o._count.value(),n=null):"until"===e?(o._buttonUntil.prop("checked",!0),i=!1,r=!0,t=null,n=o._until.value()):(o._buttonNever.prop("checked",!0),i=r=!1,t=n=null),o._count&&o._count.enable(i),o._until&&o._until.enable(r),o._value.count=t,o._value.until=n},_toggleMonthDay:function(e){var t,n=this,i=!1,r=!0,o=!1;"monthday"===e?(n._buttonMonthDay.prop("checked",!0),t=[n._monthDay.value()],i=!0,r=!1,o=!0):(n._buttonWeekDay.prop("checked",!0),t=null),n._weekDay.enable(r),n._weekDayOffset.enable(r),n._monthDay.enable(i),n._value.monthDays=t,n._weekDayRule(o)},_toggleYear:function(e){var t,n=this,i=!1,r=!0;"monthday"===e?(i=!0,r=!1,t=n._month1.value()):t=n._month2.value(),n._month1.enable(i),n._month2.enable(r),n._value.months=[t],n._toggleMonthDay(e)}});a.plugin(ue);var he=n.template((function(e){return'
              '})),pe=n.template((function(e){var t=e.frequency,r=e.messages;return("never"!==t?'":"")+("weekly"===t?'
              ':"")+("monthly"===t?'
              ':"")+("yearly"===t?'
              ':"")})),fe=n.template((function(e){var t=e.endPattern,n=e.messages;return"count"===t?'':"until"===t?'':void 0})),me=n.template((function(e){var t=e.dataSource,n=e.value;return'"})),ge=de.extend({init:function(e,t){var r=this;de.fn.init.call(r,e,t),t=r.options,r._optionTemplate=n.template((function(e){var t=e.value,n=e.text;return'"})),r.value(t.value),r._pane=t.pane||r.wrapper.closest("[data-role=pane]").data("kendoPane"),r._initRepeatButton(),r._initParentRepeatEnd(),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(e){var n=this,i=n.options.timezone;if(e===t)return n._value.freq?oe(n._value,i):"";n._value=ie(e,i)||{}},destroy:function(){this._destroyView(),n.destroy(this._endFields),this.element.off(A+this._namespace),de.fn.destroy.call(this)},_initInterval:function(){var e=this,t=e._value;e._container.find(".k-recur-interval").val(e._value.interval||1).on(H+e._namespace,(function(n){t.interval=n.target.value,e._trigger()}))},_initRepeatButton:function(){var t=this,i=t.options.messages.frequencies[this._value.freq||"never"];t._chevronButton=e(n.ui.icon("chevron-right")),t._repeatValue=e(''+i+""),t.element.append(t._repeatValue).append(t._chevronButton),t.element.parents("li.k-item").on(A+t._namespace,(function(e){e.preventDefault(),t._createView("repeat"),t._pane.navigate(t._view,t.options.animations.left)}))},_endLiItem:function(){return'
            • "},_initParentRepeatEnd:function(){var t=this,n=e(t._endLiItem()).insertAfter(t.element.parents("li.k-item")),i=e('
              ').appendTo(n.find(".k-label"));n.on(A+t._namespace,(function(e){e.preventDefault(),t._navigateToView("repeat")})),t._endParentLabelField=n.toggle(!!t._value.freq),t._endParentEndButton=i.find(".k-scheduler-recur-end").text(t._endText())},_initRepeatEnd:function(){var t=this,i=e(t._endLiItem()).insertAfter(t._container),r=e('
              '+n.ui.icon("chevron-right")+"
              ").appendTo(i.find(".k-label"));i.on(A+t._namespace,(function(e){e.preventDefault(),t._navigateToView("end")})),t._endLabelField=i.toggleClass("k-disabled",!t._value.freq),t._endButton=r.find(".k-scheduler-recur-end").text(t._endText())},_navigateToView:function(e){var t=this;t._createView(e),t._pane.navigate(t._view,t.options.animations.left)},_endText:function(){var e=this._value,t=this.options.messages.end,i=t.never;return e.count?i=n.format("{0} {1}",t.after,e.count):e.until&&(i=n.format("{0} {1:d}",t.on,e.until)),i},_initFrequency:function(){var t=this,i=t.options.messages.frequencies,r=me({dataSource:e.map(this.options.frequencies,(function(e){return{text:i[e],value:"never"!==e?e:""}})),value:t._value.freq||"",ns:n.ns});t._view.element.find(".k-recur-pattern").append(r),t._view.element.find(".k-scheduler-select").on(H+t._namespace,(function(n){var i=n.target.value;t._value={freq:i},t._defaultValue=e.extend({},t._value),t._initRepeatView(),t._endButton.text(t._endText()),t._endParentEndButton.text(t._endText())}))},_initEndNavigation:function(){var e=this,t=e.options.messages.end.patterns,i=e._value,r="";i.count?r="count":i.until&&(r="until");var o=me({dataSource:[{text:t.never,value:""},{text:t.after,value:"count"},{text:t.on,value:"until"}],value:r,ns:n.ns});e._view.element.find(".k-recur-pattern").append(o),e._view.element.find(".k-scheduler-select").on(H+e._namespace,(function(t){var r=t.target.value,o=null,a=null;e._initEndView(r),e._count.length?(o=e._count.val(),a=null):e._until.length&&(o=null,a=e._until.val?n.parseDate(e._until.val(),"yyyy-MM-dd"):e._until.value()),i.count=o,i.until=a}))},_createView:function(t){var i=this,r=i.options.messages,o=r["repeat"===t?"repeatTitle":"endTitle"],a='
              ",s=i._pane.view().id;i._view=i._pane.append(a+he({headerTitle:o})),i._view.element.on(A+i._namespace,"a.k-scheduler-cancel, a.k-scheduler-update",(function(t){t.preventDefault(),t.stopPropagation(),e(this).hasClass("k-scheduler-update")?(i.trigger("change"),i._defaultValue=e.extend({},i._value)):i._value=i._defaultValue;var n=i._value.freq;i._endParentEndButton.text(i._endText()),i._endParentLabelField.toggle(!!n&&"never"!==n),i._endButton.text(i._endText()),i._repeatValue.text(r.frequencies[n||"never"]),i._pane.one("viewShow",(function(){i._destroyView()})),i._pane.navigate(s,i.options.animations.right)})),i._container=i._view.element.find(".k-recur-view"),"repeat"===t?(i._initFrequency(),i._initRepeatView(),i._initRepeatEnd()):(i._initEndNavigation(),i._initEndView())},_destroyView:function(){this._view&&(this._view.destroy(),this._view.element.remove(),this._container=null),this._view=null},_initRepeatView:function(){var t=this,i=t._value.freq||"never",r={frequency:i,firstWeekDay:t.options.firstWeekDay,messages:t.options.messages[i]},o=pe(r),a=e(o);n.applyStylesFromKendoAttributes(a,["display"]);var s=t._container=t._container||this._pane.view().content.find("li.k-recur-view"),l=t._value;if(t._endLabelField&&t._endLabelField.toggleClass("k-disabled","never"===i),n.destroy(s),s.html(a),!o)return t._value={},void s.hide();s.show(),"weekly"!==i||l.weekDays||(l.weekDays=[{day:t.options.start.getDay(),offset:0}]),t._weekDayButtons(t.options.firstWeekDay),t._initInterval(),t._initMonthDay(),t._initWeekDays(),t._initWeekDay(),t._initMonth(),t._period()},_initMonthDay:function(){var e=this,t=e._value;(e._monthDay=e._container.find(".k-recur-monthday")).attr({min:1,max:31}).val(t.monthDays?t.monthDays[0]:e.options.start.getDate()).on(H+e._namespace,(function(n){t.count=n.target.value,e._trigger()}))},_initCount:function(){var e=this,t=e._count=e._container.find(".k-recur-count"),n=e._value;t.val(n.count||1).on(H+e._namespace,(function(t){n.count=t.target.value,e._trigger()}))},_initEndView:function(e){var i=this,r=i._value;e===t&&(r.count?e="count":r.until&&(e="until"));var o={endPattern:e,messages:i.options.messages.end};n.destroy(i._container),i._container.html(fe(o)),i._initCount(),i._initUntil()},_initWeekDay:function(){var t,i=this,r=i.options.messages.weekdays,o=i.options.messages.offsetPositions,a=i._container.find(".k-recur-weekday"),s=function(){i._weekDayRule(),i.trigger("change")};a[0]&&(i._weekDayOffset=i._container.find(".k-recur-weekday-offset").html(i._options([{text:o.first,value:"1"},{text:o.second,value:"2"},{text:o.third,value:"3"},{text:o.fourth,value:"4"},{text:o.last,value:"-1"}])).on("change",s),t=(t=[{text:r.day,value:"day"},{text:r.weekday,value:"weekday"},{text:r.weekend,value:"weekend"}]).concat(e.map(n.culture().calendar.days.names,(function(e,t){return{text:e,value:t}}))),i._weekDay=a.html(i._options(t)).on("change",s).val(i.options.start.getDay()),i._weekDayView())},_initMonth:function(){var t=this,i=t._value,r=t.options.start,o=i.months||[r.getMonth()+1],a=t._container.find(".k-recur-month"),s=n.culture().calendar.months.names;if(a[0]){var l=e.map(s,(function(e,t){return{text:e,value:t+1}}));a.html(t._options(l)).on("change",(function(){i.months=[Number(this.value)]})),t._monthSelect=a,o&&a.val(o[0])}},_period:function(){var e=this,t=e._value,i=e._container,r=e.options.messages[t.freq],o=i.find(".k-repeat-rule"),a=i.find(".k-weekday-view"),s=i.find(".k-monthday-view");if(o[0]){var l=t.weekDays?"weekday":"monthday",c=me({value:l,dataSource:[{text:r.dayOfMonth,value:"monthday"},{text:r.dayOfWeek,value:"weekday"}],ns:n.ns}),d=function(n){var i=e._weekDay.val(),r=e._weekDayOffset.val(),o=e._monthDay.val(),l=e._monthSelect?e._monthSelect.val():null;"monthday"===n?(t.weekDays=null,t.monthDays=o?[o]:o,t.months=l?[Number(l)]:l,a.hide(),s.show()):(t.monthDays=null,t.months=l?[Number(l)]:l,t.weekDays=[{offset:Number(r),day:Number(i)}],a.show(),s.hide())};o.append(c),o.find(".k-scheduler-select").on(H+e._namespace,(function(e){d(e.target.value)})),d(l)}},_initUntil:function(){var e=this,t=e._container.find(".k-recur-until"),i=e.options.start,r=e._value,o=r.until,a=o&&o
              '+c(n.format("{0:t} - {1:t}",i,r))+'
              '+t+"
              "})),_=n.template((function(e){var t=e.date;return""+n.format("{0:m}",t)+""})),b=function(e){return'
              ':'class="k-event">')+''+(e.tail?n.ui.icon("caret-alt-left"):"")+(e.isException()?n.ui.icon("arrows-no-repeat"):e.isRecurring()?n.ui.icon("arrow-rotate-cw"):"")+""+n.template(e.template)(e)+''+(e.showDelete?''+n.ui.icon("x")+"":"")+(e.head?n.ui.icon("caret-alt-right"):"")+""+(e.resizable&&!e.tail?'':"")+(e.resizable&&!e.head?'':"")+"
              "};function w(e){var t=new Date(1980,1,1,0,0,0);return r(t,u(e)),t}function y(e){var t=0;if(e.columns){for(var n=0;n=n.date.getMilliseconds(u.workDayEnd)||!c._isWorkDay(e[m]))&&(a+=" k-nonwork-hour"),o+="",i=n.date.getDate(e[m]),n.date.setTime(i,n.date.getMilliseconds(t)),o+=s({date:i,resources:(r=l?p:f,function(){return c._resourceBySlot({groupIndex:r})})}),o+=""},p=0;p";for(var f=0;f"}return d},_addTimeSlotsCollections:function(e,t,n,i,r){var o=this._view,a=n.length;r&&(a=Math.floor(a/e));for(var s=0;s
              ",o=i.datesHeader.find(".k-scheduler-header-wrap"),s=Math.round(t[0].innerRect(n,new Date(n.getTime()+1),!1).left),l=e(r).prependTo(o).addClass("k-current-time-arrow-down");l.css({left:i._adjustLeftPosition(s-a(l)*m/2),top:o.find("tr").last().prev().position().top}),e(r).prependTo(i.content).css({left:i._adjustLeftPosition(s),width:"1px",height:i.content[0].scrollHeight-1,top:0})},_changeGroup:function(){return t},_prevGroupSlot:function(e,t,n){return this._view._isVerticallyGrouped()?e:t._collection(0,n).last()},_nextGroupSlot:function(e,t,n){return this._view._isVerticallyGrouped()?e:t._collection(0,n).first()},_verticalSlots:function(e,t){return this._view._changeGroup(e,t)},_verticalMethod:function(e){return e?"leftSlot":"rightSlot"},_normalizeVerticalSelection:function(){return t},_horizontalSlots:function(e,t,n,i,r,o,a){var s=this._view,l={};return l.startSlot=t[n](i),l.endSlot=t[n](r),o||!s._isHorizontallyGrouped()||l.startSlot&&l.endSlot||(l.startSlot=l.endSlot=s._changeGroup(e,a)),l},_changeVerticalViewPeriod:function(){return!1},_changeHorizontalViewPeriod:function(e,t,n,i){var r=this._view;return!(e.startSlot&&e.endSlot||t||!r._changeViewPeriod(n,i,!1))},_updateDirection:function(e,t,n,i){this._view._updateDirection(e,t,n,i,!0)},_createMoveHint:function(e,t){var n=this._view,i=e.start,r=n._createEventElement(t.occurrence,t.occurrence,!1,!1);r.addClass("k-event-drag-hint");var o=e.innerRect(t.occurrence.start,t.occurrence.end,n.options.snap),a=o.right-o.left;a<0&&(a=0);var s={left:n._adjustLeftPosition(o.left),top:i.offsetTop,height:i.offsetHeight,width:a};r.css(s),t.occurrence.inverseColor&&r.addClass(f),n._appendMoveHint(r)},_adjustLeftPosition:function(e){var t=this._view;return t._isRtl&&(e-=t.content[0].scrollWidth-t.content[0].clientWidth),e}}),x=n.Class.extend({init:function(e){this._view=e},_getTimeSlotByPosition:function(e,t,n){return this._view.groups[n].timeSlotByPosition(e,t,!0)},_hideHeaders:function(){var e=this._view;e._isVerticallyGrouped()?e.times.find(".k-last").hide():(e.timesHeader.find("table tr").eq(2).hide(),e.datesHeader.find("table tr").eq(2).hide())},_setColspan:function(){},_createRowsLayout:function(e,t,n,i){return this._view._createDateLayout(i,null,!0)},_createVerticalColumnsLayout:function(e,t,n){return this._view._createColumnsLayout(e,null,n)},_createColumnsLayout:function(e,t,n,i){return this._view._createColumnsLayout(e,t,n,i,!0)},_getRowCount:function(e){return this._view._rowCountForLevel(e)},_getGroupsCount:function(){return this._view._groupCount()},_addContent:function(e,t,i,o,a,s,l,c){for(var d,u=this._view,h="",f=u.options,m=function(t,i,r,o,a,s){var c,h,p="",m="",g=u._isVerticallyGrouped()?d:w;return n.date.isToday(e[w])&&(m+="k-today"),(n.date.getMilliseconds(t)=n.date.getMilliseconds(f.workDayEnd)||!u._isWorkDay(e[g]))&&(m+=" k-nonwork-hour"),p+="",c=n.date.getDate(e[w]),n.date.setTime(c,n.date.getMilliseconds(t)),p+=l({date:c,resources:(h=s,function(){return u._resourceBySlot({groupIndex:h})})}),p+=""},g=new Date(a),v=u.options.minorTickCount,_=u.options.majorTick*p/v||1,b=0;b",b%(o/u._dates.length)==0&&(d=b/(o/u._dates.length),g=new Date(u._dates[d]),n.date.setTime(g,n.date.getMilliseconds(a)));for(var w=0,y=t;w"}return h},_addTimeSlotsCollections:function(e,t,n,i,r){var o=this._view,a=n.length;r&&(a/=t);for(var s=0;s
              ",c=e(l).prependTo(i.times),d=Math.round(t[0].innerRect(n,new Date(n.getTime()+1),!1).top),u={};this._isRtl?(u.right=r.position().left+s(r)-s(o),c.addClass("k-current-time-arrow-left")):(u.left=o.position().left,c.addClass("k-current-time-arrow-right")),u.top=d-a(c)*m/2,c.css(u),e(l).prependTo(i.content).css({top:d,height:"1px",right:"1px",width:i.content[0].scrollWidth,left:0})},_changeGroup:function(e,t,n){var i=this._view;n||(e.groupIndex=t?i.groups.length-1:0)},_prevGroupSlot:function(e){return e},_nextGroupSlot:function(e){return e},_changeDate:function(e,t,n){var i,r,o=this._view.groups[e.groupIndex];if(t){if(i=o._getCollections(!1),(r=n.index-1)>=0)return i[0]._slots[r]}else if(i=o._getCollections(!1),r=n.index+1,i[0]&&i[0]._slots[r])return i[0]._slots[r]},_verticalSlots:function(e,t,n){return this._changeDate(e,t,n)},_verticalMethod:function(e,t){return t?e?"upSlot":"downSlot":e?"leftSlot":"rightSlot"},_normalizeVerticalSelection:function(e,n,i,r){var o=this._view;return r?t:o._normalizeVerticalSelection(e,n,i)},_horizontalSlots:function(e,t,n,i,r,o,a){var s=this._view,l=s._changeGroup(e,a),c={};return l?c.startSlot=c.endSlot=l:s._isVerticallyGrouped()||(c.startSlot=t[n](i),c.endSlot=t[n](r)),c},_changeVerticalViewPeriod:function(e,t,n,i){var r=this._view;return!(e.startSlot&&e.endSlot||t||!r._changeViewPeriod(n,i,r._isVerticallyGrouped()))},_changeHorizontalViewPeriod:function(e,t,n,i){var r=this._view;return!r._isVerticallyGrouped()&&!(e.startSlot&&e.endSlot||t||!r._changeViewPeriod(n,i,!1))},_updateDirection:function(e,t,n,i){var r=this._view;r._updateDirection(e,t,n,i,!r._isVerticallyGrouped())},_createMoveHint:function(e,t){for(var n=this._view,i=e.start,r=e.end,o=i.index;o<=r.index;o++){var a=e.collection._slots[o],s=n._createEventElement(t.occurrence,t.occurrence,!1,!1);s.addClass("k-event-drag-hint");var l={left:a.offsetLeft+2,top:a.offsetTop,height:n.options.eventHeight,width:a.offsetWidth};s.css(l),t.occurrence.inverseColor&&s.addClass(f),n._appendMoveHint(s)}},_adjustLeftPosition:function(e){var t=this._view;return t._isRtl&&!t._isVerticallyGrouped()&&(e-=t.content[0].scrollWidth-t.content[0].offsetWidth),e}});n.ui.scheduler.TimelineGroupedView=k,n.ui.scheduler.TimelineGroupedByDateView=x;var C=o.extend({init:function(t,n){var i=this,r=e("
              ").appendTo(document.body);o.fn.init.call(i,t,n),i._zeroWidthEventOffset=r.outerWidth(),r.remove(),i._groupedView=i._getGroupedView(),i.title=i.options.title||i.options.name,i._workDays=function(e){if(e.workDays&&e.workDays.length)return e.workDays;var t=[],n=e.workWeekStart%7,i=Math.abs(e.workWeekEnd%7);for(t.push(n);i!=n;)n>6?n-=7:n++,t.push(n);return t}(i.options),i._templates(),i._editable(),i.calculateDateRange(),i._groups(),i._currentTime(!0)},name:"timeline",_isVirtualized:function(){return!1},_getGroupedView:function(){return this._isGroupedByDate()?new n.ui.scheduler.TimelineGroupedByDateView(this):new n.ui.scheduler.TimelineGroupedView(this)},_getNextEventIndexBySlot:function(e,t,i){if(this._isVerticallyGrouped())return n.ui.SchedulerView.fn._getNextEventIndexBySlot.call(this,e,t,i);for(var r=0,o=0;ot[o].start.startDate())r++;else{if(!(e.startDate().getTime()===t[o].start.startDate().getTime()&&i>t[o].start.groupIndex))break;r++}return r},_getSelectedSlot:function(e,t,i,r,o,a){return this._isVerticallyGrouped()?n.ui.SchedulerView.fn._getSelectedSlot.call(this,e,t,i,r,o,a):e},_getSortedEvents:function(t){return this._isVerticallyGrouped()?n.ui.SchedulerView.fn._getSortedEvents.call(this,t):t.sort((function(t,n){var i=t.start.startDate().getTime()-n.start.startDate().getTime();return 0===i&&(t.start.isDaySlot&&!n.start.isDaySlot&&(i=-1),!t.start.isDaySlot&&n.start.isDaySlot&&(i=1)),0===i&&(i=t.start.groupIndex-n.start.groupIndex),0===i&&(i=e(t.element).index()-e(n.element).index()),i}))},_currentTimeMarkerUpdater:function(){this._updateCurrentTimeMarker(new Date)},_scrollTo:function(e,t){o.fn._scrollTo.call(this,e,t);var n=e.offsetLeft,i=e.offsetWidth,r=t.scrollLeft,a=t.clientWidth,s=n+i,l=0;l=r>n?n:s>r+a?i<=a?s-a:n:r,t.scrollLeft=l},_updateCurrentTimeMarker:function(t){var i=this.options;if(this.datesHeader.find(".k-current-time").remove(),this.times.find(".k-current-time").remove(),this.content.find(".k-current-time").remove(),this._isInDateSlot({start:t,end:t})){if(!1===i.currentTimeMarker.useLocalTimezone){var r=i.dataSource.options.schema.timezone;if(i.dataSource&&r){var o=n.timezone.offset(t,r);t=n.timezone.convert(t,t.getTimezoneOffset(),o)}}for(var s=i.group&&"vertical"!=i.group.orientation?this.groups.length:1,l=0;l=85?(e+=o[0].scrollWidth-o[0].offsetWidth,e+=o[0].scrollLeft):s.msie?(e-=n.scrollLeft(o),e+=o[0].scrollWidth-o[0].offsetWidth):s.webkit&&(e+=o[0].scrollLeft)}else e+=o[0].scrollLeft;for(t+=o[0].scrollTop,e=Math.ceil(e),t=Math.ceil(t),r=0;rl&&(l+=h),a=(l-s)/f),a=i?1:Math.round(a),o&&(a*=o);g",s+=t._groupedView._addContent(e,a,r,o,n,i,c,d),s+="",this.content.find("table").append(s)},_groups:function(){var e=this._groupCount(),t=this._dates,i=t.length;this.groups=[];for(var o=0;ot?n=t:n1?this._eventsByResource(u,i.slice(1),r,d):r.push(u)}}else r.push(e)},_isInDateSlot:function(e){var t=e.start,i=e.end,r=d(this._startDate);return t=l&&(c=d(t),r(c,s),m=!0),a>l&&a<=s&&(p=d(i),r(p,l),f=!0)):(s>o?(c=d(t),r(c,s),m=!0):l<=o&&(c=d(t),c=n.date.addDays(c,1),r(c,s),m=!0),la&&(p=d(i),p=n.date.addDays(p,-1),r(p,l),f=!0)),{occurrence:e.clone({start:c||t,end:p||i,_startTime:c?n.date.toUtcTime(c):e._startTime,_endTime:p?n.date.toUtcTime(p):e._endTime,isAllDay:!1}),head:f,tail:m}},_renderEvents:function(e,t,n){var i,r,o;for(r=0,o=e.length;r=h,s=this.content;if(a||this._isInTimeSlot(i)){var l=this._adjustEvent(i),c=this.groups[t];if(c._continuousEvents||(c._continuousEvents=[]),this._isInTimeSlot(l.occurrence)){var d=c.slotRanges(l.occurrence,!1)[0],u=d.start.index,p=d.end.index;this._groupedView._renderEvent(n,i,l,c,d,s,u,p)}}}},addContinuousEvent:function(e,t,i,r){e._continuousEvents.push({element:i,isAllDay:r,uid:i.attr(n.attr("uid")),start:t.start,end:t.end})},_createEventElement:function(t,i,r,o){var a=this.eventTemplate,s=this.options.editable,c=this._isMobile(),d=s&&!1!==s.destroy&&!c,u=s&&!1!==s.resize,h=i._time("start"),p=i._time("end"),f=i.start,m=i.end,g=this.eventResources(i);i._startTime&&h!==n.date.getMilliseconds(i.start)&&(f=new Date(h),f=n.timezone.apply(f,"Etc/UTC")),i._endTime&&p!==n.date.getMilliseconds(i.end)&&(m=new Date(p),m=n.timezone.apply(m,"Etc/UTC"));var v=l({},{ns:n.ns,resizable:u,showDelete:d,head:r,tail:o,singleDay:1==this._dates.length,resources:g,inverseColor:!1,messages:this.options.messages,ariaLabel:this._formatEventAriaLabel(i.title,f,m,i.isAllDay),template:this.options.eventTemplate},i,{start:f,end:m}),_=e(a(v));return n.applyStylesFromKendoAttributes(_,["background-color","border-color"]),this.angular("compile",(function(){return{elements:_,data:[{dataItem:v}]}})),_},_arrangeRows:function(e,t,n){var i=t.start.index,r=t.end.index,a=e.slotRange.innerRect(e.start,e.end,!1),s=a.right+this.options.eventMinWidth,l=o.collidingEvents(t.events(),a.left,s);t.addEvent({slotIndex:i,slotIndexEnd:r,start:a.left,end:s,zeroWidthEventOffset:this._zeroWidthEventOffset,rectLeft:a.left,rectRight:s,element:e.element,uid:e.uid}),l.push({slotIndex:i,slotIndexEnd:r,start:a.left,end:s,zeroWidthEventOffset:this._zeroWidthEventOffset,uid:e.uid});var c=o.createRows(l);n.maxRowCount=h||this._isInTimeSlot(r)))for(var a=this._adjustEvent(r),s=i.slotRanges(a.occurrence,!1),l=0;l=this.groups.length-1))return this._groupedView._nextGroupSlot(r,i,n)},_verticalSlots:function(e,t,n,i){var r=this._groupedView,o=r._verticalMethod(i,n),a=t[0].start,s=t[t.length-1].end,l=this.groups[e.groupIndex],c=r._normalizeVerticalSelection(e,t,i,n);return c&&(a=s=c),a=l[o](a),s=l[o](s),n||!this._isVerticallyGrouped()||a&&s||(a=s=r._verticalSlots(e,i,c)),{startSlot:a,endSlot:s}},_horizontalSlots:function(e,t,n,i){var r=i?"upSlot":"downSlot",o=t[0].start,a=t[t.length-1].end,s=this.groups[e.groupIndex],l={};return n?(l.startSlot=s[r](o),l.endSlot=s[r](a),n||!this._isHorizontallyGrouped()||o&&a||(l.startSlot=l.endSlot=this._changeGroup(e,i))):l=this._groupedView._horizontalSlots(e,s,r,o,a,n,i),l},_changeViewPeriod:function(e,t){var n,i,o=t?this.previousDate():this.nextDate(),a=e.start,s=e.end;if(n=new Date(o),i=new Date(o),this._isInRange(n,i))return!1;e.start=n,e.end=i,this._isHorizontallyGrouped()&&(e.groupIndex=t?this.groups.length-1:0);var l=s-a;return t?(s=0===(s=u(this.endTime()))?h:s,r(e.start,s-l),r(e.end,s)):(a=u(this.startTime()),r(e.start,a),r(e.end,a+l)),e.events=[],!0},move:function(e,t,i){var r,o,a,s,l=!1,c=this.groups[e.groupIndex],d=n.keys,u=this._groupedView,h=c.ranges(e.start,e.end,!1,!1);if(t===d.DOWN||t===d.UP){if(l=!0,a=t===d.UP,u._updateDirection(e,h,i,a),s=this._verticalSlots(e,h,i,a),u._changeVerticalViewPeriod(s,i,e,a))return l}else if((t===d.LEFT||t===d.RIGHT)&&(l=!0,a=t===d.LEFT,this._updateDirection(e,h,i,a,!1),s=this._horizontalSlots(e,h,i,a),u._changeHorizontalViewPeriod(s,i,e,a)))return l;if(l){if(r=s.startSlot,o=s.endSlot,i){var p=e.backward;p&&r?e.start=r.startDate():!p&&o&&(e.end=o.endDate())}else r&&o&&(e.start=r.startDate(),e.end=o.endDate());e.events=[]}return l},destroy:function(){var e=this;e.element&&e.element.off(g),e._currentTimeUpdateTimer&&clearInterval(e._currentTimeUpdateTimer),o.fn.destroy.call(this),this._isMobile()&&e.options.editable&&(!1!==e.options.editable.create&&e._addUserEvents.destroy(),!1!==e.options.editable.update&&e._editUserEvents.destroy())},_resourceBySlot:function(e){var t=this.groupedResources,n={},i=this.options.group;if(t.length&&"horizontal"===i.orientation&&i.date){var r,a,s,l,c=e.groupIndex,d=this.columnLevels,u=d[d.length-1],h=t[t.length-1],p=u[c];for(this._setResourceValue(p,h,n),s=d.length-2;s>=3;s--)for(u=d[s],h=t[s-3],r=0,l=0;lc-r?(this._setResourceValue(p,h,n),l=u.length):r+=a;return n}return o.fn._resourceBySlot.call(this,e)}});l(!0,i,{TimelineView:C,TimelineWeekView:C.extend({options:{name:"TimelineWeekView",title:"Timeline Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",selectedMobileDateFormat:"{0:MMM dd} - {1:dd}",majorTick:120},name:"timelineWeek",calculateDateRange:function(){var e,t=this.options.date,i=n.date.dayOfWeek(t,this.calendarInfo().firstDay,-1),r=[];for(e=0,7;e<7;e++)r.push(i),i=n.date.nextDay(i);this._render(r)}}),TimelineWorkWeekView:C.extend({options:{name:"TimelineWorkWeekView",title:"Timeline Work Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",selectedMobileDateFormat:"{0:MMM dd} - {1:dd}",majorTick:120},name:"timelineWorkWeek",nextDate:function(){var e=n.date.dayOfWeek(n.date.nextDay(this.endDate()),this.calendarInfo().firstDay,1);return n.date.addDays(e,this._workDays[0])},previousDate:function(){var e=n.date.dayOfWeek(this.startDate(),this.calendarInfo().firstDay,-1),t=this._workDays;return n.date.addDays(e,t[t.length-1]-7)},calculateDateRange:function(){var e=this.options,t=e.date,i=n.date.dayOfWeek,r=i(t,this.calendarInfo().firstDay,-1),o=i(r,e.workWeekStart,1),a=i(o,e.workWeekEnd,1),s=[],l=e.workDays&&e.workDays.length?e.workDays.map((function(e){return i(r,e,1).getTime()})):null;for(l&&(a=i(o=r,this.calendarInfo().firstDay+6,1));o<=a;)l&&l.indexOf(o.getTime())>-1?s.push(o):l||s.push(o),o=n.date.nextDay(o);this._render(s)}}),TimelineMonthView:C.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(){var e,t,i=this.options.date,r=n.date.firstDayOfMonth(i),o=[];for(e=0,t=n.date.lastDayOfMonth(i).getDate();e"+r+"",{icon:o,fillMode:a,themeColor:s})},G=n.template((function(e){var t=e.label,n=e.views;return'"})),K={pdf:{name:"pdf",type:"button",icon:"file-pdf",attributes:{class:"k-pdf"}},pdfMobile:{name:"pdf",type:"button",icon:"file-pdf",showText:"overflow",attributes:{class:"k-pdf"}},today:{name:"today",type:"button",attributes:{class:"k-nav-today"}},previous:{name:"previous",type:"button",icon:"caret-alt-left",showText:"overflow",attributes:{class:"k-nav-prev"}},next:{name:"next",type:"button",icon:"caret-alt-right",showText:"overflow",attributes:{class:"k-nav-next"}},current:{name:"current",type:"button",icon:"calendar",fillMode:"flat",text:"placeholder",attributes:{"aria-live":"polite",class:"k-nav-current"}},search:{template:''+n.ui.icon("search")+""},refresh:{name:"refresh",type:"button",icon:"arrow-rotate-cw",showText:"overflow",attributes:{class:"k-scheduler-refresh"}},create:{name:"create",type:"button",icon:"plus",attributes:{class:"k-create-event"}},calendar:{name:"calendar",type:"button",icon:"calendar",attributes:{class:"k-nav-calendar"}},previousMobile:{name:"previous",type:"button",icon:"chevron-left",showText:"overflow",attributes:{class:"k-nav-prev"}},nextMobile:{name:"next",type:"button",icon:"chevron-right",showText:"overflow",attributes:{class:"k-nav-next"}},currentMobile:{template:''},view:{name:"view",type:"button",togglable:!0,group:"views"}},Y=[["today","previous","next"],"current",{type:"spacer"}],$=[["calendar"],{type:"spacer"}],Q=["previousMobile",{type:"spacer"},"currentMobile",{type:"spacer"},"nextMobile"];function X(e,t){return t=t||"",e.startTimezone&&(t=e.startTimezone,e.endTimezone&&(t+=" | "+e.endTimezone)),t}function Z(e,t){var i=t.timezone;i&&(e[n.attr("timezone")]=i)}function J(e,t){var i=t.model.fields[t.field].validation;if(i){var r=i.validDateValidator;r&&v(r)&&r.message&&(e[n.attr("validDate-msg")]=r.message)}}function ee(e,t){var i=t.model.fields[t.field].validation;if(i){var r=i.dateCompare;r&&v(r)&&r.message&&(e[n.attr("dateCompare-msg")]=r.message)}}function te(e,t,i,r){var o,a,s,l,c;for(a=0,s=(e=e||[]).length;a=n.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=e.extend(t,{recurrenceException:null,recurrenceRule:null,recurrenceId:this.id||this.recurrenceId}))[this.idField]=this.defaults[this.idField],this.clone(t,!0)},toJSON:function(){var e=n.data.Model.fn.toJSON.call(this);return e.uid=this.uid,delete e._startTime,delete e._endTime,e},shouldSerialize:function(e){return n.data.Model.fn.shouldSerialize.call(this,e)&&"_defaultId"!==e},set:function(e,t){var i=this.isAllDay||!1;if(n.data.Model.fn.set.call(this,e,t),"isAllDay"==e&&t!=i){var o=n.date.getDate(this.start),a=new Date(this.end),s=n.date.getMilliseconds(a);0===s&&t&&(s=r),this.set("start",o),!0===t?(n.date.setTime(a,-s),a').attr(n).appendTo(t).wrap('')}}function de(t,i){var r,o,a=(t.fields||t)[i],s=["url","email","number","date","boolean"],l=a?a.validation:{},c=n.attr("type"),d=e.inArray,u={};for(r in l)o=l[r],d(r,s)>=0?u[c]=r:n.isFunction(o)||(u[r]=v(o)?o.value||r:o),u[n.attr(r+"-msg")]=o.message;return u}function ue(e,n,i,r){var o,a=e.value(),s=Array.isArray(a);o=s?JSON.parse(JSON.stringify(a)):[a.toString()],e.dataSource.data().forEach((function(a){if(null===a[i]||a[i]===t||a[i]==n)a.set(P,!1);else{var l=a.get(r);a.set(P,!0),(o.indexOf(l)>=0||o.indexOf(l.toString())>=0)&&(s?o.splice(o.indexOf(l),1):(e.value(null),e.trigger(I)))}})),s&&o.length=0&&(l?o.splice(o.indexOf(u),1):(i.val(null),i.trigger(I)))}})),l&&o.length").attr(r).appendTo(t),e('").attr(r).appendTo(t),e("').hide().appendTo(t)},timezonePopUp:function(t,i){var r=X(i.model,i.messages.noTimezone);e('').text(r).appendTo(t),e(n.ui.icon("arrow-chevron-right")).appendTo(t),t.closest("li.k-item label").on(k,i.click)},timezone:function(t,i){e('
              ').attr({name:i.field}).appendTo(t).kendoMobileTimezoneEditor({optionLabel:i.noTimezone})},recurrence:function(t,i){e("
              ').attr({name:i.field}).appendTo(t).kendoMobileRecurrenceEditor({start:i.model.start,timezone:i.timezone,messages:i.messages,pane:i.pane,value:i.model[i.field]})},description:ce,multipleResources:function(t,i,r){var o=de(i,t.field);return function(a){for(var s="",l=t.dataSource.view(),c=0,d=l.length;c{1}',n.getter(t.dataValueField)(l[c]),n.getter(t.dataTextField)(l[c]));var u=e(n.format('',n.ns,t.field,s)).appendTo(a).attr(o);r&&setTimeout((function(){var e=a.closest(".k-stretched-view").find("[data-"+n.ns+"bind='value:"+r+"']"),o=i[r];pe(t,u,o),e.on(I,(function(e){var n=e.target.value;pe(t,u,n)}))}))}},resources:function(t,i,r){var o=de(i,t.field);return function(a){for(var s="",l=t.dataSource.view(),c=0,d=l.length;c{1}',n.getter(t.dataValueField)(l[c]),n.getter(t.dataTextField)(l[c]));var u=e(n.format('',n.ns,t.field,s)).appendTo(a).attr(o);r&&setTimeout((function(){var e=a.closest(".k-stretched-view").find("[data-"+n.ns+"bind='value:"+r+"']"),o=i[r];pe(t,u,o),e.on(I,(function(e){var n=e.target.value;pe(t,u,n)}))}))}},isAllDay:function(t,i){e('').appendTo(t)}},desktop:{dateRange:function(t,i){var r={name:i.field,title:i.title},o=i.model.isAllDay,a=n.attr("validate")+"='"+!o+"' ",s=n.attr("validate")+"='"+!!o+"' ";Z(r,i),J(r,i),ee(r,i),e('").attr(r).appendTo(t),e('").attr(r).appendTo(t),e("').appendTo(t),"end"===i.field&&e("').appendTo(t),e("').hide().appendTo(t)},timezonePopUp:function(t,n){e(''+n.messages.timezoneEditorButton+"").on(k,n.click).appendTo(t)},timezone:function(i,r){var o=r.visible||r.visible===t;e("
              ').attr({name:r.field}).toggle(o).appendTo(i).kendoTimezoneEditor({optionLabel:r.noTimezone,title:r.title})},recurrence:function(t,i){e("
              ').attr({name:i.field}).appendTo(t).kendoRecurrenceEditor({start:i.model.start,timezone:i.timezone,messages:i.messages})},description:ce,multipleResources:function(t,i,r){var o=de(i,t.field);return function(a){var s;r&&setTimeout((function(){ue(s,i[r],t.dataParentValueField,t.dataValueField),he(a,s,t,r)})),s=e(n.format('',n.ns,t.field)).appendTo(a).attr(o).kendoDropDownList({dataTextField:t.dataTextField,dataValueField:t.dataValueField,dataSource:t.dataSource.data(),valuePrimitive:t.valuePrimitive,optionLabel:"None",template:function(e){return"'+e[t.dataTextField]+""},select:function(e){e.dataItem&&e.dataItem.disabled&&e.preventDefault()},dataBound:function(t){t.sender.list.find("li").each((function(t,n){var i=e(n);i.find("[data-disabled]").length>0&&i.addClass("k-disabled")}))}}).data("kendoDropDownList")}},isAllDay:function(t,i){e('').attr({id:i.field,name:i.field,title:i.title?i.title:i.field}).appendTo(t)}}},ge=n.Observable.extend({init:function(e,t){n.Observable.fn.init.call(this),this.element=e,this.options=_(!0,{},this.options,t),this.createButton=this.options.createButton,this.toggleDateValidationHandler=this._toggleDateValidation.bind(this)},_toggleDateValidation:function(t){if("isAllDay"==t.field){var i,r,o,a=this.container,s=this.editable.options.model.isAllDay,l=n.attr("bind");a.find("["+l+"*=end],["+l+"*=start]").each((function(){i=e(this),L.test(i.attr(l))&&(r=i.is("["+n.attr("role")+"=datetimepicker],[type*=datetime]"),o=s!==r,i.attr(n.attr("validate"),o))}))}},fields:function(e,t){var i=this,r=i.options.messages,o=i.options.timezone,a=[{field:"title",title:r.editor.title},{field:"start",title:r.editor.start,editor:e.dateRange,timezone:o},{field:"end",title:r.editor.end,editor:e.dateRange,timezone:o},{field:"isAllDay",title:r.editor.allDayEvent,editor:e.isAllDay}],s=function(e){return!!e[u.dataParentValueField]};n.timezone.windows_zones&&(a.push({field:"timezone",title:r.editor.timezone,editor:e.timezonePopUp,click:function(e){e.preventDefault(),i._initTimezoneEditor(t,this)},messages:r.editor,model:t}),a.push({field:"startTimezone",title:r.editor.startTimezone,editor:e.timezone,noTimezone:r.editor.noTimezone}),a.push({field:"endTimezone",title:r.editor.endTimezone,editor:e.timezone,noTimezone:r.editor.noTimezone})),t.recurrenceId||a.push({field:"recurrenceRule",title:r.editor.repeat,editor:e.recurrence,timezone:o,messages:r.recurrenceEditor,pane:this.pane}),"description"in t&&a.push({field:"description",title:r.editor.description,editor:e.description({model:t,field:"description"})});for(var l=0;l
              '+n.html.renderCheckBox(e(''),{label:a.editor.separateTimezones})+"
              ",l=function(e){return!t.editable||t.editable(e)?"
              ':'
              '+(e&&n.getter(e)(t)||"")+"
              "};return'
              '+i.map((function(e){var n=e.field,i=e.title,a=t.fields[n];return(!t.editable||t.editable(n))&&r.push(e),("startTimezone"===n?s:"")+(a&&"boolean"===a.type?'
              '+l(n)+"
              ":'
              "+l(n)+"
              ")+("endTimezone"===n?o._createEndTimezoneButton():"")})).join("")+"
              "},_buildMobileEditTemplate:function(e,t,i){var r=this.options.messages,o='
              • ';return'
                  '+t.map((function(t){var r=t.field;return(!e.editable||e.editable(r))&&i.push(t),("timezone"===r||"recurrenceRule"===r?'
                  ':"")+("startTimezone"===r?o:"")+function(t){var i=t.field,r=t.title;return'
                • '+(!e.editable||e.editable(i)?("timezone"===i?'
                • "}(t)+("recurrenceRule"===r?'
                  ':"")+("endTimezone"===r?"
              ":"")})).join("")+"
            "},_buildEditTemplate:function(e,t,i,r){var o=_({},n.Template,this.options.templateSettings),a=this.options.editable.template,s="";return a?(typeof a===p&&(a=n.unescape(a)),s+=n.template(a,o)(e)):s+=r?'
            '+this._buildMobileEditTemplate(e,t,i)+"
            ":this._buildDesktopEditTemplate(e,t,i),s},_createEndTimezoneButton:function(){return"
            "},_revertTimezones:function(e){e.set("startTimezone",this._startTimezone),e.set("endTimezone",this._endTimezone),delete this._startTimezone,delete this._endTimezone}}),ve=ge.extend({init:function(){ge.fn.init.apply(this,arguments),this.pane=n.Pane.wrap(this.element,{viewEngine:{viewOptions:{renderOnInit:!0,wrap:!1,wrapInSections:!0,detachOnHide:!1,detachOnDestroy:!1}}}),this.pane.element.parent().css("height",this.options.height),this.view=this.pane.view()},options:{animations:{left:"slide",right:"slide:right"}},destroy:function(){this.close(),this.unbind(),this.pane.destroy()},_initTimezoneEditor:function(t){var i=this,r=i.pane,o=i.options.messages,a=i.timezoneView,s=a?a.content.find(".k-scheduler-timezones"):i.container.find(".k-scheduler-timezones"),c=s.find("input.k-timezone-toggle").data("kendoSwitch"),d=s.find("li.k-item:not(.k-zonepicker)").last();if(i._startTimezone=t.startTimezone||"",i._endTimezone=t.endTimezone||"",!a){var u='
            ';this.timezoneView=a=r.append(u),a.contentElement.append(s.show()),a.element.on(k+y,".k-scheduler-cancel, .k-scheduler-update",(function(n){n.preventDefault(),n.stopPropagation(),e(this).hasClass("k-scheduler-cancel")&&i._revertTimezones(t);var a=i._editPane,s=X(t,o.editor.noTimezone);a.content.find(".k-timezone-label").text(s),r.navigate(a,i.options.animations.right)})),c.bind(I,(function(e){d.toggle(e.checked),t.set("endTimezone","")})),t.bind(I,(function(e){if("startTimezone"===e.field){var n=t.startTimezone;c.enable(n),n||(d.hide(),t.set("endTimezone",""),c.value(!1))}}))}c.value(!!t.endTimezone),c.enable(!!t.startTimezone),t.endTimezone?d.show():d.hide(),r.navigate(a,i.options.animations.left)},showDialog:function(t){var n=t.buttons.map((function(e){return{text:e.text,action:e.click}}));n.push({text:this.options.messages.cancel,primary:!0}),e("
            ").appendTo(document.body).kendoDialog({close:function(){this.destroy()},modal:{preventScroll:!0},closable:!1,title:!1,content:t.text,actions:n})},editEvent:function(t){var i=this.pane,r="",o=this.options.messages,a=o.save,s=o.destroy,c=o.cancel,d=o.editor.editorTitle,u=o.resetSeries;r+='
            ";var h=this.fields(me.mobile,t),p=this,f=[];r+=this._buildEditTemplate(t,h,f,!0),r+="
            ";var m=i.append(r);if(!t.isNew()&&this.options.editable&&!1!==this.options.editable.destroy&&t.isRecurrenceHead()&&t.recurrenceException){var g='
            • '+u+"
            ";m.contentElement.append(g)}if(!t.isNew()&&this.options.editable&&!1!==this.options.editable.destroy){var v='
            • '+s+"
            ";m.contentElement.append(v)}this._editPane=m;var _=this.container=m.element;return this.editable=_.kendoEditable({fields:f,model:t,clearContainer:!1,target:p.options.target,validateOnBlur:!0}).data("kendoEditable"),this.trigger("edit",{container:_,model:t})?this.trigger("cancel",{container:_,model:t}):(_.on(k+y,"a.k-scheduler-edit, a.k-scheduler-cancel, a.k-scheduler-update, span.k-scheduler-delete, span.k-scheduler-resetSeries",(function(n){n.preventDefault(),n.stopPropagation();var r=e(this);if(r.hasClass("k-scheduler-edit"))i.navigate(this._editPane,p.options.animations.right);else{var o="cancel";r.hasClass("k-scheduler-update")?o="save":r.hasClass("k-scheduler-delete")?o="remove":r.hasClass("k-scheduler-resetSeries")&&(o=H),p.trigger(o,{container:_,model:t})}})),i.navigate(m,p.options.animations.left),t.bind(I,p.toggleDateValidationHandler)),this.editable},_views:function(){return this.pane.element.find(n.roleSelector("view")).not(this.view.element)},close:function(){if(this.container){this.pane.navigate("",this.options.animations.right);for(var e,t=this._views(),n=0,i=t.length;n
            ',c=a.options.messages,d=c.save,u=c.cancel,h=c.destroy,p=c.resetSeries,f=this.fields(me.desktop,t),m=[];l+=this._buildEditTemplate(t,f,m,!1);var g=v(s)?s.window:{};l+='
            ',l+=this.createButton({name:"update",text:d,attr:o,icon:"save"})+this.createButton({name:"canceledit",text:u,attr:o,icon:"cancel-outline"}),!t.isNew()&&!1!==s.destroy&&t.isRecurrenceHead()&&t.recurrenceException&&(l+=this.createButton({name:"resetSeries",text:p,attr:o})),t.isNew()&&!t.isRecurring()||!1===s.destroy||(l+=''+this.createButton({name:"delete",text:h,attr:o,icon:"trash",fillMode:"flat",themeColor:"primary"})),i=e(l+="
            "),n.applyStylesFromKendoAttributes(i,["display"]);var b=this.container=i.appendTo(a.element).eq(0).kendoWindow(_({modal:!0,resizable:!1,draggable:!0,title:c.editor.editorTitle,visible:!1,close:function(e){e.userTriggered&&a.trigger(E,{container:b,model:t})&&e.preventDefault()}},g));for(var w in a.editable=b.kendoEditable({fields:m,model:t,clearContainer:!1,validateOnBlur:!0,target:a.options.target}).data("kendoEditable"),m)"recurrenceRule"!==m[w].field&&(r=m[w].field,b.find("[name='"+r+"']").attr("aria-labelledby",r+"_label")),"isAllDay"===m[w].field&&b.find("label[for='"+r+"']").attr("id",r+"_label");return a.trigger(F,{container:b,model:t})?a.trigger(E,{container:b,model:t}):(s.window&&s.window.position?b.data("kendoWindow").open():b.data("kendoWindow").center().open(),b.on(k+y,"button.k-scheduler-cancel",(function(e){e.preventDefault(),e.stopPropagation(),a.trigger(E,{container:b,model:t})})),b.on(k+y,"button.k-scheduler-update",(function(e){e.preventDefault(),e.stopPropagation(),a.trigger("save",{container:b,model:t})})),b.on(k+y,"button.k-scheduler-delete",(function(e){e.preventDefault(),e.stopPropagation(),a.trigger(A,{container:b,model:t})})),b.on(k+y,"button.k-scheduler-resetSeries",(function(e){e.preventDefault(),e.stopPropagation(),a.trigger(H,{container:b,model:t})})),n.cycleForm(b),t.bind(I,a.toggleDateValidationHandler)),a.editable},close:function(){var e=this,t=function(){e.editable&&(e.editable.options.model.unbind(I,e.toggleDateValidationHandler),e.editable.destroy(),e.editable=null,e.container=null),e.popup&&(e.popup.destroy(),e.popup=null)};e.editable?(e._timezonePopup&&e._timezonePopup.data("kendoWindow")&&(e._timezonePopup.data("kendoWindow").destroy(),e._timezonePopup=null),e.container.is(":visible")?e.container.data("kendoWindow").bind("deactivate",t).close():t()):t()},_createEndTimezoneButton:function(){var e=this.options.messages,t="";return t+='
            ',t+=this.createButton({name:"savetimezone",icon:"save",themeColor:"primary",text:e.save})+this.createButton({name:"canceltimezone",icon:"cancel-outline",text:e.cancel}),t+="
            "},showDialog:function(t){var i=n.format("

            {0}

            ",t.text);i+='
            ';for(var r=0;r
            ";var o=this.element;this.popup&&this.popup.destroy();var a=this.popup=e(i).appendTo(o).eq(0).on(k,".k-button",(function(n){n.preventDefault(),a.close();var i=e(n.currentTarget).index();t.buttons[i].click()})).kendoWindow({modal:!0,resizable:!1,draggable:!1,title:t.title,visible:!1,close:function(){this.destroy(),o.trigger("focus")}}).getKendoWindow();a.center().open()},_initTimezoneEditor:function(e,t){var n,i=this,r=i.container.find(".k-scheduler-timezones"),o=r.find("input.k-timezone-toggle"),a=r.find(".k-form-field").last(),s=r.find(".k-scheduler-savetimezone"),l=r.find(".k-scheduler-canceltimezone"),c=i._timezonePopup,d=function(t){if("startTimezone"===t.field){var n=e.startTimezone;o.prop(P,!n),n||(a.hide(),e.set("endTimezone",""),o.prop("checked",!1))}};i._startTimezone=e.startTimezone,i._endTimezone=e.endTimezone,c||(i._timezonePopup=c=r.kendoWindow({modal:!0,resizable:!1,draggable:!0,title:i.options.messages.editor.timezoneEditorTitle,visible:!1,close:function(n){e.unbind(I,d),n.userTriggered&&i._revertTimezones(e),t&&t.focus()}}),o.on(k,(function(){a.toggle(o.prop("checked")),e.set("endTimezone","")})),s.on(k,(function(e){e.preventDefault(),n.close()})),l.on(k,(function(t){t.preventDefault(),i._revertTimezones(e),n.close()})),e.bind(I,d)),o.prop("checked",e.endTimezone).prop(P,!e.startTimezone),e.endTimezone?a.show():a.hide(),(n=c.data("kendoWindow")).center().open()}}),be=h.extend({init:function(t,i){var r=this;u.fn.init.call(r,t,i),r.options.views&&r.options.views.length||(r.options.views=["day","week"]),r.resources=[],r._initModel(),r._wrapper(),r.options.selectable&&r._tabindex(),r._views(),r._toolbar(),r._dataSource(),r._resources(),r._resizeHandler=function(){r.resize()},r.wrapper.on(x+y+" selectstart"+y,(function(t){var n=e(t.target);n.is(":kendoFocusable")||0!==n.closest(".k-button").length||t.preventDefault()})),r.options.editable&&!1!==r.options.editable.resize&&r._resizable(),r._movable(),r._bindResize(),r.options.messages&&r.options.messages.recurrence&&(s.options=r.options.messages.recurrence),r._navigation(),r._selectable(),r._touchHandlers(),r._ariaId=n.guid(),r._createEditor(),r.mediaQueryList=window.matchMedia(V),r.mediaQueryList.addEventListener("change",r._onMediaChange.bind(r))},_onMediaChange:function(e){var t=this,n=t._selectedView,i=t.toolbar,r=i.getKendoToolBar();e.matches?(r.hide(i.find(".k-views-dropdown")),r.show(i.find(".k-views-dropdown").parent().next(".k-button-group"))):(r.show(i.find(".k-views-dropdown")),r.hide(i.find(".k-views-dropdown").parent().next(".k-button-group"))),t._model.set("formattedDate",e.matches?n.dateForTitle():n.shortDateForTitle())},_bindResize:function(){e(window).on("resize"+y,this._resizeHandler)},_unbindResize:function(){e(window).off("resize"+y,this._resizeHandler)},dataItems:function(){var n,i,r=this.items(),o=this._data,a=e.map(r,(function(t){return e(t).attr("data-uid")})),s={},l=a.length;for(n=0;n10&&u.animate({scrollTop:u[0].scrollTop+h}),s.off(S+y,".k-scheduler-header-all-day td, .k-scheduler-content td",l))}}))},_navigation:function(){var e=this,t=e.wrapper;t.on("focus"+y,(function(){var n=e._selection;setTimeout((function(){e._preventFocus?e._preventFocus=!1:(n&&!(n.events.length>0&&0===t.find("[data-uid='"+n.events[0]+"']").length)||e._userTouched||e._mouseDown?e._mouseDown=!1:e._initialFocus(),e._select())}),300)})),t.on("focusout"+y,(function(){e._ctrlKey=e._shiftKey=!1})),t.on("keydown"+y,e._keydown.bind(e)),t.on("keyup"+y,(function(t){e._ctrlKey=t.ctrlKey,e._shiftKey=t.shiftKey}))},_selectable:function(){var e=this,t=e.wrapper;if(e.options.selectable){t.on(x+y,".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event, .k-scheduler-body td .k-link",(function(t){e._isTouch(t)||e._mouseDownSelection(t)}));var n=e._mouseMove.bind(e);t.on(x+y,".k-scheduler-header-all-day td, .k-scheduler-content td",(function(i){var r=i.which,o=i.button,a=r&&3===r||o&&2==o;e._isTouch(i)||a||t.on(D+y,".k-scheduler-header-all-day td, .k-scheduler-content td",n)})),t.on("mouseup"+y+" mousecancel"+y,(function(){t.off(D+y,".k-scheduler-header-all-day td, .k-scheduler-content td",n)}))}},_mouseDownSelection:function(t){var i=t.which,r=t.button;i&&3===i||r&&2==r||(t.ctrlKey&&(this._ctrlKey=t.ctrlKey),t.shiftKey&&(this._shiftKey=t.shiftKey),this._mouseDown=!0,this._createSelection(t.currentTarget),e(t.currentTarget).hasClass("k-event")&&(this._selection.eventElement=t.currentTarget)),"year"!==this.view().name&&n._activeElement()!==this.wrapper.get(0)?n.focusElement(this.wrapper):this._select(),this.toolbar&&this.toolbar.find(".k-focus").removeClass(B)},_selectFirstSlot:function(){var e,t=this.wrapper.find(".k-scheduler-header-all-day").find("td").first(),n=this.wrapper.find(".k-scheduler-content").find("td").first();e=t.length>0?t:n.length>0?n:this.wrapper.find(".k-scheduler-body").find(".k-link").first(),this._createSelection(e)},_firstEvent:function(){var e,t,n,i=this.wrapper.find(".k-scheduler-header-wrap .k-event, .k-task").first(),r=this.wrapper.find(".k-scheduler-content .k-event").first();return i.length>0?r.length>0?(t=this.occurrenceByUid(i.data("uid")),n=this.occurrenceByUid(r.data("uid")),e=t.start<=n.start?i:r):e=i:r&&(e=r),e},_initialFocus:function(){var e=this._firstEvent();this.options.selectable?e&&e.length>0?(this._createSelection(e),this._selection.eventElement=e[0]):this._selectFirstSlot():this.toolbar&&0===this.toolbar.find(".k-focus").length?this._focusToolbar():this.toolbar&&this.toolbar.find(".k-focus").removeClass(B)},_select:function(){var t=this,n=t.view(),i=t.wrapper,r=n.current(),o=t._selection,a=t._old?t._old.selection:null,s=t._old?t._old.eventsLength:null;if(o&&(r&&(r.removeAttribute("id"),i.removeAttr("aria-activedescendant")),n.select(o),t._selection.eventElement=null,(r=n.current())&&(r.setAttribute("id",t._ariaId),i.attr("aria-activedescendant",t._ariaId),a!==r||o.events&&s!==o.events.length))){var l=e(r).data("uid");if(t._old&&l&&l===e(t._old.selection).data("uid")&&o.events&&t._old.eventsLength===o.events.length)return;var c=t._selectedEvents(),d=n._selectedSlots;t._old={selection:r,eventsLength:c.length},t.trigger(I,{start:o.start,end:o.end,events:c,slots:d,resources:n._resourceBySlot(o)})}},_selectedEvents:function(){for(var e,t=this._selection.events,n=t.length,i=0,r=[];ii[0].clientHeight,o=i[0].scrollWidth>i[0].clientWidth,a=t._tapPosition(e,"Y"),s=t._tapPosition(e,"X"),l=i[0].scrollTop-Math.round(a-t._touchPosY),c=i[0].scrollLeft-Math.round(s-t._touchPosX),d=r&&Math.abs(a-t._touchPosY)>10,u=o&&Math.abs(a-t._touchPosY)>10;t._dragging||n.support.kineticScrollNeeded||!t._isTouch(e)||(d||u)&&(t._amplitude=Math.round(a-t._touchPosY),t._touchPosY=a,t._touchPosX=s,i.animate({scrollTop:l,scrollLeft:c},0),t.view()._scrolling=!0)},_mouseMove:function(t){var n=this;clearTimeout(n._moveTimer),n._isTouch(t)||(n._moveTimer=setTimeout((function(){var i=n.view(),r=n._selection;if(r){var o=i.selectionByElement(e(t.currentTarget));if(o&&r.groupIndex===o.groupIndex){var a=o.startDate(),s=o.endDate();a>=r.end?r.backward=!1:s<=r.start&&(r.backward=!0),r.backward?r.start=a:r.end=s,n._select()}}}),5))},_viewByIndex:function(e){var t,n=this.views;for(t in n){if(!e)return t;e--}},_keydownToolbar:function(e){var t=e.keyCode;return e.altKey&&t===c.DOWN&&this.toolbar.find(".k-nav-current").hasClass(B)?(this._showCalendar(),void e.preventDefault()):t===c.DOWN?("year"===this._selectedViewName?this.view().calendar.focus():document.activeElement!==this.element[0]&&this.element.focus(),void e.preventDefault()):void 0},_keydownView:function(e){var t,i,r,o=e.keyCode,a=16===o||18===o||17===o||91===o||92===o,s=this._selection,l=this.view(),d=l.options.editable,u=[c.LEFT,c.RIGHT,c.UP,c.DOWN],h=n.support.isRtl(this.element);a||s&&(o===c.ENTER?s.events.length&&d&&!1!==d.update&&this.editEvent(s.events[0]):o!==c.DELETE&&o!==c.BACKSPACE||!1===d||!1===d.destroy?u.indexOf(o)>-1?(t=o===c.UP||o===c.LEFT&&!h||o===c.RIGHT&&h,l.moveToEvent(s,t)&&(this._select(),document.activeElement!==this.element[0]&&this.element.focus(),e.preventDefault())):o!==c.HOME&&o!==c.END||(e.preventDefault(),i=this.view().content.eq(0),r=o===c.HOME?i.find(".k-scheduler-table td").first():i.find(".k-scheduler-table td").last(),this.view()._scrollTo(r[0],i[0])):this.removeEvent(s.events[0]))},_keydownShortcut:function(e){var t=new Date,r=this.options.timezone,o=this.view().options.editable;if(66===e&&this.view().toggleFullDay)this.view().toggleFullDay();else if(67===e&&o&&!1!==o.create)this.addEvent(_({},{start:this.date(),end:this.date()}));else if(84===e){if(r){var a=n.timezone.offset(t,r);i=n.timezone.convert(t,t.getTimezoneOffset(),a)}else i=t;this.trigger("navigate",{view:this._selectedViewName,action:"today",date:i})||this.date(i)}},_keydownYearView:function(e){var t=this.view(),n=this._selection,i=e.keyCode;i!==c.TAB&&(i===c.F10?(this._focusToolbar(),e.preventDefault()):(this.toolbar.find(".k-focus").removeClass(B),t.calendar.focus()),n&&this._adjustSelectedDate(),e.preventDefault())},_keydownAgendaView:function(e){var t,n,i=e.keyCode,r=this.view(),o=this._selection;r.move(o,i)?(e.preventDefault(),this.toolbar.find(".k-focus").removeClass(B),this._select()):i!==c.HOME&&i!==c.END||(e.preventDefault(),t=this.view().content.eq(0),n=i===c.HOME?t.find(".k-scheduler-table td").first():t.find(".k-scheduler-table td").last(),this.view()._scrollTo(n[0],t[0]))},_keydownChangeView:function(e){var t,n=e-49;-1===n&&(n=9),(t=this._viewByIndex(n))&&!this.trigger("navigate",{view:t,action:"changeView",date:this.date()})&&this.view(t)},_keydownChangeDate:function(e){var t=n.support.isRtl(this.element),r=t&&e===c.LEFT||!t&&e===c.RIGHT?"next":"previous";i="next"===r?this.view().nextDate():this.view().previousDate(),this.trigger("navigate",{view:this._selectedViewName,action:r,date:i})||(this.date(i),this._initialFocus(),this._select())},_keydown:function(t){var n=t.keyCode,i=e(t.target).closest(".k-toolbar").length>0,r=t.altKey;if(this._ctrlKey=t.ctrlKey,this._shiftKey=t.shiftKey,n===c.ESC&&this.popup&&this.popup.visible())return this.popup.close(),void t.preventDefault();if(n!==c.LEFT&&n!==c.RIGHT||!this._shiftKey)if(r&&n>=48&&n<=57)this._keydownChangeView(n);else if([66,67,84].indexOf(n)>-1)e(t.target).hasClass("k-scheduler-search-input")||this._keydownShortcut(n);else if(i)this._keydownToolbar(t);else{if("year"===this._selectedViewName)return void this._keydownYearView(t);if(n===c.F10)return this._focusToolbar(),void t.preventDefault();if("agenda"===this._selectedViewName)return void this._keydownAgendaView(t);this._keydownView(t)}else this._keydownChangeDate(n)},_focusToolbar:function(){this.toolbar.find("[tabindex=0]").first().trigger("focus").addClass(B)},_createSelection:function(t){var i,r,o=this._selection;(t=e(t)).is(".k-event")&&(i=t.attr(n.attr("uid")),o&&-1!==o.events.indexOf(i)&&!this._ctrlKey)||(o&&(this._ctrlKey||this._shiftKey)||(o=this._selection={events:[],groupIndex:0}),(r=this.view().selectionByElement(t))&&(o.groupIndex=r.groupIndex||0),i&&(r=ne(this._data,i)),r&&r.uid&&(i=[r.uid]),this._updateSelection(r,i),this._adjustSelectedDate())},_updateSelection:function(e,i,r){var o=this._selection;if(e&&o){var a=this.view();if(e.uid&&(e=a._updateEventForSelection(e)),this._shiftKey&&o.start&&o.end){var s=e.end-1?o.events.splice(l,1):o.events=o.events.concat(i||[])}else o.events=i||[]}},options:{name:"Scheduler",date:O,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,workWeekStart:1,workWeekEnd:5,workDays:null,showWorkHours:!1,startTime:O,endTime:O,currentTimeMarker:{updateInterval:1e4,useLocalTimezone:!0},ongoingEvents:{cssClass:"k-event-ongoing",enabled:!1,updateInterval:6e4,useLocalTimezone:!0},footer:{},messages:{today:"Today",pdf:"Export to PDF",save:"Save",cancel:"Cancel",destroy:"Delete",resetSeries:"Reset Series",deleteWindowTitle:"Delete event",next:"Next",previous:"Previous",refresh:"Refresh",selectView:"Select view",ariaSlotLabel:"Selected from {0:t} to {1:t}",ariaEventLabel:{on:"on",at:"at",to:"to",allDay:"(all day)",prefix:""},search:"Search...",views:{day:"Day",week:"Week",workWeek:"Work Week",agenda:"Agenda",month:"Month",timeline:"Timeline",timelineWeek:"Timeline Week",timelineWorkWeek:"Timeline Work Week",timelineMonth:"Timeline Month",year:"Year"},recurrenceMessages:{deleteWindowTitle:"Delete Recurring Item",resetSeriesWindowTitle:"Reset Series",deleteWindowOccurrence:"Delete current occurrence",deleteWindowSeries:"Delete the series",editWindowTitle:"Edit Recurring Item",editWindowOccurrence:"Edit current occurrence",editWindowSeries:"Edit the series"},editable:{confirmation:"Are you sure you want to delete this event?"},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:[A,F,E,R,"add","dataBinding","dataBound","moveStart","move","moveEnd","resizeStart","resize","resizeEnd","navigate",I],destroy:function(){var t=this;if(u.fn.destroy.call(t),t.dataSource&&(t.dataSource.unbind(I,t._refreshHandler),t.dataSource.unbind(z,t._progressHandler),t.dataSource.unbind(M,t._errorHandler)),t._resourceRefreshHandler)for(var i=0;i1;for(var _=0;_=u._timeSlotInterval()&&(i=o.isAllDay?a.startOffset(l.x.location,l.y.location,s.options.snap):a.endOffset(l.x.location,l.y.location,s.options.snap)):"north"==d?!a.isDaySlot&&n.date.toUtcTime(o.end)-a.start>=u._timeSlotInterval()&&(t=a.startOffset(l.x.location,l.y.location,s.options.snap)):"east"==d?a.isDaySlot&&n.date.toUtcTime(n.date.getDate(a.endDate()))>=n.date.toUtcTime(n.date.getDate(o.start))?i=o.isAllDay?a.startOffset(l.x.location,l.y.location,s.options.snap):a.endOffset(l.x.location,l.y.location,s.options.snap):!a.isDaySlot&&a.end-n.date.toUtcTime(o.start)>=u._timeSlotInterval()&&(i=a.endOffset(l.x.location,l.y.location,s.options.snap)):"west"==d&&(a.isDaySlot&&n.date.toUtcTime(n.date.getDate(o.end))>=n.date.toUtcTime(n.date.getDate(a.startDate()))||!a.isDaySlot&&n.date.toUtcTime(o.end)-a.start>=u._timeSlotInterval())&&(t=a.startOffset(l.x.location,l.y.location,s.options.snap)),s.trigger("resize",{event:r,slot:{element:a.element,start:a.startDate(),end:a.endDate()},start:n.timezone.toLocalDate(t),end:n.timezone.toLocalDate(i),resources:u._resourceBySlot(a)})?(t=p,i=f):u._updateResizeHint(o,a.groupIndex,t,i)}}},dragend:function(l){var d=e(l.currentTarget),u=new Date(o.start.getTime()),h=new Date(o.end.getTime()),p=c(d);s._dragging=!1,s.view()._removeResizeHint(),"south"==p?h=n.timezone.toLocalDate(i):"north"==p?u=n.timezone.toLocalDate(t):"east"==p?h=a.isDaySlot?n.date.getDate(n.timezone.toLocalDate(i)):n.timezone.toLocalDate(i):"west"==p&&(a.isDaySlot?((u=new Date(n.timezone.toLocalDate(t))).setHours(0),u.setMinutes(0)):u=n.timezone.toLocalDate(t)),!s.trigger("resizeEnd",{event:r,slot:{element:a.element,start:a.startDate(),end:a.endDate()},start:u,end:h,resources:s.view()._resourceBySlot(a)})&&h.getTime()>=u.getTime()&&(o.start.getTime()==u.getTime()&&o.end.getTime()==h.getTime()||(s.view()._updateEventForResize(r),s._updateEvent(p,r,{start:u,end:h}))),a=null,r=null},dragcancel:function(){s._dragging=!1,s.view()._removeResizeHint(),a=null,r=null}})},_updateEvent:function(e,t,i){var o=this,s=function(t,n){var a;try{o._preventRefresh=!0,t.update(i),o._convertDates(t),a=t.start,e&&t.duration()%r==0&&0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()&&t.set("isAllDay",!0)}finally{o._preventRefresh=!1}o.trigger(R,{event:t})||(n&&n(),o._isMultiDrag||o.dataSource.sync())},l=function(e){return e.recurrenceRule?o.dataSource.getByUid(e.uid):o.dataSource.get(e.recurrenceId)};if(t.recurrenceRule||t.isOccurrence()){var c=o.options.messages.recurrenceMessages;o._showRecurringDialog(t,(function(){var e,n=l(t),i=n.toOccurrence({start:t.start,end:t.end});e=i.uid,s(o.dataSource.add(i),(function(){o._convertDates(n),o._selection&&o._selection.events.push(e)}))}),(function(){var r=l(t);if("south"==e||"north"==e){if(i.start){var c=n.date.getDate(r.start);n.date.setTime(c,a(i.start)),i.start=c}if(i.end){var d=n.date.getDate(r.end);n.date.setTime(d,a(i.end)),i.end=d}}o.dataSource._removeExceptions(r),s(r)}),{title:c.editWindowTitle,text:c.editRecurring?c.editRecurring:j,occurrenceText:c.editWindowOccurrence,seriesText:c.editWindowSeries})}else s(o.dataSource.getByUid(t.uid))},_modelForContainer:function(t){return t=e(t).closest("["+n.attr("uid")+"]"),this.dataSource.getByUid(t.attr(n.attr("uid")))},showDialog:function(e){this.toolbar.find(".k-focus").removeClass(B),this._editor.showDialog(e)},focus:function(){this.wrapper.trigger("focus")},_confirmation:function(e,t,i){var r=this.options.editable;if(!0===r||!1!==r.confirmation){var o=this.options.messages,a=o.deleteWindowTitle,s=typeof r.confirmation===p?r.confirmation:o.editable.confirmation;if(this._isEditorOpened()&&t.isRecurring()){var l=this.options.messages.recurrenceMessages;a=l.deleteWindowTitle,s=t.isException()||t.isNew()?l.deleteRecurringConfirmation?l.deleteRecurringConfirmation:"Are you sure you want to delete this event occurrence?":l.deleteSeriesConfirmation?l.deleteSeriesConfirmation:"Are you sure you want to delete the whole series?",i&&(a=l.resetSeriesWindowTitle,s=l.resetSeriesConfirmation?l.resetSeriesConfirmation:"Are you sure you want to reset the whole series?")}var c=[{name:"destroy",text:i?o.resetSeries:o.destroy,click:function(){e()}}];this._isMobile()&&n.Pane||c.push({name:"canceledit",text:o.cancel,click:function(){e(!0)}}),this._unbindResize(),this.showDialog({model:t,text:s,title:a,buttons:c}),this._bindResize()}else e()},addEvent:function(e){var t,n=this._editor.editable,i=this.dataSource;e=e||{},!this.trigger("add",{event:e})&&(n&&n.end()||!n)&&(this.cancelEvent(),e&&e.toJSON&&(e=e.toJSON()),(t=i.add(e))&&(this.cancelEvent(),this._editEvent(t)))},saveEvent:function(){var e=this,t=e._editor,n=e.dataSource;if(t){var i,r,o,a=t.editable,s=t.container,l=e._modelForContainer(s);if(s&&a&&a.end()&&!e.trigger(R,{container:s,event:l})){if(!l.isOccurrence()&&l.recurrenceException&&!l.recurrenceRule){for(r=(i=n.data()).length-1;r>=0;r-=1)(o=i[r])&&o.recurrenceId===l.id&&n.remove(o);l.set("recurrenceException","")}l.dirty||l.isOccurrence()||e._convertDates(l,"remove"),n.sync()}}},cancelEvent:function(){var e,t=this._editor,n=t.container;n&&((e=this._modelForContainer(n))&&e.isOccurrence()&&(this._convertDates(e,"remove"),this._convertDates(this.dataSource.get(e.recurrenceId),"remove")),this.dataSource.cancelChanges(e),t.close())},editEvent:function(e){var t="string"==typeof e?this.occurrenceByUid(e):e;t&&(this.cancelEvent(),t.isRecurring()?this._editRecurringDialog(t):this._editEvent(t))},_editEvent:function(e){this._preventRefresh=!0,this._unbindResize(),this._createPopupEditor(e),this.toolbar.find(".k-focus").removeClass(B),this._bindResize()},_editRecurringDialog:function(e){var t=this,n=t.options.messages.recurrenceMessages;t._showRecurringDialog(e,(function(){e.isException()?t._editEvent(e):t.addEvent(e)}),(function(){e.recurrenceId&&(e=t.dataSource.get(e.recurrenceId)),t._editEvent(e)}),{title:n.editWindowTitle,text:n.editRecurring?n.editRecurring:j,occurrenceText:n.editWindowOccurrence,seriesText:n.editWindowSeries})},_showRecurringDialog:function(e,t,n,i){var r=this.options.editable,o=v(r)?r.editRecurringMode:"dialog";"occurrence"===o||this._isMultiDrag?t():"series"===o?n():(this._unbindResize(),this.showDialog({model:e,title:i.title,text:i.text,buttons:[{text:i.occurrenceText,click:t},{text:i.seriesText,click:n}]}),this._bindResize())},_createButton:function(e){var t=e.template||q,i=typeof e===p?e:e.name||e.text,r={className:"k-scheduler-"+(i||"").replace(/\s/g,""),text:i,attr:""};if(!(i||v(e)&&e.template))throw new Error("Custom commands should have name specified");return v(e)?(e.className&&(e.className+=" "+r.className),"edit"===i&&v(e.text)&&((e=_(!0,{},e)).text=e.text.edit),r=_(!0,r,le[i],e)):r=_(!0,r,le[i]),r.className?-1===r.className.indexOf("k-button-solid-primary")&&(r.className+=" k-button-solid-base"):r.className="k-button-solid-base",n.template(t)(r)},_convertDates:function(e,t){var i=this.dataSource.reader.timezone,r=e.startTimezone,o=e.endTimezone,a=e.start,s=e.start;t=t||"apply",r=r||o,o=o||r,r&&(i?"apply"===t?(a=n.timezone.convert(e.start,i,r),s=n.timezone.convert(e.end,i,o)):(a=n.timezone.convert(e.start,r,i),s=n.timezone.convert(e.end,o,i)):(a=n.timezone[t](e.start,r),s=n.timezone[t](e.end,o)),e._set("start",a),e._set("end",s))},_createEditor:function(){var e,t=this;(e=this._isMobile()&&n.Pane?t._editor=new ve(this.wrapper,_({},this.options,{target:this,timezone:t.dataSource.reader.timezone,resources:t.resources,createButton:this._createButton.bind(this)})):t._editor=new _e(this.wrapper,_({},this.options,{target:this,createButton:this._createButton.bind(this),timezone:t.dataSource.reader.timezone,resources:t.resources}))).bind("cancel",(function(e){t.trigger("cancel",{container:e.container,event:e.model})?e.preventDefault():(t._preventRefresh=!1,t.cancelEvent(),t._attemptRefresh&&t.refresh(),t.focus())})),e.bind("edit",(function(e){t.trigger(F,{container:e.container,event:e.model})&&e.preventDefault()})),e.bind("save",(function(){t._preventRefresh=!1,t.saveEvent()})),e.bind("remove",(function(e){t._preventRefresh=!1,t.removeEvent(e.model)})),e.bind("resetSeries",(function(e){t._confirmation((function(n){t._preventRefresh=!1,n||(t.dataSource._removeExceptions(e.model),t.saveEvent())}),e.model,!0)}))},_createPopupEditor:function(e){var t=this._editor;e.isNew()&&!e.isOccurrence()||(e.isOccurrence()&&this._convertDates(e.recurrenceId?this.dataSource.get(e.recurrenceId):e),this._convertDates(e)),this.editable=t.editEvent(e)},removeEvent:function(e){var t=this,n="string"==typeof e?t.occurrenceByUid(e):e;n&&(n.isRecurring()?t._deleteRecurringDialog(n):t._confirmation((function(e){e||t._removeEvent(n)}),n))},occurrenceByUid:function(e){var t=this.dataSource.getByUid(e);return t||(t=ne(this._data,e)),t},occurrencesInRange:function(e,t){return new n.data.Query(this._data).filter({logic:"or",filters:[{logic:"and",filters:[{field:"start",operator:"gte",value:e},{field:"end",operator:"gte",value:e},{field:"start",operator:"lt",value:t}]},{logic:"and",filters:[{field:"start",operator:"lte",value:e},{field:"end",operator:"gt",value:e}]}]}).toArray()},_removeEvent:function(e){this.trigger(A,{event:e})||this.dataSource.remove(e)&&this.dataSource.sync()},_deleteRecurringDialog:function(e){var t,n,i,r,o,a,s=this,l=e,c=s.options.editable,d=v(c)?c.editRecurringMode:"dialog";t=function(){var e=l.recurrenceId?l:l.toOccurrence(),t=s.dataSource.get(e.recurrenceId);s._convertDates(t),s._removeEvent(e)},n=function(){l.recurrenceId&&(l=s.dataSource.get(l.recurrenceId)),s._removeEvent(l)},i=function(){s.dataSource.remove(l),s.dataSource.sync()},("dialog"!=d||s._isEditorOpened())&&(r=function(){s._confirmation((function(e){e||t()}),l)},o=function(){s._confirmation((function(e){e||n()}),l)},a=function(){s._confirmation((function(e){e||i()}),l)});var u=o||n,h=r||t,p=a||i;if(s._isEditorOpened())e.isException()?h():e.isNew()?p():u();else{var f=s.options.messages.recurrenceMessages;s._showRecurringDialog(e,h,u,{title:f.deleteWindowTitle,text:f.deleteRecurring?f.deleteRecurring:"Do you want to delete only this event occurrence or the whole series?",occurrenceText:f.deleteWindowOccurrence,seriesText:f.deleteWindowSeries})}},_isEditorOpened:function(){return!!this._editor.container},_unbindView:function(e){var t=this;t.angular("cleanup",(function(){return{elements:t.items()}})),e.destroy()},_bindView:function(t){var n=this;n.options.editable&&(n._viewRemoveHandler&&t.unbind(A,n._viewRemoveHandler),n._viewRemoveHandler=function(e){n.removeEvent(e.uid)},t.bind(A,n._viewRemoveHandler),n._viewAddHandler&&t.unbind("add",n._viewAddHandler),n._viewAddHandler=function(e){n.addEvent(e.eventInfo)},t.bind("add",this._viewAddHandler),n._viewEditHandler&&t.unbind(F,n._viewEditHandler),n._viewEditHandler=function(e){n.editEvent(e.uid)},t.bind(F,this._viewEditHandler)),n._viewNavigateHandler&&t.unbind("navigate",n._viewNavigateHandler),n._viewNavigateHandler=function(e){if(e.action)n.trigger("navigate",{view:e.view,isWorkDay:e.isWorkDay,action:e.action,date:e.date})||n.date(e.date);else if(e.view){var t="isWorkDay"in e,i=t?"changeWorkDay":"changeView";n.trigger("navigate",{view:e.view,isWorkDay:e.isWorkDay,action:i,date:e.date})||(t&&(n._workDayMode=e.isWorkDay),n._selectView(e.view),n.date(e.date))}},t.bind("navigate",n._viewNavigateHandler),n._viewActivateHandler&&t.unbind("activate",n._viewActivateHandler),n._viewActivateHandler=function(){n._selection&&(this.constrainSelection(n._selection),0===e(document.activeElement).closest(".k-scheduler-toolbar").length&&(document.activeElement!==n.wrapper[0]?n.element.focus():n._select()),n._adjustSelectedDate())},t.bind("activate",n._viewActivateHandler)},_selectView:function(e){var t=this;if(e&&t.views[e])if(t._selectedView&&t._unbindView(t._selectedView),t._selectedView=t._renderView(e),t._selectedViewName=e,this._initialSize&&(this._initialSize=!1,this._onMediaChange(window.matchMedia(V))),t._viewsCount>1&&!t._isMobile()){var i=t.toolbar.find("["+n.attr("name")+"="+e+"]"),r=t.toolbar.find(".k-views-dropdown"),o=i.closest(".k-button-group").data("kendoButtonGroup");r.val(e),o&&o.select(i)}else if(t._viewsCount>1){t.toolbar.find(".k-scheduler-mobile-views").find("[value="+e.replace(/\./g,"\\.")+"]").prop("selected","selected")}},view:function(e){var t=this;return e?("year"===e?t.wrapper.removeAttr("tabindex"):t.wrapper.attr("tabindex",0),t._selectView(e),void t.rebind()):t._selectedView},viewName:function(){return this.view().name},_renderView:function(e){var t=this._initializeView(e);return this._bindView(t),(n.support.mouseAndTouchPresent||n.support.pointers)&&(t.content.css("-ms-touch-action","pinch-zoom"),t.content.css("touch-action","pinch-zoom")),this._model.set("formattedDate",t.dateForTitle()),this._model.set("formattedShortDate",t.shortDateForTitle()),this._model.set("formattedMobileDate",t.mobileDateForTitle?t.mobileDateForTitle():t.shortDateForTitle()),this._model.set("formattedYear",n.format("{0:yyyy}",t.startDate())),t},resize:function(e){var t=this.getSize(),n=this._size,i=this.view();i&&i.groups&&(!e&&n&&t.width===n.width&&t.height===n.height||(this.refresh({action:"resize"}),this._size=t))},_adjustSelectedDate:function(){var e=this._model.selectedDate,t=this._selection,i=t.start;i&&!n.date.isInDateRange(e,o(i),o(t.end))&&e.setFullYear(i.getFullYear(),i.getMonth(),i.getDate())},_initializeView:function(e){var t=this.views[e];if(t){var i=v(t),r={},o=t.type;if(typeof o===p&&(o=n.getter(t.type)(window)),i&&t.workDays&&t.workDays.length&&(r.workDays=t.workDays),!o)throw new Error("There is no such view");t=new o(this.wrapper,function(e,t){for(var n in delete e.name,delete e.prefix,delete e.remove,delete e.edit,delete e.add,delete e.navigate,t)e[n]=t[n];return e}(_(!0,{},this.options,i?t:{},{resources:this.resources,date:this.date(),startTime:n.parseDate(t.startTime)||n.parseDate(this.options.startTime),endTime:n.parseDate(t.endTime)||n.parseDate(this.options.endTime),showWorkHours:this._workDayMode}),r))}return t},_views:function(){var e,t,n,i,r,o,a,s=this.options.views;for(this.views={},this._viewsCount=0,o=0,a=s.length;o0?(n.forEach((function(e){0===e.dataSource.data().length&&(t._preventRebind=!0,i.push(e.dataSource.fetch()))})),e.when.apply(null,i).then((function(){t.dataSource.fetch(),t._preventRebind=!1}))):t.dataSource.fetch()},_dataSource:function(){var e=this,t=e.options,i=t.dataSource;i=w(i)?{data:i}:i,!t.timezone||i instanceof se?i instanceof se&&(t.timezone=i.options.schema?i.options.schema.timezone:""):i=_(!0,i,{schema:{timezone:t.timezone}}),e.dataSource&&e._refreshHandler?e.dataSource.unbind(I,e._refreshHandler).unbind(z,e._progressHandler).unbind(M,e._errorHandler):(e._refreshHandler=e.refresh.bind(e),e._progressHandler=e._requestStart.bind(e),e._errorHandler=e._error.bind(e)),e.dataSource=n.data.SchedulerDataSource.create(i).bind(I,e._refreshHandler).bind(z,e._progressHandler).bind(M,e._errorHandler),e.options.dataSource=e.dataSource},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_progress:function(e){var t=this.element.find(".k-scheduler-content");n.ui.progress(t,e)},_resources:function(){for(var t=this,n=t.options.resources,i=[],r=0;r-1;!n._resourceRefreshHandler&&i&&(n._resourceRefreshHandler=n._refreshResource.bind(n),n._resourceErrorHandler=n._error.bind(n)),i&&e.bind(I,n._resourceRefreshHandler).bind(M,n._resourceErrorHandler)},_refreshResource:function(){var e=this;e._editor&&e._editor.editable||e._preventRefresh||e.view(e._selectedViewName)},_initModel:function(){var e=this;e._model=n.observable({selectedDate:new Date(this.options.date),formattedDate:"",formattedShortDate:""}),e._model.bind(I,(function(t){"selectedDate"===t.field&&e.view(e._selectedViewName)}))},_wrapper:function(){var e=this,t=e.options,n=t.height,i=t.width;e.wrapper=e.element.addClass("k-widget k-scheduler k-floatwrap"),e._isMobile()&&e.wrapper.addClass("k-scheduler-mobile"),n&&e.wrapper.height(n),i&&e.wrapper.width(i)},date:function(e){return null!=e&&o(e)>=o(this.options.min)&&o(e)<=o(this.options.max)&&this._model.set("selectedDate",e),o(this._model.get("selectedDate"))},_processHandlers:function(e){var t=this;t._pdfClickHandler=function(e){e.preventDefault(),t.saveAsPDF()},t._createClickHandler=function(e){e.preventDefault(),t.addEvent()},t._calendarClickHandler=t._currentClickHandler=function(e){e.preventDefault(),t._showCalendar(e.target)},t._todayClickHandler=function(e){e.preventDefault();var i,r=t.options.timezone,o=new Date;if(r){var a=n.timezone.offset(o,r);i=n.timezone.convert(o,o.getTimezoneOffset(),a)}else i=o;t.trigger("navigate",{view:t._selectedViewName,action:"today",date:i})||t.date(i)},t._previousClickHandler=function(e){e.preventDefault();var n=t.view().previousDate();t.trigger("navigate",{view:t._selectedViewName,action:"previous",date:n})||t.date(n)},t._nextClickHandler=function(e){e.preventDefault();var n=t.view().nextDate();t.trigger("navigate",{view:t._selectedViewName,action:"next",date:n})||t.date(n)},t._refreshClickHandler=function(e){e.preventDefault();var n=t.view().name;t.trigger("navigate",{view:n,action:"changeView",date:t.date()})||t.view(n)},t._viewClickHandler=function(e){var i=e.target.attr(n.attr("name"));t.trigger("navigate",{view:i,action:"changeView",date:t.date()})||t.view(i)},Object.values(e).map((function(e){e.name&&(e.click=t["_"+e.name+"ClickHandler"])}))},_processDefaults:function(){var t,i,r=this.views,o=e.extend(!0,{},K),a=[],s=n.support.isRtl(this.wrapper);return Object.keys(r).map((function(t){var n=e.extend(!0,{},o.view);n.text=r[t].title,n.attributes={class:"k-view-"+t.toLowerCase(),"data-name":t},o[t]=n,a.push(t)})),a.length>1&&(t=G({views:this.views,label:this.options.messages.selectView,type:"k-views-dropdown"}),i=G({views:this.views,label:this.options.messages.selectView,type:"k-scheduler-mobile-views"})),o.viewsDdl={template:t},o.viewsMobile={template:i},this._viewsButtons=a,s&&(o.previous.icon="k-i-arrow-right",o.next.icon="k-i-arrow-left"),o},_processToolbarArray:function(){var t,n,i,r=this.options,o=r.toolbar,a=[],s=this._isMobile();return o&&(a=Array.isArray(o)?o:[o]),n=e.grep(a,(function(e){return"pdf"==e||"pdf"==e.name})).length>0,i=e.grep(a,(function(e){return"search"==e||"search"==e.name})).length>0,s?(t=[].concat($),r.editable&&t[0].push("create")):t=[].concat(Y),i&&t.push("search"),n&&(s?t[0].unshift("pdfMobile"):t.unshift("pdf")),1===this._viewsCount?t.push("refresh"):this._viewsCount>1&&(s?t.push("viewsMobile"):(t.push("viewsDdl"),t.push(this._viewsButtons))),t},_processViewTools:function(e){var t=e,n=-1;return e.some((function(e,t){return("views"===e||"views"===e.name)&&(n=t,!0)})),n>-1&&t.splice(n,1,"viewsDdl",this._viewsButtons),t},_processToolbarItems:function(){var e=this.options.toolbar.items.desktop||this.options.toolbar.items,t=this.options.toolbar.items.mobile||this.options.toolbar.items;return this._isMobile()?Array.isArray(t)?{tools:this._processViewTools(t),navigation:[]}:{tools:this._processViewTools(t.main),navigation:this._processViewTools(t.navigation)}:(e.main&&(e=e.navigation?e.main.concat(e.navigation):e.main),{tools:this._processViewTools(e)})},_processTools:function(){var e=this.options.toolbar;return e&&e.items?this._processToolbarItems():{tools:this._processToolbarArray()}},_toolbar:function(){var t,i=this,r=i.options,o=i._processDefaults(),a=i._processTools(),s=a.tools,l=a.navigation,c=e("
            ");i._processHandlers(o),i.wrapper.append(c),i.toolbar=c,c.kendoToolBar({resizable:!1,tools:s,defaultTools:o,parentMessages:r.messages}),!i._isMobile()||l&&0===l.length||(t=e("
            "),i.wrapper.append(t),i.toolbar=i.toolbar.add(t),t.kendoToolBar({resizable:!1,tools:l||[].concat(Q),defaultTools:o,parentMessages:r.messages})),i.toolbar.find(".k-nav-current .k-button-text").attr("data-"+n.ns+"bind","text: formattedDate"),i.toolbar.find(".k-m-date-format").attr("data-"+n.ns+"bind","text: formattedMobileDate"),i.toolbar.find(".k-y-date-format").attr("data-"+n.ns+"bind","text: formattedYear"),n.bind(i.toolbar,i._model),i.toolbar.find(".k-scheduler-search-input").attr({placeholder:r.messages.search,title:r.messages.search}),c.on("input"+y,".k-scheduler-search-input",n.throttle((function(e){i.dataSource.filter({logic:"or",filters:[{field:"title",operator:"contains",value:e.target.value},{field:"description",operator:"contains",value:e.target.value}]})}),250)),c.on(I+y,".k-views-dropdown, .k-scheduler-mobile-views",(function(){var e=this.value;i.trigger("navigate",{view:e,action:"changeView",date:i.date()})||i.view(e)})),i._initialSize=!0},_showCalendar:function(t){var n=this,i=t||n.toolbar.find(".k-nav-current"),r=e('
            ');n.popup||(n.popup=new f(r,{anchor:i,activate:function(){n.popup&&n.calendar&&(n.popup._toggleResize(!1),n.calendar.element.find("table").trigger("focus"),n.popup._toggleResize(!0))},open:function(){n.calendar||(n.calendar=new m(this.element.find(".k-scheduler-calendar"),{change:function(){var e=this.value();n.trigger("navigate",{view:n._selectedViewName,action:"changeDate",date:e})||(n.date(e),n.popup.close()),n._isMobile()||(n._selectedView.element.trigger("focus"),n.toolbar.find(".k-nav-current").trigger("focus").addClass(B))},min:n.options.min,max:n.options.max})),n.calendar.element.on("keydown"+y,(function(e){e.keyCode!==c.ESC&&e.keyCode!==c.TAB||(n.popup.close(),n._selectedView.element.trigger("focus"),n.toolbar.find(".k-nav-current").trigger("focus").addClass(B))})),n.calendar.setOptions({start:"year"===n._selectedViewName?"decade":"month",depth:"year"===n._selectedViewName?"decade":"month"}),n.calendar.value(n.date())},copyAnchorStyles:!1})),n.popup.open()},refresh:function(e){var t=this,n=this.view(),i=e&&"itemchange"===e.action&&(this._editor.editable||this._preventRefresh)||"signalr"===this.dataSource.options.type&&this._preventRefresh;this._progress(!1),this.angular("cleanup",(function(){return{elements:t.items()}})),e=e||{},n&&(i?this._attemptRefresh="signalr"===this.dataSource.options.type:this.trigger("dataBinding",{action:e.action||"rebind",index:e.index,items:e.items})||(e&&"resize"===e.action||!this._editor||this._editor.close(),this._data=this.dataSource.expand(n.startDate(),n.visibleEndDate()),n.refreshLayout(),n.render(this._data),this.trigger("dataBound"),this._attemptRefresh=!1))},slotByPosition:function(e,t){var n=this.view();if(!n._slotByPosition)return null;var i=n._slotByPosition(e,t);return i?{startDate:i.startDate(),endDate:i.endDate(),groupIndex:i.groupIndex,element:i.element,isDaySlot:i.isDaySlot}:null},slotByElement:function(t){var n=e(t),i=n.offset(),r=n.width(),o=n.height(),a=i.left+r/2,s=i.top+o/2;i=e(t).offset();return this.slotByPosition(a,s)},resourcesBySlot:function(e){return this.view()._resourceBySlot(e)}}),we={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"},year:{type:"kendo.ui.YearView"}};if(d.plugin(be),n.PDFMixin){n.PDFMixin.extend(be.prototype);var ye="k-scheduler-pdf-export";be.fn._drawPDF=function(t){var n=this.wrapper,i=n[0].style.cssText;n.css({width:n.width(),height:n.height()}),n.addClass(ye);var r=this,o=new e.Deferred,a=n.find(".k-scheduler-content").find("table").css("table-layout","auto");return setTimeout((function(){a.css("table-layout","fixed"),r.resize(!0),r._drawPDFShadow({},{avoidLinks:r.options.pdf.avoidLinks}).done((function(e){var n={page:e,pageNumber:1,progress:1,totalPages:1};t.notify(n),o.resolve(n.page)})).fail((function(e){o.reject(e)})).always((function(){n[0].style.cssText=i,n.removeClass(ye),r.resize(!0),r.resize(!0)}))})),o}}var ke=u.extend({init:function(e,t){var i=this,r=n.timezone.windows_zones;if(!r||!n.timezone.zones_titles)throw new Error("kendo.timezones.min.js is not included.");u.fn.init.call(i,e,t),i.wrapper=i.element,i._zonesQuery=new n.data.Query(r),i._zoneTitleId=n.guid(),i._zoneTitlePicker(),i._zonePicker(),i._zoneTitle.bind("cascade",(function(){this.value()||i._zone.wrapper.hide()})),i._zone.bind("cascade",(function(){i._value=this.value(),i.trigger(I)})),i.value(i.options.value)},options:{name:"TimezoneEditor",value:"",optionLabel:"No timezone"},events:[I],_zoneTitlePicker:function(){var t=this,i=e('').appendTo(t.wrapper);t._zoneTitle=new n.ui.DropDownList(i,{dataSource:n.timezone.zones_titles,dataValueField:"other_zone",dataTextField:"name",optionLabel:t.options.optionLabel})},_zonePicker:function(){var t=this,i=e('').appendTo(this.wrapper);t._zone=new n.ui.DropDownList(i,{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(){u.fn.destroy.call(this),n.destroy(this.wrapper)},value:function(e){var n,i=this;if(e===t)return i._value;(n=i._zonesQuery.filter({field:"zone",operator:"eq",value:e}).data[0])?(i._zoneTitle.value(n.other_zone),i._zone.value(n.zone)):i._zoneTitle.select(0)}});d.plugin(ke);var xe=n.template((function(e){var t=e.name;return'"})),Ce=n.template((function(e){return'"})),Se=u.extend({init:function(e,t){var i=this,r=n.timezone.windows_zones;if(!r||!n.timezone.zones_titles)throw new Error("kendo.timezones.min.js is not included.");u.fn.init.call(i,e,t),i.wrapper=i.element,i._zonesQuery=new n.data.Query(r),i._zoneTitlePicker(),i._zonePicker(),i.value(i.options.value)},options:{name:"MobileTimezoneEditor",optionLabel:"No timezone",value:""},events:[I],_bindZones:function(e){var t=e?this._filter(e):[];this._zone.html(this._options(t,Ce))},_filter:function(e){return this._zonesQuery.filter({field:"other_zone",operator:"eq",value:e}).data},_options:function(e,t,n){var i=0,r="",o=e.length;for(n&&(r+=t({other_zone:"",name:n}));i"+i+"").appendTo(t.wrapper).on("change",(function(){var e=this.value,n=t._zonePickerLabel,i=n.find("select");t._bindZones(e),e&&i.children().length>1?n.show():n.hide(),t._value=t._zone[0].value,t.trigger(I)}))},_zonePicker:function(){var t=this;t._zonePickerLabel=e("
          • ").hide(),t._zone=e("").appendTo(t._zonePickerLabel.find("div")).on("change",(function(){t._value=this.value,t.trigger(I)})),this.wrapper.closest(".k-item").after(t._zonePickerLabel),t._bindZones(t._zoneTitle.val()),t._value=t._zone[0].value},destroy:function(){u.fn.destroy.call(this),n.destroy(this.wrapper)},value:function(e){var n,i=this,r=i._zone,o="",a="";if(e===t)return i._value;(n=i._zonesQuery.filter({field:"zone",operator:"eq",value:e}).data[0])&&(a=n.zone,o=n.other_zone),i._zoneTitle.val(o),i._bindZones(o),r.val(a),(a=r[0].value)&&r.children.length>1?i._zonePickerLabel.show():i._zonePickerLabel.hide(),i._value=a}});d.plugin(Se)}(window.kendo.jQuery);kendo;!function(e,t){var n=kendo.data,i=kendo.htmlEncode,r=kendo.dom,o=r.element,a=r.text,s=r.html,l=kendo._outerWidth,c=e.extend({F10:121},kendo.keys),d=kendo._outerHeight,u=kendo.ui,h=u.DataBoundWidget,p=n.DataSource,f=n.ObservableArray,m=n.Query,g=n.Model,v=kendo.support.browser,_=kendo.template,b=kendo._activeElement,w=kendo.support.touch,y=Array.isArray,k=e.extend,x=e.map,C=e.grep,S=e.inArray,T=e.isPlainObject,D=Array.prototype.push,I="string",z="change",M="itemChange",E="error",A="progress",H=".",R=".kendoTreeList",F="click",P="beforeEdit",B="edit",L="page",V="save",O="saveChanges",N="expand",W="collapse",U="cellClose",j="remove",q="td:not(.k-group-cell):not(.k-hierarchy-cell):visible,th:not(.k-group-cell):not(.k-hierarchy-cell):visible",G=".k-filter-row td:not(.k-group-cell):not(.k-hierarchy-cell):visible,.k-filter-row th:not(.k-group-cell):not(.k-hierarchy-cell):visible",K="dataBinding",Y="dataBound",$="cancel",Q="tabIndex",X="filterMenuInit",Z="filterMenuOpen",J="columnHide",ee="columnShow",te="columnReorder",ne="columnResize",ie="columnMenuInit",re="columnMenuOpen",oe="columnLock",ae="columnUnlock",se="filter",le="navigate",ce="sort",de="parentId",ue="dragstart",he="drag",pe="drop",fe="dragend",me="tr:visible",ge="td:visible",ve="th:visible",_e="k-grid-norecords",be="tr:not(.k-footer-template):visible",we=!1,ye="k-checkbox",ke="input[data-role='checkbox']."+ye,xe="k-selected",Ce=new RegExp("(^|[\\x20\\t\\r\\n\\f])(k-filter-row)([\\x20\\t\\r\\n\\f]|$)"),Se="[ref-treelist-expand-collapse-icon]",Te="aria-label",De="aria-activedescendant",Ie={wrapper:"k-treelist k-grid k-grid-md k-grid-display-block",header:"k-header k-table-th",button:"k-button",alt:"k-alt k-table-alt-row",editCell:"k-edit-cell",editRow:"k-grid-edit-row",dirtyCell:"k-dirty-cell",group:"k-treelist-group k-table-group-row",toolbar:"k-toolbar",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-menu",footerTemplate:"k-footer-template",focused:"k-focus",loading:"k-i-loading",refresh:"arrow-rotate-cw",retry:"k-request-retry",selected:"k-selected",status:"k-status",link:"k-link",filterable:"k-filterable",icon:"k-icon",iconFilter:"filter",iconCollapse:"caret-alt-down",iconExpand:"caret-alt-right",iconHidden:"k-i-none",iconPlaceHolder:"k-icon k-i-none",input:"k-input",dropPositions:"k-i-insert-top k-i-insert-bottom k-i-plus k-i-insert-middle",dropTop:"insert-top",dropBottom:"insert-bottom",dropAdd:"plus",dropMiddle:"insert-middle",dropDenied:"cancel",dragStatus:"k-drag-status",dragClue:"k-drag-clue",dragClueText:"k-clue-text",headerCellInner:"k-cell-inner",columnTitle:"k-column-title"},ze={create:{icon:"plus",className:"k-grid-add",methodName:"addRow"},createchild:{icon:"plus",className:"k-grid-add",methodName:"addRow"},destroy:{icon:"x",className:"k-grid-remove-command",methodName:"removeRow"},edit:{icon:"pencil",className:"k-button-solid-primary k-grid-edit-command",methodName:"editRow"},update:{icon:"save",className:"k-button-solid-primary k-grid-save-command",methodName:"saveRow"},canceledit:{icon:"cancel-outline",className:"k-grid-cancel-command",methodName:"_cancelEdit"},cancel:{icon:"cancel-outline",text:"Cancel changes",className:"k-grid-cancel-changes",methodName:"cancelChanges"},save:{icon:"check",text:"Save changes",className:"k-grid-save-changes",methodName:"saveChanges"},excel:{icon:"excel",className:"k-grid-excel",methodName:"saveAsExcel"},pdf:{icon:"pdf",className:"k-grid-pdf",methodName:"saveAsPDF"},search:{template:function(e){var t=e.message;return""+kendo.ui.icon({icon:"search",iconClass:"k-input-icon"})+""}}},Me=kendo.Class.extend({init:function(e,t){var n=this;n.data=e||[],n.options=k(n.options,t)},options:{defaultParentId:null,idField:"id",parentIdField:de},childrenMap:function(){var e,t,n,i=this,r={},o=i.data.length,a=i.options.idField,s=i.options.parentIdField;if(i._childrenMap)return i._childrenMap;for(var l=0;l=a);n++)i=this.removeCollapsedSubtrees(s[n],t),r=r.concat(i);return r}}),Ee=function(e){this.data=e||[]};(Ee.prototype=new m).constructor=Ee,Ee.process=function(e,n,i){n=n||{};var r,o,a,s,l,c=new Ee(e),d=n.group,u=m.normalizeGroup(d||[]).concat(m.normalizeSort(n.sort||[])),h=n.filterCallback,p=n.filter,f=n.skip,g=n.take;return u&&i&&(c=c.sort(u,t,t,i)),p&&(c=c.filter(p),h&&(c=h(c)),r=c.toArray().length),u&&!i&&(c=c.sort(u),d&&(e=c.toArray())),n.processFromRootNodes&&(s=new Me(c.toArray(),n),p&&(a=s.childrenMap()),l=s.removeCollapsedSubtreesFromRootNodes({childrenMap:p||u&&u.length?t:n.childrenMap,expanded:n.expanded,maxDepth:f+g||1/0}),o=s.childrenMap(),c=new Ee(l)),f!==t&&g!==t&&(c=c.range(f,g)),d&&(c=c.group(d,e)),{total:r,data:c.toArray(),childrenMap:o,filteredChildrenMap:a}};var Ae=g.define({id:"id",parentId:de,fields:{id:{type:"number"},parentId:{type:"number",nullable:!0}},init:function(e){g.fn.init.call(this,e),this._loaded=!1,this.parentIdField||(this.parentIdField=de),this.parentId=this.get(this.parentIdField)},accept:function(e){g.fn.accept.call(this,e),this.parentId=this.get(this.parentIdField)},set:function(e,t,n){e==de&&this.parentIdField!=de&&(this[this.parentIdField]=t),g.fn.set.call(this,e,t,n),e==this.parentIdField&&(this.parentId=this.get(this.parentIdField))},loaded:function(e){if(e===t)return this._loaded;this._loaded=e},shouldSerialize:function(e){return g.fn.shouldSerialize.call(this,e)&&"_loaded"!==e&&"_error"!=e&&"_edit"!=e&&!("parentId"!==this.parentIdField&&"parentId"===e)}});function He(e){return function(t){return t[e]}}function Re(e){return function(t){return!e(t)}}Ae.parentIdField=de,Ae.define=function(e,n){n===t&&(n=e,e=Ae);var i=n.parentId||de;n.parentIdField=i;var r=g.define(e,n);return i&&(r.parentIdField=i),r};var Fe=p.extend({init:function(e){e=e||{};this._dataMaps=this._getDataMaps(),e.schema=k(!0,{},{modelBase:Ae,model:Ae},e.schema),p.fn.init.call(this,e)},_addRange:function(){},_createNewModel:function(e){var t={},n=e instanceof g,i=this._modelParentIdField();return n&&(t=e),t=p.fn._createNewModel.call(this,t),n||(e.parentId?e[t.parentIdField]=e.parentId:this._isPageable()&&e[i]&&(e[t.parentIdField]=e[i]),t.accept(e)),t},_shouldWrap:function(){return!0},_push:function(e,t){var n=p.fn._readData.call(this,e);n||(n=e),this[t](n)},_getData:function(){return this._data||[]},_readData:function(e){var t=this,n=t._isPageable()?t._getData().toJSON():t.data();return e=p.fn._readData.call(this,e),this._replaceData((n.toJSON?n.toJSON():n).concat(e),n),e instanceof f?e:n},_replaceData:function(e,t){for(var n=e.length,i=0;i=u);r++)n=e[r],i=this._subtree(g,n.id),s[n.id]=new m(i).aggregate(t.aggregate);return s},_queryProcess:function(e,t){var n={};if((t=t||{}).filterCallback=this._filterCallback.bind(this),this._isPageable())return this._processPageableQuery(e,t);var i=this._defaultParentId();n=m.process(e,t);var r,o,a,s,l=this._childrenMap(n.data);for(e=l[i]||[],o=0;o0&&!this.options.serverPaging},_updateTotalForAction:function(e,t){var n=this;p.fn._updateTotalForAction.call(n,e,t),n._isPageable()&&n._updateCollapsedTotalForAction(e,t)},_updateCollapsedTotalForAction:function(e,t){var n,i=this,r=parseInt(i._collapsedTotal,10);"number"!=typeof(n=i._collapsedTotal)||isNaN(n)?i._calculateCollapsedTotal():("add"===e?r+=t.length:"remove"===e?r-=t.length:"itemchange"===e||"sync"===e||i.options.serverPaging?"sync"===e&&(r=i._calculateCollapsedTotal()):r=i._calculateCollapsedTotal(),i._collapsedTotal=r)},_setFilterTotal:function(e,t){p.fn._setFilterTotal.call(this,e,t)},collapsedTotal:function(){var e=this;return gt(e._collapsedTotal)?e._calculateCollapsedTotal():e._collapsedTotal},_calculateCollapsedTotal:function(e){var t=this,n=t._dataWithoutCollapsedSubtrees(e);return n.length&&(t._collapsedTotal=n.length),t._collapsedTotal},_dataWithoutCollapsedSubtrees:function(e){return this._removeCollapsedSubtrees(e||this._getData())},_removeCollapsedSubtrees:function(e){var t=this;return t._createTreeView(e).removeCollapsedSubtreesFromRootNodes({expanded:t._modelOptions().expanded,childrenMap:t.filter()?t._getFilteredChildrenMap():t._getChildrenMap()})},_processTreeQuery:function(e,t){return Ee.process(e,k(t,this._defaultTreeModelOptions(),{processFromRootNodes:!0}))},_processDataItemsState:function(e,t){var n,i=e.length;for(n=0;n0},_modelError:function(e,t){this.get(e)._error=t},success:function(e,t){t&&void 0!==t.id||(this._data=this._observe([])),p.fn.success.call(this,e,t),this._total=this._data.length},load:function(t){var n="_query",i=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates,r=e.Deferred().resolve().promise();if(t.loaded()){if(i)return r}else t.hasChildren&&(n="read",this._removeChildData(t));return this[n]({id:t.id}).done(this._modelLoaded.bind(this,t.id)).fail(this._modelError.bind(this,t.id))},contains:function(e,t){for(var n=this,i=n._modelIdField(),r=n._modelParentIdField(),o=e[i],a=n._isPageable();t;){if(t[r]===o)return!0;t=a?n._parentNode(t):n.parentNode(t)}return!1},_byParentId:function(e,t){var n,i=[],r=this.view();if(e===t)return[];for(var o=0;o(a=parseInt(a,10))?1:otr:not(.k-filter-row)"),i=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},r=e();return n.length>1&&(r=n.find("th[data-index]").filter(i)),Be(r=r.add(n.last().find("th").filter(i)))}function Ve(e){for(var t=[],n=e.className,i=0,r=e.level;i').attr(kendo.attr("uid"),this.model.uid).append('
            '),t.template?(this._appendTemplate(n),this.fields=[]):(this.options.renderForm=!0,n.push(s('
            '))),this._appendButtons(n),new r.Tree(this.wrapper.children()[0]).render(n),this.wrapper.appendTo(t.appendTo),this.window=new u.Window(this.wrapper,t.window)},_appendTemplate:function(e){var t=this.options.template;typeof t===I&&(t=kendo.unescape(t)),t=kendo.template(t)(this.model),e.push(s(t))},_appendButtons:function(e){e.push(o("div",{class:"k-edit-buttons"},this.options.commandRenderer()))},_attachHandlers:function(){var e=this._cancelProxy=this._cancel.bind(this);this.wrapper.on(F+R,".k-grid-cancel-command",this._cancelProxy),this._saveProxy=this._save.bind(this),this.wrapper.on(F+R,".k-grid-save-command",this._saveProxy),this.window.bind("close",(function(t){t.userTriggered&&e(t)}))},_detachHandlers:function(){this._cancelProxy=null,this._saveProxy=null,this.wrapper.off(R)},_cancel:function(e){this.trigger($,e)},_save:function(){this.trigger(V)},open:function(){this.window.center().open()},close:function(){this.window.bind("deactivate",this.destroy.bind(this)).close()},destroy:function(){this.form&&this.form.destroy(),this.window.destroy(),this.window=null,this._detachHandlers(),We.fn.destroy.call(this)}}),je=We.extend({destroy:function(){var e=this;e.editable.destroy(),e.editable.element.off().empty().removeAttr(kendo.attr("role")),e.model=e.wrapper=e.element=e.columns=e.editable=null}}),qe=h.extend({init:function(t,n,i){if(h.fn.init.call(this,t,n),i&&(this._events=i),we=kendo.support.isRtl(t),Ie.iconExpand=we?"caret-alt-left":"caret-alt-right",this._dataSource(this.options.dataSource),this._columns(),this._layout(),this._aria(),this._ariaId(),this._navigatable(),this._selectable(),this._sortable(),this._resizable(),this._filterable(),this._filterRow(),this._attachEvents(),this._toolbar(),this._scrollable(),this._reorderable(),this._columnMenu(),this._minScreenSupport(),this._draggable(),this._pageable(),this.options.autoBind&&this.dataSource.fetch(),this._hasLockedColumns){var r=this;this.wrapper.addClass("k-grid-lockedcolumns"),this._resizeHandler=function(){r.resize()},e(window).on("resize"+R,this._resizeHandler)}kendo.notify(this)},_draggable:function(){var t,n,i=this,r=this.options.editable,o=i.dataSource,a=o._modelIdField(),s=o._modelParentIdField(),l=i._isPageable();r&&r.move&&(t=r.move.reorderable,!1!==r.move.clickMoveClick&&this._hasDragHandleColumn&&(n=!0),this._dragging=new kendo.ui.HierarchicalDragAndDrop(this.wrapper,{$angular:this.$angular,autoScroll:!0,holdToDrag:w,filter:i._hasDragHandleColumn?".k-drag-cell":"tbody>tr",itemSelector:"tr",allowedContainers:this.table,clickMoveClick:n,hintText:function(t){return(t=t.closest("tr")).children("td").map((function(){return e(this).text()})).toArray().join("")},contains:function(e,t){var n=this.dataItem(t),i=this.dataItem(e);return i==n||this.dataSource.contains(i,n)}.bind(this),itemFromTarget:function(e){var t,n,r=e.closest("tr"),o=r.prev(),a=r.next();return o&&(t=!i.sameLevel(o,r)),a&&(n=!i.sameLevel(a,r)),{item:r,content:r,first:t,last:n}},dragstart:function(e){this.wrapper.addClass("k-treelist-dragging"),this.wrapper.find(".k-grid-content").length&&this.wrapper.find(".k-grid-content table, .k-grid-content-locked table").css("position","relative");var t=this.dataItem(e);return this.trigger(ue,{source:t})}.bind(this),drag:function(e){e.source=this.dataItem(e.source),this.trigger(he,e)}.bind(this),drop:function(e){return e.source=this.dataItem(e.source),e.destination=this.dataItem(e.destination),this.wrapper.removeClass("k-treelist-dragging"),this.wrapper.find(".k-grid-content").length&&this.wrapper.find(".k-grid-content table, .k-grid-content-locked table").css("position","static"),this.trigger(pe,e)}.bind(this),dragend:function(e){var t=this.dataItem(e.destination),n=this.dataItem(e.source),r=n[s],c=o._indexInChildrenMap(n),d=e.position;if("over"==d){l&&(o._removeFromChildrenMap(n),n[s]=t?t[a]:null,o._initChildrenMapForParent(t),n[s]=r);var u=n.set("parentId",t?t.id:null);l&&u&&(o._removeFromChildrenMap(n),n[s]=r,o._removeFromChildrenMap(n),o._insertInChildrenMap(n,c))}else"before"==d?i.insertBefore(n,t):"after"==d&&i.insertAfter(n,t);e.source=n,e.destination=t,this.trigger(fe,e)}.bind(this),reorderable:t,dropHintContainer:function(e){return e.children("td:visible").eq(0)},dropPositionFrom:function(e){var t,n,i,r,o=!1;if(e.parent().find(".k-i-none").length)return e.prevAll(".k-i-none").length>0?"after":"before";for(n=(t=e.parent().contents()).length,r=e[0],i=0;i");var i=kendo.touchScroller(this.content);i&&i.movable&&(this._touchScroller=i,i.movable.bind("change",(function(e){kendo.scrollLeft(t,-e.sender.x),n&&n.scrollTop(-e.sender.y)})))}},_wheelScroll:function(t){if(!t.ctrlKey){var n=kendo.wheelDeltaY(t),i=e(t.currentTarget);n&&(i[0].scrollHeight>i[0].clientHeight&&(i[0].scrollTop0&&n>0)&&t.preventDefault(),i.one("wheel"+R,!1),this.content.scrollTop(this.content.scrollTop()+-n))}},_progress:function(){var e=this.options.messages;this.tbody.find("tr").length||this._showStatus(kendo.template((function(e){var t=e.className,n=e.messages;return" "+i(n.loading)}))({className:Ie.icon+" "+Ie.loading,messages:e}))},_error:function(e){this.dataSource.rootNodes().length||this._render({error:e})},refresh:function(t){var n=this;if(!("itemchange"==(t=t||{}).action&&this.editor||this.trigger(K))){var i,r=e(this.current()),o=!1;this._cancelEditor(),this._render(),this._adjustHeight(),this.options.navigatable&&((this._isActiveInTable()||this.editor)&&(i=(o=r.is("th"))?r.parent().children(":not(.k-group-cell)").index(r[0]):Math.max(this.cellIndex(r),0)),this._restoreCurrent(i,o)),n._checkBoxSelection&&n._deselectCheckRows(n.items(),!0),n._aria(),this.trigger(Y)}},_angularFooters:function(e){var t,n,i,r=this.dataSource.aggregates(),o=this._footerItems();for(t=0;t=0;)n[i]=n[i+t]=e[i];e=n}return e},_showNoRecordsTemplate:function(){var t,n,i=this.options.scrollable&&!this.wrapper[0].style.height?" "+kendo.attr("style-margin")+'="0 auto" '+kendo.attr("style-position")+'="static"':"";this._contentTree.render([]),this._hasLockedColumns&&this._lockedContentTree.render([]),t=kendo.format('
            {0}
            ',this.options.messages.noRows,i),n=e(kendo.template((function(){return kendo.format('
            {1}
            ',_e,t)}))({})),kendo.applyStylesFromKendoAttributes(n,["margin","position"]),n.insertAfter(this.table)},_showStatus:function(t){var n=this.element.find(".k-status"),i=e(this.content).add(this.lockedContent);n.length||(n=e("",e._hasLockedColumns&&(s+="
            "),s+="
            ",e.options.scrollable||(s="
            "),e.options.toolbar&&(s="
            "+s),s};i=i.bind(this),n.append(kendo.template(i)(Ie)+""),this.toolbar=n.find(H+Ie.gridToolbar);var r=n.find(H+Ie.gridHeader).find("thead").addBack().filter("thead");if(this.thead=r.last(),this.options.scrollable){var o=kendo.support.isRtl(n);n.find("div."+Ie.gridHeader).css(o?"padding-left":"padding-right",kendo.support.scrollbar())}var a=n.find(H+Ie.gridContentWrap);a.length?this.content=a:a=n,this.table=a.find(">table").addClass("k-grid-table"),this.tbody=this.table.find(">tbody"),this._hasLockedColumns&&(this.lockedHeader=r.first().closest(".k-grid-header-locked"),this.lockedContent=n.find(".k-grid-content-locked"),this.lockedTable=this.lockedContent.children().addClass("k-grid-table")),this._initVirtualTrees(),this._renderCols(),this._renderHeader(),this.angular("compile",(function(){return{elements:r.find("th.k-header").get(),data:x(t,(function(e){return{column:e}}))}}))},_initVirtualTrees:function(){this._headerColsTree=new r.Tree(this.thead.prev()[0]),this._contentColsTree=new r.Tree(this.tbody.prev()[0]),this._headerTree=new r.Tree(this.thead[0]),this._contentTree=new r.Tree(this.tbody[0]),this._statusTree=new r.Tree(this.element.children(".k-status")[0]),this.lockedHeader&&(this._lockedHeaderColsTree=new r.Tree(this.lockedHeader.find("colgroup")[0]),this._lockedContentColsTree=new r.Tree(this.lockedTable.find(">colgroup")[0]),this._lockedHeaderTree=new r.Tree(this.lockedHeader.find("thead")[0]),this._lockedContentTree=new r.Tree(this.lockedTable.find(">tbody")[0]))},_processToolbarItems:function(e){var t=this,n=t.options.messages.commands,i=[];return e.map((function(e){var r,o=(T(e)?e.name||"":e).toLowerCase(),a=n[o];if(!(o||T(e)&&e.template))throw new Error("Commands should have name specified");e=k({},ze[o],{name:o,text:(ze[o]||{}).text||a||(r=o,r.charAt(0).toUpperCase()+r.slice(1)),type:e.template?null:"button"},e),"search"===o&&(i.push({type:"spacer"}),e.template=e.template({message:e.text||n.search})),e.imageClass&&(e.spriteCssClass=e.imageClass,e.iconClass=e.imageClass),t._commandByName(o)&&(e.attributes||(e.attributes={}),e.attributes["data-command"]=o,e.click=function(e){e.event.preventDefault(),e.event.stopPropagation(),t._commandClick({currentTarget:e.target})}),e.className&&(e.attributes||(e.attributes={}),e.attributes.class=e.className),i.push(e)})),i},_toolbar:function(){var e=this.options.toolbar,t=this.toolbar;e&&(Array.isArray(e)?t.kendoToolBar({size:"medium",navigateOnTab:!this.options.navigatable,items:this._processToolbarItems(e)}):t.append(kendo.template(e)({})),this.angular("compile",(function(){return{elements:t.get()}})))},_lockedColumns:function(){return C(this.columns,He("locked"))},_nonLockedColumns:function(){return C(this.columns,Re(He("locked")))},_templateColumns:function(){return C(this.columns,He("template"))},_flushCache:function(){this.options.$angular&&this._templateColumns().length&&(this._contentTree.render([]),this._hasLockedColumns&&this._lockedContentTree.render([]))},_render:function(t){var n=this;t=t||{},t=n._renderOptions(t);var r=this.options.messages,o=n._isPageable(),a=n.dataSource,s={children:t.filteredChildrenMap||t.childrenMap,ids:t.idsMap},l=o?s&&s.children&&s.ids?s:a._initDataMaps(a._getData()):{},c=l.children,d=l.ids;t.childrenMap=c,t.idsMap=d;var u,h,p=n._dataToRender(t),f=n._renderedModelLevel(p[0],t),m=kendo.attr("uid"),g=this.select().removeClass("k-selected").map((function(t,n){return e(n).attr(m)}));this._absoluteIndex=0,this._angularItems("cleanup"),this._angularFooters("cleanup"),this._flushCache(),n._clearRenderMap(),t.error?this._showStatus(kendo.template((function(e){var t=e.messages,n=e.buttonClass;return i(t.requestFailed)+" "}))({buttonClass:[Ie.button,Ie.retry].join(" "),messages:r})):p.length?(o&&(h=n._viewChildrenMap(t)),this._hideStatus(),u=this._hasFooterTemplate(),this._contentTree.render(this._trs({columns:Qe(ut(this.columns)),editedColumn:t.editedColumn,editedColumnIndex:t.editedColumnIndex,aggregates:t.aggregates,selected:g,data:p,childrenMap:c,viewChildrenMap:h,hasFooterTemplate:u,visible:!0,level:0})),this._hasLockedColumns&&(this._absoluteIndex=0,this._lockedContentTree.render(this._trs({columns:Qe(dt(this.columns)),editedColumn:t.editedColumn,editedColumnIndex:t.editedColumnIndex,aggregates:t.aggregates,selected:g,data:p,childrenMap:c,viewChildrenMap:h,hasFooterTemplate:u,visible:!0,level:f,isLockedTable:!0})))):(this._hideStatus(),this._showNoRecordsTemplate()),this._touchScroller&&this._touchScroller.contentResized(),this._muteAngularRebind((function(){this._angularItems("compile"),this._angularFooters("compile")})),this.items().filter((function(){return e.inArray(e(this).attr(m),g)>=0})).addClass("k-selected"),this._syncLockedContentHeight(),n._togglePagerVisibility(),n._setExpanderElement()},_setExpanderElement:function(){var t,n=this,i="k-grid-content-expander";n.options.scrollable&&n.wrapper.is(":visible")&&(t=n.table.parent().children("."+i),n.dataSource&&n.dataSource.view().length?t[0]&&t.remove():(t[0]||(t=e('
            ').appendTo(n.table.parent())),n.thead&&t.width(n.thead.width())))},_renderProgress:function(e){kendo.ui.progress(this.wrapper,e)},_renderOptions:function(e){e=e||{};var t=this,n=t.dataSource._getDataMaps(),i=t.dataSource.filter();return t._isPageable()&&(e.childrenMap=n.children,e.idsMap=n.ids,i&&(e.filteredChildrenMap=n.filteredChildren)),e},_renderedModelLevel:function(e,t){return this._isPageable()?this.dataSource._pageableModelLevel(e,t):0},_viewChildrenMap:function(e){e=e||{};var t,n,i,r,o,a,s=this,l=s.dataSource,c=l.childrenMap(l.view()),d=l._modelIdField(),u=l._parentNodesNotInView();s._clearRenderMap();for(var h=0;hd?u=c:c'}))({}),n&&!i.colSpan&&(d.rowSpan=n),h>-1&&(d[kendo.attr("index")]=h),l.push(s(r)),f.push(o("th",e.extend(!0,{},d,i.headerAttributes),l));else{if(r=i.headerTemplate?i.headerTemplate({}):i.title||i.field||"",u=i.headerTemplate?s(r):a(r),this.options.sortable?l.push(o("span",{className:Ie.headerCellInner},[o("span",{className:Ie.link},[o("span",{className:Ie.columnTitle},[u])])])):l.push(u),d={"data-field":i.field,"data-title":i.title,style:!0===i.hidden?{display:"none"}:{},className:c.join(" "),role:"columnheader"},this.options.sortable){var v=r+". "+this.options.messages.sortHeader;d["aria-label"]=v,d.title=v}i.columns||(d.rowSpan=n||1),i.headerAttributes&&(1===i.headerAttributes.colSpan&&delete i.headerAttributes.colSpan,i.headerAttributes.class&&(d.className+=" "+i.headerAttributes.class,delete i.headerAttributes.class)),i["data-index"]>-1&&(d["data-index"]=i["data-index"]),d=k(!0,{},d,i.headerAttributes),f.push(o("th",d,l))}return f},_cols:function(e){for(var t,n,i=[],r=0;rtr:not(:first, .k-filter-row)");i=ut(i),t=n._retrieveFirstColumn(i,r),n.lockedHeader&&(r=n.lockedHeader.find("thead>tr:not(.k-filter-row):not(:first)"),i=dt(n.columns),t=t.add(n._retrieveFirstColumn(i,r))),t.each((function(){var t=e(this).find("th");t.removeClass("k-first"),t.eq(0).addClass("k-first")}))},_updateRowSpans:function(e){for(var t=e.length-1;t>=0;t--){Xe(e[t].cells).length>0&&(e[t].rowSpan=e.length-t)}},_setColumnDataIndexes:function(e){for(var t=0;t=0;n--)o(i=r[n])&&(i.hidden=!t)},_prepareColumns:function(t,n,i,r,o){for(var a=r||t[t.length-1],s=t[a.index+1],l=0,c=0;c0;this._setColumnDataIndexes(Qe(this.columns)),this._renderHeaderTree(this._headerTree,e,n),this._hasLockedColumns&&(e=dt(this.columns),this._renderHeaderTree(this._lockedHeaderTree,e,n),this._applyLockedContainersWidth(),this._syncLockedHeaderHeight()),this._updateFirstColumnClass()},_filterThs:function(e,t){for(var n,i,r=kendo.attr("uid"),a=0,s=e.length;a=0;d--)o=c(s,(n=a[d]).headerAttributes.id),r=c(s,i.headerAttributes.id),s.eq(o)[t?"insertBefore":"insertAfter"](s.eq(r))},_applyLockedContainersWidth:function(){if(this._hasLockedColumns){var e=Oe(this.lockedHeader.find(">table>colgroup>col")),t=this.thead.parent(),n=Oe(t.find(">colgroup>col")),i=this.wrapper[0].clientWidth,r=kendo.support.scrollbar();e>=i&&(e=i-3*r),this.lockedHeader.add(this.lockedContent).width(e),t.add(this.table).width(n);var o=i-e;this.content.width(o-1),t.parent().width(o-r-2)}},_trs:function(t){var n,i,r,o,a,s,l,c,d=this,u=[],h=t.level,p=t.data,f=this.dataSource,m=f.aggregates()||{},g=f._modelIdField(),v=f._modelParentIdField(),_=t.columns,b=d._isPageable(),w=t.isLockedTable,y=t.childrenMap||f.childrenMap(f._getData());for(s=0,l=p.length;s=0&&r.push(Ie.selected),o&&r.push(Ie.group),n._edit&&r.push("k-grid-edit-row"),i.className=r.join(" "),!d._skipRenderingMap[c]){var k,x={model:n,attr:i,level:b?d._renderedModelLevel(n,t):h,editedColumn:t.editedColumn,editedColumnIndex:t.editedColumnIndex,hasChildren:o,visible:t.visible,isAlt:this._absoluteIndex%2==0};k=d.options.rowTemplate?this._trFromTemplate(x):this._tds(x,_,this._td.bind(this)),u.push(k)}if(o&&(d.options.renderAllRows||n.expanded)){if(b&&(a=(t.viewChildrenMap||{})[c]||[]),0===a.length)continue;u=u.concat(this._trs({columns:_,editedColumn:t.editedColumn,editedColumnIndex:t.editedColumnIndex,aggregates:m,selected:t.selected,visible:b?t.visible:t.visible&&!!n.expanded,data:a,childrenMap:t.childrenMap||y,hasFooterTemplate:t.hasFooterTemplate,viewChildrenMap:t.viewChildrenMap,level:h+1,isLockedTable:t.isLockedTable}))}}return t.hasFooterTemplate&&n&&(i={className:Ie.footerTemplate+" k-table-row","data-parentId":n[v]},t.visible||(i.style={display:"none"}),u.push(this._tds({model:m[n[v]],attr:i,level:h,editedColumn:t.editedColumn,editedColumnIndex:t.editedColumnIndex},_,this._footerId))),u},_trFromTemplate:function(t){var n,i=this.options.rowTemplate,r=this.options.altRowTemplate;return r=r||i,kendo.isFunction(i)||(i=kendo.template(i)),kendo.isFunction(r)||(r=kendo.template(r)),n=this._absoluteIndex%2!=0?i(t):r(t),e(n).length?this.parseRowTemplate(e(n)[0],t):a(n)},parseRowTemplate:function(t,n){var i,r=t.nodeName.toLocaleLowerCase(),s=t.childNodes,l=[];i=this.parseAttributes(t);for(var c=0;c=0},_footerId:function(t){var n=[],i=t.column,r=t.column.footerTemplate||e.noop,a=t.model[i.field]||{},l={role:"gridcell",class:"k-table-td",style:!0===i.hidden?{display:"none"}:{}};return i.expandable&&(n=n.concat(Ve({level:t.level+1,className:Ie.iconPlaceHolder}))),i.attributes&&k(!0,l,i.attributes,{style:!0===i.hidden?{display:"none"}:{}}),n.push(s(r(a)||"")),o("td",l,n)},_hasFooterTemplate:function(){return!!C(Qe(this.columns),(function(e){return e.footerTemplate})).length},_tds:function(e,t,n){for(var i,r=[],a=(e.editedColumn||{}).field,s=this._isIncellEditable(),l=t.length,c=0;c"),{icon:n,type:l}))),c.style["white-space"]="nowrap"),function(e,t){var n=(e||{}).field||"";return t.dirty&&t.dirtyFields&&t.dirtyFields[n]&&mt(e,t)}(a,r)&&(c.className?c.className+=Ie.dirtyCell:c.className||(c.className=Ie.dirtyCell)),a.draggable&&(c.class+=" k-drag-cell k-touch-action-none",void 0===c[Te]&&(c[Te]=this.options.messages.dragHandleLabel),c.style.cursor="move"),a.command?(c.className&&-1!==c.className.indexOf("k-command-cell")?c.className+=" k-command-cell":c.className||(c.className="k-command-cell"),u=C(a.command,(function(e){return e===B||e.name===B})).length>0,i=r._edit&&!this._isIncellEditable()&&u?this._buildCommands(["update","canceledit"]):this._buildCommands(a.command)):i.push(this._cellContent(a,r)),c.className=[c.class,c.className].join(" ").trim()),o("td",c,i)},_cellContent:function(e,t){var n,i,r=this._isIncellEditable();return e.selectable?s(''):e.draggable?s(kendo.ui.icon("reorder")):(e.template?n=this._evalColumnTemplate(e,t):e.field?(n=t.get(e.field),i=r?e.dirtyIndicatorTemplate(t):"",null===n||gt(n)?n=i:(e.format&&(n=kendo.format(e.format,n)),n=i+n)):(null===n||gt(n))&&(n=""),e.template||!e.encoded||r?s(n,!0):a(n,!0))},_evalColumnTemplate:function(e,t){return this._isIncellEditable()?e.dirtyCellTemplate(t):e.template(t)},_createDirtyColumnTemplate:function(e){var t=this,n=t._customTemplateSettings();return _((function(n){return t._dirtyIndicatorTemplate(e.field)(n)+this.columnTemplate(n)}),n).bind({columnTemplate:e.template})},_createIndicatorTemplate:function(e){var t=this._dirtyIndicatorTemplate(e.field);return _(t)},_dirtyIndicatorTemplate:function(e){var t=this._customTemplateSettings().paramName;return e&&t?function(t){var n=t.dirty,i=t.dirtyFields;return n&&i&&i[e]?'':""}:function(){return""}},_customTemplateSettings:function(){return k({},kendo.Template,this.options.templateSettings)},_buildCommands:function(e){var t,n=[];for(t=0;t-1&&(e.className=e.className.replace("k-primary","k-button-solid-primary")),e.className&&-1!==e.className.indexOf("k-button-solid-primary")||(e.className=(e.className||"")+" k-button-solid-base");var i='";return s(kendo.html.renderButton(i,{icon:n,iconClass:e.imageClass}))},_positionResizeHandle:function(t){var n,i,r,o,a,s,c,u=e(t.currentTarget),h=this.resizeHandle,p=u.position(),f=0,m=l(u),g=u.closest("div"),_=void 0!==t.buttons?t.buttons:t.which||t.button,b=this.options.columnResizeHandleWidth||3,w=3*b/2;if(n=m,void 0===_||0===_){h||(h=this.resizeHandle=e('
            '));var y=Le(u.closest("thead")).filter(":visible");if(we)c=kendo.scrollLeft(g),(v.mozilla||v.webkit&&v.version>=85)&&(c*=-1),s=parseFloat(g.css("borderLeftWidth")),f=(n=u.offset().left+c-parseFloat(u.css("marginLeft"))-(g.offset().left+s))<=c?w:0,a=(i=u.closest(".k-grid-header-wrap, .k-grid-header-locked"))[0].scrollWidth-i[0].offsetWidth,o=parseFloat(i.css("marginLeft")),r=v.msie?2*kendo.scrollLeft(i)+s-o-f:0,n-=(v.webkit&&v.version<85?a-f-o+s:-f)+(v.mozilla?s-o-f:0)+r;else for(var k=0;ktable>thead")).filter(Pe).length:0;if((t="number"==typeof t?d[t]:T(t)?C(d,(function(e){return e===t}))[0]:C(d,(function(e){return e.field===t}))[0])&&!t.hidden){n=S(t,d),i=(r=(o=t.locked)?s.lockedHeader.children("table"):s.thead.parent()).find("[data-index='"+n+"']");var h=o?s.lockedTable:s.table,p=s.footer||e();s.footer&&s.lockedContent&&(p=o?s.footer.children(".k-grid-footer-locked"):s.footer.children(".k-grid-footer-wrap"));var f=p.find("table").first();s.lockedHeader&&u>=n&&!o&&(n-=u);for(var m=0;mt[0].clientWidth?kendo.support.scrollbar():0;this.lockedContent.height(d(t)-n)},_syncLockedContentHeight:function(){this.lockedTable&&(this._touchScroller||this._adjustLockedHorizontalScrollBar(),this._adjustRowsHeight(this.table,this.lockedTable),this._syncLockedScroll())},_syncLockedHeaderHeight:function(){if(this.lockedHeader){var e=this.lockedHeader.children("table"),t=this.thead.parent();this._adjustRowsHeight(e,t),function(e,t){if(e=e[0],t=t[0],e.rows.length&&t.rows.length&&e.rows.length!==t.rows.length){var n,i,r=e.offsetHeight,o=t.offsetHeight;r>o?(n=t.rows[t.rows.length-1],Ce.test(n.className)&&(n=t.rows[t.rows.length-2]),i=r-o):(n=e.rows[e.rows.length-1],Ce.test(n.className)&&(n=e.rows[e.rows.length-2]),i=o-r),n.style.height=n.offsetHeight+i+"px"}}(e,t)}},_syncLockedScroll:function(){this.options.scrollable&&(this.lockedContent[0].scrollTop=this.content[0].scrollTop)},_resizable:function(){if(this.options.resizable){this.resizable&&this.resizable.destroy();var t=this;e(this.lockedHeader).find("thead").add(this.thead).on("mousemove"+R,"tr:not(.k-filter-row) > th",this._positionResizeHandle.bind(this)),this.resizable=new kendo.ui.Resizable(this.wrapper,{handle:".k-resize-handle",start:function(n){var i,r,o=e(n.currentTarget).data("th"),a=e.inArray(o[0],Le(o.closest("thead")).filter(":visible"));t.wrapper.addClass("k-grid-column-resizing"),t.lockedHeader&&e.contains(t.lockedHeader[0],o[0])?(i=t.lockedHeader,r=t.lockedTable):(i=t.thead.parent(),r=t.table),this.col=r.children("colgroup").find("col").eq(a).add(i.find("col").eq(a)),this.th=o,this.startLocation=n.x.location,this.columnWidth=l(o),this.table=this.col.closest("table"),this.totalWidth=this.table.width()},resize:function(e){var t=we?-1:1,n=e.x.location*t-this.startLocation*t;this.columnWidth+n<11&&(n=11-this.columnWidth),this.table.width(this.totalWidth+n),this.col.width(this.columnWidth+n)},resizeend:function(){t.wrapper.removeClass("k-grid-column-resizing");var e=this.th.attr("data-field"),n=C(Qe(t.columns),(function(t){return t.field==e})),i=Math.floor(l(this.th));n[0].width=i,t._resize(),t._syncLockedContentHeight(),t._syncLockedHeaderHeight(),t.trigger(ne,{column:n,oldWidth:this.columnWidth,newWidth:i}),this.table=this.col=this.th=null}})}},_sortable:function(){var n,i,r,o,a,s,l,c=this.options.sortable,d=C(this.columns,(function(e){return e.columns!==t})).length>0,u=this._sort.bind(this);if(c)for(o=d?this.lockedHeader?Be(Le(this.lockedHeader.find(">table>thead")).add(Le(this.thead))):Le(this.thead):e(this.lockedHeader).add(this.thead).find("tr:not(.k-filter-row) th"),n=Qe(this.columns),s=0,l=o.length;s0;if(c&&!this.options.columnMenu){var u=function(e){this.trigger(X,{field:e.field,container:e.container})}.bind(this),h=function(e){this.trigger(Z,{field:e.field,container:e.container})}.bind(this),p=this._filter.bind(this);if(n=d?this.lockedHeader?Le(this.lockedHeader.find(">table>thead").add(this.thead)):Le(this.thead):e(this.lockedHeader).add(this.thead).find("tr:not(.k-filter-row) th"),o=Qe(this.columns),c&&typeof c.mode==I&&-1==c.mode.indexOf("menu")&&(c=!1),c)for(i=0,r=n.length;i").attr(kendo.attr("field"),g).appendTo(m).kendoFilterCell(n),u.parentColumn=v}else m.html(" ")}this._filterFocusable().attr(Q,-1)}},_hasFilterRow:function(){var t=this.options.filterable,n=t&&typeof t.mode==I&&-1!=t.mode.indexOf("row"),i=this.columns,r=e.grep(i,(function(e){return!1===e.filterable}));return i.length&&r.length==i.length&&(n=!1),n},_change:function(){var e,t=this;t._checkBoxSelection&&(e=t.selectable.value(),t._uncheckCheckBoxes(),t._checkRows(e),e.length&&e.length===t.items().length?t._toggleHeaderCheckState(!0):t._toggleHeaderCheckState(!1)),this.trigger(z)},_isLocked:function(){return null!==this.lockedHeader},_selectable:function(){var n,i,r,o,a=this,s=this.options.selectable,l=this.table,d=a._isLocked();s&&(s=kendo.ui.Selectable.parseOptions(s),this._hasLockedColumns&&(l=l.add(this.lockedTable),i=s.multiple&&s.cell),n=">tbody>tr:not(.k-footer-template)",s.cell&&(n+=">td"),this.selectable=new kendo.ui.Selectable(l,{filter:n,aria:!0,multiple:s.multiple,change:this._change.bind(this),useAllItems:i,continuousItems:this._continuousItems.bind(this,n,s.cell),relatedTarget:!s.cell&&this._hasLockedColumns?this._selectableTarget.bind(this):t}),a.options.navigatable&&(r=s.multiple,o=s.cell,l.on("keydown"+R,(function(t){var n=a.current(),i=t.target;if(t.keyCode===c.SPACEBAR&&!t.shiftKey&&e.inArray(i,l)>-1&&!n.is(".k-header")){if(t.preventDefault(),t.stopPropagation(),n=o?n:n.parent(),d&&!o&&(n=n.add(a._relatedRow(n))),r)if(t.ctrlKey){if(n.hasClass(Ie.selected))return n.removeClass(Ie.selected),void a.trigger(z)}else a.selectable.clear();else a.selectable.clear();o||(a.selectable._lastActive=n),a.selectable.value(n),a.trigger(z)}else!o&&(t.shiftKey&&t.keyCode==c.LEFT||t.shiftKey&&t.keyCode==c.RIGHT||t.shiftKey&&t.keyCode==c.UP||t.shiftKey&&t.keyCode==c.DOWN||t.keyCode===c.SPACEBAR&&t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),n=n.parent(),d&&(n=n.add(a._relatedRow(n))),r?(a.selectable._lastActive||(a.selectable._lastActive=n),a.selectable.selectRange(a.selectable._firstSelectee(),n)):(a.selectable.clear(),a.selectable.value(n)),a.trigger(z))}))))},_continuousItems:function(t,n){if(this.lockedContent){for(var i=e(t,this.lockedTable),r=e(t,this.table),o=n?dt(this.columns).length:1,a=n?this.columns.length-o:1,s=[],l=0;ltbody>tr").index(t);return(i=i[0]===this.table[0]?n:this.table).find(">tbody>tr").eq(r)},select:function(t){var n=this,i=this.selectable;return n._checkBoxSelection?(t&&(n._checkRows(t),n.select().length===n.items().length&&n._toggleHeaderCheckState(!0)),n.items().filter("."+xe)):i?(void 0!==t&&(i.options.multiple||(i.clear(),t=t.first()),this._hasLockedColumns&&(t=t.add(e.map(t,this._relatedRow.bind(this))))),i.value(t)):e()},clearSelection:function(){var e=this;e.selectable&&!e._checkBoxSelection&&e.selectable.clear(),e._checkBoxSelection&&e._deselectCheckRows(e.select(),!0)},_uncheckCheckBoxes:function(){this.table.add(this.lockedTable).find("tbody "+ke).attr("aria-checked",!1).prop("checked",!1).attr("aria-label","Select row")},_deselectCheckRows:function(t,n){var i=this;t=i.table.add(i.lockedTable).find(t),i._isLocked()&&(t=t.add(t.map((function(){return i._relatedRow(this)})))),t.each((function(){e(this).removeClass(xe).find(ke).attr("aria-checked",!1).prop("checked",!1).attr("aria-label","Select row")})),i._toggleHeaderCheckState(!1),n||i.trigger(z)},_headerCheckboxClick:function(t){var n=this,i=e(t.target),r=i.prop("checked"),o=i.closest(".k-grid").getKendoTreeList();n===o&&(r?n.select(o.items()):n.clearSelection(),n.trigger(z))},_checkboxClick:function(t){var n=this,i=e(t.target).closest("tr"),r=!i.hasClass(xe),o=n.dataItem(i),a=[],s="";if(n===i.closest(".k-grid").getKendoTreeList()){if(n._includeChildren){n.dataSource.allChildNodes(o,a);for(var l=0;lr?n=i+"px":i.k-grid-header ")+"th.k-header",n=this;this._draggableInstance=new u.Draggable(this.wrapper,{group:kendo.guid(),filter:t,hint:function(t){return e('
            ').html(t.attr(kendo.attr("title"))||t.attr(kendo.attr("field"))||t.text()).prepend(kendo.ui.icon({icon:"cancel",iconClass:"k-drag-status"}))}}),this.reorderable=new u.Reorderable(this.wrapper,{draggable:this._draggableInstance,dragOverContainers:this._allowDragOverContainers.bind(this),inSameContainer:function(t){return e(t.source).parent()[0]===e(t.target).parent()[0]&&tt(et(n.columns),n.columns,t.sourceIndex,t.targetIndex)>-1},change:function(e){var t=et(n.columns),i=t[e.oldIndex],r=tt(t,n.columns,e.oldIndex,e.newIndex);n.trigger(te,{newIndex:r,oldIndex:S(i,t),column:i}),n.reorderColumn(r,i,"before"===e.position)}})}},_allowDragOverContainers:function(e,t){var n=et(this.columns);return!1!==n[e].lockable&&tt(n,this.columns,e,t)>-1},_reorderTrees:function(t,n,i,r,o,a,s,l){for(var c,d,u,h,p,f=e(),m=o.find("tr").eq(r[0].rowIndex),g=a.children[r[0].rowIndex],v=m.children(),_=s?t[0]:t[t.length-1],b=0;bth.k-header").eq(_.cellIndex)).length&&f[0]!==p[0]&&f[s?"insertBefore":"insertAfter"](p),l>=r[0].rowIndex+1&&1!=l){for(d=[],b=0;b1||r[0].cellIndex-_.cellIndex>1)&&(u=[h=$e(this.columns,_,r[0],s,this.columns)],!h&&d.length&&n.find("tr").length>r[0].rowIndex+1))return void this._insertTree(d,o,a,n,i);if(!u.length)return;this._reorderTrees(u,n,i,d,o,a,s,l)}},_insertTree:function(t,n,i,r,o){var a,s,l=[],c=e();a=n.find("tr").eq(t[0].rowIndex),s=i.children[t[0].rowIndex];for(var d=0;dth.k-header").eq(t[d].cellIndex));i.children[t[0].rowIndex].children.splice(t[0].cellIndex,t.length),r.find("tr").eq(t[0].rowIndex).append(c),l.length&&this._insertTree(l,n,i,r,o)},_reorderHeader:function(t,n,i){var r,a,s=n.columns?ct([n]):1,l=t.columns?ct([t]):1,c=Ye(n),d=Ye(t),u=d?this.lockedHeader:this.thead,h=c?this.lockedHeader:this.thead,p=d?this._lockedHeaderTree:this._headerTree,f=c?this._lockedHeaderTree:this._headerTree,m=u.find("tr:not(.k-filter-row)");if(s===l||s").insertBefore(a.find("tr.k-filter-row")):a.append("")}this._reorderTrees([t],u,p,[n],h,f,i,s),pt(h,f)}},reorderColumn:function(n,i,r){var o,a=i.parentColumn,s=a?a.columns:this.columns,l=S(i,s),c=s[n],d=!!c.locked,u=C(this.columns,(function(e){return e.columns!==t})).length>0,h=ut(s).length;if(l!==n&&(!d||i.locked||1!=h)&&(d||!i.locked||s.length-h!=1)){if(r===t&&(r=n0,g=C(this.columns,(function(e){return e.columns!==t})).length>0;if(g?(l=Qe(l),s=this.lockedHeader?Be(Le(this.lockedHeader.find(">table>thead")).add(Le(this.thead))):Le(this.thead)):s=e(this.lockedHeader).add(this.thead).find("tr:not(.k-filter-row) th"),d){"boolean"==typeof d&&(d={});for(var v=0;v0&&m&&!g,appendTo:H+Ie.headerCellInner,reorderable:!!c.reorderable},c.$angular&&(r.$angular=c.$angular),s.eq(v).kendoColumnMenu(r))}},_columnMenuInit:function(e){this.trigger(ie,{field:e.field,container:e.container})},_columnMenuOpen:function(e){this.trigger(re,{field:e.field,container:e.container})},_filter:function(e){this.trigger(se,{filter:e.filter,field:e.field})&&e.preventDefault()},_sort:function(e){this.trigger(ce,{sort:e.sort})&&e.preventDefault()},_pageable:function(){var t,n=this,i=n.options.pageable;i&&((t=n.wrapper.children("div.k-grid-pager")).length||(t=e('
            ').appendTo(n.wrapper)),n._destroyPager(),"object"==typeof i&&i instanceof kendo.ui.TreeListPager?n.pager=i:n.dataSource&&!n.dataSource.options.serverPaging&&n._createPager(t),n.pager&&n.pager.bind("pageChange",(function(e){n.trigger(L,{page:e.index})&&e.preventDefault()})))},_createPager:function(e,t){var n=this;n.pager=new Ne(e,k({},n.options.pageable,{dataSource:n.dataSource,size:"medium",navigatable:n.options.navigatable},t))},_destroyPager:function(){this.pager&&(this.pager.destroy(),this.pager=null)},_isPageable:function(){var e=this;return e.options.pageable&&(!e.dataSource||e.dataSource&&e.dataSource._isPageable())},_togglePagerVisibility:function(){var e=this,t=e.options.pageable;t&&(T(t)||t instanceof Ne)&&!1===t.alwaysVisible&&e.wrapper.find(".k-grid-pager").toggle((e.dataSource.collapsedTotal()||0)>=e.dataSource.pageSize())}});function Ge(e){ft(e.closest(".k-treelist").find("[role=treegrid]"),!0)}function Ke(t){return e(t).is(":button,a,:input,a>.k-icon,a>.k-svg-icon,textarea,span.k-select,span.k-icon,span.k-svg-icon,span.k-link,.k-input,.k-multiselect-wrap,.k-tool-icon,.k-input-value-text,.k-input-inner,.k-button-icon")}function Ye(e){return e.parentColumn?!!Ye(e.parentColumn):!!e.locked}function $e(e,t,n,i,r){if(t.columns)return(t=t.columns)[i?0:t.length-1];var o,a=rt(t,e);o=a?a.columns:e;var s=S(t,o);0===s&&i&&1!==o.length?s++:s!=o.length-1||i||0===s?(s>0||0===s&&!i&&0!==s)&&(s+=i?-1:1):s--,t=function(e,t,n,i){var r,o,a=!!n.locked;do{r=e[t],t+=i?1:-1,o=!!r.locked}while(r&&t>-1&&ts);var l=S(t,r);return(!t.columns||l&&l!==o.length-1)&&t&&t!=n&&t.columns?$e(e,t,n,i,r):null}function Qe(e){for(var t=[],n=0;n0),t}))}function Je(e,t,n){return x(e,(function(e){var i;e.parentIds=n,function(e){return Ze([e]).length>0}(e)&&!t||(i=!0);var r=kendo.guid();return e.headerAttributes=k({headers:n},e.headerAttributes),e.headerAttributes&&e.headerAttributes.id?r=e.headerAttributes.id:e.headerAttributes=k({id:r},e.headerAttributes),e.columns&&(e.columns=Je(e.columns,i,n?n+" "+r:r)),k({hidden:i},e)}))}function et(e){return at(dt(e)).concat(at(ut(e)))}function tt(e,t,n,i){var r=e[n],o=e[i],a=rt(r,t);return t=a?a.columns:t,S(o,t)}function nt(t){var n=t.closest("table"),i=e().add(t),r=t.closest("tr"),o=n.find("tr"),a=o.index(r);if(a>0){for(var s=o.eq(a-1).find("th").filter((function(){return!e(this).attr("rowspan")})),l=0,c=r.find("th").index(t),d=t.prevAll().filter((function(){return this.colSpan>1})),u=0;u=u&&c1&&(p-=f-1),l++}}return i}function rt(e,t){var n=[];return ot(e,t,n),n[n.length-1]}function ot(e,t,n){n=n||[];for(var i=0;itr:not(.k-filter-row)"),l=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},c=0,d=n.length;ct&&(t=i)}return 1+t}function dt(e){return C(e,He("locked"))}function ut(e){return C(e,Re(He("locked")))}function ht(e,t){var n=e.find("tr:not(.k-filter-row)"),i=n.length;n.each((function(e){for(var n=this.cells,r=0;r=0;o--)n.children.splice(r[o],1);ht(t,n)}function ft(t,n){var i,r;!0===n?(i=(t=e(t)).parent().scrollTop(),r=kendo.scrollLeft(t.parent()),kendo.focusElement(t),kendo.scrollLeft(t.parent().scrollTop(i),r)):e(t).one("focusin",(function(e){e.preventDefault()})).trigger("focus")}function mt(e,t){return!(!(e&&t&&e.field)||e.selectable||e.command||e.draggable||e.editable&&!e.editable(t))&&(e.field&&t.editable&&t.editable(e.field))}function gt(e){return void 0===e}kendo.ExcelMixin&&kendo.ExcelMixin.extend(qe.prototype),kendo.PDFMixin&&(kendo.PDFMixin.extend(qe.prototype),qe.prototype._drawPDF=function(n){var i=this;if(i.options.pdf.paperSize&&"auto"!=i.options.pdf.paperSize)return i._drawPDF_autoPageBreak(n);var r=new e.Deferred,o=i.dataSource,a=i.options.pdf.allPages;this._initPDFProgress(n);var s=new kendo.drawing.Group,l=o.page();function c(){i._drawPDFShadow({width:i.wrapper.width()},{avoidLinks:i.options.pdf.avoidLinks}).done((function(e){var i=o.page(),d=a?o.totalPages():1,u={page:e,pageNumber:i,progress:i/d,totalPages:d};n.notify(u),s.append(u.page),i
            ");n.prepend(this.wrapper.clone().css({position:"absolute",top:0,left:0})),this.wrapper.append(n);var i=e("
            ").appendTo(n).kendoProgressBar({type:"chunk",chunkCount:10,min:0,max:1,value:0}).data("kendoProgressBar");t.progress((function(e){i.value(e.progress)})).always((function(){kendo.destroy(n),n.remove()}))},qe.prototype._drawPDF_autoPageBreak=function(n){var i=this,r=new e.Deferred,o=i.dataSource,a=i.options.pdf.allPages,s=i.wrapper.find('table[role="treeList"] > tbody'),l=e("
            ").css({position:"absolute",left:-1e4,top:-1e4}),c=i.wrapper.clone().css({height:"auto",width:"auto"}).appendTo(l);c.find(".k-grid-content").css({height:"auto",width:"auto",overflow:"visible"}),c.find('table[role="treeList"], .k-grid-footer table').css({height:"auto",width:"100%",overflow:"visible"}),c.find(".k-grid-pager, .k-grid-toolbar, .k-grouping-header").remove(),c.find(".k-grid-header, .k-grid-footer").css({paddingRight:0}),this._initPDFProgress(n);var d=c.find('table[role="treeList"] > tbody').empty(),u=o.page();function h(){l.appendTo(document.body);var t=e.extend({},i.options.pdf,{_destructive:!0,progress:function(e){n.notify({page:e.page,pageNumber:e.pageNum,progress:.5+e.pageNum/e.totalPages/2,totalPages:e.totalPages})}});kendo.drawing.drawDOM(c,t).always((function(){l.remove()})).then((function(e){r.resolve(e)})).fail((function(e){r.reject(e)}))}function p(){var e=o.page(),n=a?o.totalPages():1;d.append(s.find("tr")),e=0?(o.plannedStart=n.plannedStart,o.plannedEnd=n.plannedEnd):(o.start=n.start,o.end=n.end),o[i]=r?r.value():kendo.parseDate(e.val()),i.indexOf("planned")>=0?o.plannedStart<=o.plannedEnd:o.start<=o.end)}return!0},h=kendo.data.Model.define({id:"id",fields:{id:{type:"number",editable:!1},predecessorId:{type:"number",validation:{required:!0}},successorId:{type:"number",validation:{required:!0}},type:{type:"number",validation:{required:!0}}}}),p=s.extend({init:function(e){s.fn.init.call(this,i(!0,{},{schema:{modelBase:h,model:h}},e))},dependencies:function(e){var t=this.predecessors(e),n=this.successors(e);return t.push.apply(t,n),t},predecessors:function(e){return this._dependencies("successorId",e)},successors:function(e){return this._dependencies("predecessorId",e)},_dependencies:function(e,t){var n=this.view(),i={field:e,operator:"eq",value:t};return n=new a(n).filter(i).toArray()}});p.create=d(p,"GanttDependencyDataSource");var f=c.define({fields:{id:{type:"number",editable:!1},parentId:{type:"number",defaultValue:null,nullable:!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:u,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},plannedStart:{type:"date",defaultValue:null,nullable:!0},plannedEnd:{type:"date",defaultValue:null,nullable:!0,validation:{dateCompare:u,message:"Planned end date should be after or equal to the planned start date"}}},duration:function(){return this.end-this.start},plannedDuration:function(){var e=this.plannedEnd,t=this.plannedStart;return e&&t?e-t:0},isMilestone:function(){return 0===this.duration()},_offset:function(e){for(var t,n=["start","end"],i=0;ir&&(r=n);return new Date(r)}))},_resolveSummaryPlannedStart:function(e){var t=this;this._updateSummaryRecursive(e,"plannedStart",(function(e){for(var n,i=t.taskChildren(e),r=null,o=0,a=i.length;or)&&(r=n));return r?new Date(r):null}))},_resolveSummaryPercentComplete:function(e){var t=this;this._updateSummaryRecursive(e,"percentComplete",(function(e){var n=t.taskChildren(e);return new a(n).aggregate([{field:"percentComplete",aggregate:"average"}]).percentComplete.average}))},_reorderSiblings:function(e,t){var n=e.get("orderId"),i=n>t,r=i?t:n,o=i?n:t,a=i?r:r+1,s=this.taskSiblings(e);if(s.length){o=Math.min(o,s.length-1);for(var l=r;l<=o;l++)s[l]!==e&&(s[l].set("orderId",a),a+=1)}},_toGanttTask:function(e){if(!(e instanceof f)){var t=e;(e=s.fn._createNewModel.call(this)).accept(t)}return e},_updateSummary:function(e){if(null!==e){var t=this.taskChildren(e).length;e.set("summary",t>0)}},_updateSummaryRecursive:function(e,t,n){if(e){var i=n(e);e.set(t,i);var r=this.taskParent(e);r&&this._updateSummaryRecursive(r,t,n)}}});m.create=d(m,"GanttDataSource"),i(!0,kendo.data,{GanttDataSource:m,GanttTask:f,GanttDependencyDataSource:p,GanttDependency:h})}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui,r=n.Observable,o=i.Widget,a=n.htmlEncode,s=e.extend,l="23em",c="k-gantt-delete",d="k-gantt-cancel",u="k-gantt-update",h={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-actions",button:"k-button",buttonDefaults:"k-button-md k-rounded-md k-button-solid k-button-solid-base",editField:"k-edit-field",editLabel:"k-edit-label",resourcesField:"k-gantt-resources"},p=r.extend({init:function(e,t){r.fn.init.call(this),this.element=e,this.options=s(!0,{},this.options,t)},destroy:function(){this.close(),this.unbind()},close:function(){var e=this,t=function(){e.editable&&(e.container.data("kendoWindow").destroy(),e.editable=null,e.container=null),e.popup&&(e.popup.destroy(),e.popup=null)};e.editable&&e.container.is(":visible")?(e.trigger("close",{window:e.container}),e.container.data("kendoWindow").bind("deactivate",t).close()):t()},editTask:function(e,t){this.task=e,this.plannedEditors=t,this.editable=this._createPopupEditor()},fields:function(){var t,i=this.options,r=this.task,o={};return i.editable.template?e.map(r.fields,(function(e,t){return{field:t}})):(o.general=this._fieldsGeneral(),i.resources&&(o.resources=[{field:"resources"}]),i.dependencies&&(o.dependencies=this._fieldsDependencies(r)),t=s(!0,{},r.fields),Object.keys(n.data.GanttTask.fields).map((function(e){delete t[e]})),Object.keys(t).length>0&&(o.other=this._fieldsOther(t)),o)},showDialog:function(t){var i,r=h,o=this.element,s=t.model,l=this,u=e(n.format('
            ')).appendTo(o),p=this.options.messages;u.append(e("

            "+t.text+"

            ")),i=e('
            '),u.append(i),i.append(e("").kendoButton({name:"delete",themeColor:"primary",icon:"trash",click:function(e){e.preventDefault(),f.close(),t.callback()}})),i.append(e("").kendoButton({name:"cancel",icon:"cancel",click:function(e){e.preventDefault(),f.close(),t.callback(!0)}})),this.popup&&this.popup.destroy();var f=this.popup=u.kendoWindow({modal:!0,autoFocus:!1,resizable:!1,draggable:!1,title:t.title,visible:!1,deactivate:function(){this.destroy(),l.trigger("close",{window:u})}}).getKendoWindow();f.center().open(),f.element.find(".k-button-solid-primary").trigger("focus")},_buildButtons:function(t){var n=this.options.messages,i=e('
            ');i.appendTo(t),i.append(e("").kendoButton({name:"update",themeColor:"primary",icon:"save",click:this._onSave.bind(this)})),i.append(e("").kendoButton({name:"cancel",icon:"cancel",click:this._onCancel.bind(this)})),i.append(e("")),!1!==this.options.editable.destroy&&i.append(e("").kendoButton({name:"delete",themeColor:"primary",icon:"trash",fillMode:"flat",click:this._onDelete.bind(this)}))},_buildEditTemplate:function(t,i){var r=this.options.editable.template,o=s({},n.Template,this.options.templateSettings),a="";r?("string"==typeof r&&(r=n.unescape(r)),a+=n.template(r,o)(t)):(this.renderForm=!0,a+='
            ');var l=e(a);n.applyStylesFromKendoAttributes(l,["min-height"]),l.appendTo(i)},_createPopupEditor:function(){var t,i=this,r=this.options.messages,o=h,a=this.task,l=e(n.format('
            ',n.attr("uid"),a.uid,o.form,o.editForm));return l.appendTo(this.element),this._buildEditTemplate(a,l),this._buildButtons(l),this.container=l.kendoWindow(s({width:554,modal:!0,resizable:!1,draggable:!0,title:r.editor.editorTitle,visible:!1,actions:["Minimize","Maximize","Close"],close:function(e){e.userTriggered&&i.trigger("cancel",{container:l,model:a})&&e.preventDefault()}},{})),t=this.renderForm?this._initForm():l.kendoEditable({model:a,clearContainer:!1,validateOnBlur:!0,target:i.options.target}).data("kendoEditable"),n.cycleForm(l),this.trigger("edit",{container:l,model:a})?i.trigger("cancel",{container:l,model:a}):l.data("kendoWindow").center().open(),t},_fieldsDependencies:function(e){return{nameDdlDs:this.options.target.dataSource.data().filter((function(t){return t.id!==e.id})).map((function(e){return{text:e.title,value:e.id}})),typeDs:[{value:0,text:"Finish-Finish"},{value:1,text:"Finish-Start"},{value:2,text:"Start-Finish"},{value:3,text:"Start-Start"}]}},_fieldsGeneral:function(){var e,t,i,r=this,o=this.options,a=o.target.dataSource,l=o.messages.editor,c=this.task,d=c.fields,u=this.plannedEditors?l.actualStart:l.start,h=this.plannedEditors?l.actualEnd:l.end,p=[{field:"title",title:l.title,colSpan:4}];return this.plannedEditors&&(p.push({field:"plannedStart",title:l.plannedStart,colSpan:2,editor:"DateTimePicker",validation:d.plannedStart.validation,editorOptions:{componentType:"modern"}}),p.push({field:"plannedEnd",title:l.plannedEnd,colSpan:2,editor:"DateTimePicker",validation:d.plannedEnd.validation,editorOptions:{componentType:"modern"}})),e=a.data(),(t=a.taskAllChildren(c)).push(c),i=e.filter((function(e){return!t.some((function(t){return t.id===e.id}))})),p.push({field:"start",title:u,colSpan:2,editor:"DateTimePicker",validation:d.start.validation,editorOptions:{componentType:"modern"}}),p.push({field:"end",title:h,colSpan:2,editor:"DateTimePicker",validation:d.start.validation,editorOptions:{componentType:"modern"}}),p.push({field:"percentComplete",title:l.percentComplete,format:"p0",colSpan:1,hint:l.percentCompleteHint}),p.push({field:"parentId",title:l.parent,colSpan:4,editor:"DropDownList",editorOptions:{optionLabel:l.parentOptionLabel,filter:"contains",dataSource:i,enable:i.length>0,dataValueField:"id",dataTextField:"title",valuePrimitive:!0,template:function(e){var t=e.title,i=e.start,r=e.end;return""+t+" "+n.toString(i,"d")+"-"+n.toString(r,"d")+""}}}),p=p.map((function(e){return e=s(!0,{label:e.title},e),!c.editable||c.editable(e.field)?e:s(!0,e,{editor:r._readonlyEditor.bind(r)})}))},_fieldsOther:function(e){var t=this,n=this.task;return e=Object.keys(e).map((function(i){var r=e[i];return r=s(!0,{field:i,label:r.title},r),!n.editable||n.editable(r.field)?r:s(!0,r,{editor:t._readonlyEditor.bind(t)})}))},_gridOptions:function(t,n,i,r){var o,a=this.options.messages;return this.dependencyData||(this.dependencyData={}),{dataSource:{data:this.dependencyData[n]=this.options.target.dependencies.view().filter((function(e){return e[i]===r})),schema:{model:{fields:(o={id:{from:"id"}},o[n]={from:n,validation:{required:{message:a.editor.name+" is required"}}},o.type={from:"type",validation:{required:!0},defaultValue:1},o)}}},columns:[{selectable:!0,width:50},{field:n,title:a.editor.name,values:t.nameDdlDs},{field:"type",title:a.editor.dependencyType,values:t.typeDs,width:"9em"}],toolbar:[{name:"create",text:a.editor.addNew},{name:"remove",icon:"minus",text:a.editor.remove,click:function(t){var n=t.target.closest(".k-grid").getKendoGrid(),i=n.dataSource,r=n.select(),o=[];r&&r.length>0&&(r.each((function(t,i){o.push(n.dataItem(e(i)))})),o.map((function(e){i.remove(e)})))}}],editable:!0,sortable:!0,navigatable:!0,height:l,edit:function(){var t=e("[name=predecessorId], [name=successorId]");t.length&&t.data("kendoDropDownList").setOptions({filter:"contains"})}}},_initForm:function(){var t=this,n=t.task,i=t.container,r=t.options.resources,o=n.get(r.field),a=t.fields(),s=t._tabStripSource(a,o);return i.find(".k-gantt-edit-tabstrip").kendoTabStrip({dataTextField:"name",dataContentField:"content",dataSource:s,value:t.options.messages.editor.general,select:function(t){var n=t.sender,i=e(n.contentElement(n.select().index())),r=i.find(".k-grid").data("kendoGrid"),o=i.find(".k-form").data("kendoForm");(r&&r.editable&&r.editable.validatable&&!r.editable.validatable.validate()||o&&!o.validator.validate())&&t.preventDefault()}}),t._initGeneral(a.general,n),o&&(t.resourceEditor=r.editor(i.find(".k-gantt-resources"),n)),a.dependencies&&(i.find(".k-gantt-predecessors").kendoGrid(t._gridOptions(a.dependencies,"predecessorId","successorId",n.id)),i.find(".k-gantt-successors").kendoGrid(t._gridOptions(a.dependencies,"successorId","predecessorId",n.id))),a.other&&t._initOther(a.other,n),t.form.editable},_initGeneral:function(e,t){this.form=this.container.find(".k-gantt-form-default").kendoForm({layout:"grid",grid:{cols:4,gutter:{rows:0,cols:8}},items:e,formData:t,buttonsTemplate:function(){return""},validatable:{validateOnBlur:!0}}).data("kendoForm")},_initOther:function(e,t){this.container.find(".k-gantt-form-other").kendoForm({items:e,formData:t,buttonsTemplate:function(){return""},validatable:{validateOnBlur:!0}})},_readonlyEditor:function(e,t){var i=t.field,r="",o=this.options.target.dataSource;null!==t.model.get(i)&&((r=t.model.get(i))instanceof Date?r=n.toString(r,"g"):"percentComplete"===i?r=n.toString(r,t.format):"parentId"===i&&(r=o.get(r).title)),e.append(""+r+"")},_onCancel:function(){this.trigger("cancel",{container:this.container,model:this.task})},_onDelete:function(){this.trigger("remove",{container:this.container,model:this.task})},_onSave:function(){var t,n,i,r,o=this.task,a=[],s={},l=this.container,c=l.find(".k-gantt-predecessors").getKendoGrid(),d=l.find(".k-gantt-successors").getKendoGrid(),u={},h=[],p=[];if(c){if(i=this.dependencyData.successorId.concat(this.dependencyData.predecessorId),r=c.dataSource.view().toJSON().concat(d.dataSource.view().toJSON()),c&&c.editable&&c.editable.validatable&&!c.editable.validatable.validate()||d&&d.editable&&d.editable.validatable&&!d.editable.validatable.validate())return;r.map((function(e){n=i.find((function(t){return t.id===e.id})),n&&(n.dirty&&p.push(e),r=r.filter((function(t){return t.id!==e.id})),i=i.filter((function(t){return t.id!==e.id})))})),r.map((function(e){e.successorId?(e.predecessorId||(e.predecessorId=o.get("id")),h.push(e)):e.predecessorId&&(e.successorId||(e.successorId=o.get("id")),h.push(e))})),(h.length>0||i.length>0||p.length>0)&&(u.updateDependencies={destroyed:i,created:h,updated:p})}if(Object.values(this.fields()).map((function(e){Array.isArray(e)&&a.push.apply(a,e)})),!this.resourceEditor||this.resourceEditor.updateModel()){for(var f=0,m=a.length;f
            "}];return t&&r.push({name:n.resources,content:"
            "}),i&&(r.push({name:n.predecessors,content:"
            "}),r.push({name:n.successors,content:"
            "})),e.other&&r.push({name:n.other,content:"
            "}),r}}),f=o.extend({init:function(e,t){o.fn.init.call(this,e,t),this.wrapper=this.element,this.model=this.options.model,this.resourcesField=this.options.resourcesField,this._resourceGrid()},destroy:function(){this.grid=null,o.fn.destroy.call(this),this.element=this.wrapper=null},updateModel:function(){var e,n,i=[],r=this.grid,o=r.dataSource.data(),a=r.editable;if(a&&a.validatable&&!a.validatable.validate())return!1;for(var s=0,l=o.length;s0&&i.push(o[s]);return this.model[this.resourcesField]=i,!0},_resourceGrid:function(){var e=this,i=this.options.messages,r=e.options,o=this.wrapper,a=r.resources;e.grid=new n.ui.Grid(o,{columns:[{selectable:!0,width:50},{field:"id",title:i.resourcesHeader,values:a},{field:"value",title:i.unitsHeader,template:function(e){var t=e.format||"p0",i=null!==e.value?e.value:"";return t?n.toString(i,t):i},width:120}],height:l,sortable:!0,editable:!0,filterable:!0,navigatable:!0,toolbar:[{name:"create",text:i.addNew},{name:"remove",icon:"minus",text:i.remove,click:function(){var t=e.grid,n=t.dataSource,i=t.selectedKeyNames();i&&i.length>0&&i.map((function(e){n.remove(n.get(e))}))}}],dataSource:{data:this.model.resources,schema:{model:{id:"id",fields:{id:{from:"id",defaultValue:t,validation:{required:{message:i.resourcesHeader+" is required"}}},value:{from:"value",type:"number",defaultValue:1,validation:this.options.unitsValidation},format:{from:"format",type:"string"}}}}},edit:function(e){var t=e.container.find("select").data("kendoDropDownList"),n=e.model.id,i=r.model.resources.map((function(e){return e.id})).filter((function(e){return e!==n})).map((function(e){return{field:"value",operator:"neq",value:e}}));t&&(t.dataSource.filter({logic:"and",filters:i}),t.setOptions({filter:"contains"}))}})}});n.gantt={PopupEditor:p,ResourceEditor:f}}(window.kendo.jQuery);kendo;!function(e){var t=e.extend,n=e.map,i=kendo.isFunction,r=kendo.ui,o=r.TreeList,a=kendo._outerHeight,s=kendo._activeElement,l=kendo.support.mobileOS,c=kendo.attr("type"),d=kendo.attr("bind"),u=kendo.attr("format"),h="string",p="{0:"+kendo.getCulture().calendar.patterns.d+"}",f={title:"Title",start:"Start Time",end:"End Time",percentComplete:"% Done",parentId:"Predecessor ID",id:"ID",orderId:"Order ID"},m="
             
            ',g={gridHeader:"k-grid-header",gridContentWrap:"k-grid-content",editCell:"k-edit-cell",iconCollapse:"caret-alt-down",iconExpand:"caret-alt-right"},v=r.GanttList=o.extend({init:function(e,t){0===this.options.columns.length&&this.options.columns.push("title"),o.fn.init.call(this,e,t),this._unbindDataSource(),this._setWidth()},options:{name:"GanttList",autoBind:!1,sortable:!0,selectable:!0,_editCellEvent:"dblclick",_tabCycleStop:!0,navigatable:!1,editable:{move:!0,mode:"incell"},resizable:!1,renderAllRows:!1},destroy:function(){o.fn.destroy.call(this),kendo.destroy(this.element)},closeCell:function(e){var t,n,i=this,o=(i.editor||{}).element;o&&o[0]&&i._isIncellEditable()&&(n=i.dataItem(o),i._cancelEditor(),o.removeClass(g.editCell),t=o.parent().removeClass(g.editRow),i.lockedContent&&i._relatedRow(t).removeClass(g.editRow),e&&i._render(),i.trigger("itemChange",{item:t,data:n,ns:r}),i.lockedContent&&i._adjustRowHeight(t.css("height","")[0],i._relatedRow(t).css("height","")[0]))},insertAfter:function(e,t){if(e&&t){var n=t.orderId,i={parentId:t.parentId};t.parentId===e.parentId&&t.orderId>e.orderId?i.orderId=n:i.orderId=n+1,this.trigger("reorder",{task:e,updateInfo:i})}},insertBefore:function(e,t){if(e&&t){var n=t.orderId,i={parentId:t.parentId};t.parentId===e.parentId&&t.orderId>e.orderId?i.orderId=n-1:i.orderId=n,this.trigger("reorder",{task:e,updateInfo:i})}},_adjustHeight:function(){var e,t=this.element,n=t.find("."+g.gridContentWrap),i=t.find("."+g.gridHeader),r=kendo.support.scrollbar();this._isHeightSet(t)&&(e=t.height()-a(i),n.height(e),this._hasLockedColumns&&(r=this.table[0].offsetWidth>this.table.parent()[0].clientWidth?r:0,this.lockedContent.height(e-r)))},_adjustRowHeight:function(e,t){var n,i=e.offsetHeight,r=t.offsetHeight;i>r?n=i+"px":i').hide().appendTo(r),n[kendo.attr("dateCompare-msg")]=s.message),e('').attr(n).prependTo(r).kendoDateTimePicker({format:o.format})}},_columnFromElement:function(e){var t=e.closest("td"),n=t.parent().children().index(t);return this.columns[n]},_eachColumn:function(e){var i=this,r=i.options.resourcesField,o=this.options.sortable;return e.columns&&(i.hasNestedColumns=!0,e.columns=n(e.columns,this._eachColumn.bind(this))),typeof e===h&&(e={field:e,title:f[e]}),!0===e.editable?e.editable=function(){return!0}:e.editable=function(){return!1},"start"!==e.field&&"end"!==e.field||(e.format=kendo.getCulture().calendar.patterns[e.format]||e.format||p,e.editor||(e.format===p||e.format.toLowerCase().indexOf("h")>-1)&&(e.editor=i._columnEditor(e))),e.field===r&&(e.sortable=!1,e.template=e.template||function(e){for(var t=e.get(r)||[],n=[],i=0;i=r(e.y.velocity)&&e.sender.capture()},_swipemove:function(e){var t=this.options,n=e.touch,i=e.event.timeStamp-n.startTime,o=n.x.initialDelta>0?"right":"left";r(n.x.initialDelta)>=t.minXDelta&&r(n.y.initialDelta)
            '+kendo.htmlEncode(n.start)+": "+kendo.toString(i,o)+"
            "+kendo.htmlEncode(n.end)+": "+kendo.toString(r,o)+"
            "},k=function(e){var t=e.styles,n=e.task,i=e.messages;return'
            '+kendo.htmlEncode(n.title)+'
            '+kendo.toString(n.percentComplete,"p0")+'
            • '+kendo.htmlEncode(i.start)+": "+kendo.toString(n.start,"h:mm tt ddd, MMM d")+"
            • "+kendo.htmlEncode(i.end)+": "+kendo.toString(n.end,"h:mm tt ddd, MMM d")+"
            "},x="
             
            ',C={day:{type:"kendo.ui.GanttDayView"},week:{type:"kendo.ui.GanttWeekView"},month:{type:"kendo.ui.GanttMonthView"},year:{type:"kendo.ui.GanttYearView"}};function S(){var t=kendo._activeElement();t&&"body"!==t.nodeName.toLowerCase()&&e(t).trigger("blur")}var T=kendo.ui.GanttView=t.extend({init:function(e,n){t.fn.init.call(this,e,n),this.title=this.options.title||this.options.name,this.header=this.element.find(v+T.styles.gridHeader),this.content=this.element.find(v+T.styles.gridContent),this.contentWidth=this.content.width(),this._workDays=function(e){var t=[],n=e.workWeekStart;for(t.push(n);e.workWeekEnd!=n;)n>6?n-=7:n++,t.push(n);return t}(this.options),this._headerTree=n.headerTree,this._taskTree=n.taskTree,this._taskTemplate=n.taskTemplate?kendo.template(n.taskTemplate,l({},kendo.Template,n.templateSettings)):null,this._dependencyTree=n.dependencyTree,this._taskCoordinates={},this._currentTime()},destroy:function(){t.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(v+T.styles.dependenciesWrapper).width(this._tableWidth)},_adjustHeight:function(){this.content&&this.content.height(this.element.height()-s(this.header))},createLayout:function(e){var t=this._headers(e),i=this._colgroup(),r=this._headerTree,o=n("tbody",{className:T.styles.tbody},t),a=n("table",{className:T.styles.headerTable,style:{width:this._tableWidth+"px"},role:"presentation"},[i,o]);r.render([a]),this.headerRow=this.header.find("table").first().find("tr").last()},_slotDimensions:function(){for(var e,t,n=this.headerRow[0].children,i=this._timeSlots(),r=0,o=n.length;r=this.start&&(d=this._renderTask(e[D],r,o),this.options.navigatable&&(d.children[0].attr.tabIndex=D?-1:0),i.children.push(d),a[b]&&a[b].length&&(s=c?this._tableWidth-r.left:Math.max(r.width||v.clientWidth,0)+r.left,(l={width:this._tableWidth-(s+k)+"px"})[c?"right":"left"]=s+"px",y&&(l.height=y.cell+"px"),i.children.push(n("div",{className:m.resourcesWrap,style:l},this._renderResources(a[b],w[D%2])))),u=D,h=void 0,p=void 0,p=(h=r.left)+r.width,a.isMilestone()&&(p=(h-=_/2)+_),g[a.id]={start:h,end:p,rowIndex:u}),t.children.push(i),f.push(t);return this._createTable(1,f,{className:T.styles.tasksTable+" "+m.table})},_createTable:function(e,t,i){for(var r,o,a=[],s=0;sn&&(n=e);return Math.round(i*this.options.slotSize/n)},_calculateMilestoneWidth:function(){var t,n,i=T.styles.task+" "+T.styles.taskMilestone,r=e('
            ').css({visibility:"hidden",position:"absolute"});return this.content.append(r),t={width:(n=r[0].getBoundingClientRect()).right-n.left,clientWidth:r[0].clientWidth},r.remove(),t},_calculateResourcesMargin:function(){var t,n=e('
            ').css({visibility:"hidden",position:"absolute"});return this.content.append(n),t=parseInt(n.css(c?"margin-right":"margin-left"),10),n.remove(),t},_calculateTaskBorderWidth:function(){var t,n,i=T.styles.task+" "+T.styles.taskSingle,r=e('
            ').css({visibility:"hidden",position:"absolute"});return this.content.append(r),n=kendo.getComputedStyles(r[0],["border-left-width"]),t=parseFloat(n["border-left-width"],10),r.remove(),t},_renderTask:function(t,i,r){var o,a,s,l,d,u,h,p,f=this.options.editable,m=i.left,g=T.styles,v=g.taskWrap,_=this.options.calculatedSize,b={},w={className:v,style:{left:m+"px"}},y=[],k=0,x=i.width;return _&&(w.style.height=_.cell+"px"),r&&(l=t.isMilestone()?this._renderPlannedMilestone(i,r):this._renderPlannedSingleTask(i,r,t),y.push(l),c&&r.left<=i.left&&(w.style.left=r.left+"px")),t.summary?(a=this._renderSummary(t,i,r),w.className+=" "+g.taskSummaryWrap):t.isMilestone()?(a=this._renderMilestone(t,i),w.className+=" "+g.taskMilestoneWrap):a=this._renderSingleTask(t,i,r),r&&!t.isMilestone()&&t.plannedStartt.start&&t.plannedEndt.end&&(k=r.left+r.width-i.left-i.width-3+"px"),o.children.push(n("div",{className:g.taskDot+" "+g.taskDotStart})),c&&(k="auto",r&&t.plannedEnd>t.end&&(d=i.left-r.left+"px")),o.children.push(n("div",{className:g.taskDot+" "+g.taskDotEnd,style:{right:k,left:d}}))),t.summary||t.isMilestone()||!f||!1===f.dragPercentComplete||!1===f.update||null!==this._taskTemplate||(s=Math.round(x*t.percentComplete),b[c?"right":"left"]=s+"px",o.children.push(n("div",{className:g.taskDragHandle,style:b}))),o},_renderSingleTask:function(t,o,a){var s,l,d=T.styles,u=[],h=this.options.editable,p=d.task+" "+d.taskSingle,f=o.width;a&&(t.plannedEnd&&t.plannedEnd<=t.start?p+=" "+d.taskDelayed:t.plannedEnd&&t.plannedEnd>t.end?p+=" "+d.taskAdvanced:t.plannedEnd&&t.plannedEnd=t.plannedEnd)&&m.children.push(n("span",{className:d.taskActions,"aria-hidden":"true"},[n("a",{className:d.link+" "+d.taskDelete,href:"#","aria-label":"Delete"},[n(e(kendo.ui.icon(d.iconDelete))[0])])])),!1!==h.resize&&!1!==h.update&&(m.children.push(n("span",{className:d.taskResizeHandle+" "+d.taskResizeHandleWest})),m.children.push(n("span",{className:d.taskResizeHandle+" "+d.taskResizeHandleEast})))),n("div",{className:p,"data-uid":t.uid,role:"treeitem",style:{width:Math.max(f-2*o.borderWidth,0)+"px"}},u)},_renderMilestone:function(e){var t=T.styles,i=t.task+" "+t.taskMilestone;return this.options.showPlannedTasks&&e.plannedEnd&&e.plannedEnde.end&&(i+=" "+t.taskAdvanced),n("div",{className:i,"data-uid":e.uid,role:"treeitem","aria-label":e.title})},_renderSummary:function(e,t,i){var r,o=T.styles,a=t.width,s=o.task+" "+o.taskSummary;return i&&(e.plannedEnd&&e.plannedEnd<=e.start?s+=" "+o.taskDelayed:e.plannedEnd&&e.plannedEnd>e.end?s+=" "+o.taskAdvanced:e.plannedEnd&&e.plannedEnd0!==n&&(l=Math.abs(i)+10),n?(a-=l,l-=1,m()):(m(),a+=l-2),p20&&(s=u-8),s-=1),m(),o+=s-2,u<=20&&(l=n?Math.abs(p-h)-d:d,p0&&(t.css({"margin-right":"auto",width:0}),this._dragHint.find(v+n.taskDotEnd).css({left:0})),e.closest("td").append(this._dragHint)},_updateDragHint:function(e){var t=this._offset(e);this._dragHint.css({left:t})},_removeDragHint:function(){this._dragHint.remove(),this._dragHint=null},_createResizeHint:function(t){var n,i=T.styles,r=this._taskCoordinates[t.id].rowIndex*this._rowHeight,o=this.options,l=o.messages;this._resizeHint=e(function(e){var t=e.styles;return'
            '}({styles:i})).css({top:0,height:this._contentHeight}),this.content.append(this._resizeHint),this._resizeTooltip=e(y({styles:i,start:t.start,end:t.end,messages:l.views,format:o.resizeTooltipFormat})).css({"z-index":"100002",top:0,left:0}),this.content.append(this._resizeTooltip),this._resizeTooltipWidth=a(this._resizeTooltip),(n=r-s(this._resizeTooltip))<0&&(n=r+this._rowHeight),this._resizeTooltipTop=n},_updateResizeHint:function(t,n,i){var r=this._offset(c?n:t),o=this._offset(c?t:n),a=o-r,s=i!==c?r:o,l=this._tableWidth-kendo.support.scrollbar(),d=this._resizeTooltipWidth,u=this.options,h=u.messages,p=this.element.find(v+T.styles.tasksTable).offset().left-this.element.find(v+T.styles.tasksWrapper).offset().left;c&&(r+=p),this._resizeHint.css({left:r,width:a}),this._resizeTooltip&&this._resizeTooltip.remove(),(s-=Math.round(d/2))<0?s=0:s+d>l&&(s=l-d),c&&(s+=p),this._resizeTooltip=e(y({styles:T.styles,start:t,end:n,messages:h.views,format:u.resizeTooltipFormat})).css({"z-index":"100002",top:this._resizeTooltipTop,left:s,"min-width":d}).appendTo(this.content)},_removeResizeHint:function(){this._resizeHint.remove(),this._resizeHint=null,this._resizeTooltip.remove(),this._resizeTooltip=null},_updatePercentCompleteTooltip:function(t,n,i){this._removePercentCompleteTooltip();var r=this._percentCompleteResizeTooltip=e(function(e){var t=e.styles,n=e.text;return"
            '+n+'%
            '}({styles:T.styles,text:i}));kendo.applyStylesFromKendoAttributes(r,["z-index","left"]),r.appendTo(this.element);var o=Math.round(a(r)/2),l=r.find(v+T.styles.callout),c=Math.round(a(l)/2);r.css({top:t-(s(r)+c),left:n-o}),l.css("left",o-c)},_removePercentCompleteTooltip:function(){this._percentCompleteResizeTooltip&&this._percentCompleteResizeTooltip.remove(),this._percentCompleteResizeTooltip=null},_updateDependencyDragHint:function(e,t){this._removeDependencyDragHint(),this._creteDependencyDragHint(e,t)},_creteDependencyDragHint:function(t,n){var i=T.styles,r=n.x-t.x,o=n.y-t.y,a=Math.sqrt(r*r+o*o),s=Math.atan(o/r);r<0&&(s+=Math.PI),e("
            ").css({top:t.y,left:t.x,width:a,"transform-origin":"0% 0","-ms-transform-origin":"0% 0","-webkit-transform-origin":"0% 0",transform:"rotate("+s+"rad)","-ms-transform":"rotate("+s+"rad)","-webkit-transform":"rotate("+s+"rad)"}).appendTo(this.content)},_removeDependencyDragHint:function(){this.content.find(v+T.styles.dependencyHint).remove()},_createTaskTooltip:function(t,n,i){var r=T.styles,o=this.options,a=this.content,l=a.offset(),d=kendo.scrollLeft(a),u=e(n).parents("tr").first(),h=u.offset(),p=o.tooltip&&o.tooltip.template?kendo.template(o.tooltip.template):k,f=c?i-(l.left+d+kendo.support.scrollbar()):i-(l.left-d),m=h.top+s(u)-l.top+a.scrollTop(),g=this._taskTooltip=e('
            ');g.css({"z-index":"100002",left:f,top:m}).appendTo(a).find(v+r.taskContent).append(p({styles:r,task:t,messages:o.messages.views})),this._adjustTooltipDimensions(g,h,l,f,d)},_removeTaskTooltip:function(){this._taskTooltip&&this._taskTooltip.remove(),this._taskTooltip=null},_createOffsetTooltip:function(t,n,i){var r,o,a=T.styles,l=this.content,d=l.offset(),u=kendo.scrollLeft(l),h=n.parents("tr").first(),p=h.offset(),f=c?i-(d.left+u+kendo.support.scrollbar()):i-(d.left-u),m=p.top+s(h)-d.top+l.scrollTop(),g=this._offsetTooltip=e('
            '),v=Math.round((t.end.getTime()-t.plannedEnd.getTime())/6e4),_=this.options.messages.plannedTasks,b=v%60,w=b+" "+_.minutes;v>=60&&(w=(r=v=Math.floor(v/60))+" "+_.hours,0!==b&&(w+=" "+b+" "+_.minutes),v>=24&&(r=v%24,w=(v=Math.floor(v/24))+" "+_.days,0!==r&&(w+=" "+r+" "+_.hours))),g.css({"z-index":"100002",left:f,top:m}).addClass(a.offsetTooltipDelay).appendTo(l).append(""+(o={offsetPrefix:_.offsetTooltipDelay,offsetText:w}).offsetPrefix+": "+o.offsetText+""),this._adjustTooltipDimensions(g,p,d,f,u)},_removeOffsetTooltip:function(){this._offsetTooltip&&this._offsetTooltip.remove(),this._offsetTooltip=null},_createPlannedTooltip:function(t,n,i){var r,o,a,l=T.styles,d=this.content,u=d.offset(),h=kendo.scrollLeft(d),p=n.parents("tr").first(),f=p.offset(),m=c?i-(u.left+h+kendo.support.scrollbar()):i-(u.left-h),g=f.top+s(p)-u.top+d.scrollTop(),v=this._plannedTooltip=e('
            '),_=this.options.messages.editor;v.css({"z-index":"100002",left:m,top:g}).appendTo(d).append((r={plannedStart:_.plannedStart,startDate:kendo.toString(t.plannedStart,"H:mm tt ddd, MMM dd"),plannedEnd:_.plannedEnd,endDate:kendo.toString(t.plannedEnd,"H:mm tt ddd, MMM dd")},o=r.plannedStart,a=r.plannedEnd,'
            '+o+": "+r.startDate+"
            "+a+": "+r.endDate+"
            ")),this._adjustTooltipDimensions(v,f,u,m,h)},_removePlannedTooltip:function(){this._plannedTooltip&&this._plannedTooltip.remove(),this._plannedTooltip=null},_adjustTooltipDimensions:function(e,t,n,i,r){var o,l=this.content,c=l.width();s(e)c&&((i-=o)d&&s.scrollTop(s.scrollTop()+(a+f-d)),th&&ip&&np&&n>h&&t>u||t=n&&e=s&&rt&&(n=t),(r=(i=this._days(e,n)).length)>0&&o.push({start:i[0].start,end:i[r-1].end,span:r}),e=n;return o},_months:function(e,t){var n,i,r,o,a=[];for(e=new Date(e),t=new Date(t);e0&&a.push({start:r[0].start,end:r[o-1].end,span:o}),e=n;return a},_years:function(e,t){var n,i,r=[];for(e=new Date(e),t=new Date(t);e=t&&(n=t),i=(n.getMonth()||12)-e.getMonth(),r.push({start:e,end:n,span:i}),e=n;return r},_slotHeaders:function(e,t){for(var n,i=[],r=0,o=e.length;r
            "),o=T.styles,a=this.element.find(v+o.tasksWrapper),s=this.element.find(v+o.tasksTable);this.content&&this._timeSlots().length&&(this.content.find(".k-current-time").remove(),n<(t=this._timeSlots()[this._slotIndex("start",n)]).start||n>t.end||(a.length&&s.length&&(i+=s.offset().left-a.offset().left),r.css({left:i+"px",top:"0px",width:"1px",height:this._contentHeight+"px"}).appendTo(this.content)))},_getCurrentTime:function(){return new Date},_currentTime:function(){var e=this.options.currentTimeMarker;!1!==e&&void 0!==e.updateInterval&&(this._renderCurrentTime(),this._currentTimeUpdateTimer=setInterval(this._renderCurrentTime.bind(this),e.updateInterval))}});l(!0,T,{styles:{alt:"k-alt k-table-row k-table-alt-row",reset:"k-reset",nonWorking:"k-nonwork-hour",header:"k-header k-table-td",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",headerTable:"k-grid-header-table k-table k-table-md",table:"k-table k-table-md",tbody:"k-table-tbody",tableRow:"k-table-row",tableCell:"k-table-td",task:"k-task",taskSingle:"k-task-single",taskMilestone:"k-task-milestone",taskSummary:"k-task-summary",taskWrap:"k-task-wrap",taskMilestoneWrap:"k-milestone-wrap",taskSummaryWrap:"k-summary-wrap",taskPlanned:"k-task-planned",taskPlannedMoment:"k-task-moment",taskPlannedDuration:"k-task-duration",taskPlannedMomentLeft:"k-moment-left",taskAdvanced:"k-task-advanced",taskDelayed:"k-task-delayed",taskOffset:"k-task-offset",taskOffsetWrap:"k-task-offset-wrap",taskInnerWrap:"k-task-inner-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",iconDelete:"x",taskResizeHandle:"k-resize-handle",taskResizeHandleWest:"k-resize-w",taskResizeHandleEast:"k-resize-e",taskSummaryProgress:"k-task-summary-progress",taskSummaryComplete:"k-task-summary-complete",line:"k-gantt-line",lineHorizontal:"k-gantt-line-h",lineVertical:"k-gantt-line-v",arrowWest:"k-arrow-w",arrowEast:"k-arrow-e",dragHint:"k-drag-hint",dependencyHint:"k-gantt-dependency-hint",tooltipWrapper:"k-tooltip",tooltipContent:"k-tooltip-content",tooltipCallout:"k-callout k-callout-s",callout:"k-callout",marquee:"k-marquee k-gantt-marquee",marqueeColor:"k-marquee-color",offsetTooltipAdvanced:"k-offset-tooltip-advanced",offsetTooltipDelay:"k-offset-tooltip-delayed",plannedTooltip:"k-planned-tooltip"}}),kendo.ui.GanttDayView=T.extend({name:"day",options:{timeHeaderTemplate:function(e){var t=e.start;return kendo.toString(t,"t")},dayHeaderTemplate:_,resizeTooltipFormat:"h:mm tt ddd, MMM d"},range:function(e){var t=this.options.range;this.start=kendo.date.getDate(e.start),this.end=kendo.date.getDate(e.end),(kendo.date.getMilliseconds(e.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(){var e,t,n,i,r=[];n=[];for(var o=0,a=(e=this._days(this.start,this.end)).length;o
            ").append("
            "),c.rowHeight&&(this._calculatedSize=(i="string"==typeof c.rowHeight?c.rowHeight:c.rowHeight+"px",r=e(kendo.format(x,i)),o=l.wrapper.find(v+a.tasksWrapper),kendo.applyStylesFromKendoAttributes(r,["height","visibility"]),o.append(r),t=s(r.find("tr")),n=r.find("td").height(),r.remove(),{row:t,cell:n}))},_domTrees:function(){var e=D.styles,t=kendo.dom.Tree,n=this.wrapper;this._headerTree=new t(n.find(v+e.gridHeaderWrap)[0]),this._taskTree=new t(n.find(v+e.tasksWrapper)[0]),this._dependencyTree=new t(n.find(v+e.dependenciesWrapper)[0])},_views:function(){var e,t,n,i,r,a=this.options.views;this.views={};for(var s=0,c=a.length;sn?l:n,o.trigger("resize",{task:t,start:n,end:i})||s._updateResizeHint(n,i,r)}}),15)).bind("dragend",(function(){o.trigger("resizeEnd",{task:t,resizeStart:r,start:n,end:i}),d()})).bind("dragcancel",(function(){d()})).userEvents.bind("select",(function(){S()})))},_percentResizeDraggable:function(){var e,t,n,i,r,o,s,l,d,u,h=this,p=D.styles,f=this.options.editable,m=function(){h.view()._removePercentCompleteTooltip(),t=null,e=null,h.dragInProgress=!1},g=function(e){var n=t.siblings(v+p.taskDragHandle);n.length||(n=t.closest(v+p.taskWrap).find(v+p.taskDragHandle)),n.css(c?"right":"left",e),t.find(v+p.taskComplete).width(e)};f&&!1!==f.dragPercentComplete&&!1!==f.update&&(this._percentDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:v+p.taskDragHandle,holdToDrag:!1}),this._percentDraggable.bind("dragstart",(function(l){h.trigger("percentResizeStart")?l.preventDefault():((t=l.currentTarget.siblings(v+p.task)).length||(t=l.currentTarget.closest(v+p.taskWrap).find(v+p.task)),e=h._taskByUid(t.attr("data-uid")),s=e.percentComplete,n=t.offset(),i=this.element.offset(),r=t.find(v+p.taskComplete).width(),o=a(t),clearTimeout(h._tooltipTimeout),h.dragInProgress=!0)})).bind("drag",kendo.throttle((function(e){if(h.dragInProgress){u=c?-e.x.initialDelta:e.x.initialDelta;var t=Math.max(0,Math.min(o,r+u));s=Math.round(t/o*100),g(t),l=n.top-i.top,d=n.left+t-i.left,c&&(d+=o-2*t),h.view()._updatePercentCompleteTooltip(l,d,s)}}),15)).bind("dragend",(function(){h.trigger("percentResizeEnd",{task:e,percentComplete:s/100}),m()})).bind("dragcancel",(function(){g(r),m()})).userEvents.bind("select",(function(){S()})))},_createDependencyDraggable:function(){var t,n,i,r=this,o=e(),l=e(),c=D.styles,d=this.options.editable,u=function(){t.css("display","").removeClass(c.hovered),t.parent().removeClass(c.origin),t=null,h(!1),l=e(),o=e(),r.view()._removeDependencyDragHint(),r.dragInProgress=!1},h=function(e){l.hasClass(c.origin)||(l.find(v+c.taskDot).css("display",e?"block":""),o.toggleClass(c.hovered,e))};d&&!1!==d.dependencyCreate&&(this._dependencyDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:v+c.taskDot,holdToDrag:!1}),this._dependencyDraggable.bind("dragstart",(function(e){if(r.trigger("dependencyDragStart"))e.preventDefault();else{(t=e.currentTarget.css("display","block").addClass(c.hovered)).parent().addClass(c.origin);var o=t.offset(),l=r.wrapper.find(v+c.tasksWrapper).offset();n=Math.round(o.left-l.left+s(t)/2),i=Math.round(o.top-l.top+a(t)/2),clearTimeout(r._tooltipTimeout),r.dragInProgress=!0}})).bind("drag",kendo.throttle((function(t){if(r.dragInProgress){r.view()._removeDependencyDragHint();var a=e(kendo.elementUnderCursor(t)),s=r.wrapper.find(v+c.tasksWrapper).offset(),d=t.x.location-s.left,u=t.y.location-s.top;r.view()._updateDependencyDragHint({x:n,y:i},{x:d,y:u}),h(!1),o=a.hasClass(c.taskDot)?a:e(),l=a.closest(v+c.taskWrap),h(!0)}}),15)).bind("dragend",(function(){if(o.length){var e=t.hasClass(c.taskDotStart),n=o.hasClass(c.taskDotStart),i=e?n?3:2:n?1:0,a=t.siblings(v+c.task);a.length||(a=t.closest(v+c.taskWrap).find(v+c.task));var s=r._taskByUid(a.attr("data-uid")),l=o.siblings(v+c.task);l.length||(l=o.closest(v+c.taskWrap).find(v+c.task));var d=r._taskByUid(l.attr("data-uid"));s!==d&&r.trigger("dependencyDragEnd",{type:i,predecessor:s,successor:d})}u()})).bind("dragcancel",(function(){u()})).userEvents.bind("select",(function(){S()})))},_selectable:function(){var t=this,n=D.styles;this.options.selectable&&this.wrapper.on(p+h,v+n.task+","+v+n.taskOffset,(function(i){i.stopPropagation();var r=e(this).attr("data-uid");r||(r=e(this).closest(v+n.taskWrap).find(v+n.task).data("uid")),i.ctrlKey?t.trigger("clear"):t.trigger("select",{uid:r})})).on(p+h,v+n.taskWrap,(function(t){t.stopPropagation(),e(this).css("z-index","0");var i=e(document.elementFromPoint(t.clientX,t.clientY));i.hasClass(n.line)&&i.click(),e(this).css("z-index","")})).on(p+h,v+n.tasksWrapper,(function(){t.selectDependency().length>0?t.clearSelection():t.trigger("clear")})).on(p+h,v+n.line,(function(e){e.stopPropagation(),t.selectDependency(this)}))},select:function(e){var t=this.wrapper.find(e),n=D.styles;return t.length?(this.clearSelection(),t.addClass(n.selected),void(kendo.support.mobileOS&&t.parent().addClass(n.taskWrapActive))):this.wrapper.find(v+n.task+v+n.selected)},selectDependency:function(t){var n,i=this.wrapper.find(t),r=D.styles;return i.length?(this.clearSelection(),this.trigger("clear"),n=e(i).attr("data-uid"),void this.wrapper.find(v+r.line+"[data-uid='"+n+"']").addClass(r.selected)):this.wrapper.find(v+r.line+v+r.selected)},clearSelection:function(){var e=D.styles;this.wrapper.find(v+e.selected).removeClass(e.selected),kendo.support.mobileOS&&this.wrapper.find(v+e.taskWrapActive).removeClass(e.taskWrapActive)},_attachEvents:function(){var t=this,n=D.styles;this.options.editable&&(this.wrapper.on(p+h,v+n.taskDelete,(function(i){t.trigger("removeTask",{uid:e(this).closest(v+n.taskWrap).find(v+n.task).attr("data-uid")}),i.stopPropagation(),i.preventDefault()})).on("keydown"+h,(function(e){var n,i=t.options.editable;e.keyCode===d.DELETE&&i&&!1!==i.dependencyDestroy&&(n=t.selectDependency()).length&&(t.trigger("removeDependency",{uid:n.attr("data-uid")}),t.clearSelection())})),kendo.support.mobileOS?this.touch=this.wrapper.kendoTouch({filter:v+n.task+","+v+n.taskOffset,doubletap:function(i){!1!==t.options.editable.update&&t.trigger("editTask",{uid:e(i.touch.currentTarget).closest(v+n.taskWrap).find(v+n.task).attr("data-uid")})}}).data("kendoTouch"):this.wrapper.on("dblclick"+h,v+n.task+","+v+n.taskOffset,(function(i){!1!==t.options.editable.update&&(t.trigger("editTask",{uid:e(this).closest(v+n.taskWrap).find(v+n.task).attr("data-uid")}),i.stopPropagation(),i.preventDefault())})))},_tooltip:function(){var t,n=this,i=this.options.tooltip,r=D.styles,o=function(e){t=e.clientX};i&&!1===i.visible||(kendo.support.mobileOS?(this.wrapper.on(p+h,v+r.taskDelete,(function(e){e.stopPropagation(),n.view()._removeTaskTooltip()})).on(g+h,v+r.task,(function(t){0===e(t.relatedTarget).parents(v+r.taskWrap,v+r.task).length&&n.view()._removeTaskTooltip()})).on(g+h,v+r.taskOffset,(function(t){0===e(t.relatedTarget).parents(v+r.taskWrap,v+r.task).length&&n.view()._removeOffsetTooltip()})).on(g+h,v+r.taskPlanned,(function(t){0===e(t.relatedTarget).parents(v+r.taskWrap,v+r.task).length&&n.view()._removePlannedTooltip()})),this.touch&&this.touch.bind("tap",(function(t){var i,o=e(t.touch.target),a=t.touch.x.client;o.hasClass(r.task)?(i=n._taskByUid(o.attr("data-uid")),n.view()._taskTooltip&&n.view()._removeTaskTooltip(),n.view()._createTaskTooltip(i,o,a)):(i=n._taskByUid(o.closest(v+r.taskWrap).find(v+r.task).attr("data-uid")),n.view()._offsetTooltip&&n.view()._removeOffsetTooltip(),n.view()._createOffsetTooltip(i,o,a))})).bind("doubletap",(function(){n.view()._removeTaskTooltip(),n.view()._removeOffsetTooltip()}))):this.wrapper.on(m+h,v+r.task,(function(){var i=this,r=n._taskByUid(e(this).attr("data-uid"));n.dragInProgress||(n._tooltipTimeout=setTimeout((function(){n.view()._createTaskTooltip(r,i,t)}),800),e(this).on(f,o))})).on(g+h,v+r.task,(function(){clearTimeout(n._tooltipTimeout),n.view()._removeTaskTooltip(),e(this).off(f,o)})).on(m+h,v+r.taskOffset,(function(){var i=e(this).closest(v+r.taskWrap).find(v+r.task),a=n._taskByUid(i.attr("data-uid"));n.dragInProgress||(n._offsetTooltipTimeout=setTimeout((function(){n.view()._createOffsetTooltip(a,i,t)}),800),e(this).on(f,o))})).on(g+h,v+r.taskOffset,(function(){clearTimeout(n._offsetTooltipTimeout),n.view()._removeOffsetTooltip(),e(this).off(f,o)})).on(m+h,v+r.taskPlanned,(function(){var i=e(this).closest(v+r.taskWrap).find(v+r.task),a=n._taskByUid(i.attr("data-uid"));n._plannedTooltipTimeout=setTimeout((function(){n.view()._createPlannedTooltip(a,i,t)}),800),e(this).on(f,o)})).on(g+h,v+r.taskPlanned,(function(){clearTimeout(n._plannedTooltipTimeout),n.view()._removePlannedTooltip(),e(this).off(f,o)})))},_setPlanned:function(e){this.options.showPlannedTasks=e,this.view().options.showPlannedTasks=e}});l(!0,D,{styles:{wrapper:"k-timeline k-grid",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",taskOffset:"k-task-offset",taskOffsetWrap:"k-task-offset-wrap",taskPlanned:"k-task-planned",line:"k-gantt-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-hover",selected:"k-selected",origin:"k-origin"}})}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.keys,r="matchMedia"in window,o=n.support.mobileOS,a=n.ui.Widget,s=n.htmlEncode,l=n.data.ObservableObject,c=n.data.ObservableArray,d=n.data.Query,u=Array.isArray,h=n.isFunction,p=e.extend,f=e.isPlainObject,m=n._outerWidth,g=n._outerHeight,v=".kendoGantt",_="tabIndex",b="string",w=".",y=function(e){var t=e.label,n=e.styles,i=e.views;return'"},k=[{data:"add",text:"addChild"},{data:"insert-before",text:"insertBefore"},{data:"insert-after",text:"insertAfter"}],x={wrapper:"k-gantt",plannedTasks:"k-gantt-planned",rowHeight:"k-gantt-rowheight",content:"k-gantt-content",listWrapper:"k-gantt-treelist",list:"k-gantt-treelist",timelineWrapper:"k-gantt-timeline",timeline:"k-gantt-timeline",splitBar:"k-splitbar",popupWrapper:"k-list-container",popupList:"k-list k-reset",resizeHandle:"k-resize-handle",icon:"k-icon",item:"k-item",line:"k-gantt-line",buttonDelete:"k-gantt-delete",buttonCancel:"k-gantt-cancel",buttonSave:"k-gantt-update",buttonToggle:"k-gantt-toggle",buttonDefaults:"k-button-md k-rounded-md k-button-solid",primary:"k-button-solid-primary",hovered:"k-hover",selected:"k-selected",focused:"k-focus",focusedCell:"k-focus",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",tasks:"k-gantt-tasks",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",button:"k-button",editField:"k-edit-field",editLabel:"k-edit-label",resourcesField:"k-gantt-resources"},toolbar:{headerWrapper:"k-gantt-header k-gantt-toolbar",footerWrapper:"k-gantt-footer k-gantt-toolbar",toolbar:"k-gantt-toolbar",views:"k-gantt-views",viewsWrapper:"k-gantt-views-wrapper",viewsDropdown:"k-views-dropdown",button:"k-button",buttonToggle:"k-gantt-toggle",buttonDefaults:"k-button-md k-rounded-md k-button-solid",iconPlus:"plus",iconPdf:"file-pdf",iconToggle:"layout-1-by-4",viewButton:"k-view",link:"k-link",pdfButton:"k-gantt-pdf",appendButton:"k-gantt-create"}};function C(e){return"["+n.attr("uid")+(e?"='"+e+"']":"]")}function S(t,i){var r=t.parents("["+n.attr("role")+'="gantt"]'),o=[],a=e(r).parentsUntil("body").filter((function(e,t){return"visible"!=n.getComputedStyles(t,["overflow"]).overflow})).add(window);t.attr(_,0),i&&a.each((function(t,n){o[t]=e(n).scrollTop()}));try{t[0].setActive()}catch(e){t[0].focus()}i&&a.each((function(t,n){e(n).scrollTop(o[t])}))}var T=a.extend({init:function(e,t,i){u(t)&&(t={dataSource:t}),a.fn.init.call(this,e,t),i&&(this._events=i),this._wrapper(),this._resources(),this.options.views&&this.options.views.length||(this.options.views=["day","week","month"]),this._timeline(),this._processDefaults(),this._toolbar(),this._footer(),this._splitter(),this._adjustDimensions(),this._preventRefresh=!0,this.view(this.timeline._selectedViewName),this._preventRefresh=!1,this._dataSource(),this._assignments(),this._list(),this._dependencies(),this._scrollable(),this._dataBind(),this._attachEvents(),this._createEditor(),n.notify(this)},events:["dataBinding","dataBound","add","edit","remove","cancel","save","change","navigate","moveStart","move","moveEnd","resizeStart","resize","resizeEnd","columnHide","columnReorder","columnResize","columnShow","togglePlannedTasks"],options:{name:"Gantt",autoBind:!0,navigatable:!0,selectable:!0,editable:!0,resizable:!1,columnResizeHandleWidth:3,columns:[],views:[],dataSource:{},dependencies:{},resources:{},assignments:{},taskTemplate:null,messages:{save:"Save",cancel:"Cancel",destroy:"Delete",deleteTaskConfirmation:"Are you sure you want to delete this task?",deleteDependencyConfirmation:"Are you sure you want to delete this dependency?",deleteTaskWindowTitle:"Delete task",deleteDependencyWindowTitle:"Delete dependency",selectView:"Select view",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",toggle:"Toggle pane"},editor:{editorTitle:"Task",resourcesEditorTitle:"Resources",title:"Title",start:"Start",end:"End",plannedStart:"Planned Start",plannedEnd:"Planned End",percentComplete:"Complete",resources:"Resources",assignButton:"Assign",resourcesHeader:"Resources",unitsHeader:"Units",parent:"Parent",addNew:"Add",name:"Name",percentCompleteHint:"value from 0 to 1",remove:"Remove",actualStart:"Actual Start",actualEnd:"Actual End",parentOptionLabel:"-None-",general:"General",predecessors:"Predecessors",successors:"Successors",other:"Other",dependencyType:"Type"},plannedTasks:{switchText:"Planned Tasks",offsetTooltipAdvanced:"Met deadline earlier",offsetTooltipDelay:"Delay",seconds:"seconds",minutes:"minutes",hours:"hours",days:"days"}},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,showPlannedTasks:!1},select:function(e){var t=this.list;if(!e)return t.select();typeof e===b&&(e=t.content.find(e)),t.select(e),this._selectionUpdate()},clearSelection:function(){this.list.clearSelection(),this._selectionUpdate()},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.toolbar&&this.toolbar.getKendoToolBar()&&this.toolbar.getKendoToolBar().destroy(),this.footer&&this.footer.getKendoToolBar()&&this.footer.getKendoToolBar().destroy(),this._editor&&this._editor.destroy(),this._resourceEditorWindow&&this._resourceEditorWindow.destroy(),this._resizeDraggable&&this._resizeDraggable.destroy(),this.layout&&this.layout.getKendoSplitter()&&this.layout.getKendoSplitter().destroy(),this.toolbar.off(v),r&&(this._mediaQuery.removeListener(this._mediaQueryHandler),this._mediaQuery=null),e(window).off("resize"+v,this._resizeHandler),e(this.wrapper).off(v),this.toolbar=null,this.footer=null,n.destroy(this.element)},setOptions:function(t){var i=n.deepExtend({},this.options,t),r=this._events;if(!t.views){var o=this.view().name;i.views=e.map(this.options.views,(function(e){var t=f(e),n=t?"string"!=typeof e.type?e.title:e.type:e;return o===n?t?e.selected=!0:e={type:n,selected:!0}:t&&(e.selected=!1),e}))}t.dataSource||(i.dataSource=this.dataSource),t.dependencies||(i.dependencies=this.dependencies),t.resources||(i.resources=this.resources),t.assignments||(i.assignments=this.assignments),this.destroy(),this.element.empty(),this.options=null,this.init(this.element,i,r),a.fn._setEvents.call(this,i)},_attachEvents:function(){this._resizeHandler=this.resize.bind(this,!1),e(window).on("resize"+v,this._resizeHandler),r&&this._mediaQueryHandler({matches:this._mediaQuery.matches})},_splitter:function(){this.splitter=this.layout.kendoSplitter({navigatable:this.options.navigatable,orientation:"horizontal",panes:[{collapsible:!1,scrollable:!1,label:"Gantt List"},{collapsible:!1,scrollable:!1,label:"Gantt Timeline"}]}).getKendoSplitter(),this.options.listWidth&&this.splitter.size(".k-pane:first",this.options.listWidth)},_wrapper:function(){var t=T.styles,n=this.options,i=n.height,r=n.width;this.wrapper=this.element.addClass(t.wrapper).attr("role","application"),this.layout=e("
            ").appendTo(this.wrapper).append("
            ").append("
            "),n.showPlannedTasks&&this.wrapper.addClass(t.plannedTasks),i&&this.wrapper.css("height",i),r&&this.wrapper.css("width",r),n.rowHeight&&this.wrapper.addClass(t.rowHeight),this.treelistWrapper=this.wrapper.find(w+t.list),this.timelineWrapper=this.wrapper.find(w+t.timeline),this.treelistWrapper.css("width",n.listWidth),this.timelineWrapper.css("width",this.wrapper.width()-this.treelistWrapper.outerWidth())},_viewClickHandler:function(e){var t=this.list,i=e.target.attr(n.attr("name"));t.editor&&!t.editor.end()||(this.trigger("navigate",{view:i})?e.preventDefault():this.view(i))},_togglePane:function(e){var t=this,n=t.treelistWrapper,i=t.timelineWrapper,r=w+x.gridContent;e.preventDefault(),n.is(":visible")?(n.addClass("k-hidden"),i.removeClass("k-hidden"),t.refresh(),i.find(r).scrollTop(t.scrollTop)):(n.removeClass("k-hidden"),i.addClass("k-hidden"),n.find(r).scrollTop(t.scrollTop)),t._resize()},_processDefaults:function(){var t=this,i=t.timeline.views,r=n.ns,o=[],a=T.styles.toolbar,s=this.options.messages.actions,l={append:{name:"append",type:"dropDownButton",menuButtons:k.map((function(e){return{text:s[e.text],attributes:{"data-type":e.data}}})),icon:a.iconPlus,attributes:{class:a.appendButton},click:t._addClickHandler.bind(t),open:t._openAddClickHandler.bind(t)},pdf:{name:"pdf",type:"button",attributes:{class:a.pdfButton},icon:a.iconPdf,click:t.saveAsPDF.bind(t)},toggle:{name:"toggle",type:"button",showText:"overflow",attributes:{class:"k-gantt-toggle"},icon:a.iconToggle,click:t._togglePane.bind(t)},switchLabel:{template:""},plannedTasks:{type:"component",component:"Switch",element:"",componentOptions:{checked:t.options.showPlannedTasks,change:t._togglePlannedTasks.bind(t),messages:{checked:"",unchecked:""}}},viewsDdl:{template:y({views:t.timeline.views,styles:a,label:t.options.messages.selectView})},view:{name:"view",type:"button",togglable:!0,group:"views"},viewsGroup:{type:"buttonGroup",attributes:{class:a.views}}};Object.keys(i).map((function(t){var n=e.extend(!0,{},l.view);n.text=i[t].title,n.attributes={class:"k-view-"+t.toLowerCase()},n.attributes["data"+r+"-name"]=t,l[t]=n,o.push(t)})),Object.values(l).map((function(e){"view"===e.name&&(e.click=t._viewClickHandler.bind(t))})),l.viewsGroup.buttons=o,t._viewsButtons=o,t.defaultCommands=l},_processTools:function(t){var n=this.options.editable,i=[],r=["toggle"],o=!1,a=this.defaultCommands;return Array.isArray(t)?i=t:n&&!1!==n.create&&r.push("append"),i.map((function(t){"plannedTasks"!==t&&"plannedTasks"!==t.name||(o=!0,r.push({type:"spacer"}),r.push("switchLabel")),a[t]||a[t.name]||t.template||(t=typeof t===b?{name:t,type:"button",text:t,attributes:{class:"k-gantt-"+t}}:e.extend({},{type:"button",text:t.name,attributes:{class:"k-gantt-"+t.name}},t)),r.push(t)})),o||r.push({type:"spacer"}),this._viewsButtons&&this._viewsButtons.length>0&&(this._viewsButtons.length>1&&r.push("viewsDdl"),r.push("viewsGroup")),r},_mediaQueryHandler:function(e){var t=this,n=t.layout.find(".k-splitbar"),i=t.layout.getKendoSplitter(),r=t.treelistWrapper,o=t.timelineWrapper,a=w+x.gridContent,s=t.toolbar,l=s.getKendoToolBar();e.matches?(r.addClass("k-hidden"),n.addClass("k-hidden"),i._suppressResize=!0,l.hide(s.find(".k-gantt-views")),l.show(s.find(".k-views-dropdown")),r.width("100%")):(i._suppressResize=!1,r.removeClass("k-hidden"),n.removeClass("k-hidden"),o.removeClass("k-hidden"),l.show(s.find(".k-gantt-views")),l.hide(s.find(".k-views-dropdown")),r.width(r.outerWidth()),o.find(a).scrollTop(t.scrollTop)),t._resize()},_toolbar:function(){var t,i,o=this,a=T.styles,s=w+a.toolbar.viewsDropdown,l=this.options.toolbar;typeof l===b&&(l=n.template(l).bind(this)),t=h(l)?this._processTools([{template:l({})}]):this._processTools(l),i=e("
            "),this.wrapper.prepend(i),this.toolbar=i,i.kendoToolBar({resizable:!1,tools:t,size:"medium",defaultTools:this.defaultCommands,parentMessages:this.options.messages.actions}),r&&(this._mediaQuery=window.matchMedia("(max-width: 480px)"),this._mediaQuery.addListener(this._mediaQueryHandler.bind(this))),i.on("change"+v,s,(function(){var t=o.list,n=e(this).val();t.editable&&t.editable.trigger("validate")||o.trigger("navigate",{view:n})||o.view(n)})),this.toggleSwitch=i.find("input.k-gantt-planned-switch").data("kendoSwitch")},_footer:function(){var t=this.options.editable;if(t&&!1!==t.create){var n=T.styles.toolbar,i=this.options.messages.actions,r=e("
            ");this.wrapper.append(r),this.footer=r,r.kendoToolBar({resizable:!1,size:"medium",tools:["append"],defaultTools:{append:p(!0,{},this.defaultCommands.append,{direction:"up",animation:{open:{effects:"slideIn:up"}}})},parentMessages:i})}},_adjustDimensions:function(){var e=this.element,t=g(this.toolbar),n=this.footer?g(this.footer):0,i=e.height(),r=e.width(),o=this.treelistWrapper.is(":visible"),a=this.layout.find(".k-splitbar"),s=a.is(":visible")?m(a):0,l=o?m(this.treelistWrapper):0,c=r-(l+s);this.layout.children().height(i-(t+n)),this.timelineWrapper.width(c),o||this.timelineWrapper.css("left",0),rtd:visible").eq(o);n.list._setCurrent(e,!1,!0)}n._tabPressed=!1}))),n.updatedValues=null,n.updateDuration=null}})).bind("change",(function(){n.trigger("change"),n._selectionUpdate()})).bind("navigate",(function(e){var t,i=e.sender.current();n._scrollTo(i),n.timeline.element.find("div.k-task").attr("tabindex","-1"),t=i.closest("tr").attr("data-uid"),n.timeline.element.find("div.k-task[data-uid='"+t+"']").attr("tabindex","0")})).bind("expand",(function(e){e.preventDefault(),e.model.set("expanded",!0)})).bind("collapse",(function(e){e.preventDefault(),e.model.set("expanded",!1)})).bind("dragend",(function(e){var t,i,r=n.dataSource;"over"===e.position&&(r.cancelChanges(),i={parentId:e.source.parentId},t=r.get(e.source.id),n.trigger("save",{task:t,values:i})||r.update(t,i),r.sync())})).bind("dataBound",(function(){0===n.dataSource.sort().length&&n.dataSource.sort([{field:"orderId",dir:"asc"}])})).bind("reorder",(function(e){n._updateTask(e.task,e.updateInfo)}))},_selectionUpdate:function(){var e=this,t=e.list.select();t.length?e.timeline.select("[data-uid='"+t.attr("data-uid")+"']"):e.timeline.clearSelection()},_list:function(){var e=T.styles,t=this.wrapper.find(w+e.list).find("> div"),i=this._getListOptions();this._attachResourceEditor(i.columns),this.list=new n.ui.GanttList(t,i),this._attachListEvents()},_timeline:function(){var e=this,t=T.styles,i=function(e){return delete e.name,delete e.prefix,delete e.remove,delete e.edit,delete e.add,delete e.navigate,e}(p(!0,{resourcesField:this.resources.field},this.options)),r=this.wrapper.find(w+t.timeline+" > div");this.timeline=new n.ui.GanttTimeline(r,i),this.timeline.bind("navigate",(function(n){var i=n.view.replace(/\./g,"\\.").toLowerCase(),r=e.toolbar.find(w+t.toolbar.views),o=r.getKendoButtonGroup();o&&o.select(r.find(w+t.toolbar.viewButton+"-"+i)),e.toolbar.find(w+t.toolbar.viewsDropdown).val(n.view),e.refresh()})).bind("moveStart",(function(t){var n=e.list.editor;!n||n.end()?e.trigger("moveStart",{task:t.task})&&t.preventDefault():t.preventDefault()})).bind("move",(function(t){var n=t.task,i=t.start,r=new Date(i.getTime()+n.duration());e.trigger("move",{task:n,start:i,end:r})&&t.preventDefault()})).bind("moveEnd",(function(t){var n=t.task,i=t.start,r=new Date(i.getTime()+n.duration());e.trigger("moveEnd",{task:n,start:i,end:r})||e._updateTask(e.dataSource.getByUid(n.uid),{start:i,end:r})})).bind("resizeStart",(function(t){var n=e.list.editor;!n||n.end()?e.trigger("resizeStart",{task:t.task})&&t.preventDefault():t.preventDefault()})).bind("resize",(function(t){e.trigger("resize",{task:t.task,start:t.start,end:t.end})&&t.preventDefault()})).bind("resizeEnd",(function(t){var n=t.task,i={};t.resizeStart?i.start=t.start:i.end=t.end,e.trigger("resizeEnd",{task:n,start:t.start,end:t.end})||e._updateTask(e.dataSource.getByUid(n.uid),i)})).bind("percentResizeStart",(function(t){var n=e.list.editor;n&&!n.end()&&t.preventDefault()})).bind("percentResizeEnd",(function(t){e._updateTask(e.dataSource.getByUid(t.task.uid),{percentComplete:t.percentComplete})})).bind("dependencyDragStart",(function(t){var n=e.list.editor;n&&!n.end()&&t.preventDefault()})).bind("dependencyDragEnd",(function(t){var n=e.dependencies._createNewModel({type:t.type,predecessorId:t.predecessor.id,successorId:t.successor.id});e._createDependency(n)})).bind("select",(function(t){var n,i=e.list.editor,r=e.select();i&&i.end(),r&&r.length&&(n=r.data("uid")),n!==t.uid&&(e.select("[data-uid='"+t.uid+"']"),e.trigger("change"))})).bind("editTask",(function(t){var n=e.list.editor;n&&!n.end()||e.editTask(t.uid)})).bind("clear",(function(){e.clearSelection(),e.trigger("change")})).bind("removeTask",(function(t){var n=e.list.editor;n&&!n.end()||e.removeTask(e.dataSource.getByUid(t.uid))})).bind("expand",(function(t){var n=e.dataSource.getByUid(t.uid);n.summary&&!n.get("expanded")?n.set("expanded",!0):t.preventDefault()})).bind("collapse",(function(t){var n=e.dataSource.getByUid(t.uid);n.summary&&n.get("expanded")?n.set("expanded",!1):t.preventDefault()})).bind("removeDependency",(function(t){var n=e.list.editor;n&&!n.end()||e.removeDependency(e.dependencies.getByUid(t.uid))}))},_dataSource:function(){var e=this.options.dataSource;e=u(e)?{data:e}:e,this.dataSource&&this._refreshHandler?this.dataSource.unbind("change",this._refreshHandler).unbind("progress",this._progressHandler).unbind("error",this._errorHandler):(this._refreshHandler=this.refresh.bind(this),this._progressHandler=this._requestStart.bind(this),this._errorHandler=this._error.bind(this)),this.dataSource=n.data.GanttDataSource.create(e).bind("change",this._refreshHandler).bind("progress",this._progressHandler).bind("error",this._errorHandler)},_dependencies:function(){var e=this.options.dependencies||{},t=u(e)?{data:e}:e;this.dependencies&&this._dependencyRefreshHandler?this.dependencies.unbind("change",this._dependencyRefreshHandler).unbind("error",this._dependencyErrorHandler):(this._dependencyRefreshHandler=this.refreshDependencies.bind(this),this._dependencyErrorHandler=this._error.bind(this)),this.dependencies=n.data.GanttDependencyDataSource.create(t).bind("change",this._dependencyRefreshHandler).bind("error",this._dependencyErrorHandler)},_resources:function(){var e=this.options.resources,t=e.dataSource||{};this.resources={field:"resources",dataTextField:"name",dataColorField:"color",dataFormatField:"format"},p(this.resources,e),this.resources.dataSource=n.data.DataSource.create(t)},_assignments:function(){var e=this.options.assignments,t=e.dataSource||{};this.assignments?this.assignments.dataSource.unbind("change",this._assignmentsRefreshHandler):this._assignmentsRefreshHandler=this.refresh.bind(this),this.assignments={dataTaskIdField:"taskId",dataResourceIdField:"resourceId",dataValueField:"value"},p(this.assignments,e),this.assignments.dataSource=n.data.DataSource.create(t),this.assignments.dataSource.bind("change",this._assignmentsRefreshHandler)},_createEditor:function(){var e=this;(this._editor=new n.gantt.PopupEditor(this.wrapper,p({},this.options,{target:this,resources:{field:this.resources.field,editor:this._createResourceEditor.bind(this)}}))).bind("cancel",(function(t){var n=e.dataSource.getByUid(t.model.uid);e.trigger("cancel",{container:t.container,task:n})?t.preventDefault():(e.dependencies&&e.dependencies.filter({}),e.cancelTask(),e.options.navigatable&&e.timeline.element.find('div[data-uid="'+t.model.uid+'"]').focus())})).bind("edit",(function(t){var n=e.dataSource.getByUid(t.model.uid);e.trigger("edit",{container:t.container,task:n})&&t.preventDefault()})).bind("save",(function(t){var n=e.dataSource.getByUid(t.model.uid);e.saveTask(n,t.updateInfo,t.updateDependencies)})).bind("remove",(function(t){e.removeTask(t.model.uid)})).bind("close",(function(t){e.options.navigatable&&e.element.find('div[data-uid="'+t.window.attr("data-uid")+'"]').focus()}))},_resourcePopupEditor:function(t,i){var r,o,a=this,l=a._createResourceEditor(e("
            "),i),c=x.popup,d=a.element,u=e(n.format('
            ')).appendTo(d),h=a.options.messages;return u.append(l.wrapper),r=e('
            '),u.append(r),r.append(e("").kendoButton({name:"save",themeColor:"primary",icon:"save",click:function(){l.updateModel()&&(l.trigger("save",{model:l.model}),a._updateAssignments(l.model.get("id"),l.model.get(a.resources.field)),o.trigger("close"),o.close())}})),r.append(e("").kendoButton({name:"cancel",icon:"cancel",click:function(){o.trigger("close"),o.close()}})),this._resourceEditorWindow=o=u.kendoWindow({modal:!0,resizable:!1,draggable:!0,visible:!1,title:h.editor.resourcesEditorTitle,deactivate:function(){l.destroy(),o.destroy(),o.element.closest(".k-window").remove()}}).data("kendoWindow"),o.center().open(),l},_createResourceEditor:function(e,t){var i=t instanceof l?t:t.model,r=this.options.messages,o=this.resources.field,a={step:.01,min:.01,max:1},s=this.assignments.dataSource.options.schema.model,c=this.resources.dataTextField,d=this.resources.dataSource.view();return s&&s.fields.Units&&s.fields.Units.validation&&p(!0,a,s.fields.Units.validation),this._resourceEditor=new n.gantt.ResourceEditor(e,{resourcesField:o,unitsValidation:a,resources:d.map((function(e){return{value:e.id,text:e[c]}})),model:i,messages:p({},r.editor)})},view:function(e){return this.timeline.view(e)},range:function(e){var t=this.dataSource,n=this.view(),i=this.timeline;return e&&(n.options.range={start:e.start,end:e.end},i._render(t.taskTree()),i._renderDependencies(this.dependencies.view())),{start:n.start,end:n.end}},date:function(e){var t=this.view();return e&&(t.options.date=e,t._scrollToDate(e)),t.options.date},dataItem:function(e){if(!e)return null;var t=this.list,n=t.element.find(e);return t._modelFromElement(n)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.list.setDataSource(this.dataSource),this.options.autoBind&&e.fetch()},setDependenciesDataSource:function(e){this.options.dependencies=e,this._dependencies(),this.options.autoBind&&e.fetch()},items:function(){return this.wrapper.children(".k-task")},_updateAssignments:function(e,n){for(var i,r,o,a=this.assignments.dataSource,s=this.assignments.dataTaskIdField,l=this.assignments.dataResourceIdField,c=!1,u=new d(a.view()).filter({field:s,operator:"eq",value:e}).toArray();u.length;){i=u[0];for(var h=0,p=n.length;h0&&(d=!0):c=!0)})),s&&l&&l.end()&&(c||d||i)?o.trigger("save",{task:e,values:n,updateDependencies:i})?(e&&e.dirty&&(o.dataSource.cancelChanges(e),o._preventRefresh=!1,o.refresh()),o.dependencies&&o.dependencies.cancelChanges()):(c&&(o._preventRefresh=!0,o.dataSource.update(e,n)),d&&this._updateAssignments(e.get("id"),n[u]),o._syncDataSource(),this.dependencies&&this._updateDependency(i),this._editor.close()):l&&l.end()&&this._editor.close()},_updateDependency:function(e){var t=this;this.dependencies.filter({}),e&&(e.created.map((function(e){t._preventDependencyRefresh=!0,t.dependencies.add(e),t._preventDependencyRefresh=!1})),e.destroyed.map((function(e){t.dependencies.remove(e)}))),this.dependencies.sync()},_updateTask:function(e,t){var n=this,i=n.resources.field;n.trigger("save",{task:e,values:t})?(e&&e.dirty&&(n.dataSource.cancelChanges(e),n._preventRefresh=!1,n.refresh()),n.dependencies&&n.dependencies.cancelChanges()):(t&&(n._preventRefresh=!0,n.dataSource.update(e,t),t[i]&&n._updateAssignments(e.get("id"),t[i])),n._syncDataSource())},_updateAssignment:function(e,t){var n=this.assignments.dataValueField;e.set(n,t)},removeTask:function(e){var t=this,n="string"==typeof e?this.dataSource.getByUid(e):e;n&&this._taskConfirm((function(e){e||t._removeTask(n)}),n)},_createTask:function(e,n){if(!this.trigger("add",{task:e,dependency:null})){var i=this.dataSource;this._preventRefresh=!0,n===t?i.add(e):i.insert(n,e),this._scrollToUid=e.uid,this._syncDataSource()}},_createDependency:function(e){this.trigger("add",{task:null,dependency:e})||(this._preventDependencyRefresh=!0,this.dependencies.add(e),this._preventDependencyRefresh=!1,this.dependencies.sync())},_createAssignment:function(e,t){var n=this.assignments,i=n.dataSource,r=n.dataTaskIdField,o=n.dataResourceIdField,a=n.dataValueField,s=i._createNewModel();s[r]=t,s[o]=e.get("id"),s[a]=e.get("value"),i.add(s)},removeDependency:function(e){var t=this,n="string"==typeof e?this.dependencies.getByUid(e):e;n&&this._dependencyConfirm((function(e){e||t._removeDependency(n)}),n)},_removeTaskDependencies:function(e,t){this._preventDependencyRefresh=!0;for(var n=0,i=t.length;n=0&&(e=this.list.element.find("tr"+C(r||t)+" > td").eq(o),this._current(e)),this._scrollToUid=null,a&&(this._selected=a,this.select("[data-uid="+a+"]")),this.trigger("dataBound"))}},refreshDependencies:function(){this._preventDependencyRefresh||this.trigger("dataBinding")||(this.timeline._renderDependencies(this.dependencies.view()),this.trigger("dataBound"))},_assignResources:function(e){for(var t,i,r=this.resources,o=this.assignments,a=(t=o.dataSource.view(),i={field:o.dataTaskIdField},t=new d(t).group(i).toArray()),s=function(e,t){var i=e.get("id");n.setter(r.field)(e,new c([]));for(var o=0,s=a.length;o.k-icon,.k-svg-icon,k-svg-icon,svg,path,textarea,span.k-icon:not(.k-i-none),span.k-svg-icon:not(.k-svg-i-none),span.k-link,.k-input,.k-multiselect-wrap,.k-input-value-text,.k-input-inner");n.ctrlKey||!r&&!o||i||(t._focusTimeout=setTimeout((function(){S(t.list.content.find("table"),!0)}),2))})).on("keydown"+v,function(t){var n,r,o,s=t.keyCode,l=this,c=e(t.target),d=[l.toolbar,l.layout.find(".k-splitbar"),l.layout.find(".k-gantt-treelist"),l.layout.find(".k-gantt-timeline")];l._tabPressed=!1,l.footer&&d.push(l.footer);for(var u=0;u=0;u--)if(!d[u].hasClass("k-hidden")){n=c.attr("data-uid"),2===u&&n?(r=l.list.content.find("tr[data-uid='"+n+"']").find("td").last(),l.list.current(r),S(l.list.content.find("table"),!0)):d[u].find("[tabindex=0]:visible").focus(),t.preventDefault();break}}else for(u=o+1;u=49&&r<=57&&"input"!==e.target.tagName.toLowerCase()&&t.view(t.timeline._viewByIndex(r-49))})):h.on("focus"+v,(function(){e(t.toolbar.find(w+a.focused)).removeClass(a.focused)})).on("blur"+v,(function(){this==d&&e(this).attr(_,-1)}))},_dataBind:function(){var t=this;if(t.options.autoBind){this._preventRefresh=!0,this._preventDependencyRefresh=!0;var n=e.map([this.dataSource,this.dependencies,this.resources.dataSource,this.assignments.dataSource],(function(e){return e.fetch()}));e.when.apply(null,n).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()},_togglePlannedTasks:function(e){var t=this.timeline;this.trigger("togglePlannedTasks",{showPlannedTasks:!t.options.showPlannedTasks})?e.preventDefault():(this.wrapper.toggleClass(x.plannedTasks),t._setPlanned(!t.options.showPlannedTasks),t._render(this.dataSource.taskTree()),t._renderDependencies(this.dependencies.view()))}});n.PDFMixin&&(n.PDFMixin.extend(T.fn),T.fn._drawPDF=function(){var e=T.styles,t=this.wrapper.find(w+e.list+" "+w+e.gridContent+">table").width(),n=this.wrapper.clone();return n.find(w+e.list).css("width",t),this._drawPDFShadow({content:n},{avoidLinks:this.options.pdf.avoidLinks})}),n.ui.plugin(T),p(!0,T,{styles:x})}(window.kendo.jQuery);kendo;!function(e,t){var n=window.kendo,i=n.ui.Widget,r=n.data.DataSource,o=n.effects.Transition,a=n.keys,s=Array.isArray,l=n.htmlEncode,c="vertical",d="transitionEnd",u="k-timeline-flag-wrap",h="k-timeline-track-item",p="k-timeline-scrollable-wrap",f=".k-timeline-track-item:not(.k-timeline-flag-wrap)",m=".kendoTimeline",g="change",v=function(e){var t=e.titleField,n=e.subtitleField,i=e.descriptionField,r=e.imagesField,o=e.actionsField,a=e.altField,s=e.data;return'
            '+(s[t]?'
            '+l(s[t])+"
            ":"")+(s[n]?'
            '+l(s[n])+"
            ":"")+'
            '+(s[i]?"

            "+l(s[i])+"

            ":"")+(s[r]&&s[r].length>0?'':"")+"
            "+(s[o]&&s[o].length>0?'
            '+s[o].map((function(e){return''+l(e.text)+""})).join("")+"
            ":"")+"
            "},_=function(e){var t=e.titleField,i=e.subtitleField,r=e.descriptionField,o=e.imagesField,a=(e.navigatable,e.collapsibleEvents,e.actionsField),s=e.altField,c=e.data;return'
            '+(c[t]?''+l(c[t])+"":"")+''+n.ui.icon({icon:"chevron-right",iconClass:"k-button-icon"})+"
            "+(c[i]?'
            '+l(c[i])+"
            ":"")+'
            '+(c[r]?"

            "+l(c[r])+"

            ":"")+(c[o]&&c[o].length>0?'':"")+"
            "+(c[a]&&c[a].length>0?'
            '+c[a].map((function(e){return''+l(e.text)+""})).join("")+"
            ":"")+"
            "},b=function(e){e.itemTemplate;for(var t=e.dateField,i=e.dateFormat,r=e.showDateLabels,o=e.data,a=0,s="",l=0;l'+(a=c)+""),s+=''}return s},w=function(e){for(var t=e.itemTemplate,i=e.dateField,r=e.titleField,o=e.descriptionField,a=e.subtitleField,s=e.imagesField,c=e.actionsField,d=e.alterMode,u=e.collapsibleEvents,h=e.dateFormat,p=e.showDateLabels,f=e.navigatable,m=e.altField,g=e.data,v=0,_=0,b=!1,w="",y=0;y'+(_=k)+""),w+='
          • '+(p?''+n.toString(g[y][i],h)+"":"")+'
          • ",v++}return w},y='";function k(e){var t=e.css("transform");return"none"!=t?t.match(/-?[\d\.]+/g)[4]/e.width()*100:0}function x(e,t){return e.offset().left-t.offset().left+e.width()/2}function C(e,t,n){e.css(t,n)}var S=n.Class.extend({init:function(t){this.cardContainer=e("
            ");var n=e("
            ").append(this.cardContainer);this.element=e("
          • ").append(n),t.append(this.element)},content:function(t,n,i){var r=e("");this.cardContainer.html(t),this.cardContainer.append(r),this.element.attr("data-uid",n),this.element.find(".k-card").attr({role:"tabpanel","aria-label":i})},position:function(e){this.element.css("transform","translate3d("+this.element.width()*e+"px, 0, 0)"),0===e?this.element.find(".k-card").attr("tabindex",0):this.element.find(".k-card").removeAttr("tabindex")},setPageCallout:function(e,t){this.element.find(".k-timeline-card-callout").css(e,t)},destroy:function(){var e=this;e.cardContainer=null,e.element.remove(),e.element=null}}),T=n.Observable.extend({init:function(t,i){var r,a,s,l=this;n.Observable.fn.init.call(this),this.element=t,r=new n.ui.Movable(l.element),a=new o({axis:"x",movable:r,onEnd:function(){l.trigger(d)}}),s=[],e.extend(l,{duration:i&&i.duration||1,movable:r,transition:a,pages:s,eventTemplate:i.eventTemplate,eventHeight:i.eventHeight,dataFieldMappings:i.dataFieldMappings,dateFormat:i.dateFormat}),this.bind([d],i)},initPages:function(){for(var e,t=this.pages,n=this.element,i=0;i<3;i++)e=new S(n),t.push(e)},repositionPages:function(){var e=this.pages;e[0].position(-1),e[1].position(0),e[2].position(1)},setPageContent:function(e,t){var i,r=typeof this.eventTemplate===Function?this.eventTemplate:n.template(this.eventTemplate),o=this.dataFieldMappings,a=n.toString(t.date,this.dateFormat);i=r({data:t,titleField:o.title,subtitleField:o.subtitle,descriptionField:o.description,imagesField:o.images,actionsField:o.actions,altField:o.altField}),e.content(i,t.uid,a)},updatePage:function(e,t,n){var i=this.pages,r=null===e?i[1]:e?i[i.length-1]:i[0];this.setPageContent(r,t),r.setPageCallout("left",n/r.element.width()*100+"%")},moveTo:function(e){this.movable.moveAxis("x",-e)},transitionTo:function(e,t){this.transition.moveTo({location:e,duration:this.duration,ease:t})},destroy:function(){for(var e=this,t=0;t"),o=e("
            "),a=e("
              "),s=e("
              "),l=e("
                ");t._trackWrap=r,t._trackEl=o,t._scrollableWrap=a,t._eventsWrap=s,t._eventsList=l,r.addClass("k-timeline-track-wrap"),o.addClass("k-timeline-track"),a.addClass(p),s.addClass("k-timeline-events-list"),l.addClass(p),i.eventHeight&&l.height(i.eventHeight),o.append(a),r.append(y),r.append(o),s.append(l),r.appendTo(n),s.appendTo(n)},_vertical:function(){var t=this,n=this.options,i=this.element,r=t._eventsList=e("
                  "),o=n.navigatable,s=n.collapsibleEvents;t.element.append(r),n.alternatingMode&&i.addClass("k-timeline-alternating"),s&&(i.addClass("k-timeline-collapsible"),this.element.on("click",".k-card-header",(function(){var n=e(this).closest(".k-timeline-card"),i=n.parent(),r=t.dataSource.getByUid(i.data("uid"));n.hasClass("k-collapsed")?t.trigger("expand",{sender:t,dataItem:r})||t.expand(i):t.trigger("collapse",{sender:t,dataItem:r})||t.collapse(i)}))),o&&s&&this.element.on("keydown"+m,t,(function(t){if(t.keyCode==a.SPACEBAR||t.keyCode==a.ENTER){var n=e(t.target).find(".k-card-header");n.length&&(t.preventDefault(),n.trigger("click"))}}))},_renderContentVertical:function(e){var t,i,r=this.options;i=typeof r.eventTemplate===Function?r.eventTemplate:r.eventTemplate?n.template(r.eventTemplate):n.template(_,{useWithBlock:!1}),t=n.template(w,{useWithBlock:!1})({data:e,dateField:r.dataDateField,titleField:r.dataTitleField,subtitleField:r.dataSubtitleField,descriptionField:r.dataDescriptionField,imagesField:r.dataImagesField,actionsField:r.dataActionsField,itemTemplate:i,alterMode:r.alternatingMode,collapsibleEvents:r.collapsibleEvents,dateFormat:r.dateFormat,showDateLabels:r.showDateLabels,altField:r.dataImagesAltField,navigatable:r.navigatable}),this._eventsList.html(t),r.eventWidth&&this.element.find(".k-card").width(r.eventWidth)},_renderContentHorizontal:function(t){var i,r,o=this,a=o.options,s=o._dataFieldMappings;r=typeof a.eventTemplate===Function?a.eventTemplate:a.eventTemplate?n.template(a.eventTemplate):n.template(v,{useWithBlock:!1}),i=n.template(b,{useWithBlock:!1})({data:t,itemTemplate:r,dateFormat:a.dateFormat,dateField:a.dataDateField,showDateLabels:a.showDateLabels}),a.initialEventIndex?o._trackWrap.append(e(i).find("."+p).css("transform","translateX(-100%)").parent()):o._scrollableWrap.html(i),o.pane&&o.pane.destroy(),o.pane=new T(o._eventsList,{transitionEnd:this._transitionEnd.bind(this),eventTemplate:r,dataFieldMappings:s,eventHeight:a.eventHeight,dateFormat:a.dateFormat})},_initDataFieldMappings:function(){var e=this.options;this._dataFieldMappings={title:e.dataTitleField,subtitle:e.dataSubtitleField,date:e.dataDateField,description:e.dataDescriptionField,images:e.dataImagesField,actions:e.dataActionsField,altField:e.dataImagesAltField}},_transitionEnd:function(){this._forward?this.pane.pages.push(this.pane.pages.shift()):this.pane.pages.unshift(this.pane.pages.pop()),this._forward=null,this.pane.repositionPages(),this.pane.movable.moveAxis("x",0),this.options.navigatable&&(this._transition=null,this._eventsList.find(".k-card").removeAttr("id"),this.pane.pages[1].cardContainer.attr("id",this._cardId),this._setCurrent(this._currentBullet)),this._animationInProgress=!1},_setCurrentEvent:function(t){var n,i=this,r=e(t.currentTarget),o=i.dataSource.view()[r.parent().children(":not(.k-timeline-flag-wrap)").index(r)];n=i._forward?i.pane.pages[2].element:i.pane.pages[0].element,i.trigger("change",{eventContainer:n,dataItem:o})||i.open(r)},open:function(t){var n,i=this,r=e(t),a=r.find(".k-timeline-circle"),s=r.parent().children(":not(.k-timeline-flag-wrap)"),l=s.index(r);this.options.navigatable&&(i._removeCurrent(),s.attr("aria-selected",!1),r.attr("aria-selected",!0),i._currentBullet=r);var c=i.dataSource.view()[l];i.currentEventIndex!==l&&(i._currentIndex=r.index(),n=i._forward=i.currentEventIndex0?"next":"previous"})||n._animationInProgress||(n._animationInProgress=!0,i>0?n.next():n.previous(),n._updateArrows())},_updateArrows:function(){var e=this,t=e.element.find(".k-timeline-arrow"),n=t.filter(".k-timeline-arrow-left"),i=t.filter(".k-timeline-arrow-right");e._validateNavigation(!1)?n.addClass("k-disabled"):n.removeClass("k-disabled"),e._validateNavigation(!0)?i.addClass("k-disabled"):i.removeClass("k-disabled")},_validateNavigation:function(e){var t=this,n=t._end||0;return e?t._firstIndexInView+t.numOfEvents>=t.maxEvents:Math.abs(n)<=1},next:function(){var e=this,t=e.options;e._validateNavigation(!0)||t.orientation==c||(e._forward=!0,e._navigate()),e._updateArrows()},_navigate:function(){var t,n,i,r,a=this,s=a._forward,l=k(this._trackWrap.find("."+p)),c=s?-e("."+p).width():e("."+p).width(),d=a._currentIndex,g=a._firstIndexInView;if((l=s?l-100:l+100)>=0&&(l=0),a._end=l,a._tackItemWidth,r=Math.floor(d/a.numOfEvents),s?1===a.numOfEvents?(t=0===g?1:g,n=this._trackWrap.find("."+h).eq(t).nextAll(":not(."+u+")").first(),a._firstIndexInView=n.index()):(t=g+a.numOfEvents-1,n=this._trackWrap.find("."+h).eq(t).nextAll(":not(."+u+")").first(),a._firstIndexInView=g+a.numOfEvents):1===a.numOfEvents?(t=g,n=this._trackWrap.find("."+h).eq(t).prevAll(":not(."+u+")").first(),a._firstIndexInView=n.index()):(t=g,n=(n=this._trackWrap.find("."+h).eq(t).prevAll(":not(."+u+")").first()).length>0?n:this._trackWrap.find("."+h+":not(."+u+")").first(),a._firstIndexInView=g-a.numOfEvents<0?0:g-a.numOfEvents),i=a.dataSource.view()[this._trackWrap.find(f).index(n)],this._trackWrap.find("."+p).css("transform","translateX("+l+"%)"),a._currentIndex!=n.index())a.currentEventIndex=this._trackWrap.find(f).index(n),a._currentIndex=n.index(),a.pane.updatePage(a._forward,i,0!==r||s?x(n.find(".k-timeline-circle"),a._trackWrap)+c:n.find(".k-timeline-circle").offset().left+15),clearTimeout(a.navigateTimeOut),a.navigateTimeOut=setTimeout((function(){s&&a.pane&&a.pane.pages.length>0?a.pane.transition.moveTo({location:-a.pane.pages[2].element.width(),duration:800,ease:o.easeOutExpo}):a.pane.transition.moveTo({location:a.pane.pages[0].element.width(),duration:800,ease:o.easeOutExpo})}),200);else{var v=this._trackWrap.find("."+p),_=function(){if(1!=a.numOfEvents){var e=a.pane.pages[1],t=x(n.find(".k-timeline-circle"),a._trackWrap);e.setPageCallout("left",t/e.element.width()*100+"%")}this._transition=null,v.off("transitionend"+m,_)};v.on("transitionend"+m,_)}},previous:function(){var e=this,t=e.options;e._validateNavigation(!1)||t.orientation==c||(e._forward=!1,e._navigate()),e._updateArrows()},expand:function(t){var i=this.options,r=e(t).find(".k-timeline-card"),o=e(t).find(".k-card"),a=e(t).find(".k-card-body");r.hasClass("k-collapsed")&&(i.navigatable&&i.collapsibleEvents&&o.attr("aria-expanded",!0),r.removeClass("k-collapsed"),n.fx(a).expand("vertical").stop().play())},collapse:function(t){var i=this.options,r=e(t).find(".k-timeline-card"),o=e(t).find(".k-card"),a=e(t).find(".k-card-body");r.hasClass("k-collapsed")||(i.navigatable&&i.collapsibleEvents&&o.attr("aria-expanded",!1),r.addClass("k-collapsed"),n.fx(a).expand("vertical").stop().reverse())},items:function(){return this.element.find("li[data-uid]")},_resizeHandler:function(){var e=this;clearTimeout(e.resizeTimeOut),e.resizeTimeOut=setTimeout((function(){e._redrawEvents(),e.pane.repositionPages()}))},redraw:function(){this.options.orientation!=c&&(this._redrawEvents(),this.pane.repositionPages())},_redrawEvents:function(){var e,t=this,n=Math.floor(t.element.find("."+p).width()/150);t.element.width()<=480?(t.element.addClass("k-timeline-mobile"),e=100,t.numOfEvents=1,t._tackItemWidth=e,t.element.find("li."+h).css("flex","1 0 "+e+"%"),t._repositionEvents()):(t.element.removeClass("k-timeline-mobile"),n!=t.numOfEvents&&(t.numOfEvents=n,e=100/n,C(t.element.find("li."+h),"flex","1 0 "+e+"%"),t._tackItemWidth=e,t._repositionEvents())),t._updateArrows()},_repositionEvents:function(){var e,t,n,i=this,r=i._tackItemWidth,o=null===i._forward?i.pane.pages[1]:i._forward?i.pane.pages[2]:i.pane.pages[0],a=this._trackWrap.find("."+p),s=k(a);if(t=1===i.numOfEvents?i.currentEventIndex*r:i._currentIndex*r,o){if(1===i.numOfEvents)return o.setPageCallout("left","50%"),C(a,"transform","translateX(-"+(n=t)+"%)"),i._firstIndexInView=i._currentIndex,void i._updateArrows();t>=Math.abs(s)+100?(n=Math.abs(s)+(t-(Math.abs(s)+100)+r),i._end=-n,C(a,"transform","translateX(-"+n+"%)"),i._firstIndexInView=i._currentIndex-i.numOfEvents+1):t<=Math.abs(s)?(n=t,i._end=-n,C(a,"transform","translateX(-"+n+"%)"),i._firstIndexInView=i._currentIndex):(e=x(a.find("li."+h).eq(i._currentIndex).find(".k-timeline-circle"),i._trackWrap),o.setPageCallout("left",e/o.element.width()*100+"%"),i._firstIndexInView=Math.round(Math.abs(s)/r));var l=this._trackWrap.find("."+p),c=function(){if(1!=i.numOfEvents){var e=i.pane.pages[1],t=x(i._trackWrap.find("."+h).eq(i._currentIndex).find(".k-timeline-circle"),i._trackWrap);e.setPageCallout("left",t/e.element.width()*100+"%")}l.off("transitionend"+m,c)};l.on("transitionend"+m,c)}i._updateArrows()},_initHorizontal:function(){var e,t=this,i=t._trackWrap.find(".k-timeline-circle").first(),r=t.dataSource.view()[0],o=t.options.navigatable;t.maxEvents=t._trackWrap.find("."+h).length,t._currentIndex=1,t.pane.initPages(),t.pane.repositionPages(),t.pane.updatePage(t._forward,r,x(i,t._trackWrap)),t._updateArrows(),t._resizeHandlerBound=t._resizeHandler.bind(t),n.jQuery(window).on("resize"+m,t._resizeHandlerBound),t._trackWrap.on("click",f,t._setCurrentEvent.bind(t)),t._trackWrap.on("click",".k-timeline-arrow:not(.k-disabled)",t._navigateToView.bind(t)),o&&(t._trackWrap.find(".k-timeline-track-item.k-timeline-flag-wrap").attr("role","none").attr("aria-hidden",!0),t._trackWrap.find(f).attr("aria-selected",!1).first().attr("aria-selected",!0),t._cardId=n.guid(),t._scrollableWrap.on("focus"+m,(function(){t.pane.pages[1].cardContainer.attr("id",t._cardId),t._currentBullet&&t._currentBullet.addClass("k-focus")})).on("focusout"+m,(function(){t._currentBullet&&t._currentBullet.removeClass("k-focus")})).on("keydown"+m,(function(e){var n,i,r,o=t._currentBullet;t._transition||(e.keyCode==a.LEFT&&(n=!0,(r=o.prevAll(f).first()).length&&((i=x(r,t._trackWrap))<0||i>r.parent().width()?(t._transition=!0,t._removeCurrent(),t.previous(),t.open(r)):t._setCurrentEvent({currentTarget:r}))),e.keyCode==a.RIGHT&&(n=!0,(r=o.nextAll(f).first()).length&&((i=x(r,t._trackWrap))<0||i>r.parent().width()?(t._transition=!0,t._removeCurrent(),t.next(),t.open(r)):t._setCurrentEvent({currentTarget:r}))),n&&e.preventDefault())})),e=t._scrollableWrap.find("."+h).eq(t._currentIndex),t._setCurrent(e),e.removeClass("k-focus"))},_setCurrent:function(e){if(e){var t=n.guid(),i=this;i._removeCurrent(),i._scrollableWrap.attr("aria-activedescendant",t),e.attr("id",t).addClass("k-focus"),e.siblings().removeAttr("aria-describedby"),"true"===e.attr("aria-selected")&&(e.attr("aria-describedby",i._cardId),i.pane.pages[1].cardContainer.attr("id",i._cardId)),i._currentBullet=e}},_removeCurrent:function(){this._currentBullet&&this._currentBullet.removeClass("k-focus").removeAttr("id").removeAttr("aria-describedby"),this._scrollableWrap.removeAttr("aria-activedescendant")},setDataSource:function(e){var t=this,n=t.options;e=s(e)?{data:e}:e,t.dataSource&&t._refresh?t.dataSource.unbind(g,t._refresh):this._refresh=t.refresh.bind(t),this.dataSource=r.create(e),undefined===this.dataSource._sort&&(this.dataSource._sort=[{field:n.dataDateField,dir:"asc"}]),t.dataSource.bind(g,t._refresh),n.autoBind&&this.dataSource.fetch()},refresh:function(){var e=this,t=e.options,n=this.dataSource.view();t.orientation!=c&&(e._trackWrap.empty().remove(),e.element.find(".k-timeline-events-list").remove(),e._horizontal()),e.currentEventIndex=0,e._forward=null,e._eventPage=1,e._currentIndex=0,e._firstIndexInView=0,e.numOfEvents=null,e._end=0,e._initDataFieldMappings(),n.length&&("horizontal"===t.orientation?(e._renderContentHorizontal(n),e._redrawEvents(),e._initHorizontal()):e._renderContentVertical(n)),e.trigger("dataBound",{sender:e})},destroy:function(){var t=this.options;i.fn.destroy.call(this),this.resizeTimeOut&&clearTimeout(this.resizeTimeOut),this.navigateTimeOut&&clearTimeout(this.navigateTimeOut),e(window).off("resize"+m,this._resizeHandlerBound),this._resizeHandlerBound=null,this.element.off(),t.orientation!=c&&(this.pane&&this.pane.destroy(),this._trackWrap.find("."+p).off(),this.element.find(".k-timeline-arrow").off(),this._trackWrap.off(),this.currentEventIndex=this.maxEvents=this.numOfEvents=this._currentIndex=this._eventPage=this._eventsList=this._eventsWrap=this.element=this._trackWrap=this.pane=null),n.destroy(this.element),this._dataFieldMappings=this.element=null},options:{autoBind:!0,name:"Timeline",orientation:"vertical",dateFormat:"MMM d, yyyy",showDateLabels:!0,collapsibleEvents:!1,alternatingMode:!1,dataTitleField:"title",dataDateField:"date",dataSubtitleField:"subtitle",dataDescriptionField:"description",dataImagesField:"images",dataActionsField:"actions",dataImagesAltField:"altField",navigatable:!1},events:["collapse","dataBound","expand","actionClick","change","navigate"]});n.ui.plugin(D)}(window.kendo.jQuery);kendo;!function(){var e=window.kendo,t=e.deepExtend;var n=Date.now;n||(n=function(){return(new Date).getTime()}),t(e,{util:{now:n,renderPos:function(t){var n=[];if(t)for(var i=e.toHyphens(t).split("-"),r=0;ri&&(n-=2*i),i=o}return n},arabicToRoman:function(e){for(var t={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"},n=[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="";e>0;)e=0;)i+=":"+n[r];return i in t?t[i]:t[i]=e.apply(this,arguments)}},isUnicodeLetter:function(e){return i.test(e)},withExit:function(e,t){try{return e.call(t,(function(e){throw new n(e)}))}catch(e){if(e instanceof n)return e.value;throw e}function n(e){this.value=e}}}});var i=new 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]")}();var Yt=String.fromCharCode,$t={amp:38,lt:60,gt:62,quot:34,apos:39,nbsp:160};function Qt(e){for(var t=[],n=0;n65535?(t-=65536,e.push(t>>>10&1023|55296,56320|1023&t)):e.push(t)}var Zt=Qt(""),en=Qt("--\x3e"),tn=Qt("!--"),nn=Qt("/>"),rn=Qt(""),an=Qt("?"),sn=Qt("<"),ln=Qt(">"),cn=Qt(";"),dn=Qt("="),un=Qt("&"),hn=Qt('"'),pn=Qt("'"),fn=Qt("#"),mn=Qt("x"),gn=Qt("X"),vn={};function _n(e,t){var n=0,i=[],r={is:function(e){for(var t=i.length,n=e.length;--t>=0&&--n>=0;)if(i[t].$tag!=e[n]&&"*"!=e[n])return!1;return n<0?i[i.length-1]:null},exit:function(){throw vn},stack:i};function o(t){var i=e[n++];240&i^240?224&i^224?192&i^192?t.push(i):Xt(t,(31&i)<<6|63&e[n++]):Xt(t,(15&i)<<12|(63&e[n++])<<6|63&e[n++]):Xt(t,(3&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])}function a(e){throw new Error(e+", at "+n)}function s(t){for(var i=[];n=48&&e<=57}function f(e){return e>=48&&e<=57||(e|=32)>=97&&e<=102}function m(e){return 58==e||95==e||(e|=32)>=97&&e<=122}function g(e){return 45==e||p(e)||m(e)}function v(){var t,r;d(an)?(k("decl",_(),y()),u(on)):d(tn)?function(){for(var t=[];ni?i=(n=Math.min(n,300))/r:n=(i=Math.min(i,300))*r,this._drawing=t.addDrawing({topLeftCell:e.topLeft(),offsetX:5,offsetY:5,width:n,height:i,opacity:1,image:this._workbook.addImage(this._blob)},!0),this._blob=null},undo:function(){var e=this.range().sheet();e._activeDrawing=null,e.removeDrawing(this._drawing)},redo:function(){var e=this.range().sheet();e._activeDrawing=this._drawing,e.addDrawing(this._drawing)}}),e.spreadsheet.DeleteDrawingCommand=c.extend({exec:function(){var e=this.range().sheet();e._activeDrawing=null,e.removeDrawing(this._drawing)},undo:function(){var e=this.range().sheet();e._activeDrawing=this._drawing,e.addDrawing(this._drawing)},redo:function(){this.exec()}});var d=c.extend({exec:function(){var e=this.range().sheet();this._origIndex=e._drawings.indexOf(this._drawing),e._drawings.splice(this._origIndex,1),this._newIndex=this._reorder(),e._drawings.splice(this._newIndex,0,this._drawing),e.triggerChange({drawings:!0})},undo:function(){var e=this.range().sheet();e._drawings.splice(this._newIndex,1),e._drawings.splice(this._origIndex,0,this._drawing),e.triggerChange({drawings:!0})}});e.spreadsheet.BringToFrontCommand=d.extend({_reorder:function(){return this.range().sheet()._drawings.length}}),e.spreadsheet.SendToBackCommand=d.extend({_reorder:function(){return 0}});var u=l.extend({init:function(e){l.fn.init.call(this,e),this._target=e.target,this._value=e.value},exec:function(){this.getState(),this.setState(this._value)}});e.spreadsheet.ColumnWidthCommand=u.extend({getState:function(){this._state=this.range().sheet().columnWidth(this._target)},setState:function(e){this.range().sheet().columnWidth(this._target,e)}}),e.spreadsheet.RowHeightCommand=u.extend({getState:function(){this._state=this.range().sheet().rowHeight(this._target)},setState:function(e){this.range().sheet().rowHeight(this._target,e)}}),e.spreadsheet.HyperlinkCommand=l.extend({init:function(e){l.fn.init.call(this,e),this._link=e.link},exec:function(){var e=this.range();this._prevLink=e.link(),this._prevUnderline=e.underline(),e.link(this._link),e.underline(!0),null==e.value()&&(this._hasSetValue=!0,e.value(this._link))},undo:function(){var e=this.range();e.link(this._prevLink),e.underline(this._prevUnderline),this._hasSetValue&&e.value(null)}}),e.spreadsheet.GridLinesChangeCommand=u.extend({getState:function(){this._state=this._range.sheet().showGridLines()},setState:function(e){this._range.sheet().showGridLines(e)}});var h=e.spreadsheet.PropertyChangeCommand=l.extend({_setRange:function(e){l.prototype._setRange.call(this,e.skipHiddenCells())},init:function(e){l.fn.init.call(this,e),this._value=e.value},exec:function(){var e=this.range();e.enable()&&(this.getState(),"format"===this.options.property&&this._workbook.trigger("changeFormat",{range:e}),e[this._property](this._value))}});e.spreadsheet.ClearContentCommand=l.extend({exec:function(){var e,t,n,r,o,a=[];return this.range().enable()?this.range().canEditArrayFormula()?(this.getState(),(e=this.range().skipHiddenCells())._ref.refs&&e._ref.refs.length>1?e._ref.refs.forEach((function(t){o=e.sheet().range(t),a=a.concat(o.values())})):a=e.values(),n=[],a.forEach((function(e){t=[],e.forEach((function(){t.push(null)})),n.push(t)})),e.sheet().trigger("changing",{data:n,range:e,changeType:i})?void 0:(e.clearContent(),(r=e._getValidationState())?this.rejectState(r):void 0)):{reason:"error",type:"intersectsArray"}:{reason:"error",type:"cannotModifyDisabled"}},undo:function(){var e,t=this.range().skipHiddenCells(),n=t.sheet(),r=this._state.data,o=[];r.forEach((function(t){e=[],t.forEach((function(t){e.push(t.value)})),o.push(e)})),n.trigger("changing",{data:o,range:t,changeType:i})||this.setState(this._state)}}),e.spreadsheet.EditCommand=h.extend({init:function(e){e.property=e.property||"input",h.fn.init.call(this,e)},_setRange:function(e){h.prototype._setRange.apply(this,arguments),this._editRange=this.options.arrayFormula?e:e.sheet().activeCellSelection()},getState:function(){this._state=this.range().getState()},exec:function(){return this.range().sheet().withCultureDecimals(this._exec.bind(this))},undo:function(){var e=this._editRange,t=this._state;e.sheet().trigger("changing",{data:t.data[0][0].value,range:e,changeType:o})||this.setState(this._state)},_exec:function(){var t=this.options.arrayFormula,n=this._editRange;if(!n.enable())return{reason:"error",type:"rangeDisabled"};if(!n.canEditArrayFormula())return{reason:"error",type:"intersectsArray"};var i=this._value;if(this.getState(),!this.range().sheet().trigger("changing",{data:i,range:this._editRange,changeType:o}))if("value"!=this._property)try{n.link(null),""===i?n.value(null):(n.input(i,{arrayFormula:t}),/\n/.test(n.value())&&n.wrap(!0)),n._adjustRowHeight();var r=n._getValidationState();if(r)return this.rejectState(r)}catch(t){if(t instanceof e.spreadsheet.calc.ParseError)return{title:"Error in formula",body:t+"",reason:"error"};throw t}else n.value(i)}}),e.spreadsheet.InsertCommentCommand=h.extend({init:function(e){e.property="comment",h.fn.init.call(this,e)}}),e.spreadsheet.TextWrapCommand=h.extend({init:function(e){e.property="wrap",h.fn.init.call(this,e),this._value=e.value},getState:function(){var e={};this.range().forEachRow((function(t){var n=t.topLeft().row;e[n]=t.sheet().rowHeight(n)})),this._state=this.range().getState(this._property),this._rowHeight=e},undo:function(){var e=this.range().sheet(),t=this._rowHeight;for(var n in this.range().setState(this._state),t)e.rowHeight(n,t[n])}}),e.spreadsheet.AdjustDecimalsCommand=l.extend({init:function(e){this._delta=e.value,e.property="format",l.fn.init.call(this,e)},exec:function(){var t=this.range().sheet(),n=this._delta,i=e.spreadsheet.formatting;this.getState(),t.batch(function(){this.range().forEachCell((function(e,r,o){var a=o.format;if(!a){var s=o.value;"number"==typeof s&&/\./.test(s)&&(a="0."+String(s).split(".")[1].replace(/\d/g,"0"))}(a||n>0)&&(a=i.adjustDecimals(a||"0",n),t.range(e,r).format(a))}))}.bind(this))}}),e.spreadsheet.BorderChangeCommand=l.extend({init:function(e){e.property="border",l.fn.init.call(this,e),this._type=e.border||e.value.type,this._style=e.style||{color:e.value.color,size:1}},_batch:function(e){return this.range().sheet().batch(e,{})},exec:function(){var e=this;e._type&&(e.getState(),e._batch((function(){e[e._type](e._style)})))},noBorders:function(){this.range().insideBorders(null),this.outsideBorders(null)},allBorders:function(e){this.range().insideBorders(e),this.outsideBorders(e)},leftBorder:function(e){this.range().leftColumn().borderLeft(e)},rightBorder:function(e){this.range().rightColumn().borderRight(e)},topBorder:function(e){this.range().topRow().borderTop(e)},bottomBorder:function(e){this.range().bottomRow().borderBottom(e)},outsideBorders:function(e){var t=this.range();t.leftColumn().borderLeft(e),t.topRow().borderTop(e),t.rightColumn().borderRight(e),t.bottomRow().borderBottom(e)},insideBorders:function(e){this.range().insideBorders(e),this.outsideBorders(null)},insideHorizontalBorders:function(e){this.range().insideHorizontalBorders(e)},insideVerticalBorders:function(e){this.range().insideVerticalBorders(e)}}),e.spreadsheet.MergeCellCommand=l.extend({init:function(e){l.fn.init.call(this,e),this._type=e.value},exec:function(){this.getState(),this[this._type](),this.range().sheet().triggerChange({recalc:!0})},activate:function(e){this.range().sheet().activeCell(e)},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 e=this.range(),t=e._ref;e.merge(),this.activate(t)},horizontally:function(){var e=this.range().topRow()._ref;this.range().forEachRow((function(e){e.merge()})),this.activate(e)},vertically:function(){var e=this.range().leftColumn()._ref;this.range().forEachColumn((function(e){e.merge()})),this.activate(e)},unmerge:function(){var e=this.range(),t=e._ref.topLeft;e.unmerge(),this.activate(t)}}),e.spreadsheet.FreezePanesCommand=l.extend({init:function(e){l.fn.init.call(this,e),this._type=e.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 e=this._topLeft;this.range().sheet().frozenColumns(e.col).frozenRows(e.row)},rows:function(){var e=this._topLeft;this.range().sheet().frozenRows(e.row)},columns:function(){var e=this._topLeft;this.range().sheet().frozenColumns(e.col)},unfreeze:function(){this.range().sheet().frozenRows(0).frozenColumns(0)}}),e.spreadsheet.PasteCommand=l.extend({init:function(t){l.fn.init.call(this,t),this._clipboard=t.workbook.clipboard(),this._clipboard.parse(),this._event=t.event,this._clipboardContent=this._clipboard._content,this._sheet=this._workbook.activeSheet(),this._range=this._sheet.selection?this._sheet.selection():this._sheet.range(this._clipboard.pasteRef()),this._state=this._range.getState(),this._targetRangeRefs=(this._range._ref instanceof e.spreadsheet.UnionRef?this._range._ref.refs:[this._range._ref]).map((function(e){return e.toRangeRef()}))},exec:function(){return this.range().sheet().withCultureDecimals(this._exec.bind(this))},undo:function(){var e=this._sheet,t=this._range;e.trigger("changing",{data:this._state.data,range:t,changeType:a})||this.setState(this._state)},_exec:function(){var e=this._clipboard.canPaste();if(!e.canPaste)return e.menuInvoked?{reason:"error",type:"useKeyboard"}:e.pasteOnMerged?{reason:"error",type:"modifyMerged"}:e.pasteOnDisabled?(this._event.preventDefault(),{reason:"error",type:"cannotModifyDisabled"}):{reason:"error"};var t=this._sheet,n=this._range;this._workbook.trigger("paste",{range:n,clipboardContent:this._clipboardContent})||t.trigger("changing",{data:this._clipboardContent.data,range:n,changeType:a})?this._event.preventDefault():this._processPaste()},_adjustPasteTarget:function(t,n,i){var r,o,a,s,l,c,d=this,u=d._targetRangeRefs,h=d._sheet,p=e.spreadsheet.RangeRef,f=e.spreadsheet.UnionRef,m=[];for(c=0;cr.row?n=1:i.rowr.col?n=1:i.col=n._rows._count||d.bottomRight.col>=n._columns._count)&&n.resize(Math.max(d.bottomRight.row+1,n._rows._count),Math.max(d.bottomRight.col+1,n._columns._count)),t._adjustPasteTarget(c,a,s),n.batch((function(){for(e=0;e=0;)e._undoOne(t,e._pos.base)}),{layout:!0,recalc:!0})}});e.spreadsheet.AddColumnCommand=m.extend({exec:function(){var e=this._value,t=this.range().sheet();this._pos="left"===e?t.axisManager().addColumnLeft():t.axisManager().addColumnRight()},_undoOne:function(e,t){e.deleteColumn(t)}}),e.spreadsheet.AddRowCommand=m.extend({exec:function(){var e=this._value,t=this.range().sheet();this._pos="above"===e?t.axisManager().addRowAbove():t.axisManager().addRowBelow()},_undoOne:function(e,t){e.deleteRow(t)}}),e.spreadsheet.EditValidationCommand=l.extend({init:function(e){l.fn.init.call(this,e),this._value=e.value},exec:function(){var t=this,n=t.range().sheet();if(this.getState(),!n.trigger("changing",{data:t._value,range:t.range(),changeType:s}))try{n.withCultureDecimals((function(){t.range().validation(t._value)}))}catch(t){if(t instanceof e.spreadsheet.calc.ParseError)return{title:"Error in formula",body:t+"",reason:"error"};throw t}},undo:function(){var e=this.range(),t=this._state;e.sheet().trigger("changing",{data:t.data[0][0].validation,range:e,changeType:s})||this.setState(this._state)}}),e.spreadsheet.OpenCommand=l.extend({cannotUndo:!0,exec:function(){if(null===this.options.value.name.match(/.xlsx$/i))return{reason:"error",type:"openUnsupported"};var e=this.options.workbook;e.fromFile(this.options.value).then((function(){var t=e.excelImportErrors;t&&t.length&&e._view.openDialog("importError",{errors:t})}))}}),e.spreadsheet.SaveAsCommand=l.extend({cannotUndo:!0,exec:function(){var e=this.options.name+this.options.extension;".xlsx"===this.options.extension?this.options.workbook.saveAsExcel({fileName:e}):".pdf"===this.options.extension&&this.options.workbook.saveAsPDF(t.extend(this.options.pdf,{workbook:this.options.workbook,fileName:e}))}});var g=l.extend({init:function(e){l.fn.init.call(this,e),this._name=e.name,this._value=e.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})}});e.spreadsheet.DefineNameCommand=g.extend({exec:function(){this.getState();try{this._workbook.defineName(this._name,this._value),this._workbook.trigger("change",{recalc:!0})}catch(e){return{title:"Error",body:e+"",reason:"error"}}}}),e.spreadsheet.DeleteNameCommand=g.extend({exec:function(){this.getState(),this._workbook.undefineName(this._name),this._workbook.trigger("change",{recalc:!0})}})}(kendo),function(e){var t=e.jQuery,n=e.ui.Widget.extend({init:function(i,r){e.ui.Widget.call(this,i,r),i=this.element.addClass(n.classNames.wrapper),t(e.ui.icon("formula-fx")).prependTo(i);var o=i.width();this.formulaInput=new e.spreadsheet.FormulaInput(t("
                  ").appendTo(i),{formulaBarWidth:o})},destroy:function(){this.formulaInput&&this.formulaInput.destroy(),this.formulaInput=null}});e.spreadsheet.FormulaBar=n,t.extend(!0,n,{classNames:{wrapper:"k-spreadsheet-formula-bar"}})}(window.kendo),function(e,t){var n=e.jQuery,i=e.ui.Widget,r=".kendoFormulaInput",o=e.keys,a=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],s={27:"esc",37:"left",39:"right",35:"end",36:"home",32:"spacebar"},l=/(^_|[^a-z0-9]$)/i,c=i.extend({init:function(e,t){i.call(this,e,t),(e=this.element).addClass(c.classNames.wrapper).attr("contenteditable",!0).attr("spellcheck",!1).css("white-space","pre"),t&&t.formulaBarWidth&&e.css("max-width",t.formulaBarWidth-16+"px"),this.options.autoScale&&e.on("input",this.scale.bind(this)),this._highlightedRefs=[],this._formulaSource(),this._formulaList(),this._popup(),this._tooltip(),e.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,formulaBarWidth:null},events:["keyup","focus"],enable:function(e){if(void 0===e)return"true"===this.element.attr("contenteditable");e?this.element.attr("contenteditable",e):this.element.removeAttr("contenteditable"),this.element.toggleClass("k-disabled",!e)},getPos:function(){var e=this.element[0],n=t.getSelection(),i=a(n.focusNode,n.focusOffset),r=a(n.anchorNode,n.anchorOffset);if(null!=i&&null!=r){if(i>r){var o=i;i=r,r=o}return{begin:i,end:r,collapsed:i==r}}function a(t,n){try{!function e(i){if(i===t)throw n;if(1==i.nodeType)for(var r=i.firstChild;r;r=r.nextSibling)e(r);else 3==i.nodeType&&(n+=i.nodeValue.length)}(e)}catch(e){return e}}},setPos:function(e,n){var i,r,o=this.element[0];if(e=c(o,e),n=null!=n?c(o,n):e,e&&n){var a=document.createRange();a.setStart(e.node,e.pos),a.setEnd(n.node,n.pos);var s=t.getSelection(),l=s.getRangeAt(0);r=l,((i=a).startOffset!=r.startOffset||i.endOffset!=r.endOffset||i.startContainer!=r.endContainer||i.endContainer!=r.endContainer)&&(s.removeAllRanges(),s.addRange(a))}function c(e,t){try{!function e(n){if(3==n.nodeType){var i=n.nodeValue.length;if(i>=t)throw n;t-=i}else if(1==n.nodeType)for(var r=n.firstChild;r;r=r.nextSibling)e(r)}(e)}catch(e){return{node:e,pos:t}}}},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 t,n=[];for(var i in e.spreadsheet.calc.runtime.FUNCS)l.test(i)||(t=i.toUpperCase(),n.push({value:t,text:t}));this.formulaSource=new e.data.DataSource({data:n})},_formulaList:function(){this.list=new e.ui.StaticList(n("
                    ").addClass(c.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(e){e.preventDefault()}))},_formulaListChange:function(){var e=this._tokenContext();if(e&&!this._mute){var t=e.token,n=this.list.value()[0],i={replace:!0,token:t,end:t.end};e.nextToken&&"("==e.nextToken.value||(n+="("),this._replaceAt(i,n),this.popup.close()}},_popup:function(){this.popup=new e.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(e){var t=e.keyCode,n=this;s[t]?(n.popup.close(),n._navigated=!0):n._move(t)&&(n._navigated=!0,e.preventDefault()),n._keyDownTimeout=setTimeout(n._syntaxHighlight.bind(n))},_keyup:function(){var e,t=this.popup;this._isFormula()&&!this._navigated&&(e=((this._tokenContext()||{}).token||{}).value,this.filter(e),e&&this.formulaSource.view().length?(t[t.visible()?"position":"open"](),this.list.focusFirst()):t.close()),this._navigated=!1,this._syntaxHighlight(),this.trigger("keyup")},_input:function(){this._syntaxHighlight()},_focus:function(){setTimeout(this._sync.bind(this)),this._focusTimeout=setTimeout(this._syntaxHighlight.bind(this)),this.trigger("focus")},_paste:function(n){n.preventDefault();var i,r=this.getPos();i=e.support.browser.msie?t.clipboardData.getData("Text"):n.originalEvent.clipboardData.getData("text/plain");var o=this.value();o=o.substr(0,r.begin)+i+o.substr(r.end),this.value(o),this.setPos(r.begin+i.length),this.scale()},_move:function(e){var t=this.list,n=this.popup;if(n.visible()){if(e===o.DOWN)return t.focusNext(),t.focus()||t.focusFirst(),!0;if(e===o.UP)return t.focusPrev(),t.focus()||t.focusLast(),!0;if(e===o.ENTER)return t.select(t.focus()),n.close(),!0;if(e===o.TAB)return t.select(t.focus()),n.close(),!0;if(e===o.PAGEUP)return t.focusFirst(),!0;if(e===o.PAGEDOWN)return t.focusLast(),!0}return e===o.ENTER||e===o.TAB},_tokenContext:function(){var t=this.getPos(),n=this.value();if(!n||!t||!t.collapsed)return null;for(var i,r=e.spreadsheet.calc.tokenize(n,this.row(),this.col()),o=0;o").css(t).insertAfter(this.element)},_tooltip:function(){this._cellTooltip=n('').insertAfter(this.element)},tooltip:function(e){this._cellTooltip.text(e)},toggleTooltip:function(e){this._cellTooltip.toggle(e)},isActive:function(){return this.element[0]===e._activeElement()},filter:function(e){!e||e.lengtho.begin}function l(e){if(e){if(/^(?:num|str|bool|sym|ref)$/.test(e.type))return{replace:!0,token:e,end:e.end};if(/^(?:op|punc|startexp)$/.test(e.type))return e.end==o.end?c(e,n[a+1]):c(n[a-1],e)}}function c(e,t){if(null==e)return null;if(null==t)return/^(?:op|startexp)$/.test(e.type)||d(e.value)?{token:e,end:o.end}:null;if(r){if("op"==e.type&&/^(?:punc|op)$/.test(t.type))return{token:e,end:o.end}}else{if("startexp"==e.type)return{token:e,end:o.end};if(/^(?:op|punc)$/.test(e.type)&&/^[,;({]$/.test(e.value))return{token:e,end:o.end};if(/^(?:ref|sym)/.test(e.type))return{token:e,replace:!0,end:e.end};if(/^(?:ref|sym)/.test(t.type))return{token:t,replace:!0,end:t.end}}return!1}},refAtPoint:function(e){var t=this._canInsertRef();if(t){var n=e.selection()._ref.simplify().clone().relative(0,0,3);e.isMerged(n)&&(n=n.topLeft),e!==this.activeSheet&&(n=n.setSheet(e.name(),!0)),this._replaceAt(t,n.print(0,0))}},_replaceAt:function(e,t){var n=this.value(),i=e.token,r=n.substr(e.end),o=(n=n.substr(0,e.replace?i.begin:e.end)+t).length;n+=r,this._value(n),this.setPos(o),this.scale(),this._syntaxHighlight()},syncWith:function(t){var n,i=this,o="input"+r,a=i._sync.bind(i);e.support.browser.msie&&(o="keydown"+r,n=function(){setTimeout(a)}),i._editorToSync=t,i.element.off(o).on(o,n||a)},scale:function(){var e,t,i=this.element,r=n(".k-spreadsheet-haxis",i.context);this._span||this._textContainer(),this._span.html(i.html()),e=this._span.width()+this.options.scalePadding,t=this._span.height()-r.outerHeight(),e>i.width()&&i.width(e),t>i.height()&&i.height(t),this._sync()},_value:function(e){this.element.text(e)},value:function(e){if(void 0===e)return this.element[0].innerText.replace(/\n$/,"");this._value(e),this._syntaxHighlight()},highlightedRefs:function(){return this._highlightedRefs.slice()},_syntaxHighlight:function(){var t=this.getPos(),n=this.value(),i=e.spreadsheet.Pane.classNames.series,r=[],o=0,a=[],s=[];if(!t||t.collapsed){if(!/^=/.test(n))return this._highlightedRefs.length&&(this._highlightedRefs=[],this.element.text(n)),void(this.popup&&this.popup.close());(s=e.spreadsheet.calc.tokenize(n,this.row(),this.col())).forEach((function(n){if(n.active=!1,n.cls=["k-syntax-"+n.type],"ref"==n.type&&(n.colorClass=i[o++%i.length],n.cls.push(n.colorClass),r.push(n)),t&&"punc"==n.type)if(d(n.value))a.unshift(n);else if(")"==(l=n.value)||"]"==l||"}"==l){var s=a.shift();s?!function(e,t){return"("==t?")"==e:"["==t?"]"==e:"{"==t&&"}"==e}(n.value,s.value)?(n.cls.push("k-syntax-error"),s.cls.push("k-syntax-error")):(u(n,t)||u(s,t))&&(n.cls.push("k-syntax-paren-match"),s.cls.push("k-syntax-paren-match")):n.cls.push("k-syntax-error")}var l;t&&u(n,t)&&(n.cls.push("k-syntax-at-point"),n.active=!0,n),"func"!=n.type||function(t){return e.spreadsheet.calc.runtime.FUNCS[t.toLowerCase()]}(n.value)||t&&u(n,t)||n.cls.push("k-syntax-error")})),s.reverse().forEach((function(t){var i=t.begin,r=t.end,o=e.htmlEncode(n.substring(i,r));n=n.substr(0,i)+""+o+""+n.substr(r)})),this.element.html(n),t&&this.setPos(t.begin,t.end),this._highlightedRefs=r}},destroy:function(){this._editorToSync=null,this.element.off(r),clearTimeout(this._focusTimeout),clearTimeout(this._keyDownTimeout),this._cellTooltip=null,this._span=null,this.popup.destroy(),this.popup=null,this.list&&this.list.destroy(),i.fn.destroy.call(this)},insertNewline:function(){var e=this.value(),t=this.getPos(),n=t.end==e.length;e=e.substr(0,t.begin)+(n?"\n\n":"\n"+e.substr(t.end)),this.value(e),this.setPos(t.begin+1)}});function d(e){return"("==e||"["==e||"{"==e}function u(e,t){return e.begin<=t.begin&&e.end>=t.end}e.spreadsheet.FormulaInput=c,n.extend(!0,c,{classNames:{wrapper:"k-spreadsheet-formula-input",listWrapper:"k-spreadsheet-formula-list"}})}(kendo,window),function(e){var t=e.jQuery,n={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"},i=navigator.platform.toUpperCase().indexOf("MAC")>=0,r=e.Class.extend({init:function(e,n,i){if(this._handlers={},this.target=e,this._observer=n||window,this.keyDownProxy=this.keyDown.bind(this),this.mouseProxy=this.mouse.bind(this),this.touchProxy=this.touch.bind(this),this.threshold=5,this._pressLocation=null,e.on("keydown",this.keyDownProxy),e.on("contextmenu mousedown cut copy paste scroll wheel click dblclick focus",this.mouseProxy),e.on("touchmove touchend",this.touchProxy),t(document.documentElement).on("mousemove mouseup",this.mouseProxy),t(document.documentElement).on("touchmove touchend",this.touchProxy),i)for(var r in i)this.on(r,i[r])},keyDown:function(e){(!e.altKey||"n"!==e.key&&"h"!==e.key&&"a"!==e.key)&&this.handleEvent(e,function(e){var t=e.keyCode,i=n[t];return!i&&function(e){return e>47&&e<58||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223||229===e}(t)&&(i=":alphanum"),!i&&e.key&&1==e.key.length&&(i=":alphanum"),i}(e.originalEvent))},touch:function(e){this.handleEvent(e,e.type)},mouse:function(e){var t;e.which?t=3==e.which:e.button&&(t=2==e.button);var n=e.type;if("mousedown"===n&&(t?n="rightmousedown":this._pressLocation={x:e.pageX,y:e.pageY}),"mouseup"===n&&(t||(this._pressLocation=null)),"mousemove"===n&&this._pressLocation){var i=this._pressLocation.x-e.pageX,r=this._pressLocation.y-e.pageY;Math.sqrt(i*i+r*r)>this.threshold&&(n="mousedrag")}this.handleEvent(e,n)},handleEvent:function(e,t){var n="";e.mod=i?e.metaKey:e.ctrlKey&&!e.altKey,e.altKey&&(n+="alt+"),e.shiftKey&&(n+="shift+"),e.ctrlKey&&(n+="ctrl+"),n+=t;var r=this._handlers["*+"+t];r&&r.call(this._observer,e,n);var o=this._handlers[n];o&&o.call(this._observer,e,n)},on:function(e,t){var n=this._handlers;"string"==typeof t&&(t=this._observer[t]),"string"==typeof e&&(e=e.split(",")),e.forEach((function(e){n[e]=t}))},destroy:function(){this.target.off("keydown",this.keyDownProxy),this.target.off("keydown",this.mouseProxy),t(document.documentElement).off("mousemove mouseup",this.mouseProxy)}});e.spreadsheet.EventListener=r}(window.kendo),function(e){var t=e.Class.extend({init:function(e,t,n,i){this.level=e,this.value=t,this.left=n,this.right=i}}),n=new function(){this.left=this,this.right=this,this.level=0};function i(e){if(e.left.level===e.level){var t=e;e=e.left,t.left=e.right,e.right=t}return e}function r(e){if(e.right.right.level===e.level){var t=e;e=e.right,t.right=e.left,e.left=t,e.level+=1}return e}function o(e,a){return e===n?new t(1,a,n,n):(e.value.start>a.start?e.left=o(e.left,a):e.right=o(e.right,a),r(i(e)))}function a(e,t){if(e===n)return e;var o=e.value.start-t.start;if(0===o)if(e.left!==n&&e.right!==n){for(var s=e.left;s.right!==n;)s=s.right;e.value=s.value,e.left=a(e.left,e.value)}else e=e.left===n?e.right:e.left;else o>0?e.left=a(e.left,t):e.right=a(e.right,t);return(e.left.levele.level&&(e.right.level=e.level),(e=i(e)).right=i(e.right),e.right.right=i(e.right.right),(e=r(e)).right=r(e.right)),e}var s=e.Class.extend({init:function(e,t,n){this.start=e,this.end=t,this.value=n},intersects:function(e){return e.start<=this.end&&e.end>=this.start},clone:function(){return new s(this.start,this.end,this.value)}}),l=e.Class.extend({init:function(){this.root=n},insert:function(e){this.root=o(this.root,e)},remove:function(e){this.root=a(this.root,e)},findrange:function(e){for(var t=this.root;t!=n;)if(et.value.end))return t.value;t=t.right}return null},values:function(){var e=[];return c(this.root,e),e},intersecting:function(e,t){var n=[];return d(this.root,new s(e,t),n),n},map:function(e){var t=new l;return u(t,this.root,e),t},forEach:function(e){h(this.root,e)},clone:function(){return this.map((function(e){return e.clone()}))},first:function(){for(var e=this.root;e.left!=n;)e=e.left;return e},last:function(){for(var e=this.root;e.right!=n;)e=e.right;return e}});function c(e,t){e!==n&&(c(e.left,t),t.push(e.value),c(e.right,t))}function d(e,t,i){if(e!==n){var r=e.value;t.startr.end&&d(e.right,t,i)}}function u(e,t,i){t!==n&&(u(e,t.left,i),e.insert(i(t.value)),u(e,t.right,i))}function h(e,t){e!==n&&(h(e.left,t),t(e.value),h(e.right,t))}var p=e.Class.extend({init:function(e,t,n){void 0===t?this.tree=e:(this.tree=new l,this.tree.insert(new s(e,t,n)))},values:function(){return this.tree.values()},map:function(e){return new p(this.tree.map(e))},forEach:function(e){this.tree.forEach(e)},intersecting:function(e,t){return this.tree.intersecting(e,t)},first:function(){return this.tree.first().value},last:function(){return this.tree.last().value},insert:function(e,t,n){return this.tree.insert(new s(e,t,n))},value:function(e,t,n){if(void 0===n)return void 0===t&&(t=e),this.intersecting(e,t)[0].value;var i=this.tree.intersecting(e-1,t+1);if(i.length){var r=i[0],o=i[i.length-1];r.endt&&(o.value===n?t=o.end:i.pop());for(var a=0,s=i.length;at&&(c!==n?this.insert(t+1,u,c):t=u)}}this.insert(e,t,n)},expandedValues:function(e,t){for(var n=this.intersecting(e,t),i=[],r=0,o=e;o<=t;o++)n[r].endt&&(c=t),i=o+(c-l),this.value(o,i,r[a].value),o=++i}},iterator:function(e,t){return new f(e,t,this.intersecting(e,t))},getState:function(){return this.tree.clone()},setState:function(e){this.tree=e.clone()},toJSON:function(){return this.values()},fromJSON:function(e){e.forEach((function(e){this.value(e.start,e.end,e.value)}),this)}}),f=e.Class.extend({init:function(e,t,n){this.start=e,this.end=t,this.index=0,this.ranges=n},unique:function(){return this.ranges.map((function(e){return e.value}))},at:function(e){for(;this.ranges[this.index]&&this.ranges[this.index].ende&&r.push(new s(e,n.start-1,this.range.value)),r.push(n),e=n.end+1;return n.endthis.cellCount?null:this.properties[e].get(t)},set:function(e,t,n,i){switch(e){case"borderRight":t+=this.rowCount,n+=this.rowCount;case"borderLeft":e="vBorders";break;case"borderBottom":t++,n++;case"borderTop":e="hBorders"}t<=n&&n<=this.cellCount&&this.properties[e].set(t,n,i)},fromJSON:function(e,t){for(var n=0;na?null:i.parse(o.call(r,e))},r.name=e,r.value=i.spec.value,r},sortable:function(){return this.specs.filter((function(e){return e.sortable})).map((function(e){return this.lists[e.name]}),this)},iterators:function(e,t){return this.specs.reduce(function(n,i){return i.serializable&&n.push(this.iterator(i.name,e,t)),n}.bind(this),[])},forEach:function(e,t,n){var i,r,o=this.iterators(e,t),a=this.iterator("hBorders",e,t+1),s=this.iterator("vBorders",e,t),l=this.iterator("vBorders",e+this.rowCount,t+this.rowCount);function c(e,t,n){var r=t.at(n);r!==t.value&&(i[e]=r)}for(r=e;r<=t;r++){i={};for(var d=0;d=0?wn(t):"")+String.fromCharCode(65+e%26)}function yn(e){return/^[a-z_][a-z0-9_]*$/i.test(e)?e:"'"+e.replace(/\x27/g,"\\'")+"'"}function kn(e,t,n,i){var r="";return++t,isFinite(t)?null==i||2&i||(t="$"+t):t="",isFinite(n)?(r=wn(n),null==i||1&i||(r="$"+r)):n="",e?yn(e)+"!"+r+t:r+t}var xn=kendo.Class.extend({type:"ref",sheet:"",clone:function(){return this},hasSheet:function(){return this._hasSheet},simplify:function(){return this},setSheet:function(e,t){return this.sheet=e,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(e,t){e.call(t,this)},map:function(e,t){return e.call(t,this)},intersects:function(e){return this.intersect(e)!==Cn},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(e){var t=this,n=e;if(t===Cn||n===Cn)return t===n;if((n instanceof Tn||n instanceof Dn&&!(t instanceof Tn))&&(t=e,n=this),t instanceof Tn)return(n=n.simplify())instanceof Tn&&t.row==n.row&&t.col==n.col&&t.sheet==n.sheet;if(t instanceof Dn){if(n instanceof Dn)return n.topLeft.eq(t.topLeft)&&n.bottomRight.eq(t.bottomRight);if(n instanceof In)return n.single()&&t.eq(n.refs[0])}else if(t instanceof In&&n instanceof In){var i=t.refs,r=n.refs;if(i.length!=r.length)return!1;for(var o=0,a=i.length;ot?1:e=o){if(a<0&&s.row=o){if(a<0&&s.col=this.topLeft.row&&e.col>=this.topLeft.col&&e.row<=this.bottomRight.row&&e.col<=this.bottomRight.col},contains:function(e){if(e instanceof Array){var t=this;return e.some((function(e){return t.contains(e)}))}return e instanceof Tn?this._containsCell(e):e instanceof Dn&&this._containsRange(e)},_intersectRange:function(e){if(this.sheet!=e.sheet)return Cn;var t=this.topLeft.col,n=this.topLeft.row,i=this.bottomRight.col,r=this.bottomRight.row,o=e.topLeft.col,a=e.topLeft.row,s=e.bottomRight.col,l=e.bottomRight.row;return t<=s&&o<=i&&n<=l&&a<=r?new Dn(new Tn(Math.max(n,a),Math.max(t,o)),new Tn(Math.min(r,l),Math.min(i,s))).setSheet(this.sheet,this.hasSheet()):Cn},intersect:function(e){return e instanceof Tn?this._containsCell(e)?e:Cn:e instanceof Dn?this._intersectRange(e).simplify():e instanceof In?e.intersect(this):Cn},simplify:function(){return this.isCell()?new Tn(this.topLeft.row,this.topLeft.col,this.topLeft.rel).setSheet(this.sheet,this.hasSheet()):this},normalize:function(){var e,t=this.topLeft,n=this.bottomRight,i=t.row,r=t.col,o=n.row,a=n.col,s=2&t.rel,l=1&t.rel,c=2&n.rel,d=1&n.rel,u=!1;return s===c&&l===d&&(i>o&&(u=!0,e=i,i=o,o=e,e=s,s=c,c=e),r>a&&(u=!0,e=r,r=a,a=e,e=l,l=d,d=e),u&&(this.topLeft=new Tn(i,r,l|s),this.bottomRight=new Tn(o,a,d|c))),this},print:function(e,t,n){if(n||this.absolute(e,t).valid()){var i=this.topLeft.print(e,t,n)+":"+this.bottomRight.print(e,t,n);return this.hasSheet()&&(i=yn(this.sheet)+(this.endSheet?":"+yn(this.endSheet):"")+"!"+i),i}return"#REF!"},absolute:function(e,t){return new Dn(this.topLeft.absolute(e,t),this.bottomRight.absolute(e,t)).setSheet(this.sheet,this.hasSheet())},relative:function(e,t,n,i){return null==i&&(i=n),new Dn(this.topLeft.relative(e,t,n),this.bottomRight.relative(e,t,i)).setSheet(this.sheet,this.hasSheet())},height:function(){if(this.topLeft.rel!=this.bottomRight.rel)throw new Error("Mixed relative/absolute references");return this.bottomRight.row-this.topLeft.row+1},width:function(){if(this.topLeft.rel!=this.bottomRight.rel)throw new Error("Mixed relative/absolute references");return this.bottomRight.col-this.topLeft.col+1},collapse:function(){return this.topLeft.toRangeRef()},leftColumn:function(){return new Dn(this.topLeft,new Tn(this.bottomRight.row,this.topLeft.col))},rightColumn:function(){return new Dn(new Tn(this.topLeft.row,this.bottomRight.col),this.bottomRight)},topRow:function(){return new Dn(this.topLeft,new Tn(this.topLeft.row,this.bottomRight.col))},bottomRow:function(){return new Dn(new Tn(this.bottomRight.row,this.topLeft.col),this.bottomRight)},toRangeRef:function(){return this},toRow:function(e){return e+=Math.max(0,this.topLeft.row),new Dn(new Tn(e,this.topLeft.col),new Tn(e,this.bottomRight.col)).setSheet(this.sheet,this.hasSheet())},toColumn:function(e){return e+=Math.max(0,this.topLeft.col),new Dn(new Tn(this.topLeft.row,e),new Tn(this.bottomRight.row,e)).setSheet(this.sheet,this.hasSheet())},toCell:function(e,t){return e+=Math.max(0,this.topLeft.row),t+=Math.max(0,this.topLeft.col),new Tn(e,t,0).setSheet(this.sheet,this.hasSheet())},forEachRow:function(e){for(var t=this.topLeft.row,n=this.bottomRight.row,i=this.topLeft.col,r=this.bottomRight.col,o=t;o<=n;o++)e(new Dn(new Tn(o,i),new Tn(o,r)))},forEachColumn:function(e){for(var t=this.topLeft.row,n=this.bottomRight.row,i=this.topLeft.col,r=this.bottomRight.col,o=i;o<=r;o++)e(new Dn(new Tn(t,o),new Tn(n,o)))},intersecting:function(e){return e.filter((function(e){return e.toRangeRef().intersects(this)}),this)},union:function(e,t){var n=this.intersecting(e),i=this.topLeft.row,r=this.topLeft.col,o=this.bottomRight.row,a=this.bottomRight.col,s=!1;n.forEach((function(e){(e=e.toRangeRef()).topLeft.rowo&&(s=!0,o=e.bottomRight.row),e.bottomRight.col>a&&(s=!0,a=e.bottomRight.col),t&&t(e)}));var l=new Dn(new Tn(i,r),new Tn(o,a));return s?l.union(e,t):l},resize:function(e){var t=Math.max.bind(Math,0);function n(e){return e||0}var i=this.topLeft.row+n(e.top),r=this.topLeft.col+n(e.left),o=this.bottomRight.row+n(e.bottom),a=this.bottomRight.col+n(e.right);return r<0&&a<0||i<0&&o<0?Cn:i<=o&&r<=a?new Dn(new Tn(t(i),t(r)),new Tn(t(o),t(a))):Cn},move:function(e,t){return new Dn(new Tn(this.topLeft.row+e,this.topLeft.col+t),new Tn(this.bottomRight.row+e,this.bottomRight.col+t))},first:function(){return this.topLeft.clone().setSheet(this.sheet,this.hasSheet())},isCell:function(){return!this.endSheet&&this.topLeft.eq(this.bottomRight)},toString:function(){return this.topLeft+":"+this.bottomRight},adjust:function(e,t,n,i,r,o,a){var s=this.topLeft.adjust(e,t,n,i,r,o,a),l=this.bottomRight.adjust(e,t,n,i,r,o,a);return s===Cn&&l===Cn?Cn:(s===Cn?(s=this.topLeft.absolute(e,t),r?s.row=o:s.col=o,null!=n&&null!=i&&(s=s.relative(n,i,this.topLeft.rel))):l===Cn&&(l=this.bottomRight.absolute(e,t),r?l.row=o-1:l.col=o-1,null!=n&&null!=i&&(l=l.relative(n,i,this.bottomRight.rel))),new Dn(s,l).setSheet(this.sheet,this.hasSheet()).simplify())},valid:function(){return this.topLeft.valid()&&this.bottomRight.valid()}}),In=xn.extend({init:function(e){this.refs=e,this.length=e.length},clone:function(){return new In(this.refs.slice())},intersect:function(e){for(var t=[],n=0;n0?new In(t).simplify():Cn},simplify:function(){var e=new In(this.refs.reduce((function(e,t){return(t=t.simplify())!==Cn&&e.push(t),e}),[]));return e.empty()?Cn:e.single()?e.refs[0]:e},absolute:function(e,t){return new In(this.refs.map((function(n){return n.absolute(e,t)})))},forEach:function(e,t){this.refs.forEach((function(n){n instanceof In?n.forEach(e,t):e.call(t,n)}),t)},toRangeRef:function(){return this.refs[0].toRangeRef()},contains:function(e){return this.refs.some((function(t){return t.contains(e)}))},map:function(e,t){var n=[];return this.forEach((function(i){n.push(e.call(t,i))})),new In(n)},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(e){return this.refs[e]},nextRangeIndex:function(e){return e===this.length-1?0:e+1},previousRangeIndex:function(e){return 0===e?this.length-1:e-1},concat:function(e){return new In(this.refs.concat([e]))},print:function(e,t,n){return this.refs.map((function(i){return i.print(e,t,n)})).join(",")},replaceAt:function(e,t){var n=this.refs.slice();return n.splice(e,1,t),new In(n)},leftColumn:function(){return this.map((function(e){return e.leftColumn()}))},rightColumn:function(){return this.map((function(e){return e.rightColumn()}))},topRow:function(){return this.map((function(e){return e.topRow()}))},bottomRow:function(){return this.map((function(e){return e.bottomRow()}))},forEachRow:function(e){this.forEach((function(t){t.forEachRow(e)}))},forEachColumn:function(e){this.forEach((function(t){t.forEachColumn(e)}))},adjust:function(e,t,n,i,r,o,a){return this.map((function(s){return s.adjust(e,t,n,i,r,o,a)})).simplify()},toString:function(){return this.refs.map((function(e){return e.toString()})).join(", ")},valid:function(){for(var e=this.refs.length;--e>=0;)if(this.refs[e].valid())return!1;return!0},renameSheet:function(e,t){this.refs.forEach((function(n){n.renameSheet(e,t)}))}});bn.NULLREF=Cn,bn.SHEETREF=new Dn(new Tn(0,0),new Tn(1/0,1/0)),bn.FIRSTREF=new Tn(0,0),bn.Ref=xn,bn.NameRef=Sn,bn.CellRef=Tn,bn.RangeRef=Dn,bn.UnionRef=In,bn.SHEETREF.print=function(){return"#SHEET"},function(e){var t=e.spreadsheet.RangeRef,n=e.spreadsheet.CellRef,i=e.Class.extend({init:function(e){this._grid=e},rectIsVertical:function(e,t,n,i){var r=this._grid.rectangle(e.toRangeRef()),o=this._grid.rectangle(t.toRangeRef());return Math.abs(o[i]-r[i])>Math.abs(r[n]-o[n])},autoFillDest:function(e,i){var r,o,a,s,l=e.topLeft,c=e.bottomRight,d=i.row>=l.row,u=i.col>=l.col;if(4===(r=d?u?4:3:u?2:1))o=l,a=c,(i.row>a.row||i.col>a.col)&&(i=new n(Math.max(i.row,a.row),Math.max(i.col,a.col))),s=this.rectIsVertical(a,i,"right","bottom")?new n(i.row,a.col):new n(a.row,i.col);else if(3===r){var h=new n(l.col,c.row);i.row>c.row&&this.rectIsVertical(h,i,"left","bottom")?(o=l,s=new n(i.row,c.col)):(o=c,s=new n(l.row,i.col))}else if(2===r){var p=new n(l.row,c.col);i.col>c.col&&!this.rectIsVertical(p,i,"right","top")?(o=l,s=new n(c.row,i.col)):(o=c,s=new n(i.row,l.col))}else o=c,s=this.rectIsVertical(l,i,"left","top")?new n(i.row,l.col):new n(l.row,i.col);return this._grid.normalize(new t(o,s))}});e.spreadsheet.AutoFillCalculator=i}(kendo),function(e){var t=e.spreadsheet.RangeRef,n=e.spreadsheet.CellRef,i=e.Class.extend({init:function(e,t,n,i){this.rangeGetter=n,this.prevLeft=function(n){var r=i(this.range(n)),o=this.range(t.prevVisible(r.topLeft[e]));return i(o).topLeft[e]},this.nextRight=function(n){var r=i(this.range(n)),o=this.range(t.nextVisible(r.bottomRight[e]));return i(o).bottomRight[e]},this.nextLeft=function(n){var r=i(this.range(n));return t.nextVisible(r.bottomRight[e])},this.prevRight=function(n){var r=i(this.range(n));return t.prevVisible(r.topLeft[e])}},boundary:function(e,t){this.top=e,this.bottom=t},range:function(e){return this.rangeGetter(e,this.top,this.bottom)}}),r=e.Class.extend({init:function(t){this._sheet=t,this.autoFillCalculator=new e.spreadsheet.AutoFillCalculator(t._grid),this.colEdge=new i("col",this._sheet._grid._columns,this.columnRange.bind(this),this.union.bind(this)),this.rowEdge=new i("row",this._sheet._grid._rows,this.rowRange.bind(this),this.union.bind(this))},height:function(e){this._viewPortHeight=e},union:function(e){return this._sheet.unionWithMerged(e)},columnRange:function(e,t,n){return this._sheet._ref(t,e,n-t,1)},rowRange:function(e,t,n){return this._sheet._ref(e,t,1,n-t)},selectionIncludesMergedCells:function(){return this._sheet.select().contains(this._sheet._mergedCells)},setSelectionValue:function(e){var t=this._sheet.selection();setTimeout((function(){t.value(e())}))},selectAll:function(){this._sheet.select(this._sheet._sheetRef)},select:function(e,t,n){e=this.refForMode(e,t),n&&(e=this._sheet.select().concat(e)),this._sheet.select(e)},refForMode:function(e,t){var n=this._sheet._grid;switch(t){case"range":e=n.normalize(e);break;case"row":e=n.rowRef(e.row);break;case"column":e=n.colRef(e.col);break;case"sheet":e=this._sheet._sheetRef}return e},startSelection:function(e,n,i,r,o){if("autofill"==n)this._sheet.startAutoFill();else if(r&&"range"==n){var a=new t(this._sheet.activeCell().first(),e);this._sheet.select(a,!1,!1),this._sheet.startSelection(o)}else this._sheet.startSelection(o),this.select(e,n,i)},completeSelection:function(){this._sheet.completeSelection()},selectForContextMenu:function(e,t){var n=this._sheet;n._activeDrawing=null,n.select().contains(this.refForMode(e,t))||this.select(e,t)},selectDrawingForContextMenu:function(e){var t=this._sheet;t._activeDrawing=e,t.triggerChange({selection:!0})},modifySelection:function(e){var i,r=this.determineDirection(e),a=this._sheet,s=this._viewPortHeight,l=a._grid._rows,c=a._grid._columns,d=a.currentOriginalSelectionRange(),u=a.select().toRangeRef(),h=a.activeCell(),p=d.topLeft.clone(),f=d.bottomRight.clone(),m=new n(f.row,p.col);switch(this.colEdge.boundary(u.topLeft.row,u.bottomRight.row),this.rowEdge.boundary(u.topLeft.col,u.bottomRight.col),r){case"expand-left":p.col=this.colEdge.prevLeft(p.col),i=p;break;case"shrink-right":p.col=this.colEdge.nextLeft(p.col),i=p;break;case"expand-right":f.col=this.colEdge.nextRight(f.col),i=f;break;case"shrink-left":f.col=this.colEdge.prevRight(f.col),i=f;break;case"expand-up":p.row=this.rowEdge.prevLeft(p.row),i=p;break;case"shrink-down":p.row=this.rowEdge.nextLeft(p.row),i=p;break;case"expand-down":f.row=this.rowEdge.nextRight(f.row),i=f;break;case"shrink-up":f.row=this.rowEdge.prevRight(f.row),i=f;break;case"expand-page-up":p.row=l.prevPage(p.row,s);break;case"shrink-page-up":f.row=l.prevPage(f.row,s);break;case"expand-page-down":f.row=l.nextPage(f.row,s);break;case"shrink-page-down":p.row=l.nextPage(p.row,s);break;case"first-col":p.col=c.firstVisible(),f.col=h.bottomRight.col,i=p;break;case"last-col":f.col=c.lastVisible(),p.col=h.topLeft.col,i=f;break;case"first-row":p.row=l.firstVisible(),f.row=h.bottomRight.row,i=p;break;case"last-row":f.row=l.lastVisible(),p.row=h.topLeft.row,i=f;break;case"last":f.row=l.lastVisible(),f.col=c.lastVisible(),p=h.topLeft,i=f;break;case"first":p.row=l.firstVisible(),p.col=c.firstVisible(),f=h.bottomRight,i=p;break;case"expand-word-right":f.col=c.nextUntil(f.col,o(a,f,!0)),i=f;break;case"shrink-word-right":p.col=c.nextUntil(m.col,o(a,m,!0)),i=p;break;case"expand-word-left":p.col=c.prevUntil(m.col,o(a,m,!0)),i=p;break;case"shrink-word-left":f.col=c.prevUntil(f.col,o(a,f,!0)),i=f;break;case"expand-word-up":p.row=l.prevUntil(p.row,o(a,p,!1)),i=p;break;case"shrink-word-up":f.row=l.prevUntil(f.row,o(a,f,!1)),i=f;break;case"expand-word-down":f.row=l.nextUntil(f.row,o(a,f,!1)),i=f;break;case"shrink-word-down":p.row=l.nextUntil(p.row,o(a,p,!1)),i=p}var g=new t(p,f);this.union(g).intersects(h)?(i&&a.focus(i),this.updateCurrentSelectionRange(g)):this.modifySelection(r.replace("shrink","expand"))},moveActiveCell:function(e){var t=this._sheet,i=t.activeCell(),r=i.topLeft,a=i.bottomRight,s=t.originalActiveCell(),l=t._grid._rows,c=t._grid._columns,d=s.row,u=s.col;switch(e){case"left":u=c.prevVisible(r.col);break;case"up":d=l.prevVisible(r.row);break;case"right":u=c.nextVisible(a.col);break;case"down":d=l.nextVisible(a.row);break;case"first-col":u=c.firstVisible();break;case"last-col":u=c.lastVisible();break;case"first-row":d=l.firstVisible();break;case"last-row":d=l.lastVisible();break;case"last":d=l.lastVisible(),u=c.lastVisible();break;case"first":d=l.firstVisible(),u=c.firstVisible();break;case"next-page":d=l.nextPage(a.row,this._viewPortHeight);break;case"prev-page":d=l.prevPage(a.row,this._viewPortHeight);break;case"word-right":u=c.nextUntil(u,o(t,a,!0));break;case"word-left":u=c.prevUntil(u,o(t,a,!0));break;case"word-up":d=l.prevUntil(d,o(t,a,!1));break;case"word-down":d=l.nextUntil(d,o(t,a,!1))}t.select(new n(d,u))},navigateInSelection:function(t){var i,r,o,a=this._sheet,s=a.activeCell().topLeft,l=a.originalActiveCell(),c=a._grid._rows,d=a._grid._columns,u=l.row,h=l.col,p=!1,f=!1,m=s.col,g=s.row;function v(e){i=e.topLeft,r=e.bottomRight}v(a.currentNavigationRange());for(var _=!1,b=!1;!_&&!b;){var w=new n(u,h);switch(a.singleCellSelection()&&(p=i.eq(w)&&a._sheetRef.topLeft.eq(w),f=r.eq(w)&&a._sheetRef.bottomRight.eq(w),p||(p=d.firstVisible()===h&&c.firstVisible()===u),f||(f=d.lastVisible()===h&&c.lastVisible()===u)),t){case"next":f?(b=!0,e.focusNextElement()):r.eq(w)?(v(a.nextNavigationRange()),u=i.row,h=i.col):((h=d.nextVisible(m))==m||h>r.col)&&(h=i.col,u=(o=c.nextVisible(u))==u||o>r.row?i.row:o);break;case"previous":p?(b=!0,this._sheet._workbook._view.element.find(".k-spreadsheet-name-editor .k-input-inner").trigger("focus")):i.eq(w)?(v(a.previousNavigationRange()),u=r.row,h=r.col):((h=d.prevVisible(m))==m||hr.row)&&(u=i.row,h=(o=d.nextVisible(h))==h||o>r.col?i.col:o);break;case"upper":i.eq(w)?(v(a.previousNavigationRange()),u=r.row,h=r.col):((u=c.prevVisible(g))==g||u=0;if(!s&&!a)break;if(a&&!t.isHiddenColumn(r)){o=r;break}if(s&&!t.isHiddenColumn(i)){o=i;break}i--,r++}null!==o&&(n=new e.spreadsheet.RangeRef(new e.spreadsheet.CellRef(0,o),new e.spreadsheet.CellRef(t._rows._count-1,o)),t.range(n).select())},hideSelectedRows:function(){this.forEachSelectedRow((function(e,t){e.hideRow(t)}));for(var t=this._sheet,n=t.select().toRangeRef(),i=n.topLeft.row,r=n.bottomRight.row,o=null;;){var a=r=0;if(!s&&!a)break;if(a&&!t.isHiddenRow(r)){o=r;break}if(s&&!t.isHiddenRow(i)){o=i;break}i--,r++}null!==o&&(n=new e.spreadsheet.RangeRef(new e.spreadsheet.CellRef(o,0),new e.spreadsheet.CellRef(o,t._columns._count-1)),t.range(n).select())},unhideSelectedColumns:function(){this.forEachSelectedColumn((function(e,t){e.unhideColumn(t)}))},unhideSelectedRows:function(){this.forEachSelectedRow((function(e,t){e.unhideRow(t)}))},addColumnLeft:function(){var e,t=this._sheet,n=0;return t.batch((function(){t.select().forEachColumnIndex((function(i){e||(e=i),t.insertColumn(e),++n}))}),{recalc:!0,layout:!0}),{base:e,count:n}},addColumnRight:function(){var e,t=this._sheet,n=0;return t.batch((function(){t.select().forEachColumnIndex((function(t){e=t+1,++n}));for(var i=0;i=e._rows._count||t.bottomRight.col>=e._columns._count)&&e.resize(Math.max(t.bottomRight.row+1,e._rows._count),Math.max(t.bottomRight.col+1,e._columns._count)),e.range(t).setState(this._content,this),e.triggerChange({recalc:!0,ref:t})},external:function(e){if(!e||!e.html&&!e.plain)return this._externalContent;this._externalContent=e},isExternal:function(){return!this._isInternal()},parse:function(){var t;if(this._isInternal())t=this._internalContent;else{var i=this._externalContent;if(t=i.plain?function(e){var t=r();if(-1===e.indexOf("\t")&&-1==e.indexOf("\n"))o(t,0,0,{value:e});else for(var n=e.split("\n"),i=0;i1||_>1&&!w)&&i.mergedCells.push(new e.spreadsheet.RangeRef(new n(l,c),new n(l+v-1,c+_-1)).toString());for(var y=l+v;--y>=l;)for(var k=c+_;--k>=c;)y").html(this._externalContent.html).find("table.kendo-clipboard-"+this._uid).length,n=!!t("
                    ").html(this._externalContent.plain).find("table.kendo-clipboard-"+this._uid).length;return e||n}});function r(){var e=new n(0,0,0);return{ref:e,mergedCells:[],data:[],foreign:!0,origRef:e.toRangeRef()}}function o(e,t,n,i){var r=e.data||(e.data=[]);r[t]||(r[t]=[]),r[t][n]=i;var o=e.origRef.bottomRight;o.row=Math.max(o.row,t),o.col=Math.max(o.col,n)}function a(e){return e.replace(/^-(?:ms|moz|webkit)-/,"")}function s(e,t,n,i,r){var o,s,l,c=window.getComputedStyle(n);(o=n.getAttribute("data-sheets-value"))&&(o=(o=JSON.parse(o))[o[1]]),(s=n.getAttribute("data-sheets-numberformat"))&&(s=(s=JSON.parse(s))[s[1]]),l=n.getAttribute("data-sheets-formula"),null==o&&null==s&&null==l&&(o=n.getAttribute("sdval"),(s=n.getAttribute("sdnum"))&&(s=s.replace(/^1033;(?:0;)?/,""))),null==o&&(o=n.innerText.replace(/\t$/,""));var d=function(e,t){e.className||(t=e.style);var n={};return["borderBottom","borderRight","borderLeft","borderTop"].forEach((function(e){var i=t[e+"Width"];i&&(i=parseInt(i,10)),i&&(n[e]={size:i,color:t[e+"Color"]||"#000"})})),n}(n,c),u={value:""===o?null:o,formula:l,borderTop:d.borderTop||i.get(e,t)||null,borderBottom:d.borderBottom||i.get(e+1,t)||null,borderLeft:d.borderLeft||r.get(e,t)||null,borderRight:d.borderRight||r.get(e,t+1)||null,fontSize:parseInt(c.fontSize,10)};null!=s&&(u.format=s),i.set(e,t,u.borderTop),i.set(e+1,t,u.borderBottom),r.set(e,t,u.borderLeft),r.set(e,t+1,u.borderRight),"rgb(0, 0, 0)"!==c.backgroundColor&&"rgba(0, 0, 0, 0)"!==c.backgroundColor&&(u.background=c.backgroundColor),"right"!==a(c.textAlign)&&(u.textAlign=a(c.textAlign)),"middle"!==c.verticalAlign&&(u.verticalAlign=c.verticalAlign),"normal"!==c.wordWrap&&(u.wrap=!0);var h=n.querySelector("font");return h&&(c=window.getComputedStyle(h)),"rgb(0, 0, 0)"!==c.color&&"rgba(0, 0, 0, 0)"!==c.color&&(u.color=c.color),/^underline/.test(c.textDecoration)&&(u.underline=!0),"italic"==c.fontStyle&&(u.italic=!0),/^(?:bold|[67]00)$/i.test(c.fontWeight)&&(u.bold=!0),u}e.spreadsheet.Clipboard=i}(kendo),function(e){var t=e.jQuery,n=e.spreadsheet.UnionRef,i=e.spreadsheet.CellRef,r=e.spreadsheet.RangeRef,o=["color","fontFamily","underline","italic","bold","textAlign","indent","verticalAlign","background","format","link","editor","borderTop","borderRight","borderBottom","borderLeft","comment","html"],a=e.Class.extend({init:function(e,t){this._sheet=t,this._ref=e},clone:function(){return new a(this._ref.clone(),this._sheet)},skipHiddenCells:function(){var e=[],t=this,o=t._sheet,a=o.isHiddenRow.bind(o),l=o.isHiddenColumn.bind(o);return t._ref.forEach((function(n){for(var o=(n=t._normalize(n.toRangeRef())).topLeft,c=n.bottomRight,d=s(o.row,c.row,a),u=s(o.col,c.col,l),h=0;h1?new n(e):e[0])},_normalize:function(e){return this._sheet._grid.normalize(e)},_set:function(e,t,n){var r=this,o=r._sheet;return r._ref.forEach((function(n){var r=n;if(("value"===e||"formula"===e||"link"===e)&&n.topLeft){var a=new i(n.topLeft.row,n.topLeft.col);o.forEachMergedCell((function(e){e.intersects(a)&&(r=a)}))}o._set(r.toRangeRef(),e,t)})),n||o.triggerChange({recalc:"formula"==e||"value"==e||"validation"==e,value:t,range:r,ref:r._ref,isValue:"value"==e}),r},_get:function(e){return this._sheet._get(this._ref.toRangeRef(),e)},_property:function(e,t){return void 0===t?this._get(e):this._set(e,t)},value:function(e){return void 0!==e&&this._set("formula",null,!0),this._property("value",e)},html:function(e){return this._property("html",e)},resize:function(e){var t=this._resizedRef(e);return new a(t,this._sheet)},_resizedRef:function(e){return this._ref.map((function(t){return t.toRangeRef().resize(e)}))},input:function(n,i){i=t.extend({arrayFormula:!1},i);var r,o=this._get("format");if(void 0!==n){var a=this._ref.toRangeRef().topLeft;return r=e.spreadsheet.calc.parse(this._sheet.name(),a.row,a.col,n,o),this._sheet.batch(function(){var t=null;if("exp"==r.type)t=e.spreadsheet.calc.compile(r);else if("@"!=o){var a=o&&e.spreadsheet.formatting.type(r.value,o);"date"==r.type&&"date"!=a?this.format(r.format||e.culture().calendar.patterns.d.replace(/M/g,"m").replace(/'/g,'"').replace(/tt/,"am/pm")):"percent"==r.type&&"percent"!=a?this.format(100*r.value==(100*r.value|0)?"0%":"0.00%"):r.format&&(!o||r.currency||"number"==a&&"number"==r.type&&r.format.length>o.length)&&this.format(r.format)}else"string"!=r.type&&(r.value=n);this.formula(t,i.arrayFormula),t||this.value(r.value)}.bind(this),{recalc:!0,value:n,ref:this._ref,editorChange:this._sheet.isInEditMode(),isValue:!0}),this}n=this._get("value");var s,l=this._get("formula"),c=o&&!l&&e.spreadsheet.formatting.type(n,o);if(l)n="="+l;else e:{if(o&&"date"==c){var d=e.spreadsheet.formatting.text(n,o);if(r=e.spreadsheet.calc.parse(null,null,null,d,o),d==e.spreadsheet.formatting.text(r.value,o)){n=d;break e}}"date"===c?n=e.toString(e.spreadsheet.numberToDate(n),e.culture().calendar.patterns.d):"percent"===c?n=e.spreadsheet.calc.runtime.limitPrecision(100*n)+"%":"string"==typeof n&&(/^[=']/.test(n)||/^(?:true|false)$/i.test(n)||!/^=/.test(s=n)&&/number|percent/.test(e.spreadsheet.calc.parse(null,0,0,s).type))?n="'"+n:this._sheet._useCultureDecimals()&&"number"==typeof n&&n!=Math.floor(n)&&(n=String(n).replace(".",e.culture().numberFormat["."]))}return n},enable:function(t){return void 0===t?!e.util.withExit((function(e){this._sheet.forEach(this._ref,(function(t,n,i){!1===i.enable&&e(!0)}))}),this):this._property("enable",t)},formula:function(e,t){var n=this;if(void 0===e){var i=n._get("formula");return i?""+i:null}if(t){var r=this._ref.toRangeRef();(e=n._sheet.range(r.topLeft)._set("formula",e)._get("formula"))&&e.setArrayFormulaRange(r)}else n._set("formula",e);return n},intersectingArrayFormula:function(){var t=this._ref.clone().simplify().setSheet(this._sheet.name());return e.util.withExit((function(n){this._sheet._forFormulas((function(i){var r=i.arrayFormulaRange;r&&(r=t.intersect(r))!==e.spreadsheet.NULLREF&&n({formula:i,intersection:r})}))}),this)},canEditArrayFormula:function(){var e=this.intersectingArrayFormula();return!e||e.formula.arrayFormulaRange.eq(e.intersection)},validation:function(e){if(void 0===e){var t=this._get("validation");return t?t.toJSON():null}return this._property("validation",e)},_getValidationState:function(){var e,t,n=this._ref.toRangeRef(),i=n.topLeft.row,r=n.topLeft.col,o=n.bottomRight.row,a=n.bottomRight.col;for(e=r;e<=a;e++)for(t=i;t<=o;t++){var s=this._sheet._validation(t,e);if(s&&"reject"===s.type&&!1===s.value)return s}return!1},merge:function(){return this._ref=this._sheet._merge(this._ref),this},unmerge:function(){var e=this._sheet._mergedCells;return this._ref.forEach((function(t){t.toRangeRef().intersecting(e).forEach((function(t){e.splice(e.indexOf(t),1)}))})),this._sheet.triggerChange({}),this},select:function(){return this._sheet.select(this._ref),this},values:function(t){if(this._ref instanceof n)throw new Error("Unsupported for multiple ranges.");if(this._ref===e.spreadsheet.NULLREF){if(void 0!==t)throw new Error("Unsupported for NULLREF.");return[]}var i,r,o=this._ref.toRangeRef(),a=o.topLeft.row,s=o.topLeft.col,l=o.bottomRight.row,c=o.bottomRight.col;if(void 0===t){t=new Array(o.height());for(var d=0;d1&&((t=t.clone()).topLeft.col++,this._sheet.range(t)._set("vBorders",e))}),this),this},insideHorizontalBorders:function(e){return this._ref.forEach((function(t){t instanceof r&&t.height()>1&&((t=t.clone()).topLeft.row++,this._sheet.range(t)._set("hBorders",e))}),this),this}});function s(e,t,n){for(;e<=t&&n(e);)e++;if(e>t)return[];for(var i=e+1;i<=t;++i)if(n(i))return[{begin:e,end:i-1}].concat(s(i+1,t,n));return[{begin:e,end:t}]}t.each(o,(function(e,t){a.prototype[t]=function(e){return this._property(t,e)}}));var l=t("
                    ")[0];l.style.cssText="position: absolute !important; top: -4000px !important; height: auto !important;padding: 1px 3px !important; box-sizing: border-box; margin: 0 !important; border: 1px solid black !important;line-height: normal !important; visibility: hidden !important;white-space: pre-wrap;",e.spreadsheet.util={getTextHeight:function(t,n,i,r,o){var a={baselineMarkerSize:0,width:!0===o?n+"px":"auto","font-size":(r||12)+"px","font-family":i||"Arial","white-space":!0===o?"pre-wrap":"pre","overflow-wrap":!0===o?"break-word":"normal","word-wrap":!0===o?"break-word":"normal"};return e.util.measureText(t,a,{box:l,normalizeText:!1}).height}},e.spreadsheet.Range=a}(window.kendo);var zn={},Mn=kendo.spreadsheet;Mn.calc=zn;var En=zn.runtime={},An=kendo.Class,Hn=Mn.Ref,Rn=Mn.CellRef,Fn=Mn.RangeRef,Pn=Mn.UnionRef,Bn=Mn.NULLREF;function Ln(e){if(e instanceof Ln)return e;this.code=e}Ln.prototype.toString=function(){return"#"+this.code+("NAME"==this.code?"?":"!")};var Vn=An.extend({init:function(e,t,n,i){this.callback=e,this.formula=t,this.ss=n,this.parent=i},resolve:function(e){var t=this;e instanceof Hn?t.resolveCells([e],(function(){t._resolve(e)})):t._resolve(e)},error:function(e){return new Ln(e)},_resolve:function(e){var t;e=void 0===e?null:Array.isArray(e)?this.asMatrix(e):"number"==typeof(t=e)?Kn(t):t;var n=this.formula;n.arrayFormulaRange?e=this.asMatrix(e)||this.asMatrix([[e]]):e instanceof Fn&&(e=this._arrayArg(e)),n.value=e,this.ss.onFormula(n)&&this.callback&&this.callback.call(n,e)},resolveCells:function(e,t){var n=this,i=[];if(function e(t){for(var i=0;i=e.topLeft.col&&t.col<=e.bottomRight.col?this.getRefData(new Rn(e.topLeft.row,t.col).setSheet(e.sheet)):1==e.width()&&t.row>=e.topLeft.row&&t.row<=e.bottomRight.row?this.getRefData(new Rn(t.row,e.topLeft.col).setSheet(e.sheet)):new Ln("VALUE"):this.asMatrix(e)},asMatrix:function(e){if(e instanceof On)return e;var t=this;if(e instanceof Fn){var n=e.topLeft,i=n.row,r=n.col,o=t.getRefCells(e),a=new On(t);return isFinite(e.width())&&(a.width=e.width()),isFinite(e.height())&&(a.height=e.height()),isFinite(i)||(i=0),isFinite(r)||(r=0),o.forEach((function(e){a.set(e.row-i,e.col-r,e.value)})),a}if(Array.isArray(e)&&e.length>0){a=new On(t);var s=0;return e.forEach((function(e){var n=0,i=1;e.forEach((function(e){var r=e instanceof Fn;e instanceof Hn&&!r&&(e=t.getRefData(e)),(r||Array.isArray(e))&&(e=t.asMatrix(e)),e instanceof On?(e.each((function(e,t,i){a.set(s+t,n+i,e)})),i=Math.max(i,e.height),n+=e.width):("string"==typeof e&&e.length&&!isNaN(e)&&(e=Number(e)),a.set(s,n++,e))})),s+=i})),a}},getRefCells:function(e,t,n){var i=this.formula;return this.ss.getRefCells(e,t,i.sheet,i.row,i.col,n)},getRefData:function(e,t){var n=this.formula;return this.ss.getData(e,n.sheet,n.row,n.col,t)},workbook:function(){return this.ss.workbook}}),On=An.extend({init:function(e){this.context=e,this.height=0,this.width=0,this.data=[]},clone:function(){var e=new On(this.context);return e.height=this.height,e.width=this.width,e.data=this.data.map((function(e){return e.slice()})),e},get:function(e,t){var n=this.data[e],i=n?n[t]:null;return i instanceof Hn?this.context.getRefData(i):i},getNA:function(e,t){return e=this.height&&(this.height=e+1),t>=this.width&&(this.width=t+1)},each:function(e,t){for(var n=0;n=0;)for(var i=t[n]=new Array(e),r=e;--r>=0;)i[r]=n==r?1:0;return this},multiply:function(e){for(var t=this,n=new On(t.context),i=0;i=0;)for(a=r;--a>=0;)if(i[a][r])for(s=2*t;--s>=t;)i[a][s]-=i[r][s]*i[a][r];return n.slice(0,t,t,t)},augment:function(e){var t=this.clone(),n=t.width;return e.each((function(e,i,r){t.set(i,r+n,e)})),t},slice:function(e,t,n,i){for(var r=new On(this.context),o=0;oi&&(i=o,r=e)}return r}var Wn=An.extend({init:function(e,t,n,i,r,o,a){this.refs=e,this.handler=t,this.print=n,this.absrefs=null,this.sheet=i,this.row=r,this.col=o,this.onReady=[],this.pending=!1,this.arrayFormulaRange=a},setArrayFormulaRange:function(e){this.arrayFormulaRange=e.clone().setSheet(this.sheet)},clone:function(e,t,n,i){var r=e.toLowerCase(),o=this.refs,a=this.arrayFormulaRange;return(i||r!=this.sheet.toLowerCase())&&(o=o.map((function(t){return t.hasSheet()||t.sheet&&t.sheet.toLowerCase()==r||(t=t.clone().setSheet(e)),t})),a&&(a=a.clone().setSheet(e))),new Wn(o,this.handler,this.print,e,t,n,a)},deepClone:function(){var e=this.refs.map((function(e){return e.clone()}));return new Wn(e,this.handler,this.print,this.sheet,this.row,this.col,this.arrayFormulaRange)},resolve:function(e){this.pending=!1,this.onReady.forEach((function(t){t(e)}))},exec:function(e,t,n){if("value"in this)t&&t(this.value);else{t&&this.onReady.push(t);for(var i=new Vn(this.resolve,this,e,n),r=0;n;){if(n.formula===this)return this.pending=!1,void i.resolve(new Ln("CIRCULAR"));n=n.parent,++r}if(this.pending)return;this.pending=!0;var o=function(){this.absrefs||(this.absrefs=this.refs.map((function(e){return e.absolute(this.row,this.col)}),this)),this.handler.call(i)}.bind(this);r<20?o():setTimeout(o,0)}},reset:function(){this.onReady=[],this.pending=!1,delete this.value},renameSheet:function(e,t){e=e.toLowerCase(),this.absrefs=null,this.sheet.toLowerCase()==e&&(this.sheet=t),this.refs.forEach((function(n){n.renameSheet(e,t)}))},adjust:function(e,t,n,i){e=e.toLowerCase();var r=this.row,o=this.col,a=this.sheet.toLowerCase(),s=!1;a==e&&("row"==t&&r>=n&&(this.row+=i,s=!0),"col"==t&&o>=n&&(this.col+=i,s=!0));var l=this.row,c=this.col;this.absrefs=null;var d=this.refs,u=s;this.refs=d.map((function(e){var t=p(e);return u||Un(t,e)||(u=!0),t}));var h=this.arrayFormulaRange;if(h&&(this.arrayFormulaRange=p(h),u||Un(h,this.arrayFormulaRange)||(u=!0)),u)return new Wn(d,this.handler,this.print,this.sheet,r,o,h);function p(a){return a===Bn?a:a.sheet.toLowerCase()!=e?(s&&("row"==t&&r>=n&&(a=a.relative(i,0)),"col"==t&&o>=n&&(a=a.relative(0,i))),a):a.adjust(r,o,l,c,"row"==t,n,i)}},toString:function(){return this.print(this.row,this.col)}});function Un(e,t){if(e.constructor!==t.constructor)return!1;if(e instanceof Rn)return e.sheet==t.sheet&&e.row==t.row&&e.col==t.col&&e.rel==t.rel;if(e instanceof Fn)return Un(e.topLeft,t.topLeft)&&Un(e.bottomRight,t.bottomRight)&&e.endSheet==t.endSheet;if(e instanceof Pn){var n=e.refs.length;if(n!=t.refs.length)return!1;for(;--n>=0;)if(!Un(e.refs[n],t.refs[n]))return!1}return!0}var jn=Object.create(null),qn=[];function Gn(e,t){var n,i,r,o="function arrayArgs(args) { var xargs = [], width = 0, height = 0, arrays = [], i = 0; ",a="function resolve(args, callback) { var toResolve = [], i = 0; ",s="'use strict'; function check(args) { var stack = [], tmp, xargs = [], i = 0, m, err = 'VALUE'; ",l=!1,c=!1,d=!1;return s+=t.map((function e(t){n=t[0];var r="{ ";if(Array.isArray(n))o+="while (i < args.length) { ",a+="while (i < args.length) { ",r+="xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ",r+="while (i < args.length) { ",r+=t.map(e).join(""),r+="} ",r+="xargs = stack.pop(); ",a+="} ",o+="} ";else if("+"==n)o+="while (i < args.length) { ",a+="while (i < args.length) { ",r+="if (i >= args.length) return new CalcError('N/A'); ",r+="xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ",r+="do { ",r+=t.slice(1).map(e).join(""),r+="} while (i < args.length); ",r+="xargs = stack.pop(); ",a+="} ",o+="} ";else if("?"==n)r+="if (!("+p(t[1])+")) return new CalcError(err); ";else{var s=t[1];if(Array.isArray(s)&&/^#?collect/.test(s[0])){var l=/!$/.test(s[0]),h=s[2];u(),r+="try {var $"+n+" = this.cellValues(args.slice(i",h&&(r+=", i + "+h),r+=")"+(l?",true":"")+").reduce(function(ret, $"+n+"){ ","#"!=s[0].charAt(0)&&(r+="if ($"+n+" instanceof CalcError) throw $"+n+"; "),r+="if ("+p(s[1])+") ret.push($"+n+"); ",r+="return ret; ",r+="}.bind(this), []); ",r+=h?"i += "+h+"; ":"i = args.length; ",r+="xargs.push($"+n+")} catch(ex) { if (ex instanceof CalcError) return ex; throw ex; } ",a+="toResolve.push(args.slice(i)); "}else if("rest"==s)r+="xargs.push(args.slice(i)); i = args.length; ";else{(c=/^\*/.test(n))&&(d=!0,n=n.substr(1)),r+="var $"+n+" = args[i++]; ";var f=!1;/!$/.test(s)?(s=s.substr(0,s.length-1),f=!0):r+="if ($"+n+" instanceof CalcError) return $"+n+"; ",r+=function(e,t){i=!1;var r="if (!("+p(e)+")) { ";i&&!t&&(r+=" if ($"+n+" instanceof CalcError) return $"+n+"; ");i||(a+="i++; ");o+=c?"var $"+n+" = this._arrayArg(args[i]); if ($"+n+") { xargs.push($"+n+"); width = Math.max(width, $"+n+".width); height = Math.max(height, $"+n+".height); arrays.push(true) } else { xargs.push(args[i]); arrays.push(false); } i++; ":"xargs.push(args[i++]); arrays.push(false); ";return r+="return new CalcError(err); } "}(s,f)+"xargs.push($"+n+"); "}}return r+="} "})).join(""),s+="if (i < args.length) return new CalcError('N/A'); ",s+="return xargs; } ",o+="return { args: xargs, width: width, height: height, arrays: arrays }; } ",l?(a+="this.resolveCells(toResolve, callback); } ",r=new Function("CalcError","round",s+a+o+" return { resolve: resolve, check: check, arrayArgs: arrayArgs };")):r=new Function("CalcError","round",s+" return { check: check };"),r=r(Ln,Kn),d||delete r.arrayArgs,r;function u(){return i?"$"+n:(l=!0,i=!0,a+="toResolve.push(args[i++]); ","($"+n+" = this.force($"+n+"))")}function h(e){return"("+(e?"(typeof "+u()+" == 'number' ? ($"+n+" = round($"+n+"), true) : false) || ":"(typeof "+u()+" == 'number') || ")+"(typeof $"+n+" == 'boolean' ? ($"+n+" = +$"+n+", true) : false) || (typeof $"+n+" == 'string' && !/^(?:=|true|false)/i.test($"+n+") ? (tmp = kendo.spreadsheet.calc.parse(0, 0, 0, $"+n+"), /^date|number|percent$/.test(tmp.type) ? ($"+n+" = +tmp.value, true) : false) : false))"}function p(e){if(Array.isArray(e)){if("or"==e[0])return"("+e.slice(1).map(p).join(") || (")+")";if("and"==e[0])return"("+e.slice(1).map(p).join(") && (")+")";if("values"==e[0])return"("+e.slice(1).map((function(e){return u()+" === "+e})).join(") || (")+")";if("null"==e[0])return"("+p("null")+" ? (($"+n+" = "+e[1]+"), true) : false)";if("between"==e[0]||"[between]"==e[0])return"("+u()+" >= "+e[1]+" && $"+n+" <= "+e[2]+" ? true : ((err = 'NUM'), false))";if("(between)"==e[0])return"("+u()+" > "+e[1]+" && $"+n+" < "+e[2]+" ? true : ((err = 'NUM'), false))";if("(between]"==e[0])return"("+u()+" > "+e[1]+" && $"+n+" <= "+e[2]+" ? true : ((err = 'NUM'), false))";if("[between)"==e[0])return"("+u()+" >= "+e[1]+" && $"+n+" < "+e[2]+" ? true : ((err = 'NUM'), false))";if("assert"==e[0]){var t=e[2]||"N/A";return"(("+e[1]+") ? true : (err = "+JSON.stringify(t)+", false))"}if("not"==e[0])return"!("+p(e[1])+")";throw new Error("Unknown array type condition: "+e[0])}if("number"==e||"datetime"==e)return h(!0);if("number!"==e)return"(typeof "+u()+" == 'number' ? ($"+n+" = round($"+n+"), true) : false)";if("integer"==e||"date"==e)return"("+h()+" && (($"+n+" |= 0), true))";if("divisor"==e)return"("+h(!0)+" && ($"+n+" == 0 ? ((err = 'DIV/0'), false) : true))";if("number+"==e)return"("+h(!0)+" && ($"+n+" >= 0 ? true : ((err = 'NUM'), false)))";if("integer+"==e)return"("+h()+" && (($"+n+" |= 0) >= 0 ? true : ((err = 'NUM'), false)))";if("number++"==e)return"("+h(!0)+" && ($"+n+" > 0 ? true : ((err = 'NUM'), false)))";if("integer++"==e)return"("+h()+" && (($"+n+" |= 0) > 0 ? true : ((err = 'NUM'), false)))";if("string"==e)return"((typeof "+u()+" == 'string' || typeof $"+n+" == 'boolean' || typeof $"+n+" == 'number') ? ($"+n+" += '', true) : ($"+n+" === undefined ? (($"+n+" = ''), true) : false))";if("boolean"==e)return"(typeof "+u()+" == 'boolean')";if("logical"==e)return"(typeof "+u()+" == 'boolean' || (typeof $"+n+" == 'number' ? ($"+n+" = !!$"+n+", true) : false))";if("matrix"==e)return u(),"((m = this.asMatrix($"+n+")) ? ($"+n+" = m) : false)";if("#matrix"==e)return"((m = this.asMatrix($"+n+")) ? ($"+n+" = m) : false)";if("ref"==e)return"($"+n+" instanceof kendo.spreadsheet.Ref)";if("area"==e)return"($"+n+" instanceof kendo.spreadsheet.CellRef || $"+n+" instanceof kendo.spreadsheet.RangeRef)";if("cell"==e)return"($"+n+" instanceof kendo.spreadsheet.CellRef)";if("null"==e)return"("+u()+" == null)";if("anyvalue"==e)return"("+u()+" != null && i <= args.length)";if("forced"==e)return"("+u()+", i <= args.length)";if("anything"==e)return"(i <= args.length)";if("blank"==e)return"("+u()+" == null || $"+n+" === '')";throw new Error("Can't check for type: "+e)}}function Kn(e){return e===parseInt(e,10)?e:+e.toPrecision(16)}function Yn(e,t,n){if(n instanceof Ln)return n;try{return t.apply(e,n)}catch(e){if(e instanceof Ln)return e;throw e}}function $n(){for(;qn.length;)qn.shift()()}function Qn(e){qn.push(e)}function Xn(e,t){return e=e.toLowerCase(),jn[e]=t,{args:function(n,i){var r=Gn(0,n);i&&(r.arrayArgs&&console.log(r.arrayArgs.toString()),r.resolve&&console.log(r.resolve.toString()),r.check&&console.log(r.check.toString()));var o,a,s,l,c=jn[e]=(o=t,a=r.resolve,s=r.check,l=r.arrayArgs,function(e,t){function n(){if(l){var n=l.call(this,t);if(t=n.args,n.width>0&&n.height>0){for(var i=new On(this),r=0;r0&&n.height>0){for(var i=new On(this),r=n.width*n.height,a=function(t,n){return function(o){if(i.set(t,n,o),0==--r)return e(i)}},c=0;c0;++c)for(var d=0;d0;++d){for(var u=[],h=0;h=1&&t<=12&&n>=1&&n<=ii(e,t-1)},En.isLeapYear=ni,En.daysInYear=function(e){return ni(e)?366:365},En.parseDate=function(e,t){return t&&(t=kendo.spreadsheet.formatting.makeDateFormat(t)),kendo.parseExactDate(e,t)||kendo.parseExactDate(e)||kendo.parseExactDate(e,["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"])},En.limitPrecision=Kn,Mn.dateToNumber=ui,Mn.numberToDate=ci,Mn.defineFunction=Xn,Mn.loadDeferred=$n,Mn.deferInit=Qn,Mn.CalcError=Ln,En.defineFunction=Xn,En.loadDeferred=$n,En.deferInit=Qn,En.defineAlias=function(e,t){var n=jn[t];if(!n)throw new Error("Function "+t+" is not yet defined");n.kendoSpreadsheetAliases||(n.kendoSpreadsheetAliases=[t]),n.kendoSpreadsheetAliases.push(e),jn[e]=n},En.FUNCS=jn;var hi=["or","number",["null",0]],pi=[["*a",hi],["*b",hi]],fi=[["*a","forced"],["*b","forced"]];function mi(e,t){return e="string"==typeof e?e.toLowerCase():e,t="string"==typeof t?t.toLowerCase():t,!1===e&&null==t||(!1===t&&null==e||(0===e&&null==t||(0===t&&null==e||(""===e&&null==t||(""===t&&null==e||e===t)))))}function gi(e){return function(t,n){return"string"==typeof t&&"string"!=typeof n&&(n=null==n?"":n+""),"string"!=typeof t&&"string"==typeof n&&(t=null==t?"":t+""),"number"==typeof t&&null==n&&(n=0),"number"==typeof n&&null==t&&(t=0),"string"==typeof t&&"string"==typeof n&&(t=t.toLowerCase(),n=n.toLowerCase()),typeof n==typeof t?e(t,n):new Ln("VALUE")}}Qn((function(){Xn("binary+",(function(e,t){return e+t})).args(pi),Xn("binary-",(function(e,t){return e-t})).args(pi),Xn("binary*",(function(e,t){return e*t})).args(pi),Xn("binary/",(function(e,t){return e/t})).args([["*a",hi],["*b","divisor"]]),Xn("binary^",(function(e,t){return Math.pow(e,t)})).args(pi),Xn("binary&",(function(e,t){return null==e&&(e=""),null==t&&(t=""),""+e+t})).args([["*a",["or","number","string","boolean","null"]],["*b",["or","number","string","boolean","null"]]])})),Qn((function(){Xn("binary=",mi).args(fi),Xn("binary<>",(function(e,t){return!mi(e,t)})).args(fi),Xn("binary<",gi((function(e,t){return e",gi((function(e,t){return e>t}))).args(fi),Xn("binary>=",gi((function(e,t){return e>=t}))).args(fi),Xn("unary+",(function(e){return e})).args([["*a",hi]]),Xn("unary-",(function(e){return-e})).args([["*a",hi]]),Xn("unary%",(function(e){return e/100})).args([["*a",hi]]),Xn("binary:",(function(e,t){return new Fn(e,t).setSheet(e.sheet||this.formula.sheet,e.hasSheet())})).args([["a","cell"],["b","cell"]]),Xn("binary,",(function(e,t){return new Pn([e,t])})).args([["a","ref"],["b","ref"]]),Xn("binary ",(function(e,t){return e.intersect(t)})).args([["a","ref"],["b","ref"]]),Xn("not",(function(e){return!this.bool(e)})).args([["*a",["or","anyvalue",["null",0]]]]),Xn("isblank",(function(e){return e instanceof Rn&&null==(e=this.getRefData(e))})).args([["*value","anything!"]]),Xn("iserror",(function(e){return e instanceof Ln})).args([["*value","forced!"]]),Xn("iserr",(function(e){return e instanceof Ln&&"N/A"!=e.code})).args([["*value","forced!"]]),Xn("isna",(function(e){return e instanceof Ln&&"N/A"==e.code})).args([["*value","forced!"]]),Xn("islogical",(function(e){return"boolean"==typeof e})).args([["*value","forced!"]]),Xn("isnontext",(function(e){return"string"!=typeof e})).args([["*value","forced!"]]),Xn("istext",(function(e){return"string"==typeof e})).args([["*value","forced!"]]),Xn("isnumber",(function(e){return"number"==typeof e})).args([["*value","forced!"]]),Xn("isref",(function(e){return e instanceof Rn||e instanceof Fn})).args([["*value","anything!"]])})),jn[",getname"]=function(e,t){this.fetchName(t[0],e)};var vi=kendo.jQuery,_i=kendo.spreadsheet,bi={};_i.validation=bi;var wi=_i.calc,yi=kendo.Class,ki='DATEVALUE("{0}")';wi.runtime.deferInit((function(){wi.runtime.defineFunction("_matrix",(function(e){return"string"==typeof e&&(e=this.asMatrix([e.split(/\s*,\s*/)])),e})).args([["m",["or","matrix","string"]]])}));var xi=yi.extend({init:function(e){this.handler=e.handler,this.from=e.from,this.to=e.to,this.dataType=e.dataType,this.comparerType=e.comparerType,this.type=e.type?e.type:"warning",this.allowNulls=!!e.allowNulls,this.fromIsDateValue=!!e.fromIsDateValue,this.toIsDateValue=!!e.toIsDateValue,this.showButton=e.showButton,this.fromIsListValue=!!e.fromIsListValue,this.sheet=e.sheet,this.row=e.row,this.col=e.col,e.tooltipMessageTemplate&&(this.tooltipMessageTemplate=e.tooltipMessageTemplate),e.tooltipTitleTemplate&&(this.tooltipTitleTemplate=e.tooltipTitleTemplate),e.messageTemplate&&(this.messageTemplate=e.messageTemplate),e.titleTemplate&&(this.titleTemplate=e.titleTemplate)},_formatMessages:function(e){var t=this.from?this.from_value:"",n=this.to?this.to_value:"",i=this.from?this.from.toString():"",r=this.to?this.to.toString():"",o=this.dataType,a=this.type,s=this.comparerType;return kendo.format(e,t,n,i,r,o,a,s)},_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(){if(!this.from_value||!this.from_value.data)return[];var e,t,n=this.from_value.data,i=[];for(e=0;e=n&&(a=!0,this.row+=i);break;case"col":l>=n&&(a=!0,this.col+=i)}if(a||r||o){var c=new xi(this);return c.from=r,c.to=o,c.row=s,c.col=l,c}},toJSON:function(){var e=this._getOptions();return e.from&&(e.from=e.from.toString(),"list"===e.dataType&&(e.from=e.from.replace(/^_matrix\((.*)\)$/i,"$1"),delete e.fromIsListValue),"date"===e.dataType&&this.fromIsDateValue&&(e.from=e.from.replace(/^DATEVALUE\("(.*)"\)$/i,"$1"),delete e.fromIsDateValue)),e.to&&(e.to=e.to.toString(),"date"===e.dataType&&this.toIsDateValue&&(e.to=e.to.replace(/^DATEVALUE\("(.*)"\)$/i,"$1"),delete e.toIsDateValue)),e},_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}}});bi.compile=function(e,t,n,i){var r,o;if("string"==typeof i&&(i=JSON.parse(i)),i.from&&("list"!==i.dataType||i.fromIsListValue||(i.from.indexOf("{")>-1&&(i.from=i.from.replace(/\"/g,"").replace("{",'"').replace("}",'"')),i.from=kendo.format("_matrix({0})",i.from),i.fromIsListValue=!0),"date"===i.dataType&&wi.runtime.parseDate(i.from)&&(i.from=kendo.format(ki,i.from),i.fromIsDateValue=!0),i.from=wi.compile(wi.parseFormula(e,t,n,i.from))),i.to&&("date"===i.dataType&&wi.runtime.parseDate(i.to)&&(i.to=kendo.format(ki,i.to),i.toIsDateValue=!0),i.to=wi.compile(wi.parseFormula(e,t,n,i.to))),!(o="custom"==i.dataType?bi.validationComparers.custom:"list"==i.dataType?bi.validationComparers.list:bi.validationComparers[i.comparerType]))throw kendo.format("'{0}' comparer is not implemented.",i.comparerType);return r=function(e){var t=this.to&&(this.to_value||0===this.to_value)?this.to_value:void 0;if(null===e||""===e)this.allowNulls?this.value=!0:this.value=!1;else if("custom"==this.dataType)this.value=o(e,this.from_value,t);else if("list"==this.dataType){var n=this._getListData();this.value=o(e,n,t)}else this.value=o(e,this.from_value,t);return this.value},new kendo.spreadsheet.validation.Validation(vi.extend(i,{handler:r,sheet:e,row:t,col:n}))},bi.validationComparers={greaterThan:function(e,t){return e>t},lessThan:function(e,t){return e=t&&e<=n},equalTo:function(e,t){return e==t},notEqualTo:function(e,t){return e!=t},greaterThanOrEqualTo:function(e,t){return e>=t},lessThanOrEqualTo:function(e,t){return e<=t},notBetween:function(e,t,n){return en},custom:function(e,t){return t},list:function(e,t){return t.indexOf(e)>-1}},bi.Validation=xi,function(e){var t,n=e.spreadsheet.RangeRef,i=e.spreadsheet.UnionRef,r=e.spreadsheet.CellRef,o=e.spreadsheet.Range,a=e.Class.extend({init:function(t){this._sheet=t,this.selection=e.spreadsheet.FIRSTREF.toRangeRef(),this.originalSelection=e.spreadsheet.FIRSTREF.toRangeRef(),this._activeCell=e.spreadsheet.FIRSTREF.toRangeRef(),this.originalActiveCell=e.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(e){return e&&(this.originalActiveCell=e.first(),this._activeCell=this._sheet.unionWithMerged(e.toRangeRef()),this._sheet.focus(e),this._sheet.triggerChange({activeCell:!0,selection:!0})),this._activeCell},select:function(t,i,a,s){if(t){if(t.eq(this.originalSelection))return;if(this._sheet.triggerSelect(new o(t,this._sheet)),this.originalSelection=t,this.selection=i,!1!==a){if(t.isCell())this._sheet.forEachMergedCell(t,(function(e){t=e.topLeft})),this.activeCell(t);else{if(t=this.selection.lastRange(),s&&s._sheet===this._sheet&&s.panes[0]){var l,c,d,u,h,p,f=s.panes;for(l=0;li&&(this.range(i,0,t-i,n).clear(),this._filteredRows.value(i,t-1,!1)),n>r&&this.range(0,r,t,n-r).clear(),this.triggerChange({layout:!0})},_resizeAddRow:function(e){this.resize(this._rows._count+(e||1),this._columns._count)},_resizeAddColumn:function(e){this.resize(this._rows._count,this._columns._count+(e||1))},_resizeDeleteRow:function(e){this._resizeAddRow(-(e||1))},_resizeDeleteColumn:function(e){this._resizeAddColumn(-(e||1))},_resizeForJSON:function(e){for(var t=e.length,n=0,i=0;i=e;l--){var c=new n(new r(0,l),new r(1/0,l));if(new o(c,this).clear({clearAll:!0,keepBorders:!0}),l==e)break;var d=t.normalize(c.topLeft),u=t.normalize(c.bottomRight),h=new n(new r(d.row,d.col-1),new r(u.row,u.col-1));this._copyRange(h,d)}this._adjustReferences("col",e,1,s)}}),{recalc:!0,layout:!0,insertColumn:{index:e},ref:new n(new r(0,e),new r(1/0,1/0))}),this},isEnabledColumn:function(e){var t=new n(new r(0,e),new r(1/0,e));return new o(t,this).enable()},deleteColumn:function(e){return this.isEnabledColumn(e)?this.trigger("deleteColumn",{index:e})?void 0:(this.batch((function(){var t=this._grid,i=t.columnCount,a=this.frozenColumns();e=0;)if(t[n].intersects(e))return this.range(t[n]);return this.range(e)},_renderComment:function(e){var t=null;if(e){var n=this._visualRange(e);t=n.comment(),e=n._ref.toRangeRef().topLeft}t?this._commentRef&&e.eq(this._commentRef)||(this._commentRef=e,this.trigger("change",{comment:!0})):this._commentRef&&(this._commentRef=null,this.trigger("change",{comment:!0}))},resizeHandlePosition:function(){return this._resizeHandlePosition},resizeHintPosition:function(e){return void 0!==e&&(this._resizeHintPosition=e,this.trigger("change",{resize:!0,overElement:!0})),this._resizeHintPosition},removeResizeHandle:function(){this._resizeHandlePosition&&(this._resizeHintPosition=void 0,this._resizeHandlePosition=void 0,this._initialPosition=void 0,this.trigger("change",{resize:!0,overElement:!0}))},positionResizeHandle:function(e){this._resizeHandlePosition=e,this.trigger("change",{resize:!0,overElement:!0})},startDragging:function(e){this._draggingInProgress=e},completeDragging:function(){var e=this._draggingInProgress;if(e){this._draggingInProgress=null;var t=e.drawing;if(t.eq(e.copy))return;if(t.topLeftCell){var n=this.drawingBoundingBox(t),i=this._rows.indexVisible(n.top),o=this._columns.indexVisible(n.left),a=new r(i,o),s=this.refBoundingBox(a);t.offsetX=n.left-s.left,t.offsetY=n.top-s.top,t.topLeftCell=a,this.triggerChange({dragging:!0})}this.trigger("commandRequest",{command:"DrawingUpdateCommand",options:{sheet:this,drawing:t,previous:e.copy}})}},startSelection:function(e){this.frozenRows()||this.frozenColumns()?this._currentView=null:e&&e._sheet===this&&(this._currentView=e),this._selectionInProgress=!0},completeSelection:function(){if(this._selectionInProgress&&(this._selectionInProgress=!1,this._resizeHintPosition=void 0,this.trigger("change",{selection:!0})),this._autoFillInProgress){this._autoFillInProgress=!1;var e=this._autoFillDest,t=this._autoFillOrigin;this._autoFillPunch?this.trigger("commandRequest",{command:"ClearContentCommand",options:{operatingRange:this.range(this._autoFillPunch)}}):e.eq(t)?this.triggerChange({selection:!0}):this.trigger("commandRequest",{command:"AutoFillCommand",options:{operatingRange:this.range(e),origin:this.range(t)}}),this._autoFillDest=null,this._autoFillPunch=null,this._autoFillOrigin=null,this.select(e)}},selectionInProgress:function(){return this._selectionInProgress},select:function(e,t){var n,i=this._selectionState();return e&&(e=this._ref(e),e=this._grid.normalize(e),n=this._grid.isAxis(e)?e:this.unionWithMerged(e)),i.select(e,n,t,this._currentView)},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(e){return this._selectionState().activeCell(e)},originalActiveCell:function(){return this._selectionState().originalActiveCell},singleCellSelection:function(){return this._selectionState().singleCellSelection()},unionWithMerged:function(e){var t=this._mergedCells;return e.map((function(e){return e.toRangeRef().union(t)}))},trim:function(e){var t=[],n=this._grid;return this._properties.forEachProperty((function(i){t.push(n.trim(e,i.list))})),this.unionWithMerged(e.topLeft.toRangeRef().union(t))},focus:function(e){if(!e){var t=this._focus;return this._focus=null,t}this._focus=e.toRangeRef()},activeCellSelection:function(){return new o(this._grid.normalize(this.activeCell()),this)},selection:function(){return new o(this._grid.normalize(this._selectionState().selection),this)},selectedHeaders:function(){var e=this.select(),t={},n={},i=!1,r=!1,o=this._grid.rowCount-1,a=this._grid.columnCount-1;return e.forEach((function(e){var s,l="partial",c="partial",d=(e=e.toRangeRef()).bottomRight,u=e.topLeft,h=u.col<=0&&d.col>=a,p=u.row<=0&&d.row>=o;if(p&&(r=!0,c="full"),h&&(i=!0,l="full"),!p)for(s=u.row;s<=d.row;s++)"full"!==t[s]&&(t[s]=l);if(!h)for(s=u.col;s<=d.col;s++)"full"!==n[s]&&(n[s]=c)})),{rows:t,cols:n,allRows:r,allCols:i,all:r&&i}},isInEditMode:function(e){if(void 0===e)return this._inEdit;this._inEdit=e,e&&(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(e){this._formulaSelections=(e||[]).slice(),this.triggerChange({selection:!0})},_viewActiveCell:function(){return this._viewSelection._activeCell.toRangeRef()},toJSON:function(){var t={},n=this._rows.toJSON("height",t),i=this._columns.toJSON("width",{}),r=this._viewSelection,o=[],a=this._defaultCellStyle||{};this.forEach(e.spreadsheet.SHEETREF,(function(i,r,s){if(function(e){Object.keys(a).forEach((function(t){e[t]===a[t]&&delete e[t]}))}(s),0!==Object.keys(s).length){s.link&&o.push({ref:e.spreadsheet.Ref.display(null,i,r),target:s.link});var l=t[i];void 0===l&&(l=n.length,n.push({index:i}),t[i]=l),i=n[l],s.index=r,void 0===i.cells&&(i.cells=[]),s.formula&&(s.formula.arrayFormulaRange?s.formula={src:s.formula.toString(),ref:s.formula.arrayFormulaRange.toString()}:s.formula=s.formula.toString()),s.validation&&(s.validation=s.validation.toJSON()),s.color&&(s.color=e.parseColor(s.color).toCss()),s.background&&(s.background=e.parseColor(s.background).toCss()),s.borderTop&&s.borderTop.color&&(s.borderTop.color=e.parseColor(s.borderTop.color).toCss()),s.borderBottom&&s.borderBottom.color&&(s.borderBottom.color=e.parseColor(s.borderBottom.color).toCss()),s.borderRight&&s.borderRight.color&&(s.borderRight.color=e.parseColor(s.borderRight.color).toCss()),s.borderLeft&&s.borderLeft.color&&(s.borderLeft.color=e.parseColor(s.borderLeft.color).toCss()),i.cells.push(s)}}));var s={name:this._name(),rows:n,columns:i,selection:r.selection.toString(),activeCell:r.activeCell().toString(),frozenRows:this.frozenRows(),frozenColumns:this.frozenColumns(),showGridLines:this.showGridLines(),gridLinesColor:this.gridLinesColor(),mergedCells:this._mergedCells.map((function(e){return e.toString()})),hyperlinks:o,defaultCellStyle:a,drawings:this._drawings.map((function(e){return e.toJSON()}))};return this._sort&&(s.sort={ref:this._sort.ref.toString(),columns:this._sort.columns.map((function(e){return{index:e.index,ascending:e.ascending}}))}),this._filter&&(s.filter={ref:this._filter.ref.toString(),columns:this._filter.columns.map((function(e){var t=e.filter.toJSON();return t.index=e.index,t}))}),s},fromJSON:function(t){this.batch((function(){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){this._resizeForJSON(t.rows),this._rows.fromJSON("height",t.rows);for(var n=0;n0?i.row:i.row+r;i.adjust(this.name(),"row",o,r)}}}.bind(this)),this.triggerChange({recalc:!0})},_refreshFilter:function(){this._filter&&this._filterBy(this._filter.ref,this._filter.columns)},_filterBy:function(t,n){this.batch((function(){for(var i=t.topLeft.row;i<=t.bottomRight.row;i++)this.isFilteredRow(i)&&(this._filteredRows.value(i,i,!1),this._rows.unhide(i));n.forEach((function(n){var i=t.resize({top:1}).toColumn(n.index),r=[];if(i!==e.spreadsheet.NULLREF){this.forEach(i,(function(e,t,n){n.row=e,r.push(n)})),n.filter.prepare(r);for(var o=0;o=0&&(this._drawings.splice(t,1),this.triggerChange({layout:!0}))},usesImage:function(e){for(var t=this._drawings.length;--t>=0;)if(this._drawings[t].image===e)return!0;return!1},isMerged:function(e){for(var t=this._mergedCells,n=t.length;--n>=0;)if(t[n].eq(e))return!0;return!1}}),l=e.Class.extend({init:function(e){this.reset(e)},toJSON:function(){return{topLeftCell:this.topLeftCell.toString(),offsetX:this.offsetX,offsetY:this.offsetY,width:this.width,height:this.height,image:this.image,opacity:this.opacity}},clone:function(){return new l(this)},reset:function(t){var n=t.topLeftCell;"string"==typeof n&&(n=e.spreadsheet.calc.parseReference(n)),this.topLeftCell=n,this.offsetX=t.offsetX||0,this.offsetY=t.offsetY||0,this.width=t.width,this.height=t.height,this.image=t.image,this.opacity=null!=t.opacity?t.opacity:1},eq:function(e){return(!this.topLeftCell&&!e.topLeftCell||this.topLeftCell&&e.topLeftCell&&this.topLeftCell.eq(e.topLeftCell))&&this.offsetX===e.offsetX&&this.offsetY===e.offsetY&&this.width===e.width&&this.height===e.height&&this.image===e.image&&this.opacity===e.opacity}});l.fromJSON=function(e){return new l(e)},e.spreadsheet.Sheet=s,e.spreadsheet.Drawing=l}(kendo),function(e){var t=e.jQuery,n=e._outerWidth,i=".",r=" ",o=e.ui.Widget.extend({init:function(t,n){var r=o.classNames;e.ui.Widget.call(this,t,n),(t=this.element).addClass(r.sheetsBarWrapper),this._openDialog=n.openDialog,this._tree=new e.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",i+r.sheetsBarRemove,this._onSheetRemove.bind(this)),t.on("click","li",this._onSheetSelect.bind(this)),t.on("dblclick","li."+r.sheetsBarActive,this._createEditor.bind(this)),t.on("click",i+r.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(e.format("input{0}{1}",i,o.classNames.sheetsBarEditor)).trigger("focus").on("keydown",this._onEditorKeydown.bind(this)).on("blur",this._onEditorBlur.bind(this)))},_destroyEditor:function(e){var t=e?null:this._editor.val();this._editor.off(),this._editor=null,this._renderSheets(this._sheets,this._selectedIndex,!1),this._onSheetRename(t)},renderSheets:function(e,t){!e||t<0||this._renderSheets(e,t,!1)},_renderSheets:function(t,n,i){var a=this,s=o.classNames;(a._isRtl=e.support.isRtl(a.element),a._sheets=t,a._selectedIndex=n,a._renderHtml(i,!0),a._scrollableAllowed())&&(a._sheetsWrapper().addClass(s.sheetsBarScrollable+r+s.sheetsBarSheetsWrapper),a._toggleScrollButtons())},_toggleScrollButtons:function(t){var n=this,r=n._sheetsGroup(),a=n._sheetsWrapper(),s=e.scrollLeft(r),l=a.find(i+o.classNames.sheetsBarPrev),c=a.find(i+o.classNames.sheetsBarNext);!1===t?(l.addClass("k-disabled"),c.addClass("k-disabled")):(l.toggleClass("k-disabled",!(n._isRtl?s1){var v=c(t(e.ui.icon(h.sheetsBarXIcon))[0]);g.push(c("span",{className:h.sheetsBarKLink+r+h.sheetsBarRemove,"data-type":"remove"},[v]))}s.push(c("li",m,g))}this._tree.render([this._addButton(),this._createSheetsWrapper(s,i)])},_createSheetsWrapper:function(n,i){var a=e.dom.element,s=o.classNames,l=a("div",{className:"k-tabstrip-items-wrapper k-hstack"}),c=[null,a("ul",{className:s.sheetsBarKReset,role:"tablist"},n),null];var d=s.sheetsBarKButton+r+s.sheetsBarKButtonBare+r;return c[0]=a("span",{ariaHidden:"true",className:d+s.sheetsBarPrev},[a(t(e.ui.icon({icon:s.sheetsBarArrowWIcon,iconClass:"k-button-icon"}))[0])]),c[2]=a("span",{ariaHidden:"true",className:d+s.sheetsBarNext},[a(t(e.ui.icon({icon:s.sheetsBarArrowEIcon,iconClass:"k-button-icon"}))[0])]),l.children=c,a("div",{className:s.sheetsBarItems},[l])},_createSortable:function(){var n=o.classNames;this._sortable=new e.ui.Sortable(this.element,{filter:e.format("ul li.{0},ul li.{1}",n.sheetsBarActive,n.sheetsBarInactive),container:i+n.sheetsBarItems,axis:"x",animation:!1,ignore:"input",end:function(){this.draggable.hint&&this.draggable.hint.remove()},hint:function(e){return t(e).clone().wrap("
                      ").closest("div")}})},_onEditorKeydown:function(e){this._editor&&(13===e.which&&this._destroyEditor(),27===e.which&&this._destroyEditor(!0))},_onEditorBlur:function(){this._editor&&this._destroyEditor()},_onSheetReorderEnd:function(e){e.preventDefault(),this.trigger("reorder",{oldIndex:e.oldIndex,newIndex:e.newIndex})},_onSheetReorderStart:function(e){this._editor&&e.preventDefault()},_onSheetRemove:function(e){var n=t(e.target).closest("li").text();this._editor&&this._destroyEditor();var i=function(e){e.sender.isConfirmed()&&this.trigger("remove",{name:n,confirmation:!0})}.bind(this);this._openDialog("confirmation",{close:i})},_onSheetSelect:function(e){var n=t(e.target).text();!t(e.target).is(i+o.classNames.sheetsBarEditor)&&n?(this._editor&&this._destroyEditor(),this._scrollSheetsToItem(t(e.target).closest("li")),this.trigger("select",{name:n,isAddButton:!1})):e.preventDefault()},_onSheetRename:function(e){this._sheets[this._selectedIndex].name()!==e&&null!==e&&this.trigger("rename",{name:e,sheetIndex:this._selectedIndex})},_onAddSelect:function(){this.trigger("select",{isAddButton:!0})},_addButton:function(){var n=e.dom.element,i=o.classNames;return n("a",{role:"button",ariaLabel:"Add new sheet",className:i.sheetsBarAdd+r+i.sheetsBarKButton+r+i.sheetsBarKButtonDefaults},[n(t(e.ui.icon({icon:i.sheetsBarPlusIcon,iconClass:"k-button-icon"}))[0])])},destroy:function(){this._sortable.destroy()},_scrollableAllowed:function(){var e=this.options;return e.scrollable&&!isNaN(e.scrollable.distance)},_scrollSheetsToItem:function(t){var i,r=this,o=r._sheetsGroup(),a=e.scrollLeft(o),s=n(t),l=r._isRtl?t.position().left:t.position().left-o.children().first().position().left,c=o[0].offsetWidth;r._isRtl?l<0?i=a+l-(c-a):l+s>c&&(i=a+l-s):a+cl&&(i=l),o.finish().animate({scrollLeft:i},"fast","linear",(function(){r._toggleScrollButtons()}))},_sheetsGroup:function(){return this._sheetsWrapper().find("ul")},_sheetsWrapper:function(){return this.element.find(i+o.classNames.sheetsBarItems)},_scrollSheetsByDelta:function(t){var n=this,i=n._sheetsGroup(),r=e.scrollLeft(i);i.finish().animate({scrollLeft:r+t},"fast","linear",(function(){n._nowScrollingSheets?n._scrollSheetsByDelta(t):n._toggleScrollButtons()}))}});e.spreadsheet.SheetsBar=o,t.extend(!0,o,{classNames:{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-tabstrip-item",sheetsBarKActive:"k-active k-state-tab-on-top",sheetsBarKTextbox:"k-textbox",sheetsBarKLink:"k-link",sheetsBarKIcon:"k-icon",sheetsBarKFontIcon:"k-icon",sheetsBarKButton:"k-button k-icon-button",sheetsBarKButtonDefaults:"k-button-md k-rounded-md k-button-solid k-button-solid-base",sheetsBarKButtonBare:"k-button-md k-rounded-md k-button-flat k-button-flat-base",sheetsBarArrowWIcon:"caret-alt-left",sheetsBarArrowEIcon:"caret-alt-right",sheetsBarKReset:"k-reset k-tabstrip-items",sheetsBarXIcon:"x",sheetsBarKSprite:"k-sprite",sheetsBarPlusIcon:"plus",sheetsBarHintWrapper:"k-widget k-tabstrip k-tabstrip-bottom k-spreadsheet-sheets-items-hint",sheetsBarKResetItems:"k-reset k-tabstrip-items"}})}(window.kendo);var Ci,Si=kendo.util,Ti=kendo.spreadsheet,Di=Ti.Ref,Ii=Ti.RangeRef,zi=Ti.CellRef,Mi=Ti.NameRef,Ei=Ti.calc,Ai=Ei.runtime,Hi=Object.create(null),Ri=Object.create(null);(Ci=[[":"],[" "],[","],["%"],["^"],["*","/"],["+","-"],["&"],["=","<",">","<=",">=","<>"]]).forEach((function(e,t){e.forEach((function(e){Hi[e]=Ci.length-t,Ri[","==e?";":e]=Ci.length-t}))}));var Fi=Hi,Pi={DEC:".",ARG:",",COL:","};function Bi(e){Pi.DEC=e,Pi.ARG=","==e?";":",",Pi.COL=","==e?"\\":",",Fi=","==e?Ri:Hi}Ei.withDecimalSeparator=function(e,t){if(Pi.DEC==e)return t();var n=Pi.DEC;Bi(e);try{return t()}finally{Bi(n)}},Ei._separators=Pi;var Li=kendo.Class.extend({init:function(e,t){this.message=e,this.pos=t},toString:function(){return this.message}}),Vi={type:"bool",value:!0},Oi={type:"bool",value:!1};function Ni(e){e=e.toUpperCase();for(var t=0,n=0;nt){i.next();var s=u(c(),a,n);return u({type:"binary",op:";"==r.value?",":r.value,left:e,right:s},t,n)}}return e}}var ji,qi=(ji=Object.create(null),function(e){var t=ji[e];return t||(t=ji[e]=new Function("'use strict';return("+e+")")()),t});function Gi(e,t){var n=0;return i(e,t);function i(e,t){switch(e.type){case"ref":return function(e,t){return"name"==e.ref?function(e,t){return{type:"func",func:",getname",args:[a(t),e]}}(e,t):r(e,t)}(e,t);case"num":case"str":case"null":case"error":case"bool":return r(e,t);case"prefix":case"postfix":return function(e,t){return i({type:"func",func:"unary"+e.op,args:[e.exp]},t)}(e,t);case"binary":return function(e,t){return i({type:"func",func:"binary"+e.op,args:[e.left,e.right]},t)}(e,t);case"func":return function(e,t){switch(e.func.toLowerCase()){case"if":return function(e,t,n,r){return i(e,(function(e){var o=a(r),l=s("T"),c=s("E");return{type:"func",func:"if",args:[o,e,{type:"lambda",vars:[l],body:i(t||Vi,(function(e){return{type:"call",func:{type:"var",name:l},args:[e]}}))},{type:"lambda",vars:[c],body:i(n||Oi,(function(e){return{type:"call",func:{type:"var",name:c},args:[e]}}))}]}}))}(e.args[0],e.args[1],e.args[2],t);case"and":return function(e,t){if(0===e.length)return r(Vi,t);return i({type:"func",func:"IF",args:[e[0],{type:"func",func:"AND",args:e.slice(1)},Oi]},t)}(e.args,t);case"or":return function(e,t){if(0===e.length)return r(Oi,t);return i({type:"func",func:"IF",args:[e[0],Vi,{type:"func",func:"OR",args:e.slice(1)}]},t)}(e.args,t);case"true":return t(Vi);case"false":return t(Oi)}return function t(n,r){return r==e.args.length?{type:"func",func:e.func,args:n}:i(e.args[r],(function(e){return t(n.concat([e]),r+1)}))}([a(t)],0)}(e,t);case"lambda":return function(e,t){var n=s("K"),r=i(e.body,(function(e){return{type:"call",func:{type:"var",value:n},args:[e]}}));return t({type:"lambda",vars:[n].concat(e.vars),body:r})}(e,t);case"matrix":return o(e.value,t,!0)}throw new Error("Cannot CPS "+e.type)}function r(e,t){return t(e)}function o(e,t,n){var r=[];return function a(s){return s==e.length?t({type:"matrix",value:r}):(n?o:i)(e[s],(function(e){return r[s]=e,a(s+1)}))}(0)}function a(e){var t=s("R");return{type:"lambda",vars:[t],body:e({type:"var",name:t})}}function s(e){return e||(e=""),(e="_"+e)+ ++n}}var Ki=Object.create(null);function Yi(e){var t=function(e){return qi("function(row, col, mod){return("+function e(n,i,r){switch(n.type){case"num":return"(kendo.spreadsheet.calc._separators.DEC == '.' ? "+JSON.stringify(JSON.stringify(n.value))+" : "+JSON.stringify(JSON.stringify(n.value))+".replace('.' , kendo.spreadsheet.calc._separators.DEC))";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 o((function(){return JSON.stringify(n.op)+" + "+e(n.exp,n,Fi[n.op])}));case"postfix":return o((function(){return e(n.exp,n,Fi[n.op])+" + "+JSON.stringify(n.op)}));case"binary":return o((function(){var i=t(e(n.left,n,Fi[n.op]),n.left instanceof Mi&&":"==n.op),r=t(e(n.right,n,Fi[n.op]),n.right instanceof Mi&&":"==n.op);return/^[,;]/.test(n.op)?i+" + kendo.spreadsheet.calc._separators.ARG + "+r:i+" + "+JSON.stringify(n.op)+" + "+r}));case"func":return JSON.stringify(n.func+"(")+" + "+(n.args.length>0?n.args.map((function(t){return e(t,n,0)})).join(" + kendo.spreadsheet.calc._separators.ARG + ' ' + "):"''")+" + ')'";case"matrix":return"'{ ' + "+n.value.map((function(t){return t.map((function(t){return e(t,n,0)})).join(" + kendo.spreadsheet.calc._separators.COL + ' ' + ")})).join(" + '; ' + ")+"+ ' }'";case"null":return"''"}throw new Error("Cannot make printer for node "+n.type);function o(e){var o=n.op,a=Fi[o]=0}function d(){var e=!1,t=r((function(t){return t==Pi.DEC?!e&&(e=!0,!0):o(t)}));return t==Pi.DEC?{type:"punc",value:Pi.DEC}:{type:"num",value:parseFloat(t.replace(Pi.DEC,"."))}}function u(t,n){return{type:"sym",value:t,upper:t.toUpperCase(),space:Xi(e.peek()),quote:n}}function h(e,t,n){if(!e&&!t&&!n)return null;if(!e&&!n||e&&n){var i=t?parseInt(t,10):0;return e?i:i-1}}function p(){var t=e.lookingAt(/^R(\[)?(-?[0-9]+)?(\])?C(\[)?(-?[0-9]+)?(\])?/i);if(t){var n=h(t[1],t[2],t[3]),i=h(t[4],t[5],t[6]);if(null!=n&&null!=i)return e.skip(t),{type:"rc",row:n,col:i,rel:(t[4]||!(t[4]||t[5]||t[6])?1:0)|(t[1]||!(t[1]||t[2]||t[3])?2:0)}}return u(r(s))}function f(){return e.next(),{type:"str",value:e.readEscaped('"')}}function m(){return e.next(),u(e.readEscaped("'"),!0)}function g(){return{type:"op",value:r((function(e,t){return t+e in Fi}))}}function v(){return{type:"punc",value:e.next()}}function _(){if(e.eof())return null;var n,i=e.peek();return'"'==i?f():"'"==i?m():o(i)||i==Pi.DEC?d():a(i)?p():l(i)?g():c(i)?v():(n=e.lookingAt(/^#([a-z\/]+)[?!]?/i))?(e.skip(n),{type:"error",value:n[1]}):(t.forEditor||e.croak("Can't handle character with code: "+i.charCodeAt(0)),{type:"error",value:e.next()})}function b(){for(;n.length<=i;){r(Xi);var o=e.pos(),a=_();t.forEditor&&a&&(a.begin=o,a.end=e.pos()),n.push(a)}return n[i]}function w(){var e=b();return e&&i++,e}function y(e,t){for(var n=i,r=[];e-- >0;)r.push(w()||Zi);return i=n,t.apply(r,r)}function k(e){i+=e}function x(){return null==b()}}(Ji(e),t);var n=e.ahead,i=e.skip,r=null,o=null!=t.row&&null!=t.col?function(e){return 1&e.rel&&(e.col-=t.col),2&e.rel&&(e.row-=t.row),e}:$i,a=t.forEditor?function(e,t,n){return e.begin=t.begin,e.end=n.end,e}:$i;return{peek:s,next:function(){if(null!=r){var e=r;return r=null,e}return l()},croak:e.croak,eof:e.eof,is:function(e,t){var n=s();return null==n||null!=e&&n.type!==e||null!=t&&n.value!==t?null:n}};function s(){return null==r&&(r=l()),r}function l(){var t,i=e.peek();return i&&("sym"!=i.type&&"rc"!=i.type&&"num"!=i.type||(t=n(8,d)||n(6,u)||n(6,h)||n(4,p)||n(4,f)||n(2,m)||n(2,g)),t||(t=e.next())),t}function c(n,i){if("rc"==n.type)return!n.rel||t.forEditor||null!=t.row&&null!=t.col||e.croak("Cannot read relative cell in RC notation"),new zi(n.row,n.col,n.rel);if("num"==n.type)return n.value<=1048577?o(new zi(Wi(n.value),i?-1/0:1/0,2)):null;var r=n.value,a=/^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(r);if(a){var s=Wi(a[4]),l=Ni(a[2]);return s<=1048576&&l<=16383?o(new zi(Wi(a[4]),Ni(a[2]),(a[1]?0:1)|(a[3]?0:2))):null}var c="$"==r.charAt(0);if(c&&(r=r.substr(1)),/^\d+$/.test(r)){if((s=Wi(r))<=1048576)return o(new zi(Wi(r),i?-1/0:1/0,c?0:2))}else if((l=Ni(r))<=16383)return o(new zi(i?-1/0:1/0,Ni(r),c?0:1))}function d(e,t,n,r,o,s,l,d){if("sym"==e.type&&"op"==t.type&&":"==t.value&&"sym"==n.type&&"punc"==r.type&&"!"==r.value&&("sym"==o.type||"rc"==o.type||"num"==o.type&&o.value==o.value|0)&&"op"==s.type&&":"==s.value&&("sym"==l.type||"rc"==l.type||"num"==l.type&&l.value==l.value|0)&&l.type==o.type&&("punc"!=d.type||"("!=d.value||l.space)){var u=c(o,!0),h=c(l,!1);if(u&&h)return i(7),a(new Ii(u.setSheet(e.value,!0),h.setSheet(n.value,!0)).setSheet(e.value,!0),e,l)}}function u(e,t,n,r,o,s){if("sym"==e.type&&"op"==t.type&&":"==t.value&&"sym"==n.type&&"punc"==r.type&&"!"==r.value&&("sym"==o.type||"rc"==o.type||"num"==o.type&&o.value==o.value|0)&&("punc"!=s.type||"("!=s.value||o.space)){var l=c(o);if(l){i(5);var d=l.clone();return a(new Ii(l.setSheet(e.value,!0),d.setSheet(n.value,!0)).setSheet(e.value,!0),e,o)}}}function h(e,t,n,r,o,s){if("sym"==e.type&&"punc"==t.type&&"!"==t.value&&("sym"==n.type||"rc"==n.type||"num"==n.type&&n.value==n.value|0)&&"op"==r.type&&":"==r.value&&("sym"==o.type||"rc"==o.type||"num"==o.type&&o.value==o.value|0)&&("punc"!=s.type||"("!=s.value||o.space)){var l=c(n,!0),d=c(o,!1);if(l&&d)return i(5),a(new Ii(l,d).setSheet(e.value,!0),e,o)}}function p(e,t,n,r){if("sym"==e.type&&"punc"==t.type&&"!"==t.value&&("sym"==n.type||"rc"==n.type||"num"==n.type&&n.value==n.value|0)&&("punc"!=r.type||"("!=r.value||n.space)){i(3);var o=c(n);return o&&isFinite(o.row)||(o=new Mi(n.value)),a(o.setSheet(e.value,!0),e,n)}}function f(e,t,n,r){if(("sym"==e.type||"rc"==e.type||"num"==e.type&&e.value==e.value|0)&&"op"==t.type&&":"==t.value&&("sym"==n.type||"rc"==n.type||"num"==n.type&&n.value==n.value|0)&&("punc"!=r.type||"("!=r.value||n.space)){var o=c(e,!0),s=c(n,!1);if(o&&s)return i(3),a(new Ii(o,s),e,n)}}function m(e,t){if(("sym"==e.type||"rc"==e.type)&&("punc"!=t.type||"("!=t.value||e.space)){var n=c(e);if(n&&isFinite(n.row)&&isFinite(n.col))return i(1),a(n,e,e)}}function g(e,t){if("sym"==e.type&&"punc"==t.type&&"("==t.value&&!e.space)return e.type="func",i(1),e}}function Xi(e){return" \t\r\n ​".indexOf(e)>=0}var Zi={type:"eof"};function Ji(e){var t=0;return{next:n,peek:i,eof:r,croak:o,readWhile:function(e){var t="";for(;!r()&&e(i(),t);)t+=n();return t},readEscaped:function(e){var t=!1,i="";for(;!r();){var o=n();if(t)i+=o,t=!1;else if("\\"==o)t=!0;else{if(o==e)break;i+=o}}return i},lookingAt:function(n){return n.exec(e.substr(t))},skip:function(n){if("string"==typeof n)e.substr(t,n.length)!=n&&o("Expected "+n),a(n.length);else if(n instanceof RegExp){var i=n.exec(e.substr(t));if(i)return a(i[0].length),i}else a(n[0].length)},forward:a,pos:function(){return t}};function n(){var n=e.charAt(t++);return"\n"==n?(0):0,n}function i(){return e.charAt(t)}function r(){return""===i()}function o(n){throw new Li(n+" (input: "+e+")",t)}function a(e){for(;e-- >0;)n()}}var er=[],tr=Ei.registerFormatParser=function(e){er.push(e)};Ei.parse=function(e,t,n,i,r){if(i instanceof Date)return{type:"date",value:Ai.dateToSerial(i)};if("number"==typeof i)return{type:"number",value:i};if("boolean"==typeof i)return{type:"boolean",value:i};if(/^'/.test(i+=""))return{type:"string",value:i.substr(1)};if(/^-?[0-9]+%$/.test(i)){var o=i.substr(0,i.length-1),a=parseFloat(o);if(!isNaN(a)&&a==o)return{type:"percent",value:a/100}}if(/^=/.test(i))return i=i.substr(1),/\S/.test(i)?Ui(e,t,n,i):{type:"string",value:"="+i};for(var s=0;s0&&a==i?(r=null,a!=Math.floor(a)&&(r="0."+String(a).split(".")[1].replace(/\d/g,"0")),{type:"number",value:a,format:r}):{type:"string",value:i}},Ei.parseNameDefinition=function(e,t){var n=Ui(null,0,0,e);if(!(n.ast instanceof Mi))throw new Li("Invalid name: "+e);if(n=n.ast,!(t instanceof Di)){var i=Ui(n.sheet,0,0,t);t=i.ast instanceof Di?i.ast:/^(?:str|num|bool|error)$/.test(i.ast.type)?i.ast.value:Yi(i)}return{name:n,value:t}},Ei.parseFormula=Ui,Ei.parseReference=function(e,t){if("#sheet"==e.toLowerCase())return Ti.SHEETREF;e:{var n;if(!(n=/^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(e))){for(var i=Qi(e,{}),r=[];;){var o=i.next();if(o instanceof zi)o.rel=0;else{if(!(o instanceof Ii))break e;o.topLeft.rel=0,o.bottomRight.rel=0}if(r.push(o),i.eof())break;if(!i.is("op",Pi.ARG))break e;i.next()}return 1==r.length?r[0]:new Ti.UnionRef(r)}var a=Wi(n[4]),s=Ni(n[2]);if(a<1048576&&s<16384)return new zi(Wi(n[4]),Ni(n[2]))}if(!t)throw new Error("Cannot parse reference: "+e)},Ei.compile=Yi,Ei.parseSqref=function(e,t,n){e=Qi(e,{row:t=t||0,col:n=n||0});for(var i=[];!e.eof();){var r=e.next();if("ref"!=r.type)throw new Li("Expecting a reference but got: "+JSON.stringify(r));i.push(r.absolute(t,n))}return i},Ei.InputStream=Ji,Ei.ParseError=Li,Ei.tokenize=function(e,t,n){var i=[];for(e=Qi(e,{forEditor:!0,row:t,col:n});!e.eof();)i.push(o());var r=i[0];return"op"==r.type&&"="==r.value&&(r.type="startexp"),i;function o(){var i=e.next();return"sym"==i.type?"TRUE"==i.upper?(i.type="bool",i.value=!0):"FALSE"==i.upper&&(i.type="bool",i.value=!1):"ref"==i.type&&(i={type:"ref",ref:null!=t&&null!=n?i.absolute(t,n):i,begin:i.begin,end:i.end}),i}},tr((function(e,t){var n,i=0,r="";if(t||(t=kendo.culture().calendar.patterns.d),n=/^(\d+)([-/.])(\d+)\2(\d{2}(?:\d{2})?)(\s*)/.exec(e)){var o=parseInt(n[1],10),a=n[2],s=parseInt(n[3],10),l=parseInt(n[4],10);l<30?l+=2e3:l<100&&(l+=1900);var c=!t||t.indexOf("M")12||!c){var d=o;o=s,s=d,c=!1}if(!Ai.validDate(l,o,s))return null;(i=Ai.packDate(l,o-1,s))<0&&i--,r=c?["mm","dd","yyyy"].join(a):["dd","mm","yyyy"].join(a),r+=n[5],e=e.substr(n[0].length)}if(n=/^(\d+):(\d+)$/.exec(e)){var u=parseInt(n[1],10),h=parseInt(n[2],10);return{type:"date",format:r+"hh:mm",value:i+Ai.packTime(u,h,0,0)}}if(n=/^(\d+):(\d+)(\.\d+)$/.exec(e)){h=parseInt(n[1],10);var p=parseInt(n[2],10),f=1e3*parseFloat(n[3]);return{type:"date",format:r+"mm:ss.00",value:i+Ai.packTime(0,h,p,f)}}if(n=/^(\d+):(\d+):(\d+)$/.exec(e)){u=parseInt(n[1],10),h=parseInt(n[2],10),p=parseInt(n[3],10);return{type:"date",format:r+"hh:mm:ss",value:i+Ai.packTime(u,h,p,0)}}if(n=/^(\d+):(\d+):(\d+)(\.\d+)$/.exec(e)){u=parseInt(n[1],10),h=parseInt(n[2],10),p=parseInt(n[3],10),f=1e3*parseFloat(n[4]);return{type:"date",format:r+"hh:mm:ss.00",value:i+Ai.packTime(u,h,p,f)}}})),tr((function(e){var t,n,i=kendo.culture(),r=i.numberFormat[","],o=i.numberFormat["."],a=i.numberFormat.currency.symbol,s=function(e,t){var n=e+t,i=nr[n];i||(i=(i="^(\\d+(COM\\d{3})*(DOT\\d+)?)").replace(/DOT/g,"\\"+t).replace(/COM/g,"\\"+e),i=new RegExp(i),nr[n]=i);return i}(r,o),l=new RegExp("^\\s*\\"+a+"\\s*"),c=1,d="",u="",h=!1,p=!1;if((e=Ji(e.replace(/^\s+|\s+$/g,""))).skip(/^-\s*/)&&(c=-1),(t=e.skip(l))&&(h=!0,d+='"'+t[0]+'"'),e.skip(/^-\s*/)){if(c<0)return null;c=-1}if(!(n=e.skip(s)))return null;if(d+="0",t=e.skip(l)){if(h)return null;h=!0,u='"'+t[0]+'"'}if(!h&&(t=e.skip(/^\s*%\s*/))&&(p=!0,u=t[0]),!e.eof())return null;(n[2]||h)&&(d=d.replace("0","#"),d+=",0"),n[3]&&(d+="."+ir("0",n[3].length-1));var f=n[0].replace(new RegExp("\\"+r,"g"),"").replace(new RegExp("\\"+o,"g"),".");return f=parseFloat(f),p&&(f/=100),d+=u,h&&(d+=";-"+d),{type:"number",currency:h,format:d,value:c*f}})),tr((function(e){var t;if(t=/^([0-9]*)\.([0-9]+)(\s*%)$/.exec(e))return{type:"number",value:parseFloat(e)/100,format:"0."+ir("0",t[2].length)+t[3]}}));var nr={};function ir(e,t){for(var n="";t-- >0;)n+=e;return n}var rr=kendo.jQuery,or=kendo.util.parseXML,ar=kendo.spreadsheet.calc.parseReference,sr={greaterThanOrEqual:"greaterThanOrEqualTo",lessThanOrEqual:"lessThanOrEqualTo"},lr=null;var cr=["sheetData","row","c"],dr=["cols","col"],ur=["definedNames","definedName"],hr=["sheetData","row","c","f"],pr=["mergeCells","mergeCell"],fr=["sheetViews","sheetView","pane"],mr=["sheetData","row"],gr=["sheetViews","sheetView","selection"],vr=["sheets","sheet"],_r=["sheetData","row","c","is"],br=["t"],wr=["si"],yr=["sheetData","row","c","v"],kr=["bookViews","workbookView"],xr=["sheetViews","sheetView"],Cr=["hyperlinks","hyperlink"],Sr=["dataValidations","dataValidation"],Tr=["dataValidations","dataValidation","formula1"],Dr=["dataValidations","dataValidation","formula2"],Ir=["x14:dataValidations","x14:dataValidation"],zr=["x14:dataValidations","x14:dataValidation","xm:sqref"],Mr=["x14:dataValidations","x14:dataValidation","x14:formula1","xm:f"],Er=["x14:dataValidations","x14:dataValidation","x14:formula2","xm:f"],Ar=["commentList","comment"],Hr=["authors","author"],Rr=["t"];function Fr(e){return/^\//.test(e)?e=e.substr(1):/^xl\//.test(e)||(e="xl/"+e),e}function Pr(e,t,n){lr=t.excelImportErrors=[];var i=Yr(e),r=$r(e,"_rels/workbook.xml"),o=ao(e,r.byType.theme[0]),a=io(e,o),s=[],l=0;Kr(e,"xl/workbook.xml",{enter:function(n,o){if(this.is(vr)){var c=o["r:id"],d=r.byId[c],u=o.name,h=function(e,t){var n,i={rows:0,cols:0};return Kr(e,Fr(t),{enter:function(e,t){"dimension"==e?(n=ar(t.ref)).bottomRight&&(i.cols=n.bottomRight.col+1,i.rows=n.bottomRight.row+1):"sheetFormatPr"===e?(t.defaultColWidth&&(i.columnWidth=Lr(parseFloat(t.defaultColWidth))),t.defaultRowHeight&&(i.rowHeight=Vr(parseFloat(t.defaultRowHeight)))):this.is(mr)&&t.r?i.rows=Math.max(i.rows,+t.r):this.is(cr)&&t.r&&(n=ar(t.r),i.rows=Math.max(i.rows,n.row+1),i.cols=Math.max(i.cols,n.col+1))}}),i}(e,d);t.options.columnWidth=h.columnWidth||t.options.columnWidth,t.options.rowHeight=h.rowHeight||t.options.rowHeight,s.push({workbook:t,zip:e,strings:i,styles:a,file:d,options:{name:u,rows:Math.max(t.options.rows||0,h.rows),columns:Math.max(t.options.columns||0,h.cols),columnWidth:h.columnWidth,rowHeight:h.rowHeight}})}else this.is(kr)&&o.activeTab&&(l=so(o.activeTab))},text:function(e){var n=this.is(ur);if(n&&!lo(n.function)&&!lo(n.vbProcedure)){var i=n.localSheetId,r=null;null!=i&&(r=s[i].options.name);var o=n.name;"_xlnm._FilterDatabase"!=o&&(r&&(o="'"+r.replace(/\'/g,"\\'")+"'!"+o),Ur(r,null,(function(){t.defineName(o,e,lo(n.hidden))}),"reading user-defined name: "+o))}}});var c=new rr.Deferred;c.progress((function(e){n&&n.notify(e)})).then((function(){var e=t.sheets();!function(e){for(var t=0;t-1&&(t.xSplit&&n.frozenColumns(so(t.xSplit)),t.ySplit&&n.frozenRows(so(t.ySplit)));else if(this.is(xr))n.showGridLines(lo(t.showGridLines,!0));else if(this.is(Cr)){var E=t["r:id"],A=k.byId[E];A&&n.range(t.ref).link(A)}else this.is(["autoFilter"])?(p=t.ref,i&&C()):p&&(this.is(["filterColumn"])?f=parseInt(t.colId,10):this.is(["customFilters"])?(m=lo(t.and)?"and":"or",g=[]):this.is(["customFilter"])?(d=function(e,t){var n={equal:"eq",notEqual:"ne",greaterThan:"gt",greaterThanOrEqual:"gte",lessThan:"lt",lessThanOrEqual:"lte"}[e];if(t=Wr(t),n&&"number"==typeof t)return{operator:n,value:t};if(("notEqual"==e||!e)&&"string"==typeof t)return{operator:e?"doesnotmatch":"matches",value:t}}(t.operator,t.val),d&&g.push({operator:d.operator,value:d.value})):this.is(["dynamicFilter"])?x.push({column:f,filter:new kendo.spreadsheet.DynamicFilter({type:Nr(t.type)})}):this.is(["top10"])?x.push({column:f,filter:new kendo.spreadsheet.TopFilter({value:Wr(t.val),type:function(e,t){return e&&t?"topPercent":t?"topNumber":e?"bottomPercent":"bottomNumber"}(lo(t.percent),lo(t.top))})}):this.is(["filters"])?(v=lo(t.blank),_=[]):this.is(["filter"])&&_.push(Wr(t.val)))},leave:function(e,t){if(this.is(hr))l||"shared"!=t.t||null==t.si||(l=n.range(b[t.si])._get("formula"));else if(this.is(cr)){if(null!=l)Ur(n,c||o,(function(){n.range(c||o).formula(l,d)}),"parsing formula")&&n.range(c||o).value(l).background("#ffaaaa");else if(null!=s){var r=n.range(o);r._get("formula")||(a&&"n"!=a?"s"==a?s=i[so(s)]:"b"==a?s="1"===s:"d"==a&&(s=kendo.parseDate(s)):s=parseFloat(s),null!=s&&r.value(s))}}else this.is(Sr)||this.is(Ir)?function(){var e=kendo.spreadsheet.calc.parseSqref(t.sqref),i=t.type.toLowerCase(),r=t.operator;/^(?:whole|decimal)$/.test(i)?i="number":"list"==i&&(r="list"),!r&&/^(?:number|date)$/.test(i)&&(r="between"),e.forEach((function(e){Ur(n,e,(function(){n.range(e).validation({type:lo(t.showErrorMessage,!0)?"reject":"warning",from:u,to:h,dataType:i,comparerType:sr[r]||r,allowNulls:lo(t.allowBlank),showButton:lo(t.showDropDown)||"date"==i||"list"==i,messageTemplate:t.error,titleTemplate:t.errorTitle})}),"parsing validation")}))}():"cols"==e?n._columns._refresh():"sheetData"==e?n._rows._refresh():"autoFilter"==e?C():p&&("customFilters"==e?x.push({column:f,filter:new kendo.spreadsheet.CustomFilter({logic:m,criteria:g})}):"filters"==e&&x.push({column:f,filter:new kendo.spreadsheet.ValueFilter({values:_,blanks:v})}))},text:function(e){var t;this.is(yr)||this.is(_r)?s=e:(t=this.is(hr))?(l=e,(d="array"==t.t)?c=t.ref:"shared"==t.t&&(b[t.si]=o)):this.is(Tr)||this.is(Mr)?u=e:this.is(Dr)||this.is(Er)?h=e:this.is(zr)&&(this.stack[this.stack.length-2].sqref=e)}}),k.byType.comments)&&function(e,t,n){var i,r,o=[];Kr(e,t,{enter:function(e,t){this.is(Ar)?r={author:o[t.authorId],ref:t.ref,text:""}:this.is(Hr)&&(i="")},leave:function(){this.is(Ar)?n.range(r.ref).comment(r.text):this.is(Hr)&&o.push(i)},text:function(e){this.is(Rr)?r.text+=e:this.is(Hr)&&(i+=e)}})}(e,uo(t,k.byType.comments[0]),n);k.byType.drawing&&function(e,t,n){var i,r,o,a,s=["xdr:twoCellAnchor"],l=["xdr:ext"],c=["xdr:oneCellAnchor"],d=["xdr:from"],u=["xdr:to"],h=["xdr:row"],p=["xdr:col"],f=["xdr:rowOff"],m=["xdr:colOff"],g=["xdr:blipFill","a:blip"],v=t.replace(/drawings\//,"drawings/_rels/"),_=$r(e,v);_.byType.image&&Object.keys(_.byId).forEach((function(i){var r,o=uo(t,_.byId[i]),a=function(e){var t=/\.([^.]+)$/.exec(e);if(t&&t[1])return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",wmf:"image/wmf"}[t[1].toLowerCase()]}(o);if(a){var s=e.files[o].asArrayBuffer(),l=(r=/[^/]+$/.exec(o))&&r[0],c=!l||kendo.support.browser.msie||kendo.support.browser.edge?new window.Blob([s],{type:a}):new window.File([s],l,{type:a});_.byId[i]=n._workbook.addImage(c)}}));Kr(e,t,{enter:function(e,t){if(this.is(s)||this.is(c))i={};else if(this.is(d)||this.is(u))r={};else if(this.is(g)){var n=t["r:embed"];i.image=_.byId[n]}else this.is(l)&&(o=ho(parseFloat(t.cx)),a=ho(parseFloat(t.cy)))},leave:function(){if(this.is(d))i.topLeftCell=new kendo.spreadsheet.CellRef(r.row,r.col),i.offsetX=ho(r.colOffset),i.offsetY=ho(r.rowOffset);else if(this.is(u))i.brCell=new kendo.spreadsheet.CellRef(r.row,r.col),i.brX=ho(r.colOffset),i.brY=ho(r.rowOffset);else if(this.is(s)&&i.image){var e=n._columns.sum(0,i.topLeftCell.col-1)+i.offsetX,t=n._rows.sum(0,i.topLeftCell.row-1)+i.offsetY,l=n._columns.sum(0,i.brCell.col-1)+i.brX,h=n._rows.sum(0,i.brCell.row-1)+i.brY;n.addDrawing({topLeftCell:i.topLeftCell,offsetX:i.offsetX,offsetY:i.offsetY,width:null!=o?o:l-e,height:null!=a?a:h-t,image:i.image,opacity:1})}else this.is(c)&&i.image&&n.addDrawing({topLeftCell:i.topLeftCell,offsetX:i.offsetX,offsetY:i.offsetY,width:o,height:a,image:i.image,opacity:1})},text:function(e){this.is(h)?r.row=parseFloat(e):this.is(p)?r.col=parseFloat(e):this.is(f)?r.rowOffset=parseFloat(e):this.is(m)&&(r.colOffset=parseFloat(e))}})}(e,uo(t,k.byType.drawing[0]),n);function C(){n.range(p).filter(x),p=null}}function Nr(e){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"}[e.toUpperCase()]||e}function Wr(e){var t=parseFloat(e);return isNaN(t)||t!=e?e:t}function Ur(e,t,n,i){try{return n(),!1}catch(n){var r={context:i,error:String(n)};return e&&e.name?r.sheet=e.name():e&&(r.sheet=e),t&&(r.location=String(t)),lr.push(r),!0}}var jr={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},qr={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:"@"};function Gr(e,t,n,i){var r,o,a,s=e.range(t),l=n.inlineStyles[i];function c(e,t){var n=l[e];if(null!=n&&!n)return!1;if(o=l[t],r&&null==o){if(null!=(n=r[e])&&!n)return!1;o=r[t]}return null!=o}l.xfId&&(r=n.namedStyles[l.xfId]),c("applyBorder","borderId")&&function(e){function t(t,n){var i=e[t];if(i){var r=jr[i.style];if(r){var o=i.color;null==o&&(o="#000");var a={size:r,color:o};"diagonal"==t&&(a.type=i.up<<1|i.down),s._property(n,a)}}}t("left","borderLeft"),t("top","borderTop"),t("right","borderRight"),t("bottom","borderBottom"),t("diagonal","dBorders")}(n.borders[o]),c("applyFont","fontId")&&function(e){s.fontFamily(e.name),e.size&&s._property("fontSize",4*e.size/3);e.bold&&s.bold(!0);e.italic&&s.italic(!0);e.underline&&s.underline(!0);e.color&&s.color(e.color)}(n.fonts[o]),c("applyAlignment","textAlign")&&s.textAlign(o),c("applyAlignment","verticalAlign")&&s.verticalAlign(o),c("applyAlignment","indent")&&s.indent(o),c("applyAlignment","wrapText")&&s._property("wrap",o),c("applyFill","fillId")&&"solid"==(a=n.fills[o]).type&&s.background(a.color),c("applyNumberFormat","numFmtId")&&function(e){var t="string"==typeof e?e:e.formatCode;null==t||/^general$/i.test(t)||(t=t.replace(/^\[\$-[0-9]+\]/,""),s.format(t))}(n.numFmts[o]||qr[o])}function Kr(e,t,n){var i=e.files[t];i&&or(i.asUint8Array(),n)}function Yr(e){var t=[],n=null;return Kr(e,"xl/sharedStrings.xml",{leave:function(){this.is(wr)&&(t.push(n),n=null)},text:function(e){this.is(br)&&(null==n&&(n=""),n+=e)}}),t}function $r(e,t){var n={byId:{},byType:{theme:[]}};return Kr(e,Fr(t)+".rels",{enter:function(e,t){if("Relationship"==e){n.byId[t.Id]=t.Target;var i=t.Type.match(/\w+$/)[0],r=n.byType[i]||[];r.push(t.Target),n.byType[i]=r}}}),n}var Qr=["borders","border"],Xr=["fills","fill"],Zr=["fonts","font"],Jr=["cellXfs","xf"],eo=["cellStyleXfs","xf"],to=["numFmts","numFmt"],no=[co("FF000000"),co("FFFFFFFF"),co("FFFF0000"),co("FF00FF00"),co("FF0000FF"),co("FFFFFF00"),co("FFFF00FF"),co("FF00FFFF"),co("FF000000"),co("FFFFFFFF"),co("FFFF0000"),co("FF00FF00"),co("FF0000FF"),co("FFFFFF00"),co("FFFF00FF"),co("FF00FFFF"),co("FF800000"),co("FF008000"),co("FF000080"),co("FF808000"),co("FF800080"),co("FF008080"),co("FFC0C0C0"),co("FF808080"),co("FF9999FF"),co("FF993366"),co("FFFFFFCC"),co("FFCCFFFF"),co("FF660066"),co("FFFF8080"),co("FF0066CC"),co("FFCCCCFF"),co("FF000080"),co("FFFF00FF"),co("FFFFFF00"),co("FF00FFFF"),co("FF800080"),co("FF800000"),co("FF008080"),co("FF0000FF"),co("FF00CCFF"),co("FFCCFFFF"),co("FFCCFFCC"),co("FFFFFF99"),co("FF99CCFF"),co("FFFF99CC"),co("FFCC99FF"),co("FFFFCC99"),co("FF3366FF"),co("FF33CCCC"),co("FF99CC00"),co("FFFFCC00"),co("FFFF9900"),co("FFFF6600"),co("FF666699"),co("FF969696"),co("FF003366"),co("FF339966"),co("FF003300"),co("FF333300"),co("FF993300"),co("FF993366"),co("FF333399"),co("FF333333"),co("FF000000"),co("FFFFFFFF")];function io(e,t){var n={fonts:[],numFmts:{},fills:[],borders:[],namedStyles:[],inlineStyles:[]},i=null,r=null,o=null,a=null;function s(e){var t={borderId:so(e.borderId),fillId:so(e.fillId),fontId:so(e.fontId),numFmtId:so(e.numFmtId),pivotButton:lo(e.pivotButton),quotePrefix:lo(e.quotePrefix),xfId:so(e.xfId)};function n(n){null!=e[n]&&(t[n]=lo(e[n]))}return n("applyAlignment"),n("applyBorder"),n("applyFill"),n("applyFont"),n("applyNumberFormat"),n("applyProtection"),t}function l(e,n){if(e.rgb)return co(e.rgb);if(e.indexed)return no[so(e.indexed)];if(e.theme){var i=t.colorScheme[so(e.theme)];if(!i)return n;var r=kendo.parseColor(i);if(e.tint){r=r.toHSL();var o=parseFloat(e.tint);r.l=o<0?r.l*(1+o):r.l*(1-o)+(100-100*(1-o))}return r.toCssRgba()}}return Kr(e,"xl/styles.xml",{enter:function(e,t,c){if(this.is(to))n.numFmts[t.numFmtId]=t;else if(this.is(Zr))n.fonts.push(i={}),c&&(i=null);else if(i)"sz"==e?i.size=parseFloat(t.val):"name"==e?i.name=t.val:"b"==e?i.bold=lo(t.val,!0):"i"==e?i.italic=lo(t.val,!0):"u"==e?i.underline=null==t.val||"single"==t.val:"color"==e&&(i.color=l(t,null));else if(this.is(Xr))n.fills.push(r={}),c&&(r=null);else if(r)"patternFill"==e?r.type=t.patternType:("fgColor"==e&&"solid"===r.type||"bgColor"==e&&"solid"!==r.type)&&(r.color=l(t,no[0]));else if(this.is(Qr))n.borders.push(o={diagonalUp:+lo(t.diagonalUp,0),diagonalDown:+lo(t.diagonalDown,0)}),c&&(o=null);else if(o){if(/^(?:left|top|right|bottom|diagonal)$/.test(e)&&(o[e]={style:t.style||"none"},"diagonal"==e&&(o.diagonal.up=o.diagonalUp,o.diagonal.down=o.diagonalDown)),"color"==e){var d=this.stack[this.stack.length-2].$tag;o[d].color=l(t,no[0])}}else this.is(eo)?(a=s(t),n.namedStyles.push(a),c&&(a=null)):this.is(Jr)?(a=s(t),n.inlineStyles.push(a),c&&(a=null)):a&&"alignment"==e&&(/^(?:left|center|right|justify)$/.test(t.horizontal)&&(a.textAlign=t.horizontal),/^(?:top|center|bottom)$/.test(t.vertical)&&(a.verticalAlign=t.vertical),null!=t.wrapText&&(a.wrapText=lo(t.wrapText)),null!=t.indent&&(a.indent=so(t.indent)))},leave:function(e){this.is(Zr)?i=null:this.is(Xr)?r=null:this.is(Qr)?o=null:"xf"==e&&(a=null)}}),n}var ro=["a:clrScheme","*","a:srgbClr"],oo=["a:clrScheme","*","a:sysClr"];function ao(e,t){var n=[],i={colorScheme:n},r=Fr(t);function o(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}return e.files[r]&&(Kr(e,r,{enter:function(e,t){this.is(oo)?n.push(co("window"==t.val?"FFFFFFFF":"FF000000")):this.is(ro)&&n.push(co("FF"+t.val))}}),n.length>3&&(o(n,0,1),o(n,2,3))),i}function so(e){return null==e?null:parseInt(e,10)}function lo(e,t){return null==e?t:"true"==e||!0===e||1==e}function co(e){var t=/^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);return"rgba("+parseInt(t[2],16)+", "+parseInt(t[3],16)+", "+parseInt(t[4],16)+", "+parseInt(t[1],16)/255+")"}function uo(e,t){for(e=e.split(/\/+/),t=t.split(/\/+/),e.pop();t.length;){var n=t.shift();if(""===n)e=[];else{if("."===n)continue;".."===n?e.pop():e.push(n)}}return e.join("/")}function ho(e){return e/9525}kendo.spreadsheet.readExcel=function(e,t,n){var i=new FileReader;i.onload=function(e){Pr(new JSZip(e.target.result),t,n)},i.readAsArrayBuffer(e)},kendo.spreadsheet._readSheet=Or,kendo.spreadsheet._readStrings=Yr,kendo.spreadsheet._readStyles=io,kendo.spreadsheet._readTheme=ao,kendo.spreadsheet._readWorkbook=Pr,function(e){var t=e.jQuery,n=e.spreadsheet.calc.runtime.Formula,i=e.spreadsheet.Ref,r=e.spreadsheet.CalcError;e.spreadsheet.messages.workbook={defaultSheetName:"Sheet"};var o=e.Observable.extend({options:{},init:function(t,n){e.Observable.fn.init.call(this),this.options=t,this._view=n,this._sheets=[],this._images={},this._imgID=0,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 e.util.UndoRedoStack,this.undoRedoStack.bind(["undo","redo"],this._onUndoRedo.bind(this)),this._context=new e.spreadsheet.FormulaContext(this),this._validationContext=new e.spreadsheet.ValidationFormulaContext(this),this._names=Object.create(null),this.fromJSON(this.options)},clipboard:function(){return this._clipboard||(this._clipboard=new e.spreadsheet.Clipboard(this)),this._clipboard},destroy:function(){this.unbind(),this._clipboard&&this._clipboard.destroy()},events:["cut","copy","paste","changing","change","excelImport","excelExport","insertSheet","removeSheet","selectSheet","renameSheet","insertRow","insertColumn","deleteRow","deleteColumn","hideRow","hideColumn","unhideRow","unhideColumn","select","changeFormat","dataBinding","dataBound","progress"],_sheetChanging:function(e){this.trigger("changing",e)&&e.preventDefault()},_sheetChange:function(e){this.trigger("change",e)},_sheetInsertRow:function(e){this.trigger("insertRow",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetInsertColumn:function(e){this.trigger("insertColumn",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetDeleteRow:function(e){this.trigger("deleteRow",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetDeleteColumn:function(e){this.trigger("deleteColumn",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetHideRow:function(e){this.trigger("hideRow",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetHideColumn:function(e){this.trigger("hideColumn",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetUnhideRow:function(e){this.trigger("unhideRow",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetUnhideColumn:function(e){this.trigger("unhideColumn",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetSelect:function(e){this.trigger("select",e)},_sheetDataBinding:function(e){this.trigger("dataBinding",{sheet:e.sender})&&e.preventDefault()},_sheetDataBound:function(e){this.trigger("dataBound",{sheet:e.sender})},_sheetProgress:function(e){var t=this;setTimeout((function(){t.trigger("progress",{toggle:e.toggle})}))},_sheetCommandRequest:function(e){this.trigger("commandRequest",e)},_inputForRef:function(t){var n=this;return n._sheet.withCultureDecimals((function(){return new e.spreadsheet.Range(t,n._sheet).input()}))},_onUndoRedo:function(e){e.command.range().select()},execute:function(n){var i=t.extend({workbook:this},n.options),r=new e.spreadsheet[n.command](i),o=this.activeSheet();i.origin&&r.origin(i.origin),i.operatingRange?r.range(i.operatingRange):r.range(o.selection()),i.editRange&&(r._editRange=i.editRange);var a=r.exec();return a&&"error"===a.reason||r.cannotUndo||this.undoRedoStack.push(r),this.cleanupImages(),a},resetFormulas:function(){this._sheets.forEach((function(e){e.resetFormulas()}))},resetValidations:function(){this._sheets.forEach((function(e){e.resetValidations()}))},refresh:function(e){e.recalc&&(this.resetFormulas(),this.resetValidations(),this._sheet.recalc(this._context),this._sheet.revalidate(this._validationContext))},activeSheet:function(t){if(void 0===t)return this._sheet;this.sheetByName(t.name())&&(this._sheet=t,t.triggerChange(e.spreadsheet.ALL_REASONS))},moveSheetToIndex:function(e,t){var n=this.sheetIndex(e),i=this._sheets;-1!==n&&(this._sheetsSearchCache={},i.splice(t,0,i.splice(n,1)[0]),this.trigger("change",{sheetSelection:!0}))},insertSheet:function(t){var n,i=this,r="number"==typeof(t=t||{}).index?t.index:i._sheets.length,o=i._sheets,a=function(t){t=t||1;var n=e.spreadsheet.messages.workbook.defaultSheetName+t;return i.sheetByName(n)?a(t+1):n};if(!t.name||!i.sheetByName(t.name)){this._sheetsSearchCache={},n=t.name||a();var s=new e.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);return s._workbook=this,s._name(n),this._bindSheetEvents(s),o.splice(r,0,s),t.data&&s.fromJSON(t.data),t.dataSource&&s.setDataSource(t.dataSource),this.trigger("change",{sheetSelection:!0}),s}},_bindSheetEvents:function(e){e.bind("changing",this._sheetChanging.bind(this)),e.bind("change",this._sheetChange.bind(this)),e.bind("insertRow",this._sheetInsertRow.bind(this)),e.bind("insertColumn",this._sheetInsertColumn.bind(this)),e.bind("deleteRow",this._sheetDeleteRow.bind(this)),e.bind("deleteColumn",this._sheetDeleteColumn.bind(this)),e.bind("hideRow",this._sheetHideRow.bind(this)),e.bind("hideColumn",this._sheetHideColumn.bind(this)),e.bind("unhideRow",this._sheetUnhideRow.bind(this)),e.bind("unhideColumn",this._sheetUnhideColumn.bind(this)),e.bind("select",this._sheetSelect.bind(this)),e.bind("commandRequest",this._sheetCommandRequest.bind(this)),e.bind("dataBinding",this._sheetDataBinding.bind(this)),e.bind("dataBound",this._sheetDataBound.bind(this)),e.bind("progress",this._sheetProgress.bind(this))},sheets:function(){return this._sheets.slice()},sheetByName:function(e){return this._sheets[this.sheetIndex(e)]},sheetByIndex:function(e){return this._sheets[e]},sheetIndex:function(e){var t=this._sheets,n=("string"==typeof e?e:e.name()).toLowerCase(),i=this._sheetsSearchCache[n];if(i>=0)return i;for(i=0;i-1))if(e.unbind(),n.splice(r,1),t.activeSheet().name()===i){var o=n[r===n.length?r-1:r];t.activeSheet(o)}else this.trigger("change",{recalc:!0,sheetSelection:!0})},_clearSheets:function(){for(var e=0;e1&&(void 0===t?delete this._names[e]:this._names[e]=t),this._names[e]},forEachName:function(e){Object.keys(this._names).forEach((function(t){e(this._names[t],t)}),this)},adjustNames:function(e,t,r,o){e=e.toLowerCase(),Object.keys(this._names).forEach((function(a){var s=this._names[a],l=s.value;l instanceof i&&l.sheet.toLowerCase()==e?s.value=l.adjust(null,null,null,null,t,r,o):l instanceof n&&l.adjust(e,t?"row":"col",r,o)}),this)},addImage:function(e){var t=String(++this._imgID);return this._images[t]="string"==typeof e?{url:e}:{blob:e},t},imageUrl:function(e){var t=this._images[e],n=t.url;return n||(n=t.url=window.URL.createObjectURL(t.blob)),n},cleanupImages:function(){Object.keys(this._images).forEach((function(e){if(!this.usesImage(e)){var t=this._images[e].url;t&&window.URL.revokeObjectURL(t),delete this._images[e]}}),this)},usesImage:function(e){var t,n=this._sheets;for(t=n.length;--t>=0;)if(n[t].usesImage(e))return 1;var i=this.undoRedoStack.stack;for(t=i.length;--t>=0;)if(i[t].usesImage(e))return 2;return!1}});function a(e,t){function n(e,t,n){return void 0!==e?e:void 0!==t?t:n}var i=n(e.rowCount,t.rows,200),r=n(e.columnCount,t.columns,50),o=n(e.rowHeight,t.rowHeight,20),a=n(e.columnWidth,t.columnWidth,64),s=n(e.headerHeight,t.headerHeight,20),l=n(e.headerWidth,t.headerWidth,32);if(void 0!==e.rows)for(var c=0;c=i&&(i=u+1),d.cells)for(var h=0;h=r&&(r=p+1)}}return{rowCount:i,columnCount:r,rowHeight:o,columnWidth:a,headerHeight:s,headerWidth:l}}e.spreadsheet.Workbook=o,e.PDFMixin&&(e.PDFMixin.extend(o.prototype),o.prototype.saveAsPDF=function(n){var i=new t.Deferred,r=i.promise(),o={promise:r};if(!this.trigger("pdfExport",o))return this._drawPDF(n,i).then((function(t){return n.forceProxy?e.pdf.exportPDF(t):e.pdf.exportPDFToBlob(t)})).done((function(t){e.saveAs({dataURI:t,fileName:n.fileName,proxyURL:n.proxyURL,forceProxy:n.forceProxy,proxyTarget:n.proxyTarget}),i.resolve()})).fail((function(e){i.reject(e)})),r},o.prototype._drawPDF=function(e){var n=new t.Deferred,i=function(e){n.resolve(e)};switch(e.area){case"workbook":e.workbook.draw(e,i);break;case"sheet":e.workbook.activeSheet().draw(e,i);break;case"selection":e.workbook.activeSheet().selection().draw(e,i)}return n.promise()})}(kendo);var po=kendo.spreadsheet,fo=po.CellRef,mo=po.RangeRef,go=po.UnionRef,vo=po.NameRef,_o=po.Ref,bo=kendo.Class.extend({init:function(e){this.workbook=e},getRefCells:function(e,t,n,i,r,o){var a,s,l,c;if(e instanceof fo)return(a=this.workbook.sheetByName(e.sheet))&&e.valid()?(s=a.formula(e),l=a.range(e.row,e.col).value(),o||null!=s||null!=l?[{formula:s,value:l,row:e.row,col:e.col,sheet:e.sheet,hidden:!!t&&(0===a.columnWidth(e.col)||0===a.rowHeight(e.row))}]:[]):[{value:new kendo.spreadsheet.calc.runtime.CalcError("REF")}];if(e instanceof mo){var d=[],u=c=this.workbook.sheetIndex(e.sheet);if(e.endSheet&&c>(u=this.workbook.sheetIndex(e.endSheet))){var h=c;c=u,u=h}if(c<0||u<0||!e.valid())return[{value:new kendo.spreadsheet.calc.runtime.CalcError("REF")}];for(;c<=u;)for(var p=(a=this.workbook.sheetByIndex(c++))._grid.normalize(e.topLeft),f=a._grid.normalize(e.bottomRight),m=a._grid.cellRefIndex(p),g=a._grid.cellRefIndex(f),v=a._properties.iterator("value",m,g),_=p.col;_<=f.col;++_)for(var b=p.row;b<=f.row;++b){var w=a._grid.index(b,_);s=a._properties.get("formula",w),l=v.at(w),(o||null!=s||null!=l)&&d.push({formula:s,value:l,row:b,col:_,sheet:a.name(),hidden:!!t&&(0===a.columnWidth(_)||0===a.rowHeight(b))})}return d}if(e instanceof go){var y=[];for(c=0;cMath.abs(a)?(r.width=Math.max(n.copy.width+o,20),r.height=r.width/n.aspect):(r.height=Math.max(n.copy.height+a,20),r.width=r.height*n.aspect):(r.width=Math.max(n.copy.width+o,20),r.height=Math.max(n.copy.height+a,20)):"E"==n.resize?r.width=Math.max(n.copy.width+o,20):"S"==n.resize?r.height=Math.max(n.copy.height+a,20):"N"==n.resize?n.copy.height-a>20&&(r.height=n.copy.height-a,r.offsetY=n.copy.offsetY+a):"W"==n.resize?n.copy.width-o>20&&(r.width=n.copy.width-o,r.offsetX=n.copy.offsetX+o):"NE"==n.resize?(r.width=Math.max(n.copy.width+o,20),n.copy.height-a>20&&(r.height=n.copy.height-a,r.offsetY=n.copy.offsetY+a)):"SW"==n.resize?(r.height=Math.max(n.copy.height+a,20),n.copy.width-o>20&&(r.width=n.copy.width-o,r.offsetX=n.copy.offsetX+o)):"NW"==n.resize?(n.copy.height-a>20&&(r.height=n.copy.height-a,r.offsetY=n.copy.offsetY+a),n.copy.width-o>20&&(r.width=n.copy.width-o,r.offsetX=n.copy.offsetX+o)):(r.offsetX=n.copy.offsetX+o,r.offsetY=n.copy.offsetY+a),t.triggerChange({dragging:!0}),!0},onMouseDrag:function(t){if("sheet"!==this._selectionMode){var n={clientX:t.clientX,clientY:t.clientY},i=this._workbook.activeSheet();if(!this._dragDrawing(t)){var r=this.objectAt(n);if(i.resizingInProgress())this.constrainResize(r.type,r.ref)||i.resizeHintPosition({x:r.x,y:r.y});else if("outside"!==r.type){if(this.originFrame===r.pane)this.selectToLocation(n);else{var o=this.originFrame._grid;r.x>o.right&&e.scrollLeft(this),r.y>o.bottom&&this.scrollTop(),r.y=0,l=o.types.indexOf("text/plain")>=0):(s=/text\/html/.test(o.types),l=/text\/plain/.test(o.types)),s&&(i=o.getData("text/html").trim()),l&&(r=o.getData("text/plain").trim()),!i&&!r&&o.items&&o.items.length)for(var c=0;cn.right&&this.scrollRight(8),tn.bottom&&this.scrollDown(8),o===i.scrollTop&&r===i.scrollLeft?this.selectToLocation(this.finalLocation):this.extendSelection(this.objectAt(this.lastKnownCellLocation))},startAutoScroll:function(e,t){this._scrollInterval||(this._scrollInterval=setInterval(this.autoScroll.bind(this),50)),this.finalLocation=t||this.lastKnownCellLocation,this._autoScrollTarget=e},stopAutoScroll:function(){clearInterval(this._scrollInterval),this._scrollInterval=null},openCustomEditor:function(){this.view.openCustomEditor()},openFilterMenu:function(e){var t=this.objectAt(e),n=this._workbook.activeSheet().filterColumn(t.ref),i=this.view.createFilterMenu(n);i.bind("action",this.onCommandRequest.bind(this)),i.bind("action",i.close.bind(i)),i.openFor(e.target,e)},_saveEditorValue:function(e){var t=this.editor._range.sheet(),n=this.editor.value();this._workbook.activeSheet()!==t&&(this._workbook.activeSheet()._setFormulaSelections(),this._workbook.activeSheet(t)),t.isInEditMode(!1),this._lastEditorValue=n,this._execute({command:"EditCommand",options:{value:n,arrayFormula:e}})},onEditorChange:function(){this._saveEditorValue(!1)},onEditorArrayFormula:function(){this._saveEditorValue(!0),this.editor.deactivate(!0)},onEditorActivate:function(){var e=this._workbook.activeSheet();e._setFormulaSelections(this.editor.highlightedRefs()),e.isInEditMode(!0)},onEditorDeactivate:function(){var e=this._workbook.activeSheet();e.isInEditMode(!1),e._setFormulaSelections([])},onEditorUpdate:function(){this._workbook.activeSheet()._setFormulaSelections(this.editor.highlightedRefs())},onEditorBarFocus:function(){!1===this._workbook.activeSheet().selection().enable()||this.editor.activate({range:this._workbook.activeSheet().selection(),rect:this.view.activeCellRectangle(),tooltip:this._activeTooltip()})},onEditorCellFocus:function(){this.editor.scale()},onEditorEsc:function(){this.resetEditorValue(),this.editor.deactivate(),this.clipboardElement.trigger("focus")},insertNewline:function(e){e.preventDefault(),this.editor.insertNewline()},onEditorBlur:function(e,t){this.editor.isFiltered()||(this._preventNavigation=!1,this.editor.deactivate(),this._preventNavigation||(this.clipboardElement.trigger("focus"),this.navigator.navigateInSelection(r[t])))},onEditorAction:function(e,t){var n=this.editor,r=this._workbook.activeSheet();this._casualEditing&&/^(?:up|right|down|left)$/.test(t)?(this.deactivateEditor(),this.navigator.moveActiveCell(i[t]),e.preventDefault()):n.canInsertRef(!0)&&(this.navigator.moveActiveCell(i[t]),n.activeEditor().refAtPoint(r),r._setFormulaSelections(n.highlightedRefs()),e.preventDefault())},onEditorShiftAction:function(e,t){var n=this.editor,r=this._workbook.activeSheet();n.canInsertRef(!0)&&(this.navigator.modifySelection(i[t.replace("shift+","")],this.appendSelection),n.activeEditor().refAtPoint(r),r._setFormulaSelections(n.highlightedRefs()),e.preventDefault())},resetEditorValue:function(){var e=this._workbook.activeSheet(),t=e.activeCell(),n=this._workbook._inputForRef(t),i=e.range(t).intersectingArrayFormula();i&&(n="="+i.formula),this.editor.value(n,!!i)},activateEditor:function(e){this._casualEditing=e,this.editor.activate({range:this._workbook.activeSheet().selection(),rect:this.view.activeCellRectangle(),tooltip:this._activeTooltip()}).focus()},deactivateEditor:function(){this.view.editor.deactivate()},onCommandRequest:function(e){e.command?this._execute(e):this._workbook.undoRedoStack[e.action]()},onDialogRequest:function(e){var n={pdfExport:this._workbook.options.pdf,excelExport:this._workbook.options.excel};e.options?t.extend(!0,e.options,n):e.options=n,this.view.openDialog(e.name,e.options)},onNameEditorEnter:function(){var t,n=this._workbook,i=n.activeSheet(),r=this.view.nameEditor.value();if((t=e.spreadsheet.calc.parseReference(r,!0)||n.nameValue(r))instanceof e.spreadsheet.Ref){if(t.sheet&&t.sheet.toLowerCase()!=i.name().toLowerCase()){var o=n.sheetByName(t.sheet);o&&(n.activeSheet(o),i=o)}i.range(t).select()}else t=i.selection()._ref.clone().simplify().setSheet(i.name(),!0),this._execute({command:"DefineNameCommand",options:{name:r,value:t}}),this.clipboardElement.trigger("focus")},onNameEditorCancel:function(){this.clipboardElement.trigger("focus")},onNameEditorSelect:function(t){var n=t.name,i=this._workbook,r=i.activeSheet(),o=i.nameValue(n);if(o instanceof e.spreadsheet.Ref){if(o.sheet&&o.sheet.toLowerCase()!=r.name().toLowerCase()){var a=i.sheetByName(o.sheet);a&&(i.activeSheet(a),r=a)}r.range(o).select()}else this.clipboardElement.trigger("focus")},onNameEditorDelete:function(e){this._execute({command:"DeleteNameCommand",options:{name:e.name}}),this.clipboardElement.trigger("focus")}});e.spreadsheet.Controller=_}(window.kendo),function(e){var t=e.jQuery,n=e.spreadsheet.CellRef,i=".",r={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",filterButtonSelected:"k-selected",horizontalResize:"k-horizontal-resize",verticalResize:"k-vertical-resize",icon:"k-icon",iconFilterDefault:"caret-alt-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",drawingContextMenu:"k-spreadsheet-drawing-context-menu"};function o(e){return(e.size||1)+"px solid "+(e.color||"#000")}function a(e){return/:\/\//.test(e)||(e="http://"+e),e}function s(t,n,i,r){function s(t){var i=n.link;if(i||"object"==typeof n.value&&(i=n.value.link),i){var r={textDecoration:"none"};return n.color&&(r.color=n.color),n.underline&&(r.textDecoration="underline"),e.dom.element("a",{href:a(i),style:r,target:"_blank"},t?[t]:[])}return t}var l=null!=n.value||null!=n.validation&&!n.validation.value||n.background||n.merged||n.comment||n.dBorders;if(i||l){var c={background:[]},d=n.background;if(d){var h=d;r&&((h=e.parseColor(h).toHSV()).v*=.9,h=h.toCssRgba()),h=o({color:h}),c.outline=h}n.dBorders&&(2&n.dBorders.type&&c.background.push("linear-gradient(to top left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) calc(50% - "+n.dBorders.size+"px), "+n.dBorders.color+" 50%, rgba(0, 0, 0, 0) calc(50% + "+n.dBorders.size+"px), rgba(0, 0, 0, 0) 100%)"),1&n.dBorders.type&&c.background.push("linear-gradient(to top right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) calc(50% - "+n.dBorders.size+"px), "+n.dBorders.color+" 50%, rgba(0, 0, 0, 0) calc(50% + "+n.dBorders.size+"px), rgba(0, 0, 0, 0) 100%)")),d&&c.background.push(d),n.color&&(c.color=n.color),n.fontFamily&&(c.fontFamily=n.fontFamily),n.underline&&(c.textDecoration="underline"),n.italic&&(c.fontStyle="italic"),n.textAlign&&(c.textAlign=n.textAlign),n.bold&&(c.fontWeight="bold"),n.fontSize&&(c.fontSize=n.fontSize+"px"),!0===n.wrap?(c.whiteSpace="pre-wrap",c.overflowWrap="break-word",c.wordWrap="break-word"):(c.whiteSpace="pre",c.overflowWrap="normal",c.wordWrap="normal"),c.left=n.left+1+"px",c.top=n.top+1+"px",c.width=n.width-1+"px",c.height=n.height-1+"px";var p=n.value,f=typeof p,m=n.format;if(m||"number"!=f||p==Math.floor(p)||(m="0.##############"),m&&null!=p?(p=e.spreadsheet.formatting.format(p,m)).__dataType&&(f=p.__dataType):null!=p&&(p=n.html?e.dom.html(p):e.dom.text(p)),!c.textAlign)switch(f){case"number":case"date":case"percent":case"currency":c.textAlign="right";break;case"boolean":c.textAlign="center"}e.spreadsheet.draw.applyIndent(n,c);var g=[u.cell];i&&g.push(i),!1===n.enable&&g.push("k-disabled"),n.merged&&(g.push("k-spreadsheet-merged-cell"),n.enable||t.push(e.dom.element("div",{className:"k-spreadsheet-disabled-mask",style:{left:n.left+1+"px",top:n.top+1+"px",width:n.width-1+"px",height:n.height-1+"px"}}))),n.comment&&g.push("k-spreadsheet-has-comment");var v=n.verticalAlign||"bottom";p=v&&p?e.dom.element("div",{className:"k-vertical-align-"+v},[s(p)]):s(p),c.background.length?c.background=c.background.join(","):delete c.background;var _=p?[p]:[],b={style:c},w=n.validation;w&&!w.value&&(_.push(e.dom.element("span",{className:"k-dirty"})),g.push("k-dirty-cell"),b.title=w.message),b.className=g.join(" ");var y=e.dom.element("div",b,_);return t.push(y),y}}e.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.",insertRowBelowLastRow:"Cannot insert row below the last row.",insertColAfterLastCol:"Cannot insert column to the right of the last column."},tabs:{home:"Home",insert:"Insert",data:"Data"}},e.spreadsheet.messages.menus={cut:"Cut",copy:"Copy",paste:"Paste",merge:"Merge",unmerge:"Unmerge",delete:"Delete",hide:"Hide",unhide:"Unhide",bringToFront:"Bring to front",sendToBack:"Send to back"};var l=e.Class.extend({init:function(){this.cols=[],this.trs=[],this._height=0,this._width=0},addColumn:function(t){this._width+=t;var n=e.dom.element("col",{style:{width:t+"px"}});n.visible=t>0,this.cols.push(n)},addRow:function(t){var n;n={style:{height:t+"px"}},this._height+=t;var i=e.dom.element("tr",n);i.visible=t>0,this.trs.push(i)},addCell:function(t,n,i,r,o){null==n&&(n=""),n instanceof e.dom.Node||(n=e.dom.text(n));var a=[n];o&&!o.value&&(a.push(e.dom.element("span",{className:"k-dirty"})),r=(r||"")+(r?" ":"")+"k-dirty-cell",i.title=o.message),r&&(i.className=r);var s=e.dom.element("td",i,a);return this.trs[t].children.push(s),s},toDomTree:function(t,n,i){this.trs=this.trs.filter((function(e){return e.visible}));var r=0;return this.cols=this.cols.filter((function(e,t){return e.visible||(this.trs.forEach((function(e){e.children.splice(t-r,1)})),r++),e.visible}),this),e.dom.element("table",{style:{left:t+"px",top:n+"px",height:this._height+"px",width:this._width+"px"},className:i,role:"presentation"},[e.dom.element("colgroup",null,this.cols),e.dom.element("tbody",null,this.trs)])}});e.spreadsheet.ContextMenu=e.ui.ContextMenu;function c(e,t,n){return e>=t&&e<=n}var d=e.Class.extend({init:function(n,r){var o=d.classNames;this.element=n,this.options=t.extend(!0,{messages:e.spreadsheet.messages.view},this.options,r),this._chrome(),this._dialogs=[],n.append(e.template('
                      • #: messages.cut #
                      • #: messages.copy #
                      • #: messages.paste #
                      • #: messages.merge #
                      • #: messages.unmerge #
                      • #: messages.cut #
                      • #: messages.copy #
                      • #: messages.paste #
                      • #: messages.delete #
                      • #: messages.hide #
                      • #: messages.unhide #
                      • #: messages.cut #
                      • #: messages.copy #
                      • #: messages.paste #
                      • #: messages.delete #
                      • #: messages.hide #
                      • #: messages.unhide #
                      • #: messages.bringToFront #
                      • #: messages.sendToBack #
                      • #: messages.delete #
                      ')({classNames:o,messages:e.spreadsheet.messages.menus})),this._formulaInput(),this.wrapper=n.find(i+o.view),this.container=n.find(i+o.fixedContainer)[0],this.scroller=n.find(i+o.scroller)[0],this.clipboard=n.find(i+o.clipboard),this.viewSize=t(this.scroller.firstChild),this.tree=new e.dom.Tree(this.container),this.clipboardContents=new e.dom.Tree(this.clipboard[0]),this.editor=new e.spreadsheet.SheetEditor(this),this._sheetsbar();var a={target:n,animation:!1,showOn:"never"};this.cellContextMenu=new e.spreadsheet.ContextMenu(n.find(i+o.cellContextMenu),a),this.colHeaderContextMenu=new e.spreadsheet.ContextMenu(n.find(i+o.colHeaderContextMenu),a),this.rowHeaderContextMenu=new e.spreadsheet.ContextMenu(n.find(i+o.rowHeaderContextMenu),a),this.drawingContextMenu=new e.spreadsheet.ContextMenu(n.find(i+o.drawingContextMenu),a)},enableClipboard:function(e){this.isClipboardDeactivated=!e,e?this.clipboard.attr("contenteditable",e):this.clipboard.removeAttr("contenteditable")},_resize:function(){var n=t(this.formulaBar.element).parents(".k-spreadsheet-action-bar"),i=e._outerHeight,r=this.tabstrip?i(this.tabstrip.element):0,o=n?i(n):0,a=this.sheetsbar?i(this.sheetsbar.element):0;this.wrapper.height(this.element.height()-(r+o+a)),this.tabstrip&&this.tabstrip.quickAccessAdjust()},_chrome:function(){var n=t("
                      ").prependTo(this.element),i=t("
                      ").appendTo(n);this.nameEditor=new e.spreadsheet.NameEditor(i,this.options);var r=t("
                      ").appendTo(n);this.formulaBar=new e.spreadsheet.FormulaBar(r),this.options.toolbar&&this._tabstrip()},_formulaInput:function(){var t=this.element.find(i+d.classNames.cellEditor);this.formulaInput=new e.spreadsheet.FormulaInput(t,{autoScale:!0})},_sheetsbar:function(){if(this.options.sheetsbar){var n=t.extend(!0,{openDialog:this.openDialog.bind(this)},this.options.sheetsbar);this.sheetsbar=new e.spreadsheet.SheetsBar(this.element.find(i+d.classNames.sheetsBar),n)}},_tabstrip:function(){var n=this.options.messages.tabs,i=t.extend(!0,{home:!0,insert:!0,data:!0},this.options.toolbar),r=[];for(var o in this.tabstrip&&(this.tabstrip.destroy(),this.element.children(".k-tabstrip").remove()),i)(!0===i[o]||i[o]instanceof Array)&&r.push({id:o,text:n[o],content:""});this.tabstrip=new e.spreadsheet.TabStrip(t("
                      ").prependTo(this.element),{animation:!1,dataTextField:"text",dataContentField:"content",dataSource:r,toolbarOptions:i,view:this}),this.tabstrip.select(0)},_executeCommand:function(e){this._sheet.trigger("commandRequest",e)},workbook:function(e){this._workbook=e,e._view=this,this.nameEditor._workbook=e},sheet:function(e){this._sheet=e},activeCellRectangle:function(){return this.cellRectangle(this._sheet._viewActiveCell())},_rectangle:function(e,t){return e._grid.boundingRectangle(t.toRangeRef())},isColumnResizer:function(e,t,n){return e-=this._sheet._grid._headerWidth,t._grid.columns.frozen||(e+=this.scroller.scrollLeft),null===(n=this._sheet._grid._columns.locate(0,n,(function(t){return Math.abs(e-t)<=3.5})))||this._sheet.isHiddenColumn(n)?null:n},isRowResizer:function(e,t,n){return e-=this._sheet._grid._headerHeight,t._grid.rows.frozen||(e+=this.scroller.scrollTop),null===(n=this._sheet._grid._rows.locate(0,n,(function(t){return Math.abs(e-t)<=3.5})))||this._sheet.isHiddenRow(n)?null:n},isFilterIcon:function(t,n,i,r){var o=this,a=i._grid,s=a.rows.frozen?0:o.scroller.scrollTop,l=a.columns.frozen?0:o.scroller.scrollLeft;return t-=o._sheet._grid._headerWidth-l,n-=o._sheet._grid._headerHeight-s,e.util.withExit((function(e){o._sheet.forEachFilterHeader(r,(function(r){var a=o._rectangle(i,r);i.filterIconRect(a).intersects(t,n)&&e(!0)}))}))},isAutoFill:function(e,t,n){var i=this._sheet.select();if(i.size>1)return!1;e-=this._sheet._grid._headerWidth,t-=this._sheet._grid._headerHeight,n._grid.columns.frozen||(e+=this.scroller.scrollLeft),n._grid.rows.frozen||(t+=this.scroller.scrollTop);var r=this._rectangle(n,i);return Math.abs(r.right-e)<8&&Math.abs(r.bottom-t)<8},isEditButton:function(e,t,n){if(this._sheet.activeCellCustomEditor()){var i=this.activeCellRectangle();if(t>=i.top&&t<=i.bottom)return n._editorInLastColumn?e=i.left-20:e>i.right&&e<=i.right+20}},drawingAt:function(e,t,n){e-=this._sheet._grid._headerWidth,t-=this._sheet._grid._headerHeight,n._grid.columns.frozen||(e+=this.scroller.scrollLeft),n._grid.rows.frozen||(t+=this.scroller.scrollTop);for(var i=this._sheet,r=this._sheet._drawings,o=r.length;--o>=0;){var a=r[o],s=i.drawingBoundingBox(a);if(s.intersects(e,t))return{drawing:a,drx:s.left-e,dry:s.top-t}}},objectAt:function(e,t,i){var r,o,a=this._sheet._grid;if(e<0||t<0||e>this.scroller.clientWidth||t>this.scroller.clientHeight)r={type:"outside"};else if(e0&&this.panes.push(this._pane(i,0,null,n)),i>0&&this.panes.push(this._pane(0,n,i,null)),i>0&&n>0&&this.panes.push(this._pane(0,0,i,n))}e.filter&&this._destroyFilterMenu(),e.activeCell&&(this._focus=t.activeCell().toRangeRef())},createFilterMenu:function(n){this._destroyFilterMenu();var i=this._sheet,r=i.filter().ref,o=new e.spreadsheet.Range(r,i),a=t("
                      ").appendTo(this.element),s={column:n,range:o},l=new e.spreadsheet.FilterMenu(a,s);return this._filterMenu=l,l},selectClipboardContents:function(){this.isClipboardDeactivated||(this.clipboard.focus(),function(e){var t=window.getSelection();t.removeAllRanges();var n=document.createRange();n.selectNodeContents(e),t.addRange(n)}(this.clipboard[0]))},scrollIntoView:function(e){var t=!1,n=this.containingPane(e)._grid,i=n.scrollBoundaries(e),r=this.scroller,o=n.rows.frozen?0:r.scrollTop,a=n.columns.frozen?0:r.scrollLeft;return i.topo&&(t=!0,r.scrollTop=i.scrollBottom),i.lefta&&(t=!0,r.scrollLeft=i.scrollRight),t},_destroyDialog:function(){this._dialogs.pop()},openCustomEditor:function(){var e=this,t=e._sheet.activeCell().first(),n=e._sheet.activeCellCustomEditor(),i=e._sheet.range(t);n.edit({range:i,rect:e.activeCellRectangle(),view:this,validation:this._sheet.validation(t),callback:function(t,n){e._executeCommand({command:"EditCommand",options:{operatingRange:i,editRange:i,property:n?"input":"value",value:t}})}})},openDialog:function(t,n){var i=this,r=this._sheet;return r.withCultureDecimals(function(){var o=e.spreadsheet.dialogs.create(t,n);if(o){o.bind("action",i._executeCommand.bind(i)),o.bind("deactivate",(function(){o.destroy(),i._destroyDialog()})),i._dialogs.push(o);var a=r.activeCell(),s=new e.spreadsheet.Range(a,r);return o.open(s),o}}.bind(this))},showError:function(n,i){var r=this._dialogs,o=this.options.messages.errors,a=!1;if(r.length>0&&r.forEach((function(e){e.options&&"Error"===e.options.title&&(a=!0)})),!a){var s=function(t){var n=t.sender.dialog().element;n.find(".k-button").first().trigger("focus"),n.find(".k-button, input").on("keydown",(function(n){n.keyCode==e.keys.ESC&&t.sender.close()}))},l=function(e){var t=e.sender;this.selectClipboardContents(),t._retry&&i&&i()}.bind(this);if(e.spreadsheet.dialogs.registered(n.type)){var c={close:l};"validationError"===n.type&&(c=t.extend(c,{title:n.title||"Error",text:n.body?n.body:o[n.type],activate:s})),this.openDialog(n.type,c)}else this.openDialog("message",{title:n.title||"Error",text:n.body?n.body:o[n.type],activate:s,close:l})}},destroy:function(){this._dialogs.forEach((function(e){e.destroy()})),this.cellContextMenu&&this.cellContextMenu.destroy(),this.rowHeaderContextMenu.destroy(),this.colHeaderContextMenu.destroy(),this.drawingContextMenu.destroy(),this.cellContextMenu=this.rowHeaderContextMenu=this.colHeaderContextMenu=this.drawingContextMenu=null,this.tabstrip&&(this.tabstrip.destroy(),this.tabstrip=null),this.nameEditor&&this.nameEditor.destroy(),this.formulaInput&&this.formulaInput.destroy(),this.formulaBar&&this.formulaBar.destroy(),this._destroyFilterMenu()},_destroyFilterMenu:function(){this._filterMenu&&(this._filterMenu.destroy(),this._filterMenu=void 0,this._filterMenuColumn=void 0)},render:function(n){if(this.element.is(":visible")){var i=this._sheet,o=i.focus(),a=e.support.scrollbar(),s=this.wrapper[0].clientWidth-a,l=this.wrapper[0].clientHeight-a;if(!o||!this.scrollIntoView(o)){var c=i.resizingInProgress()?i.resizeHandlePosition().col===-1/0?"column":"row":"none";this.wrapper.toggleClass(r.editContainer,this.editor.isActive()).toggleClass(r.horizontalResize,"row"==c).toggleClass(r.verticalResize,"column"==c);var u=i._grid,h=[],p={scroller:this.scroller,toplevelElements:h,contentWidth:s,contentHeight:l};this.panes.forEach((function(e){h.push(e.render(p))}));var f=e.dom.element("div",{style:{width:u._headerWidth+"px",height:u._headerHeight+"px"},className:d.classNames.topCorner});h.push(f),i.resizeHandlePosition()&&i.resizeHintPosition()&&h.push(this.renderResizeHint()),this.tree.render(h),t(this.container).css({width:s,height:l}),this.editor.isActive()?this.editor.toggleTooltip(this.activeCellRectangle()):n.resize||n.comment||i.selectionInProgress()||i.resizingInProgress()||i.draggingInProgress()||i.isInEditMode()||this.renderClipboardContents()}}},renderResizeHint:function(){var t,n=this._sheet,i=n.resizeHandlePosition().col!==-1/0;t=i?{height:this.scroller.clientHeight+"px",width:"7px",left:n.resizeHintPosition().x+"px",top:"0px"}:{height:"7px",width:this.scroller.clientWidth+"px",top:n.resizeHintPosition().y+"px",left:"0px"};var r=h.classNames;return e.dom.element("div",{className:r.resizeHint+(i?"":" "+r.resizeHintVertical),style:t},[e.dom.element("div",{className:r.resizeHintHandle}),e.dom.element("div",{className:r.resizeHintMarker})])},renderClipboardContents:function(){var t=this._sheet,i=t._grid,r=i.normalize(t.select().toRangeRef()),a=this._workbook.clipboard().canCopy();if(!1===a.canCopy&&a.multiSelection)return this.clipboardContents.render([]),void this.selectClipboardContents();r=t.trim(r);var s=new l,c=i.rangeDimensions(r);c.rows.forEach((function(e){s.addRow(e)})),c.columns.forEach((function(e){s.addColumn(e)}));var d=t._getMergedCells(r),u=d.primary,h=d.secondary;t.forEach(r,(function(t,i,a){var l=new n(t,i).print();if(!h[l]){var c=function(t,n,i){var r={};i.background&&(r.backgroundColor=i.background),i.color&&(r.color=i.color),i.fontFamily&&(r.fontFamily=i.fontFamily),i.underline&&(r.textDecoration="underline"),i.italic&&(r.fontStyle="italic"),i.textAlign&&(r.textAlign=i.textAlign),i.verticalAlign&&(r.verticalAlign="center"===i.verticalAlign?"middle":i.verticalAlign),i.bold&&(r.fontWeight="bold"),i.fontSize&&(r.fontSize=i.fontSize+"px"),!0===i.wrap&&(r.whiteSpace="pre-wrap"),i.borderRight?r.borderRight=o(i.borderRight):i.background&&(r.borderRightColor=i.background),i.borderBottom?r.borderBottom=o(i.borderBottom):i.background&&(r.borderBottomColor=i.background);var a=i.value,s=typeof a,l=i.format;l||"number"!=s||a==Math.floor(a)||(l="0.##############"),l&&null!=a&&(a=e.spreadsheet.formatting.format(a,l)).__dataType&&(s=a.__dataType);var c={style:r};if(!r.textAlign)switch(s){case"number":case"date":case"percent":case"currency":r.textAlign="right";break;case"boolean":r.textAlign="center"}/^(?:string|undefined)$/.test(s)||(c.sdval=i.value,c["data-sheets-value"]=JSON.stringify({1:3,3:i.value}),l&&(c.sdnum=l,c["data-sheets-numberformat"]=JSON.stringify({1:2,2:l,3:1}))),i.formula&&(c["data-sheets-formula"]="="+i.formula.print());var d=null;!1===i.enable&&(d="k-disabled");var u,h,p=t.addCell(n,a,c,d,i.validation);return i.borderLeft?(h=function(e,t){var n=e.trs[t].children;return n[n.length-2]}(t,n),u=o(i.borderLeft),h&&u&&(h.attr.style.borderRight=u)):i.background&&(r.borderLeftColor=i.background),i.borderTop?(h=function(e,t){var n=e.trs[t-1],i=e.trs[t].children.length-1;if(n&&i>=0)return n.children[i]}(t,n),u=o(i.borderTop),h&&u&&(h.attr.style.borderBottom=u)):i.background&&(r.borderTopColor=i.background),p}(s,t-r.topLeft.row,a),d=u[l];d&&(c.attr.colspan=d.width(),c.attr.rowspan=d.height())}})),e.support.browser.msie&&this.clipboard.empty(),this.clipboardContents.render([s.toDomTree(0,0,"kendo-clipboard-"+this._workbook.clipboard()._uid)]),this.selectClipboardContents()},_pane:function(e,t,n,i){var r=new h(this._sheet,this._sheet._grid.pane({row:e,column:t,rowCount:n,columnCount:i}));return r.refresh(this.scroller.clientWidth,this.scroller.clientHeight),r}}),u={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"]},h=e.Class.extend({init:function(e,t){this._sheet=e,this._grid=t},refresh:function(e,t){this._grid.refresh(e,t)},isVisible:function(e,t,n){return this._grid.view(e,t).ref.intersects(n)},render:function(t){var n=t.scroller,i=n.scrollLeft,r=n.scrollTop;r<0&&(r=0),i<0&&(i=0);var o=h.classNames,a=this._sheet,s=this._grid,l=s.view(i,r);this._currentView=l,this._currentRect=this._rectangle(l.ref),this._selectedHeaders=a.selectedHeaders();var c=[];if(c.push(this.renderData(t)),a._activeDrawing||c.push(this.renderSelection(n)),c.push(this.renderAutoFill()),c.push(this.renderEditorSelection()),c.push(this.renderFilterHeaders()),s.hasRowHeader){var d=e.dom.element("div",{className:o.rowHeader,style:{width:s.headerWidth+"px",top:l.rowOffset+"px"}});c.push(d),a.forEach(l.ref.leftColumn(),function(t){if(!a.isHiddenRow(t)){var n=t+1,i=a.rowHeight(t);d.children.push(e.dom.element("div",{className:this.headerClassName(t,"row"),style:{width:s.headerWidth+"px",height:i+"px"}},[e.dom.element("div",{className:"k-vertical-align-center"},[e.dom.text(n+"")])]))}}.bind(this))}if(s.hasColumnHeader){var u=e.dom.element("div",{className:o.columnHeader,style:{top:"0px",left:l.columnOffset+"px",width:this._currentRect.width+"px",height:s.headerHeight+"px"}});c.push(u);var p=0;a.forEach(l.ref.topRow(),function(t,n){if(!a.isHiddenColumn(n)){var i=e.spreadsheet.Ref.display(null,1/0,n),r=a.columnWidth(n);u.children.push(e.dom.element("div",{className:this.headerClassName(n,"col"),style:{position:"absolute",left:p+"px",width:r+"px",height:s.headerHeight+"px"}},[e.dom.element("div",{className:"k-vertical-align-center"},[e.dom.text(i+"")])])),p+=r}}.bind(this))}a.resizeHandlePosition()&&(s.hasColumnHeader||s.hasRowHeader)&&(a.resizeHintPosition()||this.renderResizeHandle(c));var f=[o.pane];return s.hasColumnHeader&&f.push(o.top),s.hasRowHeader&&f.push(o.left),e.dom.element("div",{style:s.style,className:f.join(" ")},c)},headerClassName:function(e,t){var n,i,r=this._selectedHeaders;"row"===t?(n=r.rows[e],i=r.allRows):(n=r.cols[e],i=r.allCols);var o=n||(r.all?"full":i?"partial":"none");return o&&(o="k-selection-"+o),o},renderData:function(t){var n,i=this._sheet,r=this._currentView,o=e.dom.element("div",{className:h.classNames.data,style:{position:"relative",left:r.columnOffset+"px",top:r.rowOffset+"px"}}),a=this._currentRect,l=e.spreadsheet.draw.doLayout(i,r.ref,{forScreen:!0}),c=this._grid,d=i._showGridLines;d&&(n=null,l.xCoords.forEach((function(t){t!==n&&(n=t,o.children.push(e.dom.element("div",{className:u.vaxis,style:{left:t+"px",height:a.height+"px",borderColor:i.gridLinesColor()}})))})),n=null,l.yCoords.forEach((function(t){t!==n&&(n=t,o.children.push(e.dom.element("div",{className:u.haxis,style:{top:t+"px",width:a.width+"px",borderColor:i.gridLinesColor()}})))})));var p=e.spreadsheet.draw.Borders(),f=i.activeCell().toRangeRef(),m=f.topLeft;return l.cells.forEach((function(n){var a=null,l=n.row+r.ref.topLeft.row,u=n.col+r.ref.topLeft.col;if(i._activeDrawing){var g=i._activeDrawing.topLeftCell;g&&g.row==l&&g.col==u&&(a="k-spreadsheet-drawing-anchor-cell")}else l==m.row&&u==m.col&&(a=[h.classNames.activeCell].concat(this._activeFormulaColor(),this._directionClasses(f)),i.singleCellSelection()&&a.push(h.classNames.single),a=a.join(" "));if(p.add(n),s(o.children,n,a,d),n.comment&&i._commentRef&&l==i._commentRef.row&&u==i._commentRef.col){var v=n.right+c.left+r.columnOffset+4,_={top:n.top+c.top+r.rowOffset+"px"};v+200>t.contentWidth?_.right=t.contentWidth-c.left-n.left-r.columnOffset+4+"px":_.left=v+"px";var b=e.dom.element("div",{className:"k-tooltip k-spreadsheet-cell-comment",style:_},[e.dom.text(n.comment)]);t.toplevelElements.push(b)}}),this),p.vert.forEach((function(t){t.forEach((function(t){if(!t.rendered){t.rendered=!0;var n={left:t.x+"px",top:t.top+"px",height:t.bottom-t.top+1+"px",borderWidth:t.size+"px",borderColor:t.color};1!=t.size&&(n.transform="translateX(-"+(t.size-1)/2+"px)"),o.children.push(e.dom.element("div",{className:u.vborder,style:n}))}}))})),p.horiz.forEach((function(t){t.forEach((function(t){if(!t.rendered){t.rendered=!0;var n={top:t.y+"px",left:t.left+"px",width:t.right-t.left+"px",borderWidth:t.size+"px",borderColor:t.color};1!=t.size&&(n.transform="translateY(-"+(t.size-1)/2+"px)"),o.children.push(e.dom.element("div",{className:u.hborder,style:n}))}}))})),this.renderDrawings(l,o.children),o},renderDrawings:function(t,n){var i=this._sheet,r=i._workbook;t.drawings.forEach((function(t){var o=t.drawing,a=t.box.toDiv("k-spreadsheet-drawing");o.image&&a.children.push(e.dom.element("div",{className:"k-spreadsheet-drawing-image",style:{backgroundImage:"url('"+r.imageUrl(o.image)+"')",opacity:o.opacity}})),o===i._activeDrawing&&(a.attr.className+=" k-spreadsheet-active-drawing",function(t){["N","NE","E","SE","S","SW","W","NW"].forEach((function(n){t.push(e.dom.element("div",{className:"k-spreadsheet-drawing-handle "+n,"data-direction":n}))}))}(a.children)),n.push(a)}))},renderResizeHandle:function(t){var n,i=this._sheet.resizeHandlePosition(),o=this._rectangle(i),a=[h.classNames.resizeHandle];if(i.col!==-1/0){if(this._grid.rows._start>0)return;n={height:this._grid.headerHeight+"px",width:"7px",left:o.right-3.5+"px",top:"0px"},a.push(r.horizontalResize)}else{if(this._grid.columns._start>0)return;n={height:"7px",width:this._grid.headerWidth+"px",top:o.bottom-3.5+"px",left:"0px"},a.push(r.verticalResize)}t.push(e.dom.element("div",{className:a.join(" "),style:n}))},filterIconRect:function(t){return new e.spreadsheet.Rectangle(t.right-16-3,t.top+3,16,16)},renderFilterHeaders:function(){var n=this._sheet,i=[],r=d.classNames,o=n.filter();return o&&this._addDiv(i,o.ref,r.filterRange),n.forEachFilterHeader(this._currentView.ref,function(n){var a=this._rectangle(n),s=this.filterIconRect(a),l=this._sheet.filterColumn(n),c=function(n,i,r){var a,s={left:i.left+"px",top:i.top+"px"},l=o&&o.columns.some((function(e){return e.index===r})),c=n.filterButton;return l&&(c+=" "+n.filterButtonSelected),e.dom.element("span",{className:c,style:s},[(a=n.iconFilterDefault,e.dom.element(t(e.ui.icon(a))[0]))])}(r,s,l);i.push(c)}.bind(this)),e.dom.element("div",{className:r.filterHeadersWrapper},i)},renderEditorSelection:function(){var t=h.classNames,n=this._sheet,i=[];return n._formulaSelections.forEach(function(n){var r=n.ref;r!==e.spreadsheet.NULLREF&&this._addDiv(i,r,t.selectionHighlight+" "+n.colorClass)}.bind(this)),e.dom.element("div",{className:t.selectionWrapper},i)},renderSelection:function(t){var n=h.classNames,i=[],r=[n.selection],o=this._sheet,a=o.activeCell().toRangeRef(),s=o.select();return r=r.concat(this._activeFormulaColor()),1===s.size()&&r.push("k-single-selection"),this._sheet.autoFillPunch()&&r.push("k-dim-auto-fill-handle"),s.forEach(function(t){t!==e.spreadsheet.NULLREF&&this._addDiv(i,t,r.join(" "))}.bind(this)),this._renderCustomEditorButton(i,a,t),e.dom.element("div",{className:n.selectionWrapper},i)},renderAutoFill:function(){var t=[];if(this._sheet.autoFillInProgress()){var i=this._sheet.autoFillRef(),r=this._sheet.autoFillPunch(),o=this._sheet._autoFillDirection;if(this._addDiv(t,i,"k-auto-fill"),r)this._addDiv(t,r,"k-auto-fill-punch");else if(void 0!==o){var a,s;switch(o){case 0:case 1:a=i.bottomRight,s="k-auto-fill-br-hint";break;case 2:a=new n(i.topLeft.row,i.bottomRight.col),s="k-auto-fill-tr-hint";break;case 3:a=new n(i.bottomRight.row,i.topLeft.col),s="k-auto-fill-bl-hint"}var l=this._addDiv(t,a,s);if(l){var c=e.dom.element("span",{className:"k-tooltip"},[e.dom.text(this._sheet._autoFillHint)]);l.children.push(c)}}}return e.dom.element("div",{className:h.classNames.autoFillWrapper},t)},_addDiv:function(e,t,n){var i;return this._currentView.ref.intersects(t)&&(i=this._rectangle(t).resize(1,1).toDiv(n),e.push(i)),i},_renderCustomEditorButton:function(n,i,r){var o=this,a=o._sheet,s=o._currentView,l=o._grid.columns._axis._count,c=a.activeCellCustomEditor();if(c&&s.ref.intersects(i)){var d=o._rectangle(i);a.forEach(i.collapse(),(function(i,a,s){s.left=d.left,s.top=d.top,s.width=d.width,s.height=d.height;var u="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-spreadsheet-editor-button",h=a==l-1||o._buttonOutOfVisiblePane(i,a,r);h&&(u+=" k-spreadsheet-last-column"),o._editorInLastColumn=h;var p=e.dom.element("div",{className:u,style:{left:s.left+(h?0:s.width)+"px",top:s.top+"px",height:s.height+"px"}});c.icon&&p.children.push(e.dom.element(t(e.ui.icon(c.icon.replace(/^k-i-/,"")))[0])),n.push(p)}))}},_activeFormulaColor:function(){var e,t=[];return this._sheet.isInEditMode()&&(e=this._sheet._formulaSelections.filter((function(e){return e.active&&"ref"==e.type}))[0])&&t.push(e.colorClass),t},_directionClasses:function(e){var t=[],n=h.classNames,i=this._currentView.ref;return e.move(0,-1).intersects(i)||t.push(n.left),e.move(-1,0).intersects(i)||t.push(n.top),e.move(0,1).intersects(i)||t.push(n.right),e.move(1,0).intersects(i)||t.push(n.bottom),t},_rectangle:function(e){return this._grid.boundingRectangle(e.toRangeRef()).offset(-this._currentView.mergedCellLeft,-this._currentView.mergedCellTop)},_buttonOutOfVisiblePane:function(e,t,n){var i=this._grid,r=this._sheet,o=r.range(e,t)._ref,a=i.scrollBoundaries(o),s=i.columns.frozen?0:n.scrollLeft;if(a.right+20>s||t+1===r.frozenColumns())return!0}});e.spreadsheet.View=d,e.spreadsheet.Pane=h,e.spreadsheet.drawCell=s,t.extend(!0,d,{classNames:r}),t.extend(!0,h,{classNames:u})}(window.kendo),function(e){"use strict";var t=e.jQuery,n={},i=e.spreadsheet.registerEditor=function(e,t){n[e]=t};e.spreadsheet.Sheet.prototype.activeCellCustomEditor=function(){var e=this.activeCell().first();if(this.range(e).enable()){var t,i=this.validation(e),r=this._properties.get("editor",this._grid.cellRefIndex(e));return null!=r?t=n[r]:i&&i.showButton&&(r="_validation_"+i.dataType,t=n[r]),"function"==typeof t&&(t=n[r]=t()),t}},i("_validation_date",(function(){var n,i,r;function o(){i||(i=t("
                      ").kendoCalendar(),r=t("
                      ").kendoPopup(),i.appendTo(r),i=i.getKendoCalendar(),r=r.getKendoPopup(),i.bind("change",(function(){r.close();var t=i.value();n.range.format()||n.range.format("yyyy-mm-dd"),n.callback(e.spreadsheet.dateToNumber(t))}))),r.setOptions({anchor:n.view.element.find(".k-spreadsheet-editor-button")});var o=n.range.value(),s=n.range.sheet();null!=o?i.value(e.spreadsheet.numberToDate(o)):i.value(null);var l=n.validation;if(l){var c=e.ui.Calendar.fn.options.min,d=e.ui.Calendar.fn.options.max,u=l.from,h=l.to,p=e.spreadsheet.calc.runtime.Formula;/^(?:greaterThan|between)/.test(l.comparerType)&&(c=u instanceof p&&a(u.value)?e.spreadsheet.numberToDate(s.range(u.value.row,u.value.col).value()):e.spreadsheet.numberToDate(u.value)),"between"==l.comparerType&&(d=h instanceof p&&a(h.value)?e.spreadsheet.numberToDate(s.range(h.value.row,h.value.col).value()):e.spreadsheet.numberToDate(l.to.value)),"lessThan"!=l.comparerType&&"lessThanOrEqualTo"!=l.comparerType||(d=u instanceof p&&a(u.value)?e.spreadsheet.numberToDate(s.range(u.value.row,u.value.col).value()):e.spreadsheet.numberToDate(l.from.value)),i.setOptions({disableDates:function(t){var n,i;return n=u&&u instanceof p&&a(u.value)?s.range(u.value.row,u.value.col).value():u?0|u.value:0,i=h&&h instanceof p&&a(h.value)?s.range(h.value.row,h.value.col).value():h?0|h.value:0,t=0|e.spreadsheet.dateToNumber(t),!e.spreadsheet.validation.validationComparers[l.comparerType](t,n,i)},min:c,max:d})}else i.setOptions({disableDates:null,min:null,max:null});r.open()}function a(e){return e&&null!==e.row&&null!==e.col&&e.row>-1&&e.col>-1}return{edit:function(e){n=e,o()},icon:"calendar"}})),i("_validation_list",(function(){var n,i,r;function o(){i||(i=t("
                        ").kendoStaticList({template:"#:value#",selectable:!0,autoBind:!1}),r=t("
                        ").kendoPopup(),i.appendTo(r),r=r.getKendoPopup(),(i=i.getKendoStaticList()).bind("change",(function(){r.close();var e=i.value()[0];e&&n.callback(e.value)}))),r.setOptions({anchor:n.view.element.find(".k-spreadsheet-editor-button")});var o=n.validation.from.value,a=[],s=function(e){a.push({value:e})};o instanceof e.spreadsheet.calc.runtime.Matrix?o.each(s):(o+"").split(/\s*,\s*/).forEach(s);var l=new e.data.DataSource({data:a});i.setDataSource(l),l.read(),r.open()}return{edit:function(e){n=e,o()},icon:"caret-alt-down"}}))}(window.kendo),function(e){var t=e.spreadsheet.CellRef,n=e.spreadsheet.RangeRef,i=e.spreadsheet.UnionRef,r=e.Class.extend({init:function(e,t,n,i){this.left=e,this.top=t,this.width=n,this.height=i,this.right=this.left+this.width,this.bottom=this.top+this.height},offset:function(e,t){return new r(this.left+e,this.top+t,this.width,this.height)},resize:function(e,t){return new r(this.left,this.top,this.width+e,this.height+t)},intersects:function(e,t){return e instanceof r?this.intersectsRect(e):this.left>0)},rowRef:function(e){return new n(new t(e,0),new t(e,this.columnCount-1))},colRef:function(e){return new n(new t(0,e),new t(this.rowCount-1,e))},cellRefIndex:function(e){return this.index(e.row,e.col)},normalize:function(e){return e instanceof n?new n(this.normalize(e.topLeft),this.normalize(e.bottomRight)).setSheet(e.sheet,e.hasSheet()):e instanceof i?e.map((function(e){return this.normalize(e)}),this):(e instanceof t&&((e=e.clone()).col=Math.max(0,Math.min(this.columnCount-1,e.col)),e.row=Math.max(0,Math.min(this.rowCount-1,e.row))),e)},rectangle:function(e){var t=this.normalize(e.topLeft),n=this.normalize(e.bottomRight);return new r(this.width(0,t.col-1),this.height(0,t.row-1),this.width(t.col,n.col),this.height(t.row,n.row))},pane:function(t){return new a(new e.spreadsheet.PaneAxis(this._rows,t.row,t.rowCount,this._headerHeight),new e.spreadsheet.PaneAxis(this._columns,t.column,t.columnCount,this._headerWidth),this)},rangeDimensions:function(e){return{rows:this._rows.values.iterator(e.topLeft.row,e.bottomRight.row),columns:this._columns.values.iterator(e.topLeft.col,e.bottomRight.col)}},forEach:function(e,n){for(var i=this.normalize(e.topLeft),r=this.normalize(e.bottomRight),o=i.col;o<=r.col;o++)for(var a=i.row;a<=r.row;a++)n(new t(a,o))},trim:function(e,i){for(var r=this.normalize(e.topLeft),o=this.normalize(e.bottomRight),a=r.row,s=r.col,l=r.col;l<=o.col;l++){var c=this.index(r.row,l),d=this.index(o.row,l),u=i.tree.intersecting(c,d);if(u.length){var h=this.cellRef(u[u.length-1].end);a=Math.max(a,h.row),s=l}}return new n(e.topLeft,new t(Math.min(a,e.bottomRight.row),s))}}),a=e.Class.extend({init:function(e,t,n){this.rows=e,this.columns=t,this._grid=n,this.headerHeight=e.headerSize,this.headerWidth=t.headerSize,this.hasRowHeader=t.hasHeader,this.hasColumnHeader=e.hasHeader},refresh:function(e,t){this.columns.viewSize(e),this.rows.viewSize(t);var n=this.columns.paneSegment(),i=this.rows.paneSegment();this.left=n.offset,this.top=i.offset,this.right=n.offset+n.length,this.bottom=i.offset+i.length,this.style={top:i.offset+"px",left:n.offset+"px",height:i.length+"px",width:n.length+"px"}},view:function(e,i){var r=this.rows.visible(i),o=this.columns.visible(e);return{rows:r,columns:o,rowOffset:r.offset,columnOffset:o.offset,mergedCellLeft:o.start,mergedCellTop:r.start,ref:new n(new t(r.values.start,o.values.start),new t(r.values.end,o.values.end))}},contains:function(e){return this.rows.contains(e.topLeft.row,e.bottomRight.row)&&this.columns.contains(e.topLeft.col,e.bottomRight.col)},index:function(e,t){return this._grid.index(e,t)},boundingRectangle:function(e){return this._grid.rectangle(e)},cellRefIndex:function(e){return this._grid.cellRefIndex(e)},scrollBoundaries:function(e){var t=this.boundingRectangle(e),n={top:Math.max(0,t.top-this.top+(this.hasColumnHeader?0:this.headerHeight)),left:Math.max(0,t.left-this.left+(this.hasRowHeader?0:this.headerWidth)),right:t.right-this.columns._viewSize+this.headerWidth,bottom:t.bottom-this.rows._viewSize+this.headerHeight},i=this.columns.defaultValue/2,r=this.rows.defaultValue/2;return n.scrollTop=n.top-r,n.scrollBottom=n.bottom+r,n.scrollLeft=n.left-i,n.scrollRight=n.right+i,n}});e.spreadsheet.Grid=o,e.spreadsheet.PaneGrid=a,e.spreadsheet.Rectangle=r}(kendo),function(e){var t=e.Class.extend({init:function(t,n){this._value=n,this._count=t,this.values=new e.spreadsheet.RangeList(0,t-1,n),this._hidden=new e.spreadsheet.RangeList(0,t-1,0),this.scrollBarSize=e.support.scrollbar(),this._refresh()},_resize:function(e){e>this._count?(this.values.value(this._count,e-1,this._value),this._hidden.value(this._count,e-1,0)):e1},nextVisible:function(e){for(var t=this._count-1,n=e;++n<=t;)if(!this.hidden(n))return n;return e},nextUntil:function(e,t){for(var n=this._count-1,i=e,r=!1;++i<=n;){var o=t(i,r,this.hidden(i));if("number"==typeof o)return o;if(o)break;r=!0}return i-1},nextPage:function(e,t){return this.index(this.sum(0,e-1)+t)},prevPage:function(e,t){return this.index(this.sum(0,e)-t)},firstVisible:function(){var e=this._hidden.first();return 0===e.value?0:e.end+1},lastVisible:function(){var e=this._hidden.last();return 0===e.value?this._count-1:e.start-1},prevVisible:function(e){for(var t=e;--t>=0;)if(!this.hidden(t))return t;return e},prevUntil:function(e,t){for(var n=e,i=!1;--n>=0;){var r=t(n,i,this.hidden(n));if("number"==typeof r)return r;if(r)break;i=!0}return n+1},unhide:function(e){if(this.hidden(e)){var t=this._hidden.value(e,e);this._hidden.value(e,e,0),this.value(e,e,t)}},value:function(e,t,n){if(void 0===n)return this.values.iterator(e,t).at(0);this.values.value(e,t,n),this._refresh()},sum:function(e,t){for(var n=this.values.iterator(e,t),i=0,r=e;r<=t;r++)i+=n.at(r);return i},locate:function(e,t,n){for(var i=this.values.iterator(e,t),r=0,o=e;o<=t;o++){if(n(r+=i.at(o)))return o}return null},visible:function(e,t){var n,i,r=!1;t>=this.total+this.scrollBarSize&&(r=!0);var o=this._pixelValues.intersecting(e,t);if(n=o[0],i=o[o.length-1],!n)return{values:this.values.iterator(0,0),offset:0};var a=e-n.start,s=(a/n.value.value>>0)+n.value.start,l=a-(s-n.value.start)*n.value.value,c=t-i.start,d=(c/i.value.value>>0)+i.value.start;return d>i.value.end&&(d=i.value.end),r&&(l+=i.value.value-(c-(d-i.value.start)*i.value.value)),l=Math.min(-l,0),{values:this.values.iterator(s,d),offset:l}},index:function(e){for(var t=0,n=this.values.iterator(0,this._count-1),i=n.at(0);ie.count?(this._count=e.count,this._resize(t)):this._refresh()}}),n=e.Class.extend({init:function(e,t,n,i){this._axis=e,this._start=t,this._count=n,this.hasHeader=0===t,this.headerSize=i,this.defaultValue=e._value,this.frozen=n>0},viewSize:function(e){this._viewSize=e},sum:function(e,t){return this._axis.sum(e,t-1)},start:function(){return this.sum(0,this._start)},size:function(){return this.sum(this._start,this._start+this._count)},index:function(e,t){return this._axis.index(e+(this.frozen?0:t)-this.headerSize)},indexVisible:function(e,t){return this._axis.indexVisible(e+(this.frozen?0:t)-this.headerSize)},paneSegment:function(){var e,t=this.start();return this.hasHeader||(t+=this.headerSize),this.frozen?(e=this.size(),this.hasHeader?e+=this.headerSize:e-=this.headerSize):e=this._viewSize-t,{offset:t,length:e}},visible:function(e){var t,n=this.start();this.frozen?(t=this.size(),this.hasHeader||(t-=this.headerSize)):(t=this._viewSize-n-this.headerSize,n+=e);var i=this._axis.visible(n,n+t-1);return this.frozen&&(i.offset=0),i.start=n,this.hasHeader&&(i.offset+=this.headerSize,i.start-=this.headerSize),i},contains:function(e,t){return this.frozen?!(e>this._start+this._count)&&!(t=this._start}});e.spreadsheet.Axis=t,e.spreadsheet.PaneAxis=n}(kendo),function(e){var t=e.spreadsheet.Filter=e.Class.extend({prepare:function(){},value:function(e){return e.value},matches:function(){throw new Error("The 'matches' method is not implemented.")},toJSON:function(){throw new Error("The 'toJSON' method is not implemented.")}});function n(e){var t=e.getMonth()+1;return t>=1&&t<=3?1:t>=4&&t<=6?2:t>=7&&t<=9?3:4}function i(t,n){if(t instanceof Date){var i=e.date.today();return i.setFullYear(i.getFullYear()+n),i.getFullYear()===t.getFullYear()}return!1}function r(t,n){if(t instanceof Date){var i=e.date.firstDayOfMonth(e.date.today());return i.setMonth(i.getMonth()+n,1),i.getTime()===e.date.firstDayOfMonth(t).getTime()}return!1}function o(t,n){if(n instanceof Date){var i=e.date.dayOfWeek(e.date.getDate(t),1),r=e.date.dayOfWeek(e.date.getDate(n),1);return i.getTime()===r.getTime()}return!1}t.create=function(t){var n=t.filter;if(!n)throw new Error("Filter type not specified.");var i=e.spreadsheet[n.charAt(0).toUpperCase()+n.substring(1)+"Filter"];if(!i)throw new Error("Filter type not recognized.");return new i(t)},e.spreadsheet.ValueFilter=t.extend({_values:[],_dates:[],_blanks:!1,init:function(e){void 0!==e.values&&(this._values=e.values),void 0!==e.blanks&&(this._blanks=e.blanks),void 0!==e.dates&&(this._dates=e.dates)},value:function(t){var n=t.value;this._dates.length>0&&t.format&&"number"==typeof n&&("date"===e.spreadsheet.formatting.type(n,t.format)&&(n=e.spreadsheet.numberToDate(n)));return n},matches:function(e){return null==e?this._blanks:e instanceof Date?this._dates.some((function(t){return!(t.year!==e.getFullYear()||void 0!==t.month&&t.month!==e.getMonth()||void 0!==t.day&&t.day!==e.getDate()||void 0!==t.hours&&t.hours!==e.getHours()||void 0!==t.minutes&&t.minutes!==e.getMinutes()||void 0!==t.seconds&&t.seconds!==e.getSeconds())})):this._values.indexOf(e)>=0},toJSON:function(){return{filter:"value",blanks:this._blanks,values:this._values.slice(0)}}}),e.spreadsheet.CustomFilter=t.extend({_logic:"and",init:function(t){if(void 0!==t.logic&&(this._logic=t.logic),void 0===t.criteria)throw new Error("Must specify criteria.");this._criteria=t.criteria;var n=e.data.Query.filterExpr({logic:this._logic,filters:this._criteria,accentFoldingFiltering:e.culture().name}).expression;this._matches=new Function("d","return "+n)},matches:function(e){return null!==e&&this._matches(e)},value:function(t){var n=t.value,i=this._criteria[0].value,r=i instanceof Date?"date":typeof i,o=typeof n;return t.format&&(o=e.spreadsheet.formatting.type(n,t.format)),o!=r?"string"==r&&(t.format&&(n=e.spreadsheet.formatting.text(n,t.format)),n+=""):"date"==o&&(n=e.spreadsheet.numberToDate(n)),n},toJSON:function(){return{filter:"custom",logic:this._logic,criteria:this._criteria}}}),e.spreadsheet.TopFilter=t.extend({init:function(e){this._type=e.type,this._value=e.value,this._values=[]},prepare:function(e){var t=e.map(this.value).sort().filter((function(e,t,n){return 0===t||e!==n[t-1]}));"topNumber"===this._type||"topPercent"==this._type?t.sort((function(e,t){return t-e})):t.sort((function(e,t){return e-t}));var n=this._value;"topPercent"!==this._type&&"bottomPercent"!==this._type||(n=t.length*n/100>>0),this._values=t.slice(0,n)},matches:function(e){return this._values.indexOf(e)>=0},toJSON:function(){return{filter:"top",type:this._type,value:this._value}}}),e.spreadsheet.DynamicFilter=t.extend({init:function(e){if(this._type=e.type,this._predicate=this[e.type],"function"!=typeof this._predicate)throw new Error("DynamicFilter type '"+e.type+"' not recognized.")},value:function(t){var n=t.value;t.format&&("date"===e.spreadsheet.formatting.type(n,t.format)&&(n=e.spreadsheet.numberToDate(n)));return n},prepare:function(e){for(var t=0,n=0,i=0;i0?t/n:0},matches:function(e){return this._predicate(e)},aboveAverage:function(t){return t instanceof Date&&(t=e.spreadsheet.dateToNumber(t)),"number"==typeof t&&t>this._average},belowAverage:function(t){return t instanceof Date&&(t=e.spreadsheet.dateToNumber(t)),"number"==typeof t&&t=|<>|<|>|=)(-?[0-9.]+)\]/;function To(e){e=ko.InputStream(e);for(var t,n=[],i=!1;!e.eof();){var r=c();n.push(r),r.cond&&(i=!0)}return i||(1==n.length?n[0].cond="num":2==n.length?(n[0].cond={op:">=",value:0},n[1].cond={op:"<",value:0}):n.length>=3&&(n[0].cond={op:">",value:0},n[1].cond={op:"<",value:0},n[2].cond={op:"=",value:0},n.length>3&&(n[3].cond="text",n=n.slice(0,4)))),n;function o(){var t=e.skip(Co);if(t)return t[1].toLowerCase()}function a(){for(var t,n=[],i=null;!e.eof()&&(t=l());)"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),n.push(t);return n}function s(t){if("date"!=t.type||"m"==t.part&&t.format<3){var n=e.skip(/^\.(0+)/);n&&(t.fraction=n[1].length,"date"==t.type&&(t.type="time"))}return t}function l(){var n,i;if(i=e.skip(/^([#0?]+)(?:,([#0?]+))+/))return{type:"digit",sep:!0,format:i[1]+i[2],decimal:t};if(i=e.skip(/^[#0?]+/))return{type:"digit",sep:!1,format:i[0],decimal:t};if(i=e.skip(/^(e)([+-])/i))return{type:"exp",ch:i[1],sign:i[2]};if(i=e.skip(/^(d{1,4}|m{1,5}|yyyy|yy)/i))return s({type:"date",part:(i=i[1].toLowerCase()).charAt(0),format:i.length});if(i=e.skip(/^(hh?|ss?)/i))return s({type:"time",part:(i=i[1].toLowerCase()).charAt(0),format:i.length});if(i=e.skip(/^\[(hh?|mm?|ss?)\]/i))return s({type:"eltime",part:(i=i[1].toLowerCase()).charAt(0),format:i.length});if(i=e.skip(/^(a[.]?m[.]?\/p[.]?m[.]?|a\/p)/i))return{type:"ampm",am:(i=i[1].split("/"))[0],pm:i[1]};switch(n=e.next()){case";":return null;case"\\":return{type:"str",value:e.next()};case'"':return{type:"str",value:e.readEscaped(n)};case"@":return{type:"text"};case"_":return{type:"space",value:e.next()};case"*":return{type:"fill",value:e.next()};case".":return e.lookingAt(/^\s*[#0?]/)?(t=!0,{type:"dec"}):{type:"str",value:"."};case"%":return{type:"percent"};case",":return{type:"comma"}}return{type:"str",value:n}}function c(){t=!1;var n=o(),i=function(){var t=e.skip(So);if(t){var n=parseFloat(t[2]);if(!isNaN(n))return{op:t[1],value:n,custom:!0}}}();return!n&&i&&(n=o()),{color:n,cond:i,body:a()}}}function Do(e){var t,n,i=(t=e.body,n=0,{next:function(){return t[n++]},eof:function(){return n>=t.length},ahead:function(e,i){if(n+e<=t.length){var r=i.apply(null,t.slice(n,n+e));return r&&(n+=e),r}},restart:function(){n=0}}),r=!1,o=!1,a=!1,s=0,l=/[\$\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BD\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6]/,c=0,d="var intPart, decPart, isNegative, date, time; ",u=!1,h=0,p=[],f=[],m=e.cond,g="";if("text"==m)g="if (typeof value == 'string' || value instanceof kendo.spreadsheet.CalcError) { ";else if("num"==m)g="if (typeof value == 'number') { ";else if(m){g="if (typeof value == 'number' && value "+("="==m.op?"==":m.op)+" "+m.value+") { ",m.custom||(d+="value = Math.abs(value); ")}function v(e,t){("digit"==e.type&&"comma"==t.type||"comma"==e.type&&e.hidden&&"comma"==t.type)&&(t.hidden=!0,c++)}for(e.color&&(d+="result.color = "+JSON.stringify(e.color)+"; ");!i.eof();){i.ahead(2,v),"percent"==(_=i.next()).type?s++:"digit"==_.type?_.decimal?(h+=_.format.length,f.push(_.format)):(p.push(_.format),_.sep&&(u=!0)):"time"==_.type?o=!0:"date"==_.type?r=!0:"ampm"==_.type&&(a=o=!0)}for(s>0&&(d+="value *= "+Math.pow(100,s)+"; "),c>0&&(d+="value /= "+Math.pow(1e3,c)+"; "),p.length&&(d+="intPart = runtime.formatInt(culture, value, "+JSON.stringify(p)+", "+h+", "+u+"); ",d+="isNegative = parseInt(intPart[0]) < 0;"),f.length&&(d+="decPart = runtime.formatDec(value, "+JSON.stringify(f)+", "+h+"); "),(p.length||f.length)&&(d+="type = 'number'; "),r&&(d+="date = runtime.unpackDate(value); "),o&&(d+="time = runtime.unpackTime(value); "),(r||o)&&(d+="type = 'date'; "),(s>0||c>0||p.length||f.length||r||o)&&(g||(g="if (typeof value == 'number') { ")),i.restart(),d+="var matchedCurrency = false;";!i.eof();){var _;"dec"==(_=i.next()).type?d+="output += culture.numberFormat['.']; ":"comma"!=_.type||_.hidden?"percent"==_.type?(d+="type = 'percent'; ",d+="output += culture.numberFormat.percent.symbol; "):"str"==_.type?(l.test(_.value)&&(d+="type = 'currency'; ",d+="if (isNegative) { output += '-'; matchedCurrency = true; }"),d+="output += "+JSON.stringify(_.value)+"; "):"text"==_.type?(d+="type = 'text'; ",d+="output += value; "):"space"==_.type?(d+="if (output) result.body.push(output); ",d+="output = ''; ",d+="result.body.push({ type: 'space', value: "+JSON.stringify(_.value)+" }); "):"fill"==_.type?d+="output += runtime.fill("+JSON.stringify(_.value)+"); ":"digit"==_.type?(d+="if (isNegative && intPart[0] && matchedCurrency) {intPart[0] = intPart[0].replace('-', '');}",d+="output += "+(_.decimal?"decPart":"intPart")+".shift(); "):"date"==_.type?d+="output += runtime.date(culture, date, "+JSON.stringify(_.part)+", "+_.format+"); ":"time"==_.type?d+="output += runtime.time(time, "+JSON.stringify(_.part)+", "+_.format+", "+a+", "+_.fraction+"); ":"eltime"==_.type?d+="output += runtime.eltime(value, "+JSON.stringify(_.part)+", "+_.format+", "+_.fraction+"); ":"ampm"==_.type&&(d+="output += time.hours < 12 ? "+JSON.stringify(_.am)+" : "+JSON.stringify(_.pm)+"; "):d+="output += ','; "}return d+="if (output) result.body.push(output); ",d+="result.type = type; ",d+="return result; ",g&&(d=g+d+"}"),d}var Io=Do({cond:"text",body:[{type:"text"}]}),zo=yo.memoize((function(e){var t=To(e).map(Do);return t.push(Io),t="'use strict'; return function(value, culture){ if (!culture) culture = kendo.culture(); var output = '', type = null, result = { body: [] }; "+(t=t.join("\n"))+"; return result; };",new Function("runtime",t)(Eo)})),Mo=yo.memoize((function(e){for(var t,n=To(e),i=!1,r=!1,o=0;o0&&"0"!=o[n.length-1]&&("0"===t?t="":"-0"===t&&(t="-"));var a,s=!1,l=t.length-1,c=[],d=0;function u(t,n){r&&d&&d%3==0&&/^[0-9]$/.test(t)&&(a=e.numberFormat[","]+a),n&&"-"===t&&(s=!0,t="0"),a=t+a,d++}for(var h=n.length;--h>=0;){var p=n[h];a="";for(var f=p.length;--f>=0;){var m=p.charAt(f);l<0?"0"==m?u("0"):"?"==m&&u(" "):("0"==t&&"?"==m?u(" "):"0"==m?u(t.charAt(l),!0):u(t.charAt(l)),l--)}if(0===h)for(;l>=0;)u(t.charAt(l--));c.unshift(a)}return s&&(c[0]="-"+c[0]),c},formatDec:function(e,t,n){var i=(e=Eo.toFixed(e,n)).indexOf(".");e=i>=0?e.substr(i+1).replace(/0+$/,""):"";for(var r=0,o=[],a=0;a=0?(t+=(n=function(e,t,n){e+="";for(;e.length=0;){var a=i[o];if("digit"==a.type){if(a.decimal){if(r=!0,t>0)a.format+=Ao("",t,"0");else if(t<0){var s=a.format.length;a.format=a.format.substr(0,s+t),t+=s-a.format.length}if(0===a.format.length)for(i.splice(o,1);--o>=0;){if("digit"==(a=i[o]).type&&a.decimal){++o;break}if("dec"==a.type){i.splice(o,1);break}}}if(t>0)break}}!r&&t>0&&i.splice(o+1,0,{type:"dec"},{type:"digit",sep:!1,decimal:!0,format:Ao("",t,"0")})}})),function(e){return e.map((function(e){var t="";return e.color&&(t+="["+e.color+"]"),e.cond&&"text"!=e.cond&&"num"!=e.cond&&(t+="["+e.cond.op+e.cond.value+"]"),t+e.body.map(n).join("")})).join(";");function t(e,t){return t.fraction&&(e+="."+Ao("",t.fraction,"0")),e}function n(e){return"digit"==e.type?e.sep?e.format.charAt(0)+","+e.format.substr(1):e.format:"exp"==e.type?e.ch+e.sign:"date"==e.type||"time"==e.type?t(Ao("",e.format,e.part),e):"eltime"==e.type?t("["+Ao("",e.format,e.part)+"]",e):"ampm"==e.type?e.am+"/"+e.pm:"str"==e.type?JSON.stringify(e.value):"text"==e.type?"@":"space"==e.type?"_"+e.value:"fill"==e.type?"*"+e.value:"dec"==e.type?".":"percent"==e.type?"%":"comma"==e.type?",":void 0}}(i)},makeDateFormat:Mo};var Ro=kendo.util,Fo=kendo.spreadsheet,Po=Fo.calc,Bo=Po.runtime,Lo=Bo.defineFunction,Vo=Bo.defineAlias,Oo=Bo.CalcError,No=Fo.RangeRef,Wo=Fo.CellRef,Uo=Fo.UnionRef,jo=Bo.Matrix,qo=Fo.Ref,Go=Fo.NameRef,Ko=Bo.daysInMonth,Yo=Bo.packDate,$o=Bo.unpackDate,Qo=Bo.daysInYear,Xo=Bo.limitPrecision;function Zo(e,t,n){var i=$o(e),r=$o(t);return n?(31==i.date&&(i.date=30),31==r.date&&(r.date=30)):(1==i.month&&1==r.month&&i.date==Ko(i.year,1)&&r.date==Ko(r.year,1)&&(r.date=30),i.date==Ko(i.year,i.month)?(i.date=30,31==r.date&&(r.date=30)):30==i.date&&31==r.date&&(r.date=30)),360*(r.year-i.year)+30*(r.month-i.month)+(r.date-i.date)}Bo._days_360=Zo,Bo.deferInit((function(){function e(e){return(Math.exp(e)+Math.exp(-e))/2}function t(e){return(Math.exp(e)-Math.exp(-e))/2}function n(n){return t(n)/e(n)}function i(e,t){for(;t;){var n=e%t;e=t,t=n}return e}function r(e,t){return Math.abs(e*t)/i(e,t)}function o(e,t){for(var n=[],i=0,r=e[0];i= 1"]]]),Lo("sinh",t).args([["*num","number"]]),Lo("asinh",(function(e){return Math.log(e+Math.sqrt(e*e+1))})).args([["*num","number"]]),Lo("sec",(function(e){return 1/Math.cos(e)})).args([["*num","number"]]),Lo("sech",(function(t){return 1/e(t)})).args([["*num","number"]]),Lo("csc",(function(e){return 1/Math.sin(e)})).args([["*num","number"]]),Lo("csch",(function(e){return 1/t(e)})).args([["*num","number"]]),Lo("atan2",(function(e,t){return Math.atan(t/e)})).args([["*x","divisor"],["*y","number"]]),Lo("tanh",n).args([["*num","number"]]),Lo("atanh",(function(e){return Math.log(Math.sqrt(1-e*e)/(1-e))})).args([["*num",["and","number",["(between)",-1,1]]]]),Lo("cot",(function(e){return 1/Math.tan(e)})).args([["*num","divisor"]]),Lo("coth",(function(e){return 1/n(e)})).args([["*num","divisor"]]),Lo("acot",(function(e){return Math.PI/2-Math.atan(e)})).args([["*num","number"]]),Lo("acoth",(function(e){return Math.log((e+1)/(e-1))/2})).args([["*num","number"],["?",["or",["assert","$num < -1"],["assert","$num > 1"]]]]),Lo("power",(function(e,t){return Math.pow(e,t)})).args([["*a","number"],["*b","number"]]),Lo("mod",(function(e,t){return e%t})).args([["*a","number"],["*b","divisor"]]),Lo("quotient",(function(e,t){return Math.floor(e/t)})).args([["*a","number"],["*b","divisor"]]),Lo("ceiling",(function(e,t){return t?t*Math.ceil(e/t):0})).args([["*number","number"],["*significance","number"],["?",["assert","$significance >= 0 || $number < 0"]]]),Lo("ceiling.precise",(function(e,t){return(t=Math.abs(t))?t*Math.ceil(e/t):0})).args([["*number","number"],["*significance",["or","number",["null",1]]]]),Vo("iso.ceiling","ceiling.precise"),Lo("ceiling.math",(function(e,t,n){return t&&e?(e<0&&(!n&&t<0||n&&t>0)&&(t=-t),t?t*Math.ceil(e/t):0):0})).args([["*number","number"],["*significance",["or","number",["null","$number < 0 ? -1 : 1"]]],["*mode",["or","logical",["null",0]]]]),Lo("floor",(function(e,t){return t?t*Math.floor(e/t):0})).args([["*number","number"],["*significance","number"],["?",["assert","$significance >= 0 || $number < 0"]]]),Lo("floor.precise",(function(e,t){return(t=Math.abs(t))?t*Math.floor(e/t):0})).args([["*number","number"],["*significance",["or","number",["null",1]]]]),Lo("floor.math",(function(e,t,n){return t&&e?(e<0&&(!n&&t<0||n&&t>0)&&(t=-t),t?t*Math.floor(e/t):0):0})).args([["*number","number"],["*significance",["or","number",["null","$number < 0 ? -1 : 1"]]],["*mode",["or","logical",["null",0]]]]),Lo("int",Math.floor).args([["*number","number"]]),Lo("mround",(function(e,t){return t?t*Math.round(e/t):0})).args([["*number","number"],["*multiple","number"]]),Lo("round",(function(e,t){var n=e<0?-1:1;return n<0&&(e=-e),t=Math.pow(10,t),e=Xo(e*t),n*(e=Math.round(e))/t})).args([["*number","number"],["*digits","number"]]),Lo("roundup",(function(e,t){return t=Math.pow(10,t),(e=(e=Xo(e*t))<0?Math.floor(e):Math.ceil(e))/t})).args([["*number","number"],["*digits","number"]]),Lo("rounddown",(function(e,t){return t=Math.pow(10,t),(e=(e=Xo(e*t))<0?Math.ceil(e):Math.floor(e))/t})).args([["*number","number"],["*digits","number"]]),Lo("even",(function(e){var t=e<0?Math.floor(e):Math.ceil(e);return t%2?t+(t<0?-1:1):t})).args([["*number","number"]]),Lo("odd",(function(e){var t=e<0?Math.floor(e):Math.ceil(e);return t%2?t:t+(t<0?-1:1)})).args([["*number","number"]]),Lo("sign",(function(e){return e<0?-1:e>0?1:0})).args([["*number","number"]]),Lo("gcd",(function(e){for(var t=e[0],n=1;nt?(r++,a=null==a?e:Math.min(a,e)):s=!0})),i||r?s?n?(i+1)/(e.length+1):i/(i+r):((a-t)*f(e,o,n)+(t-o)*f(e,a,n))/(a-o):new Oo("N/A")}Lo("sumif",d((function(e,t,n){var i=0;return t=I(t),e.each((function(e,r,o){if(t(e)){var a=n.get(r,o);z(a)&&(i+=a||0)}})),i}))).argsAsync(c),Lo("averageif",d((function(e,t,n){var i=0,r=0;return t=I(t),e.each((function(e,o,a){if(t(e)){var s=n.get(o,a);z(s)&&(i+=s||0,r++)}})),r?i/r:new Oo("DIV/0")}))).argsAsync(c),(l=function(e,t){Lo(e,(function(e,n){var i=[],r=e.each((function(e){if(e instanceof Oo)return e;"number"==typeof e&&i.push(e)}));return r||(n>i.length?new Oo("NUM"):t(i,n-1))})).args([["array","matrix"],["*nth","number++"]])})("large",(function(e,t){return e.sort(E)[t]})),l("small",(function(e,t){return e.sort(M)[t]})),Lo("stdev.s",(function(e){return p(e,e.length-1)})).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),Lo("stdev.p",(function(e){return p(e,e.length)})).args([["numbers",["collect","number!"]],["?",["assert","$numbers.length >= 1","NUM"]]]),Lo("var.s",(function(e){return h(e,e.length-1)})).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),Lo("var.p",(function(e){return h(e,e.length)})).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),Lo("median",(function(e){var t=e.length;return e.sort(M),t%2?e[t>>1]:(e[t>>=1]+e[t-1])/2})).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","N/A"]]]),Lo("mode.sngl",(function(e){e.sort(M);for(var t=null,n=0,i=1,r=null,o=0;oi&&(i=n,r=a)}return null==r?new Oo("N/A"):r})).args([["numbers",["collect","number"]]]),Lo("mode.mult",(function(e){var t=Object.create(null),n=2,i=[];e.forEach((function(e){var r=t[e]||0;t[e]=++r,r==n?i.push(e):r>n&&(n=r,i=[e])}));var r=new jo(this);return i.forEach((function(e,t){r.set(t,0,e)})),r})).args([["numbers",["collect","number"]]]),Lo("geomean",(function(e){var t=e.length,n=e.reduce((function(e,t){if(t<0)throw new Oo("NUM");return e*t}),1);return Math.pow(n,1/t)})).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","NUM"]]]),Lo("harmean",(function(e){return e.length/e.reduce((function(e,t){if(!t)throw new Oo("DIV/0");return e+1/t}),0)})).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","NUM"]]]),Lo("trimmean",(function(e,t){var n=e.length;e.sort(M);var i=Math.floor(n*t);i%2&&--i;for(var r=0,o=i/=2;o 0","NUM"]]]),Lo("frequency",(function(e,t){e.sort(M),t.sort(M);var n=-1/0,i=0;function r(t){for(var r=0;in&&e[i]<=t;)++r,++i;return r}var o=new jo(this);return t.forEach((function(e,t){var i=r(e);n=e,o.set(t,0,i)})),o.set(o.height,0,e.length-i),o})).args([["data",["collect","number",1]],["bins",["collect","number",1]]]),Lo("rank.eq",(function(e,t,n){t.sort(n?M:E);var i=t.indexOf(e);return i<0?new Oo("N/A"):i+1})).args([["value","number"],["numbers",["collect","number",1]],["order",["or","logical",["null",!1]]]]),Vo("rank","rank.eq"),Lo("rank.avg",(function(e,t,n){t.sort(n?M:E);var i=t.indexOf(e);if(i<0)return new Oo("N/A");for(var r=i;t[r]==e;++r);return(i+r+1)/2})).args([["value","number"],["numbers",["collect","number"]],["order",["or","logical",["null",!1]]]]),Lo("kurt",(function(e){var t=e.length,n=u(e),i=h(e,t-1,n),r=Math.sqrt(i);return t*(t+1)/((t-1)*(t-2)*(t-3))*e.reduce((function(e,t){return e+Math.pow((t-n)/r,4)}),0)-3*Math.pow(t-1,2)/((t-2)*(t-3))})).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 4","NUM"]]]);var m=[["array",["collect","number",1]],["x","number"],["significance",["or",["null",3],"integer++"]],["?",["assert","$array.length > 0","NUM"]]];function g(e,t,n){for(var i=0,r=u(e),o=u(t),a=e.length,s=0;s 0","DIV/0"]]]),Lo("covariance.s",(function(e,t){return g(e,t,e.length-1)})).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array1.length == $array2.length","N/A"]],["?",["assert","$array1.length > 1","DIV/0"]]]),Vo("covar","covariance.p");var v=Ro.memoize((function(e){for(var t=2,n=1;t<=e;++t)n*=t;return n}));Lo("fact",v).args([["*n","integer+"]]),Lo("factdouble",(function(e){for(var t=2+(1&e),n=1;t<=e;t+=2)n*=t;return n})).args([["*n","integer+"]]),Lo("multinomial",(function(e){var t=1,n=0;return e.forEach((function(e){if(e<0)throw new Oo("NUM");n+=e,t*=v(e)})),v(n)/t})).args([["numbers",["collect","number"]]]);var _=Ro.memoize((function(e,t){for(var n=t+1,i=1,r=1,o=1;i<=e-t;++n,++i)r*=n,o*=i;return r/o}));function b(e,t){e.sort(M);var n=e.length,i=0|t,r=t-i;return 0===i?e[0]:i>=n?e[n-1]:e[--i]+r*(e[i+1]-e[i])}function w(e,t){return b(e,t*(e.length-1)+1)}function y(e,t){return b(e,t*(e.length+1))}Lo("combin",_).args([["*n","integer++"],["*k",["and","integer",["[between]",0,"$n"]]]]),Lo("combina",(function(e,t){return _(e+t-1,e-1)})).args([["*n","integer++"],["*k",["and","integer",["[between]",1,"$n"]]]]),Lo("average",(function(e){return e.reduce((function(e,t){return e+t}),0)/e.length})).args([["numbers",["collect","number!"]],["?",["assert","$numbers.length > 0","DIV/0"]]]),Lo("averagea",(function(e){var t=0,n=0;return e.forEach((function(e){"string"!=typeof e&&(t+=e),++n})),n?t/n:new Oo("DIV/0")})).args([["values",["collect","anyvalue"]]]),Lo("percentile.inc",w).args([["numbers",["collect","number",1]],["p",["and","number",["[between]",0,1]]]]),Lo("percentile.exc",y).args([["numbers",["collect","number",1]],["p",["and","number",["(between)",0,1]]]]),Lo("quartile.inc",(function(e,t){return w(e,t/4)})).args([["numbers",["collect","number",1]],["quarter",["values",0,1,2,3,4]]]),Lo("quartile.exc",(function(e,t){return y(e,t/4)})).args([["numbers",["collect","number",1]],["quarter",["values",0,1,2,3,4]]]),Vo("quartile","quartile.inc"),Vo("percentile","percentile.inc");var k=["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"];function x(e,t,n){var i=[];return function t(r){if(r instanceof qo)e.getRefCells(r,!0).forEach((function(e){var t=e.value;if(!(1&n&&e.hidden)){if(e.formula){var r=e.formula.print(e.row,e.col);if(/^\s*(?:aggregate|subtotal)\s*\(/i.test(r)&&!(4&n))return}2&n&&t instanceof Oo||("number"==typeof t||t instanceof Oo)&&i.push(t)}}));else if(Array.isArray(r))for(var o=0;o12){o=x(r,i[0],n);var a=i[1];if(a instanceof Wo&&(a=r.getRefData(a)),"number"!=typeof a)return e(new Oo("VALUE"))}else o=x(r,i,n);r.func(k[t-1],e,o)}))})).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"]]),Lo("subtotal",(function(e,t){var n=arguments,i=this,r=t>100;r&&(t-=100);for(var o=[],a=2;a= 2","NUM"]]]),Lo("binom.dist",C).args([["successes","integer+"],["trials",["and","integer",["assert","$trials >= $successes"]]],["probability",["and","number",["[between]",0,1]]],["cumulative","logical"]]),Vo("binomdist","binom.dist"),Lo("binom.inv",(function(e,t,n){for(var i=0;i<=e;++i)if(C(i,e,t,!0)>=n)return i;return new Oo("N/A")})).args([["trials","integer+"],["probability",["and","number",["[between]",0,1]]],["alpha",["and","number",["[between]",0,1]]]]),Vo("critbinom","binom.inv"),Lo("binom.dist.range",(function(e,t,n,i){for(var r=0,o=n;o<=i;++o)r+=_(e,o)*Math.pow(t,o)*Math.pow(1-t,e-o);return r})).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"]]]]),Lo("negbinom.dist",(function(e,t,n,i){if(i){for(var r=0;e>=0;)r+=_(e+t-1,e)*Math.pow(n,t)*Math.pow(1-n,e),e--;return r}return _(e+t-1,e)*Math.pow(n,t)*Math.pow(1-n,e)})).args([["number_f","integer+"],["number_s","integer+"],["probability_s",["and","number",["[between]",0,1]]],["cumulative","logical"]]),Vo("negbinomdist","negbinom.dist"),Lo("address",(function(e,t,n,i,r){var o=new Wo(e-1,t-1,n-1);return r&&o.setSheet(r,!0),i?o.print(0,0):o.print()})).args([["row","integer++"],["col","integer++"],["abs",["or",["null",1],["values",1,2,3,4]]],["a1",["or",["null",!0],"logical"]],["sheet",["or","null","string"]]]),Lo("areas",(function(e){var t=0;return function e(n){n instanceof Wo||n instanceof No?t++:n instanceof Uo&&n.refs.forEach(e)}(e),t})).args([["ref","ref"]]),Lo("choose",(function(e,t){return e>t.length?new Oo("N/A"):t[e-1]})).args([["*index","integer"],["+",["value","anything"]]]),Lo("column",(function(e){return e?e instanceof Wo?e.col+1:this.asMatrix(e).mapCol((function(t){return t+e.topLeft.col+1})):this.formula.col+1})).args([["ref",["or","area","null"]]]),Lo("columns",(function(e){return e instanceof qo?e.width():e.width})).args([["ref",["or","area","#matrix"]]]),Lo("formulatext",(function(e){var t=this.getRefCells(e)[0];return t.formula?t.formula.print(t.row,t.col):new Oo("N/A")})).args([["ref","ref"]]),Lo("hlookup",(function(e,t,n,i){var r=null;return t.eachCol((function(n){var o=t.get(0,n);if(i){if(o>e)return!0;r=n}else if(o===e)return r=n,!0})),null==r?new Oo("N/A"):t.get(n-1,r)})).args([["value","anyvalue"],["range","matrix"],["row","integer++"],["approx",["or","logical",["null",!0]]]]),Lo("index",(function(e,t,n,i,r){var o=this;if(t instanceof Uo&&(t=t.refs[r-1]),!n&&!i||!t)return e(new Oo("N/A"));if(t instanceof Wo&&(t=t.toRangeRef()),t instanceof No){if(n&&i){if(i>t.width()||n>t.height())return e(new Oo("REF"));var a=t.toCell(n-1,i-1);return void o.resolveCells([a],(function(){e(o.getRefData(a))}))}if(!n){var s=t.toColumn(i-1);return void o.resolveCells([s],(function(){e(o.asMatrix(s))}))}if(!i){var l=t.toRow(n-1);return void o.resolveCells([l],(function(){e(o.asMatrix(l))}))}}else if(t instanceof jo){if(t.width>1&&t.height>1){if(n&&i)return e(t.get(n-1,i-1));if(!n)return e(t.mapRow((function(e){return t.get(e,i-1)})));if(!i)return e(t.mapCol((function(e){return t.get(n-1,e)})))}if(1==t.width)return e(t.get(n-1,0));if(1==t.height)return e(t.get(0,i-1))}else e(new Oo("REF"))})).argsAsync([["range",["or","ref","matrix"]],["row",["or","integer+","null"]],["col",["or","integer+","null"]],["areanum",["or","integer++",["null",1]]]]),Lo("indirect",(function(e){try{var t=this.formula,n=Po.parseFormula(t.sheet,t.row,t.col,e).ast;if(n instanceof Go&&(n=this.ss.nameValue(n,t.sheet,t.row,t.col)),!(n instanceof qo))throw 1;return n.absolute(t.row,t.col)}catch(e){return new Oo("REF")}})).args([["thing","string"]]),Lo("match",(function(e,t,n){var i,r=1;return 0===n?i=I(e):-1===n?i=I("<="+e):1===n&&(i=I(">="+e)),t.each((function(t){if(null!=t&&i(t))return 0!==n&&e!=t&&--r,!0;r++}),!0)&&r>0?r:new Oo("N/A")})).args([["value","anyvalue"],["range","matrix"],["type",["or",["values",-1,0,1],["null",1]]]]),Lo("offset",(function(e,t,n,i,r){var o=(e instanceof Wo?e:e.topLeft).clone();return o.row+=t,o.col+=n,o.row<0||o.col<0?new Oo("VALUE"):i>1||r>1?new No(o,new Wo(o.row+i-1,o.col+r-1)).setSheet(e.sheet,e.hasSheet()):o})).args([["ref","area"],["*rows","integer"],["*cols","integer"],["*height",["or","integer++",["null","$ref.height()"]]],["*width",["or","integer++",["null","$ref.width()"]]]]),Lo("row",(function(e){return e?e instanceof Wo?e.row+1:this.asMatrix(e).mapRow((function(t){return t+e.topLeft.row+1})):this.formula.row+1})).args([["ref",["or","area","null"]]]),Lo("rows",(function(e){return e instanceof qo?e.height():e.height})).args([["ref",["or","area","#matrix"]]]),Lo("vlookup",(function(e,t,n,i){var r=null;return"number"!=typeof e&&(i=!1),"string"==typeof e&&(e=e.toLowerCase()),t.eachRow((function(n){var o=t.get(n,0);if(i){if(o>e)return!0;r=n}else if("string"==typeof o&&(o=o.toLowerCase()),o===e)return r=n,!0})),null==r?new Oo("N/A"):t.get(r,n-1)})).args([["value","anyvalue"],["range","matrix"],["col","integer++"],["approx",["or","logical",["null",!0]]]]),Lo("date",(function(e,t,n){return Yo(e,t-1,n)})).args([["*year","integer"],["*month","integer"],["*date","integer"]]),Lo("day",(function(e){return $o(e).date})).args([["*date","date"]]),Lo("month",(function(e){return $o(e).month+1})).args([["*date","date"]]),Lo("year",(function(e){return $o(e).year})).args([["*date","date"]]),Lo("weekday",(function(e){return $o(e).day+1})).args([["*date","date"]]),Lo("weeknum",(function(e,t){var n,i=Yo($o(e).year,0,1),r=$o(i);return 21==t?((n=3-(r.day+6)%7)<0&&(n+=7),i+=n,r.date+=n,r.day=4,t=1):t=1==t?0:2==t?1:(t-10)%7,(n=r.day-t)<0&&(n+=7),i-=n,Math.ceil((e+1-i)/7)})).args([["*date","date"],["*type",["or",["null",1],["values",1,2,11,12,13,14,15,16,17,21]]]]),Lo("isoweeknum",(function(e){var t=$o(e),n=t.day||7,i=Math.floor((t.ord-n+10)/7);return i<1?S(t.year-1):53==i&&i>S(t.year)?1:i})).args([["*date","date"]]),Lo("now",(function(){return Bo.dateToSerial(new Date)})).args([]),Lo("today",(function(){return 0|Bo.dateToSerial(new Date)})).args([]),Lo("time",(function(e,t,n){return Bo.packTime(e,t,n,0)})).args([["*hours","integer"],["*minutes","integer"],["*seconds","integer"]]),Lo("hour",(function(e){return Bo.unpackTime(e).hours})).args([["*time","datetime"]]),Lo("minute",(function(e){return Bo.unpackTime(e).minutes})).args([["*time","datetime"]]),Lo("second",(function(e){return Bo.unpackTime(e).seconds})).args([["*time","datetime"]]),Lo("edate",(function(e,t){var n=$o(e),i=n.month+t,r=n.year+Math.floor(i/12);return(i%=12)<0&&(i+=12),n=Math.min(n.date,Ko(r,i)),Yo(r,i,n)})).args([["*start_date","date"],["*months","integer"]]),Lo("eomonth",(function(e,t){var n=$o(e),i=n.month+t,r=n.year+Math.floor(i/12);return(i%=12)<0&&(i+=12),n=Ko(r,i),Yo(r,i,n)})).args([["*start_date","date"],["*months","integer"]]),Lo("workday",(function(e,t,n){var i=t>0?1:-1;t=Math.abs(t);for(var r=$o(e).day;t>0;)e+=i,(r=(r+i)%7)>0&&r<6&&n.indexOf(e)<0&&--t;return e})).args([["start_date","date"],["days","integer"],["holidays",["collect","date"]]]),Lo("networkdays",(function(e,t,n){if(e>t){var i=e;e=t,t=i}for(var r=0,o=$o(e).day;e<=t;)o>0&&o<6&&n.indexOf(e)<0&&r++,e++,o=(o+1)%7;return r})).args([["start_date","date"],["end_date","date"],["holidays",["collect","date"]]]),Lo("days",(function(e,t){return e-t})).args([["*start_date","date"],["*end_date","date"]]),Lo("days360",Zo).args([["*start_date","date"],["*end_date","date"],["*method",["or","logical",["null",!1]]]]),Lo("yearfrac",(function(e,t,n){switch(n){case 0:return Zo(e,t,!1)/360;case 1:return(t-e)/Qo($o(e).year);case 2:return(t-e)/360;case 3:return(t-e)/365;case 4:return Zo(e,t,!0)/360}})).args([["*start_date","date"],["*end_date","date"],["*method",["or",["null",0],["values",0,1,2,3,4]]]]),Lo("datevalue",(function(e){var t=Bo.parseDate(e);return t?Bo.dateToSerial(t):new Oo("VALUE")})).args([["*text","string"]]),Lo("timevalue",(function(e){var t=e.toLowerCase().match(/(\d+):(\d+)(:(\d+)(\.(\d+))?)?\s*(am?|pm?)?/);if(t){var n=parseFloat(t[1]),i=parseFloat(t[2]),r=t[3]?parseFloat(t[4]):0,o=t[7];return o&&(n>12||n<1)?new Oo("VALUE"):(/^p/.test(o)&&(n+=12),Bo.packTime(n,i,r,0))}return new Oo("VALUE")})).args([["*text","string"]]),Lo("mdeterm",(function(e){return e.each((function(e){if("number"!=typeof e)return new Oo("VALUE")}),!0)||e.determinant()})).args([["m",["and","matrix",["assert","$m.width == $m.height"]]]]),Lo("transpose",(function(e){return e.transpose()})).args([["range","matrix"]]),Lo("mmult",(function(e,t){return e.multiply(t)})).args([["a","matrix"],["b",["and","matrix",["assert","$b.height == $a.width"]]]]),Lo("munit",(function(e){return new jo(this).unit(e)})).args([["n","integer+"]]),Lo("minverse",(function(e){return e.each((function(e){if("number"!=typeof e)return new Oo("VALUE")}),!0)||e.inverse()||new Oo("VALUE")})).args([["m",["and","matrix",["assert","$m.width == $m.height"]]]]),Lo("rand",(function(){return Math.random()})).args([]),Lo("randbetween",(function(e,t){return e+Math.floor((t-e+1)*Math.random())})).args([["min","integer"],["max",["and","integer",["assert","$max >= $min"]]]]),Lo("true",(function(){return!0})).args([]),Lo("false",(function(){return!0})).args([]),Lo("roman",(function(e){return Ro.arabicToRoman(e).toUpperCase()})).args([["*number","integer"]]),Lo("arabic",(function(e){var t=Ro.romanToArabic(e);return null==t?new Oo("VALUE"):t})).args([["*roman","string"]]),Lo("base",(function(e,t,n){for(var i=e.toString(t).toUpperCase();i.length=48&&r<=57)r-=48;else{if(!(r>=65&&r<55+t))return new Oo("VALUE");r-=55}n=n*t+r}return n})).args([["*text","string"],["*radix",["and","integer",["[between]",2,36]]]]),Lo("char",(function(e){return String.fromCharCode(e)})).args([["*code","integer+"]]);var T=/[\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;function D(e,t){this.link=e,this.text=t}Lo("clean",(function(e){return e.replace(T,"")})).args([["*text","string"]]),Lo("code",(function(e){return e.charAt(0)})).args([["*text","string"]]),Vo("unichar","char"),Vo("unicode","code"),Lo("concatenate",(function(e){for(var t="",n=0;n0;)i+="0";for(;++t<0;)r*=10;return""!==i?i="."+i:1!==r&&(e=Math.round(e/r)*r),n=n.replace(/DECIMALS/g,i),Fo.formatting.text(e,n)})).args([["*number","number"],["*decimals",["or","integer",["null",2]]]]),Lo("exact",(function(e,t){return e===t})).args([["*text1","string"],["*text2","string"]]),Lo("find",(function(e,t,n){var i=t.indexOf(e,n-1);return i<0?new Oo("VALUE"):i+1})).args([["*substring","string"],["*string","string"],["*start",["or","integer++",["null",1]]]]),Lo("fixed",(function(e,t,n){var i=Math.pow(10,t);e=Math.round(e*i)/i;var r=n?"0":"#,##0";if(t>0)for(r+=".";t-- >0;)r+="0";return Fo.formatting.text(e,r)})).args([["*number","number"],["*decimals",["or","integer",["null",2]]],["*noCommas",["or","boolean",["null",!1]]]]),Lo("left",(function(e,t){return e.substr(0,t)})).args([["*text","string"],["*length",["or","integer+",["null",1]]]]),Lo("right",(function(e,t){return e.substr(-t)})).args([["*text","string"],["*length",["or","integer+",["null",1]]]]),Lo("len",(function(e){return e.length})).args([["*text","string"]]),Lo("lower",(function(e){return e.toLowerCase()})).args([["*text","string"]]),Lo("upper",(function(e){return e.toUpperCase()})).args([["*text","string"]]),Lo("ltrim",(function(e){return e.replace(/^\s+/,"")})).args([["*text","string"]]),Lo("rtrim",(function(e){return e.replace(/\s+$/,"")})).args([["*text","string"]]),Lo("trim",(function(e){return e.replace(/^\s+|\s+$/,"")})).args([["*text","string"]]),Lo("mid",(function(e,t,n){return e.substr(t-1,n)})).args([["*text","string"],["*start","integer++"],["*length","integer+"]]),Lo("proper",(function(e){return e.toLowerCase().replace(/\b./g,(function(e){return e.toUpperCase()}))})).args([["*text","string"]]),Lo("replace",(function(e,t,n,i){return e.substr(0,--t)+i+e.substr(t+n)})).args([["*text","string"],["*start","integer++"],["*length","integer+"],["*newText","string"]]),Lo("rept",(function(e,t){for(var n="";t-- >0;)n+=e;return n})).args([["*text","string"],["*number","integer+"]]),Lo("search",(function(e,t,n){var i=t.toLowerCase().indexOf(e.toLowerCase(),n-1);return i<0?new Oo("VALUE"):i+1})).args([["*substring","string"],["*string","string"],["*start",["or","integer++",["null",1]]]]),Lo("substitute",(function(e,t,n,i){if(t===n)return e;var r=e.split(t);if(null==i)return r.join(n);e="",i--;for(var o=0;on(t)}function a(e,t){return n(e)>=n(t)}function s(e,t){return!l(e,t)}function l(e,t){return t instanceof RegExp?t.test(e):("string"!=typeof e&&"string"!=typeof t||(e=String(e),t=String(t)),n(e)==n(t))}return function(n){if("function"==typeof n)return n;var c;if(c=/^=(.*)$/.exec(n))return t(l,c[1]);if(c=/^<>(.*)$/.exec(n))return t(s,c[1]);if(c=/^<=(.*)$/.exec(n))return t(r,c[1]);if(c=/^<(.*)$/.exec(n))return t(i,c[1]);if(c=/^>=(.*)$/.exec(n))return t(a,c[1]);if(c=/^>(.*)$/.exec(n))return t(o,c[1]);if(/[?*]/.exec(n)){var d=e[n];return d||(d=n.replace(/(~\?|~\*|[\]({\+\.\|\^\$\\})\[]|[?*])/g,(function(e){switch(e){case"~?":return"\\?";case"~*":return"\\*";case"?":return".";case"*":return".*";default:return"\\"+e}})),d=e[n]=new RegExp("^"+d+"$","i")),t(l,d)}return t(l,n)}}();function z(e){return"number"==typeof e||"boolean"==typeof e||null==e||""===e}function M(e,t){return e===t?0:e= $A","NUM"]],["?",["assert","$x <= $B","NUM"]],["?",["assert","$A < $B","NUM"]]]),ea("BETA.DIST",Ia).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"]]]),ea("BETA.INV",za).args([["p",["and","number",["[between]",0,1]]],["alpha","number++"],["beta","number++"],["A",["or","number",["null",0]]],["B",["or","number",["null",1]]]]),ea("CHISQ.DIST",Ma).args([["x","number+"],["deg_freedom","integer++"],["cumulative","logical"]]),ea("CHISQ.DIST.RT",Ea).args([["x","number+"],["deg_freedom","integer++"]]),ea("CHISQ.INV",Aa).args([["p",["and","number",["[between]",0,1]]],["deg_freedom","integer++"]]),ea("CHISQ.INV.RT",Ha).args([["p",["and","number",["[between]",0,1]]],["deg_freedom","integer++"]]),ea("CHISQ.TEST",(function(e,t){return function(e,t){var n,i,r=e.length,o=e[0].length,a=0;for(n=0;n= 2","DIV/0"]],["?",["assert","$array2.length >= 2","DIV/0"]]]),ea("FISHER",Ua).args([["x",["and","number",["(between)",-1,1]]]]),ea("FISHERINV",ja).args([["y","number"]]),ea("T.DIST",qa).args([["x","number"],["deg_freedom","integer++"],["cumulative","logical"]]),ea("T.DIST.RT",Ga).args([["x","number"],["deg_freedom","integer++"]]),ea("T.DIST.2T",Ka).args([["x","number+"],["deg_freedom","integer++"]]),ea("T.INV",Ya).args([["p",["and","number",["(between]",0,1]]],["deg_freedom","integer++"]]),ea("T.INV.2T",$a).args([["p",["and","number",["(between]",0,1]]],["deg_freedom","integer++"]]),ea("T.TEST",Qa).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"]]]),ea("CONFIDENCE.T",Xa).args([["alpha",["and","number",["(between)",0,1]]],["standard_dev","number++"],["size",["and","integer++",["assert","$size != 1","DIV/0"]]]]),ea("CONFIDENCE.NORM",Za).args([["alpha",["and","number",["(between)",0,1]]],["standard_dev","number++"],["size",["and","integer++"]]]),ea("GAUSS",Ja).args([["z","number"]]),ea("PHI",es).args([["x","number"]]),ea("LOGNORM.DIST",ts).args([["x","number++"],["mean","number"],["standard_dev","number++"],["cumulative","logical"]]),ea("LOGNORM.INV",ns).args([["probability",["and","number",["(between)",0,1]]],["mean","number"],["standard_dev","number++"]]),ea("PROB",is).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"]]]),ea("SLOPE",rs).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"]]]),ea("INTERCEPT",os).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"]]]),ea("PEARSON",as).args([["array1",["collect!","anything",1]],["array2",["collect!","anything",1]],["?",["assert","$array2.length == $array1.length","N/A"]],["?",["assert","$array2.length > 0 && $array1.length > 0","N/A"]]]),ea("RSQ",ss).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"]]]),ea("STEYX",ls).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"]]]),ea("FORECAST",cs).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"]]]),ea("LINEST",hs).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]],["stats",["or","logical",["null",!1]]]]),ea("LOGEST",ps).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]],["stats",["or","logical",["null",!1]]]]),ea("TREND",fs).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["new_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]]]),ea("GROWTH",ms).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["new_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]]]),ea("FV",vs).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"]]]),ea("PV",_s).args([["rate","number"],["nper","number"],["pmt",["or","number",["null",0]]],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]]]),ea("PMT",bs).args([["rate","number"],["nper","number"],["pmt","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]]]),ea("NPER",ws).args([["rate","number"],["pmt","number"],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]]]),ea("RATE",ys).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"]]]),ea("IPMT",ks).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"]]]),ea("PPMT",xs).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"]]]),ea("CUMPRINC",Cs).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"]]]),ea("CUMIPMT",Ss).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"]]]),ea("NPV",Ts).args([["rate","number"],["values",["collect","number"]],["?",["assert","$values.length > 0","N/A"]]]),ea("IRR",Ds).args([["values",["collect","number",1]],["guess",["or","number",["null",.1]]]]),ea("EFFECT",Is).args([["nominal_rate","number++"],["npery","integer++"]]),ea("NOMINAL",zs).args([["effect_rate","number++"],["npery","integer++"]]),ea("XNPV",Ms).args([["rate","number"],["values",["collect","number",1]],["dates",["collect","date",1]],["?",["assert","$values.length == $dates.length","NUM"]]]),ea("XIRR",Es).args([["values",["collect","number",1]],["dates",["collect","date",1]],["guess",["or","number",["null",.1]]],["?",["assert","$values.length == $dates.length","NUM"]]]),ea("ISPMT",As).args([["rate","number"],["per","number++"],["nper","number++"],["pv","number"],["?",["assert","$per >= 1 && $per <= $nper"]]]),ea("DB",Hs).args([["cost","number"],["salvage","number"],["life","number++"],["period","number++"],["month",["or","number",["null",12]]]]),ea("DDB",Rs).args([["cost","number"],["salvage","number"],["life","number++"],["period","number++"],["factor",["or","number",["null",2]]]]),ea("SLN",Fs).args([["cost","number"],["salvage","number"],["life","number++"]]),ea("SYD",Ps).args([["cost","number"],["salvage","number"],["life","number++"],["per","number++"]]),ea("VDB",Bs).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"]]]);var e=[["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"]]];ea("COUPDAYBS",Ns).args(e),ea("COUPDAYS",Ws).args(e),ea("COUPDAYSNC",Us).args(e),ea("COUPPCD",js).args(e),ea("COUPNCD",qs).args(e),ea("COUPNUM",Gs).args(e),ea("ACCRINTM",Ys).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"]]]),ea("ACCRINT",$s).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"]]]),ea("DISC",Qs).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"]]]),ea("INTRATE",Xs).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"]]]),ea("RECEIVED",Zs).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"]]]),ea("PRICE",Js).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"]]]),ea("PRICEDISC",el).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"]]])}));var sa=300,la=22204e-20,ca=1e-30,da=Math.abs;function ua(e){if(da(e)>=3.3)return 1-ha(e);var t=e>0?1:-1;-1==t&&(e=-e);for(var n=0,i=1,r=1;r<100;r++)n+=i,i*=2*e*e/(2*r+1);return 2*t/Math.sqrt(Math.PI)*e*Math.exp(-e*e)*n}function ha(e){if(da(e)<3.3)return 1-ua(e);var t=1;e<0&&(t=-1,e=-e);for(var n=e,i=8;i>=1;i-=.5)n=e+i/n;return n=1/(e+n),1==t?Math.exp(-e*e)/Math.sqrt(Math.PI)*n:2-Math.exp(-e*e)/Math.sqrt(Math.PI)*n}function pa(e){var t=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],n=e,i=e+5.5,r=t[0];i-=(e+.5)*Math.log(i);for(var o=1;o<=6;o++)r+=t[o]/(n+=1);return-i+Math.log(Math.sqrt(2*Math.PI)*r/e)}function fa(e){if(e>0)return Math.exp(pa(e));var t=Math.PI,n=-e;return-t/(n*fa(n)*Math.sin(t*n))}function ma(e,t){return pa(e)+pa(t)-pa(e+t)}function ga(e,t){return Math.exp(ma(e,t))}function va(e,t){return t1&&(r*=a);for(var s=0;se?r=o:i=o}return o}function wa(e,t){return t?.5+.5*ua(e/Math.sqrt(2)):Math.exp(-e*e/2)/Math.sqrt(2*Math.PI)}function ya(e){var t,n,i=[-39.69683028665376,220.9460984245205,-275.9285104469687,138.357751867269,-30.66479806614716,2.506628277459239],r=[-54.47609879822406,161.5858368580409,-155.6989798598866,66.80131188771972,-13.28068155288572],o=[-.007784894002430293,-.3223964580411365,-2.400758277161838,-2.549732539343734,4.374664141464968,2.938163982698783],a=[.007784695709041462,.3224671290700398,2.445134137142996,3.754408661907416],s=.02425;return ee?r=o:i=o}return o}function Da(e,t,n,i,r){return Ca((e-i)/(r-i),t,n)}function Ia(e,t,n,i,r,o){return i?Ca((e-r)/(o-r),t,n):function(e,t,n){return Math.exp((t-1)*Math.log(e)+(n-1)*Math.log(1-e)-ma(t,n))}((e-r)/(o-r),t,n)/(o-r)}function za(e,t,n,i,r){return i+(r-i)*Ta(e,t,n)}function Ma(e,t,n){return _a(e,t/2,2,n)}function Ea(e,t){return 1-Ma(e,t,!0)}function Aa(e,t){return ba(e,t/2,2)}function Ha(e,t){return Aa(1-e,t)}function Ra(e,t,n){return n?1-Math.exp(-t*e):t*Math.exp(-t*e)}function Fa(e,t,n){if(n)return 1-Ma(2*t,2*(e+1),!0);for(var i=0,r=2;r<=e;r++)i+=Math.log(r);return Math.exp(e*Math.log(t)-t-i)}function Pa(e,t,n,i){if(i)return Ca(t*e/(n+t*e),t/2,n/2);var r=t/n;return r/ga(t/=2,n/=2)*Math.pow(r*e,t-1)/Math.pow(1+r*e,t+n)}function Ba(e,t,n){return 1-Pa(e,t,n,!0)}function La(e,t,n){return n/t*(1/za(e,n/2,t/2,0,1)-1)}function Va(e,t,n){return n/t*(1/za(1-e,n/2,t/2,0,1)-1)}function Oa(e){for(var t=0,n=e.length,i=0;i.5?n:-n}function $a(e,t){return Ya(1-e/2,t)}function Qa(e,t,n,i){var r,o,a=e.length,s=t.length;if(1==i){for(var l=0,c=0,d=0;d1)throw new ta("NUM");a+=t[r]}if(1!=a)throw new ta("NUM");var s=0;for(r=0;r=n&&l<=i&&(s+=t[r])}return s}function rs(e,t){for(var n=Oa(t),i=Oa(e),r=0,o=0,a=0,s=e.length;a=0;)"number"==typeof e[n]&&"number"==typeof t[n]||(e.splice(n,1),t.splice(n,1))}(e,t);for(var n=Oa(e),i=Oa(t),r=0,o=0,a=0,s=0,l=e.length;s=0;r--)s.push(a.data[r][0]);if(n||s.push(0),!i)return this.asMatrix([s]);var l=t.multiply(a),c=e.adds(l,!0),d=us(l,n?ds(l):0),u=us(c,n?ds(c):0),h=[];h.push(d,u);var p=d/(d+u),f=e.height-t.width,m=Math.sqrt(u/f),g=[];g.push(p,m);var v=n?d/(t.width-1)/(u/f):p/t.width/((1-p)/f),_=[];_.push(v,f);var b=o.multiply(t).inverse(),w=[];for(r=b.height-1;r>=0;r--)w.push(Math.sqrt(b.data[r][r]*u/f));return this.asMatrix([s,w,g,_,h])}function ps(e,t,n,i){return hs.call(this,e.map(Math.log),t,n,i).map(Math.exp)}function fs(e,t,n,i){var r=0;t||(t=e.map((function(){return++r}))),i&&((t=t.clone()).eachRow((function(e){t.data[e].unshift(1)})),++t.width);var o=t.transpose(),a=o.multiply(t).inverse().multiply(o).multiply(e);return n?i&&((n=n.clone()).eachRow((function(e){n.data[e].unshift(1)})),++n.width):n=t,n.multiply(a)}function ms(e,t,n,i){return fs.call(this,e.map(Math.log),t,n,i).map(Math.exp)}function gs(e,t,n,i){for(var r=n||20,o=i||1e-7,a=t,s=1;s<=r;s++){var l=e(a),c=l[0]/l[1];if(a-=c,Math.abs(c)=n?1:o/n;function l(e,n){var i,r,o;return r=1==s?1==n?e:0:e*Math.pow(1-s,n-1),(i=(o=e*Math.pow(1-s,n))h?(r=s,d=!0):(r=h,o-=h)}u==a&&(r*=i+1-a),c+=r}return c}var d=Math.floor(i),u=Math.ceil(r),h=0;if(a)for(var p=d+1;p<=u;p++){var f=l(e,p);p==d+1?f*=Math.min(r,d+1)-i:p==u&&(f*=r+1-u),h+=f}else{var m=n;if(i!=Math.floor(i)&&o>1&&i>=n/2){var g=i-n/2;i=n/2,r-=g,m+=1}e-=c(e,m,i),h=c(e,n-i,r-i)}return h}function Ls(e,t){var n=ia(e),i=n.month+t,r=n.year+Math.floor(i/12);return(i%=12)<0&&(i+=12),n=Math.min(n.date,oa(r,i)),na(r,i,n)}function Vs(e,t,n){return 1==n||2==n||3==n?t-e:aa(e,t,n)}function Os(e,t,n){var i=ia(e),r=ia(t).year-i.year;r>0&&(r=(r-1)*n);var o,a=12/n;do{o=Ls(t,-++r*a)}while(e0&&(o=(o-1)*n);for(var a,s=e,l=12/n;t>s;)a=s,s=Ls(e,++o*l);return[a,s]}(t,n,o),c=l[0],d=l[1],p=v(t,n),f=d==n?m*p:m*(p+Vs(c,n,a)/Vs(c,d,a)),s?(c=(l=Os(e,t,o))[0],d=l[1],f+=m*((p=v(e,t))+Vs(e,d,a)/Vs(c,d,a))):f)}function Qs(e,t,n,i,r){return(i-n)/i*(r%2==0?360:ra(ia(e).year)?366:365)/Vs(e,t,r)}function Xs(e,t,n,i,r){return(i-n)/n*(r%2==0?360:ra(ia(e).year)?366:365)/Vs(e,t,r)}function Zs(e,t,n,i,r){var o=r%2==0?360:ra(ia(e).year)?366:365;return n/(1-i*Vs(e,t,r)/o)}function Js(e,t,n,i,r,o,a){var s=1+((t-e)*o/(a%2==0?360:365)|0),l=Os(e,t,o),c=l[0],d=l[1],u=Vs(c,e,a),h=Vs(e,d,a),p=Vs(c,d,a),f=100*n/o,m=i/o,g=h/p;return 1==s?(r+f)/(1+g*m)-u/p*f:r/Math.pow(1+m,s-1+g)+f*Math.pow(1+m,1-s-g)*(Math.pow(1+m,s)-1)/m-u/p*f}function el(e,t,n,i,r){return i-n*i*Vs(e,t,r)/Ks(ia(t).year,r)}!function(e){var t=e.jQuery,n=["allBorders","insideBorders","insideHorizontalBorders","insideVerticalBorders","outsideBorders","leftBorder","topBorder","rightBorder","bottomBorder","noBorders"],i={allBorders:"bordersAll",insideBorders:"bordersInside",insideHorizontalBorders:"bordersInsideHorizontal",insideVerticalBorders:"bordersInsideVertical",outsideBorders:"bordersOutside",leftBorder:"borderLeft",topBorder:"borderTop",rightBorder:"borderRight",bottomBorder:"borderBottom",noBorders:"bordersNone"},r=e.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"},o=["#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"],a=e.ui.Widget.extend({init:function(t,n){e.ui.Widget.call(this,t,n),this.element=t,this.color="#000",this.element.addClass("k-spreadsheet-popup"),this._borderTypePalette(),this._borderColorPalette()},options:{name:"BorderPalette"},events:["change"],destroy:function(){this.colorChooser.destroy(),e.destroy(this.element.find(".k-spreadsheet-border-type-palette"))},value:function(){return{type:this.type,color:this.color}},_borderTypePalette:function(){var o=this,a=r,s=t("
                        ",{class:"k-spreadsheet-border-type-palette"});t('Border type').appendTo(this.element),s.appendTo(this.element),n.map((function(n){t('"}var i=e.ui.ToolBar,r=e.spreadsheet.messages.toolbar={addColumnLeft:"Add column left",addColumnRight:"Add column right",addRowAbove:"Add row above",addRowBelow:"Add row below",alignment:"Alignment",alignmentButtons:{justifyLeft:"Align left",justifyCenter:"Center",justifyRight:"Align right",justifyFull:"Justify",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom"},backgroundColor:"Background",bold:"Bold",borders:"Borders",copy:"Copy",cut:"Cut",deleteColumn:"Delete column",deleteRow:"Delete row",filter:"Filter",fontFamily:"Font",fontSize:"Font size",format:"Custom format...",formatTypes:{automatic:"Automatic",text:"Text",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"},insertComment:"Insert comment",insertImage:"Insert image",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",sortButtons:{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"},o=e.spreadsheet.formats={automatic:null,text:"@",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"},a=["#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"],s=e.spreadsheet.messages.colorPicker={reset:"Reset color",customColor:"Custom color...",apply:"Apply",cancel:"Cancel"},l={separator:{type:"separator"},open:{type:"open",name:"open",icon:"folder-open",extensions:".xlsx",command:"OpenCommand"},exportAs:{type:"button",name:"exportAs",dialog:"exportAs",overflow:"never",icon:"download"},bold:{type:"button",command:"PropertyChangeCommand",property:"bold",value:!0,icon:"bold",togglable:!0},italic:{type:"button",command:"PropertyChangeCommand",property:"italic",value:!0,icon:"italic",togglable:!0},underline:{type:"button",command:"PropertyChangeCommand",property:"underline",value:!0,icon:"underline",togglable:!0},formatDecreaseDecimal:{type:"button",name:"formatDecreaseDecimal",command:"AdjustDecimalsCommand",value:-1,icon:"decimal-decrease"},formatIncreaseDecimal:{type:"button",name:"formatIncreaseDecimal",command:"AdjustDecimalsCommand",value:1,icon:"decimal-increase"},textWrap:{type:"button",name:"textWrap",command:"TextWrapCommand",property:"wrap",value:!0,icon:"text-wrap",togglable:!0},cut:{type:"button",name:"cut",command:"ToolbarCutCommand",icon:"cut"},copy:{type:"button",name:"copy",command:"ToolbarCopyCommand",icon:"copy"},paste:{type:"button",name:"paste",command:"ToolbarPasteCommand",icon:"clipboard"},alignment:{type:"component",name:"alignment",property:"alignment",component:"DropDownButton",element:n("align-left"),overflowComponent:{type:"button",dialog:"alignment",icon:"align-left"},componentOptions:{items:[{attributes:{"data-value":"left","data-property":"textAlign","data-command":"PropertyChangeCommand"},icon:"align-left",text:r.alignmentButtons.justifyLeft},{attributes:{"data-value":"center","data-property":"textAlign","data-command":"PropertyChangeCommand"},icon:"align-center",text:r.alignmentButtons.justifyCenter},{attributes:{"data-value":"right","data-property":"textAlign","data-command":"PropertyChangeCommand"},icon:"align-right",text:r.alignmentButtons.justifyRight},{attributes:{"data-value":"justify","data-property":"textAlign","data-command":"PropertyChangeCommand"},icon:"align-justify",text:r.alignmentButtons.justifyFull},{attributes:{class:"k-separator"}},{attributes:{"data-value":"top","data-property":"verticalAlign","data-command":"PropertyChangeCommand"},icon:"align-top",text:r.alignmentButtons.alignTop},{attributes:{"data-value":"center","data-property":"verticalAlign","data-command":"PropertyChangeCommand"},icon:"align-middle",text:r.alignmentButtons.alignMiddle},{attributes:{"data-value":"bottom","data-property":"verticalAlign","data-command":"PropertyChangeCommand"},icon:"align-bottom",text:r.alignmentButtons.alignBottom}],commandOn:"click"}},backgroundColor:{type:"component",name:"backgroundColor",commandOn:"change",command:"PropertyChangeCommand",property:"background",component:"ColorPicker",componentOptions:{view:"palette",toolIcon:"droplet",palette:a,clearButton:!0,messages:s,input:!1,commandOn:"change"},overflowComponent:{type:"button",dialog:"colorPicker",icon:"droplet"}},textColor:{type:"component",name:"textColor",commandOn:"change",command:"PropertyChangeCommand",property:"color",component:"ColorPicker",componentOptions:{view:"palette",toolIcon:"foreground-color",palette:a,clearButton:!0,messages:s,input:!1,commandOn:"change"},overflowComponent:{type:"button",dialog:"colorPicker",icon:"foreground-color"}},fontFamily:{type:"component",name:"fontFamily",command:"PropertyChangeCommand",property:"fontFamily",component:"DropDownList",overflowComponent:{type:"button",dialog:"fontFamily",icon:"font-family"},componentOptions:{dataSource:["Arial","Courier New","Georgia","Times New Roman","Trebuchet MS","Verdana"],value:"Arial",commandOn:"change"}},fontSize:{type:"component",name:"fontSize",command:"PropertyChangeCommand",property:"fontSize",component:"ComboBox",overflowComponent:{type:"button",dialog:"fontSize",icon:"font-size"},componentOptions:{dataSource:[8,9,10,11,12,13,14,16,18,20,22,24,26,28,36,48,72],value:12,commandOn:"change"}},format:{type:"component",name:"format",component:"DropDownButton",element:n("custom-format"),overflowComponent:{type:"button",dialog:"formatCells",icon:"custom-format"},componentOptions:{items:[{attributes:{"data-value":o.automatic,"data-command":"PropertyChangeCommand","data-property":"format"},text:r.formatTypes.automatic},{attributes:{"data-value":o.text,"data-command":"PropertyChangeCommand","data-property":"format"},text:r.formatTypes.text},{attributes:{"data-value":o.number,"data-command":"PropertyChangeCommand","data-property":"format"},text:r.formatTypes.number,sample:"1,499.99"},{attributes:{"data-value":o.percent,"data-command":"PropertyChangeCommand","data-property":"format"},text:r.formatTypes.percent,sample:"14.50%"},{attributes:{"data-value":o.financial,"data-command":"PropertyChangeCommand","data-property":"format"},text:r.formatTypes.financial,sample:"(1,000.12)"},{attributes:{"data-value":o.currency,"data-command":"PropertyChangeCommand","data-property":"format"},text:r.formatTypes.currency,sample:"$1,499.99"},{attributes:{"data-value":o.date,"data-command":"PropertyChangeCommand","data-property":"format"},text:r.formatTypes.date,sample:"4/21/2012"},{attributes:{"data-value":o.time,"data-command":"PropertyChangeCommand","data-property":"format"},text:r.formatTypes.time,sample:"5:49:00 PM"},{attributes:{"data-value":o.dateTime,"data-command":"PropertyChangeCommand","data-property":"format"},text:r.formatTypes.dateTime,sample:"4/21/2012 5:49:00"},{attributes:{"data-value":o.duration,"data-command":"PropertyChangeCommand","data-property":"format"},text:r.formatTypes.duration,sample:"168:05:00"},{attributes:{"data-value":"popup","data-popup":"formatCells"},text:r.formatTypes.moreFormats}],itemTemplate:'# if (data.sample) { ##: data.sample ## } ##: data.text #',commandOn:"click"}},filter:{type:"button",name:"filter",property:"hasFilter",icon:"filter",command:"FilterCommand",togglable:!0,enable:!1},merge:{type:"component",name:"merge",component:"DropDownButton",element:n("cells-merge"),overflowComponent:{type:"button",dialog:"merge",icon:"cells-merge"},componentOptions:{items:[{attributes:{"data-value":"cells","data-command":"MergeCellCommand"},icon:"cells-merge",text:r.mergeButtons.mergeCells},{attributes:{"data-value":"horizontally","data-command":"MergeCellCommand"},icon:"cells-merge-horizontally",text:r.mergeButtons.mergeHorizontally},{attributes:{"data-value":"vertically","data-command":"MergeCellCommand"},icon:"cells-merge-vertically",text:r.mergeButtons.mergeVertically},{attributes:{"data-value":"unmerge","data-command":"MergeCellCommand"},icon:"table-unmerge",text:r.mergeButtons.unmerge}],commandOn:"click"}},freeze:{type:"component",name:"freeze",component:"DropDownButton",element:n("pane-freeze"),overflowComponent:{type:"button",dialog:"freeze",icon:"pane-freeze"},componentOptions:{items:[{attributes:{"data-value":"panes","data-command":"FreezePanesCommand"},icon:"pane-freeze",text:r.freezeButtons.freezePanes},{attributes:{"data-value":"rows","data-command":"FreezePanesCommand"},icon:"row-freeze",text:r.freezeButtons.freezeRows},{attributes:{"data-value":"columns","data-command":"FreezePanesCommand"},icon:"column-freeze",text:r.freezeButtons.freezeColumns},{attributes:{"data-value":"unfreeze","data-command":"FreezePanesCommand"},icon:"table-unmerge",text:r.freezeButtons.unfreeze}],commandOn:"click"}},borders:{type:"popupButton",name:"borders",icon:"borders-all",popupComponent:e.spreadsheet.BorderPalette,commandOn:"change",command:"BorderChangeCommand",overflowComponent:{type:"button",dialog:"borders"}},formatCells:{type:"button",dialog:"formatCells",overflow:"never"},hyperlink:{type:"button",name:"hyperlink",dialog:"hyperlink",icon:"link"},toggleGridlines:{type:"button",name:"toggleGridlines",command:"GridLinesChangeCommand",property:"gridLines",value:!0,icon:"borders-none",togglable:!0,selected:!0},insertComment:{type:"button",name:"insertComment",dialog:"insertComment",property:"comment",togglable:!0,icon:"comment"},insertImage:{type:"button",name:"insertImage",dialog:"insertImage",icon:"image"},addColumnLeft:{type:"button",name:"addColumnLeft",command:"AddColumnCommand",value:"left",icon:"table-column-insert-left"},addColumnRight:{type:"button",name:"addColumnRight",command:"AddColumnCommand",value:"right",icon:"table-column-insert-right"},addRowBelow:{type:"button",name:"addRowBelow",command:"AddRowCommand",value:"below",icon:"table-row-insert-below"},addRowAbove:{type:"button",name:"addRowAbove",command:"AddRowCommand",value:"above",icon:"table-row-insert-above"},deleteColumn:{type:"button",name:"deleteColumn",command:"DeleteColumnCommand",icon:"table-column-delete"},deleteRow:{type:"button",name:"deleteRow",command:"DeleteRowCommand",icon:"table-row-delete"},sort:{type:"component",name:"sort",component:"DropDownButton",element:n("sort-desc"),overflowComponent:{type:"button",dialog:"sort",icon:"sort-desc"},componentOptions:{items:[{attributes:{"data-value":"asc","data-command":"SortCommand"},sheet:!1,text:r.sortButtons.sortRangeAsc,icon:"sort-asc"},{attributes:{"data-value":"desc","data-command":"SortCommand"},sheet:!1,text:r.sortButtons.sortRangeDesc,icon:"sort-desc"}],commandOn:"click"}},validation:{type:"button",name:"validation",dialog:"validation",icon:"exclamation-circle"}},c=i.extend({init:function(e,t){Object.keys(l).forEach((function(e){"validation"!==e&&(l[e].showText="overflow")})),t.tools=t.tools||c.prototype.options.tools[t.toolbarName],t.parentMessages=r,t.defaultTools=l,i.fn.init.call(this,e,t);var n=this._click.bind(this);this.element.addClass("k-spreadsheet-toolbar k-toolbar-md"),this.bind({click:n,toggle:n,change:n})},_click:function(e){var t=e.target,n=t.data("property"),i=e.value||t.data("value")||e.target.val(),r=t.data("command"),o=t.data("dialog"),a=t.data("options")||{};if("popup"===i&&(o=t.data("popup")),a.property=n||null,a.value=i||null,o)this.dialog({name:o,options:a});else if(r){var s={command:r,options:a};"boolean"==typeof s.options.value&&(s.options.value=!!e.checked||null),this.action(s)}},events:["action","dialog"],options:{name:"SpreadsheetToolBar",resizable:!0,tools:{home:["open","exportAs","separator",["cut","copy","paste"],"separator","fontFamily","fontSize",["bold","italic","underline"],"separator","textColor","separator","backgroundColor","borders","separator","alignment","textWrap","separator",["formatDecreaseDecimal","formatIncreaseDecimal"],"separator","filter","format","hyperlink","separator","insertImage","insertComment","separator","freeze","merge","toggleGridlines"],insert:[["addColumnLeft","addColumnRight","addRowBelow","addRowAbove"],"separator",["deleteColumn","deleteRow"]],data:["sort","separator","filter","separator","validation"]}},action:function(e){this.trigger("action",e)},dialog:function(e){this.trigger("dialog",e)},refresh:function(t){for(var n=t,i=this._tools(),r=0;r1,this.enable(h,c)):"alignment"===i?(o=n.verticalAlign(),a=n.textAlign(),(s=u.menu.element).find(".k-item .k-link").removeClass("k-selected"),s.find(".k-item[data-property=textAlign][data-value="+a+"] .k-link").addClass("k-selected"),s.find(".k-item[data-property=verticalAlign][data-value="+o+"] .k-link").addClass("k-selected")):"background"===i||"color"===i?p.value(n):"fontFamily"!==i&&"fontSize"!==i||(d=f.find(".k-menu-link-text").text().split("(")[0].trim(),f.find(".k-menu-link-text").text(d+" ("+n+") ..."),p.value(n)),u&&u.toggle&&("boolean"==typeof n?m=!!n:"string"==typeof n&&(m=h.data("value")?h.data("value")===n:null!=n),this.toggle(h,m))}});e.spreadsheet.ToolBar=c,e.spreadsheet.TabStrip=e.ui.TabStrip.extend({init:function(n,i){e.ui.TabStrip.fn.init.call(this,n,i),n.addClass("k-spreadsheet-tabstrip"),this._quickAccessButtons(),this.toolbars={};var r=i.dataSource;this.contentElements.each(function(e,n){this._toolbar(t(n),r[e].id,i.toolbarOptions[r[e].id])}.bind(this)),this.bind("activate",(function(e){t(e.contentElement).find(".k-toolbar").data("kendoSpreadsheetToolBar")._tabIndex(),this.wrapper.removeAttr("tabindex"),this.wrapper.find(".k-tabstrip-content").removeAttr("tabindex")}))},events:e.ui.TabStrip.fn.events.concat(["action","dialog"]),destroy:function(){for(var t in this.quickAccessToolBar.off("click"),e.ui.TabStrip.fn.destroy.call(this),this.toolbars)this.toolbars[t].destroy()},action:function(e){this.trigger("action",e)},dialog:function(e){this.trigger("dialog",e)},refreshTools:function(e,t){var n=this.toolbars;if(!t.overElement&&!t.comment)for(var i in n)n.hasOwnProperty(i)&&n[i].refresh(e)},_quickAccessButtons:function(){var n=[{title:r.quickAccess.undo,icon:"undo",action:"undo"},{title:r.quickAccess.redo,icon:"redo",action:"redo"}],i=e.template("#=kendo.ui.icon(icon)#");this.quickAccessToolBar=t("
                        ",{class:"k-spreadsheet-quick-access-toolbar",html:e.render(i,n)}).insertBefore(this.wrapper),this.quickAccessToolBar.on("click",".k-button",function(e){e.preventDefault();var n=t(e.currentTarget).attr("data-action");this.action({action:n})}.bind(this)),this.quickAccessAdjust()},quickAccessAdjust:function(){this.tabGroup.css("padding-left",e._outerWidth(this.quickAccessToolBar))},_toolbar:function(t,n,i){var r,o;this.toolbars[n]&&(this.toolbars[n].destroy(),t.children(".k-toolbar").remove()),i&&((r=t.html("
                        ").children("div")).attr("aria-label",n),o={tools:"boolean"==typeof i?void 0:i,toolbarName:n,action:this.action.bind(this),dialog:this.dialog.bind(this)},this.toolbars[n]=new e.spreadsheet.ToolBar(r,o))}})}(window.kendo),function(e){var t=e.jQuery,n=e.data.ObservableObject,i=e.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:{justifyLeft:"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...",defaultFileName:"Workbook",xlsx:{description:"Excel Workbook (.xlsx)"},pdf:{description:"Portable Document Format (.pdf)",area:{workbook:"Entire Workbook",sheet:"Active Sheet",selection:"Selection"},paper:{a2:"A2 (420 mm × 594 mm)",a3:"A3 (297 mm x 420 mm)",a4:"A4 (210 mm x 297 mm)",a5:"A5 (148 mm x 210 mm)",b3:"B3 (353 mm × 500 mm)",b4:"B4 (250 mm x 353 mm)",b5:"B5 (176 mm x 250 mm)",folio:'Folio (8.5" x 13")',legal:'Legal (8.5" x 14")',letter:'Letter (8.5" x 11")',tabloid:'Tabloid (11" x 17")',executive:'Executive (7.25" x 10.5")'},margin:{normal:"Normal",narrow:"Narrow",wide:"Wide"}},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."},intersectsArrayDialog:{errorMessage:"You cannot alter part of an array"},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"}},insertCommentDialog:{title:"Insert comment",labels:{comment:"Comment",removeComment:"Remove comment"}},insertImageDialog:{title:"Insert image",info:"Drag an image here, or click to select",typeError:"Please select a JPEG, PNG or GIF image"}},r={};e.spreadsheet.dialogs={register:function(e,t){r[e]=t},registered:function(e){return!!r[e]},create:function(e,t){var n=r[e];if(n)return new n(t)}};var o=e.spreadsheet.SpreadsheetDialog=e.Observable.extend({init:function(n){e.Observable.fn.init.call(this,n),this.options=H(t.extend(!0,{},this.options,n)),this.bind(this.events,n)},events:["close","activate"],options:{autoFocus:!0},dialog:function(){if(!this._dialog){var n={autoFocus:!1,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)};this._dialog=t("
                        ").addClass(this.options.className||"").append(e.template(this.options.template)({messages:e.spreadsheet.messages.dialogs||i,ns:e.ns,errors:this.options.errors})).kendoWindow(n).data("kendoWindow")}return 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(),this.dialog().element.find(".k-button-solid-primary").trigger("focus")},apply:function(){this.close()},close:function(){this._action="close",this.dialog().close()}});function a(t,n){return e.spreadsheet.formatting.text(t,n)}var s=e.spreadsheet.FormatCellsViewModel=n.extend({init:function(e){n.fn.init.call(this,e),this.useCategory(this.category)},useCategory:function(e){var t=e&&e.type||"number",n="currency"==t;this.category=e,this.set("showCurrencyFilter",n&&this.currencies.length>1),n?this.currency(this.currencies[0]):this.set("formats",this.allFormats[t+"Formats"]),this.useFirstFormat()},useFirstFormat:function(){this.formats.length&&this.set("format",this.formats[0].value)},currency:function(e){if(void 0!==e){this._currency=e;var t=e.value,n=[{currency:t,decimals:!0},{currency:t,decimals:!0,iso:!0},{currency:t,decimals:!1}];n=n.map((function(e){return{value:e=s.convert.currency(e),name:a(1e3,e)}})),this.set("formats",n),this.useFirstFormat()}return this._currency||this.currencies[0]},categoryFilter:function(e){return void 0!==e&&this.useCategory(e),this.category},preview:function(){var e=this.get("format"),t=this.value||0;return e&&e.length?a(t,e):t}});function l(e,n){for(var i=[],r=[],o=0;o