kendo.dataviz.min.js
1.03 MB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
* Kendo UI v2016.1.112 (http://www.telerik.com/kendo-ui)
* Copyright 2016 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial license terms.
*/
!function(t,define){define("kendo.core.min",["jquery.min"],t)}(function(){return function(t,e,n){function i(){}function o(t,e){if(e)return"'"+t.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var n=t.charAt(0),i=t.substring(1);return"="===n?"+("+i+")+":":"===n?"+$kendoHtmlEncode("+i+")+":";"+t+";$kendoOutput+="}function r(t,e,n){return t+="",e=e||2,n=e-t.length,n?U[e].substring(0,n)+t:t}function s(t){var e=t.css(vt.support.transitions.css+"box-shadow")||t.css("box-shadow"),n=e?e.match(Dt)||[0,0,0,0,0]:[0,0,0,0,0],i=kt.max(+n[3],+(n[4]||0));return{left:-n[1]+i,right:+n[1]+i,bottom:+n[2]+i}}function a(e,n){var i,o,r,a,l,c,h,u,d=St.browser,f="rtl"==e.css("direction");return e.parent().hasClass("k-animation-container")?(h=e.parent(".k-animation-container"),u=h[0].style,h.is(":hidden")&&h.show(),i=Tt.test(u.width)||Tt.test(u.height),i||h.css({width:e.outerWidth(),height:e.outerHeight(),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})):(o=s(e),r=e[0].style.width,a=e[0].style.height,l=Tt.test(r),c=Tt.test(a),d.opera&&(o.left=o.right=o.bottom=5),i=l||c,!l&&(!n||n&&r)&&(r=e.outerWidth()),!c&&(!n||n&&a)&&(a=e.outerHeight()),e.wrap(t("<div/>").addClass("k-animation-container").css({width:r,height:a,marginLeft:o.left*(f?1:-1),paddingLeft:o.left,paddingRight:o.right,paddingBottom:o.bottom})),i&&e.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),d.msie&&kt.floor(d.version)<=7&&(e.css({zoom:1}),e.children(".k-menu").width(e.width())),e.parent()}function l(t){var e=1,n=arguments.length;for(e=1;n>e;e++)c(t,arguments[e]);return t}function c(t,e){var n,i,o,r,s,a=vt.data.ObservableArray,l=vt.data.LazyObservableArray,h=vt.data.DataSource,u=vt.data.HierarchicalDataSource;for(n in e)i=e[n],o=typeof i,r=o===It&&null!==i?i.constructor:null,r&&r!==Array&&r!==a&&r!==l&&r!==h&&r!==u?i instanceof Date?t[n]=new Date(i.getTime()):B(i.clone)?t[n]=i.clone():(s=t[n],t[n]=typeof s===It?s||{}:{},c(t[n],i)):o!==Rt&&(t[n]=i);return t}function h(t,e,i){for(var o in e)if(e.hasOwnProperty(o)&&e[o].test(t))return o;return i!==n?i:t}function u(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function d(t){return t.replace(/\-(\w)/g,function(t,e){return e.toUpperCase()})}function f(e,n){var i,o={};return document.defaultView&&document.defaultView.getComputedStyle?(i=document.defaultView.getComputedStyle(e,""),n&&t.each(n,function(t,e){o[e]=i.getPropertyValue(e)})):(i=e.currentStyle,n&&t.each(n,function(t,e){o[e]=i[d(e)]})),vt.size(o)||(o=i),o}function p(t){if(t&&t.className&&"string"==typeof t.className&&t.className.indexOf("k-auto-scrollable")>-1)return!0;var e=f(t,["overflow"]).overflow;return"auto"==e||"scroll"==e}function g(e,i){var o,r=St.browser.webkit,s=St.browser.mozilla,a=e instanceof t?e[0]:e;if(e)return o=St.isRtl(e),i===n?o&&r?a.scrollWidth-a.clientWidth-a.scrollLeft:Math.abs(a.scrollLeft):(a.scrollLeft=o&&r?a.scrollWidth-a.clientWidth-i:o&&s?-i:i,n)}function m(t){var e,n=0;for(e in t)t.hasOwnProperty(e)&&"toJSON"!=e&&n++;return n}function v(t,n,i){n||(n="offset");var o=t[n]();return St.browser.msie&&(St.pointers||St.msPointers)&&!i&&(o.top-=e.pageYOffset-document.documentElement.scrollTop,o.left-=e.pageXOffset-document.documentElement.scrollLeft),o}function y(t){var e={};return _t("string"==typeof t?t.split(" "):t,function(t){e[t]=this}),e}function _(t){return new vt.effects.Element(t)}function w(t,e,n,i){return typeof t===Et&&(B(e)&&(i=e,e=400,n=!1),B(n)&&(i=n,n=!1),typeof e===Lt&&(n=e,e=400),t={effects:t,duration:e,reverse:n,complete:i}),yt({effects:{},duration:400,reverse:!1,init:bt,teardown:bt,hide:!1},t,{completeCallback:t.complete,complete:bt})}function x(e,n,i,o,r){for(var s,a=0,l=e.length;l>a;a++)s=t(e[a]),s.queue(function(){G.promise(s,w(n,i,o,r))});return e}function b(t,e,n,i){return e&&(e=e.split(" "),_t(e,function(e,n){t.toggleClass(n,i)})),t}function k(t){return(""+t).replace(W,"&").replace(q,"<").replace(X,">").replace($,""").replace(Y,"'")}function C(t,e){var i;return 0===e.indexOf("data")&&(e=e.substring(4),e=e.charAt(0).toLowerCase()+e.substring(1)),e=e.replace(ot,"-$1"),i=t.getAttribute("data-"+vt.ns+e),null===i?i=n:"null"===i?i=null:"true"===i?i=!0:"false"===i?i=!1:Pt.test(i)?i=parseFloat(i):nt.test(i)&&!it.test(i)&&(i=Function("return ("+i+")")()),i}function S(e,i){var o,r,s={};for(o in i)r=C(e,o),r!==n&&(et.test(o)&&(r=vt.template(t("#"+r).html())),s[o]=r);return s}function T(e,n){return t.contains(e,n)?-1:1}function A(){var e=t(this);return t.inArray(e.attr("data-"+vt.ns+"role"),["slider","rangeslider"])>-1||e.is(":visible")}function D(t,e){var n=t.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!t.disabled:"a"===n?t.href||e:e)&&P(t)}function P(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}function M(t,e){return new M.fn.init(t,e)}var E,B,I,z,L,R,O,F,V,N,H,U,j,G,W,q,$,Y,X,Q,K,Z,J,tt,et,nt,it,ot,rt,st,at,lt,ct,ht,ut,dt,ft,pt,gt,mt,vt=e.kendo=e.kendo||{cultures:{}},yt=t.extend,_t=t.each,wt=t.isArray,xt=t.proxy,bt=t.noop,kt=Math,Ct=e.JSON||{},St={},Tt=/%/,At=/\{(\d+)(:[^\}]+)?\}/g,Dt=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,Pt=/^(\+|-?)\d+(\.?)\d*$/,Mt="function",Et="string",Bt="number",It="object",zt="null",Lt="boolean",Rt="undefined",Ot={},Ft={},Vt=[].slice;vt.version="2016.1.112".replace(/^\s+|\s+$/g,""),i.extend=function(t){var e,n,i=function(){},o=this,r=t&&t.init?t.init:function(){o.apply(this,arguments)};i.prototype=o.prototype,n=r.fn=r.prototype=new i;for(e in t)n[e]=null!=t[e]&&t[e].constructor===Object?yt(!0,{},i.prototype[e],t[e]):t[e];return n.constructor=r,r.extend=o.extend,r},i.prototype._initOptions=function(t){this.options=l({},this.options,t)},B=vt.isFunction=function(t){return"function"==typeof t},I=function(){this._defaultPrevented=!0},z=function(){return this._defaultPrevented===!0},L=i.extend({init:function(){this._events={}},bind:function(t,e,i){var o,r,s,a,l,c=this,h=typeof t===Et?[t]:t,u=typeof e===Mt;if(e===n){for(o in t)c.bind(o,t[o]);return c}for(o=0,r=h.length;r>o;o++)t=h[o],a=u?e:e[t],a&&(i&&(s=a,a=function(){c.unbind(t,a),s.apply(c,arguments)},a.original=s),l=c._events[t]=c._events[t]||[],l.push(a));return c},one:function(t,e){return this.bind(t,e,!0)},first:function(t,e){var n,i,o,r,s=this,a=typeof t===Et?[t]:t,l=typeof e===Mt;for(n=0,i=a.length;i>n;n++)t=a[n],o=l?e:e[t],o&&(r=s._events[t]=s._events[t]||[],r.unshift(o));return s},trigger:function(t,e){var n,i,o=this,r=o._events[t];if(r){for(e=e||{},e.sender=o,e._defaultPrevented=!1,e.preventDefault=I,e.isDefaultPrevented=z,r=r.slice(),n=0,i=r.length;i>n;n++)r[n].call(o,e);return e._defaultPrevented===!0}return!1},unbind:function(t,e){var i,o=this,r=o._events[t];if(t===n)o._events={};else if(r)if(e)for(i=r.length-1;i>=0;i--)(r[i]===e||r[i].original===e)&&r.splice(i,1);else o._events[t]=[];return o}}),R=/^\w+/,O=/\$\{([^}]*)\}/g,F=/\\\}/g,V=/__CURLY__/g,N=/\\#/g,H=/__SHARP__/g,U=["","0","00","000","0000"],E={paramName:"data",useWithBlock:!0,render:function(t,e){var n,i,o="";for(n=0,i=e.length;i>n;n++)o+=t(e[n]);return o},compile:function(t,e){var n,i,r,s=yt({},this,e),a=s.paramName,l=a.match(R)[0],c=s.useWithBlock,h="var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;";if(B(t))return t;for(h+=c?"with("+a+"){":"",h+="$kendoOutput=",i=t.replace(F,"__CURLY__").replace(O,"#=$kendoHtmlEncode($1)#").replace(V,"}").replace(N,"__SHARP__").split("#"),r=0;i.length>r;r++)h+=o(i[r],r%2===0);h+=c?";}":";",h+="return $kendoOutput;",h=h.replace(H,"#");try{return n=Function(l,h),n._slotCount=Math.floor(i.length/2),n}catch(u){throw Error(vt.format("Invalid template:'{0}' Generated code:'{1}'",t,h))}}},function(){function t(t){return s.lastIndex=0,s.test(t)?'"'+t.replace(s,function(t){var e=a[t];return typeof e===Et?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function e(r,s){var a,c,h,u,d,f,p=n,g=s[r];if(g&&typeof g===It&&typeof g.toJSON===Mt&&(g=g.toJSON(r)),typeof o===Mt&&(g=o.call(s,r,g)),f=typeof g,f===Et)return t(g);if(f===Bt)return isFinite(g)?g+"":zt;if(f===Lt||f===zt)return g+"";if(f===It){if(!g)return zt;if(n+=i,d=[],"[object Array]"===l.apply(g)){for(u=g.length,a=0;u>a;a++)d[a]=e(a,g)||zt;return h=0===d.length?"[]":n?"[\n"+n+d.join(",\n"+n)+"\n"+p+"]":"["+d.join(",")+"]",n=p,h}if(o&&typeof o===It)for(u=o.length,a=0;u>a;a++)typeof o[a]===Et&&(c=o[a],h=e(c,g),h&&d.push(t(c)+(n?": ":":")+h));else for(c in g)Object.hasOwnProperty.call(g,c)&&(h=e(c,g),h&&d.push(t(c)+(n?": ":":")+h));return h=0===d.length?"{}":n?"{\n"+n+d.join(",\n"+n)+"\n"+p+"}":"{"+d.join(",")+"}",n=p,h}}var n,i,o,s=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l={}.toString;typeof Date.prototype.toJSON!==Mt&&(Date.prototype.toJSON=function(){var t=this;return isFinite(t.valueOf())?r(t.getUTCFullYear(),4)+"-"+r(t.getUTCMonth()+1)+"-"+r(t.getUTCDate())+"T"+r(t.getUTCHours())+":"+r(t.getUTCMinutes())+":"+r(t.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),typeof Ct.stringify!==Mt&&(Ct.stringify=function(t,r,s){var a;if(n="",i="",typeof s===Bt)for(a=0;s>a;a+=1)i+=" ";else typeof s===Et&&(i=s);if(o=r,r&&typeof r!==Mt&&(typeof r!==It||typeof r.length!==Bt))throw Error("JSON.stringify");return e("",{"":t})})}(),function(){function t(t){if(t){if(t.numberFormat)return t;if(typeof t===Et){var e=vt.cultures;return e[t]||e[t.split("-")[0]]||null}return null}return null}function e(e){return e&&(e=t(e)),e||vt.cultures.current}function i(t,i,o){o=e(o);var s=o.calendars.standard,a=s.days,l=s.months;return i=s.patterns[i]||i,i.replace(c,function(e){var i,o,c;return"d"===e?o=t.getDate():"dd"===e?o=r(t.getDate()):"ddd"===e?o=a.namesAbbr[t.getDay()]:"dddd"===e?o=a.names[t.getDay()]:"M"===e?o=t.getMonth()+1:"MM"===e?o=r(t.getMonth()+1):"MMM"===e?o=l.namesAbbr[t.getMonth()]:"MMMM"===e?o=l.names[t.getMonth()]:"yy"===e?o=r(t.getFullYear()%100):"yyyy"===e?o=r(t.getFullYear(),4):"h"===e?o=t.getHours()%12||12:"hh"===e?o=r(t.getHours()%12||12):"H"===e?o=t.getHours():"HH"===e?o=r(t.getHours()):"m"===e?o=t.getMinutes():"mm"===e?o=r(t.getMinutes()):"s"===e?o=t.getSeconds():"ss"===e?o=r(t.getSeconds()):"f"===e?o=kt.floor(t.getMilliseconds()/100):"ff"===e?(o=t.getMilliseconds(),o>99&&(o=kt.floor(o/10)),o=r(o)):"fff"===e?o=r(t.getMilliseconds(),3):"tt"===e?o=t.getHours()<12?s.AM[0]:s.PM[0]:"zzz"===e?(i=t.getTimezoneOffset(),c=0>i,o=(""+kt.abs(i/60)).split(".")[0],i=kt.abs(i)-60*o,o=(c?"+":"-")+r(o),o+=":"+r(i)):("zz"===e||"z"===e)&&(o=t.getTimezoneOffset()/60,c=0>o,o=(""+kt.abs(o)).split(".")[0],o=(c?"+":"-")+("zz"===e?r(o):o)),o!==n?o:e.slice(1,e.length-1)})}function o(t,i,o){o=e(o);var r,l,c,_,w,x,b,k,C,S,T,A,D,P,M,E,B,I,z,L,R,O,F,V=o.numberFormat,N=V[p],H=V.decimals,U=V.pattern[0],j=[],G=0>t,W=f,q=f,$=-1;if(t===n)return f;if(!isFinite(t))return t;if(!i)return o.name.length?t.toLocaleString():""+t;if(w=h.exec(i)){if(i=w[1].toLowerCase(),l="c"===i,c="p"===i,(l||c)&&(V=l?V.currency:V.percent,N=V[p],H=V.decimals,r=V.symbol,U=V.pattern[G?0:1]),_=w[2],_&&(H=+_),"e"===i)return _?t.toExponential(H):t.toExponential();if(c&&(t*=100),t=a(t,H),G=0>t,t=t.split(p),x=t[0],b=t[1],G&&(x=x.substring(1)),q=s(x,0,x.length,V),b&&(q+=N+b),"n"===i&&!G)return q;for(t=f,S=0,T=U.length;T>S;S++)A=U.charAt(S),t+="n"===A?q:"$"===A||"%"===A?r:A;return t}if(G&&(t=-t),(i.indexOf("'")>-1||i.indexOf('"')>-1||i.indexOf("\\")>-1)&&(i=i.replace(u,function(t){var e=t.charAt(0).replace("\\",""),n=t.slice(1).replace(e,"");return j.push(n),y})),i=i.split(";"),G&&i[1])i=i[1],P=!0;else if(0===t){if(i=i[2]||i[0],-1==i.indexOf(m)&&-1==i.indexOf(v))return i}else i=i[0];if(L=i.indexOf("%"),R=i.indexOf("$"),c=-1!=L,l=-1!=R,c&&(t*=100),l&&"\\"===i[R-1]&&(i=i.split("\\").join(""),l=!1),(l||c)&&(V=l?V.currency:V.percent,N=V[p],H=V.decimals,r=V.symbol),D=i.indexOf(g)>-1,D&&(i=i.replace(d,f)),M=i.indexOf(p),T=i.length,-1!=M?(b=(""+t).split("e"),b=b[1]?a(t,Math.abs(b[1])):b[0],b=b.split(p)[1]||f,B=i.lastIndexOf(v)-M,E=i.lastIndexOf(m)-M,I=B>-1,z=E>-1,S=b.length,I||z||(i=i.substring(0,M)+i.substring(M+1),T=i.length,M=-1,S=0),I&&B>E?S=B:E>B&&(z&&S>E?S=E:I&&B>S&&(S=B)),S>-1&&(t=a(t,S))):t=a(t),E=i.indexOf(m),O=B=i.indexOf(v),$=-1==E&&-1!=B?B:-1!=E&&-1==B?E:E>B?B:E,E=i.lastIndexOf(m),B=i.lastIndexOf(v),F=-1==E&&-1!=B?B:-1!=E&&-1==B?E:E>B?E:B,$==T&&(F=$),-1!=$){for(q=(""+t).split(p),x=q[0],b=q[1]||f,k=x.length,C=b.length,G&&-1*t>=0&&(G=!1),t=i.substring(0,$),G&&!P&&(t+="-"),S=$;T>S;S++){if(A=i.charAt(S),-1==M){if(k>F-S){t+=x;break}}else if(-1!=B&&S>B&&(W=f),k>=M-S&&M-S>-1&&(t+=x,S=M),M===S){t+=(b?N:f)+b,S+=F-M+1;continue}A===v?(t+=A,W=A):A===m&&(t+=W)}if(D&&(t=s(t,$,F,V)),F>=$&&(t+=i.substring(F+1)),l||c){for(q=f,S=0,T=t.length;T>S;S++)A=t.charAt(S),q+="$"===A||"%"===A?r:A;t=q}if(T=j.length)for(S=0;T>S;S++)t=t.replace(y,j[S])}return t}var s,a,l,c=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|zzz|zz|z|"[^"]*"|'[^']*'/g,h=/^(n|c|p|e)(\d*)$/i,u=/(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,d=/\,/g,f="",p=".",g=",",m="#",v="0",y="??",_="en-US",w={}.toString;vt.cultures["en-US"]={name:_,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{name:"US Dollar",abbr:"USD",pattern:["($n)","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"$"}},calendars:{standard:{days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December"],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",F:"dddd, MMMM dd, yyyy h:mm:ss tt",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",m:"MMMM dd",M:"MMMM dd",s:"yyyy'-'MM'-'ddTHH':'mm':'ss",t:"h:mm tt",T:"h:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":"/",":":":",firstDay:0,twoDigitYearMax:2029}}},vt.culture=function(e){var i,o=vt.cultures;return e===n?o.current:(i=t(e)||o[_],i.calendar=i.calendars.standard,o.current=i,n)},vt.findCulture=t,vt.getCulture=e,vt.culture(_),s=function(t,e,i,o){var r,s,a,l,c,h,u=t.indexOf(o[p]),d=o.groupSize.slice(),f=d.shift();if(i=-1!==u?u:i+1,r=t.substring(e,i),s=r.length,s>=f){for(a=s,l=[];a>-1;)if(c=r.substring(a-f,a),c&&l.push(c),a-=f,h=d.shift(),f=h!==n?h:f,0===f){l.push(r.substring(0,a));break}r=l.reverse().join(o[g]),t=t.substring(0,e)+r+t.substring(i)}return t},a=function(t,e){return e=e||0,t=(""+t).split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]+e:e))),t=(""+t).split("e"),t=+(t[0]+"e"+(t[1]?+t[1]-e:-e)),t.toFixed(e)},l=function(t,e,r){if(e){if("[object Date]"===w.call(t))return i(t,e,r);if(typeof t===Bt)return o(t,e,r)}return t!==n?t:""},vt.format=function(t){var e=arguments;return t.replace(At,function(t,n,i){var o=e[parseInt(n,10)+1];return l(o,i?i.substring(1):"")})},vt._extractFormat=function(t){return"{0:"===t.slice(0,3)&&(t=t.slice(3,t.length-1)),t},vt._activeElement=function(){try{return document.activeElement}catch(t){return document.documentElement.activeElement}},vt._round=a,vt.toString=l}(),function(){function e(t,e,n){return!(t>=e&&n>=t)}function i(t){return t.charAt(0)}function o(e){return t.map(e,i)}function r(t,e){e||23!==t.getHours()||t.setHours(t.getHours()+2)}function s(t){for(var e=0,n=t.length,i=[];n>e;e++)i[e]=(t[e]+"").toLowerCase();return i}function a(t){var e,n={};for(e in t)n[e]=s(t[e]);return n}function l(t,i,s){if(!t)return null;var l,c,h,u,p,g,m,y,_,w,x,b,k,C=function(t){for(var e=0;i[R]===t;)e++,R++;return e>0&&(R-=1),e},S=function(e){var n=v[e]||RegExp("^\\d{1,"+e+"}"),i=t.substr(O,e).match(n);return i?(i=i[0],O+=i.length,parseInt(i,10)):null},T=function(e,n){for(var i,o,r,s=0,a=e.length,l=0,c=0;a>s;s++)i=e[s],o=i.length,r=t.substr(O,o),n&&(r=r.toLowerCase()),r==i&&o>l&&(l=o,c=s);return l?(O+=l,c+1):null},A=function(){var e=!1;return t.charAt(O)===i[R]&&(O++,e=!0),e},D=s.calendars.standard,P=null,M=null,E=null,B=null,I=null,z=null,L=null,R=0,O=0,F=!1,V=new Date,N=D.twoDigitYearMax||2029,H=V.getFullYear();for(i||(i="d"),u=D.patterns[i],u&&(i=u),i=i.split(""),h=i.length;h>R;R++)if(l=i[R],F)"'"===l?F=!1:A();else if("d"===l){if(c=C("d"),D._lowerDays||(D._lowerDays=a(D.days)),null!==E&&c>2)continue;if(E=3>c?S(2):T(D._lowerDays[3==c?"namesAbbr":"names"],!0),null===E||e(E,1,31))return null}else if("M"===l){if(c=C("M"),D._lowerMonths||(D._lowerMonths=a(D.months)),M=3>c?S(2):T(D._lowerMonths[3==c?"namesAbbr":"names"],!0),null===M||e(M,1,12))return null;M-=1}else if("y"===l){if(c=C("y"),P=S(c),null===P)return null;2==c&&("string"==typeof N&&(N=H+parseInt(N,10)),P=H-H%100+P,P>N&&(P-=100))}else if("h"===l){if(C("h"),B=S(2),12==B&&(B=0),null===B||e(B,0,11))return null}else if("H"===l){if(C("H"),B=S(2),null===B||e(B,0,23))return null}else if("m"===l){if(C("m"),I=S(2),null===I||e(I,0,59))return null}else if("s"===l){if(C("s"),z=S(2),null===z||e(z,0,59))return null}else if("f"===l){if(c=C("f"),k=t.substr(O,c).match(v[3]),L=S(c),null!==L&&(L=parseFloat("0."+k[0],10),L=vt._round(L,3),L*=1e3),null===L||e(L,0,999))return null}else if("t"===l){if(c=C("t"),y=D.AM,_=D.PM,1===c&&(y=o(y),_=o(_)),p=T(_),!p&&!T(y))return null}else if("z"===l){if(g=!0,c=C("z"),"Z"===t.substr(O,1)){A();continue}if(m=t.substr(O,6).match(c>2?f:d),!m)return null;if(m=m[0].split(":"),w=m[0],x=m[1],!x&&w.length>3&&(O=w.length-2,x=w.substring(O),w=w.substring(0,O)),w=parseInt(w,10),e(w,-12,13))return null;if(c>2&&(x=parseInt(x,10),isNaN(x)||e(x,0,59)))return null}else if("'"===l)F=!0,A();else if(!A())return null;return b=null!==B||null!==I||z||null,null===P&&null===M&&null===E&&b?(P=H,M=V.getMonth(),E=V.getDate()):(null===P&&(P=H),null===E&&(E=1)),p&&12>B&&(B+=12),g?(w&&(B+=-w),x&&(I+=-x),t=new Date(Date.UTC(P,M,E,B,I,z,L))):(t=new Date(P,M,E,B,I,z,L),r(t,B)),100>P&&t.setFullYear(P),t.getDate()!==E&&g===n?null:t}function c(t){var e="-"===t.substr(0,1)?-1:1;return t=t.substring(1),t=60*parseInt(t.substr(0,2),10)+parseInt(t.substring(2),10),e*t}var h=/\u00A0/g,u=/[eE][\-+]?[0-9]+/,d=/[+|\-]\d{1,2}/,f=/[+|\-]\d{1,2}:?\d{2}/,p=/^\/Date\((.*?)\)\/$/,g=/[+-]\d*/,m=["G","g","d","F","D","y","m","T","t"],v={2:/^\d{1,2}/,3:/^\d{1,3}/,4:/^\d{4}/},y={}.toString;vt.parseDate=function(t,e,n){var i,o,r,s,a;if("[object Date]"===y.call(t))return t;if(i=0,o=null,t&&0===t.indexOf("/D")&&(o=p.exec(t)))return o=o[1],a=g.exec(o.substring(1)),o=new Date(parseInt(o,10)),a&&(a=c(a[0]),o=vt.timezone.apply(o,0),o=vt.timezone.convert(o,0,-1*a)),o;if(n=vt.getCulture(n),!e){for(e=[],s=n.calendar.patterns,r=m.length;r>i;i++)e[i]=s[m[i]];i=0,e=["yyyy/MM/dd HH:mm:ss","yyyy/MM/dd HH:mm","yyyy/MM/dd","ddd MMM dd yyyy HH:mm:ss","yyyy-MM-ddTHH:mm:ss.fffffffzzz","yyyy-MM-ddTHH:mm:ss.fffzzz","yyyy-MM-ddTHH:mm:sszzz","yyyy-MM-ddTHH:mm:ss.fffffff","yyyy-MM-ddTHH:mm:ss.fff","yyyy-MM-ddTHH:mmzzz","yyyy-MM-ddTHH:mmzz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","yyyy-MM-dd","HH:mm:ss","HH:mm"].concat(e)}for(e=wt(e)?e:[e],r=e.length;r>i;i++)if(o=l(t,e[i],n))return o;return o},vt.parseInt=function(t,e){var n=vt.parseFloat(t,e);return n&&(n=0|n),n},vt.parseFloat=function(t,e,n){if(!t&&0!==t)return null;if(typeof t===Bt)return t;t=""+t,e=vt.getCulture(e);var i,o,r=e.numberFormat,s=r.percent,a=r.currency,l=a.symbol,c=s.symbol,d=t.indexOf("-");return u.test(t)?(t=parseFloat(t.replace(r["."],".")),isNaN(t)&&(t=null),t):d>0?null:(d=d>-1,t.indexOf(l)>-1||n&&n.toLowerCase().indexOf("c")>-1?(r=a,i=r.pattern[0].replace("$",l).split("n"),t.indexOf(i[0])>-1&&t.indexOf(i[1])>-1&&(t=t.replace(i[0],"").replace(i[1],""),d=!0)):t.indexOf(c)>-1&&(o=!0,r=s,l=c),t=t.replace("-","").replace(l,"").replace(h," ").split(r[","].replace(h," ")).join("").replace(r["."],"."),t=parseFloat(t),isNaN(t)?t=null:d&&(t*=-1),t&&o&&(t/=100),t)}}(),function(){var i,o,r,s,a,l,c;St._scrollbar=n,St.scrollbar=function(t){if(isNaN(St._scrollbar)||t){var e,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),St._scrollbar=e=n.offsetWidth-n.scrollWidth,document.body.removeChild(n),e}return St._scrollbar},St.isRtl=function(e){return t(e).closest(".k-rtl").length>0},i=document.createElement("table");try{i.innerHTML="<tr><td></td></tr>",St.tbodyInnerHtml=!0}catch(u){St.tbodyInnerHtml=!1}St.touch="ontouchstart"in e,St.msPointers=e.MSPointerEvent,St.pointers=e.PointerEvent,o=St.transitions=!1,r=St.transforms=!1,s="HTMLElement"in e?HTMLElement.prototype:[],St.hasHW3D="WebKitCSSMatrix"in e&&"m11"in new e.WebKitCSSMatrix||"MozPerspective"in document.documentElement.style||"msPerspective"in document.documentElement.style,_t(["Moz","webkit","O","ms"],function(){var t,e=""+this,s=typeof i.style[e+"Transition"]===Et;return s||typeof i.style[e+"Transform"]===Et?(t=e.toLowerCase(),r={css:"ms"!=t?"-"+t+"-":"",prefix:e,event:"o"===t||"webkit"===t?t:""},s&&(o=r,o.event=o.event?o.event+"TransitionEnd":"transitionend"),!1):n}),i=null,St.transforms=r,St.transitions=o,St.devicePixelRatio=e.devicePixelRatio===n?1:e.devicePixelRatio;try{St.screenWidth=e.outerWidth||e.screen?e.screen.availWidth:e.innerWidth,St.screenHeight=e.outerHeight||e.screen?e.screen.availHeight:e.innerHeight}catch(u){St.screenWidth=e.screen.availWidth,St.screenHeight=e.screen.availHeight}St.detectOS=function(t){var n,i,o=!1,r=[],s=!/mobile safari/i.test(t),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/},l={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},c={tablet:/playbook|ipad|fire/i},u={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(i in a)if(a.hasOwnProperty(i)&&(r=t.match(a[i]))){if("windows"==i&&"plugins"in navigator)return!1;o={},o.device=i,o.tablet=h(i,c,!1),o.browser=h(t,u,"default"),o.name=h(i,l),o[o.name]=!0,o.majorVersion=r[2],o.minorVersion=r[3].replace("_","."),n=o.minorVersion.replace(".","").substr(0,2),o.flatVersion=o.majorVersion+n+Array(3-(3>n.length?n.length:2)).join("0"),o.cordova=typeof e.PhoneGap!==Rt||typeof e.cordova!==Rt,o.appMode=e.navigator.standalone||/file|local|wmapp/.test(e.location.protocol)||o.cordova,o.android&&(1.5>St.devicePixelRatio&&400>o.flatVersion||s)&&(St.screenWidth>800||St.screenHeight>800)&&(o.tablet=i);break}return o},a=St.mobileOS=St.detectOS(navigator.userAgent),St.wpDevicePixelRatio=a.wp?screen.width/320:0,St.kineticScrollNeeded=a&&(St.touch||St.msPointers||St.pointers),St.hasNativeScrolling=!1,(a.ios||a.android&&a.majorVersion>2||a.wp)&&(St.hasNativeScrolling=a),St.delayedClick=function(){if(St.touch){if(a.ios)return!0;if(a.android)return St.browser.chrome?32>St.browser.version?!1:!(t("meta[name=viewport]").attr("content")||"").match(/user-scalable=no/i):!0}return!1},St.mouseAndTouchPresent=St.touch&&!(St.mobileOS.ios||St.mobileOS.android),St.detectBrowser=function(t){var e,n=!1,i=[],o={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(e in o)if(o.hasOwnProperty(e)&&(i=t.match(o[e]))){n={},n[e]=!0,n[i[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,n.version=parseInt(document.documentMode||i[2],10);break}return n},St.browser=St.detectBrowser(navigator.userAgent),St.detectClipboardAccess=function(){var t={copy:document.queryCommandSupported?document.queryCommandSupported("copy"):!1,cut:document.queryCommandSupported?document.queryCommandSupported("cut"):!1,paste:document.queryCommandSupported?document.queryCommandSupported("paste"):!1};return St.browser.chrome&&St.browser.version>=43&&(t.copy=!0,t.cut=!0),t},St.clipboard=St.detectClipboardAccess(),St.zoomLevel=function(){var t,n,i;try{return t=St.browser,n=0,i=document.documentElement,t.msie&&11==t.version&&i.scrollHeight>i.clientHeight&&!St.touch&&(n=St.scrollbar()),St.touch?i.clientWidth/e.innerWidth:t.msie&&t.version>=10?((top||e).document.documentElement.offsetWidth+n)/(top||e).innerWidth:1}catch(o){return 1}},St.cssBorderSpacing=n!==document.documentElement.style.borderSpacing&&!(St.browser.msie&&8>St.browser.version),function(e){var n="",i=t(document.documentElement),o=parseInt(e.version,10);e.msie?n="ie":e.mozilla?n="ff":e.safari?n="safari":e.webkit?n="webkit":e.opera?n="opera":e.edge&&(n="edge"),n&&(n="k-"+n+" k-"+n+o),St.mobileOS&&(n+=" k-mobile"),i.addClass(n)}(St.browser),St.eventCapture=document.documentElement.addEventListener,l=document.createElement("input"),St.placeholder="placeholder"in l,St.propertyChangeEvent="onpropertychange"in l,St.input=function(){for(var t,e=["number","date","time","month","week","datetime","datetime-local"],n=e.length,i="test",o={},r=0;n>r;r++)t=e[r],l.setAttribute("type",t),l.value=i,o[t.replace("-","")]="text"!==l.type&&l.value!==i;return o}(),l.style.cssText="float:left;",St.cssFloat=!!l.style.cssFloat,l=null,St.stableSort=function(){var t,e=513,n=[{index:0,field:"b"}];for(t=1;e>t;t++)n.push({index:t,field:"a"});return n.sort(function(t,e){return t.field>e.field?1:e.field>t.field?-1:0}),1===n[0].index}(),St.matchesSelector=s.webkitMatchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.matchesSelector||s.matches||function(e){for(var n=document.querySelectorAll?(this.parentNode||document).querySelectorAll(e)||[]:t(e),i=n.length;i--;)if(n[i]==this)return!0;return!1},St.pushState=e.history&&e.history.pushState,c=document.documentMode,St.hashChange="onhashchange"in e&&!(St.browser.msie&&(!c||8>=c)),St.customElements="registerElement"in e.document}(),j={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}},G={},t.extend(G,{enabled:!0,Element:function(e){this.element=t(e)},promise:function(t,e){t.is(":visible")||t.css({display:t.data("olddisplay")||"block"}).css("display"),e.hide&&t.data("olddisplay",t.css("display")).hide(),e.init&&e.init(),e.completeCallback&&e.completeCallback(t),t.dequeue()},disable:function(){this.enabled=!1,this.promise=this.promiseShim},enable:function(){this.enabled=!0,this.promise=this.animatedPromise}}),G.promiseShim=G.promise,"kendoAnimate"in t.fn||yt(t.fn,{kendoStop:function(t,e){return this.stop(t,e)},kendoAnimate:function(t,e,n,i){return x(this,t,e,n,i)},kendoAddClass:function(t,e){return vt.toggleClass(this,t,e,!0)},kendoRemoveClass:function(t,e){return vt.toggleClass(this,t,e,!1)},kendoToggleClass:function(t,e,n){return vt.toggleClass(this,t,e,n)}}),W=/&/g,q=/</g,$=/"/g,Y=/'/g,X=/>/g,Q=function(t){return t.target},St.touch&&(Q=function(t){var e="originalEvent"in t?t.originalEvent.changedTouches:"changedTouches"in t?t.changedTouches:null;return e?document.elementFromPoint(e[0].clientX,e[0].clientY):t.target},_t(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(e,n){t.fn[n]=function(t){return this.bind(n,t)}})),St.touch?St.mobileOS?(St.mousedown="touchstart",St.mouseup="touchend",St.mousemove="touchmove",St.mousecancel="touchcancel",St.click="touchend",St.resize="orientationchange"):(St.mousedown="mousedown touchstart",St.mouseup="mouseup touchend",St.mousemove="mousemove touchmove",St.mousecancel="mouseleave touchcancel",St.click="click",St.resize="resize"):St.pointers?(St.mousemove="pointermove",St.mousedown="pointerdown",St.mouseup="pointerup",St.mousecancel="pointercancel",St.click="pointerup",St.resize="orientationchange resize"):St.msPointers?(St.mousemove="MSPointerMove",St.mousedown="MSPointerDown",St.mouseup="MSPointerUp",St.mousecancel="MSPointerCancel",St.click="MSPointerUp",St.resize="orientationchange resize"):(St.mousemove="mousemove",St.mousedown="mousedown",St.mouseup="mouseup",St.mousecancel="mouseleave",St.click="click",St.resize="resize"),K=function(t,e){var n,i,o,r,s=e||"d",a=1;for(i=0,o=t.length;o>i;i++)r=t[i],""!==r&&(n=r.indexOf("["),0!==n&&(-1==n?r="."+r:(a++,r="."+r.substring(0,n)+" || {})"+r.substring(n))),a++,s+=r+(o-1>i?" || {})":")"));return Array(a).join("(")+s},Z=/^([a-z]+:)?\/\//i,yt(vt,{widgets:[],_widgetRegisteredCallbacks:[],ui:vt.ui||{},fx:vt.fx||_,effects:vt.effects||G,mobile:vt.mobile||{},data:vt.data||{},dataviz:vt.dataviz||{},drawing:vt.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:vt.support||St,animate:vt.animate||x,ns:"",attr:function(t){return"data-"+vt.ns+t},getShadows:s,wrap:a,deepExtend:l,getComputedStyles:f,webComponents:vt.webComponents||[],isScrollable:p,scrollLeft:g,size:m,toCamelCase:d,toHyphens:u,getOffset:vt.getOffset||v,parseEffects:vt.parseEffects||y,toggleClass:vt.toggleClass||b,directions:vt.directions||j,Observable:L,Class:i,Template:E,template:xt(E.compile,E),render:xt(E.render,E),stringify:xt(Ct.stringify,Ct),eventTarget:Q,htmlEncode:k,isLocalUrl:function(t){return t&&!Z.test(t)},expr:function(t,e,n){return t=t||"",typeof e==Et&&(n=e,e=!1),n=n||"d",t&&"["!==t.charAt(0)&&(t="."+t),e?(t=t.replace(/"([^.]*)\.([^"]*)"/g,'"$1_$DOT$_$2"'),t=t.replace(/'([^.]*)\.([^']*)'/g,"'$1_$DOT$_$2'"),t=K(t.split("."),n),t=t.replace(/_\$DOT\$_/g,".")):t=n+t,t},getter:function(t,e){var n=t+e;return Ot[n]=Ot[n]||Function("d","return "+vt.expr(t,e))},setter:function(t){return Ft[t]=Ft[t]||Function("d,value",vt.expr(t)+"=value")},accessor:function(t){return{get:vt.getter(t),set:vt.setter(t)}},guid:function(){var t,e,n="";for(t=0;32>t;t++)e=16*kt.random()|0,(8==t||12==t||16==t||20==t)&&(n+="-"),n+=(12==t?4:16==t?3&e|8:e).toString(16);return n},roleSelector:function(t){return t.replace(/(\S+)/g,"["+vt.attr("role")+"=$1],").slice(0,-1)},directiveSelector:function(t){var e,n=t.split(" ");if(n)for(e=0;n.length>e;e++)"view"!=n[e]&&(n[e]=n[e].replace(/(\w*)(view|bar|strip|over)$/,"$1-$2"));return n.join(" ").replace(/(\S+)/g,"kendo-mobile-$1,").slice(0,-1)},triggeredByInput:function(t){return/^(label|input|textarea|select)$/i.test(t.target.tagName)},onWidgetRegistered:function(t){for(var e=0,n=vt.widgets.length;n>e;e++)t(vt.widgets[e]);vt._widgetRegisteredCallbacks.push(t)},logToConsole:function(t){var i=e.console;!vt.suppressLog&&n!==i&&i.log&&i.log(t)}}),J=L.extend({init:function(t,e){var n,i=this;i.element=vt.jQuery(t).handler(i),i.angular("init",e),L.fn.init.call(i),n=e?e.dataSource:null,n&&(e=yt({},e,{dataSource:{}})),e=i.options=yt(!0,{},i.options,e),n&&(e.dataSource=n),i.element.attr(vt.attr("role"))||i.element.attr(vt.attr("role"),(e.name||"").toLowerCase()),i.element.data("kendo"+e.prefix+e.name,i),i.bind(i.events,e)},events:[],options:{prefix:""},_hasBindingTarget:function(){
return!!this.element[0].kendoBindingTarget},_tabindex:function(t){t=t||this.wrapper;var e=this.element,n="tabindex",i=t.attr(n)||e.attr(n);e.removeAttr(n),t.attr(n,isNaN(i)?0:i)},setOptions:function(e){this._setEvents(e),t.extend(this.options,e)},_setEvents:function(t){for(var e,n=this,i=0,o=n.events.length;o>i;i++)e=n.events[i],n.options[e]&&t[e]&&n.unbind(e,n.options[e]);n.bind(n.events,t)},resize:function(t){var e=this.getSize(),n=this._size;(t||(e.width>0||e.height>0)&&(!n||e.width!==n.width||e.height!==n.height))&&(this._size=e,this._resize(e,t),this.trigger("resize",e))},getSize:function(){return vt.dimensions(this.element)},size:function(t){return t?(this.setSize(t),n):this.getSize()},setSize:t.noop,_resize:t.noop,destroy:function(){var t=this;t.element.removeData("kendo"+t.options.prefix+t.options.name),t.element.removeData("handler"),t.unbind()},_destroy:function(){this.destroy()},angular:function(){},_muteAngularRebind:function(t){this._muteRebind=!0,t.call(this),this._muteRebind=!1}}),tt=J.extend({dataItems:function(){return this.dataSource.flatView()},_angularItems:function(e){var n=this;n.angular(e,function(){return{elements:n.items(),data:t.map(n.dataItems(),function(t){return{dataItem:t}})}})}}),vt.dimensions=function(t,e){var n=t[0];return e&&t.css(e),{width:n.offsetWidth,height:n.offsetHeight}},vt.notify=bt,et=/template$/i,nt=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,it=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]*\]$/,ot=/([A-Z])/g,vt.initWidget=function(i,o,r){var s,a,l,c,h,u,d,f,p,g,m,v,y;if(r?r.roles&&(r=r.roles):r=vt.ui.roles,i=i.nodeType?i:i[0],u=i.getAttribute("data-"+vt.ns+"role")){p=-1===u.indexOf("."),l=p?r[u]:vt.getter(u)(e),m=t(i).data(),v=l?"kendo"+l.fn.options.prefix+l.fn.options.name:"",g=p?RegExp("^kendo.*"+u+"$","i"):RegExp("^"+v+"$","i");for(y in m)if(y.match(g)){if(y!==v)return m[y];s=m[y]}if(l){for(f=C(i,"dataSource"),o=t.extend({},S(i,l.fn.options),o),f&&(o.dataSource=typeof f===Et?vt.getter(f)(e):f),c=0,h=l.fn.events.length;h>c;c++)a=l.fn.events[c],d=C(i,a),d!==n&&(o[a]=vt.getter(d)(e));return s?t.isEmptyObject(o)||s.setOptions(o):s=new l(i,o),s}}},vt.rolesFromNamespaces=function(t){var e,n,i=[];for(t[0]||(t=[vt.ui,vt.dataviz.ui]),e=0,n=t.length;n>e;e++)i[e]=t[e].roles;return yt.apply(null,[{}].concat(i.reverse()))},vt.init=function(e){var n=vt.rolesFromNamespaces(Vt.call(arguments,1));t(e).find("[data-"+vt.ns+"role]").addBack().each(function(){vt.initWidget(this,{},n)})},vt.destroy=function(e){t(e).find("[data-"+vt.ns+"role]").addBack().each(function(){var e,n=t(this).data();for(e in n)0===e.indexOf("kendo")&&typeof n[e].destroy===Mt&&n[e].destroy()})},vt.resize=function(e,n){var i,o=t(e).find("[data-"+vt.ns+"role]").addBack().filter(A);o.length&&(i=t.makeArray(o),i.sort(T),t.each(i,function(){var e=vt.widgetInstance(t(this));e&&e.resize(n)}))},vt.parseOptions=S,yt(vt.ui,{Widget:J,DataBoundWidget:tt,roles:{},progress:function(e,n){var i,o,r,s,a=e.find(".k-loading-mask"),l=vt.support,c=l.browser;n?a.length||(i=l.isRtl(e),o=i?"right":"left",s=e.scrollLeft(),r=c.webkit&&i?e[0].scrollWidth-e.width()-2*s:0,a=t("<div class='k-loading-mask'><span class='k-loading-text'>Loading...</span><div class='k-loading-image'/><div class='k-loading-color'/></div>").width("100%").height("100%").css("top",e.scrollTop()).css(o,Math.abs(s)+r).prependTo(e)):a&&a.remove()},plugin:function(e,i,o){var r,s,a,l,c=e.fn.options.name;for(i=i||vt.ui,o=o||"",i[c]=e,i.roles[c.toLowerCase()]=e,r="getKendo"+o+c,c="kendo"+o+c,s={name:c,widget:e,prefix:o||""},vt.widgets.push(s),a=0,l=vt._widgetRegisteredCallbacks.length;l>a;a++)vt._widgetRegisteredCallbacks[a](s);t.fn[c]=function(i){var o,r=this;return typeof i===Et?(o=Vt.call(arguments,1),this.each(function(){var e,s,a=t.data(this,c);if(!a)throw Error(vt.format("Cannot call method '{0}' of {1} before it is initialized",i,c));if(e=a[i],typeof e!==Mt)throw Error(vt.format("Cannot find method '{0}' of {1}",i,c));return s=e.apply(a,o),s!==n?(r=s,!1):n})):this.each(function(){return new e(this,i)}),r},t.fn[c].widget=e,t.fn[r]=function(){return this.data(c)}}}),rt={bind:function(){return this},nullObject:!0,options:{}},st=J.extend({init:function(t,e){J.fn.init.call(this,t,e),this.element.autoApplyNS(),this.wrapper=this.element,this.element.addClass("km-widget")},destroy:function(){J.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var t=this.element.closest(vt.roleSelector("view splitview modalview drawer"));return vt.widgetInstance(t,vt.mobile.ui)||rt},viewHasNativeScrolling:function(){var t=this.view();return t&&t.options.useNativeScrolling},container:function(){var t=this.element.closest(vt.roleSelector("view layout modalview drawer splitview"));return vt.widgetInstance(t.eq(0),vt.mobile.ui)||rt}}),yt(vt.mobile,{init:function(t){vt.init(t,vt.mobile.ui,vt.ui,vt.dataviz.ui)},appLevelNativeScrolling:function(){return vt.mobile.application&&vt.mobile.application.options&&vt.mobile.application.options.useNativeScrolling},roles:{},ui:{Widget:st,DataBoundWidget:tt.extend(st.prototype),roles:{},plugin:function(t){vt.ui.plugin(t,vt.mobile.ui,"Mobile")}}}),l(vt.dataviz,{init:function(t){vt.init(t,vt.dataviz.ui)},ui:{roles:{},themes:{},views:[],plugin:function(t){vt.ui.plugin(t,vt.dataviz.ui)}},roles:{}}),vt.touchScroller=function(e,n){return n||(n={}),n.useNative=!0,t(e).map(function(e,i){return i=t(i),St.kineticScrollNeeded&&vt.mobile.ui.Scroller&&!i.data("kendoMobileScroller")?(i.kendoMobileScroller(n),i.data("kendoMobileScroller")):!1})[0]},vt.preventDefault=function(t){t.preventDefault()},vt.widgetInstance=function(t,n){var i,o,r,s,a=t.data(vt.ns+"role"),l=[];if(a){if("content"===a&&(a="scroller"),n)if(n[0])for(i=0,o=n.length;o>i;i++)l.push(n[i].roles[a]);else l.push(n.roles[a]);else l=[vt.ui.roles[a],vt.dataviz.ui.roles[a],vt.mobile.ui.roles[a]];for(a.indexOf(".")>=0&&(l=[vt.getter(a)(e)]),i=0,o=l.length;o>i;i++)if(r=l[i],r&&(s=t.data("kendo"+r.fn.options.prefix+r.fn.options.name)))return s}},vt.onResize=function(n){var i=n;return St.mobileOS.android&&(i=function(){setTimeout(n,600)}),t(e).on(St.resize,i),i},vt.unbindResize=function(n){t(e).off(St.resize,n)},vt.attrValue=function(t,e){return t.data(vt.ns+e)},vt.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},t.extend(t.expr[":"],{kendoFocusable:function(e){var n=t.attr(e,"tabindex");return D(e,!isNaN(n)&&n>-1)}}),at=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],lt="label, input, [data-rel=external]",ct={setupMouseMute:function(){var e,n=0,i=at.length,o=document.documentElement;if(!ct.mouseTrap&&St.eventCapture)for(ct.mouseTrap=!0,ct.bustClick=!1,ct.captureMouse=!1,e=function(e){ct.captureMouse&&("click"===e.type?ct.bustClick&&!t(e.target).is(lt)&&(e.preventDefault(),e.stopPropagation()):e.stopPropagation())};i>n;n++)o.addEventListener(at[n],e,!0)},muteMouse:function(t){ct.captureMouse=!0,t.data.bustClick&&(ct.bustClick=!0),clearTimeout(ct.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(ct.mouseTrapTimeoutID),ct.mouseTrapTimeoutID=setTimeout(function(){ct.captureMouse=!1,ct.bustClick=!1},400)}},ht={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},St.touch&&(St.mobileOS.ios||St.mobileOS.android)?ht={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:St.pointers?ht={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:St.msPointers&&(ht={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),!St.msPointers||"onmspointerenter"in e||t.each({MSPointerEnter:"MSPointerOver",MSPointerLeave:"MSPointerOut"},function(e,n){t.event.special[e]={delegateType:n,bindType:n,handle:function(e){var i,o=this,r=e.relatedTarget,s=e.handleObj;return(!r||r!==o&&!t.contains(o,r))&&(e.type=s.origType,i=s.handler.apply(this,arguments),e.type=n),i}}}),ut=function(t){return ht[t]||t},dt=/([^ ]+)/g,vt.applyEventMap=function(t,e){return t=t.replace(dt,ut),e&&(t=t.replace(dt,"$1."+e)),t},ft=t.fn.on,yt(!0,M,t),M.fn=M.prototype=new t,M.fn.constructor=M,M.fn.init=function(e,n){return n&&n instanceof t&&!(n instanceof M)&&(n=M(n)),t.fn.init.call(this,e,n,pt)},M.fn.init.prototype=M.fn,pt=M(document),yt(M.fn,{handler:function(t){return this.data("handler",t),this},autoApplyNS:function(t){return this.data("kendoNS",t||vt.guid()),this},on:function(){var t,e,n,i,o,r,s=this,a=s.data("kendoNS");return 1===arguments.length?ft.call(s,arguments[0]):(t=s,e=Vt.call(arguments),typeof e[e.length-1]===Rt&&e.pop(),n=e[e.length-1],i=vt.applyEventMap(e[0],a),St.mouseAndTouchPresent&&i.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(ct.setupMouseMute(),o=2===e.length?null:e[1],r=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,ft.call(this,{touchstart:ct.muteMouse,touchend:ct.unMuteMouse},o,{bustClick:r})),typeof n===Et&&(t=s.data("handler"),n=t[n],e[e.length-1]=function(e){n.call(t,e)}),e[0]=i,ft.apply(s,e),s)},kendoDestroy:function(t){return t=t||this.data("kendoNS"),t&&this.off("."+t),this}}),vt.jQuery=M,vt.eventMap=ht,vt.timezone=function(){function t(t,e){var n,i,o,r=e[3],s=e[4],a=e[5],l=e[8];return l||(e[8]=l={}),l[t]?l[t]:(isNaN(s)?0===s.indexOf("last")?(n=new Date(Date.UTC(t,h[r]+1,1,a[0]-24,a[1],a[2],0)),i=u[s.substr(4,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-o-(i>o?7:0))):s.indexOf(">=")>=0&&(n=new Date(Date.UTC(t,h[r],s.substr(5),a[0],a[1],a[2],0)),i=u[s.substr(0,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-o+(o>i?7:0))):n=new Date(Date.UTC(t,h[r],s,a[0],a[1],a[2],0)),l[t]=n)}function e(e,n,i){var o,r,s,a;return(n=n[i])?(s=new Date(e).getUTCFullYear(),n=jQuery.grep(n,function(t){var e=t[0],n=t[1];return s>=e&&(n>=s||e==s&&"only"==n||"max"==n)}),n.push(e),n.sort(function(e,n){return"number"!=typeof e&&(e=+t(s,e)),"number"!=typeof n&&(n=+t(s,n)),e-n}),a=n[jQuery.inArray(e,n)-1]||n[n.length-1],isNaN(a)?a:null):(o=i.split(":"),r=0,o.length>1&&(r=60*o[0]+ +o[1]),[-1e6,"max","-","Jan",1,[0,0,0],r,"-"])}function n(t,e,n){var i,o,r,s=e[n];if("string"==typeof s&&(s=e[s]),!s)throw Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(i=s.length-1;i>=0&&(o=s[i][3],!(o&&t>o));i--);if(r=s[i+1],!r)throw Error('Timezone "'+n+'" not found on '+t+".");return r}function i(t,i,o,r){typeof t!=Bt&&(t=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));var s=n(t,i,r);return{zone:s,rule:e(t,o,s[1])}}function o(t,e){var n,o,r;return"Etc/UTC"==e||"Etc/GMT"==e?0:(n=i(t,this.zones,this.rules,e),o=n.zone,r=n.rule,vt.parseFloat(r?o[0]-r[6]:o[0]))}function r(t,e){var n=i(t,this.zones,this.rules,e),o=n.zone,r=n.rule,s=o[2];return s.indexOf("/")>=0?s.split("/")[r&&+r[6]?1:0]:s.indexOf("%s")>=0?s.replace("%s",r&&"-"!=r[7]?r[7]:""):s}function s(t,e,n){var i,o;return typeof e==Et&&(e=this.offset(t,e)),typeof n==Et&&(n=this.offset(t,n)),i=t.getTimezoneOffset(),t=new Date(t.getTime()+6e4*(e-n)),o=t.getTimezoneOffset(),new Date(t.getTime()+6e4*(o-i))}function a(t,e){return this.convert(t,t.getTimezoneOffset(),e)}function l(t,e){return this.convert(t,e,t.getTimezoneOffset())}function c(t){return this.apply(new Date(t),"Etc/UTC")}var h={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},u={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};return{zones:{},rules:{},offset:o,convert:s,apply:a,remove:l,abbr:r,toLocalDate:c}}(),vt.date=function(){function t(t,e){return 0===e&&23===t.getHours()?(t.setHours(t.getHours()+2),!0):!1}function e(e,n,i){var o=e.getHours();i=i||1,n=(n-e.getDay()+7*i)%7,e.setDate(e.getDate()+n),t(e,o)}function n(t,n,i){return t=new Date(t),e(t,n,i),t}function i(t){return new Date(t.getFullYear(),t.getMonth(),1)}function o(t){var e=new Date(t.getFullYear(),t.getMonth()+1,0),n=i(t),o=Math.abs(e.getTimezoneOffset()-n.getTimezoneOffset());return o&&e.setHours(n.getHours()+o/60),e}function r(e){return e=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),t(e,0),e}function s(t){return Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function a(t){return t.getTime()-r(t)}function l(t,e,n){var i,o=a(e),r=a(n);return t&&o!=r?(e>=n&&(n+=v),i=a(t),o>i&&(i+=v),o>r&&(r+=v),i>=o&&r>=i):!0}function c(t,e,n){var i,o=e.getTime(),r=n.getTime();return o>=r&&(r+=v),i=t.getTime(),i>=o&&r>=i}function h(e,n){var i=e.getHours();return e=new Date(e),u(e,n*v),t(e,i),e}function u(t,e,n){var i,o=t.getTimezoneOffset();t.setTime(t.getTime()+e),n||(i=t.getTimezoneOffset()-o,t.setTime(t.getTime()+i*m))}function d(e,n){return e=new Date(vt.date.getDate(e).getTime()+vt.date.getMilliseconds(n)),t(e,n.getHours()),e}function f(){return r(new Date)}function p(t){return r(t).getTime()==f().getTime()}function g(t){var e=new Date(1980,1,1,0,0,0);return t&&e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e}var m=6e4,v=864e5;return{adjustDST:t,dayOfWeek:n,setDayOfWeek:e,getDate:r,isInDateRange:c,isInTimeRange:l,isToday:p,nextDay:function(t){return h(t,1)},previousDay:function(t){return h(t,-1)},toUtcTime:s,MS_PER_DAY:v,MS_PER_HOUR:60*m,MS_PER_MINUTE:m,setTime:u,setHours:d,addDays:h,today:f,toInvariantTime:g,firstDayOfMonth:i,lastDayOfMonth:o,getMilliseconds:a}}(),vt.stripWhitespace=function(t){var e,n,i;if(document.createNodeIterator)for(e=document.createNodeIterator(t,NodeFilter.SHOW_TEXT,function(e){return e.parentNode==t?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);e.nextNode();)e.referenceNode&&!e.referenceNode.textContent.trim()&&e.referenceNode.parentNode.removeChild(e.referenceNode);else for(n=0;t.childNodes.length>n;n++)i=t.childNodes[n],3!=i.nodeType||/\S/.test(i.nodeValue)||(t.removeChild(i),n--),1==i.nodeType&&vt.stripWhitespace(i)},gt=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)},vt.animationFrame=function(t){gt.call(e,t)},mt=[],vt.queueAnimation=function(t){mt[mt.length]=t,1===mt.length&&vt.runNextAnimation()},vt.runNextAnimation=function(){vt.animationFrame(function(){mt[0]&&(mt.shift()(),mt[0]&&vt.runNextAnimation())})},vt.parseQueryStringParams=function(t){for(var e=t.split("?")[1]||"",n={},i=e.split(/&|=/),o=i.length,r=0;o>r;r+=2)""!==i[r]&&(n[decodeURIComponent(i[r])]=decodeURIComponent(i[r+1]));return n},vt.elementUnderCursor=function(t){return n!==t.x.client?document.elementFromPoint(t.x.client,t.y.client):n},vt.wheelDeltaY=function(t){var e,i=t.originalEvent,o=i.wheelDeltaY;return i.wheelDelta?(o===n||o)&&(e=i.wheelDelta):i.detail&&i.axis===i.VERTICAL_AXIS&&(e=10*-i.detail),e},vt.throttle=function(t,e){var i,o,r=0;return!e||0>=e?t:(o=function(){function o(){t.apply(s,l),r=+new Date}var s=this,a=+new Date-r,l=arguments;return r?(i&&clearTimeout(i),a>e?o():i=setTimeout(o,e-a),n):o()},o.cancel=function(){clearTimeout(i)},o)},vt.caret=function(e,i,o){var r,s,a,l,c=i!==n;if(o===n&&(o=i),e[0]&&(e=e[0]),!c||!e.disabled){try{e.selectionStart!==n?c?(e.focus(),e.setSelectionRange(i,o)):i=[e.selectionStart,e.selectionEnd]:document.selection&&(t(e).is(":visible")&&e.focus(),r=e.createTextRange(),c?(r.collapse(!0),r.moveStart("character",i),r.moveEnd("character",o-i),r.select()):(s=r.duplicate(),r.moveToBookmark(document.selection.createRange().getBookmark()),s.setEndPoint("EndToStart",r),a=s.text.length,l=a+r.text.length,i=[a,l]))}catch(h){i=[]}return i}},vt.compileMobileDirective=function(t,n){var i=e.angular;return t.attr("data-"+vt.ns+"role",t[0].tagName.toLowerCase().replace("kendo-mobile-","").replace("-","")),i.element(t).injector().invoke(["$compile",function(e){e(t)(n),/^\$(digest|apply)$/.test(n.$$phase)||n.$digest()}]),vt.widgetInstance(t,vt.mobile.ui)},vt.antiForgeryTokens=function(){var e={},i=t("meta[name=csrf-token],meta[name=_csrf]").attr("content"),o=t("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");return t("input[name^='__RequestVerificationToken']").each(function(){e[this.name]=this.value}),o!==n&&i!==n&&(e[o]=i),e},vt.cycleForm=function(t){function e(t){var e=vt.widgetInstance(t);e&&e.focus?e.focus():t.focus()}var n=t.find("input, .k-widget").first(),i=t.find("button, .k-button").last();i.on("keydown",function(t){t.keyCode!=vt.keys.TAB||t.shiftKey||(t.preventDefault(),e(n))}),n.on("keydown",function(t){t.keyCode==vt.keys.TAB&&t.shiftKey&&(t.preventDefault(),e(i))})},function(){function n(e,n,i,o){var r,s,a=t("<form>").attr({action:i,method:"POST",target:o}),l=vt.antiForgeryTokens();l.fileName=n,r=e.split(";base64,"),l.contentType=r[0].replace("data:",""),l.base64=r[1];for(s in l)l.hasOwnProperty(s)&&t("<input>").attr({value:l[s],name:s,type:"hidden"}).appendTo(a);a.appendTo("body").submit().remove()}function i(t,e){var n,i,o,r,s,a=t;if("string"==typeof t){for(n=t.split(";base64,"),i=n[0],o=atob(n[1]),r=new Uint8Array(o.length),s=0;o.length>s;s++)r[s]=o.charCodeAt(s);a=new Blob([r.buffer],{type:i})}navigator.msSaveBlob(a,e)}function o(t,n){e.Blob&&t instanceof Blob&&(t=URL.createObjectURL(t)),r.download=n,r.href=t;var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!1,e,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(i)}var r=document.createElement("a"),s="download"in r&&!vt.support.browser.edge;vt.saveAs=function(t){var e=n;t.forceProxy||(s?e=o:navigator.msSaveBlob&&(e=i)),e(t.dataURI,t.fileName,t.proxyURL,t.proxyTarget)}}(),vt.proxyModelSetters=function(t){var e={};return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,{get:function(){return t[n]},set:function(e){t[n]=e,t.dirty=!0}})}),e}}(jQuery,window),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.fx.min",["kendo.core.min"],t)}(function(){return function(t,e){function n(t){return parseInt(t,10)}function i(t,e){return n(t.css(e))}function o(t){var e,n=[];for(e in t)n.push(e);return n}function r(t){for(var e in t)-1!=U.indexOf(e)&&-1==j.indexOf(e)&&delete t[e];return t}function s(t,e){var n,i,o,r,s=[],a={};for(i in e)n=i.toLowerCase(),r=E&&-1!=U.indexOf(n),!P.hasHW3D&&r&&-1==j.indexOf(n)?delete e[i]:(o=e[i],r?s.push(i+"("+o+")"):a[i]=o);return s.length&&(a[at]=s.join(" ")),a}function a(t,e){var i,o,r;return E?(i=t.css(at),i==X?"scale"==e?1:0:(o=i.match(RegExp(e+"\\s*\\(([\\d\\w\\.]+)")),r=0,o?r=n(o[1]):(o=i.match(R)||[0,0,0,0,0],e=e.toLowerCase(),F.test(e)?r=parseFloat(o[3]/o[2]):"translatey"==e?r=parseFloat(o[4]/o[2]):"scale"==e?r=parseFloat(o[2]):"rotate"==e&&(r=parseFloat(Math.atan2(o[2],o[1])))),r)):parseFloat(t.css(e))}function l(t){return t.charAt(0).toUpperCase()+t.substring(1)}function c(t,e){var n=p.extend(e),i=n.prototype.directions;S[l(t)]=n,S.Element.prototype[t]=function(t,e,i,o){return new n(this.element,t,e,i,o)},T(i,function(e,i){S.Element.prototype[t+l(i)]=function(t,e,o){return new n(this.element,i,t,e,o)}})}function h(t,n,i,o){c(t,{directions:m,startValue:function(t){return this._startValue=t,this},endValue:function(t){return this._endValue=t,this},shouldHide:function(){return this._shouldHide},prepare:function(t,r){var s,a,l=this,c="out"===this._direction,h=l.element.data(n),u=!(isNaN(h)||h==i);s=u?h:e!==this._startValue?this._startValue:c?i:o,a=e!==this._endValue?this._endValue:c?o:i,this._reverse?(t[n]=a,r[n]=s):(t[n]=s,r[n]=a),l._shouldHide=r[n]===o}})}function u(t,e){var n=C.directions[e].vertical,i=t[n?Z:K]()/2+"px";return y[e].replace("$size",i)}var d,f,p,g,m,v,y,_,w,x,b,k,C=window.kendo,S=C.effects,T=t.each,A=t.extend,D=t.proxy,P=C.support,M=P.browser,E=P.transforms,B=P.transitions,I={scale:0,scalex:0,scaley:0,scale3d:0},z={translate:0,translatex:0,translatey:0,translate3d:0},L=e!==document.documentElement.style.zoom&&!E,R=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,O=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,F=/translatex?$/i,V=/(zoom|fade|expand)(\w+)/,N=/(zoom|fade|expand)/,H=/[xy]$/i,U=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],j=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],G={rotate:"deg",scale:"",skew:"px",translate:"px"},W=E.css,q=Math.round,$="",Y="px",X="none",Q="auto",K="width",Z="height",J="hidden",tt="origin",et="abortId",nt="overflow",it="translate",ot="position",rt="completeCallback",st=W+"transition",at=W+"transform",lt=W+"backface-visibility",ct=W+"perspective",ht="1500px",ut="perspective("+ht+")",dt={left:{reverse:"right",property:"left",transition:"translatex",vertical:!1,modifier:-1},right:{reverse:"left",property:"left",transition:"translatex",vertical:!1,modifier:1},down:{reverse:"up",property:"top",transition:"translatey",vertical:!0,modifier:1},up:{reverse:"down",property:"top",transition:"translatey",vertical:!0,modifier:-1},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out",modifier:-1},out:{reverse:"in",modifier:1},vertical:{reverse:"vertical"},horizontal:{reverse:"horizontal"}};C.directions=dt,A(t.fn,{kendoStop:function(t,e){return B?S.stopQueue(this,t||!1,e||!1):this.stop(t,e)}}),E&&!B&&(T(j,function(n,i){t.fn[i]=function(n){if(e===n)return a(this,i);var o=t(this)[0],r=i+"("+n+G[i.replace(H,"")]+")";return-1==o.style.cssText.indexOf(at)?t(this).css(at,r):o.style.cssText=o.style.cssText.replace(RegExp(i+"\\(.*?\\)","i"),r),this},t.fx.step[i]=function(e){t(e.elem)[i](e.now)}}),d=t.fx.prototype.cur,t.fx.prototype.cur=function(){return-1!=j.indexOf(this.prop)?parseFloat(t(this.elem)[this.prop]()):d.apply(this,arguments)}),C.toggleClass=function(t,e,n,i){return e&&(e=e.split(" "),B&&(n=A({exclusive:"all",duration:400,ease:"ease-out"},n),t.css(st,n.exclusive+" "+n.duration+"ms "+n.ease),setTimeout(function(){t.css(st,"").css(Z)},n.duration)),T(e,function(e,n){t.toggleClass(n,i)})),t},C.parseEffects=function(t,e){var n={};return"string"==typeof t?T(t.split(" "),function(t,i){var o=!N.test(i),r=i.replace(V,function(t,e,n){return e+":"+n.toLowerCase()}),s=r.split(":"),a=s[1],l={};s.length>1&&(l.direction=e&&o?dt[a].reverse:a),n[s[0]]=l}):T(t,function(t){var i=this.direction;i&&e&&!N.test(t)&&(this.direction=dt[i].reverse),n[t]=this}),n},B&&A(S,{transition:function(e,n,i){var r,a,l,c,h=0,u=e.data("keys")||[];i=A({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,c=function(){l||(l=!0,a&&(clearTimeout(a),a=null),e.removeData(et).dequeue().css(st,"").css(st),i.complete.call(e))},i.duration=t.fx?t.fx.speeds[i.duration]||i.duration:i.duration,r=s(e,n),t.merge(u,o(r)),e.data("keys",t.unique(u)).height(),e.css(st,i.exclusive+" "+i.duration+"ms "+i.ease).css(st),e.css(r).css(at),B.event&&(e.one(B.event,c),0!==i.duration&&(h=500)),a=setTimeout(c,i.duration+h),e.data(et,a),e.data(rt,c)},stopQueue:function(t,e,n){var i,o=t.data("keys"),r=!n&&o,s=t.data(rt);return r&&(i=C.getComputedStyles(t[0],o)),s&&s(),r&&t.css(i),t.removeData("keys").stop(e)}}),f=C.Class.extend({init:function(t,e){var n=this;n.element=t,n.effects=[],n.options=e,n.restore=[]},run:function(e){var n,i,o,a,l,c,h,u=this,d=e.length,f=u.element,p=u.options,g=t.Deferred(),m={},v={};for(u.effects=e,g.then(t.proxy(u,"complete")),f.data("animating",!0),i=0;d>i;i++)for(n=e[i],n.setReverse(p.reverse),n.setOptions(p),u.addRestoreProperties(n.restore),n.prepare(m,v),l=n.children(),o=0,c=l.length;c>o;o++)l[o].duration(p.duration).run();for(h in p.effects)A(v,p.effects[h].properties);for(f.is(":visible")||A(m,{display:f.data("olddisplay")||"block"}),E&&!p.reset&&(a=f.data("targetTransform"),a&&(m=A(a,m))),m=s(f,m),E&&!B&&(m=r(m)),f.css(m).css(at),i=0;d>i;i++)e[i].setup();return p.init&&p.init(),f.data("targetTransform",v),S.animate(f,v,A({},p,{complete:g.resolve})),g.promise()},stop:function(){t(this.element).kendoStop(!0,!0)},addRestoreProperties:function(t){for(var e,n=this.element,i=0,o=t.length;o>i;i++)e=t[i],this.restore.push(e),n.data(e)||n.data(e,n.css(e))},restoreCallback:function(){var t,e,n,i=this.element;for(t=0,e=this.restore.length;e>t;t++)n=this.restore[t],i.css(n,i.data(n))},complete:function(){var e=this,n=0,i=e.element,o=e.options,r=e.effects,s=r.length;for(i.removeData("animating").dequeue(),o.hide&&i.data("olddisplay",i.css("display")).hide(),this.restoreCallback(),L&&!E&&setTimeout(t.proxy(this,"restoreCallback"),0);s>n;n++)r[n].teardown();o.completeCallback&&o.completeCallback(i)}}),S.promise=function(t,e){var n,i,o,r=[],s=new f(t,e),a=C.parseEffects(e.effects);e.effects=a;for(o in a)n=S[l(o)],n&&(i=new n(t,a[o].direction),r.push(i));r[0]?s.run(r):(t.is(":visible")||t.css({display:t.data("olddisplay")||"block"}).css("display"),e.init&&e.init(),t.dequeue(),s.complete())},A(S,{animate:function(n,o,s){var a=s.transition!==!1;delete s.transition,B&&"transition"in S&&a?S.transition(n,o,s):E?n.animate(r(o),{queue:!1,show:!1,hide:!1,duration:s.duration,complete:s.complete}):n.each(function(){var n=t(this),r={};T(U,function(t,s){var a,l,c,h,u,d,f,p=o?o[s]+" ":null;p&&(l=o,s in I&&o[s]!==e?(a=p.match(O),E&&A(l,{scale:+a[0]})):s in z&&o[s]!==e&&(c=n.css(ot),h="absolute"==c||"fixed"==c,n.data(it)||(h?n.data(it,{top:i(n,"top")||0,left:i(n,"left")||0,bottom:i(n,"bottom"),right:i(n,"right")}):n.data(it,{top:i(n,"marginTop")||0,left:i(n,"marginLeft")||0})),u=n.data(it),a=p.match(O),a&&(d=s==it+"y"?0:+a[1],f=s==it+"y"?+a[1]:+a[2],h?(isNaN(u.right)?isNaN(d)||A(l,{left:u.left+d}):isNaN(d)||A(l,{right:u.right-d}),isNaN(u.bottom)?isNaN(f)||A(l,{top:u.top+f}):isNaN(f)||A(l,{bottom:u.bottom-f})):(isNaN(d)||A(l,{marginLeft:u.left+d}),isNaN(f)||A(l,{marginTop:u.top+f})))),!E&&"scale"!=s&&s in l&&delete l[s],l&&A(r,l))}),M.msie&&delete r.scale,n.animate(r,{queue:!1,show:!1,hide:!1,duration:s.duration,complete:s.complete})})}}),S.animatedPromise=S.promise,p=C.Class.extend({init:function(t,e){var n=this;n.element=t,n._direction=e,n.options={},n._additionalEffects=[],n.restore||(n.restore=[])},reverse:function(){return this._reverse=!0,this.run()},play:function(){return this._reverse=!1,this.run()},add:function(t){return this._additionalEffects.push(t),this},direction:function(t){return this._direction=t,this},duration:function(t){return this._duration=t,this},compositeRun:function(){var t=this,e=new f(t.element,{reverse:t._reverse,duration:t._duration}),n=t._additionalEffects.concat([t]);return e.run(n)},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var e,n,i=this,o=i.element,a=0,l=i.restore,c=l.length,h=t.Deferred(),u={},d={},f=i.children(),p=f.length;for(h.then(t.proxy(i,"_complete")),o.data("animating",!0),a=0;c>a;a++)e=l[a],o.data(e)||o.data(e,o.css(e));for(a=0;p>a;a++)f[a].duration(i._duration).run();return i.prepare(u,d),o.is(":visible")||A(u,{display:o.data("olddisplay")||"block"}),E&&(n=o.data("targetTransform"),n&&(u=A(n,u))),u=s(o,u),E&&!B&&(u=r(u)),o.css(u).css(at),i.setup(),o.data("targetTransform",d),S.animate(o,d,{duration:i._duration,complete:h.resolve}),h.promise()},stop:function(){var e=0,n=this.children(),i=n.length;for(e=0;i>e;e++)n[e].stop();return t(this.element).kendoStop(!0,!0),this},restoreCallback:function(){var t,e,n,i=this.element;for(t=0,e=this.restore.length;e>t;t++)n=this.restore[t],i.css(n,i.data(n))},_complete:function(){var e=this,n=e.element;n.removeData("animating").dequeue(),e.restoreCallback(),e.shouldHide()&&n.data("olddisplay",n.css("display")).hide(),L&&!E&&setTimeout(t.proxy(e,"restoreCallback"),0),e.teardown()},setOptions:function(t){A(!0,this.options,t)},children:function(){return[]},shouldHide:t.noop,setup:t.noop,prepare:t.noop,teardown:t.noop,directions:[],setReverse:function(t){return this._reverse=t,this}}),g=["left","right","up","down"],m=["in","out"],c("slideIn",{directions:g,divisor:function(t){return this.options.divisor=t,this},prepare:function(t,e){var n,i=this,o=i.element,r=dt[i._direction],s=-r.modifier*(r.vertical?o.outerHeight():o.outerWidth()),a=s/(i.options&&i.options.divisor||1)+Y,l="0px";i._reverse&&(n=t,t=e,e=n),E?(t[r.transition]=a,e[r.transition]=l):(t[r.property]=a,e[r.property]=l)}}),c("tile",{directions:g,init:function(t,e,n){p.prototype.init.call(this,t,e),this.options={previous:n}},previousDivisor:function(t){return this.options.previousDivisor=t,this},children:function(){var t=this,e=t._reverse,n=t.options.previous,i=t.options.previousDivisor||1,o=t._direction,r=[C.fx(t.element).slideIn(o).setReverse(e)];return n&&r.push(C.fx(n).slideIn(dt[o].reverse).divisor(i).setReverse(!e)),r}}),h("fade","opacity",1,0),h("zoom","scale",1,.01),c("slideMargin",{prepare:function(t,e){var n,i=this,o=i.element,r=i.options,s=o.data(tt),a=r.offset,l=i._reverse;l||null!==s||o.data(tt,parseFloat(o.css("margin-"+r.axis))),n=o.data(tt)||0,e["margin-"+r.axis]=l?n:n+a}}),c("slideTo",{prepare:function(t,e){var n=this,i=n.element,o=n.options,r=o.offset.split(","),s=n._reverse;E?(e.translatex=s?0:r[0],e.translatey=s?0:r[1]):(e.left=s?0:r[0],e.top=s?0:r[1]),i.css("left")}}),c("expand",{directions:["horizontal","vertical"],restore:[nt],prepare:function(t,n){var i=this,o=i.element,r=i.options,s=i._reverse,a="vertical"===i._direction?Z:K,l=o[0].style[a],c=o.data(a),h=parseFloat(c||l),u=q(o.css(a,Q)[a]());t.overflow=J,h=r&&r.reset?u||h:h||u,n[a]=(s?0:h)+Y,t[a]=(s?h:0)+Y,c===e&&o.data(a,l)},shouldHide:function(){return this._reverse},teardown:function(){var t=this,e=t.element,n="vertical"===t._direction?Z:K,i=e.data(n);(i==Q||i===$)&&setTimeout(function(){e.css(n,Q).css(n)},0)}}),v={position:"absolute",marginLeft:0,marginTop:0,scale:1},c("transfer",{init:function(t,e){this.element=t,this.options={target:e},this.restore=[]},setup:function(){this.element.appendTo(document.body)},prepare:function(t,e){var n=this,i=n.element,o=S.box(i),r=S.box(n.options.target),s=a(i,"scale"),l=S.fillScale(r,o),c=S.transformOrigin(r,o);A(t,v),e.scale=1,i.css(at,"scale(1)").css(at),i.css(at,"scale("+s+")"),t.top=o.top,t.left=o.left,t.transformOrigin=c.x+Y+" "+c.y+Y,n._reverse?t.scale=l:e.scale=l}}),y={top:"rect(auto auto $size auto)",bottom:"rect($size auto auto auto)",left:"rect(auto $size auto auto)",right:"rect(auto auto auto $size)"},_={top:{start:"rotatex(0deg)",end:"rotatex(180deg)"},bottom:{start:"rotatex(-180deg)",end:"rotatex(0deg)"},left:{start:"rotatey(0deg)",end:"rotatey(-180deg)"},right:{start:"rotatey(180deg)",end:"rotatey(0deg)"}},c("turningPage",{directions:g,init:function(t,e,n){p.prototype.init.call(this,t,e),this._container=n},prepare:function(t,e){var n=this,i=n._reverse,o=i?dt[n._direction].reverse:n._direction,r=_[o];t.zIndex=1,n._clipInHalf&&(t.clip=u(n._container,C.directions[o].reverse)),t[lt]=J,e[at]=ut+(i?r.start:r.end),t[at]=ut+(i?r.end:r.start)},setup:function(){this._container.append(this.element)},face:function(t){return this._face=t,this},shouldHide:function(){var t=this,e=t._reverse,n=t._face;return e&&!n||!e&&n},clipInHalf:function(t){return this._clipInHalf=t,this},temporary:function(){return this.element.addClass("temp-page"),this}}),c("staticPage",{directions:g,init:function(t,e,n){p.prototype.init.call(this,t,e),this._container=n},restore:["clip"],prepare:function(t,e){var n=this,i=n._reverse?dt[n._direction].reverse:n._direction;t.clip=u(n._container,i),t.opacity=.999,e.opacity=1},shouldHide:function(){var t=this,e=t._reverse,n=t._face;return e&&!n||!e&&n},face:function(t){return this._face=t,this}}),c("pageturn",{directions:["horizontal","vertical"],init:function(t,e,n,i){p.prototype.init.call(this,t,e),this.options={},this.options.face=n,this.options.back=i},children:function(){var t,e=this,n=e.options,i="horizontal"===e._direction?"left":"top",o=C.directions[i].reverse,r=e._reverse,s=n.face.clone(!0).removeAttr("id"),a=n.back.clone(!0).removeAttr("id"),l=e.element;return r&&(t=i,i=o,o=t),[C.fx(n.face).staticPage(i,l).face(!0).setReverse(r),C.fx(n.back).staticPage(o,l).setReverse(r),C.fx(s).turningPage(i,l).face(!0).clipInHalf(!0).temporary().setReverse(r),C.fx(a).turningPage(o,l).clipInHalf(!0).temporary().setReverse(r)];
},prepare:function(t,e){t[ct]=ht,t.transformStyle="preserve-3d",t.opacity=.999,e.opacity=1},teardown:function(){this.element.find(".temp-page").remove()}}),c("flip",{directions:["horizontal","vertical"],init:function(t,e,n,i){p.prototype.init.call(this,t,e),this.options={},this.options.face=n,this.options.back=i},children:function(){var t,e=this,n=e.options,i="horizontal"===e._direction?"left":"top",o=C.directions[i].reverse,r=e._reverse,s=e.element;return r&&(t=i,i=o,o=t),[C.fx(n.face).turningPage(i,s).face(!0).setReverse(r),C.fx(n.back).turningPage(o,s).setReverse(r)]},prepare:function(t){t[ct]=ht,t.transformStyle="preserve-3d"}}),w=!P.mobileOS.android,x=".km-touch-scrollbar, .km-actionsheet-wrapper",c("replace",{_before:t.noop,_after:t.noop,init:function(e,n,i){p.prototype.init.call(this,e),this._previous=t(n),this._transitionClass=i},duration:function(){throw Error("The replace effect does not support duration setting; the effect duration may be customized through the transition class rule")},beforeTransition:function(t){return this._before=t,this},afterTransition:function(t){return this._after=t,this},_both:function(){return t().add(this._element).add(this._previous)},_containerClass:function(){var t=this._direction,e="k-fx k-fx-start k-fx-"+this._transitionClass;return t&&(e+=" k-fx-"+t),this._reverse&&(e+=" k-fx-reverse"),e},complete:function(e){if(!(!this.deferred||e&&t(e.target).is(x))){var n=this.container;n.removeClass("k-fx-end").removeClass(this._containerClass()).off(B.event,this.completeProxy),this._previous.hide().removeClass("k-fx-current"),this.element.removeClass("k-fx-next"),w&&n.css(nt,""),this.isAbsolute||this._both().css(ot,""),this.deferred.resolve(),delete this.deferred}},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var e,n=this,i=n.element,o=n._previous,r=i.parents().filter(o.parents()).first(),s=n._both(),a=t.Deferred(),l=i.css(ot);return r.length||(r=i.parent()),this.container=r,this.deferred=a,this.isAbsolute="absolute"==l,this.isAbsolute||s.css(ot,"absolute"),w&&(e=r.css(nt),r.css(nt,"hidden")),B?(i.addClass("k-fx-hidden"),r.addClass(this._containerClass()),this.completeProxy=t.proxy(this,"complete"),r.on(B.event,this.completeProxy),C.animationFrame(function(){i.removeClass("k-fx-hidden").addClass("k-fx-next"),o.css("display","").addClass("k-fx-current"),n._before(o,i),C.animationFrame(function(){r.removeClass("k-fx-start").addClass("k-fx-end"),n._after(o,i)})})):this.complete(),a.promise()},stop:function(){this.complete()}}),b=C.Class.extend({init:function(){var t=this;t._tickProxy=D(t._tick,t),t._started=!1},tick:t.noop,done:t.noop,onEnd:t.noop,onCancel:t.noop,start:function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,C.animationFrame(this._tickProxy)))},enabled:function(){return!0},cancel:function(){this._started=!1,this.onCancel()},_tick:function(){var t=this;t._started&&(t.tick(),t.done()?(t._started=!1,t.onEnd()):C.animationFrame(t._tickProxy))}}),k=b.extend({init:function(t){var e=this;A(e,t),b.fn.init.call(e)},done:function(){return this.timePassed()>=this.duration},timePassed:function(){return Math.min(this.duration,new Date-this.startDate)},moveTo:function(t){var e=this,n=e.movable;e.initial=n[e.axis],e.delta=t.location-e.initial,e.duration="number"==typeof t.duration?t.duration:300,e.tick=e._easeProxy(t.ease),e.startDate=new Date,e.start()},_easeProxy:function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}}}),A(k,{easeOutExpo:function(t,e,n,i){return t==i?e+n:n*(-Math.pow(2,-10*t/i)+1)+e},easeOutBack:function(t,e,n,i,o){return o=1.70158,n*((t=t/i-1)*t*((o+1)*t+o)+1)+e}}),S.Animation=b,S.Transition=k,S.createEffect=c,S.box=function(e){e=t(e);var n=e.offset();return n.width=e.outerWidth(),n.height=e.outerHeight(),n},S.transformOrigin=function(t,e){var n=(t.left-e.left)*e.width/(e.width-t.width),i=(t.top-e.top)*e.height/(e.height-t.height);return{x:isNaN(n)?0:n,y:isNaN(i)?0:i}},S.fillScale=function(t,e){return Math.min(t.width/e.width,t.height/e.height)},S.fitScale=function(t,e){return Math.max(t.width/e.width,t.height/e.height)}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.router.min",["kendo.core.min"],t)}(function(){return function(t,e){function n(t,e){if(!e)return t;t+"/"===e&&(t=e);var n=RegExp("^"+e,"i");return n.test(t)||(t=e+"/"+t),f.protocol+"//"+(f.host+"/"+t).replace(/\/\/+/g,"/")}function i(t){return t?"#!":"#"}function o(t){var e=f.href;return"#!"===t&&e.indexOf("#")>-1&&e.indexOf("#!")<0?null:e.split(t)[1]||""}function r(t,e){return 0===e.indexOf(t)?e.substr(t.length).replace(/\/\//g,"/"):e}function s(t){return t.replace(/^(#)?/,"#")}function a(t){return t.replace(/^(#(!)?)?/,"#!")}var l=window.kendo,c="change",h="back",u="same",d=l.support,f=window.location,p=window.history,g=50,m=l.support.browser.msie,v=/^#*/,y=window.document,_=l.Class.extend({back:function(){m?setTimeout(function(){p.back()}):p.back()},forward:function(){m?setTimeout(function(){p.forward()}):p.forward()},length:function(){return p.length},replaceLocation:function(t){f.replace(t)}}),w=_.extend({init:function(t){this.root=t},navigate:function(t){p.pushState({},y.title,n(t,this.root))},replace:function(t){p.replaceState({},y.title,n(t,this.root))},normalize:function(t){return r(this.root,t)},current:function(){var t=f.pathname;return f.search&&(t+=f.search),r(this.root,t)},change:function(e){t(window).bind("popstate.kendo",e)},stop:function(){t(window).unbind("popstate.kendo")},normalizeCurrent:function(t){var e,r=t.root,s=f.pathname,a=o(i(t.hashBang));r===s+"/"&&(e=r),r===s&&a&&(e=n(a.replace(v,""),r)),e&&p.pushState({},y.title,e)}}),x=_.extend({init:function(t){this._id=l.guid(),this.prefix=i(t),this.fix=t?a:s},navigate:function(t){f.hash=this.fix(t)},replace:function(t){this.replaceLocation(this.fix(t))},normalize:function(t){return t.indexOf(this.prefix)<0?t:t.split(this.prefix)[1]},change:function(e){d.hashChange?t(window).on("hashchange."+this._id,e):this._interval=setInterval(e,g)},stop:function(){t(window).off("hashchange."+this._id),clearInterval(this._interval)},current:function(){return o(this.prefix)},normalizeCurrent:function(t){var e=f.pathname,n=t.root;return t.pushState&&n!==e?(this.replaceLocation(n+this.prefix+r(n,e)),!0):!1}}),b=l.Observable.extend({start:function(e){if(e=e||{},this.bind([c,h,u],e),!this._started){this._started=!0,e.root=e.root||"/";var n,i=this.createAdapter(e);i.normalizeCurrent(e)||(n=i.current(),t.extend(this,{adapter:i,root:e.root,historyLength:i.length(),current:n,locations:[n]}),i.change(t.proxy(this,"_checkUrl")))}},createAdapter:function(t){return d.pushState&&t.pushState?new w(t.root):new x(t.hashBang)},stop:function(){this._started&&(this.adapter.stop(),this.unbind(c),this._started=!1)},change:function(t){this.bind(c,t)},replace:function(t,e){this._navigate(t,e,function(e){e.replace(t),this.locations[this.locations.length-1]=this.current})},navigate:function(t,n){return"#:back"===t?(this.backCalled=!0,this.adapter.back(),e):(this._navigate(t,n,function(e){e.navigate(t),this.locations.push(this.current)}),e)},_navigate:function(t,n,i){var o=this.adapter;return t=o.normalize(t),this.current===t||this.current===decodeURIComponent(t)?(this.trigger(u),e):((n||!this.trigger(c,{url:t}))&&(this.current=t,i.call(this,o),this.historyLength=o.length()),e)},_checkUrl:function(){var t=this.adapter,n=t.current(),i=t.length(),o=this.historyLength===i,r=n===this.locations[this.locations.length-2]&&o,s=this.backCalled,a=this.current;return null===n||this.current===n||this.current===decodeURIComponent(n)?!0:(this.historyLength=i,this.backCalled=!1,this.current=n,r&&this.trigger("back",{url:a,to:n})?(t.forward(),this.current=a,e):this.trigger(c,{url:n,backButtonPressed:!s})?(r?t.forward():(t.back(),this.historyLength--),this.current=a,e):(r?this.locations.pop():this.locations.push(n),e))}});l.History=b,l.History.HistoryAdapter=_,l.History.HashAdapter=x,l.History.PushStateAdapter=w,l.absoluteURL=n,l.history=new b}(window.kendo.jQuery),function(){function t(t,e){return e?t:"([^/]+)"}function e(e,n){return RegExp("^"+e.replace(p,"\\$&").replace(u,"(?:$1)?").replace(d,t).replace(f,"(.*?)")+"$",n?"i":"")}function n(t){return t.replace(/(\?.*)|(#.*)/g,"")}var i=window.kendo,o=i.history,r=i.Observable,s="init",a="routeMissing",l="change",c="back",h="same",u=/\((.*?)\)/g,d=/(\(\?)?:\w+/g,f=/\*\w+/g,p=/[\-{}\[\]+?.,\\\^$|#\s]/g,g=i.Class.extend({init:function(t,n,i){t instanceof RegExp||(t=e(t,i)),this.route=t,this._callback=n},callback:function(t,e){var o,r,s=0,a=i.parseQueryStringParams(t);for(a._back=e,t=n(t),o=this.route.exec(t).slice(1),r=o.length;r>s;s++)void 0!==o[s]&&(o[s]=decodeURIComponent(o[s]));o.push(a),this._callback.apply(null,o)},worksWith:function(t,e){return this.route.test(n(t))?(this.callback(t,e),!0):!1}}),m=r.extend({init:function(t){t||(t={}),r.fn.init.call(this),this.routes=[],this.pushState=t.pushState,this.hashBang=t.hashBang,this.root=t.root,this.ignoreCase=t.ignoreCase!==!1,this.bind([s,a,l,h],t)},destroy:function(){o.unbind(l,this._urlChangedProxy),o.unbind(h,this._sameProxy),o.unbind(c,this._backProxy),this.unbind()},start:function(){var t,e=this,n=function(){e._same()},i=function(t){e._back(t)},r=function(t){e._urlChanged(t)};o.start({same:n,change:r,back:i,pushState:e.pushState,hashBang:e.hashBang,root:e.root}),t={url:o.current||"/",preventDefault:$.noop},e.trigger(s,t)||e._urlChanged(t),this._urlChangedProxy=r,this._backProxy=i},route:function(t,e){this.routes.push(new g(t,e,this.ignoreCase))},navigate:function(t,e){i.history.navigate(t,e)},replace:function(t,e){i.history.replace(t,e)},_back:function(t){this.trigger(c,{url:t.url,to:t.to})&&t.preventDefault()},_same:function(){this.trigger(h)},_urlChanged:function(t){var e,n,o,r,s=t.url,c=t.backButtonPressed;if(s||(s="/"),this.trigger(l,{url:t.url,params:i.parseQueryStringParams(t.url),backButtonPressed:c}))return void t.preventDefault();for(e=0,n=this.routes,r=n.length;r>e;e++)if(o=n[e],o.worksWith(s,c))return;this.trigger(a,{url:s,params:i.parseQueryStringParams(s),backButtonPressed:c})&&t.preventDefault()}});i.Router=m}(),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.data.odata.min",["kendo.core.min"],t)}(function(){return function(t,e){function n(i,r){var l,c,h,u,d,f,p,g,m=[],v=i.logic||"and",y=i.filters;for(l=0,c=y.length;c>l;l++)i=y[l],h=i.field,p=i.value,f=i.operator,i.filters?i=n(i,r):(g=i.ignoreCase,h=h.replace(/\./g,"/"),i=s[f],r&&(i=a[f]),"isnull"===f||"isnotnull"===f?i=o.format("{0} {1} null",h,i):"isempty"===f||"isnotempty"===f?i=o.format("{0} {1} ''",h,i):i&&p!==e&&(u=t.type(p),"string"===u?(d="'{1}'",p=p.replace(/'/g,"''"),g===!0&&(h="tolower("+h+")")):d="date"===u?r?"{1:yyyy-MM-ddTHH:mm:ss+00:00}":"datetime'{1:yyyy-MM-ddTHH:mm:ss}'":"{1}",i.length>3?"substringof"!==i?d="{0}({2},"+d+")":(d="{0}("+d+",{2})","doesnotcontain"===f&&(r?(d="{0}({2},'{1}') eq -1",i="indexof"):d+=" eq false")):d="{2} {0} "+d,i=o.format(d,i,p,h))),m.push(i);return i=m.join(" "+v+" "),m.length>1&&(i="("+i+")"),i}function i(t){for(var e in t)0===e.indexOf("@odata")&&delete t[e]}var o=window.kendo,r=t.extend,s={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith",isnull:"eq",isnotnull:"ne",isempty:"eq",isnotempty:"ne"},a=r({},s,{contains:"contains"}),l={pageSize:t.noop,page:t.noop,filter:function(t,e,i){e&&(e=n(e,i),e&&(t.$filter=e))},sort:function(e,n){var i=t.map(n,function(t){var e=t.field.replace(/\./g,"/");return"desc"===t.dir&&(e+=" desc"),e}).join(",");i&&(e.$orderby=i)},skip:function(t,e){e&&(t.$skip=e)},take:function(t,e){e&&(t.$top=e)}},c={read:{dataType:"jsonp"}};r(!0,o.data,{schemas:{odata:{type:"json",data:function(t){return t.d.results||[t.d]},total:"d.__count"}},transports:{odata:{read:{cache:!0,dataType:"jsonp",jsonp:"$callback"},update:{cache:!0,dataType:"json",contentType:"application/json",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(t,e,n){var i,r,s,a;if(t=t||{},e=e||"read",a=(this.options||c)[e],a=a?a.dataType:"json","read"===e){i={$inlinecount:"allpages"},"json"!=a&&(i.$format="json");for(s in t)l[s]?l[s](i,t[s],n):i[s]=t[s]}else{if("json"!==a)throw Error("Only json dataType can be used for "+e+" operation.");if("destroy"!==e){for(s in t)r=t[s],"number"==typeof r&&(t[s]=r+"");i=o.stringify(t)}}return i}}}}),r(!0,o.data,{schemas:{"odata-v4":{type:"json",data:function(e){return e=t.extend({},e),i(e),e.value?e.value:[e]},total:function(t){return t["@odata.count"]}}},transports:{"odata-v4":{read:{cache:!0,dataType:"json"},update:{cache:!0,dataType:"json",contentType:"application/json;IEEE754Compatible=true",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json;IEEE754Compatible=true",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(t,e){var n=o.data.transports.odata.parameterMap(t,e,!0);return"read"==e&&(n.$count=!0,delete n.$inlinecount),n}}}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.data.xml.min",["kendo.core.min"],t)}(function(){return function(t,e){var n=window.kendo,i=t.isArray,o=t.isPlainObject,r=t.map,s=t.each,a=t.extend,l=n.getter,c=n.Class,h=c.extend({init:function(e){var l,c,h,u,d=this,f=e.total,p=e.model,g=e.parse,m=e.errors,v=e.serialize,y=e.data;p&&(o(p)&&(l=e.modelBase||n.data.Model,p.fields&&s(p.fields,function(e,n){o(n)&&n.field?t.isFunction(n.field)||(n=a(n,{field:d.getter(n.field)})):n={field:d.getter(n)},p.fields[e]=n}),c=p.id,c&&(h={},h[d.xpathToMember(c,!0)]={field:d.getter(c)},p.fields=a(h,p.fields),p.id=d.xpathToMember(c)),p=l.define(p)),d.model=p),f&&("string"==typeof f?(f=d.getter(f),d.total=function(t){return parseInt(f(t),10)}):"function"==typeof f&&(d.total=f)),m&&("string"==typeof m?(m=d.getter(m),d.errors=function(t){return m(t)||null}):"function"==typeof m&&(d.errors=m)),y&&("string"==typeof y?(y=d.xpathToMember(y),d.data=function(t){var e,n=d.evaluate(t,y);return n=i(n)?n:[n],d.model&&p.fields?(e=new d.model,r(n,function(t){if(t){var n,i={};for(n in p.fields)i[n]=e._parse(n,p.fields[n].field(t));return i}})):n}):"function"==typeof y&&(d.data=y)),"function"==typeof g&&(u=d.parse,d.parse=function(t){var e=g.call(d,t);return u.call(d,e)}),"function"==typeof v&&(d.serialize=v)},total:function(t){return this.data(t).length},errors:function(t){return t?t.errors:null},serialize:function(t){return t},parseDOM:function(t){var n,o,r,s,a,l,c,h={},u=t.attributes,d=u.length;for(c=0;d>c;c++)l=u[c],h["@"+l.nodeName]=l.nodeValue;for(o=t.firstChild;o;o=o.nextSibling)r=o.nodeType,3===r||4===r?h["#text"]=o.nodeValue:1===r&&(n=this.parseDOM(o),s=o.nodeName,a=h[s],i(a)?a.push(n):a=a!==e?[a,n]:n,h[s]=a);return h},evaluate:function(t,e){for(var n,o,r,s,a,l=e.split(".");n=l.shift();)if(t=t[n],i(t)){for(o=[],e=l.join("."),a=0,r=t.length;r>a;a++)s=this.evaluate(t[a],e),s=i(s)?s:[s],o.push.apply(o,s);return o}return t},parse:function(e){var n,i,o={};return n=e.documentElement||t.parseXML(e).documentElement,i=this.parseDOM(n),o[n.nodeName]=i,o},xpathToMember:function(t,e){return t?(t=t.replace(/^\//,"").replace(/\//g,"."),t.indexOf("@")>=0?t.replace(/\.?(@.*)/,e?"$1":'["$1"]'):t.indexOf("text()")>=0?t.replace(/(\.?text\(\))/,e?"#text":'["#text"]'):t):""},getter:function(t){return l(this.xpathToMember(t),!0)}});t.extend(!0,n.data,{XmlDataReader:h,readers:{xml:h}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.data.min",["kendo.core.min","kendo.data.odata.min","kendo.data.xml.min"],t)}(function(){return function(t,e){function n(t,e,n,i){return function(o){var r,s={};for(r in o)s[r]=o[r];s.field=i?n+"."+o.field:n,e==kt&&t._notifyChange&&t._notifyChange(s),t.trigger(e,s)}}function i(e,n){if(e===n)return!0;var o,r=t.type(e),s=t.type(n);if(r!==s)return!1;if("date"===r)return e.getTime()===n.getTime();if("object"!==r&&"array"!==r)return!1;for(o in e)if(!i(e[o],n[o]))return!1;return!0}function o(t,e){var n,i;for(i in t){if(n=t[i],st(n)&&n.field&&n.field===e)return n;if(n===e)return n}return null}function r(t){this.data=t||[]}function s(t,n){if(t){var i=typeof t===vt?{field:t,dir:n}:t,o=lt(i)?i:i!==e?[i]:[];return ct(o,function(t){return!!t.dir})}}function a(t){var e,n,i,o,r=t.filters;if(r)for(e=0,n=r.length;n>e;e++)i=r[e],o=i.operator,o&&typeof o===vt&&(i.operator=q[o.toLowerCase()]||o),a(i)}function l(t){return t&&!at(t)?((lt(t)||!t.filters)&&(t={logic:"and",filters:lt(t)?t:[t]}),a(t),t):e}function c(t,e){return t.logic||e.logic?!1:t.field===e.field&&t.value===e.value&&t.operator===e.operator}function h(t){return t=t||{},at(t)?{logic:"and",filters:[]}:l(t)}function u(t,e){return e.logic||t.field>e.field?1:e.field>t.field?-1:0}function d(t,e){var n,i,o,r,s;if(t=h(t),e=h(e),t.logic!==e.logic)return!1;if(o=(t.filters||[]).slice(),r=(e.filters||[]).slice(),o.length!==r.length)return!1;for(o=o.sort(u),r=r.sort(u),s=0;o.length>s;s++)if(n=o[s],i=r[s],n.logic&&i.logic){if(!d(n,i))return!1}else if(!c(n,i))return!1;return!0}function f(t){return lt(t)?t:[t]}function p(t,n){var i=typeof t===vt?{field:t,dir:n}:t,o=lt(i)?i:i!==e?[i]:[];return U(o,function(t){return{field:t.field,dir:t.dir||"asc",aggregates:t.aggregates}})}function g(t,e){return t&&t.getTime&&e&&e.getTime?t.getTime()===e.getTime():t===e}function m(t,e,n,i,o,r){var s,a,l,c,h;for(e=e||[],c=e.length,s=0;c>s;s++)a=e[s],l=a.aggregate,h=a.field,t[h]=t[h]||{},r[h]=r[h]||{},r[h][l]=r[h][l]||{},t[h][l]=$[l.toLowerCase()](t[h][l],n,ft.accessor(h),i,o,r[h][l])}function v(t){return"number"==typeof t&&!isNaN(t)}function y(t){return t&&t.getTime}function _(t){var e,n=t.length,i=Array(n);for(e=0;n>e;e++)i[e]=t[e].toJSON();return i}function w(t,e,n,i,o){var r,s,a,l,c,h={};for(l=0,c=t.length;c>l;l++){r=t[l];for(s in e)a=o[s],a&&a!==s&&(h[a]||(h[a]=ft.setter(a)),h[a](r,e[s](r)),delete r[s])}}function x(t,e,n,i,o){var r,s,a,l,c;for(l=0,c=t.length;c>l;l++){r=t[l];for(s in e)r[s]=n._parse(s,e[s](r)),a=o[s],a&&a!==s&&delete r[a]}}function b(t,e,n,i,o){var r,s,a,l;for(s=0,l=t.length;l>s;s++)r=t[s],a=i[r.field],a&&a!=r.field&&(r.field=a),r.value=n._parse(r.field,r.value),r.hasSubgroups?b(r.items,e,n,i,o):x(r.items,e,n,i,o)}function k(t,e,n,i,o,r){return function(s){return s=t(s),s&&!at(i)&&("[object Array]"===Ut.call(s)||s instanceof $t||(s=[s]),n(s,i,new e,o,r)),s||[]}}function C(t,e,n,i){for(var o,r,s,a=0;e.length&&i&&(o=e[a],r=o.items,s=r.length,t&&t.field===o.field&&t.value===o.value?(t.hasSubgroups&&t.items.length?C(t.items[t.items.length-1],o.items,n,i):(r=r.slice(n,n+i),t.items=t.items.concat(r)),e.splice(a--,1)):o.hasSubgroups&&r.length?(C(o,r,n,i),o.items.length||e.splice(a--,1)):(r=r.slice(n,n+i),o.items=r,o.items.length||e.splice(a--,1)),0===r.length?n-=s:(n=0,i-=r.length),!(++a>=e.length)););e.length>a&&e.splice(a,e.length-a)}function S(t){var e,n,i,o,r,s=[];for(e=0,n=t.length;n>e;e++)if(r=t.at(e),r.hasSubgroups)s=s.concat(S(r.items));else for(i=r.items,o=0;i.length>o;o++)s.push(i.at(o));return s}function T(t,e){var n,i,o;if(e)for(n=0,i=t.length;i>n;n++)o=t.at(n),o.hasSubgroups?T(o.items,e):o.items=new Yt(o.items,e)}function A(t,e){for(var n=0,i=t.length;i>n;n++)if(t[n].hasSubgroups){if(A(t[n].items,e))return!0}else if(e(t[n].items,t[n]))return!0}function D(t,e,n,i){for(var o=0;t.length>o&&t[o].data!==e&&!P(t[o].data,n,i);o++);}function P(t,e,n){for(var i=0,o=t.length;o>i;i++){if(t[i]&&t[i].hasSubgroups)return P(t[i].items,e,n);if(t[i]===e||t[i]===n)return t[i]=n,!0}}function M(t,n,i,o,r){var s,a,l,c;for(s=0,a=t.length;a>s;s++)if(l=t[s],l&&!(l instanceof o))if(l.hasSubgroups===e||r){for(c=0;n.length>c;c++)if(n[c]===l){t[s]=n.at(c),D(i,n,l,t[s]);break}}else M(l.items,n,i,o,r)}function E(t,e){var n,i,o;for(n=0,i=t.length;i>n;n++)if(o=t.at(n),o.uid==e.uid)return t.splice(n,1),o}function B(t,e){return e?z(t,function(t){return t.uid&&t.uid==e.uid||t[e.idField]===e.id&&e.id!==e._defaultId}):-1}function I(t,e){return e?z(t,function(t){return t.uid==e.uid}):-1}function z(t,e){var n,i;for(n=0,i=t.length;i>n;n++)if(e(t[n]))return n;return-1}function L(t,e){var n,i;return t&&!at(t)?(n=t[e],i=st(n)?n.from||n.field||e:t[e]||e,pt(i)?e:i):e}function R(t,e){var n,i,o,r={};for(o in t)"filters"!==o&&(r[o]=t[o]);if(t.filters)for(r.filters=[],n=0,i=t.filters.length;i>n;n++)r.filters[n]=R(t.filters[n],e);else r.field=L(e.fields,r.field);return r}function O(t,e){var n,i,o,r,s,a=[];for(n=0,i=t.length;i>n;n++){o={},r=t[n];for(s in r)o[s]=r[s];o.field=L(e.fields,o.field),o.aggregates&<(o.aggregates)&&(o.aggregates=O(o.aggregates,e)),a.push(o)}return a}function F(e,n){var i,o,r,s,a,l,c,h,u,d;for(e=t(e)[0],i=e.options,o=n[0],r=n[1],s=[],a=0,l=i.length;l>a;a++)u={},h=i[a],c=h.parentNode,c===e&&(c=null),h.disabled||c&&c.disabled||(c&&(u.optgroup=c.label),u[o.field]=h.text,d=h.attributes.value,d=d&&d.specified?h.value:h.text,u[r.field]=d,s.push(u));return s}function V(e,n){var i,o,r,s,a,l,c,h=t(e)[0].tBodies[0],u=h?h.rows:[],d=n.length,f=[];for(i=0,o=u.length;o>i;i++){for(a={},c=!0,s=u[i].cells,r=0;d>r;r++)l=s[r],"th"!==l.nodeName.toLowerCase()&&(c=!1,a[n[r].field]=l.innerHTML);c||f.push(a)}return f}function N(t){return function(){var e=this._data,n=Z.fn[t].apply(this,Nt.call(arguments));return this._data!=e&&this._attachBubbleHandlers(),n}}function H(e,n){function i(t,e){return t.filter(e).add(t.find(e))}var o,r,s,a,l,c,h,u,d=t(e).children(),f=[],p=n[0].field,g=n[1]&&n[1].field,m=n[2]&&n[2].field,v=n[3]&&n[3].field;for(o=0,r=d.length;r>o;o++)s={_loaded:!0},a=d.eq(o),c=a[0].firstChild,u=a.children(),e=u.filter("ul"),u=u.filter(":not(ul)"),l=a.attr("data-id"),l&&(s.id=l),c&&(s[p]=3==c.nodeType?c.nodeValue:u.text()),g&&(s[g]=i(u,"a").attr("href")),v&&(s[v]=i(u,"img").attr("src")),m&&(h=i(u,".k-sprite").prop("className"),s[m]=h&&t.trim(h.replace("k-sprite",""))),e.length&&(s.items=H(e.eq(0),n)),"true"==a.attr("data-hasChildren")&&(s.hasChildren=!0),f.push(s);return f}var U,j,G,W,q,$,Y,X,Q,K,Z,J,tt,et,nt,it,ot=t.extend,rt=t.proxy,st=t.isPlainObject,at=t.isEmptyObject,lt=t.isArray,ct=t.grep,ht=t.ajax,ut=t.each,dt=t.noop,ft=window.kendo,pt=ft.isFunction,gt=ft.Observable,mt=ft.Class,vt="string",yt="function",_t="create",wt="read",xt="update",bt="destroy",kt="change",Ct="sync",St="get",Tt="error",At="requestStart",Dt="progress",Pt="requestEnd",Mt=[_t,wt,xt,bt],Et=function(t){return t},Bt=ft.getter,It=ft.stringify,zt=Math,Lt=[].push,Rt=[].join,Ot=[].pop,Ft=[].splice,Vt=[].shift,Nt=[].slice,Ht=[].unshift,Ut={}.toString,jt=ft.support.stableSort,Gt=/^\/Date\((.*?)\)\/$/,Wt=/(\r+|\n+)/g,qt=/(?=['\\])/g,$t=gt.extend({init:function(t,e){var n=this;n.type=e||Xt,gt.fn.init.call(n),n.length=t.length,n.wrapAll(t,n)},at:function(t){return this[t]},toJSON:function(){var t,e,n=this.length,i=Array(n);for(t=0;n>t;t++)e=this[t],e instanceof Xt&&(e=e.toJSON()),i[t]=e;return i},parent:dt,wrapAll:function(t,e){var n,i,o=this,r=function(){return o};for(e=e||[],n=0,i=t.length;i>n;n++)e[n]=o.wrap(t[n],r);return e},wrap:function(t,e){var n,i=this;return null!==t&&"[object Object]"===Ut.call(t)&&(n=t instanceof i.type||t instanceof Zt,n||(t=t instanceof Xt?t.toJSON():t,t=new i.type(t)),t.parent=e,t.bind(kt,function(t){i.trigger(kt,{field:t.field,node:t.node,index:t.index,items:t.items||[this],action:t.node?t.action||"itemloaded":"itemchange"})})),t},push:function(){var t,e=this.length,n=this.wrapAll(arguments);return t=Lt.apply(this,n),this.trigger(kt,{action:"add",index:e,items:n}),t},slice:Nt,sort:[].sort,join:Rt,pop:function(){var t=this.length,e=Ot.apply(this);return t&&this.trigger(kt,{action:"remove",index:t-1,items:[e]}),e},splice:function(t,e,n){var i,o,r,s=this.wrapAll(Nt.call(arguments,2));if(i=Ft.apply(this,[t,e].concat(s)),i.length)for(this.trigger(kt,{action:"remove",index:t,items:i}),o=0,r=i.length;r>o;o++)i[o]&&i[o].children&&i[o].unbind(kt);return n&&this.trigger(kt,{action:"add",index:t,items:s}),i},shift:function(){var t=this.length,e=Vt.apply(this);return t&&this.trigger(kt,{action:"remove",index:0,items:[e]}),e},unshift:function(){var t,e=this.wrapAll(arguments);return t=Ht.apply(this,e),this.trigger(kt,{action:"add",index:0,items:e}),t},indexOf:function(t){var e,n,i=this;for(e=0,n=i.length;n>e;e++)if(i[e]===t)return e;return-1},forEach:function(t){for(var e=0,n=this.length;n>e;e++)t(this[e],e,this)},map:function(t){for(var e=0,n=[],i=this.length;i>e;e++)n[e]=t(this[e],e,this);return n},reduce:function(t){var e,n=0,i=this.length;for(2==arguments.length?e=arguments[1]:i>n&&(e=this[n++]);i>n;n++)e=t(e,this[n],n,this);return e},reduceRight:function(t){var e,n=this.length-1;for(2==arguments.length?e=arguments[1]:n>0&&(e=this[n--]);n>=0;n--)e=t(e,this[n],n,this);return e},filter:function(t){for(var e,n=0,i=[],o=this.length;o>n;n++)e=this[n],t(e,n,this)&&(i[i.length]=e);return i},find:function(t){for(var e,n=0,i=this.length;i>n;n++)if(e=this[n],t(e,n,this))return e},every:function(t){for(var e,n=0,i=this.length;i>n;n++)if(e=this[n],!t(e,n,this))return!1;return!0},some:function(t){for(var e,n=0,i=this.length;i>n;n++)if(e=this[n],t(e,n,this))return!0;return!1},remove:function(t){var e=this.indexOf(t);-1!==e&&this.splice(e,1)},empty:function(){this.splice(0,this.length)}}),Yt=$t.extend({init:function(t,e){gt.fn.init.call(this),this.type=e||Xt;for(var n=0;t.length>n;n++)this[n]=t[n];this.length=n,this._parent=rt(function(){return this},this)},at:function(t){var e=this[t];return e instanceof this.type?e.parent=this._parent:e=this[t]=this.wrap(e,this._parent),e}}),Xt=gt.extend({init:function(t){var e,n,i=this,o=function(){return i};gt.fn.init.call(this),this._handlers={};for(n in t)e=t[n],"object"==typeof e&&e&&!e.getTime&&"_"!=n.charAt(0)&&(e=i.wrap(e,n,o)),i[n]=e;i.uid=ft.guid()},shouldSerialize:function(t){return this.hasOwnProperty(t)&&"_handlers"!==t&&"_events"!==t&&typeof this[t]!==yt&&"uid"!==t},forEach:function(t){for(var e in this)this.shouldSerialize(e)&&t(this[e],e)},toJSON:function(){var t,e,n={};for(e in this)this.shouldSerialize(e)&&(t=this[e],(t instanceof Xt||t instanceof $t)&&(t=t.toJSON()),n[e]=t);return n},get:function(t){var e,n=this;return n.trigger(St,{field:t}),e="this"===t?n:ft.getter(t,!0)(n)},_set:function(t,e){var n,i,o,r=this,s=t.indexOf(".")>=0;if(s)for(n=t.split("."),i="";n.length>1;){if(i+=n.shift(),o=ft.getter(i,!0)(r),o instanceof Xt)return o.set(n.join("."),e),s;i+="."}return ft.setter(t)(r,e),s},set:function(t,e){var n=this,i=t.indexOf(".")>=0,o=ft.getter(t,!0)(n);o!==e&&(o instanceof gt&&this._handlers[t]&&(this._handlers[t].get&&o.unbind(St,this._handlers[t].get),o.unbind(kt,this._handlers[t].change)),n.trigger("set",{field:t,value:e})||(i||(e=n.wrap(e,t,function(){return n})),(!n._set(t,e)||t.indexOf("(")>=0||t.indexOf("[")>=0)&&n.trigger(kt,{field:t})))},parent:dt,wrap:function(t,e,i){var o,r,s,a,l=this,c=Ut.call(t);return null==t||"[object Object]"!==c&&"[object Array]"!==c||(s=t instanceof $t,a=t instanceof Z,"[object Object]"!==c||a||s?("[object Array]"===c||s||a)&&(s||a||(t=new $t(t)),r=n(l,kt,e,!1),t.bind(kt,r),l._handlers[e]={change:r}):(t instanceof Xt||(t=new Xt(t)),o=n(l,St,e,!0),t.bind(St,o),r=n(l,kt,e,!0),t.bind(kt,r),l._handlers[e]={get:o,change:r}),t.parent=i),t}}),Qt={number:function(t){return ft.parseFloat(t)},date:function(t){return ft.parseDate(t)},"boolean":function(t){return typeof t===vt?"true"===t.toLowerCase():null!=t?!!t:t},string:function(t){return null!=t?t+"":t},"default":function(t){return t}},Kt={string:"",number:0,date:new Date,"boolean":!1,"default":""},Zt=Xt.extend({init:function(n){var i,o,r=this;if((!n||t.isEmptyObject(n))&&(n=t.extend({},r.defaults,n),r._initializers))for(i=0;r._initializers.length>i;i++)o=r._initializers[i],n[o]=r.defaults[o]();Xt.fn.init.call(r,n),r.dirty=!1,r.idField&&(r.id=r.get(r.idField),r.id===e&&(r.id=r._defaultId))},shouldSerialize:function(t){return Xt.fn.shouldSerialize.call(this,t)&&"uid"!==t&&!("id"!==this.idField&&"id"===t)&&"dirty"!==t&&"_accessors"!==t},_parse:function(t,e){var n,i=this,r=t,s=i.fields||{};return t=s[t],t||(t=o(s,r)),t&&(n=t.parse,!n&&t.type&&(n=Qt[t.type.toLowerCase()])),n?n(e):e},_notifyChange:function(t){var e=t.action;("add"==e||"remove"==e)&&(this.dirty=!0)},editable:function(t){return t=(this.fields||{})[t],t?t.editable!==!1:!0},set:function(t,e,n){var o=this;o.editable(t)&&(e=o._parse(t,e),i(e,o.get(t))||(o.dirty=!0,Xt.fn.set.call(o,t,e,n)))},accept:function(t){var e,n,i=this,o=function(){return i};for(e in t)n=t[e],"_"!=e.charAt(0)&&(n=i.wrap(t[e],e,o)),i._set(e,n);i.idField&&(i.id=i.get(i.idField)),i.dirty=!1},isNew:function(){return this.id===this._defaultId}});Zt.define=function(t,n){n===e&&(n=t,t=Zt);var i,o,r,s,a,l,c,h,u=ot({defaults:{}},n),d={},f=u.id,p=[];if(f&&(u.idField=f),u.id&&delete u.id,f&&(u.defaults[f]=u._defaultId=""),"[object Array]"===Ut.call(u.fields)){for(l=0,c=u.fields.length;c>l;l++)r=u.fields[l],typeof r===vt?d[r]={}:r.field&&(d[r.field]=r);u.fields=d}for(o in u.fields)r=u.fields[o],s=r.type||"default",a=null,h=o,o=typeof r.field===vt?r.field:o,r.nullable||(a=u.defaults[h!==o?h:o]=r.defaultValue!==e?r.defaultValue:Kt[s.toLowerCase()],"function"==typeof a&&p.push(o)),n.id===o&&(u._defaultId=a),u.defaults[h!==o?h:o]=a,r.parse=r.parse||Qt[s];return p.length>0&&(u._initializers=p),i=t.extend(u),i.define=function(t){return Zt.define(i,t)},u.fields&&(i.fields=u.fields,i.idField=u.idField),i},j={selector:function(t){return pt(t)?t:Bt(t)},compare:function(t){var e=this.selector(t);return function(t,n){return t=e(t),n=e(n),null==t&&null==n?0:null==t?-1:null==n?1:t.localeCompare?t.localeCompare(n):t>n?1:n>t?-1:0}},create:function(t){var e=t.compare||this.compare(t.field);return"desc"==t.dir?function(t,n){return e(n,t,!0)}:e},combine:function(t){return function(e,n){var i,o,r=t[0](e,n);for(i=1,o=t.length;o>i;i++)r=r||t[i](e,n);return r}}},G=ot({},j,{asc:function(t){var e=this.selector(t);return function(t,n){var i=e(t),o=e(n);return i&&i.getTime&&o&&o.getTime&&(i=i.getTime(),o=o.getTime()),i===o?t.__position-n.__position:null==i?-1:null==o?1:i.localeCompare?i.localeCompare(o):i>o?1:-1}},desc:function(t){var e=this.selector(t);return function(t,n){var i=e(t),o=e(n);return i&&i.getTime&&o&&o.getTime&&(i=i.getTime(),o=o.getTime()),i===o?t.__position-n.__position:null==i?1:null==o?-1:o.localeCompare?o.localeCompare(i):o>i?1:-1}},create:function(t){return this[t.dir](t.field)}}),U=function(t,e){var n,i=t.length,o=Array(i);for(n=0;i>n;n++)o[n]=e(t[n],n,t);return o},W=function(){function t(t){return t.replace(qt,"\\").replace(Wt,"")}function e(e,n,i,o){var r;return null!=i&&(typeof i===vt&&(i=t(i),r=Gt.exec(i),r?i=new Date(+r[1]):o?(i="'"+i.toLowerCase()+"'",n="(("+n+" || '')+'').toLowerCase()"):i="'"+i+"'"),i.getTime&&(n="("+n+"&&"+n+".getTime?"+n+".getTime():"+n+")",i=i.getTime())),n+" "+e+" "+i}return{quote:function(e){return e&&e.getTime?"new Date("+e.getTime()+")":"string"==typeof e?"'"+t(e)+"'":""+e},eq:function(t,n,i){return e("==",t,n,i)},neq:function(t,n,i){return e("!=",t,n,i)},gt:function(t,n,i){return e(">",t,n,i)},gte:function(t,n,i){return e(">=",t,n,i)},lt:function(t,n,i){return e("<",t,n,i)},lte:function(t,n,i){return e("<=",t,n,i)},startswith:function(e,n,i){return i&&(e="("+e+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=t(n)),e+".lastIndexOf('"+n+"', 0) == 0"},doesnotstartwith:function(e,n,i){return i&&(e="("+e+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=t(n)),e+".lastIndexOf('"+n+"', 0) == -1"},endswith:function(e,n,i){return i&&(e="("+e+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=t(n)),e+".indexOf('"+n+"', "+e+".length - "+(n||"").length+") >= 0"},doesnotendwith:function(e,n,i){return i&&(e="("+e+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=t(n)),e+".indexOf('"+n+"', "+e+".length - "+(n||"").length+") < 0";
},contains:function(e,n,i){return i&&(e="("+e+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=t(n)),e+".indexOf('"+n+"') >= 0"},doesnotcontain:function(e,n,i){return i&&(e="("+e+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=t(n)),e+".indexOf('"+n+"') == -1"},isempty:function(t){return t+" === ''"},isnotempty:function(t){return t+" !== ''"},isnull:function(t){return t+" === null || "+t+" === undefined"},isnotnull:function(t){return t+" !== null && "+t+" !== undefined"}}}(),r.filterExpr=function(t){var n,i,o,s,a,l,c=[],h={and:" && ",or:" || "},u=[],d=[],f=t.filters;for(n=0,i=f.length;i>n;n++)o=f[n],a=o.field,l=o.operator,o.filters?(s=r.filterExpr(o),o=s.expression.replace(/__o\[(\d+)\]/g,function(t,e){return e=+e,"__o["+(d.length+e)+"]"}).replace(/__f\[(\d+)\]/g,function(t,e){return e=+e,"__f["+(u.length+e)+"]"}),d.push.apply(d,s.operators),u.push.apply(u,s.fields)):(typeof a===yt?(s="__f["+u.length+"](d)",u.push(a)):s=ft.expr(a),typeof l===yt?(o="__o["+d.length+"]("+s+", "+W.quote(o.value)+")",d.push(l)):o=W[(l||"eq").toLowerCase()](s,o.value,o.ignoreCase!==e?o.ignoreCase:!0)),c.push(o);return{expression:"("+c.join(h[t.logic])+")",fields:u,operators:d}},q={"==":"eq",equals:"eq",isequalto:"eq",equalto:"eq",equal:"eq","!=":"neq",ne:"neq",notequals:"neq",isnotequalto:"neq",notequalto:"neq",notequal:"neq","<":"lt",islessthan:"lt",lessthan:"lt",less:"lt","<=":"lte",le:"lte",islessthanorequalto:"lte",lessthanequal:"lte",">":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain",isnull:"isnull",isempty:"isempty",isnotempty:"isnotempty"},r.normalizeFilter=l,r.compareFilters=d,r.prototype={toArray:function(){return this.data},range:function(t,e){return new r(this.data.slice(t,t+e))},skip:function(t){return new r(this.data.slice(t))},take:function(t){return new r(this.data.slice(0,t))},select:function(t){return new r(U(this.data,t))},order:function(t,e){var n={dir:e};return t&&(t.compare?n.compare=t.compare:n.field=t),new r(this.data.slice(0).sort(j.create(n)))},orderBy:function(t){return this.order(t,"asc")},orderByDescending:function(t){return this.order(t,"desc")},sort:function(t,e,n){var i,o,r=s(t,e),a=[];if(n=n||j,r.length){for(i=0,o=r.length;o>i;i++)a.push(n.create(r[i]));return this.orderBy({compare:n.combine(a)})}return this},filter:function(t){var e,n,i,o,s,a,c,h,u=this.data,d=[];if(t=l(t),!t||0===t.filters.length)return this;for(o=r.filterExpr(t),a=o.fields,c=o.operators,s=h=Function("d, __f, __o","return "+o.expression),(a.length||c.length)&&(h=function(t){return s(t,a,c)}),e=0,i=u.length;i>e;e++)n=u[e],h(n)&&d.push(n);return new r(d)},group:function(t,e){t=p(t||[]),e=e||this.data;var n,i=this,o=new r(i.data);return t.length>0&&(n=t[0],o=o.groupBy(n).select(function(i){var o=new r(e).filter([{field:i.field,operator:"eq",value:i.value,ignoreCase:!1}]);return{field:i.field,value:i.value,items:t.length>1?new r(i.items).group(t.slice(1),o.toArray()).toArray():i.items,hasSubgroups:t.length>1,aggregates:o.aggregate(n.aggregates)}})),o},groupBy:function(t){if(at(t)||!this.data.length)return new r([]);var e,n,i,o,s=t.field,a=this._sortForGrouping(s,t.dir||"asc"),l=ft.accessor(s),c=l.get(a[0],s),h={field:s,value:c,items:[]},u=[h];for(i=0,o=a.length;o>i;i++)e=a[i],n=l.get(e,s),g(c,n)||(c=n,h={field:s,value:c,items:[]},u.push(h)),h.items.push(e);return new r(u)},_sortForGrouping:function(t,e){var n,i,o=this.data;if(!jt){for(n=0,i=o.length;i>n;n++)o[n].__position=n;for(o=new r(o).sort(t,e,G).toArray(),n=0,i=o.length;i>n;n++)delete o[n].__position;return o}return this.sort(t,e).toArray()},aggregate:function(t){var e,n,i={},o={};if(t&&t.length)for(e=0,n=this.data.length;n>e;e++)m(i,t,this.data[e],e,n,o);return i}},$={sum:function(t,e,n){var i=n.get(e);return v(t)?v(i)&&(t+=i):t=i,t},count:function(t){return(t||0)+1},average:function(t,n,i,o,r,s){var a=i.get(n);return s.count===e&&(s.count=0),v(t)?v(a)&&(t+=a):t=a,v(a)&&s.count++,o==r-1&&v(t)&&(t/=s.count),t},max:function(t,e,n){var i=n.get(e);return v(t)||y(t)||(t=i),i>t&&(v(i)||y(i))&&(t=i),t},min:function(t,e,n){var i=n.get(e);return v(t)||y(t)||(t=i),t>i&&(v(i)||y(i))&&(t=i),t}},r.process=function(t,n){n=n||{};var i,o=new r(t),a=n.group,l=p(a||[]).concat(s(n.sort||[])),c=n.filterCallback,h=n.filter,u=n.skip,d=n.take;return h&&(o=o.filter(h),c&&(o=c(o)),i=o.toArray().length),l&&(o=o.sort(l),a&&(t=o.toArray())),u!==e&&d!==e&&(o=o.range(u,d)),a&&(o=o.group(a,t)),{total:i,data:o.toArray()}},Y=mt.extend({init:function(t){this.data=t.data},read:function(t){t.success(this.data)},update:function(t){t.success(t.data)},create:function(t){t.success(t.data)},destroy:function(t){t.success(t.data)}}),X=mt.extend({init:function(t){var e,n=this;t=n.options=ot({},n.options,t),ut(Mt,function(e,n){typeof t[n]===vt&&(t[n]={url:t[n]})}),n.cache=t.cache?Q.create(t.cache):{find:dt,add:dt},e=t.parameterMap,pt(t.push)&&(n.push=t.push),n.push||(n.push=Et),n.parameterMap=pt(e)?e:function(t){var n={};return ut(t,function(t,i){t in e&&(t=e[t],st(t)&&(i=t.value(i),t=t.key)),n[t]=i}),n}},options:{parameterMap:Et},create:function(t){return ht(this.setup(t,_t))},read:function(n){var i,o,r,s=this,a=s.cache;n=s.setup(n,wt),i=n.success||dt,o=n.error||dt,r=a.find(n.data),r!==e?i(r):(n.success=function(t){a.add(n.data,t),i(t)},t.ajax(n))},update:function(t){return ht(this.setup(t,xt))},destroy:function(t){return ht(this.setup(t,bt))},setup:function(t,e){t=t||{};var n,i=this,o=i.options[e],r=pt(o.data)?o.data(t.data):o.data;return t=ot(!0,{},o,t),n=ot(!0,{},r,t.data),t.data=i.parameterMap(n,e),pt(t.url)&&(t.url=t.url(n)),t}}),Q=mt.extend({init:function(){this._store={}},add:function(t,n){t!==e&&(this._store[It(t)]=n)},find:function(t){return this._store[It(t)]},clear:function(){this._store={}},remove:function(t){delete this._store[It(t)]}}),Q.create=function(t){var e={inmemory:function(){return new Q}};return st(t)&&pt(t.find)?t:t===!0?new Q:e[t]()},K=mt.extend({init:function(t){var e,n,i,o,r,s,a,l,c,h,u,d,f,p=this;t=t||{};for(e in t)n=t[e],p[e]=typeof n===vt?Bt(n):n;o=t.modelBase||Zt,st(p.model)&&(p.model=i=o.define(p.model)),r=rt(p.data,p),p._dataAccessFunction=r,p.model&&(s=rt(p.groups,p),a=rt(p.serialize,p),l={},c={},h={},u={},d=!1,i=p.model,i.fields&&(ut(i.fields,function(t,e){var n;f=t,st(e)&&e.field?f=e.field:typeof e===vt&&(f=e),st(e)&&e.from&&(n=e.from),d=d||n&&n!==t||f!==t,c[t]=Bt(n||f),h[t]=Bt(t),l[n||f]=t,u[t]=n||f}),!t.serialize&&d&&(p.serialize=k(a,i,w,h,l,u))),p._dataAccessFunction=r,p.data=k(r,i,x,c,l,u),p.groups=k(s,i,b,c,l,u))},errors:function(t){return t?t.errors:null},parse:Et,data:Et,total:function(t){return t.length},groups:Et,aggregates:function(){return{}},serialize:function(t){return t}}),Z=gt.extend({init:function(t){var n,i,o,r=this;t&&(i=t.data),t=r.options=ot({},r.options,t),r._map={},r._prefetch={},r._data=[],r._pristineData=[],r._ranges=[],r._view=[],r._pristineTotal=0,r._destroyed=[],r._pageSize=t.pageSize,r._page=t.page||(t.pageSize?1:e),r._sort=s(t.sort),r._filter=l(t.filter),r._group=p(t.group),r._aggregate=t.aggregate,r._total=t.total,r._shouldDetachObservableParents=!0,gt.fn.init.call(r),r.transport=J.create(t,i,r),pt(r.transport.push)&&r.transport.push({pushCreate:rt(r._pushCreate,r),pushUpdate:rt(r._pushUpdate,r),pushDestroy:rt(r._pushDestroy,r)}),null!=t.offlineStorage&&("string"==typeof t.offlineStorage?(o=t.offlineStorage,r._storage={getItem:function(){return JSON.parse(localStorage.getItem(o))},setItem:function(t){localStorage.setItem(o,It(r.reader.serialize(t)))}}):r._storage=t.offlineStorage),r.reader=new ft.data.readers[t.schema.type||"json"](t.schema),n=r.reader.model||{},r._detachObservableParents(),r._data=r._observe(r._data),r._online=!0,r.bind(["push",Tt,kt,At,Ct,Pt,Dt],t)},options:{data:null,schema:{modelBase:Zt},offlineStorage:null,serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,batch:!1},clone:function(){return this},online:function(n){return n!==e?this._online!=n&&(this._online=n,n)?this.sync():t.Deferred().resolve().promise():this._online},offlineData:function(t){return null==this.options.offlineStorage?null:t!==e?this._storage.setItem(t):this._storage.getItem()||[]},_isServerGrouped:function(){var t=this.group()||[];return this.options.serverGrouping&&t.length},_pushCreate:function(t){this._push(t,"pushCreate")},_pushUpdate:function(t){this._push(t,"pushUpdate")},_pushDestroy:function(t){this._push(t,"pushDestroy")},_push:function(t,e){var n=this._readData(t);n||(n=t),this[e](n)},_flatData:function(t,e){if(t){if(this._isServerGrouped())return S(t);if(!e)for(var n=0;t.length>n;n++)t.at(n)}return t},parent:dt,get:function(t){var e,n,i=this._flatData(this._data);for(e=0,n=i.length;n>e;e++)if(i[e].id==t)return i[e]},getByUid:function(t){var e,n,i=this._flatData(this._data);if(i)for(e=0,n=i.length;n>e;e++)if(i[e].uid==t)return i[e]},indexOf:function(t){return I(this._data,t)},at:function(t){return this._data.at(t)},data:function(t){var n,i=this;if(t===e){if(i._data)for(n=0;i._data.length>n;n++)i._data.at(n);return i._data}i._detachObservableParents(),i._data=this._observe(t),i._pristineData=t.slice(0),i._storeData(),i._ranges=[],i.trigger("reset"),i._addRange(i._data),i._total=i._data.length,i._pristineTotal=i._total,i._process(i._data)},view:function(t){return t===e?this._view:(this._view=this._observeView(t),e)},_observeView:function(t){var e,n=this;return M(t,n._data,n._ranges,n.reader.model||Xt,n._isServerGrouped()),e=new Yt(t,n.reader.model),e.parent=function(){return n.parent()},e},flatView:function(){var t=this.group()||[];return t.length?S(this._view):this._view},add:function(t){return this.insert(this._data.length,t)},_createNewModel:function(t){return this.reader.model?new this.reader.model(t):t instanceof Xt?t:new Xt(t)},insert:function(t,e){return e||(e=t,t=0),e instanceof Zt||(e=this._createNewModel(e)),this._isServerGrouped()?this._data.splice(t,0,this._wrapInEmptyGroup(e)):this._data.splice(t,0,e),e},pushCreate:function(t){var e,n,i,o,r,s;lt(t)||(t=[t]),e=[],n=this.options.autoSync,this.options.autoSync=!1;try{for(i=0;t.length>i;i++)o=t[i],r=this.add(o),e.push(r),s=r.toJSON(),this._isServerGrouped()&&(s=this._wrapInEmptyGroup(s)),this._pristineData.push(s)}finally{this.options.autoSync=n}e.length&&this.trigger("push",{type:"create",items:e})},pushUpdate:function(t){var e,n,i,o,r;for(lt(t)||(t=[t]),e=[],n=0;t.length>n;n++)i=t[n],o=this._createNewModel(i),r=this.get(o.id),r?(e.push(r),r.accept(i),r.trigger(kt),this._updatePristineForModel(r,i)):this.pushCreate(i);e.length&&this.trigger("push",{type:"update",items:e})},pushDestroy:function(t){var e=this._removeItems(t);e.length&&this.trigger("push",{type:"destroy",items:e})},_removeItems:function(t){var e,n,i,o,r,s;lt(t)||(t=[t]),e=[],n=this.options.autoSync,this.options.autoSync=!1;try{for(i=0;t.length>i;i++)o=t[i],r=this._createNewModel(o),s=!1,this._eachItem(this._data,function(t){var n,i;for(n=0;t.length>n;n++)if(i=t.at(n),i.id===r.id){e.push(i),t.splice(n,1),s=!0;break}}),s&&(this._removePristineForModel(r),this._destroyed.pop())}finally{this.options.autoSync=n}return e},remove:function(t){var n,i=this,o=i._isServerGrouped();return this._eachItem(i._data,function(r){return n=E(r,t),n&&o?(n.isNew&&n.isNew()||i._destroyed.push(n),!0):e}),this._removeModelFromRanges(t),this._updateRangesLength(),t},destroyed:function(){return this._destroyed},created:function(){var t,e,n=[],i=this._flatData(this._data);for(t=0,e=i.length;e>t;t++)i[t].isNew&&i[t].isNew()&&n.push(i[t]);return n},updated:function(){var t,e,n=[],i=this._flatData(this._data);for(t=0,e=i.length;e>t;t++)i[t].isNew&&!i[t].isNew()&&i[t].dirty&&n.push(i[t]);return n},sync:function(){var e,n=this,i=[],o=[],r=n._destroyed,s=t.Deferred().resolve().promise();if(n.online()){if(!n.reader.model)return s;i=n.created(),o=n.updated(),e=[],n.options.batch&&n.transport.submit?e=n._sendSubmit(i,o,r):(e.push.apply(e,n._send("create",i)),e.push.apply(e,n._send("update",o)),e.push.apply(e,n._send("destroy",r))),s=t.when.apply(null,e).then(function(){var t,e;for(t=0,e=arguments.length;e>t;t++)n._accept(arguments[t]);n._storeData(!0),n._change({action:"sync"}),n.trigger(Ct)})}else n._storeData(!0),n._change({action:"sync"});return s},cancelChanges:function(t){var e=this;t instanceof ft.data.Model?e._cancelModel(t):(e._destroyed=[],e._detachObservableParents(),e._data=e._observe(e._pristineData),e.options.serverPaging&&(e._total=e._pristineTotal),e._ranges=[],e._addRange(e._data),e._change())},hasChanges:function(){var t,e,n=this._flatData(this._data);if(this._destroyed.length)return!0;for(t=0,e=n.length;e>t;t++)if(n[t].isNew&&n[t].isNew()||n[t].dirty)return!0;return!1},_accept:function(e){var n,i=this,o=e.models,r=e.response,s=0,a=i._isServerGrouped(),l=i._pristineData,c=e.type;if(i.trigger(Pt,{response:r,type:c}),r&&!at(r)){if(r=i.reader.parse(r),i._handleCustomErrors(r))return;r=i.reader.data(r),lt(r)||(r=[r])}else r=t.map(o,function(t){return t.toJSON()});for("destroy"===c&&(i._destroyed=[]),s=0,n=o.length;n>s;s++)"destroy"!==c?(o[s].accept(r[s]),"create"===c?l.push(a?i._wrapInEmptyGroup(o[s]):r[s]):"update"===c&&i._updatePristineForModel(o[s],r[s])):i._removePristineForModel(o[s])},_updatePristineForModel:function(t,e){this._executeOnPristineForModel(t,function(t,n){ft.deepExtend(n[t],e)})},_executeOnPristineForModel:function(t,n){this._eachPristineItem(function(i){var o=B(i,t);return o>-1?(n(o,i),!0):e})},_removePristineForModel:function(t){this._executeOnPristineForModel(t,function(t,e){e.splice(t,1)})},_readData:function(t){var e=this._isServerGrouped()?this.reader.groups:this.reader.data;return e.call(this.reader,t)},_eachPristineItem:function(t){this._eachItem(this._pristineData,t)},_eachItem:function(t,e){t&&t.length&&(this._isServerGrouped()?A(t,e):e(t))},_pristineForModel:function(t){var n,i,o=function(o){return i=B(o,t),i>-1?(n=o[i],!0):e};return this._eachPristineItem(o),n},_cancelModel:function(t){var e=this._pristineForModel(t);this._eachItem(this._data,function(n){var i=I(n,t);i>=0&&(!e||t.isNew()&&!e.__state__?n.splice(i,1):n[i].accept(e))})},_submit:function(e,n){var i=this;i.trigger(At,{type:"submit"}),i.transport.submit(ot({success:function(n,i){var o=t.grep(e,function(t){return t.type==i})[0];o&&o.resolve({response:n,models:o.models,type:i})},error:function(t,n,o){for(var r=0;e.length>r;r++)e[r].reject(t);i.error(t,n,o)}},n))},_sendSubmit:function(e,n,i){var o=this,r=[];return o.options.batch&&(e.length&&r.push(t.Deferred(function(t){t.type="create",t.models=e})),n.length&&r.push(t.Deferred(function(t){t.type="update",t.models=n})),i.length&&r.push(t.Deferred(function(t){t.type="destroy",t.models=i})),o._submit(r,{data:{created:o.reader.serialize(_(e)),updated:o.reader.serialize(_(n)),destroyed:o.reader.serialize(_(i))}})),r},_promise:function(e,n,i){var o=this;return t.Deferred(function(t){o.trigger(At,{type:i}),o.transport[i].call(o.transport,ot({success:function(e){t.resolve({response:e,models:n,type:i})},error:function(e,n,i){t.reject(e),o.error(e,n,i)}},e))}).promise()},_send:function(t,e){var n,i,o=this,r=[],s=o.reader.serialize(_(e));if(o.options.batch)e.length&&r.push(o._promise({data:{models:s}},e,t));else for(n=0,i=e.length;i>n;n++)r.push(o._promise({data:s[n]},[e[n]],t));return r},read:function(e){var n=this,i=n._params(e),o=t.Deferred();return n._queueRequest(i,function(){var t=n.trigger(At,{type:"read"});t?(n._dequeueRequest(),o.resolve(t)):(n.trigger(Dt),n._ranges=[],n.trigger("reset"),n.online()?n.transport.read({data:i,success:function(t){n.success(t,i),o.resolve()},error:function(){var t=Nt.call(arguments);n.error.apply(n,t),o.reject.apply(o,t)}}):null!=n.options.offlineStorage&&(n.success(n.offlineData(),i),o.resolve()))}),o.promise()},_readAggregates:function(t){return this.reader.aggregates(t)},success:function(t){var n,i,o,r,s,a,l,c,h=this,u=h.options;if(h.trigger(Pt,{response:t,type:"read"}),h.online()){if(t=h.reader.parse(t),h._handleCustomErrors(t))return h._dequeueRequest(),e;h._total=h.reader.total(t),h._aggregate&&u.serverAggregates&&(h._aggregateResult=h._readAggregates(t)),t=h._readData(t)}else{for(t=h._readData(t),n=[],i={},o=h.reader.model,r=o?o.idField:"id",s=0;this._destroyed.length>s;s++)a=this._destroyed[s][r],i[a]=a;for(s=0;t.length>s;s++)l=t[s],c=l.__state__,"destroy"==c?i[l[r]]||this._destroyed.push(this._createNewModel(l)):n.push(l);t=n,h._total=t.length}h._pristineTotal=h._total,h._pristineData=t.slice(0),h._detachObservableParents(),h._data=h._observe(t),null!=h.options.offlineStorage&&h._eachItem(h._data,function(t){var e,n;for(e=0;t.length>e;e++)n=t.at(e),"update"==n.__state__&&(n.dirty=!0)}),h._storeData(),h._addRange(h._data),h._process(h._data),h._dequeueRequest()},_detachObservableParents:function(){if(this._data&&this._shouldDetachObservableParents)for(var t=0;this._data.length>t;t++)this._data[t].parent&&(this._data[t].parent=dt)},_storeData:function(t){function e(t){var n,i,o,r=[];for(n=0;t.length>n;n++)i=t.at(n),o=i.toJSON(),s&&i.items?o.items=e(i.items):(o.uid=i.uid,a&&(i.isNew()?o.__state__="create":i.dirty&&(o.__state__="update"))),r.push(o);return r}var n,i,o,r,s=this._isServerGrouped(),a=this.reader.model;if(null!=this.options.offlineStorage){for(n=e(this._data),i=[],o=0;this._destroyed.length>o;o++)r=this._destroyed[o].toJSON(),r.__state__="destroy",i.push(r);this.offlineData(n.concat(i)),t&&(this._pristineData=n)}},_addRange:function(t){var e=this,n=e._skip||0,i=n+e._flatData(t,!0).length;e._ranges.push({start:n,end:i,data:t,timestamp:(new Date).getTime()}),e._ranges.sort(function(t,e){return t.start-e.start})},error:function(t,e,n){this._dequeueRequest(),this.trigger(Pt,{}),this.trigger(Tt,{xhr:t,status:e,errorThrown:n})},_params:function(t){var e=this,n=ot({take:e.take(),skip:e.skip(),page:e.page(),pageSize:e.pageSize(),sort:e._sort,filter:e._filter,group:e._group,aggregate:e._aggregate},t);return e.options.serverPaging||(delete n.take,delete n.skip,delete n.page,delete n.pageSize),e.options.serverGrouping?e.reader.model&&n.group&&(n.group=O(n.group,e.reader.model)):delete n.group,e.options.serverFiltering?e.reader.model&&n.filter&&(n.filter=R(n.filter,e.reader.model)):delete n.filter,e.options.serverSorting?e.reader.model&&n.sort&&(n.sort=O(n.sort,e.reader.model)):delete n.sort,e.options.serverAggregates?e.reader.model&&n.aggregate&&(n.aggregate=O(n.aggregate,e.reader.model)):delete n.aggregate,n},_queueRequest:function(t,n){var i=this;i._requestInProgress?i._pending={callback:rt(n,i),options:t}:(i._requestInProgress=!0,i._pending=e,n())},_dequeueRequest:function(){var t=this;t._requestInProgress=!1,t._pending&&t._queueRequest(t._pending.options,t._pending.callback)},_handleCustomErrors:function(t){if(this.reader.errors){var e=this.reader.errors(t);if(e)return this.trigger(Tt,{xhr:null,status:"customerror",errorThrown:"custom error",errors:e}),!0}return!1},_shouldWrap:function(t){var e=this.reader.model;return e&&t.length?!(t[0]instanceof e):!1},_observe:function(t){var e,n=this,i=n.reader.model;return n._shouldDetachObservableParents=!0,t instanceof $t?(n._shouldDetachObservableParents=!1,n._shouldWrap(t)&&(t.type=n.reader.model,t.wrapAll(t,t))):(e=n.pageSize()&&!n.options.serverPaging?Yt:$t,t=new e(t,n.reader.model),t.parent=function(){return n.parent()}),n._isServerGrouped()&&T(t,i),n._changeHandler&&n._data&&n._data instanceof $t?n._data.unbind(kt,n._changeHandler):n._changeHandler=rt(n._change,n),t.bind(kt,n._changeHandler)},_updateTotalForAction:function(t,e){var n=this,i=parseInt(n._total,10);v(n._total)||(i=parseInt(n._pristineTotal,10)),"add"===t?i+=e.length:"remove"===t?i-=e.length:"itemchange"===t||"sync"===t||n.options.serverPaging?"sync"===t&&(i=n._pristineTotal=parseInt(n._total,10)):i=n._pristineTotal,n._total=i},_change:function(t){var e,n,i,o=this,r=t?t.action:"";if("remove"===r)for(e=0,n=t.items.length;n>e;e++)t.items[e].isNew&&t.items[e].isNew()||o._destroyed.push(t.items[e]);!o.options.autoSync||"add"!==r&&"remove"!==r&&"itemchange"!==r?(o._updateTotalForAction(r,t?t.items:[]),o._process(o._data,t)):(i=function(e){"sync"===e.action&&(o.unbind("change",i),o._updateTotalForAction(r,t.items))},o.first("change",i),o.sync())},_calculateAggregates:function(t,e){e=e||{};var n=new r(t),i=e.aggregate,o=e.filter;return o&&(n=n.filter(o)),n.aggregate(i)},_process:function(t,n){var i,o=this,r={};o.options.serverPaging!==!0&&(r.skip=o._skip,r.take=o._take||o._pageSize,r.skip===e&&o._page!==e&&o._pageSize!==e&&(r.skip=(o._page-1)*o._pageSize)),o.options.serverSorting!==!0&&(r.sort=o._sort),o.options.serverFiltering!==!0&&(r.filter=o._filter),o.options.serverGrouping!==!0&&(r.group=o._group),o.options.serverAggregates!==!0&&(r.aggregate=o._aggregate,o._aggregateResult=o._calculateAggregates(t,r)),i=o._queryProcess(t,r),o.view(i.data),i.total===e||o.options.serverFiltering||(o._total=i.total),n=n||{},n.items=n.items||o._view,o.trigger(kt,n)},_queryProcess:function(t,e){return r.process(t,e)},_mergeState:function(t){var n=this;return t!==e&&(n._pageSize=t.pageSize,n._page=t.page,n._sort=t.sort,n._filter=t.filter,n._group=t.group,n._aggregate=t.aggregate,n._skip=n._currentRangeStart=t.skip,n._take=t.take,n._skip===e&&(n._skip=n._currentRangeStart=n.skip(),t.skip=n.skip()),n._take===e&&n._pageSize!==e&&(n._take=n._pageSize,t.take=n._take),t.sort&&(n._sort=t.sort=s(t.sort)),t.filter&&(n._filter=t.filter=l(t.filter)),t.group&&(n._group=t.group=p(t.group)),t.aggregate&&(n._aggregate=t.aggregate=f(t.aggregate))),t},query:function(n){var i,o,r=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates;return r||(this._data===e||0===this._data.length)&&!this._destroyed.length?this.read(this._mergeState(n)):(o=this.trigger(At,{type:"read"}),o||(this.trigger(Dt),i=this._queryProcess(this._data,this._mergeState(n)),this.options.serverFiltering||(this._total=i.total!==e?i.total:this._data.length),this._aggregateResult=this._calculateAggregates(this._data,n),this.view(i.data),this.trigger(Pt,{type:"read"}),this.trigger(kt,{items:i.data})),t.Deferred().resolve(o).promise())},fetch:function(t){var e=this,n=function(n){n!==!0&&pt(t)&&t.call(e)};return this._query().then(n)},_query:function(t){var e=this;return e.query(ot({},{page:e.page(),pageSize:e.pageSize(),sort:e.sort(),filter:e.filter(),group:e.group(),aggregate:e.aggregate()},t))},next:function(t){var n=this,i=n.page(),o=n.total();return t=t||{},!i||o&&i+1>n.totalPages()?e:(n._skip=n._currentRangeStart=i*n.take(),i+=1,t.page=i,n._query(t),i)},prev:function(t){var n=this,i=n.page();return t=t||{},i&&1!==i?(n._skip=n._currentRangeStart=n._skip-n.take(),i-=1,t.page=i,n._query(t),i):e},page:function(t){var n,i=this;return t!==e?(t=zt.max(zt.min(zt.max(t,1),i.totalPages()),1),i._query({page:t}),e):(n=i.skip(),n!==e?zt.round((n||0)/(i.take()||1))+1:e)},pageSize:function(t){var n=this;return t!==e?(n._query({pageSize:t,page:1}),e):n.take()},sort:function(t){var n=this;return t!==e?(n._query({sort:t}),e):n._sort},filter:function(t){var n=this;return t===e?n._filter:(n.trigger("reset"),n._query({filter:t,page:1}),e)},group:function(t){var n=this;return t!==e?(n._query({group:t}),e):n._group},total:function(){return parseInt(this._total||0,10)},aggregate:function(t){var n=this;return t!==e?(n._query({aggregate:t}),e):n._aggregate},aggregates:function(){var t=this._aggregateResult;return at(t)&&(t=this._emptyAggregates(this.aggregate())),t},_emptyAggregates:function(t){var e,n,i={};if(!at(t))for(e={},lt(t)||(t=[t]),n=0;t.length>n;n++)e[t[n].aggregate]=0,i[t[n].field]=e;return i},_wrapInEmptyGroup:function(t){var e,n,i,o,r=this.group();for(i=r.length-1,o=0;i>=o;i--)n=r[i],e={value:t.get(n.field),field:n.field,items:e?[e]:[t],hasSubgroups:!!e,aggregates:this._emptyAggregates(n.aggregates)};return e},totalPages:function(){var t=this,e=t.pageSize()||t.total();return zt.ceil((t.total()||0)/e)},inRange:function(t,e){var n=this,i=zt.min(t+e,n.total());return!n.options.serverPaging&&n._data.length>0?!0:n._findRange(t,i).length>0},lastRange:function(){var t=this._ranges;return t[t.length-1]||{start:0,end:0,data:[]}},firstItemUid:function(){var t=this._ranges;return t.length&&t[0].data.length&&t[0].data[0].uid},enableRequestsInProgress:function(){this._skipRequestsInProgress=!1},_timeStamp:function(){return(new Date).getTime()},range:function(t,n){var i,o,r,s,a,l,c,h;if(this._currentRequestTimeStamp=this._timeStamp(),this._skipRequestsInProgress=!0,t=zt.min(t||0,this.total()),i=this,o=zt.max(zt.floor(t/n),0)*n,r=zt.min(o+n,i.total()),s=i._findRange(t,zt.min(t+n,i.total())),s.length){i._pending=e,i._skip=t>i.skip()?zt.min(r,(i.totalPages()-1)*i.take()):o,i._currentRangeStart=t,i._take=n,a=i.options.serverPaging,l=i.options.serverSorting,c=i.options.serverFiltering,h=i.options.serverAggregates;try{i.options.serverPaging=!0,i._isServerGrouped()||i.group()&&i.group().length||(i.options.serverSorting=!0),i.options.serverFiltering=!0,i.options.serverPaging=!0,i.options.serverAggregates=!0,a&&(i._detachObservableParents(),i._data=s=i._observe(s)),i._process(s)}finally{i.options.serverPaging=a,i.options.serverSorting=l,i.options.serverFiltering=c,i.options.serverAggregates=h}}else n!==e&&(i._rangeExists(o,r)?t>o&&i.prefetch(r,n,function(){i.range(t,n)}):i.prefetch(o,n,function(){t>o&&r<i.total()&&!i._rangeExists(r,zt.min(r+n,i.total()))?i.prefetch(r,n,function(){i.range(t,n)}):i.range(t,n)}))},_findRange:function(t,n){var i,o,r,a,l,c,h,u,d,f,g,m,v=this,y=v._ranges,_=[],w=v.options,x=w.serverSorting||w.serverPaging||w.serverFiltering||w.serverGrouping||w.serverAggregates;for(o=0,g=y.length;g>o;o++)if(i=y[o],t>=i.start&&i.end>=t){for(f=0,r=o;g>r;r++)if(i=y[r],d=v._flatData(i.data,!0),d.length&&t+f>=i.start&&(c=i.data,h=i.end,x||(m=p(v.group()||[]).concat(s(v.sort()||[])),u=v._queryProcess(i.data,{sort:m,filter:v.filter()}),d=c=u.data,u.total!==e&&(h=u.total)),a=0,t+f>i.start&&(a=t+f-i.start),l=d.length,h>n&&(l-=h-n),f+=l-a,_=v._mergeGroups(_,c,a,l),i.end>=n&&f==n-t))return _;break}return[]},_mergeGroups:function(t,e,n,i){if(this._isServerGrouped()){var o,r=e.toJSON();return t.length&&(o=t[t.length-1]),C(o,r,n,i),t.concat(r)}return t.concat(e.slice(n,i))},skip:function(){var t=this;return t._skip===e?t._page!==e?(t._page-1)*(t.take()||1):e:t._skip},currentRangeStart:function(){return this._currentRangeStart||0},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(t,e,n,i){var o=this,r=o._timeStamp();return function(s){var a,l,c,h=!1,u={start:t,end:e,data:[],timestamp:o._timeStamp()};if(o._dequeueRequest(),o.trigger(Pt,{response:s,type:"read"}),s=o.reader.parse(s),c=o._readData(s),c.length){for(a=0,l=o._ranges.length;l>a;a++)if(o._ranges[a].start===t){h=!0,u=o._ranges[a];break}h||o._ranges.push(u)}u.data=o._observe(c),u.end=u.start+o._flatData(u.data,!0).length,o._ranges.sort(function(t,e){return t.start-e.start}),o._total=o.reader.total(s),(i||r>=o._currentRequestTimeStamp||!o._skipRequestsInProgress)&&(n&&c.length?n():o.trigger(kt,{}))}},prefetch:function(t,e,n){var i=this,o=zt.min(t+e,i.total()),r={take:e,skip:t,page:t/e+1,pageSize:e,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(t,o)?n&&n():(clearTimeout(i._timeout),i._timeout=setTimeout(function(){i._queueRequest(r,function(){i.trigger(At,{type:"read"})?i._dequeueRequest():i.transport.read({data:i._params(r),success:i._prefetchSuccessHandler(t,o,n),error:function(){var t=Nt.call(arguments);i.error.apply(i,t)}})})},100))},_multiplePrefetch:function(t,e,n){var i=this,o=zt.min(t+e,i.total()),r={take:e,skip:t,page:t/e+1,pageSize:e,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(t,o)?n&&n():i.trigger(At,{type:"read"})||i.transport.read({data:i._params(r),success:i._prefetchSuccessHandler(t,o,n,!0)})},_rangeExists:function(t,e){var n,i,o=this,r=o._ranges;for(n=0,i=r.length;i>n;n++)if(t>=r[n].start&&r[n].end>=e)return!0;return!1},_removeModelFromRanges:function(t){var e,n,i,o,r;for(o=0,r=this._ranges.length;r>o&&(i=this._ranges[o],this._eachItem(i.data,function(i){e=E(i,t),e&&(n=!0)}),!n);o++);},_updateRangesLength:function(){var t,e,n,i,o=0;for(n=0,i=this._ranges.length;i>n;n++)t=this._ranges[n],t.start=t.start-o,e=this._flatData(t.data,!0).length,o=t.end-e,t.end=t.start+e}}),J={},J.create=function(e,n,i){var o,r=e.transport?t.extend({},e.transport):null;return r?(r.read=typeof r.read===vt?{url:r.read}:r.read,"jsdo"===e.type&&(r.dataSource=i),e.type&&(ft.data.transports=ft.data.transports||{},ft.data.schemas=ft.data.schemas||{},ft.data.transports[e.type]&&!st(ft.data.transports[e.type])?o=new ft.data.transports[e.type](ot(r,{data:n})):r=ot(!0,{},ft.data.transports[e.type],r),e.schema=ot(!0,{},ft.data.schemas[e.type],e.schema)),o||(o=pt(r.read)?r:new X(r))):o=new Y({data:e.data||[]}),o},Z.create=function(t){(lt(t)||t instanceof $t)&&(t={data:t});var n,i,o,r=t||{},s=r.data,a=r.fields,l=r.table,c=r.select,h={};if(s||!a||r.transport||(l?s=V(l,a):c&&(s=F(c,a),r.group===e&&s[0]&&s[0].optgroup!==e&&(r.group="optgroup"))),ft.data.Model&&a&&(!r.schema||!r.schema.model)){for(n=0,i=a.length;i>n;n++)o=a[n],o.type&&(h[o.field]=o);at(h)||(r.schema=ot(!0,r.schema,{model:{fields:h}}))}return r.data=s,c=null,r.select=null,l=null,r.table=null,r instanceof Z?r:new Z(r)},tt=Zt.define({idField:"id",init:function(t){var e=this,n=e.hasChildren||t&&t.hasChildren,i="items",o={};ft.data.Model.fn.init.call(e,t),typeof e.children===vt&&(i=e.children),o={schema:{data:i,model:{hasChildren:n,id:e.idField,fields:e.fields}}},typeof e.children!==vt&&ot(o,e.children),o.data=t,n||(n=o.schema.data),typeof n===vt&&(n=ft.getter(n)),pt(n)&&(e.hasChildren=!!n.call(e,e)),e._childrenOptions=o,e.hasChildren&&e._initChildren(),e._loaded=!(!t||!t._loaded)},_initChildren:function(){var t,e,n,i=this;i.children instanceof et||(t=i.children=new et(i._childrenOptions),e=t.transport,n=e.parameterMap,e.parameterMap=function(t,e){return t[i.idField||"id"]=i.id,n&&(t=n(t,e)),t},t.parent=function(){return i},t.bind(kt,function(t){t.node=t.node||i,i.trigger(kt,t)}),t.bind(Tt,function(t){var e=i.parent();e&&(t.node=t.node||i,e.trigger(Tt,t))}),i._updateChildrenField())},append:function(t){this._initChildren(),this.loaded(!0),this.children.add(t)},hasChildren:!1,level:function(){for(var t=this.parentNode(),e=0;t&&t.parentNode;)e++,t=t.parentNode?t.parentNode():null;return e},_updateChildrenField:function(){var t=this._childrenOptions.schema.data;this[t||"items"]=this.children.data()},_childrenLoaded:function(){this._loaded=!0,this._updateChildrenField()},load:function(){var n,i,o={},r="_query";return this.hasChildren?(this._initChildren(),n=this.children,o[this.idField||"id"]=this.id,this._loaded||(n._data=e,r="read"),n.one(kt,rt(this._childrenLoaded,this)),i=n[r](o)):this.loaded(!0),i||t.Deferred().resolve().promise()},parentNode:function(){var t=this.parent();return t.parent()},loaded:function(t){return t===e?this._loaded:(this._loaded=t,e)},shouldSerialize:function(t){return Zt.fn.shouldSerialize.call(this,t)&&"children"!==t&&"_loaded"!==t&&"hasChildren"!==t&&"_childrenOptions"!==t}}),et=Z.extend({init:function(t){var e=tt.define({children:t});Z.fn.init.call(this,ot(!0,{},{schema:{modelBase:e,model:e}},t)),this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var t=this;t._data.bind(Tt,function(e){t.trigger(Tt,e)})},remove:function(t){var e,n=t.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),e=Z.fn.remove.call(i,t),n&&!i.data().length&&(n.hasChildren=!1),e},success:N("success"),data:N("data"),insert:function(t,e){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),Z.fn.insert.call(this,t,e)},_find:function(t,e){var n,i,o,r,s=this._data;if(s){if(o=Z.fn[t].call(this,e))return o;for(s=this._flatData(this._data),n=0,i=s.length;i>n;n++)if(r=s[n].children,r instanceof et&&(o=r[t](e)))return o}},get:function(t){return this._find("get",t)},getByUid:function(t){
return this._find("getByUid",t)}}),et.create=function(t){t=t&&t.push?{data:t}:t;var e=t||{},n=e.data,i=e.fields,o=e.list;return n&&n._dataSource?n._dataSource:(n||!i||e.transport||o&&(n=H(o,i)),e.data=n,e instanceof et?e:new et(e))},nt=ft.Observable.extend({init:function(t,e,n){ft.Observable.fn.init.call(this),this._prefetching=!1,this.dataSource=t,this.prefetch=!n;var i=this;t.bind("change",function(){i._change()}),t.bind("reset",function(){i._reset()}),this._syncWithDataSource(),this.setViewSize(e)},setViewSize:function(t){this.viewSize=t,this._recalculate()},at:function(t){var n=this.pageSize,i=!0;return t>=this.total()?(this.trigger("endreached",{index:t}),null):this.useRanges?this.useRanges?((this.dataOffset>t||t>=this.skip+n)&&(i=this.range(Math.floor(t/n)*n)),t===this.prefetchThreshold&&this._prefetch(),t===this.midPageThreshold?this.range(this.nextMidRange,!0):t===this.nextPageThreshold?this.range(this.nextFullRange):t===this.pullBackThreshold&&this.range(this.offset===this.skip?this.previousMidRange:this.previousFullRange),i?this.dataSource.at(t-this.dataOffset):(this.trigger("endreached",{index:t}),null)):e:this.dataSource.view()[t]},indexOf:function(t){return this.dataSource.data().indexOf(t)+this.dataOffset},total:function(){return parseInt(this.dataSource.total(),10)},next:function(){var t=this,e=t.pageSize,n=t.skip-t.viewSize+e,i=zt.max(zt.floor(n/e),0)*e;this.offset=n,this.dataSource.prefetch(i,e,function(){t._goToRange(n,!0)})},range:function(t,e){if(this.offset===t)return!0;var n=this,i=this.pageSize,o=zt.max(zt.floor(t/i),0)*i,r=this.dataSource;return e&&(o+=i),r.inRange(t,i)?(this.offset=t,this._recalculate(),this._goToRange(t),!0):this.prefetch?(r.prefetch(o,i,function(){n.offset=t,n._recalculate(),n._goToRange(t,!0)}),!1):!0},syncDataSource:function(){var t=this.offset;this.offset=null,this.range(t)},destroy:function(){this.unbind()},_prefetch:function(){var t=this,e=this.pageSize,n=this.skip+e,i=this.dataSource;i.inRange(n,e)||this._prefetching||!this.prefetch||(this._prefetching=!0,this.trigger("prefetching",{skip:n,take:e}),i.prefetch(n,e,function(){t._prefetching=!1,t.trigger("prefetched",{skip:n,take:e})}))},_goToRange:function(t,e){this.offset===t&&(this.dataOffset=t,this._expanding=e,this.dataSource.range(t,this.pageSize),this.dataSource.enableRequestsInProgress())},_reset:function(){this._syncPending=!0},_change:function(){var t=this.dataSource;this.length=this.useRanges?t.lastRange().end:t.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 t=this.dataSource;this._firstItemUid=t.firstItemUid(),this.dataOffset=this.offset=t.skip()||0,this.pageSize=t.pageSize(),this.useRanges=t.options.serverPaging},_recalculate:function(){var t=this.pageSize,e=this.offset,n=this.viewSize,i=Math.ceil(e/t)*t;this.skip=i,this.midPageThreshold=i+t-1,this.nextPageThreshold=i+n-1,this.prefetchThreshold=i+Math.floor(t/3*2),this.pullBackThreshold=this.offset-1,this.nextMidRange=i+t-n,this.nextFullRange=i,this.previousMidRange=e-n,this.previousFullRange=i-t}}),it=ft.Observable.extend({init:function(t,e){var n=this;ft.Observable.fn.init.call(n),this.dataSource=t,this.batchSize=e,this._total=0,this.buffer=new nt(t,3*e),this.buffer.bind({endreached:function(t){n.trigger("endreached",{index:t.index})},prefetching:function(t){n.trigger("prefetching",{skip:t.skip,take:t.take})},prefetched:function(t){n.trigger("prefetched",{skip:t.skip,take:t.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(t){var e,n,i=this.buffer,o=t*this.batchSize,r=this.batchSize,s=[];for(i.offset>o&&i.at(i.offset-1),n=0;r>n&&(e=i.at(o+n),null!==e);n++)s.push(e);return s},total:function(){return this._total},destroy:function(){this.buffer.destroy(),this.unbind()}}),ot(!0,ft.data,{readers:{json:K},Query:r,DataSource:Z,HierarchicalDataSource:et,Node:tt,ObservableObject:Xt,ObservableArray:$t,LazyObservableArray:Yt,LocalTransport:Y,RemoteTransport:X,Cache:Q,DataReader:K,Model:Zt,Buffer:nt,BatchBuffer:it})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.binder.min",["kendo.core.min","kendo.data.min"],t)}(function(){return function(t,e){function n(e,n,i){return v.extend({init:function(t,e,n){var i=this;v.fn.init.call(i,t.element[0],e,n),i.widget=t,i._dataBinding=E(i.dataBinding,i),i._dataBound=E(i.dataBound,i),i._itemChange=E(i.itemChange,i)},itemChange:function(t){s(t.item[0],t.data,this._ns(t.ns),[t.data].concat(this.bindings[e]._parents()))},dataBinding:function(t){var e,n,i=this.widget,o=t.removedItems||i.items();for(e=0,n=o.length;n>e;e++)c(o[e],!1)},_ns:function(e){e=e||C.ui;var n=[C.ui,C.dataviz.ui,C.mobile.ui];return n.splice(t.inArray(e,n),1),n.unshift(e),C.rolesFromNamespaces(n)},dataBound:function(t){var i,o,r,a,l=this.widget,c=t.addedItems||l.items(),h=l[n],u=C.data.HierarchicalDataSource;if(!(u&&h instanceof u)&&c.length)for(r=t.addedDataItems||h.flatView(),a=this.bindings[e]._parents(),i=0,o=r.length;o>i;i++)s(c[i],r[i],this._ns(t.ns),[r[i]].concat(a))},refresh:function(t){var o,r,s,a=this,l=a.widget;t=t||{},t.action||(a.destroy(),l.bind("dataBinding",a._dataBinding),l.bind("dataBound",a._dataBound),l.bind("itemChange",a._itemChange),o=a.bindings[e].get(),l[n]instanceof C.data.DataSource&&l[n]!=o&&(o instanceof C.data.DataSource?l[i](o):o&&o._dataSource?l[i](o._dataSource):(l[n].data(o),r=C.ui.Select&&l instanceof C.ui.Select,s=C.ui.MultiSelect&&l instanceof C.ui.MultiSelect,a.bindings.value&&(r||s)&&l.value(f(a.bindings.value.get(),l.options.dataValueField)))))},destroy:function(){var t=this.widget;t.unbind("dataBinding",this._dataBinding),t.unbind("dataBound",this._dataBound),t.unbind("itemChange",this._itemChange)}})}function i(t,n){var i=C.initWidget(t,{},n);return i?new x(i):e}function o(t){var e,n,i,r,s,a,l,c={};for(l=t.match(b),e=0,n=l.length;n>e;e++)i=l[e],r=i.indexOf(":"),s=i.substring(0,r),a=i.substring(r+1),"{"==a.charAt(0)&&(a=o(a)),c[s]=a;return c}function r(t,e,n){var i,o={};for(i in t)o[i]=new n(e,t[i]);return o}function s(t,e,n,a){var c,h,u,d=t.getAttribute("data-"+C.ns+"role"),f=t.getAttribute("data-"+C.ns+"bind"),v=t.children,y=[],_=!0,x={};if(a=a||[e],(d||f)&&l(t,!1),d&&(u=i(t,n)),f&&(f=o(f.replace(k,"")),u||(x=C.parseOptions(t,{textField:"",valueField:"",template:"",valueUpdate:V,valuePrimitive:!1,autoBind:!0}),x.roles=n,u=new w(t,x)),u.source=e,h=r(f,a,p),x.template&&(h.template=new m(a,"",x.template)),h.click&&(f.events=f.events||{},f.events.click=f.click,h.click.destroy(),delete h.click),h.source&&(_=!1),f.attr&&(h.attr=r(f.attr,a,p)),f.style&&(h.style=r(f.style,a,p)),f.events&&(h.events=r(f.events,a,g)),f.css&&(h.css=r(f.css,a,p)),u.bind(h)),u&&(t.kendoBindingTarget=u),_&&v){for(c=0;v.length>c;c++)y[c]=v[c];for(c=0;y.length>c;c++)s(y[c],e,n,a)}}function a(e,n){var i,o,r,a=C.rolesFromNamespaces([].slice.call(arguments,2));for(n=C.observable(n),e=t(e),i=0,o=e.length;o>i;i++)r=e[i],1===r.nodeType&&s(r,n,a)}function l(e,n){var i,o=e.kendoBindingTarget;o&&(o.destroy(),O?delete e.kendoBindingTarget:e.removeAttribute?e.removeAttribute("kendoBindingTarget"):e.kendoBindingTarget=null),n&&(i=C.widgetInstance(t(e)),i&&typeof i.destroy===F&&i.destroy())}function c(t,e){l(t,e),h(t,e)}function h(t,e){var n,i,o=t.children;if(o)for(n=0,i=o.length;i>n;n++)c(o[n],e)}function u(e){var n,i;for(e=t(e),n=0,i=e.length;i>n;n++)c(e[n],!1)}function d(t,e){var n=t.element,i=n[0].kendoBindingTarget;i&&a(n,i.source,e)}function f(t,e){var n,i,o=[],r=0;if(!e)return t;if(t instanceof A){for(n=t.length;n>r;r++)i=t[r],o[r]=i.get?i.get(e):i[e];t=o}else t instanceof T&&(t=t.get(e));return t}var p,g,m,v,y,_,w,x,b,k,C=window.kendo,S=C.Observable,T=C.data.ObservableObject,A=C.data.ObservableArray,D={}.toString,P={},M=C.Class,E=t.proxy,B="value",I="source",z="events",L="checked",R="css",O=!0,F="function",V="change";!function(){var t=document.createElement("a");try{delete t.test}catch(e){O=!1}}(),p=S.extend({init:function(t,e){var n=this;S.fn.init.call(n),n.source=t[0],n.parents=t,n.path=e,n.dependencies={},n.dependencies[e]=!0,n.observable=n.source instanceof S,n._access=function(t){n.dependencies[t.field]=!0},n.observable&&(n._change=function(t){n.change(t)},n.source.bind(V,n._change))},_parents:function(){var e,n=this.parents,i=this.get();return i&&"function"==typeof i.parent&&(e=i.parent(),t.inArray(e,n)<0&&(n=[e].concat(n))),n},change:function(t){var e,n,i=t.field,o=this;if("this"===o.path)o.trigger(V,t);else for(e in o.dependencies)if(0===e.indexOf(i)&&(n=e.charAt(i.length),!n||"."===n||"["===n)){o.trigger(V,t);break}},start:function(t){t.bind("get",this._access)},stop:function(t){t.unbind("get",this._access)},get:function(){var t=this,n=t.source,i=0,o=t.path,r=n;if(!t.observable)return r;for(t.start(t.source),r=n.get(o);r===e&&n;)n=t.parents[++i],n instanceof T&&(r=n.get(o));if(r===e)for(n=t.source;r===e&&n;)n=n.parent(),n instanceof T&&(r=n.get(o));return"function"==typeof r&&(i=o.lastIndexOf("."),i>0&&(n=n.get(o.substring(0,i))),t.start(n),r=n!==t.source?r.call(n,t.source):r.call(n),t.stop(n)),n&&n!==t.source&&(t.currentSource=n,n.unbind(V,t._change).bind(V,t._change)),t.stop(t.source),r},set:function(t){var e=this.currentSource||this.source,n=C.getter(this.path)(e);"function"==typeof n?e!==this.source?n.call(e,this.source,t):n.call(e,t):e.set(this.path,t)},destroy:function(){this.observable&&(this.source.unbind(V,this._change),this.currentSource&&this.currentSource.unbind(V,this._change)),this.unbind()}}),g=p.extend({get:function(){var t,e=this.source,n=this.path,i=0;for(t=e.get(n);!t&&e;)e=this.parents[++i],e instanceof T&&(t=e.get(n));return E(t,e)}}),m=p.extend({init:function(t,e,n){var i=this;p.fn.init.call(i,t,e),i.template=n},render:function(t){var e;return this.start(this.source),e=C.render(this.template,t),this.stop(this.source),e}}),v=M.extend({init:function(t,e,n){this.element=t,this.bindings=e,this.options=n},bind:function(t,e){var n=this;t=e?t[e]:t,t.bind(V,function(t){n.refresh(e||t)}),n.refresh(e)},destroy:function(){}}),y=v.extend({dataType:function(){var t=this.element.getAttribute("data-type")||this.element.type||"text";return t.toLowerCase()},parsedValue:function(){return this._parseValue(this.element.value,this.dataType())},_parseValue:function(t,e){return"date"==e?t=C.parseDate(t,"yyyy-MM-dd"):"datetime-local"==e?t=C.parseDate(t,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==e?t=C.parseFloat(t):"boolean"==e&&(t=t.toLowerCase(),t=null!==C.parseFloat(t)?!!C.parseFloat(t):"true"===t.toLowerCase()),t}}),P.attr=v.extend({refresh:function(t){this.element.setAttribute(t,this.bindings.attr[t].get())}}),P.css=v.extend({init:function(t,e,n){v.fn.init.call(this,t,e,n),this.classes={}},refresh:function(e){var n=t(this.element),i=this.bindings.css[e],o=this.classes[e]=i.get();o?n.addClass(e):n.removeClass(e)}}),P.style=v.extend({refresh:function(t){this.element.style[t]=this.bindings.style[t].get()||""}}),P.enabled=v.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),P.readonly=v.extend({refresh:function(){this.bindings.readonly.get()?this.element.setAttribute("readonly","readonly"):this.element.removeAttribute("readonly")}}),P.disabled=v.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),P.events=v.extend({init:function(t,e,n){v.fn.init.call(this,t,e,n),this.handlers={}},refresh:function(e){var n=t(this.element),i=this.bindings.events[e],o=this.handlers[e];o&&n.off(e,o),o=this.handlers[e]=i.get(),n.on(e,i.source,o)},destroy:function(){var e,n=t(this.element);for(e in this.handlers)n.off(e,this.handlers[e])}}),P.text=v.extend({refresh:function(){var e=this.bindings.text.get(),n=this.element.getAttribute("data-format")||"";null==e&&(e=""),t(this.element).text(C.toString(e,n))}}),P.visible=v.extend({refresh:function(){this.element.style.display=this.bindings.visible.get()?"":"none"}}),P.invisible=v.extend({refresh:function(){this.element.style.display=this.bindings.invisible.get()?"none":""}}),P.html=v.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),P.value=y.extend({init:function(e,n,i){y.fn.init.call(this,e,n,i),this._change=E(this.change,this),this.eventName=i.valueUpdate||V,t(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=V,this.bindings[B].set(this.parsedValue()),this._initChange=!1},refresh:function(){var t,e;this._initChange||(t=this.bindings[B].get(),null==t&&(t=""),e=this.dataType(),"date"==e?t=C.toString(t,"yyyy-MM-dd"):"datetime-local"==e&&(t=C.toString(t,"yyyy-MM-ddTHH:mm:ss")),this.element.value=t),this._initChange=!1},destroy:function(){t(this.element).off(this.eventName,this._change)}}),P.source=v.extend({init:function(t,e,n){v.fn.init.call(this,t,e,n);var i=this.bindings.source.get();i instanceof C.data.DataSource&&n.autoBind!==!1&&i.fetch()},refresh:function(t){var e=this,n=e.bindings.source.get();n instanceof A||n instanceof C.data.DataSource?(t=t||{},"add"==t.action?e.add(t.index,t.items):"remove"==t.action?e.remove(t.index,t.items):"itemchange"!=t.action&&e.render()):e.render()},container:function(){var t=this.element;return"table"==t.nodeName.toLowerCase()&&(t.tBodies[0]||t.appendChild(document.createElement("tbody")),t=t.tBodies[0]),t},template:function(){var t=this.options,e=t.template,n=this.container().nodeName.toLowerCase();return e||(e="select"==n?t.valueField||t.textField?C.format('<option value="#:{0}#">#:{1}#</option>',t.valueField||t.textField,t.textField||t.valueField):"<option>#:data#</option>":"tbody"==n?"<tr><td>#:data#</td></tr>":"ul"==n||"ol"==n?"<li>#:data#</li>":"#:data#",e=C.template(e)),e},add:function(e,n){var i,o,r,a,l=this.container(),c=l.cloneNode(!1),h=l.children[e];if(t(c).html(C.render(this.template(),n)),c.children.length)for(i=this.bindings.source._parents(),o=0,r=n.length;r>o;o++)a=c.children[0],l.insertBefore(a,h||null),s(a,n[o],this.options.roles,[n[o]].concat(i))},remove:function(t,e){var n,i,o=this.container();for(n=0;e.length>n;n++)i=o.children[t],c(i,!0),o.removeChild(i)},render:function(){var e,n,i,o=this.bindings.source.get(),r=this.container(),a=this.template();if(null!=o)if(o instanceof C.data.DataSource&&(o=o.view()),o instanceof A||"[object Array]"===D.call(o)||(o=[o]),this.bindings.template){if(h(r,!0),t(r).html(this.bindings.template.render(o)),r.children.length)for(e=this.bindings.source._parents(),n=0,i=o.length;i>n;n++)s(r.children[n],o[n],this.options.roles,[o[n]].concat(e))}else t(r).html(C.render(a,o))}}),P.input={checked:y.extend({init:function(e,n,i){y.fn.init.call(this,e,n,i),this._change=E(this.change,this),t(this.element).change(this._change)},change:function(){var t,e,n,i=this.element,o=this.value();if("radio"==i.type)o=this.parsedValue(),this.bindings[L].set(o);else if("checkbox"==i.type)if(t=this.bindings[L].get(),t instanceof A){if(o=this.parsedValue(),o instanceof Date){for(n=0;t.length>n;n++)if(t[n]instanceof Date&&+t[n]===+o){e=n;break}}else e=t.indexOf(o);e>-1?t.splice(e,1):t.push(o)}else this.bindings[L].set(o)},refresh:function(){var t,e,n=this.bindings[L].get(),i=n,o=this.dataType(),r=this.element;if("checkbox"==r.type)if(i instanceof A){if(t=-1,n=this.parsedValue(),n instanceof Date){for(e=0;i.length>e;e++)if(i[e]instanceof Date&&+i[e]===+n){t=e;break}}else t=i.indexOf(n);r.checked=t>=0}else r.checked=i;else"radio"==r.type&&null!=n&&("date"==o?n=C.toString(n,"yyyy-MM-dd"):"datetime-local"==o&&(n=C.toString(n,"yyyy-MM-ddTHH:mm:ss")),r.checked=r.value===""+n?!0:!1)},value:function(){var t=this.element,e=t.value;return"checkbox"==t.type&&(e=t.checked),e},destroy:function(){t(this.element).off(V,this._change)}})},P.select={source:P.source.extend({refresh:function(n){var i,o=this,r=o.bindings.source.get();r instanceof A||r instanceof C.data.DataSource?(n=n||{},"add"==n.action?o.add(n.index,n.items):"remove"==n.action?o.remove(n.index,n.items):("itemchange"==n.action||n.action===e)&&(o.render(),o.bindings.value&&o.bindings.value&&(i=f(o.bindings.value.get(),t(o.element).data("valueField")),null===i?o.element.selectedIndex=-1:o.element.value=i))):o.render()}}),value:y.extend({init:function(e,n,i){y.fn.init.call(this,e,n,i),this._change=E(this.change,this),t(this.element).change(this._change)},parsedValue:function(){var t,e,n,i,o=this.dataType(),r=[];for(n=0,i=this.element.options.length;i>n;n++)e=this.element.options[n],e.selected&&(t=e.attributes.value,t=t&&t.specified?e.value:e.text,r.push(this._parseValue(t,o)));return r},change:function(){var t,n,i,o,r,s,a,l,c=[],h=this.element,u=this.options.valueField||this.options.textField,d=this.options.valuePrimitive;for(r=0,s=h.options.length;s>r;r++)n=h.options[r],n.selected&&(o=n.attributes.value,o=o&&o.specified?n.value:n.text,c.push(this._parseValue(o,this.dataType())));if(u)for(t=this.bindings.source.get(),t instanceof C.data.DataSource&&(t=t.view()),i=0;c.length>i;i++)for(r=0,s=t.length;s>r;r++)if(a=this._parseValue(t[r].get(u),this.dataType()),l=a+""===c[i]){c[i]=t[r];break}o=this.bindings[B].get(),o instanceof A?o.splice.apply(o,[0,o.length].concat(c)):this.bindings[B].set(d||!(o instanceof T||null===o||o===e)&&u?c[0].get(u):c[0])},refresh:function(){var t,e,n,i=this.element,o=i.options,r=this.bindings[B].get(),s=r,a=this.options.valueField||this.options.textField,l=!1,c=this.dataType();for(s instanceof A||(s=new A([r])),i.selectedIndex=-1,n=0;s.length>n;n++)for(r=s[n],a&&r instanceof T&&(r=r.get(a)),"date"==c?r=C.toString(s[n],"yyyy-MM-dd"):"datetime-local"==c&&(r=C.toString(s[n],"yyyy-MM-ddTHH:mm:ss")),t=0;o.length>t;t++)e=o[t].value,""===e&&""!==r&&(e=o[t].text),null!=r&&e==""+r&&(o[t].selected=!0,l=!0)},destroy:function(){t(this.element).off(V,this._change)}})},P.widget={events:v.extend({init:function(t,e,n){v.fn.init.call(this,t.element[0],e,n),this.widget=t,this.handlers={}},refresh:function(t){var e=this.bindings.events[t],n=this.handlers[t];n&&this.widget.unbind(t,n),n=e.get(),this.handlers[t]=function(t){t.data=e.source,n(t),t.data===e.source&&delete t.data},this.widget.bind(t,this.handlers[t])},destroy:function(){var t;for(t in this.handlers)this.widget.unbind(t,this.handlers[t])}}),checked:v.extend({init:function(t,e,n){v.fn.init.call(this,t.element[0],e,n),this.widget=t,this._change=E(this.change,this),this.widget.bind(V,this._change)},change:function(){this.bindings[L].set(this.value())},refresh:function(){this.widget.check(this.bindings[L].get()===!0)},value:function(){var t=this.element,e=t.value;return("on"==e||"off"==e)&&(e=t.checked),e},destroy:function(){this.widget.unbind(V,this._change)}}),visible:v.extend({init:function(t,e,n){v.fn.init.call(this,t.element[0],e,n),this.widget=t},refresh:function(){var t=this.bindings.visible.get();this.widget.wrapper[0].style.display=t?"":"none"}}),invisible:v.extend({init:function(t,e,n){v.fn.init.call(this,t.element[0],e,n),this.widget=t},refresh:function(){var t=this.bindings.invisible.get();this.widget.wrapper[0].style.display=t?"none":""}}),enabled:v.extend({init:function(t,e,n){v.fn.init.call(this,t.element[0],e,n),this.widget=t},refresh:function(){this.widget.enable&&this.widget.enable(this.bindings.enabled.get())}}),disabled:v.extend({init:function(t,e,n){v.fn.init.call(this,t.element[0],e,n),this.widget=t},refresh:function(){this.widget.enable&&this.widget.enable(!this.bindings.disabled.get())}}),source:n("source","dataSource","setDataSource"),value:v.extend({init:function(e,n,i){v.fn.init.call(this,e.element[0],n,i),this.widget=e,this._change=t.proxy(this.change,this),this.widget.first(V,this._change);var o=this.bindings.value.get();this._valueIsObservableObject=!i.valuePrimitive&&(null==o||o instanceof T),this._valueIsObservableArray=o instanceof A,this._initChange=!1},_source:function(){var t;return this.widget.dataItem&&(t=this.widget.dataItem(),t&&t instanceof T)?[t]:(this.bindings.source&&(t=this.bindings.source.get()),(!t||t instanceof C.data.DataSource)&&(t=this.widget.dataSource.flatView()),t)},change:function(){var t,e,n,i,o,r,s,a=this.widget.value(),l=this.options.dataValueField||this.options.dataTextField,c="[object Array]"===D.call(a),h=this._valueIsObservableObject,u=[];if(this._initChange=!0,l)if(""===a&&(h||this.options.valuePrimitive))a=null;else{for(s=this._source(),c&&(e=a.length,u=a.slice(0)),o=0,r=s.length;r>o;o++)if(n=s[o],i=n.get(l),c){for(t=0;e>t;t++)if(i==u[t]){u[t]=n;break}}else if(i==a){a=h?n:i;break}u[0]&&(a=this._valueIsObservableArray?u:h||!l?u[0]:u[0].get(l))}this.bindings.value.set(a),this._initChange=!1},refresh:function(){var t,n,i,o,r,s,a,l,c;if(!this._initChange){if(t=this.widget,n=t.options,i=n.dataTextField,o=n.dataValueField||i,r=this.bindings.value.get(),s=n.text||"",a=0,c=[],r===e&&(r=null),o)if(r instanceof A){for(l=r.length;l>a;a++)c[a]=r[a].get(o);r=c}else r instanceof T&&(s=r.get(i),r=r.get(o));n.autoBind!==!1||n.cascadeFrom||!t.listView||t.listView.bound()?t.value(r):(i!==o||s||(s=r),s||!r&&0!==r||!n.valuePrimitive?t._preselect(r,s):t.value(r))}this._initChange=!1},destroy:function(){this.widget.unbind(V,this._change)}}),gantt:{dependencies:n("dependencies","dependencies","setDependenciesDataSource")},multiselect:{value:v.extend({init:function(e,n,i){v.fn.init.call(this,e.element[0],n,i),this.widget=e,this._change=t.proxy(this.change,this),this.widget.first(V,this._change),this._initChange=!1},change:function(){var t,n,i,o,r,s,a,l,c,h=this,u=h.bindings[B].get(),d=h.options.valuePrimitive,f=d?h.widget.value():h.widget.dataItems(),p=this.options.dataValueField||this.options.dataTextField;if(f=f.slice(0),h._initChange=!0,u instanceof A){for(t=[],n=f.length,i=0,o=0,r=u[i],s=!1;r!==e;){for(c=!1,o=0;n>o;o++)if(d?s=f[o]==r:(l=f[o],l=l.get?l.get(p):l,s=l==(r.get?r.get(p):r)),s){f.splice(o,1),n-=1,c=!0;break}c?i+=1:(t.push(r),_(u,i,1),a=i),r=u[i]}_(u,u.length,0,f),t.length&&u.trigger("change",{action:"remove",items:t,index:a}),f.length&&u.trigger("change",{action:"add",items:f,index:u.length-1})}else h.bindings[B].set(f);h._initChange=!1},refresh:function(){if(!this._initChange){var t,n,i=this.options,o=this.widget,r=i.dataValueField||i.dataTextField,s=this.bindings.value.get(),a=s,l=0,c=[];if(s===e&&(s=null),r)if(s instanceof A){for(t=s.length;t>l;l++)n=s[l],c[l]=n.get?n.get(r):n;s=c}else s instanceof T&&(s=s.get(r));i.autoBind!==!1||i.valuePrimitive===!0||o._isBound()?o.value(s):o._preselect(a,s)}},destroy:function(){this.widget.unbind(V,this._change)}})},scheduler:{source:n("source","dataSource","setDataSource").extend({dataBound:function(t){var e,n,i,o,r=this.widget,a=t.addedItems||r.items();if(a.length)for(i=t.addedDataItems||r.dataItems(),o=this.bindings.source._parents(),e=0,n=i.length;n>e;e++)s(a[e],i[e],this._ns(t.ns),[i[e]].concat(o))}})}},_=function(t,e,n,i){var o,r,s,a,l;if(i=i||[],n=n||0,o=i.length,r=t.length,s=[].slice.call(t,e+n),a=s.length,o){for(o=e+o,l=0;o>e;e++)t[e]=i[l],l++;t.length=o}else if(n)for(t.length=e,n+=e;n>e;)delete t[--n];if(a){for(a=e+a,l=0;a>e;e++)t[e]=s[l],l++;t.length=a}for(e=t.length;r>e;)delete t[e],e++},w=M.extend({init:function(t,e){this.target=t,this.options=e,this.toDestroy=[]},bind:function(t){var e,n,i,o,r,s,a=this instanceof x,l=this.binders();for(e in t)e==B?n=!0:e==I?i=!0:e!=z||a?e==L?r=!0:e==R?s=!0:this.applyBinding(e,t,l):o=!0;i&&this.applyBinding(I,t,l),n&&this.applyBinding(B,t,l),r&&this.applyBinding(L,t,l),o&&!a&&this.applyBinding(z,t,l),s&&!a&&this.applyBinding(R,t,l)},binders:function(){return P[this.target.nodeName.toLowerCase()]||{}},applyBinding:function(t,e,n){var i,o=n[t]||P[t],r=this.toDestroy,s=e[t];if(o)if(o=new o(this.target,e,this.options),r.push(o),s instanceof p)o.bind(s),r.push(s);else for(i in s)o.bind(s,i),r.push(s[i]);else if("template"!==t)throw Error("The "+t+" binding is not supported by the "+this.target.nodeName.toLowerCase()+" element")},destroy:function(){var t,e,n=this.toDestroy;for(t=0,e=n.length;e>t;t++)n[t].destroy()}}),x=w.extend({binders:function(){return P.widget[this.target.options.name.toLowerCase()]||{}},applyBinding:function(t,e,n){var i,o=n[t]||P.widget[t],r=this.toDestroy,s=e[t];if(!o)throw Error("The "+t+" binding is not supported by the "+this.target.options.name+" widget");if(o=new o(this.target,e,this.target.options),r.push(o),s instanceof p)o.bind(s),r.push(s);else for(i in s)o.bind(s,i),r.push(s[i])}}),b=/[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g,k=/\s/g,C.unbind=u,C.bind=a,C.data.binders=P,C.data.Binder=v,C.notify=d,C.observable=function(t){return t instanceof T||(t=new T(t)),t},C.observableHierarchy=function(t){function e(t){var n,i;for(n=0;t.length>n;n++)t[n]._initChildren(),i=t[n].children,i.fetch(),t[n].items=i.data(),e(t[n].items)}var n=C.data.HierarchicalDataSource.create(t);return n.fetch(),e(n.data()),n._data._dataSource=n,n._data}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.view.min",["kendo.core.min","kendo.binder.min","kendo.fx.min"],t)}(function(){return function(t,e){function n(t){if(!t)return{};var e=t.match(y)||[];return{type:e[1],direction:e[3],reverse:"reverse"===e[5]}}var i=window.kendo,o=i.Observable,r="SCRIPT",s="init",a="show",l="hide",c="transitionStart",h="transitionEnd",u="attach",d="detach",f=/unrecognized expression/,p=o.extend({init:function(t,e){var n=this;e=e||{},o.fn.init.call(n),n.content=t,n.id=i.guid(),n.tagName=e.tagName||"div",n.model=e.model,n._wrap=e.wrap!==!1,this._evalTemplate=e.evalTemplate||!1,n._fragments={},n.bind([s,a,l,c,h],e)},render:function(e){var n=this,o=!n.element;return o&&(n.element=n._createElement()),e&&t(e).append(n.element),o&&(i.bind(n.element,n.model),n.trigger(s)),e&&(n._eachFragment(u),n.trigger(a)),n.element},clone:function(){return new g(this)},triggerBeforeShow:function(){return!0},triggerBeforeHide:function(){return!0},showStart:function(){this.element.css("display","")},showEnd:function(){},hideEnd:function(){this.hide()},beforeTransition:function(t){this.trigger(c,{type:t})},afterTransition:function(t){this.trigger(h,{type:t})},hide:function(){this._eachFragment(d),this.element.detach(),this.trigger(l)},destroy:function(){var t=this.element;t&&(i.unbind(t),i.destroy(t),t.remove())},fragments:function(e){t.extend(this._fragments,e)},_eachFragment:function(t){for(var e in this._fragments)this._fragments[e][t](this,e)},_createElement:function(){var e,n,o,s=this,a="<"+s.tagName+" />";try{n=t(document.getElementById(s.content)||s.content),n[0].tagName===r&&(n=n.html())}catch(l){f.test(l.message)&&(n=s.content)}return"string"==typeof n?(n=n.replace(/^\s+|\s+$/g,""),s._evalTemplate&&(n=i.template(n)(s.model||{})),e=t(a).append(n),s._wrap||(e=e.contents())):(e=n,s._evalTemplate&&(o=t(i.template(t("<div />").append(e.clone(!0)).html())(s.model||{})),t.contains(document,e[0])&&e.replaceWith(o),e=o),s._wrap&&(e=e.wrapAll(a).parent())),e}}),g=i.Class.extend({init:function(e){t.extend(this,{element:e.element.clone(!0),transition:e.transition,id:e.id}),e.element.parent().append(this.element)},hideEnd:function(){this.element.remove()},beforeTransition:t.noop,afterTransition:t.noop}),m=p.extend({init:function(t,e){p.fn.init.call(this,t,e),this.containers={}},container:function(t){var e=this.containers[t];return e||(e=this._createContainer(t),this.containers[t]=e),e},showIn:function(t,e,n){this.container(t).show(e,n)},_createContainer:function(t){var e,n=this.render(),i=n.find(t);if(!i.length&&n.is(t)){if(!n.is(t))throw Error("can't find a container with the specified "+t+" selector");i=n}return e=new _(i),e.bind("accepted",function(t){t.view.render(i)}),e}}),v=p.extend({attach:function(t,e){t.element.find(e).replaceWith(this.render())},detach:function(){}}),y=/^(\w+)(:(\w+))?( (\w+))?$/,_=o.extend({init:function(t){o.fn.init.call(this),this.container=t,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(t,e,o){if(!t.triggerBeforeShow()||this.view&&!this.view.triggerBeforeHide())return this.trigger("after"),!1;o=o||t.id;var r=this,s=t===r.view?t.clone():r.view,a=r.history,l=a[a.length-2]||{},c=l.id===o,h=e||(c?a[a.length-1].transition:t.transition),u=n(h);return r.running&&r.effect.stop(),"none"===h&&(h=null),r.trigger("accepted",{view:t}),r.view=t,r.previous=s,r.running=!0,c?a.pop():a.push({id:o,transition:h}),s?(h&&i.effects.enabled?(t.element.addClass("k-fx-hidden"),t.showStart(),c&&!e&&(u.reverse=!u.reverse),r.effect=i.fx(t.element).replace(s.element,u.type).beforeTransition(function(){t.beforeTransition("show"),s.beforeTransition("hide")}).afterTransition(function(){t.afterTransition("show"),s.afterTransition("hide")}).direction(u.direction).setReverse(u.reverse),r.effect.run().then(function(){r.end()})):(t.showStart(),r.end()),!0):(t.showStart(),t.showEnd(),r.after(),!0)}});i.ViewContainer=_,i.Fragment=v,i.Layout=m,i.View=p,i.ViewClone=g}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.data.signalr.min",["kendo.data.min"],t)}(function(){return function(t){var e=kendo.data.RemoteTransport.extend({init:function(t){var e,n=t&&t.signalr?t.signalr:{},i=n.promise;if(!i)throw Error('The "promise" option must be set.');if("function"!=typeof i.done||"function"!=typeof i.fail)throw Error('The "promise" option must be a Promise.');if(this.promise=i,e=n.hub,!e)throw Error('The "hub" option must be set.');if("function"!=typeof e.on||"function"!=typeof e.invoke)throw Error('The "hub" option is not a valid SignalR hub proxy.');this.hub=e,kendo.data.RemoteTransport.fn.init.call(this,t)},push:function(t){var e=this.options.signalr.client||{};e.create&&this.hub.on(e.create,t.pushCreate),e.update&&this.hub.on(e.update,t.pushUpdate),e.destroy&&this.hub.on(e.destroy,t.pushDestroy)},_crud:function(e,n){var i,o,r=this.hub,s=this.options.signalr.server;if(!s||!s[n])throw Error(kendo.format('The "server.{0}" option must be set.',n));i=[s[n]],o=this.parameterMap(e.data,n),t.isEmptyObject(o)||i.push(o),this.promise.done(function(){r.invoke.apply(r,i).done(e.success).fail(e.error)})},read:function(t){this._crud(t,"read")},create:function(t){this._crud(t,"create")},update:function(t){this._crud(t,"update")},destroy:function(t){this._crud(t,"destroy")}});t.extend(!0,kendo.data,{transports:{signalr:e}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.userevents.min",["kendo.core.min"],t)}(function(){return function(t,e){function n(t,e){var n=t.x.location,i=t.y.location,o=e.x.location,r=e.y.location,s=n-o,a=i-r;return{center:{x:(n+o)/2,y:(i+r)/2},distance:Math.sqrt(s*s+a*a)}}function i(t){var e,n,i,o=[],r=t.originalEvent,a=t.currentTarget,l=0;if(t.api)o.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"});else if(t.type.match(/touch/))for(n=r?r.changedTouches:[],e=n.length;e>l;l++)i=n[l],o.push({location:i,event:t,target:i.target,currentTarget:a,id:i.identifier,type:"touch"});else o.push(s.pointers||s.msPointers?{location:r,event:t,target:t.target,currentTarget:a,id:r.pointerId,type:"pointer"}:{id:1,event:t,target:t.target,currentTarget:a,location:t,type:"mouse"});return o}function o(t){for(var e=r.eventMap.up.split(" "),n=0,i=e.length;i>n;n++)t(e[n])}var r=window.kendo,s=r.support,a=window.document,l=r.Class,c=r.Observable,h=t.now,u=t.extend,d=s.mobileOS,f=d&&d.android,p=800,g=s.browser.msie?5:0,m="press",v="hold",y="select",_="start",w="move",x="end",b="cancel",k="tap",C="release",S="gesturestart",T="gesturechange",A="gestureend",D="gesturetap",P={
api:0,touch:0,mouse:9,pointer:9},M=!s.touch||s.mouseAndTouchPresent,E=l.extend({init:function(t,e){var n=this;n.axis=t,n._updateLocationData(e),n.startLocation=n.location,n.velocity=n.delta=0,n.timeStamp=h()},move:function(t){var e=this,n=t["page"+e.axis],i=h(),o=i-e.timeStamp||1;(n||!f)&&(e.delta=n-e.location,e._updateLocationData(t),e.initialDelta=n-e.startLocation,e.velocity=e.delta/o,e.timeStamp=i)},_updateLocationData:function(t){var e=this,n=e.axis;e.location=t["page"+n],e.client=t["client"+n],e.screen=t["screen"+n]}}),B=l.extend({init:function(t,e,n){u(this,{x:new E("X",n.location),y:new E("Y",n.location),type:n.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||P[n.type],userEvents:t,target:e,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,pressEvent:n,_moved:!1,_finished:!1})},press:function(){this._holdTimeout=setTimeout(t.proxy(this,"_hold"),this.userEvents.minHold),this._trigger(m,this.pressEvent)},_hold:function(){this._trigger(v,this.pressEvent)},move:function(t){var e=this;if(!e._finished){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(I.current&&I.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(w,t)}},end:function(t){this.endTime=h(),this._finished||(this._finished=!0,this._trigger(C,t),this._moved?this._trigger(x,t):this.useClickAsTap||this._trigger(k,t),clearTimeout(this._holdTimeout),this.dispose())},dispose:function(){var e=this.userEvents,n=e.touches;this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),n.splice(t.inArray(this,n),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(t){clearTimeout(this._holdTimeout),this.startTime=h(),this._moved=!0,this._trigger(_,t)},_trigger:function(t,e){var n=this,i=e.event,o={touch:n,x:n.x,y:n.y,target:n.target,event:i};n.userEvents.notify(t,o)&&i.preventDefault()},_withinIgnoreThreshold:function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold}}),I=c.extend({init:function(e,n){var i,l,h,d=this,f=r.guid();n=n||{},i=d.filter=n.filter,d.threshold=n.threshold||g,d.minHold=n.minHold||p,d.touches=[],d._maxTouches=n.multiTouch?2:1,d.allowSelection=n.allowSelection,d.captureUpIfMoved=n.captureUpIfMoved,d.useClickAsTap=!n.fastTap&&!s.delayedClick(),d.eventNS=f,e=t(e).handler(d),c.fn.init.call(d),u(d,{element:e,surface:t(n.global&&M?a.documentElement:n.surface||e),stopPropagation:n.stopPropagation,pressed:!1}),d.surface.handler(d).on(r.applyEventMap("move",f),"_move").on(r.applyEventMap("up cancel",f),"_end"),e.on(r.applyEventMap("down",f),i,"_start"),d.useClickAsTap&&e.on(r.applyEventMap("click",f),i,"_click"),(s.pointers||s.msPointers)&&(11>s.browser.version?e.css("-ms-touch-action","pinch-zoom double-tap-zoom"):e.css("touch-action","pan-y")),n.preventDragEvent&&e.on(r.applyEventMap("dragstart",f),r.preventDefault),e.on(r.applyEventMap("mousedown",f),i,{root:e},"_select"),d.captureUpIfMoved&&s.eventCapture&&(l=d.surface[0],h=t.proxy(d.preventIfMoving,d),o(function(t){l.addEventListener(t,h,!0)})),d.bind([m,v,k,_,w,x,C,b,S,T,A,D,y],n)},preventIfMoving:function(t){this._isMoved()&&t.preventDefault()},destroy:function(){var t,e=this;e._destroyed||(e._destroyed=!0,e.captureUpIfMoved&&s.eventCapture&&(t=e.surface[0],o(function(n){t.removeEventListener(n,e.preventIfMoving)})),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(){I.current=this},cancel:function(){this._disposeAll(),this.trigger(b)},notify:function(t,e){var i=this,o=i.touches;if(this._isMultiTouch()){switch(t){case w:t=T;break;case x:t=A;break;case k:t=D}u(e,{touches:o},n(o[0],o[1]))}return this.trigger(t,u(e,{type:t}))},press:function(t,e,n){this._apiCall("_start",t,e,n)},move:function(t,e){this._apiCall("_move",t,e)},end:function(t,e){this._apiCall("_end",t,e)},_isMultiTouch:function(){return this.touches.length>1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var t=this.touches;t.length>0;)t.pop().dispose()},_isMoved:function(){return t.grep(this.touches,function(t){return t.isMoved()}).length},_select:function(t){(!this.allowSelection||this.trigger(y,{event:t}))&&t.preventDefault()},_start:function(e){var n,o,r=this,s=0,a=r.filter,l=i(e),c=l.length,h=e.which;if(!(h&&h>1||r._maxTouchesReached()))for(I.current=null,r.currentTarget=e.currentTarget,r.stopPropagation&&e.stopPropagation();c>s&&!r._maxTouchesReached();s++)o=l[s],n=a?t(o.currentTarget):r.element,n.length&&(o=new B(r,n,o),r.touches.push(o),o.press(),r._isMultiTouch()&&r.notify("gesturestart",{}))},_move:function(t){this._eachTouch("move",t)},_end:function(t){this._eachTouch("end",t)},_click:function(e){var n={touch:{initialTouch:e.target,target:t(e.currentTarget),endTime:h(),x:{location:e.pageX,client:e.clientX},y:{location:e.pageY,client:e.clientY}},x:e.pageX,y:e.pageY,target:t(e.currentTarget),event:e,type:"tap"};this.trigger("tap",n)&&e.preventDefault()},_eachTouch:function(t,e){var n,o,r,s,a=this,l={},c=i(e),h=a.touches;for(n=0;h.length>n;n++)o=h[n],l[o.id]=o;for(n=0;c.length>n;n++)r=c[n],s=l[r.id],s&&s[t](r)},_apiCall:function(e,n,i,o){this[e]({api:!0,pageX:n,pageY:i,clientX:n,clientY:i,target:t(o||this.element)[0],stopPropagation:t.noop,preventDefault:t.noop})}});I.defaultThreshold=function(t){g=t},I.minHold=function(t){p=t},r.getTouches=i,r.touchDelta=n,r.UserEvents=I}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.draganddrop.min",["kendo.core.min","kendo.userevents.min"],t)}(function(){return function(t,e){function n(e,n){try{return t.contains(e,n)||e==n}catch(i){return!1}}function i(t,e){return parseInt(t.css(e),10)||0}function o(t,e){return Math.min(Math.max(t,e.min),e.max)}function r(t,e){var n=D(t),o=n.left+i(t,"borderLeftWidth")+i(t,"paddingLeft"),r=n.top+i(t,"borderTopWidth")+i(t,"paddingTop"),s=o+t.width()-e.outerWidth(!0),a=r+t.height()-e.outerHeight(!0);return{x:{min:o,max:s},y:{min:r,max:a}}}function s(n,i,o){for(var r,s,a=0,l=i&&i.length,c=o&&o.length;n&&n.parentNode;){for(a=0;l>a;a++)if(r=i[a],r.element[0]===n)return{target:r,targetElement:n};for(a=0;c>a;a++)if(s=o[a],t.contains(s.element[0],n)&&_.matchesSelector.call(n,s.options.filter))return{target:s,targetElement:n};n=n.parentNode}return e}function a(t,e){var n,i=e.options.group,o=t[i];if(k.fn.destroy.call(e),o.length>1){for(n=0;o.length>n;n++)if(o[n]==e){o.splice(n,1);break}}else o.length=0,delete t[i]}function l(t){var e,n,i,o=c()[0];return t[0]===o?(n=o.scrollTop,i=o.scrollLeft,{top:n,left:i,bottom:n+x.height(),right:i+x.width()}):(e=t.offset(),e.bottom=e.top+t.height(),e.right=e.left+t.width(),e)}function c(){return t(y.support.browser.chrome?w.body:w.documentElement)}function h(e){var n,i=c();if(!e||e===w.body||e===w.documentElement)return i;for(n=t(e)[0];n&&!y.isScrollable(n)&&n!==w.body;)n=n.parentNode;return n===w.body?i:t(n)}function u(t,e,n){var i={x:0,y:0},o=50;return o>t-n.left?i.x=-(o-(t-n.left)):o>n.right-t&&(i.x=o-(n.right-t)),o>e-n.top?i.y=-(o-(e-n.top)):o>n.bottom-e&&(i.y=o-(n.bottom-e)),i}var d,f,p,g,m,v,y=window.kendo,_=y.support,w=window.document,x=t(window),b=y.Class,k=y.ui.Widget,C=y.Observable,S=y.UserEvents,T=t.proxy,A=t.extend,D=y.getOffset,P={},M={},E={},B=y.elementUnderCursor,I="keyup",z="change",L="dragstart",R="hold",O="drag",F="dragend",V="dragcancel",N="hintDestroyed",H="dragenter",U="dragleave",j="drop",G=C.extend({init:function(e,n){var i=this,o=e[0];i.capture=!1,o.addEventListener?(t.each(y.eventMap.down.split(" "),function(){o.addEventListener(this,T(i._press,i),!0)}),t.each(y.eventMap.up.split(" "),function(){o.addEventListener(this,T(i._release,i),!0)})):(t.each(y.eventMap.down.split(" "),function(){o.attachEvent(this,T(i._press,i))}),t.each(y.eventMap.up.split(" "),function(){o.attachEvent(this,T(i._release,i))})),C.fn.init.call(i),i.bind(["press","release"],n||{})},captureNext:function(){this.capture=!0},cancelCapture:function(){this.capture=!1},_press:function(t){var e=this;e.trigger("press"),e.capture&&t.preventDefault()},_release:function(t){var e=this;e.trigger("release"),e.capture&&(t.preventDefault(),e.cancelCapture())}}),W=C.extend({init:function(e){var n=this;C.fn.init.call(n),n.forcedEnabled=!1,t.extend(n,e),n.scale=1,n.horizontal?(n.measure="offsetWidth",n.scrollSize="scrollWidth",n.axis="x"):(n.measure="offsetHeight",n.scrollSize="scrollHeight",n.axis="y")},makeVirtual:function(){t.extend(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},virtualSize:function(t,e){(this._virtualMin!==t||this._virtualMax!==e)&&(this._virtualMin=t,this._virtualMax=e,this.update())},outOfBounds:function(t){return t>this.max||this.min>t},forceEnabled:function(){this.forcedEnabled=!0},getSize:function(){return this.container[0][this.measure]},getTotal:function(){return this.element[0][this.scrollSize]},rescale:function(t){this.scale=t},update:function(t){var e=this,n=e.virtual?e._virtualMax:e.getTotal(),i=n*e.scale,o=e.getSize();(0!==n||e.forcedEnabled)&&(e.max=e.virtual?-e._virtualMin:0,e.size=o,e.total=i,e.min=Math.min(e.max,o-i),e.minScale=o/n,e.centerOffset=(i-o)/2,e.enabled=e.forcedEnabled||i>o,t||e.trigger(z,e))}}),q=C.extend({init:function(t){var e=this;C.fn.init.call(e),e.x=new W(A({horizontal:!0},t)),e.y=new W(A({horizontal:!1},t)),e.container=t.container,e.forcedMinScale=t.minScale,e.maxScale=t.maxScale||100,e.bind(z,t)},rescale:function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},centerCoordinates:function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},refresh:function(){var t=this;t.x.update(),t.y.update(),t.enabled=t.x.enabled||t.y.enabled,t.minScale=t.forcedMinScale||Math.min(t.x.minScale,t.y.minScale),t.fitScale=Math.max(t.x.minScale,t.y.minScale),t.trigger(z)}}),$=C.extend({init:function(t){var e=this;A(e,t),C.fn.init.call(e)},outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},dragMove:function(t){var e=this,n=e.dimension,i=e.axis,o=e.movable,r=o[i]+t;n.enabled&&((n.min>r&&0>t||r>n.max&&t>0)&&(t*=e.resistance),o.translateAxis(i,t),e.trigger(z,e))}}),Y=b.extend({init:function(e){var n,i,o,r,s=this;A(s,{elastic:!0},e),o=s.elastic?.5:0,r=s.movable,s.x=n=new $({axis:"x",dimension:s.dimensions.x,resistance:o,movable:r}),s.y=i=new $({axis:"y",dimension:s.dimensions.y,resistance:o,movable:r}),s.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){s.gesture=t,s.offset=s.dimensions.container.offset()},press:function(e){t(e.event.target).closest("a").is("[data-navigate-on-press=true]")&&e.sender.cancel()},gesturechange:function(t){var e,o,a,l=s.gesture,c=l.center,h=t.center,u=t.distance/l.distance,d=s.dimensions.minScale,f=s.dimensions.maxScale;d>=r.scale&&1>u&&(u+=.8*(1-u)),r.scale*u>=f&&(u=f/r.scale),o=r.x+s.offset.left,a=r.y+s.offset.top,e={x:(o-c.x)*u+h.x-o,y:(a-c.y)*u+h.y-a},r.scaleWith(u),n.dragMove(e.x),i.dragMove(e.y),s.dimensions.rescale(r.scale),s.gesture=t,t.preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(n.dimension.enabled||i.dimension.enabled?(n.dragMove(t.x.delta),i.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}}),X=_.transitions.prefix+"Transform";f=_.hasHW3D?function(t,e,n){return"translate3d("+t+"px,"+e+"px,0) scale("+n+")"}:function(t,e,n){return"translate("+t+"px,"+e+"px) scale("+n+")"},p=C.extend({init:function(e){var n=this;C.fn.init.call(n),n.element=t(e),n.element[0].style.webkitTransformOrigin="left top",n.x=0,n.y=0,n.scale=1,n._saveCoordinates(f(n.x,n.y,n.scale))},translateAxis:function(t,e){this[t]+=e,this.refresh()},scaleTo:function(t){this.scale=t,this.refresh()},scaleWith:function(t){this.scale*=t,this.refresh()},translate:function(t){this.x+=t.x,this.y+=t.y,this.refresh()},moveAxis:function(t,e){this[t]=e,this.refresh()},moveTo:function(t){A(this,t),this.refresh()},refresh:function(){var t,e=this,n=e.x,i=e.y;e.round&&(n=Math.round(n),i=Math.round(i)),t=f(n,i,e.scale),t!=e.coordinates&&(y.support.browser.msie&&10>y.support.browser.version?(e.element[0].style.position="absolute",e.element[0].style.left=e.x+"px",e.element[0].style.top=e.y+"px"):e.element[0].style[X]=t,e._saveCoordinates(t),e.trigger(z))},_saveCoordinates:function(t){this.coordinates=t}}),g=k.extend({init:function(t,e){var n,i=this;k.fn.init.call(i,t,e),n=i.options.group,n in M?M[n].push(i):M[n]=[i]},events:[H,U,j],options:{name:"DropTarget",group:"default"},destroy:function(){a(M,this)},_trigger:function(t,n){var i=this,o=P[i.options.group];return o?i.trigger(t,A({},n.event,{draggable:o,dropTarget:n.dropTarget})):e},_over:function(t){this._trigger(H,t)},_out:function(t){this._trigger(U,t)},_drop:function(t){var e=this,n=P[e.options.group];n&&(n.dropped=!e._trigger(j,t))}}),g.destroyGroup=function(t){var e,n=M[t]||E[t];if(n){for(e=0;n.length>e;e++)k.fn.destroy.call(n[e]);n.length=0,delete M[t],delete E[t]}},g._cache=M,m=g.extend({init:function(t,e){var n,i=this;k.fn.init.call(i,t,e),n=i.options.group,n in E?E[n].push(i):E[n]=[i]},destroy:function(){a(E,this)},options:{name:"DropTargetArea",group:"default",filter:null}}),v=k.extend({init:function(t,e){var n=this;k.fn.init.call(n,t,e),n._activated=!1,n.userEvents=new S(n.element,{global:!0,allowSelection:!0,filter:n.options.filter,threshold:n.options.distance,start:T(n._start,n),hold:T(n._hold,n),move:T(n._drag,n),end:T(n._end,n),cancel:T(n._cancel,n),select:T(n._select,n)}),n._afterEndHandler=T(n._afterEnd,n),n._captureEscape=T(n._captureEscape,n)},events:[R,L,O,F,V,N],options:{name:"Draggable",distance:y.support.touch?0:5,group:"default",cursorOffset:null,axis:null,container:null,filter:null,ignore:null,holdToDrag:!1,autoScroll:!1,dropped:!1},cancelHold:function(){this._activated=!1},_captureEscape:function(t){var e=this;t.keyCode===y.keys.ESC&&(e._trigger(V,{event:t}),e.userEvents.cancel())},_updateHint:function(e){var n,i=this,r=i.options,s=i.boundaries,a=r.axis,l=i.options.cursorOffset;l?n={left:e.x.location+l.left,top:e.y.location+l.top}:(i.hintOffset.left+=e.x.delta,i.hintOffset.top+=e.y.delta,n=t.extend({},i.hintOffset)),s&&(n.top=o(n.top,s.y),n.left=o(n.left,s.x)),"x"===a?delete n.top:"y"===a&&delete n.left,i.hint.css(n)},_shouldIgnoreTarget:function(e){var n=this.options.ignore;return n&&t(e).is(n)},_select:function(t){this._shouldIgnoreTarget(t.event.target)||t.preventDefault()},_start:function(n){var i,o=this,s=o.options,a=s.container,l=s.hint;return this._shouldIgnoreTarget(n.touch.initialTouch)||s.holdToDrag&&!o._activated?(o.userEvents.cancel(),e):(o.currentTarget=n.target,o.currentTargetOffset=D(o.currentTarget),l&&(o.hint&&o.hint.stop(!0,!0).remove(),o.hint=y.isFunction(l)?t(l.call(o,o.currentTarget)):l,i=D(o.currentTarget),o.hintOffset=i,o.hint.css({position:"absolute",zIndex:2e4,left:i.left,top:i.top}).appendTo(w.body),o.angular("compile",function(){o.hint.removeAttr("ng-repeat");for(var e=t(n.target);!e.data("$$kendoScope")&&e.length;)e=e.parent();return{elements:o.hint.get(),scopeFrom:e.data("$$kendoScope")}})),P[s.group]=o,o.dropped=!1,a&&(o.boundaries=r(a,o.hint)),t(w).on(I,o._captureEscape),o._trigger(L,n)&&(o.userEvents.cancel(),o._afterEnd()),o.userEvents.capture(),e)},_hold:function(t){this.currentTarget=t.target,this._trigger(R,t)?this.userEvents.cancel():this._activated=!0},_drag:function(e){var n,i;e.preventDefault(),n=this._elementUnderCursor(e),this._lastEvent=e,this._processMovement(e,n),this.options.autoScroll&&(this._cursorElement!==n&&(this._scrollableParent=h(n),this._cursorElement=n),this._scrollableParent[0]&&(i=u(e.x.location,e.y.location,l(this._scrollableParent)),this._scrollCompenstation=t.extend({},this.hintOffset),this._scrollVelocity=i,0===i.y&&0===i.x?(clearInterval(this._scrollInterval),this._scrollInterval=null):this._scrollInterval||(this._scrollInterval=setInterval(t.proxy(this,"_autoScroll"),50)))),this.hint&&this._updateHint(e)},_processMovement:function(n,i){this._withDropTarget(i,function(i,o){if(!i)return d&&(d._trigger(U,A(n,{dropTarget:t(d.targetElement)})),d=null),e;if(d){if(o===d.targetElement)return;d._trigger(U,A(n,{dropTarget:t(d.targetElement)}))}i._trigger(H,A(n,{dropTarget:t(o)})),d=A(i,{targetElement:o})}),this._trigger(O,A(n,{dropTarget:d,elementUnderCursor:i}))},_autoScroll:function(){var t,e,n,i,o,r,s,a,l=this._scrollableParent[0],h=this._scrollVelocity,u=this._scrollCompenstation;l&&(t=this._elementUnderCursor(this._lastEvent),this._processMovement(this._lastEvent,t),i=l===c()[0],i?(e=w.body.scrollHeight>x.height(),n=w.body.scrollWidth>x.width()):(e=l.scrollHeight>=l.offsetHeight,n=l.scrollWidth>=l.offsetWidth),o=l.scrollTop+h.y,r=e&&o>0&&l.scrollHeight>o,s=l.scrollLeft+h.x,a=n&&s>0&&l.scrollWidth>s,r&&(l.scrollTop+=h.y),a&&(l.scrollLeft+=h.x),i&&(a||r)&&(r&&(u.top+=h.y),a&&(u.left+=h.x),this.hint.css(u)))},_end:function(e){this._withDropTarget(this._elementUnderCursor(e),function(n,i){n&&(n._drop(A({},e,{dropTarget:t(i)})),d=null)}),this._cancel(this._trigger(F,e))},_cancel:function(t){var e=this;e._scrollableParent=null,this._cursorElement=null,clearInterval(this._scrollInterval),e._activated=!1,e.hint&&!e.dropped?setTimeout(function(){e.hint.stop(!0,!0),t?e._afterEndHandler():e.hint.animate(e.currentTargetOffset,"fast",e._afterEndHandler)},0):e._afterEnd()},_trigger:function(t,e){var n=this;return n.trigger(t,A({},e.event,{x:e.x,y:e.y,currentTarget:n.currentTarget,initialTarget:e.touch?e.touch.initialTouch:null,dropTarget:e.dropTarget,elementUnderCursor:e.elementUnderCursor}))},_elementUnderCursor:function(t){var e=B(t),i=this.hint;return i&&n(i[0],e)&&(i.hide(),e=B(t),e||(e=B(t)),i.show()),e},_withDropTarget:function(t,e){var n,i=this.options.group,o=M[i],r=E[i];(o&&o.length||r&&r.length)&&(n=s(t,o,r),n?e(n.target,n.targetElement):e())},destroy:function(){var t=this;k.fn.destroy.call(t),t._afterEnd(),t.userEvents.destroy(),this._scrollableParent=null,this._cursorElement=null,clearInterval(this._scrollInterval),t.currentTarget=null},_afterEnd:function(){var e=this;e.hint&&e.hint.remove(),delete P[e.options.group],e.trigger("destroy"),e.trigger(N),t(w).off(I,e._captureEscape)}}),y.ui.plugin(g),y.ui.plugin(m),y.ui.plugin(v),y.TapCapture=G,y.containerBoundaries=r,A(y.ui,{Pane:Y,PaneDimensions:q,Movable:p}),y.ui.Draggable.utils={autoScrollVelocity:u,scrollableViewPort:l,findScrollableParent:h}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.mobile.scroller.min",["kendo.fx.min","kendo.draganddrop.min"],t)}(function(){return function(t,e){var n=window.kendo,i=n.mobile,o=n.effects,r=i.ui,s=t.proxy,a=t.extend,l=r.Widget,c=n.Class,h=n.ui.Movable,u=n.ui.Pane,d=n.ui.PaneDimensions,f=o.Transition,p=o.Animation,g=Math.abs,m=500,v=.7,y=.96,_=10,w=55,x=.5,b=5,k="km-scroller-release",C="km-scroller-refresh",S="pull",T="change",A="resize",D="scroll",P=2,M=p.extend({init:function(t){var e=this;p.fn.init.call(e),a(e,t),e.userEvents.bind("gestureend",s(e.start,e)),e.tapCapture.bind("press",s(e.cancel,e))},enabled:function(){return this.dimensions.minScale>this.movable.scale},done:function(){return.01>this.dimensions.minScale-this.movable.scale},tick:function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},onEnd:function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)}}),E=p.extend({init:function(t){var e=this;p.fn.init.call(e),a(e,t,{transition:new f({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",s(e.start,e)),e.userEvents.bind("gestureend",s(e.start,e)),e.userEvents.bind("tap",s(e.onEnd,e))},onCancel:function(){this.transition.cancel()},freeze:function(t){var e=this;e.cancel(),e._moveTo(t)},onEnd:function(){var t=this;t.paneAxis.outOfBounds()?t._snapBack():t._end()},done:function(){return g(this.velocity)<1},start:function(t){var e,n=this;n.dimension.enabled&&(n.paneAxis.outOfBounds()?n._snapBack():(e=t.touch.id===P?0:t.touch[n.axis].velocity,n.velocity=Math.max(Math.min(e*n.velocityMultiplier,w),-w),n.tapCapture.captureNext(),p.fn.start.call(n)))},tick:function(){var t=this,e=t.dimension,n=t.paneAxis.outOfBounds()?x:t.friction,i=t.velocity*=n,o=t.movable[t.axis]+i;!t.elastic&&e.outOfBounds(o)&&(o=Math.max(Math.min(o,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,o)},_end:function(){this.tapCapture.cancelCapture(),this.end()},_snapBack:function(){var t=this,e=t.dimension,n=t.movable[t.axis]>e.max?e.max:e.min;t._moveTo(n)},_moveTo:function(t){this.transition.moveTo({location:t,duration:m,ease:f.easeOutExpo})}}),B=p.extend({init:function(t){var e=this;n.effects.Animation.fn.init.call(this),a(e,t,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return g(this.offset.y)<b&&g(this.offset.x)<b},onEnd:function(){this.moveTo(this.destination),this.callback&&this.callback.call()},setCoordinates:function(t,e){this.offset={},this.origin=t,this.destination=e},setCallback:function(t){t&&n.isFunction(t)?this.callback=t:t=e},_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}}}),I=c.extend({init:function(e){var n=this,i="x"===e.axis,o=t('<div class="km-touch-scrollbar km-'+(i?"horizontal":"vertical")+'-scrollbar" />');a(n,e,{element:o,elementSize:0,movable:new h(o),scrollMovable:e.movable,alwaysVisible:e.alwaysVisible,size:i?"width":"height"}),n.scrollMovable.bind(T,s(n.refresh,n)),n.container.append(o),e.alwaysVisible&&n.show()},refresh:function(){var t=this,e=t.axis,n=t.dimension,i=n.size,o=t.scrollMovable,r=i/n.total,s=Math.round(-o[e]*r),a=Math.round(i*r);r>=1?this.element.css("display","none"):this.element.css("display",""),s+a>i?a=i-s:0>s&&(a+=s,s=0),t.elementSize!=a&&(t.element.css(t.size,a+"px"),t.elementSize=a),t.movable.moveAxis(e,s)},show:function(){this.element.css({opacity:v,visibility:"visible"})},hide:function(){this.alwaysVisible||this.element.css({opacity:0})}}),z=l.extend({init:function(i,o){var r,c,f,p,m,v,y,_,w,x=this;return l.fn.init.call(x,i,o),i=x.element,(x._native=x.options.useNative&&n.support.hasNativeScrolling)?(i.addClass("km-native-scroller").prepend('<div class="km-scroll-header"/>'),a(x,{scrollElement:i,fixedContainer:i.children().first()}),e):(i.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>'),r=i.children().eq(1),c=new n.TapCapture(i),f=new h(r),p=new d({element:r,container:i,forcedEnabled:x.options.zoom}),m=this.options.avoidScrolling,v=new n.UserEvents(i,{fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:x.options.zoom,start:function(e){p.refresh();var n=g(e.x.velocity),i=g(e.y.velocity),o=2*n>=i,r=t.contains(x.fixedContainer[0],e.event.target),s=2*i>=n;!r&&!m(e)&&x.enabled&&(p.x.enabled&&o||p.y.enabled&&s)?v.capture():v.cancel()}}),y=new u({movable:f,dimensions:p,userEvents:v,elastic:x.options.elastic}),_=new M({movable:f,dimensions:p,userEvents:v,tapCapture:c}),w=new B({moveTo:function(t){x.scrollTo(t.x,t.y)}}),f.bind(T,function(){x.scrollTop=-f.y,x.scrollLeft=-f.x,x.trigger(D,{scrollTop:x.scrollTop,scrollLeft:x.scrollLeft})}),x.options.mousewheelScrolling&&i.on("DOMMouseScroll mousewheel",s(this,"_wheelScroll")),a(x,{movable:f,dimensions:p,zoomSnapBack:_,animatedScroller:w,userEvents:v,pane:y,tapCapture:c,pulled:!1,enabled:!0,scrollElement:r,scrollTop:0,scrollLeft:0,fixedContainer:i.children().first()}),x._initAxis("x"),x._initAxis("y"),x._wheelEnd=function(){x._wheel=!1,x.userEvents.end(0,x._wheelY)},p.refresh(),x.options.pullToRefresh&&x._initPullToRefresh(),e)},_wheelScroll:function(t){this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50);var e=n.wheelDeltaY(t);e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault()},makeVirtual:function(){this.dimensions.y.makeVirtual()},virtualSize:function(t,e){this.dimensions.y.virtualSize(t,e)},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:[S,D,A],_resize:function(){this._native||this.contentResized()},setOptions:function(t){var e=this;l.fn.setOptions.call(e,t),t.pullToRefresh&&e._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 t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},scrollTo:function(t,e){this._native?(this.scrollElement.scrollLeft(g(t)),this.scrollElement.scrollTop(g(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},animatedScrollTo:function(t,e,n){var i,o;this._native?this.scrollTo(t,e):(i={x:this.movable.x,y:this.movable.y},o={x:t,y:e},this.animatedScroller.setCoordinates(i,o),this.animatedScroller.setCallback(n),this.animatedScroller.start())},pullHandled:function(){var t=this;t.refreshHint.removeClass(C),t.hintContainer.html(t.pullTemplate({})),t.yinertia.onEnd(),t.xinertia.onEnd(),t.userEvents.cancel()},destroy:function(){l.fn.destroy.call(this),this.userEvents&&this.userEvents.destroy()},_scale:function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},_initPullToRefresh:function(){var t=this;t.dimensions.y.forceEnabled(),t.pullTemplate=n.template(t.options.messages.pullTemplate),t.releaseTemplate=n.template(t.options.messages.releaseTemplate),t.refreshTemplate=n.template(t.options.messages.refreshTemplate),t.scrollElement.prepend('<span class="km-scroller-pull"><span class="km-icon"></span><span class="km-loading-left"></span><span class="km-loading-right"></span><span class="km-template">'+t.pullTemplate({})+"</span></span>"),t.refreshHint=t.scrollElement.children().first(),t.hintContainer=t.refreshHint.children(".km-template"),t.pane.y.bind("change",s(t._paneChange,t)),t.userEvents.bind("end",s(t._dragEnd,t))},_dragEnd:function(){var t=this;t.pulled&&(t.pulled=!1,t.refreshHint.removeClass(k).addClass(C),t.hintContainer.html(t.refreshTemplate({})),t.yinertia.freeze(t.options.pullOffset/2),t.trigger("pull"))},_paneChange:function(){var t=this;t.movable.y/x>t.options.pullOffset?t.pulled||(t.pulled=!0,t.refreshHint.removeClass(C).addClass(k),t.hintContainer.html(t.releaseTemplate({}))):t.pulled&&(t.pulled=!1,t.refreshHint.removeClass(k),t.hintContainer.html(t.pullTemplate({})))},_initAxis:function(t){var e=this,n=e.movable,i=e.dimensions[t],o=e.tapCapture,r=e.pane[t],s=new I({axis:t,movable:n,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(T,function(){s.refresh()}),r.bind(T,function(){s.show()}),e[t+"inertia"]=new E({axis:t,paneAxis:r,movable:n,tapCapture:o,userEvents:e.userEvents,dimension:i,elastic:e.options.elastic,friction:e.options.friction||y,velocityMultiplier:e.options.velocityMultiplier||_,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})}});r.plugin(z)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.popup.min",["kendo.core.min"],t)}(function(){return function(t,e){function n(e,n){return e===n||t.contains(e,n)}var i=window.kendo,o=i.ui,r=o.Widget,s=i.support,a=i.getOffset,l="open",c="close",h="deactivate",u="activate",d="center",f="left",p="right",g="top",m="bottom",v="absolute",y="hidden",_="body",w="location",x="position",b="visible",k="effects",C="k-state-active",S="k-state-border",T=/k-state-border-(\w+)/,A=".k-picker-wrap, .k-dropdown-wrap, .k-link",D="down",P=t(document.documentElement),M=t(window),E="scroll",B=s.transitions.css,I=B+"transform",z=t.extend,L=".kendoPopup",R=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],O=r.extend({init:function(e,n){var o,a=this;n=n||{},n.isRtl&&(n.origin=n.origin||m+" "+p,n.position=n.position||g+" "+p),r.fn.init.call(a,e,n),e=a.element,n=a.options,a.collisions=n.collision?n.collision.split(" "):[],a.downEvent=i.applyEventMap(D,i.guid()),1===a.collisions.length&&a.collisions.push(a.collisions[0]),o=t(a.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),n.appendTo=t(t(n.appendTo)[0]||o[0]||_),a.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!n.isRtl).css({position:v}).appendTo(n.appendTo).on("mouseenter"+L,function(){a._hovered=!0}).on("mouseleave"+L,function(){a._hovered=!1}),a.wrapper=t(),n.animation===!1&&(n.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),z(n.animation.open,{complete:function(){a.wrapper.css({overflow:b}),a._activated=!0,a._trigger(u)}}),z(n.animation.close,{complete:function(){a._animationClose()}}),a._mousedownProxy=function(t){a._mousedown(t)},a._resizeProxy=s.mobileOS.android?function(t){setTimeout(function(){a._resize(t)},600)}:function(t){a._resize(t)},n.toggleTarget&&t(n.toggleTarget).on(n.toggleEvent+L,t.proxy(a.toggle,a))},events:[l,u,c,h],options:{name:"Popup",toggleEvent:"click",origin:m+" "+f,position:g+" "+f,anchor:_,appendTo:null,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,adjustSize:{width:0,height:0},animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},_animationClose:function(){var t=this,e=t.wrapper.data(w);t.wrapper.hide(),e&&t.wrapper.css(e),t.options.anchor!=_&&t._hideDirClass(),t._closing=!1,t._trigger(h)},destroy:function(){var e,n=this,o=n.options,s=n.element.off(L);r.fn.destroy.call(n),o.toggleTarget&&t(o.toggleTarget).off(L),o.modal||(P.unbind(n.downEvent,n._mousedownProxy),n._toggleResize(!1)),i.destroy(n.element.children()),s.removeData(),o.appendTo[0]===document.body&&(e=s.parent(".k-animation-container"),e[0]?e.remove():s.remove())},open:function(e,n){var o,r,a=this,c={isFixed:!isNaN(parseInt(n,10)),x:e,y:n},h=a.element,u=a.options,d=t(u.anchor),f=h[0]&&h.hasClass("km-widget");if(!a.visible()){if(u.copyAnchorStyles&&(f&&"font-size"==R[0]&&R.shift(),h.css(i.getComputedStyles(d[0],R))),h.data("animating")||a._trigger(l))return;a._activated=!1,u.modal||(P.unbind(a.downEvent,a._mousedownProxy).bind(a.downEvent,a._mousedownProxy),a._toggleResize(!1),a._toggleResize(!0)),a.wrapper=r=i.wrap(h,u.autosize).css({overflow:y,display:"block",position:v}),s.mobileOS.android&&r.css(I,"translatez(0)"),r.css(x),t(u.appendTo)[0]==document.body&&r.css(g,"-10000px"),a.flipped=a._position(c),o=a._openAnimation(),u.anchor!=_&&a._showDirClass(o),h.data(k,o.effects).kendoStop(!0).kendoAnimate(o)}},_openAnimation:function(){var t=z(!0,{},this.options.animation.open);return t.effects=i.parseEffects(t.effects,this.flipped),t},_hideDirClass:function(){var e=t(this.options.anchor),n=((e.attr("class")||"").match(T)||["","down"])[1],o=S+"-"+n;e.removeClass(o).children(A).removeClass(C).removeClass(o),this.element.removeClass(S+"-"+i.directions[n].reverse)},_showDirClass:function(e){var n=e.effects.slideIn?e.effects.slideIn.direction:"down",o=S+"-"+n;
t(this.options.anchor).addClass(o).children(A).addClass(C).addClass(o),this.element.addClass(S+"-"+i.directions[n].reverse)},position:function(){this.visible()&&(this.flipped=this._position())},toggle:function(){var t=this;t[t.visible()?c:l]()},visible:function(){return this.element.is(":"+b)},close:function(n){var o,r,s,a,l=this,h=l.options;if(l.visible()){if(o=l.wrapper[0]?l.wrapper:i.wrap(l.element).hide(),l._toggleResize(!1),l._closing||l._trigger(c))return l._toggleResize(!0),e;l.element.find(".k-popup").each(function(){var e=t(this),i=e.data("kendoPopup");i&&i.close(n)}),P.unbind(l.downEvent,l._mousedownProxy),n?r={hide:!0,effects:{}}:(r=z(!0,{},h.animation.close),s=l.element.data(k),a=r.effects,!a&&!i.size(a)&&s&&i.size(s)&&(r.effects=s,r.reverse=!0),l._closing=!0),l.element.kendoStop(!0),o.css({overflow:y}),l.element.kendoAnimate(r)}},_trigger:function(t){return this.trigger(t,{type:t})},_resize:function(t){var e=this;-1!==s.resize.indexOf(t.type)?(clearTimeout(e._resizeTimeout),e._resizeTimeout=setTimeout(function(){e._position(),e._resizeTimeout=null},50)):(!e._hovered||e._activated&&e.element.hasClass("k-list-container"))&&e.close()},_toggleResize:function(t){var e=t?"on":"off",n=s.resize;s.mobileOS.ios||s.mobileOS.android||(n+=" "+E),this._scrollableParents()[e](E,this._resizeProxy),M[e](n,this._resizeProxy)},_mousedown:function(e){var o=this,r=o.element[0],s=o.options,a=t(s.anchor)[0],l=s.toggleTarget,c=i.eventTarget(e),h=t(c).closest(".k-popup"),u=h.parent().parent(".km-shim").length;h=h[0],(u||!h||h===o.element[0])&&"popover"!==t(e.target).closest("a").data("rel")&&(n(r,c)||n(a,c)||l&&n(t(l)[0],c)||o.close())},_fit:function(t,e,n){var i=0;return t+e>n&&(i=n-(t+e)),0>t&&(i=-t),i},_flip:function(t,e,n,i,o,r,s){var a=0;return s=s||e,r!==o&&r!==d&&o!==d&&(t+s>i&&(a+=-(n+e)),0>t+a&&(a+=n+e)),a},_scrollableParents:function(){return t(this.options.anchor).parentsUntil("body").filter(function(t,e){return i.isScrollable(e)})},_position:function(e){var n,o,r,l,c,h,u,d,f,p,g,m,y,_=this,b=_.element,k=_.wrapper,C=_.options,S=t(C.viewport),T=S.offset(),A=t(C.anchor),D=C.origin.toLowerCase().split(" "),P=C.position.toLowerCase().split(" "),M=_.collisions,E=s.zoomLevel(),B=10002,I=!!(S[0]==window&&window.innerWidth&&1.02>=E),L=0,R=document.documentElement,O=I?window.innerWidth:S.width(),F=I?window.innerHeight:S.height();if(I&&R.scrollHeight-R.clientHeight>0&&(O-=i.support.scrollbar()),n=A.parents().filter(k.siblings()),n[0])if(r=Math.max(+n.css("zIndex"),0))B=r+10;else for(o=A.parentsUntil(n),l=o.length;l>L;L++)r=+t(o[L]).css("zIndex"),r&&r>B&&(B=r+10);return k.css("zIndex",B),k.css(e&&e.isFixed?{left:e.x,top:e.y}:_._align(D,P)),c=a(k,x,A[0]===k.offsetParent()[0]),h=a(k),u=A.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),u.length&&(c=a(k,x,!0),h=a(k)),S[0]===window?(h.top-=window.pageYOffset||document.documentElement.scrollTop||0,h.left-=window.pageXOffset||document.documentElement.scrollLeft||0):(h.top-=T.top,h.left-=T.left),_.wrapper.data(w)||k.data(w,z({},c)),d=z({},h),f=z({},c),p=C.adjustSize,"fit"===M[0]&&(f.top+=_._fit(d.top,k.outerHeight()+p.height,F/E)),"fit"===M[1]&&(f.left+=_._fit(d.left,k.outerWidth()+p.width,O/E)),g=z({},f),m=b.outerHeight(),y=k.outerHeight(),!k.height()&&m&&(y+=m),"flip"===M[0]&&(f.top+=_._flip(d.top,m,A.outerHeight(),F/E,D[0],P[0],y)),"flip"===M[1]&&(f.left+=_._flip(d.left,b.outerWidth(),A.outerWidth(),O/E,D[1],P[1],k.outerWidth())),b.css(x,v),k.css(f),f.left!=g.left||f.top!=g.top},_align:function(e,n){var i,o=this,r=o.wrapper,s=t(o.options.anchor),l=e[0],c=e[1],h=n[0],u=n[1],f=a(s),g=t(o.options.appendTo),v=r.outerWidth(),y=r.outerHeight(),_=s.outerWidth(),w=s.outerHeight(),x=f.top,b=f.left,k=Math.round;return g[0]!=document.body&&(i=a(g),x-=i.top,b-=i.left),l===m&&(x+=w),l===d&&(x+=k(w/2)),h===m&&(x-=y),h===d&&(x-=k(y/2)),c===p&&(b+=_),c===d&&(b+=k(_/2)),u===p&&(b-=v),u===d&&(b-=k(v/2)),{top:x,left:b}}});o.plugin(O)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.tooltip.min",["kendo.core.min","kendo.popup.min"],t)}(function(){return function(t,e){function n(t){for(;t.length;)i(t),t=t.parent()}function i(t){var e=t.data(s.ns+"title");e&&(t.attr("title",e),t.removeData(s.ns+"title"))}function o(t){var e=t.attr("title");e&&(t.data(s.ns+"title",e),t.attr("title",""))}function r(t){for(;t.length&&!t.is("body");)o(t),t=t.parent()}var s=window.kendo,a=s.ui.Widget,l=s.ui.Popup,c=s.isFunction,h=t.isPlainObject,u=t.extend,d=t.proxy,f=t(document),p=s.isLocalUrl,g="_tt_active",m="aria-describedby",v="show",y="hide",_="error",w="contentLoad",x="requestStart",b="k-content-frame",k='<div role="tooltip" class="k-widget k-tooltip#if (!autoHide) {# k-tooltip-closable#}#">#if (!autoHide) {# <div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close">close</a></div> #}#<div class="k-tooltip-content"></div>#if (callout){ #<div class="k-callout k-callout-#=dir#"></div>#}#</div>',C=s.template("<iframe frameborder='0' class='"+b+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),S=".kendoTooltip",T={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"}},A={top:"bottom",bottom:"top",left:"right",right:"left",center:"center"},D={bottom:"n",top:"s",left:"e",right:"w",center:"n"},P={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}},M=function(t){return t.target.data(s.ns+"title")},E=a.extend({init:function(t,e){var n,i=this;a.fn.init.call(i,t,e),n=i.options.position.match(/left|right/)?"horizontal":"vertical",i.dimensions=P[n],i._documentKeyDownHandler=d(i._documentKeyDown,i),i.element.on(i.options.showOn+S,i.options.filter,d(i._showOn,i)).on("mouseenter"+S,i.options.filter,d(i._mouseenter,i)),this.options.autoHide&&i.element.on("mouseleave"+S,i.options.filter,d(i._mouseleave,i))},options:{name:"Tooltip",filter:"",content:M,showAfter:100,callout:!0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{effects:"fade:out",duration:40,hide:!0}}},events:[v,y,w,_,x],_mouseenter:function(e){r(t(e.currentTarget))},_showOn:function(e){var n=this,i=t(e.currentTarget);n.options.showOn&&n.options.showOn.match(/click|focus/)?n._show(i):(clearTimeout(n.timeout),n.timeout=setTimeout(function(){n._show(i)},n.options.showAfter))},_appendContent:function(t){var e,n=this,i=n.options.content,o=n.content,r=n.options.iframe;h(i)&&i.url?("iframe"in n.options||(r=!p(i.url)),n.trigger(x,{options:i,target:t}),r?(o.hide(),e=o.find("."+b)[0],e?e.src=i.url||e.src:o.html(C({content:i})),o.find("."+b).off("load"+S).on("load"+S,function(){n.trigger(w),o.show()})):(o.empty(),s.ui.progress(o,!0),n._ajaxRequest(i))):i&&c(i)?(i=i({sender:this,target:t}),o.html(i||"")):o.html(i),n.angular("compile",function(){return{elements:o}})},_ajaxRequest:function(t){var e=this;jQuery.ajax(u({type:"GET",dataType:"html",cache:!1,error:function(t,n){s.ui.progress(e.content,!1),e.trigger(_,{status:n,xhr:t})},success:d(function(t){s.ui.progress(e.content,!1),e.content.html(t),e.trigger(w)},e)},t))},_documentKeyDown:function(t){t.keyCode===s.keys.ESC&&this.hide()},refresh:function(){var t=this,e=t.popup;e&&e.options.anchor&&t._appendContent(e.options.anchor)},hide:function(){this.popup&&this.popup.close()},show:function(t){t=t||this.element,r(t),this._show(t)},_show:function(t){var e=this,i=e.target();e.popup||e._initPopup(),i&&i[0]!=t[0]&&(e.popup.close(),e.popup.element.kendoStop(!0,!0)),i&&i[0]==t[0]||(e._appendContent(t),e.popup.options.anchor=t),e.popup.one("deactivate",function(){n(t),t.removeAttr(m),this.element.removeAttr("id").attr("aria-hidden",!0),f.off("keydown"+S,e._documentKeyDownHandler)}),e.popup.open()},_initPopup:function(){var e=this,n=e.options,i=t(s.template(k)({callout:n.callout&&"center"!==n.position,dir:D[n.position],autoHide:n.autoHide}));e.popup=new l(i,u({activate:function(){var t=this.options.anchor,i=t[0].id||e.element[0].id;i&&(t.attr(m,i+g),this.element.attr("id",i+g)),n.callout&&e._positionCallout(),this.element.removeAttr("aria-hidden"),f.on("keydown"+S,e._documentKeyDownHandler),e.trigger(v)},close:function(){e.trigger(y)},copyAnchorStyles:!1,animation:n.animation},T[n.position])),i.css({width:n.width,height:n.height}),e.content=i.find(".k-tooltip-content"),e.arrow=i.find(".k-callout"),n.autoHide?i.on("mouseleave"+S,d(e._mouseleave,e)):i.on("click"+S,".k-tooltip-button",d(e._closeButtonClick,e))},_closeButtonClick:function(t){t.preventDefault(),this.hide()},_mouseleave:function(e){if(this.popup){var i=t(e.currentTarget),o=i.offset(),r=e.pageX,s=e.pageY;if(o.right=o.left+i.outerWidth(),o.bottom=o.top+i.outerHeight(),r>o.left&&o.right>r&&s>o.top&&o.bottom>s)return;this.popup.close()}else n(t(e.currentTarget));clearTimeout(this.timeout)},_positionCallout:function(){var e=this,n=e.options.position,i=e.dimensions,o=i.offset,r=e.popup,s=r.options.anchor,a=t(s).offset(),l=parseInt(e.arrow.css("border-top-width"),10),c=t(r.element).offset(),h=D[r.flipped?A[n]:n],u=a[o]-c[o]+t(s)[i.size]()/2-l;e.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-"+h).css(o,u)},target:function(){return this.popup?this.popup.options.anchor:null},destroy:function(){var t=this.popup;t&&(t.element.off(S),t.destroy()),clearTimeout(this.timeout),this.element.off(S),f.off("keydown"+S,this._documentKeyDownHandler),a.fn.destroy.call(this)}});s.ui.plugin(E)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.color.min",["kendo.core.min"],t)}(function(){!function(t,e,n){function i(t,o){var r,a;if(null==t||"none"==t)return null;if(t instanceof l)return t;if(t=t.toLowerCase(),r=s.exec(t))return t="transparent"==r[1]?new c(1,1,1,0):i(f.namedColors[r[1]],o),t.match=[r[1]],t;if((r=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(t))?a=new h(n(r[1],16),n(r[2],16),n(r[3],16),1):(r=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(t))?a=new h(n(r[1]+r[1],16),n(r[2]+r[2],16),n(r[3]+r[3],16),1):(r=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(t))?a=new h(n(r[1],10),n(r[2],10),n(r[3],10),1):(r=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(t))?a=new h(n(r[1],10),n(r[2],10),n(r[3],10),e(r[4])):(r=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(t))?a=new c(e(r[1])/100,e(r[2])/100,e(r[3])/100,1):(r=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(t))&&(a=new c(e(r[1])/100,e(r[2])/100,e(r[3])/100,e(r[4]))),a)a.match=r;else if(!o)throw Error("Cannot parse color: "+t);return a}function o(t,e,n){for(n||(n="0"),t=t.toString(16);e>t.length;)t="0"+t;return t}function r(t,e,n){return 0>n&&(n+=1),n>1&&(n-=1),1/6>n?t+6*(e-t)*n:.5>n?e:2/3>n?t+(e-t)*(2/3-n)*6:t}var s,a,l,c,h,u,d,f=function(t){var e,n,i,o,r,s=this,a=f.formats;if(1===arguments.length)for(t=s.resolveColor(t),o=0;a.length>o;o++)e=a[o].re,n=a[o].process,i=e.exec(t),i&&(r=n(i),s.r=r[0],s.g=r[1],s.b=r[2]);else s.r=arguments[0],s.g=arguments[1],s.b=arguments[2];s.r=s.normalizeByte(s.r),s.g=s.normalizeByte(s.g),s.b=s.normalizeByte(s.b)};f.prototype={toHex:function(){var t=this,e=t.padDigit,n=t.r.toString(16),i=t.g.toString(16),o=t.b.toString(16);return"#"+e(n)+e(i)+e(o)},resolveColor:function(t){return t=t||"black","#"==t.charAt(0)&&(t=t.substr(1,6)),t=t.replace(/ /g,""),t=t.toLowerCase(),t=f.namedColors[t]||t},normalizeByte:function(t){return 0>t||isNaN(t)?0:t>255?255:t},padDigit:function(t){return 1===t.length?"0"+t:t},brightness:function(t){var e=this,n=Math.round;return e.r=n(e.normalizeByte(e.r*t)),e.g=n(e.normalizeByte(e.g*t)),e.b=n(e.normalizeByte(e.b*t)),e},percBrightness:function(){var t=this;return Math.sqrt(.241*t.r*t.r+.691*t.g*t.g+.068*t.b*t.b)}},f.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(t){return[n(t[1],10),n(t[2],10),n(t[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(t){return[n(t[1],16),n(t[2],16),n(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(t){return[n(t[1]+t[1],16),n(t[2]+t[2],16),n(t[3]+t[3],16)]}}],f.namedColors={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"},s=["transparent"];for(a in f.namedColors)f.namedColors.hasOwnProperty(a)&&s.push(a);s=RegExp("^("+s.join("|")+")(\\W|$)","i"),l=kendo.Class.extend({toHSV:function(){return this},toRGB:function(){return this},toHex:function(){return this.toBytes().toHex()},toBytes:function(){return this},toCss:function(){return"#"+this.toHex()},toCssRgba:function(){var t=this.toBytes();return"rgba("+t.r+", "+t.g+", "+t.b+", "+e((+this.a).toFixed(3))+")"},toDisplay:function(){return kendo.support.browser.msie&&kendo.support.browser.version<9?this.toCss():this.toCssRgba()},equals:function(t){return t===this||null!==t&&this.toCssRgba()==i(t).toCssRgba()},diff:function(t){if(null==t)return NaN;var e=this.toBytes();return t=t.toBytes(),Math.sqrt(Math.pow(.3*(e.r-t.r),2)+Math.pow(.59*(e.g-t.g),2)+Math.pow(.11*(e.b-t.b),2))},clone:function(){var t=this.toBytes();return t===this&&(t=new h(t.r,t.g,t.b,t.a)),t}}),c=l.extend({init:function(t,e,n,i){this.r=t,this.g=e,this.b=n,this.a=i},toHSV:function(){var t,e,n=this.r,i=this.g,o=this.b,r=Math.min(n,i,o),s=Math.max(n,i,o),a=s,l=s-r;return 0===l?new u(0,0,a,this.a):(0!==s?(e=l/s,t=n==s?(i-o)/l:i==s?2+(o-n)/l:4+(n-i)/l,t*=60,0>t&&(t+=360)):(e=0,t=-1),new u(t,e,a,this.a))},toHSL:function(){var t,e,n,i=this.r,o=this.g,r=this.b,s=Math.max(i,o,r),a=Math.min(i,o,r),l=(s+a)/2;if(s==a)t=e=0;else{switch(n=s-a,e=l>.5?n/(2-s-a):n/(s+a),s){case i:t=(o-r)/n+(r>o?6:0);break;case o:t=(r-i)/n+2;break;case r:t=(i-o)/n+4}t*=60,e*=100,l*=100}return new d(t,e,l,this.a)},toBytes:function(){return new h(255*this.r,255*this.g,255*this.b,this.a)}}),h=c.extend({init:function(t,e,n,i){this.r=Math.round(t),this.g=Math.round(e),this.b=Math.round(n),this.a=i},toRGB:function(){return new c(this.r/255,this.g/255,this.b/255,this.a)},toHSV:function(){return this.toRGB().toHSV()},toHSL:function(){return this.toRGB().toHSL()},toHex:function(){return o(this.r,2)+o(this.g,2)+o(this.b,2)},toBytes:function(){return this}}),u=l.extend({init:function(t,e,n,i){this.h=t,this.s=e,this.v=n,this.a=i},toRGB:function(){var t,e,n,i,o,r,s,a,l=this.h,h=this.s,u=this.v;if(0===h)e=n=i=u;else switch(l/=60,t=Math.floor(l),o=l-t,r=u*(1-h),s=u*(1-h*o),a=u*(1-h*(1-o)),t){case 0:e=u,n=a,i=r;break;case 1:e=s,n=u,i=r;break;case 2:e=r,n=u,i=a;break;case 3:e=r,n=s,i=u;break;case 4:e=a,n=r,i=u;break;default:e=u,n=r,i=s}return new c(e,n,i,this.a)},toHSL:function(){return this.toRGB().toHSL()},toBytes:function(){return this.toRGB().toBytes()}}),d=l.extend({init:function(t,e,n,i){this.h=t,this.s=e,this.l=n,this.a=i},toRGB:function(){var t,e,n,i,o,s=this.h,a=this.s,l=this.l;return 0===a?t=e=n=l:(s/=360,a/=100,l/=100,i=.5>l?l*(1+a):l+a-l*a,o=2*l-i,t=r(o,i,s+1/3),e=r(o,i,s),n=r(o,i,s-1/3)),new c(t,e,n,this.a)},toHSV:function(){return this.toRGB().toHSV()},toBytes:function(){return this.toRGB().toBytes()}}),f.fromBytes=function(t,e,n,i){return new h(t,e,n,null!=i?i:1)},f.fromRGB=function(t,e,n,i){return new c(t,e,n,null!=i?i:1)},f.fromHSV=function(t,e,n,i){return new u(t,e,n,null!=i?i:1)},f.fromHSL=function(t,e,n,i){return new d(t,e,n,null!=i?i:1)},kendo.Color=f,kendo.parseColor=i}(window.kendo.jQuery,parseFloat,parseInt)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("util/main.min",["kendo.core.min"],t)}(function(){return function(){function t(t){return typeof t!==F}function e(t,e){var i=n(e);return B.round(t*i)/i}function n(t){return t?B.pow(10,t):1}function i(t,e,n){return B.max(B.min(t,n),e)}function o(t){return t*L}function r(t){return t/L}function s(t){return"number"==typeof t&&!isNaN(t)}function a(e,n){return t(e)?e:n}function l(t){return t*t}function c(t){var e,n=[];for(e in t)n.push(e+t[e]);return n.sort().join("")}function h(t){var e,n=2166136261;for(e=0;t.length>e;++e)n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24),n^=t.charCodeAt(e);return n>>>0}function u(t){return h(c(t))}function d(t){var e,n=t.length,i=R,o=O;for(e=0;n>e;e++)o=B.max(o,t[e]),i=B.min(i,t[e]);return{min:i,max:o}}function f(t){return d(t).min}function p(t){return d(t).max}function g(t){return v(t).min}function m(t){return v(t).max}function v(t){var e,n,i,o=R,r=O;for(e=0,n=t.length;n>e;e++)i=t[e],null!==i&&isFinite(i)&&(o=B.min(o,i),r=B.max(r,i));return{min:o===R?void 0:o,max:r===O?void 0:r}}function y(t){return t?t[t.length-1]:void 0}function _(t,e){return t.push.apply(t,e),t}function w(t){return I.template(t,{useWithBlock:!1,paramName:"d"})}function x(e,n){return t(n)&&null!==n?" "+e+"='"+n+"' ":""}function b(t){var e,n="";for(e=0;t.length>e;e++)n+=x(t[e][0],t[e][1]);return n}function k(e){var n,i,o="";for(n=0;e.length>n;n++)i=e[n][1],t(i)&&(o+=e[n][0]+":"+i+";");return""!==o?o:void 0}function C(t){return"string"!=typeof t&&(t+="px"),t}function S(t){var e,n,i=[];if(t)for(e=I.toHyphens(t).split("-"),n=0;e.length>n;n++)i.push("k-pos-"+e[n]);return i.join(" ")}function T(e){return""===e||null===e||"none"===e||"transparent"===e||!t(e)}function A(t){for(var e={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="";t>0;)n[0]>t?n.shift():(i+=e[n[0]],t-=n[0]);return i}function D(t){var e,n,i,o,r;for(t=t.toLowerCase(),e={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3},n=0,i=0,o=0;t.length>o;++o){if(r=e[t.charAt(o)],!r)return null;n+=r,r>i&&(n-=2*i),i=r}return n}function P(t){var e=Object.create(null);return function(){var n,i="";for(n=arguments.length;--n>=0;)i+=":"+arguments[n];return i in e?e[i]:t.apply(this,arguments)}}function M(t){for(var e,n,i=[],o=0,r=t.length;r>o;)e=t.charCodeAt(o++),e>=55296&&56319>=e&&r>o?(n=t.charCodeAt(o++),56320==(64512&n)?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),o--)):i.push(e);return i}function E(t){return t.map(function(t){var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t)}).join("")}var B=Math,I=window.kendo,z=I.deepExtend,L=B.PI/180,R=Number.MAX_VALUE,O=-Number.MAX_VALUE,F="undefined",V=Date.now;V||(V=function(){return(new Date).getTime()}),z(I,{util:{MAX_NUM:R,MIN_NUM:O,append:_,arrayLimits:d,arrayMin:f,arrayMax:p,defined:t,deg:r,hashKey:h,hashObject:u,isNumber:s,isTransparent:T,last:y,limitValue:i,now:V,objectKey:c,round:e,rad:o,renderAttr:x,renderAllAttr:b,renderPos:S,renderSize:C,renderStyle:k,renderTemplate:w,sparseArrayLimits:v,sparseArrayMin:g,sparseArrayMax:m,sqr:l,valueOrDefault:a,romanToArabic:D,arabicToRoman:A,memoize:P,ucs2encode:E,ucs2decode:M}}),I.drawing.util=I.util,I.dataviz.util=I.util}(),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("util/text-metrics",["kendo.core","util/main"],t)}(function(){!function(t){function e(t,e,n){return c.current.measure(t,e,n)}var n=document,i=window.kendo,o=i.Class,r=i.util,s=r.defined,a=o.extend({init:function(t){this._size=t,this._length=0,this._map={}},put:function(t,e){var n=this,i=n._map,o={key:t,value:e};i[t]=o,n._head?(n._tail.newer=o,o.older=n._tail,n._tail=o):n._head=n._tail=o,n._length>=n._size?(i[n._head.key]=null,n._head=n._head.newer,n._head.older=null):n._length++},get:function(t){var e=this,n=e._map[t];return n?(n===e._head&&n!==e._tail&&(e._head=n.newer,e._head.older=null),n!==e._tail&&(n.older&&(n.older.newer=n.newer,n.newer.older=n.older),n.older=e._tail,n.newer=null,e._tail.newer=n,e._tail=n),n.value):void 0}}),l=t("<div style='position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: nowrap!important;' />")[0],c=o.extend({init:function(t){this._cache=new a(1e3),this._initOptions(t)},options:{baselineMarkerSize:1},measure:function(e,i,o){var a,c,h,u,d,f=r.objectKey(i),p=r.hashKey(e+f),g=this._cache.get(p);if(g)return g;a={width:0,height:0,baseline:0},c=o?o:l,h=this._baselineMarker().cloneNode(!1);for(u in i)d=i[u],s(d)&&(c.style[u]=d);return t(c).text(e),c.appendChild(h),n.body.appendChild(c),(e+"").length&&(a.width=c.offsetWidth-this.options.baselineMarkerSize,a.height=c.offsetHeight,a.baseline=h.offsetTop+this.options.baselineMarkerSize),a.width>0&&a.height>0&&this._cache.put(p,a),c.parentNode.removeChild(c),a},_baselineMarker:function(){return t("<div class='k-baseline-marker' style='display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;' />")[0]}});c.current=new c,i.util.TextMetrics=c,i.util.LRUCache=a,i.util.measureText=e}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("util/base64.min",["util/main.min"],t)}(function(){return function(){function t(t){var n,i,o,s,a,l,c,h="",u=0;for(t=e(t);t.length>u;)n=t.charCodeAt(u++),i=t.charCodeAt(u++),o=t.charCodeAt(u++),s=n>>2,a=(3&n)<<4|i>>4,l=(15&i)<<2|o>>6,c=63&o,isNaN(i)?l=c=64:isNaN(o)&&(c=64),h=h+r.charAt(s)+r.charAt(a)+r.charAt(l)+r.charAt(c);return h}function e(t){var e,n,i="";for(e=0;t.length>e;e++)n=t.charCodeAt(e),128>n?i+=o(n):2048>n?(i+=o(192|n>>>6),i+=o(128|63&n)):65536>n&&(i+=o(224|n>>>12),i+=o(128|n>>>6&63),i+=o(128|63&n));return i}var n=window.kendo,i=n.deepExtend,o=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i(n.util,{encodeBase64:t,encodeUTF8:e})}(),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("mixins/observers.min",["kendo.core.min"],t)}(function(){return function(t){var e=Math,n=window.kendo,i=n.deepExtend,o=t.inArray,r={observers:function(){return this._observers=this._observers||[]},addObserver:function(t){return this._observers?this._observers.push(t):this._observers=[t],this},removeObserver:function(t){var e=this.observers(),n=o(t,e);return-1!=n&&e.splice(n,1),this},trigger:function(t,e){var n,i,o=this._observers;if(o&&!this._suspended)for(i=0;o.length>i;i++)n=o[i],n[t]&&n[t](e);return this},optionsChange:function(t){this.trigger("optionsChange",t)},geometryChange:function(t){this.trigger("geometryChange",t)},suspend:function(){return this._suspended=(this._suspended||0)+1,this},resume:function(){return this._suspended=e.max((this._suspended||0)-1,0),this},_observerField:function(t,e){this[t]&&this[t].removeObserver(this),this[t]=e,e.addObserver(this)}};i(n,{mixins:{ObserversMixin:r}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/geometry.min",["util/main.min","mixins/observers.min"],t)}(function(){return function(){function t(t){return null===t?null:t instanceof g?t:new g(t)}function e(t){return t&&y.isFunction(t.matrix)?t.matrix():t}function n(t,e,n,i){var o=0,r=0;return i&&(o=m.atan2(i.c*n,i.a*e),0!==i.b&&(r=m.atan2(i.d*n,i.b*e))),{x:o,y:r}}function i(t,e){for(;e>t;)t+=90;return t}function o(t,e){var n,i,o;for(n=0;e.length>n;n++)i=e[n],o=i.charAt(0).toUpperCase()+i.substring(1,i.length),t["set"+o]=r(i),t["get"+o]=s(i)}function r(t){return function(e){return this[t]!==e&&(this[t]=e,this.geometryChange()),this}}function s(t){return function(){return this[t]}}function a(t,e,n){t>e&&(e+=360);var i=m.abs(e-t);return n||(i=360-i),i}function l(t,e,n,i,o,r){var s=T((o-t)/n,3),a=T((r-e)/i,3);return T(S(m.atan2(a,s)))}function c(t,e,n,i,o,r,s,c){var h,u,d,f,p,g,y,_,w,x,b,k,C,S,T,A,D,P;if(e!==i)w=n-t,x=i-e,b=v(o,2),k=v(r,2),C=(k*w*(t+n)+b*x*(e+i))/(2*b*x),S=C-i,T=-(w*k)/(b*x),p=1/b+v(T,2)/k,g=2*(T*S/k-n/b),y=v(n,2)/b+v(S,2)/k-1,_=m.sqrt(v(g,2)-4*p*y),h=(-g-_)/(2*p),u=C+T*h,d=(-g+_)/(2*p),f=C+T*d;else{if(t===n)return!1;g=-2*i,y=v((n-t)*r/(2*o),2)+v(i,2)-v(r,2),_=m.sqrt(v(g,2)-4*y),h=d=(t+n)/2,u=(-g-_)/2,f=(-g+_)/2}return A=l(h,u,o,r,t,e),D=l(h,u,o,r,n,i),P=a(A,D,c),(s&&180>=P||!s&&P>180)&&(h=d,u=f,A=l(h,u,o,r,t,e),D=l(h,u,o,r,n,i)),{center:new M(h,u),startAngle:A,endAngle:D}}var h,u,d,f,p,g,m=Math,v=m.pow,y=window.kendo,_=y.Class,w=y.deepExtend,x=y.mixins.ObserversMixin,b=y.util,k=b.defined,C=b.rad,S=b.deg,T=b.round,A=m.PI/2,D=b.MIN_NUM,P=b.MAX_NUM,M=_.extend({init:function(t,e){this.x=t||0,this.y=e||0},equals:function(t){return t&&t.x===this.x&&t.y===this.y},clone:function(){return new M(this.x,this.y)},rotate:function(e,n){return this.transform(t().rotate(e,n))},translate:function(t,e){return this.x+=t,this.y+=e,this.geometryChange(),this},translateWith:function(t){return this.translate(t.x,t.y)},move:function(t,e){return this.x=this.y=0,this.translate(t,e)},scale:function(t,e){return k(e)||(e=t),this.x*=t,this.y*=e,this.geometryChange(),this},scaleCopy:function(t,e){return this.clone().scale(t,e)},transform:function(t){var n=e(t),i=this.x,o=this.y;return this.x=n.a*i+n.c*o+n.e,this.y=n.b*i+n.d*o+n.f,this.geometryChange(),this},transformCopy:function(t){var e=this.clone();return t&&e.transform(t),e},distanceTo:function(t){var e=this.x-t.x,n=this.y-t.y;return m.sqrt(e*e+n*n)},round:function(t){return this.x=T(this.x,t),this.y=T(this.y,t),this.geometryChange(),this},toArray:function(t){var e=k(t),n=e?T(this.x,t):this.x,i=e?T(this.y,t):this.y;return[n,i]}});o(M.fn,["x","y"]),w(M.fn,x),M.fn.toString=function(t,e){var n=this.x,i=this.y;return k(t)&&(n=T(n,t),i=T(i,t)),e=e||" ",n+e+i},M.create=function(t,e){return k(t)?t instanceof M?t:1===arguments.length&&2===t.length?new M(t[0],t[1]):new M(t,e):void 0},M.min=function(){var t,e,n=b.MAX_NUM,i=b.MAX_NUM;for(t=0;t<arguments.length;t++)e=arguments[t],n=m.min(e.x,n),i=m.min(e.y,i);return new M(n,i)},M.max=function(){var t,e,n=b.MIN_NUM,i=b.MIN_NUM;for(t=0;t<arguments.length;t++)e=arguments[t],n=m.max(e.x,n),i=m.max(e.y,i);return new M(n,i)},M.minPoint=function(){return new M(D,D)},M.maxPoint=function(){return new M(P,P)},M.ZERO=new M(0,0),h=_.extend({init:function(t,e){this.width=t||0,this.height=e||0},equals:function(t){return t&&t.width===this.width&&t.height===this.height},clone:function(){return new h(this.width,this.height)},toArray:function(t){var e=k(t),n=e?T(this.width,t):this.width,i=e?T(this.height,t):this.height;return[n,i]}}),o(h.fn,["width","height"]),w(h.fn,x),h.create=function(t,e){return k(t)?t instanceof h?t:1===arguments.length&&2===t.length?new h(t[0],t[1]):new h(t,e):void 0},h.ZERO=new h(0,0),u=_.extend({init:function(t,e){this.setOrigin(t||new M),this.setSize(e||new h)},clone:function(){return new u(this.origin.clone(),this.size.clone())},equals:function(t){return t&&t.origin.equals(this.origin)&&t.size.equals(this.size)},setOrigin:function(t){return this._observerField("origin",M.create(t)),this.geometryChange(),this},getOrigin:function(){return this.origin},setSize:function(t){return this._observerField("size",h.create(t)),this.geometryChange(),this},getSize:function(){return this.size},width:function(){return this.size.width},height:function(){return this.size.height},topLeft:function(){return this.origin.clone()},bottomRight:function(){return this.origin.clone().translate(this.width(),this.height())},topRight:function(){return this.origin.clone().translate(this.width(),0)},bottomLeft:function(){return this.origin.clone().translate(0,this.height())},center:function(){return this.origin.clone().translate(this.width()/2,this.height()/2)},bbox:function(t){var e=this.topLeft().transformCopy(t),n=this.topRight().transformCopy(t),i=this.bottomRight().transformCopy(t),o=this.bottomLeft().transformCopy(t);return u.fromPoints(e,n,i,o)},transformCopy:function(t){return u.fromPoints(this.topLeft().transform(t),this.bottomRight().transform(t))}}),w(u.fn,x),u.fromPoints=function(){var t=M.min.apply(this,arguments),e=M.max.apply(this,arguments),n=new h(e.x-t.x,e.y-t.y);return new u(t,n)},u.union=function(t,e){return u.fromPoints(M.min(t.topLeft(),e.topLeft()),M.max(t.bottomRight(),e.bottomRight()))},u.intersect=function(t,e){return t={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y},e={left:e.topLeft().x,top:e.topLeft().y,right:e.bottomRight().x,bottom:e.bottomRight().y},e.right>=t.left&&t.right>=e.left&&e.bottom>=t.top&&t.bottom>=e.top?u.fromPoints(new M(m.max(t.left,e.left),m.max(t.top,e.top)),new M(m.min(t.right,e.right),m.min(t.bottom,e.bottom))):void 0},d=_.extend({init:function(t,e){this.setCenter(t||new M),this.setRadius(e||0)},setCenter:function(t){return this._observerField("center",M.create(t)),this.geometryChange(),this},getCenter:function(){return this.center},equals:function(t){return t&&t.center.equals(this.center)&&t.radius===this.radius},clone:function(){return new d(this.center.clone(),this.radius)},pointAt:function(t){return this._pointAt(C(t))},bbox:function(t){var e,i,o,r,s=M.maxPoint(),a=M.minPoint(),l=n(this.center,this.radius,this.radius,t);
for(e=0;4>e;e++)i=this._pointAt(l.x+e*A).transformCopy(t),o=this._pointAt(l.y+e*A).transformCopy(t),r=new M(i.x,o.y),s=M.min(s,r),a=M.max(a,r);return u.fromPoints(s,a)},_pointAt:function(t){var e=this.center,n=this.radius;return new M(e.x-n*m.cos(t),e.y-n*m.sin(t))}}),o(d.fn,["radius"]),w(d.fn,x),f=_.extend({init:function(t,e){this.setCenter(t||new M),e=e||{},this.radiusX=e.radiusX,this.radiusY=e.radiusY||e.radiusX,this.startAngle=e.startAngle,this.endAngle=e.endAngle,this.anticlockwise=e.anticlockwise||!1},clone:function(){return new f(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},setCenter:function(t){return this._observerField("center",M.create(t)),this.geometryChange(),this},getCenter:function(){return this.center},MAX_INTERVAL:45,pointAt:function(t){var e=this.center,n=C(t);return new M(e.x+this.radiusX*m.cos(n),e.y+this.radiusY*m.sin(n))},curvePoints:function(){var t,e,n,i=this.startAngle,o=this.anticlockwise?-1:1,r=[this.pointAt(i)],s=i,a=this._arcInterval(),l=a.endAngle-a.startAngle,c=m.ceil(l/this.MAX_INTERVAL),h=l/c;for(t=1;c>=t;t++)e=s+o*h,n=this._intervalCurvePoints(s,e),r.push(n.cp1,n.cp2,n.p2),s=e;return r},bbox:function(t){for(var e,o,r=this,s=r._arcInterval(),a=s.startAngle,l=s.endAngle,c=n(this.center,this.radiusX,this.radiusY,t),h=S(c.x),d=S(c.y),f=r.pointAt(a).transformCopy(t),p=r.pointAt(l).transformCopy(t),g=M.min(f,p),m=M.max(f,p),v=i(h,a),y=i(d,a);l>v||l>y;)l>v&&(e=r.pointAt(v).transformCopy(t),v+=90),l>y&&(o=r.pointAt(y).transformCopy(t),y+=90),f=new M(e.x,o.y),g=M.min(g,f),m=M.max(m,f);return u.fromPoints(g,m)},_arcInterval:function(){var t,e=this.startAngle,n=this.endAngle,i=this.anticlockwise;return i&&(t=e,e=n,n=t),(e>n||i&&e===n)&&(n+=360),{startAngle:e,endAngle:n}},_intervalCurvePoints:function(t,e){var n=this,i=n.pointAt(t),o=n.pointAt(e),r=n._derivativeAt(t),s=n._derivativeAt(e),a=(C(e)-C(t))/3,l=new M(i.x+a*r.x,i.y+a*r.y),c=new M(o.x-a*s.x,o.y-a*s.y);return{p1:i,cp1:l,cp2:c,p2:o}},_derivativeAt:function(t){var e=this,n=C(t);return new M(-e.radiusX*m.sin(n),e.radiusY*m.cos(n))}}),o(f.fn,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]),w(f.fn,x),f.fromPoints=function(t,e,n,i,o,r){var s=c(t.x,t.y,e.x,e.y,n,i,o,r);return new f(s.center,{startAngle:s.startAngle,endAngle:s.endAngle,radiusX:n,radiusY:i,anticlockwise:0===r})},p=_.extend({init:function(t,e,n,i,o,r){this.a=t||0,this.b=e||0,this.c=n||0,this.d=i||0,this.e=o||0,this.f=r||0},multiplyCopy:function(t){return new p(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)},invert:function(){var t=this.a,e=this.b,n=this.c,i=this.d,o=this.e,r=this.f,s=t*i-e*n;return 0===s?null:new p(i/s,-e/s,-n/s,t/s,(n*r-i*o)/s,(e*o-t*r)/s)},clone:function(){return new p(this.a,this.b,this.c,this.d,this.e,this.f)},equals:function(t){return t?this.a===t.a&&this.b===t.b&&this.c===t.c&&this.d===t.d&&this.e===t.e&&this.f===t.f:!1},round:function(t){return this.a=T(this.a,t),this.b=T(this.b,t),this.c=T(this.c,t),this.d=T(this.d,t),this.e=T(this.e,t),this.f=T(this.f,t),this},toArray:function(t){var e,n=[this.a,this.b,this.c,this.d,this.e,this.f];if(k(t))for(e=0;n.length>e;e++)n[e]=T(n[e],t);return n}}),p.fn.toString=function(t,e){return this.toArray(t).join(e||",")},p.translate=function(t,e){return new p(1,0,0,1,t,e)},p.unit=function(){return new p(1,0,0,1,0,0)},p.rotate=function(t,e,n){var i=new p;return i.a=m.cos(C(t)),i.b=m.sin(C(t)),i.c=-i.b,i.d=i.a,i.e=e-e*i.a+n*i.b||0,i.f=n-n*i.a-e*i.b||0,i},p.scale=function(t,e){return new p(t,0,0,e,0,0)},p.IDENTITY=p.unit(),g=_.extend({init:function(t){this._matrix=t||p.unit()},clone:function(){return new g(this._matrix.clone())},equals:function(t){return t&&t._matrix.equals(this._matrix)},_optionsChange:function(){this.optionsChange({field:"transform",value:this})},translate:function(t,e){return this._matrix=this._matrix.multiplyCopy(p.translate(t,e)),this._optionsChange(),this},scale:function(t,e,n){return k(e)||(e=t),n&&(n=M.create(n),this._matrix=this._matrix.multiplyCopy(p.translate(n.x,n.y))),this._matrix=this._matrix.multiplyCopy(p.scale(t,e)),n&&(this._matrix=this._matrix.multiplyCopy(p.translate(-n.x,-n.y))),this._optionsChange(),this},rotate:function(t,e){return e=M.create(e)||M.ZERO,this._matrix=this._matrix.multiplyCopy(p.rotate(t,e.x,e.y)),this._optionsChange(),this},multiply:function(t){var n=e(t);return this._matrix=this._matrix.multiplyCopy(n),this._optionsChange(),this},matrix:function(t){return t?(this._matrix=t,this._optionsChange(),this):this._matrix}}),w(g.fn,x),w(y,{geometry:{Arc:f,Circle:d,Matrix:p,Point:M,Rect:u,Size:h,Transformation:g,transform:t,toMatrix:e}}),y.dataviz.geometry=y.geometry}(),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/core.min",["drawing/geometry.min"],t)}(function(){!function(t){var e,n,i,o=t.noop,r=Object.prototype.toString,s=window.kendo,a=s.Class,l=s.ui.Widget,c=s.deepExtend,h=s.util,u=h.defined,d=l.extend({init:function(t,e){this.options=c({},this.options,e),l.fn.init.call(this,t,this.options),this._click=this._handler("click"),this._mouseenter=this._handler("mouseenter"),this._mouseleave=this._handler("mouseleave"),this._visual=new s.drawing.Group,this.options.width&&this.element.css("width",this.options.width),this.options.height&&this.element.css("height",this.options.height)},options:{name:"Surface"},events:["click","mouseenter","mouseleave","resize"],draw:function(t){this._visual.children.push(t)},clear:function(){this._visual.children=[]},destroy:function(){this._visual=null,l.fn.destroy.call(this)},exportVisual:function(){return this._visual},getSize:function(){return{width:this.element.width(),height:this.element.height()}},setSize:function(t){this.element.css({width:t.width,height:t.height}),this._size=t,this._resize()},eventTarget:function(e){for(var n,i=t(e.touch?e.touch.initialTouch:e.target);!n&&i.length>0&&(n=i[0]._kendoNode,!i.is(this.element)&&0!==i.length);)i=i.parent();return n?n.srcElement:void 0},_resize:o,_handler:function(t){var e=this;return function(n){var i=e.eventTarget(n);i&&e.trigger(t,{element:i,originalEvent:n})}}});s.ui.plugin(d),d.create=function(t,e){return i.current.create(t,e)},e=a.extend({init:function(t){this.childNodes=[],this.parent=null,t&&(this.srcElement=t,this.observe())},destroy:function(){var t,e;for(this.srcElement&&this.srcElement.removeObserver(this),t=this.childNodes,e=0;t.length>e;e++)this.childNodes[e].destroy();this.parent=null},load:o,observe:function(){this.srcElement&&this.srcElement.addObserver(this)},append:function(t){this.childNodes.push(t),t.parent=this},insertAt:function(t,e){this.childNodes.splice(e,0,t),t.parent=this},remove:function(t,e){var n,i=t+e;for(n=t;i>n;n++)this.childNodes[n].removeSelf();this.childNodes.splice(t,e)},removeSelf:function(){this.clear(),this.destroy()},clear:function(){this.remove(0,this.childNodes.length)},invalidate:function(){this.parent&&this.parent.invalidate()},geometryChange:function(){this.invalidate()},optionsChange:function(){this.invalidate()},childrenChange:function(t){"add"===t.action?this.load(t.items,t.index):"remove"===t.action&&this.remove(t.index,t.items.length),this.invalidate()}}),n=a.extend({init:function(t,e){var n,i;this.prefix=e||"";for(n in t)i=t[n],i=this._wrap(i,n),this[n]=i},get:function(t){return s.getter(t,!0)(this)},set:function(t,e){var n,i=s.getter(t,!0)(this);i!==e&&(n=this._set(t,this._wrap(e,t)),n||this.optionsChange({field:this.prefix+t,value:e}))},_set:function(t,e){var i,o,r,a=t.indexOf(".")>=0;if(a)for(i=t.split("."),o="";i.length>1;){if(o+=i.shift(),r=s.getter(o,!0)(this),r||(r=new n({},o+"."),r.addObserver(this),this[o]=r),r instanceof n)return r.set(i.join("."),e),a;o+="."}return this._clear(t),s.setter(t)(this,e),a},_clear:function(t){var e=s.getter(t,!0)(this);e&&e.removeObserver&&e.removeObserver(this)},_wrap:function(t,e){var i=r.call(t);return null!==t&&u(t)&&"[object Object]"===i&&(t instanceof n||t instanceof a||(t=new n(t,this.prefix+e+".")),t.addObserver(this)),t}}),c(n.fn,s.mixins.ObserversMixin),i=function(){this._items=[]},i.prototype={register:function(t,e,n){var i=this._items,o=i[0],r={name:t,type:e,order:n};!o||o.order>n?i.unshift(r):i.push(r)},create:function(t,e){var n,i,o=this._items,r=o[0];if(e&&e.type)for(n=e.type.toLowerCase(),i=0;o.length>i;i++)if(o[i].name===n){r=o[i];break}return r?new r.type(t,e):void s.logToConsole("Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n- The browser does not support SVG, VML and Canvas. User agent: "+navigator.userAgent+"\n- The Kendo UI scripts are not fully loaded")}},i.current=new i,c(s,{drawing:{DASH_ARRAYS:{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]},Color:s.Color,BaseNode:e,OptionsStore:n,Surface:d,SurfaceFactory:i}}),s.dataviz.drawing=s.drawing}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/mixins.min",["drawing/core.min"],t)}(function(){!function(){var t=window.kendo,e=t.deepExtend,n=t.util.defined,i="gradient",o={extend:function(t){t.fill=this.fill,t.stroke=this.stroke},fill:function(t,e){var o,r=this.options;return n(t)?(t&&t.nodeType!=i?(o={color:t},n(e)&&(o.opacity=e),r.set("fill",o)):r.set("fill",t),this):r.get("fill")},stroke:function(t,e,i){return n(t)?(this.options.set("stroke.color",t),n(e)&&this.options.set("stroke.width",e),n(i)&&this.options.set("stroke.opacity",i),this):this.options.get("stroke")}},r={extend:function(t,e){t.traverse=function(t){var n,i,o=this[e];for(n=0;o.length>n;n++)i=o[n],i.traverse?i.traverse(t):t(i);return this}}};e(t.drawing,{mixins:{Paintable:o,Traversable:r}})}()},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/shapes.min",["drawing/core.min","drawing/mixins.min","util/text-metrics","mixins/observers.min"],t)}(function(){!function(t){function e(t,e,n){var i,o,r,s;for(o=0;t.length>o;o++)r=t[o],r.visible()&&(s=e?r.bbox(n):r.rawBBox(),s&&(i=i?q.Rect.union(i,s):s));return i}function n(t,e){var n,i,o,r;for(i=0;t.length>i;i++)o=t[i],o.visible()&&(r=o.clippedBBox(e),r&&(n=n?q.Rect.union(n,r):r));return n}function i(t,e){t.origin.x-=e,t.origin.y-=e,t.size.width+=2*e,t.size.height+=2*e}function o(t,e){for(var n=0;e.length>n;n++)t[e[n]]=r(e[n])}function r(t){var e="_"+t;return function(t){return ot(t)?(this._observerField(e,t),this.geometryChange(),this):this[e]}}function s(t,e){for(var n=0;e.length>n;n++)t[e[n]]=a(e[n])}function a(t){var e="_"+t;return function(t){return ot(t)?(this._observerField(e,$.create(t)),this.geometryChange(),this):this[e]}}function l(t,e){for(var n=0;e.length>n;n++)t[e[n]]=c(e[n])}function c(t){return function(e){return ot(e)?(this.options.set(t,e),this):this.options.get(t)}}function h(){return"kdef"+gt++}function u(t,e,n){b(t,e,n,"x","width")}function d(t,e,n){b(t,e,n,"y","height")}function f(t){x(w(t),"x","y","width")}function p(t){x(w(t),"y","x","height")}function g(t,e){return v(t,e,"x","y","width")}function m(t,e){return v(t,e,"y","x","height")}function v(t,e,n,i,o){var r,s,a,l,c=[],h=_(t,e,o),u=e.origin.clone();for(l=0;h.length>l;l++)for(a=h[l],r=a[0],u[i]=r.bbox.origin[i],S(u,r.bbox,r.element),r.bbox.origin[n]=u[n],x(a,n,i,o),c.push([]),s=0;a.length>s;s++)c[l].push(a[s].element);return c}function y(t,e){var n,i,o=t.clippedBBox(),r=o.size,s=e.size;(r.width>s.width||r.height>s.height)&&(n=J.min(s.width/r.width,s.height/r.height),i=t.transform()||q.transform(),i.scale(n,n),t.transform(i))}function _(t,e,n){var i,o,r,s,a=e.size[n],l=0,c=[],h=[],u=function(){h.push({element:i,bbox:r})};for(s=0;t.length>s;s++)i=t[s],r=i.clippedBBox(),r&&(o=r.size[n],l+o>a?h.length?(c.push(h),h=[],u(),l=o):(u(),c.push(h),h=[],l=0):(u(),l+=o));return h.length&&c.push(h),c}function w(t){var e,n,i,o=[];for(i=0;t.length>i;i++)e=t[i],n=e.clippedBBox(),n&&o.push({element:e,bbox:n});return o}function x(t,e,n,i){var o,r,s,a,l;if(t.length>1)for(o=t[0].bbox,r=new $,l=1;t.length>l;l++)s=t[l].element,a=t[l].bbox,r[e]=o.origin[e]+o.size[i],r[n]=a.origin[n],S(r,a,s),a.origin[e]=r[e],o=a}function b(t,e,n,i,o){var r,s,a;for(n=n||"start",a=0;t.length>a;a++)r=t[a].clippedBBox(),r&&(s=r.origin.clone(),s[i]=k(r.size[o],e,n,i,o),S(s,r,t[a]))}function k(t,e,n,i,o){var r;return r=n==mt?e.origin[i]:n==vt?e.origin[i]+e.size[o]-t:e.origin[i]+(e.size[o]-t)/2}function C(t,e,n){var i=n.transform()||q.transform(),o=i.matrix();o.e+=t,o.f+=e,i.matrix(o),n.transform(i)}function S(t,e,n){C(t.x-e.origin.x,t.y-e.origin.y,n)}var T,A,D,P,M,E,B,I,z,L,R,O,F,V,N,H,U,j=window.kendo,G=j.Class,W=j.deepExtend,q=j.geometry,$=q.Point,Y=q.Size,X=q.Matrix,Q=q.toMatrix,K=j.drawing,Z=K.OptionsStore,J=Math,tt=J.pow,et=j.util,nt=et.append,it=et.arrayLimits,ot=et.defined,rt=et.last,st=et.valueOrDefault,at=j.mixins.ObserversMixin,lt=t.inArray,ct=[].push,ht=[].pop,ut=[].splice,dt=[].shift,ft=[].slice,pt=[].unshift,gt=1,mt="start",vt="end",yt="horizontal",_t=G.extend({nodeType:"Element",init:function(t){this._initOptions(t)},_initOptions:function(t){var e,n;t=t||{},e=t.transform,n=t.clip,e&&(t.transform=q.transform(e)),n&&!n.id&&(n.id=h()),this.options=new Z(t),this.options.addObserver(this)},transform:function(t){return ot(t)?void this.options.set("transform",q.transform(t)):this.options.get("transform")},parentTransform:function(){for(var t,e,n=this;n.parent;)n=n.parent,t=n.transform(),t&&(e=t.matrix().multiplyCopy(e||X.unit()));return e?q.transform(e):void 0},currentTransform:function(t){var e,n,i=this.transform(),o=Q(i);return ot(t)||(t=this.parentTransform()),e=Q(t),n=o&&e?e.multiplyCopy(o):o||e,n?q.transform(n):void 0},visible:function(t){return ot(t)?(this.options.set("visible",t),this):this.options.get("visible")!==!1},clip:function(t){var e=this.options;return ot(t)?(t&&!t.id&&(t.id=h()),e.set("clip",t),this):e.get("clip")},opacity:function(t){return ot(t)?(this.options.set("opacity",t),this):st(this.options.get("opacity"),1)},clippedBBox:function(t){var e,n=this._clippedBBox(t);return n?(e=this.clip(),e?q.Rect.intersect(n,e.bbox(t)):n):void 0},_clippedBBox:function(t){return this.bbox(t)}});W(_t.fn,at),T=G.extend({init:function(t){t=t||[],this.length=0,this._splice(0,t.length,t)},elements:function(t){return t?(this._splice(0,this.length,t),this._change(),this):this.slice(0)},push:function(){var t=arguments,e=ct.apply(this,t);return this._add(t),e},slice:ft,pop:function(){var t=this.length,e=ht.apply(this);return t&&this._remove([e]),e},splice:function(t,e){var n=ft.call(arguments,2),i=this._splice(t,e,n);return this._change(),i},shift:function(){var t=this.length,e=dt.apply(this);return t&&this._remove([e]),e},unshift:function(){var t=arguments,e=pt.apply(this,t);return this._add(t),e},indexOf:function(t){var e,n,i=this;for(e=0,n=i.length;n>e;e++)if(i[e]===t)return e;return-1},_splice:function(t,e,n){var i=ut.apply(this,[t,e].concat(n));return this._clearObserver(i),this._setObserver(n),i},_add:function(t){this._setObserver(t),this._change()},_remove:function(t){this._clearObserver(t),this._change()},_setObserver:function(t){for(var e=0;t.length>e;e++)t[e].addObserver(this)},_clearObserver:function(t){for(var e=0;t.length>e;e++)t[e].removeObserver(this)},_change:function(){}}),W(T.fn,at),A=_t.extend({nodeType:"Group",init:function(t){_t.fn.init.call(this,t),this.children=[]},childrenChange:function(t,e,n){this.trigger("childrenChange",{action:t,items:e,index:n})},append:function(){return nt(this.children,arguments),this._reparent(arguments,this),this.childrenChange("add",arguments),this},insert:function(t,e){return this.children.splice(t,0,e),e.parent=this,this.childrenChange("add",[e],t),this},insertAt:function(t,e){return this.insert(e,t)},remove:function(t){var e=lt(t,this.children);return e>=0&&(this.children.splice(e,1),t.parent=null,this.childrenChange("remove",[t],e)),this},removeAt:function(t){if(t>=0&&this.children.length>t){var e=this.children[t];this.children.splice(t,1),e.parent=null,this.childrenChange("remove",[e],t)}return this},clear:function(){var t=this.children;return this.children=[],this._reparent(t,null),this.childrenChange("remove",t,0),this},bbox:function(t){return e(this.children,!0,this.currentTransform(t))},rawBBox:function(){return e(this.children,!1)},_clippedBBox:function(t){return n(this.children,this.currentTransform(t))},currentTransform:function(t){return _t.fn.currentTransform.call(this,t)||null},_reparent:function(t,e){var n,i,o;for(n=0;t.length>n;n++)i=t[n],o=i.parent,o&&o!=this&&o.remove&&o.remove(i),i.parent=e}}),K.mixins.Traversable.extend(A.fn,"children"),D=_t.extend({nodeType:"Text",init:function(t,e,n){_t.fn.init.call(this,n),this.content(t),this.position(e||new q.Point),this.options.font||(this.options.font="12px sans-serif"),ot(this.options.fill)||this.fill("#000")},content:function(t){return ot(t)?(this.options.set("content",t),this):this.options.get("content")},measure:function(){var t=et.measureText(this.content(),{font:this.options.get("font")});return t},rect:function(){var t=this.measure(),e=this.position().clone();return new q.Rect(e,[t.width,t.height])},bbox:function(t){var e=Q(this.currentTransform(t));return this.rect().bbox(e)},rawBBox:function(){return this.rect().bbox()}}),K.mixins.Paintable.extend(D.fn),s(D.fn,["position"]),P=_t.extend({nodeType:"Circle",init:function(t,e){_t.fn.init.call(this,e),this.geometry(t||new q.Circle),ot(this.options.stroke)||this.stroke("#000")},bbox:function(t){var e=Q(this.currentTransform(t)),n=this._geometry.bbox(e),o=this.options.get("stroke.width");return o&&i(n,o/2),n},rawBBox:function(){return this._geometry.bbox()}}),K.mixins.Paintable.extend(P.fn),o(P.fn,["geometry"]),M=_t.extend({nodeType:"Arc",init:function(t,e){_t.fn.init.call(this,e),this.geometry(t||new q.Arc),ot(this.options.stroke)||this.stroke("#000")},bbox:function(t){var e=Q(this.currentTransform(t)),n=this.geometry().bbox(e),o=this.options.get("stroke.width");return o&&i(n,o/2),n},rawBBox:function(){return this.geometry().bbox()},toPath:function(){var t,e=new I,n=this.geometry().curvePoints();if(n.length>0)for(e.moveTo(n[0].x,n[0].y),t=1;n.length>t;t+=3)e.curveTo(n[t],n[t+1],n[t+2]);return e}}),K.mixins.Paintable.extend(M.fn),o(M.fn,["geometry"]),E=T.extend({_change:function(){this.geometryChange()}}),B=G.extend({init:function(t,e,n){this.anchor(t||new $),this.controlIn(e),this.controlOut(n)},bboxTo:function(t,e){var n,i=this.anchor().transformCopy(e),o=t.anchor().transformCopy(e);return n=this.controlOut()&&t.controlIn()?this._curveBoundingBox(i,this.controlOut().transformCopy(e),t.controlIn().transformCopy(e),o):this._lineBoundingBox(i,o)},_lineBoundingBox:function(t,e){return q.Rect.fromPoints(t,e)},_curveBoundingBox:function(t,e,n,i){var o=[t,e,n,i],r=this._curveExtremesFor(o,"x"),s=this._curveExtremesFor(o,"y"),a=it([r.min,r.max,t.x,i.x]),l=it([s.min,s.max,t.y,i.y]);return q.Rect.fromPoints(new $(a.min,l.min),new $(a.max,l.max))},_curveExtremesFor:function(t,e){var n=this._curveExtremes(t[0][e],t[1][e],t[2][e],t[3][e]);return{min:this._calculateCurveAt(n.min,e,t),max:this._calculateCurveAt(n.max,e,t)}},_calculateCurveAt:function(t,e,n){var i=1-t;return tt(i,3)*n[0][e]+3*tt(i,2)*t*n[1][e]+3*tt(t,2)*i*n[2][e]+tt(t,3)*n[3][e]},_curveExtremes:function(t,e,n,i){var o,r,s=t-3*e+3*n-i,a=-2*(t-2*e+n),l=t-e,c=J.sqrt(a*a-4*s*l),h=0,u=1;return 0===s?0!==a&&(h=u=-l/a):isNaN(c)||(h=(-a+c)/(2*s),u=(-a-c)/(2*s)),o=J.max(J.min(h,u),0),(0>o||o>1)&&(o=0),r=J.min(J.max(h,u),1),(r>1||0>r)&&(r=1),{min:o,max:r}}}),s(B.fn,["anchor","controlIn","controlOut"]),W(B.fn,at),I=_t.extend({nodeType:"Path",init:function(t){_t.fn.init.call(this,t),this.segments=new E,this.segments.addObserver(this),ot(this.options.stroke)||(this.stroke("#000"),ot(this.options.stroke.lineJoin)||this.options.set("stroke.lineJoin","miter"))},moveTo:function(t,e){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(t,e),this},lineTo:function(t,e){var n=ot(e)?new $(t,e):t,i=new B(n);return this.segments.push(i),this},curveTo:function(t,e,n){var i,o;return this.segments.length>0&&(i=rt(this.segments),o=new B(n,e),this.suspend(),i.controlOut(t),this.resume(),this.segments.push(o)),this},arc:function(t,e,n,i,o){var r,s,a,l,c;return this.segments.length>0&&(r=rt(this.segments),s=r.anchor(),a=et.rad(t),l=new $(s.x-n*J.cos(a),s.y-i*J.sin(a)),c=new q.Arc(l,{startAngle:t,endAngle:e,radiusX:n,radiusY:i,anticlockwise:o}),this._addArcSegments(c)),this},arcTo:function(t,e,n,i,o){var r,s,a;return this.segments.length>0&&(r=rt(this.segments),s=r.anchor(),a=q.Arc.fromPoints(s,t,e,n,i,o),this._addArcSegments(a)),this},_addArcSegments:function(t){var e,n;for(this.suspend(),e=t.curvePoints(),n=1;e.length>n;n+=3)this.curveTo(e[n],e[n+1],e[n+2]);this.resume(),this.geometryChange()},close:function(){return this.options.closed=!0,this.geometryChange(),this},bbox:function(t){var e=Q(this.currentTransform(t)),n=this._bbox(e),o=this.options.get("stroke.width");return o&&i(n,o/2),n},rawBBox:function(){return this._bbox()},_bbox:function(t){var e,n,i,o,r=this.segments,s=r.length;if(1===s)n=r[0].anchor().transformCopy(t),e=new q.Rect(n,Y.ZERO);else if(s>0)for(i=1;s>i;i++)o=r[i-1].bboxTo(r[i],t),e=e?q.Rect.union(e,o):o;return e}}),K.mixins.Paintable.extend(I.fn),I.fromRect=function(t,e){return new I(e).moveTo(t.topLeft()).lineTo(t.topRight()).lineTo(t.bottomRight()).lineTo(t.bottomLeft()).close()},I.fromPoints=function(t,e){var n,i,o;if(t){for(n=new I(e),i=0;t.length>i;i++)o=$.create(t[i]),o&&(0===i?n.moveTo(o):n.lineTo(o));return n}},I.fromArc=function(t,e){var n=new I(e),i=t.startAngle,o=t.pointAt(i);return n.moveTo(o.x,o.y),n.arc(i,t.endAngle,t.radiusX,t.radiusY,t.anticlockwise),n},z=_t.extend({nodeType:"MultiPath",init:function(t){_t.fn.init.call(this,t),this.paths=new E,this.paths.addObserver(this),ot(this.options.stroke)||this.stroke("#000")},moveTo:function(t,e){var n=new I;return n.moveTo(t,e),this.paths.push(n),this},lineTo:function(t,e){return this.paths.length>0&&rt(this.paths).lineTo(t,e),this},curveTo:function(t,e,n){return this.paths.length>0&&rt(this.paths).curveTo(t,e,n),this},arc:function(t,e,n,i,o){return this.paths.length>0&&rt(this.paths).arc(t,e,n,i,o),this},arcTo:function(t,e,n,i,o){return this.paths.length>0&&rt(this.paths).arcTo(t,e,n,i,o),this},close:function(){return this.paths.length>0&&rt(this.paths).close(),this},bbox:function(t){return e(this.paths,!0,this.currentTransform(t))},rawBBox:function(){return e(this.paths,!1)},_clippedBBox:function(t){return n(this.paths,this.currentTransform(t))}}),K.mixins.Paintable.extend(z.fn),L=_t.extend({nodeType:"Image",init:function(t,e,n){_t.fn.init.call(this,n),this.src(t),this.rect(e||new q.Rect)},src:function(t){return ot(t)?(this.options.set("src",t),this):this.options.get("src")},bbox:function(t){var e=Q(this.currentTransform(t));return this._rect.bbox(e)},rawBBox:function(){return this._rect.bbox()}}),o(L.fn,["rect"]),R=G.extend({init:function(t,e,n){this.options=new Z({offset:t,color:e,opacity:ot(n)?n:1}),this.options.addObserver(this)}}),l(R.fn,["offset","color","opacity"]),W(R.fn,at),R.create=function(t){if(ot(t)){var e;return e=t instanceof R?t:t.length>1?new R(t[0],t[1],t[2]):new R(t.offset,t.color,t.opacity)}},O=T.extend({_change:function(){this.optionsChange({field:"stops"})}}),F=G.extend({nodeType:"gradient",init:function(t){this.stops=new O(this._createStops(t.stops)),this.stops.addObserver(this),this._userSpace=t.userSpace,this.id=h()},userSpace:function(t){return ot(t)?(this._userSpace=t,this.optionsChange(),this):this._userSpace},_createStops:function(t){var e,n=[];for(t=t||[],e=0;t.length>e;e++)n.push(R.create(t[e]));return n},addStop:function(t,e,n){this.stops.push(new R(t,e,n))},removeStop:function(t){var e=this.stops.indexOf(t);e>=0&&this.stops.splice(e,1)}}),W(F.fn,at,{optionsChange:function(t){this.trigger("optionsChange",{field:"gradient"+(t?"."+t.field:""),value:this})},geometryChange:function(){this.optionsChange()}}),V=F.extend({init:function(t){t=t||{},F.fn.init.call(this,t),this.start(t.start||new $),this.end(t.end||new $(1,0))}}),s(V.fn,["start","end"]),N=F.extend({init:function(t){t=t||{},F.fn.init.call(this,t),this.center(t.center||new $),this._radius=ot(t.radius)?t.radius:1,this._fallbackFill=t.fallbackFill},radius:function(t){return ot(t)?(this._radius=t,this.geometryChange(),this):this._radius},fallbackFill:function(t){return ot(t)?(this._fallbackFill=t,this.optionsChange(),this):this._fallbackFill}}),s(N.fn,["center"]),H=_t.extend({nodeType:"Rect",init:function(t,e){_t.fn.init.call(this,e),this.geometry(t||new q.Rect),ot(this.options.stroke)||this.stroke("#000")},bbox:function(t){var e=Q(this.currentTransform(t)),n=this._geometry.bbox(e),o=this.options.get("stroke.width");return o&&i(n,o/2),n},rawBBox:function(){return this._geometry.bbox()}}),K.mixins.Paintable.extend(H.fn),o(H.fn,["geometry"]),U=A.extend({init:function(t,e){A.fn.init.call(this,j.deepExtend({},this._defaults,e)),this._rect=t,this._fieldMap={}},_defaults:{alignContent:mt,justifyContent:mt,alignItems:mt,spacing:0,orientation:yt,lineSpacing:0,wrap:!0},rect:function(t){return t?(this._rect=t,this):this._rect},_initMap:function(){var t=this.options,e=this._fieldMap;t.orientation==yt?(e.sizeField="width",e.groupsSizeField="height",e.groupAxis="x",e.groupsAxis="y"):(e.sizeField="height",e.groupsSizeField="width",e.groupAxis="y",e.groupsAxis="x")},reflow:function(){var t,e,n,i,o,r,s,a,l,c,h,u,d,f,p,g,m,v,y,_,w,x,b,C,T,A;if(this._rect&&0!==this.children.length){for(this._initMap(),this.options.transform&&this.transform(null),t=this.options,e=this._fieldMap,n=this._rect,i=this._initGroups(),o=i.groups,r=i.groupsSize,s=e.sizeField,a=e.groupsSizeField,l=e.groupAxis,c=e.groupsAxis,h=k(r,n,t.alignContent,c,a),u=new $,d=new $,f=new q.Size,_=0;o.length>_;_++){for(v=o[_],u[l]=p=k(v.size,n,t.justifyContent,l,s),u[c]=h,f[s]=v.size,f[a]=v.lineSize,y=new q.Rect(u,f),w=0;v.bboxes.length>w;w++)m=v.elements[w],g=v.bboxes[w],d[l]=p,d[c]=k(g.size[a],y,t.alignItems,c,a),S(d,g,m),p+=g.size[s]+t.spacing;h+=v.lineSize+t.lineSpacing}!t.wrap&&v.size>n.size[s]&&(x=n.size[s]/y.size[s],b=y.topLeft().scale(x,x),C=y.size[a]*x,T=k(C,n,t.alignContent,c,a),A=q.transform(),"x"===l?A.translate(n.origin.x-b.x,T-b.y):A.translate(T-b.x,n.origin.y-b.y),A.scale(x,x),this.transform(A))}},_initGroups:function(){var t,e,n,i=this.options,o=this.children,r=i.lineSpacing,s=this._fieldMap.sizeField,a=-r,l=[],c=this._newGroup(),h=function(){l.push(c),a+=c.lineSize+r};for(n=0;o.length>n;n++)e=o[n],t=o[n].clippedBBox(),e.visible()&&t&&(i.wrap&&c.size+t.size[s]+i.spacing>this._rect.size[s]?0===c.bboxes.length?(this._addToGroup(c,t,e),h(),c=this._newGroup()):(h(),c=this._newGroup(),this._addToGroup(c,t,e)):this._addToGroup(c,t,e));return c.bboxes.length&&h(),{groups:l,groupsSize:a}},_addToGroup:function(t,e,n){t.size+=e.size[this._fieldMap.sizeField]+this.options.spacing,t.lineSize=Math.max(e.size[this._fieldMap.groupsSizeField],t.lineSize),t.bboxes.push(e),t.elements.push(n)},_newGroup:function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}}}),W(K,{align:u,Arc:M,Circle:P,Element:_t,ElementsArray:T,fit:y,Gradient:F,GradientStop:R,Group:A,Image:L,Layout:U,LinearGradient:V,MultiPath:z,Path:I,RadialGradient:N,Rect:H,Segment:B,stack:f,Text:D,vAlign:d,vStack:p,vWrap:m,wrap:g})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/parser.min",["drawing/shapes.min"],t)}(function(){!function(t){function e(t){var e=[];return t.replace(g,function(t,n){e.push(parseFloat(n))}),e}function n(t,e,n){var i,o=e?0:1;for(i=0;t.length>i;i+=2)t.splice(i+o,0,n)}function i(t,e){return t&&e?e.scaleCopy(2).translate(-t.x,-t.y):void 0}function o(t,e,n){var i=1/3;return e=e.clone().scale(2/3),{controlOut:e.clone().translateWith(t.scaleCopy(i)),controlIn:e.translateWith(n.scaleCopy(i))}}var r=window.kendo,s=r.drawing,a=r.geometry,l=r.Class,c=a.Point,h=r.deepExtend,u=t.trim,d=r.util,f=d.last,p=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,g=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g,m="m",v="z",y=l.extend({parse:function(t,n){var i,o=new s.MultiPath(n),r=new c;return t.replace(p,function(t,n,s,a){var l=n.toLowerCase(),c=l===n,h=e(u(s));if(l===m&&(c?(r.x+=h[0],r.y+=h[1]):(r.x=h[0],r.y=h[1]),o.moveTo(r.x,r.y),h.length>2&&(l="l",h.splice(0,2))),_[l])_[l](o,{parameters:h,position:r,isRelative:c,previousCommand:i}),a&&a.toLowerCase()===v&&o.close();else if(l!==m)throw Error("Error while parsing SVG path. Unsupported command: "+l);i=l}),o}}),_={l:function(t,e){var n,i,o=e.parameters,r=e.position;for(n=0;o.length>n;n+=2)i=new c(o[n],o[n+1]),e.isRelative&&i.translateWith(r),t.lineTo(i.x,i.y),r.x=i.x,r.y=i.y},c:function(t,e){var n,i,o,r,s=e.parameters,a=e.position;for(r=0;s.length>r;r+=6)n=new c(s[r],s[r+1]),i=new c(s[r+2],s[r+3]),o=new c(s[r+4],s[r+5]),e.isRelative&&(i.translateWith(a),n.translateWith(a),o.translateWith(a)),t.curveTo(n,i,o),a.x=o.x,a.y=o.y},v:function(t,e){var i=e.isRelative?0:e.position.x;n(e.parameters,!0,i),this.l(t,e)},h:function(t,e){var i=e.isRelative?0:e.position.y;n(e.parameters,!1,i),this.l(t,e)},a:function(t,e){var n,i,o,r,s,a,l=e.parameters,h=e.position;for(n=0;l.length>n;n+=7)i=l[n],o=l[n+1],r=l[n+3],s=l[n+4],a=new c(l[n+5],l[n+6]),e.isRelative&&a.translateWith(h),t.arcTo(a,i,o,r,s),h.x=a.x,h.y=a.y},s:function(t,e){var n,o,r,s,a,l=e.parameters,h=e.position,u=e.previousCommand;for(("s"==u||"c"==u)&&(s=f(f(t.paths).segments).controlIn()),a=0;l.length>a;a+=4)r=new c(l[a],l[a+1]),o=new c(l[a+2],l[a+3]),e.isRelative&&(r.translateWith(h),o.translateWith(h)),n=s?i(s,h):h.clone(),s=r,t.curveTo(n,r,o),h.x=o.x,h.y=o.y},q:function(t,e){var n,i,r,s,a=e.parameters,l=e.position;for(s=0;a.length>s;s+=4)r=new c(a[s],a[s+1]),i=new c(a[s+2],a[s+3]),e.isRelative&&(r.translateWith(l),i.translateWith(l)),n=o(l,r,i),t.curveTo(n.controlOut,n.controlIn,i),l.x=i.x,l.y=i.y},t:function(t,e){var n,r,s,a,l,h=e.parameters,u=e.position,d=e.previousCommand;for(("q"==d||"t"==d)&&(a=f(f(t.paths).segments),r=a.controlIn().clone().translateWith(u.scaleCopy(-1/3)).scale(1.5)),l=0;h.length>l;l+=2)s=new c(h[l],h[l+1]),e.isRelative&&s.translateWith(u),r=r?i(r,u):u.clone(),n=o(u,r,s),t.curveTo(n.controlOut,n.controlIn,s),u.x=s.x,u.y=s.y}};y.current=new y,s.Path.parse=function(t,e){return y.current.parse(t,e)},h(s,{PathParser:y})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/svg.min",["drawing/shapes.min","util/main.min"],t)}(function(){!function(t){function e(t){var e,n,i,o;try{e=t.getScreenCTM?t.getScreenCTM():null}catch(r){}e&&(n=-e.e%1,i=-e.f%1,o=t.style,(0!==n||0!==i)&&(o.left=n+"px",o.top=i+"px"))}function n(){var t=document.getElementsByTagName("base")[0],e="",n=document.location.href,i=n.indexOf("#");return t&&!h.support.browser.msie&&(-1!==i&&(n=n.substring(0,i)),e=n),e}function i(t){return"url("+n()+"#"+t+")"}function o(t){var e,n,i,o=new z,r=t.clippedBBox();return r&&(e=r.getOrigin(),n=new f.Group,n.transform(d.transform().translate(-e.x,-e.y)),n.children.push(t),t=n),o.load([t]),i="<?xml version='1.0' ?><svg xmlns='"+P+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+o.render()+"</svg>",o.destroy(),i}function r(e,n){var i=o(e);return n&&n.raw||(i="data:image/svg+xml;base64,"+g.encodeBase64(i)),t.Deferred().resolve(i).promise()}function s(t,e){return"clip"==t||"fill"==t&&(!e||e.nodeType==C)}function a(t){if(!t||!t.indexOf||t.indexOf("&")<0)return t;var e=a._element;return e.innerHTML=t,e.textContent||e.innerText}var l,c=document,h=window.kendo,u=h.deepExtend,d=h.geometry,f=h.drawing,p=f.BaseNode,g=h.util,m=g.defined,v=g.isTransparent,y=g.renderAttr,_=g.renderAllAttr,w=g.renderTemplate,x=t.inArray,b="butt",k=f.DASH_ARRAYS,C="gradient",S="none",T=".kendo",A="solid",D=" ",P="http://www.w3.org/2000/svg",M="transform",E="undefined",B=f.Surface.extend({
init:function(t,n){f.Surface.fn.init.call(this,t,n),this._root=new z(this.options),Q(this.element[0],this._template(this)),this._rootElement=this.element[0].firstElementChild,e(this._rootElement),this._root.attachTo(this._rootElement),this.element.on("click"+T,this._click),this.element.on("mouseover"+T,this._mouseenter),this.element.on("mouseout"+T,this._mouseleave),this.resize()},type:"svg",destroy:function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,this.element.off(T)),f.Surface.fn.destroy.call(this)},translate:function(t){var e=h.format("{0} {1} {2} {3}",Math.round(t.x),Math.round(t.y),this._size.width,this._size.height);this._offset=t,this._rootElement.setAttribute("viewBox",e)},draw:function(t){f.Surface.fn.draw.call(this,t),this._root.load([t])},clear:function(){f.Surface.fn.clear.call(this),this._root.clear()},svg:function(){return"<?xml version='1.0' ?>"+this._template(this)},exportVisual:function(){var t,e=this._visual,n=this._offset;return n&&(t=new f.Group,t.children.push(e),t.transform(d.transform().translate(-n.x,-n.y)),e=t),e},_resize:function(){this._offset&&this.translate(this._offset)},_template:w("<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='"+P+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>#= d._root.render() #</svg>")}),I=p.extend({init:function(t){p.fn.init.call(this,t),this.definitions={}},destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),p.fn.destroy.call(this)},load:function(t,e){var n,i,o,r,s=this,a=s.element;for(r=0;t.length>r;r++)i=t[r],o=i.children,n=new X[i.nodeType](i),m(e)?s.insertAt(n,e):s.append(n),n.createDefinitions(),o&&o.length>0&&n.load(o),a&&n.attachTo(a,e)},root:function(){for(var t=this;t.parent;)t=t.parent;return t},attachTo:function(t,e){var n,i=c.createElement("div");Q(i,"<svg xmlns='"+P+"' version='1.1'>"+this.render()+"</svg>"),n=i.firstChild.firstChild,n&&(m(e)?t.insertBefore(n,t.childNodes[e]||null):t.appendChild(n),this.setElement(n))},setElement:function(t){var e,n,i=this.childNodes;for(this.element&&(this.element._kendoNode=null),this.element=t,this.element._kendoNode=this,n=0;i.length>n;n++)e=t.childNodes[n],i[n].setElement(e)},clear:function(){var t,e;for(this.clearDefinitions(),this.element&&(this.element.innerHTML=""),t=this.childNodes,e=0;t.length>e;e++)t[e].destroy();this.childNodes=[]},removeSelf:function(){if(this.element){var t=this.element.parentNode;t&&t.removeChild(this.element),this.element=null}p.fn.removeSelf.call(this)},template:w("#= d.renderChildren() #"),render:function(){return this.template(this)},renderChildren:function(){var t,e=this.childNodes,n="";for(t=0;e.length>t;t++)n+=e[t].render();return n},optionsChange:function(t){var e=t.field,n=t.value;"visible"===e?this.css("display",n?"":S):l[e]&&s(e,n)?this.updateDefinition(e,n):"opacity"===e&&this.attr("opacity",n),p.fn.optionsChange.call(this,t)},attr:function(t,e){this.element&&this.element.setAttribute(t,e)},allAttr:function(t){for(var e=0;t.length>e;e++)this.attr(t[e][0],t[e][1])},css:function(t,e){this.element&&(this.element.style[t]=e)},allCss:function(t){for(var e=0;t.length>e;e++)this.css(t[e][0],t[e][1])},removeAttr:function(t){this.element&&this.element.removeAttribute(t)},mapTransform:function(t){var e=[];return t&&e.push([M,"matrix("+t.matrix().toString(6)+")"]),e},renderTransform:function(){return _(this.mapTransform(this.srcElement.transform()))},transformChange:function(t){t?this.allAttr(this.mapTransform(t)):this.removeAttr(M)},mapStyle:function(){var t=this.srcElement.options,e=[["cursor",t.cursor]];return t.visible===!1&&e.push(["display",S]),e},renderStyle:function(){return y("style",g.renderStyle(this.mapStyle(!0)))},renderOpacity:function(){return y("opacity",this.srcElement.options.opacity)},createDefinitions:function(){var t,e,n,i,o=this.srcElement,r=this.definitions;if(o){n=o.options;for(e in l)t=n.get(e),t&&s(e,t)&&(r[e]=t,i=!0);i&&this.definitionChange({action:"add",definitions:r})}},definitionChange:function(t){this.parent&&this.parent.definitionChange(t)},updateDefinition:function(t,e){var n=this.definitions,o=n[t],r=l[t],s={};o&&(s[t]=o,this.definitionChange({action:"remove",definitions:s}),delete n[t]),e?(s[t]=e,this.definitionChange({action:"add",definitions:s}),n[t]=e,this.attr(r,i(e.id))):o&&this.removeAttr(r)},clearDefinitions:function(){var t,e=this.definitions;for(t in e){this.definitionChange({action:"remove",definitions:e}),this.definitions={};break}},renderDefinitions:function(){return _(this.mapDefinitions())},mapDefinitions:function(){var t,e=this.definitions,n=[];for(t in e)n.push([l[t],i(e[t].id)]);return n}}),z=I.extend({init:function(t){I.fn.init.call(this),this.options=t,this.defs=new L},attachTo:function(t){this.element=t,this.defs.attachTo(t.firstElementChild)},clear:function(){p.fn.clear.call(this)},template:w("#=d.defs.render()##= d.renderChildren() #"),definitionChange:function(t){this.defs.definitionChange(t)}}),L=I.extend({init:function(){I.fn.init.call(this),this.definitionMap={}},attachTo:function(t){this.element=t},template:w("<defs>#= d.renderChildren()#</defs>"),definitionChange:function(t){var e=t.definitions,n=t.action;"add"==n?this.addDefinitions(e):"remove"==n&&this.removeDefinitions(e)},createDefinition:function(t,e){var n;return"clip"==t?n=R:"fill"==t&&(e instanceof f.LinearGradient?n=q:e instanceof f.RadialGradient&&(n=$)),new n(e)},addDefinitions:function(t){for(var e in t)this.addDefinition(e,t[e])},addDefinition:function(t,e){var n,i=this.definitionMap,o=e.id,r=this.element,s=i[o];s?s.count++:(n=this.createDefinition(t,e),i[o]={element:n,count:1},this.append(n),r&&n.attachTo(this.element))},removeDefinitions:function(t){for(var e in t)this.removeDefinition(t[e])},removeDefinition:function(t){var e=this.definitionMap,n=t.id,i=e[n];i&&(i.count--,0===i.count&&(this.remove(x(i.element,this.childNodes),1),delete e[n]))}}),R=I.extend({init:function(t){I.fn.init.call(this),this.srcElement=t,this.id=t.id,this.load([t])},template:w("<clipPath id='#=d.id#'>#= d.renderChildren()#</clipPath>")}),O=I.extend({template:w("<g#= d.renderTransform() + d.renderStyle() + d.renderOpacity() + d.renderDefinitions()#>#= d.renderChildren() #</g>"),optionsChange:function(t){t.field==M&&this.transformChange(t.value),I.fn.optionsChange.call(this,t)}}),F=I.extend({geometryChange:function(){this.attr("d",this.renderData()),this.invalidate()},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 M:this.transformChange(t.value);break;default:var e=this.attributeMap[t.field];e&&this.attr(e,t.value)}I.fn.optionsChange.call(this,t)},attributeMap:{"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},content:function(){this.element&&(this.element.textContent=this.srcElement.content())},renderData:function(){return this.printPath(this.srcElement)},printPath:function(t){var e,n,i,o,r,s=t.segments,a=s.length;if(a>0){for(e=[],r=1;a>r;r++)i=this.segmentType(s[r-1],s[r]),i!==o&&(o=i,e.push(i)),e.push("L"===i?this.printPoints(s[r].anchor()):this.printPoints(s[r-1].controlOut(),s[r].controlIn(),s[r].anchor()));return n="M"+this.printPoints(s[0].anchor())+D+e.join(D),t.options.closed&&(n+="Z"),n}},printPoints:function(){var t,e=arguments,n=e.length,i=[];for(t=0;n>t;t++)i.push(e[t].toString(3));return i.join(D)},segmentType:function(t,e){return t.controlOut()&&e.controlIn()?"C":"L"},mapStroke:function(t){var e=[];return t&&!v(t.color)?(e.push(["stroke",t.color]),e.push(["stroke-width",t.width]),e.push(["stroke-linecap",this.renderLinecap(t)]),e.push(["stroke-linejoin",t.lineJoin]),m(t.opacity)&&e.push(["stroke-opacity",t.opacity]),m(t.dashType)&&e.push(["stroke-dasharray",this.renderDashType(t)])):e.push(["stroke",S]),e},renderStroke:function(){return _(this.mapStroke(this.srcElement.options.stroke))},renderDashType:function(t){var e,n,i,o=t.width||1,r=t.dashType;if(r&&r!=A){for(e=k[r.toLowerCase()],n=[],i=0;e.length>i;i++)n.push(e[i]*o);return n.join(" ")}},renderLinecap:function(t){var e=t.dashType,n=t.lineCap;return e&&e!=A?b:n},mapFill:function(t){var e=[];return t&&t.nodeType==C||(t&&!v(t.color)?(e.push(["fill",t.color]),m(t.opacity)&&e.push(["fill-opacity",t.opacity])):e.push(["fill",S])),e},renderFill:function(){return _(this.mapFill(this.srcElement.options.fill))},template:w("<path #= d.renderStyle() # #= d.renderOpacity() # #= kendo.util.renderAttr('d', d.renderData()) # #= d.renderStroke() # #= d.renderFill() # #= d.renderDefinitions() # #= d.renderTransform() #></path>")}),V=F.extend({renderData:function(){return this.printPath(this.srcElement.toPath())}}),N=F.extend({renderData:function(){var t,e,n=this.srcElement.paths;if(n.length>0){for(t=[],e=0;n.length>e;e++)t.push(this.printPath(n[e]));return t.join(" ")}}}),H=F.extend({geometryChange:function(){var t=this.center();this.attr("cx",t.x),this.attr("cy",t.y),this.attr("r",this.radius()),this.invalidate()},center:function(){return this.srcElement.geometry().center},radius:function(){return this.srcElement.geometry().radius},template:w("<circle #= d.renderStyle() # #= d.renderOpacity() # cx='#= d.center().x #' cy='#= d.center().y #' r='#= d.radius() #' #= d.renderStroke() # #= d.renderFill() # #= d.renderDefinitions() # #= d.renderTransform() # ></circle>")}),U=F.extend({geometryChange:function(){var t=this.pos();this.attr("x",t.x),this.attr("y",t.y),this.invalidate()},optionsChange:function(t){"font"===t.field?(this.attr("style",g.renderStyle(this.mapStyle())),this.geometryChange()):"content"===t.field&&F.fn.content.call(this,this.srcElement.content()),F.fn.optionsChange.call(this,t)},mapStyle:function(t){var e=F.fn.mapStyle.call(this,t),n=this.srcElement.options.font;return t&&(n=h.htmlEncode(n)),e.push(["font",n]),e},pos:function(){var t=this.srcElement.position(),e=this.srcElement.measure();return t.clone().setY(t.y+e.baseline)},renderContent:function(){var t=this.srcElement.content();return t=a(t),t=h.htmlEncode(t)},template:w("<text #= d.renderStyle() # #= d.renderOpacity() # x='#= this.pos().x #' y='#= this.pos().y #' #= d.renderStroke() # #= d.renderTransform() # #= d.renderDefinitions() # #= d.renderFill() #>#= d.renderContent() #</text>")}),j=F.extend({geometryChange:function(){this.allAttr(this.mapPosition()),this.invalidate()},optionsChange:function(t){"src"===t.field&&this.allAttr(this.mapSource()),F.fn.optionsChange.call(this,t)},mapPosition:function(){var t=this.srcElement.rect(),e=t.topLeft();return[["x",e.x],["y",e.y],["width",t.width()+"px"],["height",t.height()+"px"]]},renderPosition:function(){return _(this.mapPosition())},mapSource:function(t){var e=this.srcElement.src();return t&&(e=h.htmlEncode(e)),[["xlink:href",e]]},renderSource:function(){return _(this.mapSource(!0))},template:w("<image preserveAspectRatio='none' #= d.renderStyle() # #= d.renderTransform()# #= d.renderOpacity() # #= d.renderPosition() # #= d.renderSource() # #= d.renderDefinitions()#></image>")}),G=I.extend({template:w("<stop #=d.renderOffset()# #=d.renderStyle()# />"),renderOffset:function(){return y("offset",this.srcElement.offset())},mapStyle:function(){var t=this.srcElement;return[["stop-color",t.color()],["stop-opacity",t.opacity()]]},optionsChange:function(t){"offset"==t.field?this.attr(t.field,t.value):("color"==t.field||"opacity"==t.field)&&this.css("stop-"+t.field,t.value)}}),W=I.extend({init:function(t){I.fn.init.call(this,t),this.id=t.id,this.loadStops()},loadStops:function(){var t,e,n=this.srcElement,i=n.stops,o=this.element;for(e=0;i.length>e;e++)t=new G(i[e]),this.append(t),o&&t.attachTo(o)},optionsChange:function(t){"gradient.stops"==t.field?(p.fn.clear.call(this),this.loadStops()):t.field==C&&this.allAttr(this.mapCoordinates())},renderCoordinates:function(){return _(this.mapCoordinates())},mapSpace:function(){return["gradientUnits",this.srcElement.userSpace()?"userSpaceOnUse":"objectBoundingBox"]}}),q=W.extend({template:w("<linearGradient id='#=d.id#' #=d.renderCoordinates()#>#= d.renderChildren()#</linearGradient>"),mapCoordinates:function(){var t=this.srcElement,e=t.start(),n=t.end(),i=[["x1",e.x],["y1",e.y],["x2",n.x],["y2",n.y],this.mapSpace()];return i}}),$=W.extend({template:w("<radialGradient id='#=d.id#' #=d.renderCoordinates()#>#= d.renderChildren()#</radialGradient>"),mapCoordinates:function(){var t=this.srcElement,e=t.center(),n=t.radius(),i=[["cx",e.x],["cy",e.y],["r",n],this.mapSpace()];return i}}),Y=F.extend({geometryChange:function(){var t=this.srcElement.geometry();this.attr("x",t.origin.x),this.attr("y",t.origin.y),this.attr("width",t.size.width),this.attr("height",t.size.height),this.invalidate()},size:function(){return this.srcElement.geometry().size},origin:function(){return this.srcElement.geometry().origin},template:w("<rect #= d.renderStyle() # #= d.renderOpacity() # x='#= d.origin().x #' y='#= d.origin().y #' width='#= d.size().width #' height='#= d.size().height #'#= d.renderStroke() # #= d.renderFill() # #= d.renderDefinitions() # #= d.renderTransform() # />")}),X={Group:O,Text:U,Path:F,MultiPath:N,Circle:H,Arc:V,Image:j,Rect:Y},Q=function(t,e){t.innerHTML=e};!function(){var t="<svg xmlns='"+P+"'></svg>",e=c.createElement("div"),n=typeof DOMParser!=E;e.innerHTML=t,n&&e.firstChild.namespaceURI!=P&&(Q=function(t,e){var n=new DOMParser,i=n.parseFromString(e,"text/xml"),o=c.adoptNode(i.documentElement);t.innerHTML="",t.appendChild(o)})}(),a._element=document.createElement("span"),l={clip:"clip-path",fill:"fill"},h.support.svg=function(){return c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}(),h.support.svg&&f.SurfaceFactory.current.register("svg",B,10),u(f,{exportSVG:r,svg:{ArcNode:V,CircleNode:H,ClipNode:R,DefinitionNode:L,GradientStopNode:G,GroupNode:O,ImageNode:j,LinearGradientNode:q,MultiPathNode:N,Node:I,PathNode:F,RadialGradientNode:$,RectNode:Y,RootNode:z,Surface:B,TextNode:U,_exportGroup:o}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/canvas.min",["drawing/shapes.min","kendo.color.min"],t)}(function(){!function(t){function e(e,n){var i,o,r,s,a,l,c={width:"800px",height:"600px",cors:"Anonymous"},h=e.clippedBBox();return h&&(i=h.getOrigin(),o=new x.Group,o.transform(w.transform().translate(-i.x,-i.y)),o.children.push(e),e=o,r=h.getSize(),c.width=r.width+"px",c.height=r.height+"px"),n=p(c,n),s=t("<div />").css({display:"none",width:n.width,height:n.height}).appendTo(document.body),a=new A(s,n),a.draw(e),l=a.image(),l.always(function(){a.destroy(),s.remove()}),l}function n(t,e){var n,i,o;for(o=0;e.length>o;o++)i=e[o],n=f.parseColor(i.color()),n.a*=i.opacity(),t.addColorStop(i.offset(),n.toCssRgba())}var i,o,r,s,a,l,c,h,u,d=document,f=window.kendo,p=f.deepExtend,g=f.util,m=g.defined,v=g.isTransparent,y=g.renderTemplate,_=g.valueOrDefault,w=f.geometry,x=f.drawing,b=x.BaseNode,k="butt",C=x.DASH_ARRAYS,S=1e3/60,T="solid",A=x.Surface.extend({init:function(e,n){x.Surface.fn.init.call(this,e,n),this.element[0].innerHTML=this._template(this);var o=this.element[0].firstElementChild;o.width=t(e).width(),o.height=t(e).height(),this._rootElement=o,this._root=new i(o)},destroy:function(){x.Surface.fn.destroy.call(this),this._root&&(this._root.destroy(),this._root=null)},type:"canvas",draw:function(t){x.Surface.fn.draw.call(this,t),this._root.load([t],void 0,this.options.cors)},clear:function(){x.Surface.fn.clear.call(this),this._root.clear()},image:function(){var e,n=this._root,i=this._rootElement,o=[];return n.traverse(function(t){t.loading&&o.push(t.loading)}),e=t.Deferred(),t.when.apply(t,o).done(function(){n._invalidate();try{var t=i.toDataURL();e.resolve(t)}catch(o){e.reject(o)}}).fail(function(t){e.reject(t)}),e.promise()},_resize:function(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.invalidate()},_template:y("<canvas style='width: 100%; height: 100%;'></canvas>")}),D=b.extend({init:function(t){b.fn.init.call(this,t),t&&this.initClip()},initClip:function(){var t=this.srcElement.clip();t&&(this.clip=t,t.addObserver(this))},clear:function(){this.srcElement&&this.srcElement.removeObserver(this),this.clearClip(),b.fn.clear.call(this)},clearClip:function(){this.clip&&(this.clip.removeObserver(this),delete this.clip)},setClip:function(t){this.clip&&(t.beginPath(),o.fn.renderPoints(t,this.clip),t.clip())},optionsChange:function(t){"clip"==t.field&&(this.clearClip(),this.initClip()),b.fn.optionsChange.call(this,t)},setTransform:function(t){if(this.srcElement){var e=this.srcElement.transform();e&&t.transform.apply(t,e.matrix().toArray(6))}},loadElements:function(t,e,n){var i,o,r,s,a=this;for(s=0;t.length>s;s++)o=t[s],r=o.children,i=new u[o.nodeType](o,n),r&&r.length>0&&i.load(r,e,n),m(e)?a.insertAt(i,e):a.append(i)},load:function(t,e,n){this.loadElements(t,e,n),this.invalidate()},setOpacity:function(t){if(this.srcElement){var e=this.srcElement.opacity();m(e)&&this.globalAlpha(t,e)}},globalAlpha:function(t,e){e&&t.globalAlpha&&(e*=t.globalAlpha),t.globalAlpha=e},visible:function(){var t=this.srcElement;return!t||t&&t.options.visible!==!1}}),P=D.extend({renderTo:function(t){var e,n,i;if(this.visible()){for(t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),e=this.childNodes,n=0;e.length>n;n++)i=e[n],i.visible()&&i.renderTo(t);t.restore()}}});x.mixins.Traversable.extend(P.fn,"childNodes"),i=P.extend({init:function(e){P.fn.init.call(this),this.canvas=e,this.ctx=e.getContext("2d");var n=t.proxy(this._invalidate,this);this.invalidate=f.throttle(function(){f.animationFrame(n)},S)},destroy:function(){P.fn.destroy.call(this),this.canvas=null,this.ctx=null},load:function(t,e,n){this.loadElements(t,e,n),this._invalidate()},_invalidate:function(){this.ctx&&(this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx))}}),x.mixins.Traversable.extend(i.fn,"childNodes"),o=D.extend({renderTo:function(t){t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),t.beginPath(),this.renderPoints(t,this.srcElement),this.setLineDash(t),this.setLineCap(t),this.setLineJoin(t),this.setFill(t),this.setStroke(t),t.restore()},setFill:function(t){var e=this.srcElement.options.fill,n=!1;return e&&("gradient"==e.nodeType?(this.setGradientFill(t,e),n=!0):v(e.color)||(t.fillStyle=e.color,t.save(),this.globalAlpha(t,e.opacity),t.fill(),t.restore(),n=!0)),n},setGradientFill:function(t,e){var i,o,r,s,a=this.srcElement.rawBBox();e instanceof x.LinearGradient?(o=e.start(),r=e.end(),i=t.createLinearGradient(o.x,o.y,r.x,r.y)):e instanceof x.RadialGradient&&(s=e.center(),i=t.createRadialGradient(s.x,s.y,0,s.x,s.y,e.radius())),n(i,e.stops),t.save(),e.userSpace()||t.transform(a.width(),0,0,a.height(),a.origin.x,a.origin.y),t.fillStyle=i,t.fill(),t.restore()},setStroke:function(t){var e=this.srcElement.options.stroke;return e&&!v(e.color)&&e.width>0?(t.strokeStyle=e.color,t.lineWidth=_(e.width,1),t.save(),this.globalAlpha(t,e.opacity),t.stroke(),t.restore(),!0):void 0},dashType:function(){var t=this.srcElement.options.stroke;return t&&t.dashType?t.dashType.toLowerCase():void 0},setLineDash:function(t){var e,n=this.dashType();n&&n!=T&&(e=C[n],t.setLineDash?t.setLineDash(e):(t.mozDash=e,t.webkitLineDash=e))},setLineCap:function(t){var e=this.dashType(),n=this.srcElement.options.stroke;e&&e!==T?t.lineCap=k:n&&n.lineCap&&(t.lineCap=n.lineCap)},setLineJoin:function(t){var e=this.srcElement.options.stroke;e&&e.lineJoin&&(t.lineJoin=e.lineJoin)},renderPoints:function(t,e){var n,i,o,r,s,a,l=e.segments;if(0!==l.length){for(n=l[0],i=n.anchor(),t.moveTo(i.x,i.y),o=1;l.length>o;o++)n=l[o],i=n.anchor(),r=l[o-1],s=r.controlOut(),a=n.controlIn(),s&&a?t.bezierCurveTo(s.x,s.y,a.x,a.y,i.x,i.y):t.lineTo(i.x,i.y);e.options.closed&&t.closePath()}}}),r=o.extend({renderPoints:function(t){var e,n=this.srcElement.paths;for(e=0;n.length>e;e++)o.fn.renderPoints(t,n[e])}}),s=o.extend({renderPoints:function(t){var e=this.srcElement.geometry(),n=e.center,i=e.radius;t.arc(n.x,n.y,i,0,2*Math.PI)}}),a=o.extend({renderPoints:function(t){var e=this.srcElement.toPath();o.fn.renderPoints.call(this,t,e)}}),l=o.extend({renderTo:function(t){var e=this.srcElement,n=e.position(),i=e.measure();t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),t.beginPath(),t.font=e.options.font,this.setFill(t)&&t.fillText(e.content(),n.x,n.y+i.baseline),this.setStroke(t)&&(this.setLineDash(t),t.strokeText(e.content(),n.x,n.y+i.baseline)),t.restore()}}),c=o.extend({init:function(e,n){o.fn.init.call(this,e),this.onLoad=t.proxy(this.onLoad,this),this.onError=t.proxy(this.onError,this),this.loading=t.Deferred();var i=this.img=new Image;n&&!/^data:/i.test(e.src())&&(i.crossOrigin=n),i.src=e.src(),i.complete?this.onLoad():(i.onload=this.onLoad,i.onerror=this.onError)},renderTo:function(t){"resolved"===this.loading.state()&&(t.save(),this.setTransform(t),this.setClip(t),this.drawImage(t),t.restore())},optionsChange:function(e){"src"===e.field?(this.loading=t.Deferred(),this.img.src=this.srcElement.src()):o.fn.optionsChange.call(this,e)},onLoad:function(){this.loading.resolve(),this.invalidate()},onError:function(){this.loading.reject(Error("Unable to load image '"+this.img.src+"'. Check for connectivity and verify CORS headers."))},drawImage:function(t){var e=this.srcElement.rect(),n=e.topLeft();t.drawImage(this.img,n.x,n.y,e.width(),e.height())}}),h=o.extend({renderPoints:function(t){var e=this.srcElement.geometry(),n=e.origin,i=e.size;t.rect(n.x,n.y,i.width,i.height)}}),u={Group:P,Text:l,Path:o,MultiPath:r,Circle:s,Arc:a,Image:c,Rect:h},f.support.canvas=function(){return!!d.createElement("canvas").getContext}(),f.support.canvas&&x.SurfaceFactory.current.register("canvas",A,20),p(f.drawing,{exportImage:e,canvas:{ArcNode:a,CircleNode:s,GroupNode:P,ImageNode:c,MultiPathNode:r,Node:D,PathNode:o,RectNode:h,RootNode:i,Surface:A,TextNode:l}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/vml.min",["drawing/shapes.min","kendo.color.min"],t)}(function(){!function(t){function e(){if(u.namespaces&&!u.namespaces.kvml){u.namespaces.add("kvml","urn:schemas-microsoft-com:vml");var t=u.styleSheets.length>30?u.styleSheets[0]:u.createStyleSheet();t.addRule(".kvml","behavior:url(#default#VML)")}}function n(t){var e=u.createElement("kvml:"+t);return e.className="kvml",e}function i(t){var e,n=t.length,i=[];for(e=0;n>e;e++)i.push(t[e].scaleCopy(B).toString(0,","));return i.join(" ")}function o(t,e){var n,o,s,a,l,c=t.segments,h=c.length;if(h>0){for(n=[],l=1;h>l;l++)s=r(c[l-1],c[l]),s!==a&&(a=s,n.push(s)),n.push("l"===s?i([c[l].anchor()]):i([c[l-1].controlOut(),c[l].controlIn(),c[l].anchor()]));return o="m "+i([c[0].anchor()])+" "+n.join(" "),t.options.closed&&(o+=" x"),e!==!0&&(o+=" e"),o}}function r(t,e){return t.controlOut()&&e.controlIn()?"c":"l"}function s(t){return 0===t.indexOf("fill")||0===t.indexOf(z)}function a(t,e,n){var i,o=n*P(e.opacity(),1);return i=t?l(t,e.color(),o):l(e.color(),"#fff",1-o)}function l(t,e,n){var i=new k(t),o=new k(e),r=c(i.r,o.r,n),s=c(i.g,o.g,n),a=c(i.b,o.b,n);return new k(r,s,a).toHex()}function c(t,e,n){return d.round(n*e+(1-n)*t)}var h,u=document,d=Math,f=d.atan2,p=d.ceil,g=d.sqrt,m=window.kendo,v=m.deepExtend,y=t.noop,_=m.drawing,w=_.BaseNode,x=m.geometry,b=x.toMatrix,k=m.Color,C=m.util,S=C.isTransparent,T=C.defined,A=C.deg,D=C.round,P=C.valueOrDefault,M="none",E=".kendo",B=100,I=B*B,z="gradient",L=4,R=_.Surface.extend({init:function(t,n){_.Surface.fn.init.call(this,t,n),e(),this.element.empty(),this._root=new F,this._root.attachTo(this.element[0]),this.element.on("click"+E,this._click),this.element.on("mouseover"+E,this._mouseenter),this.element.on("mouseout"+E,this._mouseleave)},type:"vml",destroy:function(){this._root&&(this._root.destroy(),this._root=null,this.element.off(E)),_.Surface.fn.destroy.call(this)},draw:function(t){_.Surface.fn.draw.call(this,t),this._root.load([t],void 0,null)},clear:function(){_.Surface.fn.clear.call(this),this._root.clear()}}),O=w.extend({init:function(t){w.fn.init.call(this,t),this.createElement(),this.attachReference()},observe:y,destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),w.fn.destroy.call(this)},clear:function(){var t,e;for(this.element&&(this.element.innerHTML=""),t=this.childNodes,e=0;t.length>e;e++)t[e].destroy();this.childNodes=[]},removeSelf:function(){this.element&&(this.element.parentNode.removeChild(this.element),this.element=null),w.fn.removeSelf.call(this)},createElement:function(){this.element=u.createElement("div")},attachReference:function(){this.element._kendoNode=this},load:function(t,e,n,i){var o,r,s,a,l,c;for(i=P(i,1),this.srcElement&&(i*=P(this.srcElement.options.opacity,1)),o=0;t.length>o;o++)r=t[o],s=r.children,a=r.currentTransform(n),l=i*P(r.options.opacity,1),c=new lt[r.nodeType](r,a,l),s&&s.length>0&&c.load(s,e,a,i),T(e)?this.insertAt(c,e):this.append(c),c.attachTo(this.element,e)},attachTo:function(t,e){T(e)?t.insertBefore(this.element,t.children[e]||null):t.appendChild(this.element)},optionsChange:function(t){"visible"==t.field&&this.css("display",t.value!==!1?"":M)},setStyle:function(){this.allCss(this.mapStyle())},mapStyle:function(){var t=[];return this.srcElement&&this.srcElement.options.visible===!1&&t.push(["display",M]),t},mapOpacityTo:function(t,e){var n=P(this.opacity,1);n*=P(e,1),t.push(["opacity",n])},attr:function(t,e){this.element&&(this.element[t]=e)},allAttr:function(t){for(var e=0;t.length>e;e++)this.attr(t[e][0],t[e][1])},css:function(t,e){this.element&&(this.element.style[t]=e)},allCss:function(t){for(var e=0;t.length>e;e++)this.css(t[e][0],t[e][1])}}),F=O.extend({createElement:function(){O.fn.createElement.call(this),this.allCss([["width","100%"],["height","100%"],["position","relative"],["visibility","visible"]])},attachReference:y}),V=m.Class.extend({init:function(t,e){this.srcElement=t,this.observer=e,t.addObserver(this)},geometryChange:function(){this.observer.optionsChange({field:"clip",value:this.srcElement})},clear:function(){this.srcElement.removeObserver(this)}}),N=O.extend({init:function(t){O.fn.init.call(this,t),t&&this.initClip()},observe:function(){w.fn.observe.call(this)},mapStyle:function(){var t=O.fn.mapStyle.call(this);return this.srcElement&&this.srcElement.clip()&&t.push(["clip",this.clipRect()]),t},optionsChange:function(t){"clip"==t.field&&(this.clearClip(),this.initClip(),this.setClip()),O.fn.optionsChange.call(this,t)},clear:function(){this.clearClip(),O.fn.clear.call(this)},initClip:function(){this.srcElement.clip()&&(this.clip=new V(this.srcElement.clip(),this),this.clip.observer=this)},clearClip:function(){this.clip&&(this.clip.clear(),this.clip=null,this.css("clip",this.clipRect()))},setClip:function(){this.clip&&this.css("clip",this.clipRect())},clipRect:function(){var t,e,n,i=h,o=this.srcElement.clip();return o&&(t=this.clipBBox(o),e=t.topLeft(),n=t.bottomRight(),i=m.format("rect({0}px {1}px {2}px {3}px)",e.y,n.x,n.y,e.x)),i},clipBBox:function(t){var e=this.srcElement.rawBBox().topLeft(),n=t.rawBBox();return n.origin.translate(-e.x,-e.y),n}}),H=N.extend({createElement:function(){O.fn.createElement.call(this),this.setStyle()},attachTo:function(t,e){this.css("display",M),O.fn.attachTo.call(this,t,e),this.srcElement.options.visible!==!1&&this.css("display","")},_attachTo:function(t){var e=document.createDocumentFragment();e.appendChild(this.element),t.appendChild(e)},mapStyle:function(){var t=N.fn.mapStyle.call(this);return t.push(["position","absolute"]),t.push(["white-space","nowrap"]),t},optionsChange:function(t){"transform"===t.field&&this.refreshTransform(),"opacity"===t.field&&this.refreshOpacity(),N.fn.optionsChange.call(this,t)},refreshTransform:function(t){var e,n=this.srcElement.currentTransform(t),i=this.childNodes,o=i.length;for(this.setClip(),e=0;o>e;e++)i[e].refreshTransform(n)},currentOpacity:function(){var t=P(this.srcElement.options.opacity,1);return this.parent&&this.parent.currentOpacity&&(t*=this.parent.currentOpacity()),t},refreshOpacity:function(){var t,e=this.childNodes,n=e.length,i=this.currentOpacity();for(t=0;n>t;t++)e[t].refreshOpacity(i)},initClip:function(){if(N.fn.initClip.call(this),this.clip){var t=this.clip.srcElement.bbox(this.srcElement.currentTransform());t&&(this.css("width",t.width()+t.origin.x),this.css("height",t.height()+t.origin.y))}},clipBBox:function(t){return t.bbox(this.srcElement.currentTransform())},clearClip:function(){N.fn.clearClip.call(this)}}),U=O.extend({init:function(t,e){this.opacity=e,O.fn.init.call(this,t)},createElement:function(){this.element=n("stroke"),this.setOpacity()},optionsChange:function(t){0===t.field.indexOf("stroke")&&this.setStroke()},refreshOpacity:function(t){this.opacity=t,this.setStroke()},setStroke:function(){this.allAttr(this.mapStroke())},setOpacity:function(){this.setStroke()},mapStroke:function(){var t,e=this.srcElement.options.stroke,n=[];return e&&!S(e.color)&&0!==e.width?(n.push(["on","true"]),n.push(["color",e.color]),n.push(["weight",(e.width||1)+"px"]),this.mapOpacityTo(n,e.opacity),T(e.dashType)&&n.push(["dashstyle",e.dashType]),T(e.lineJoin)&&n.push(["joinstyle",e.lineJoin]),T(e.lineCap)&&(t=e.lineCap.toLowerCase(),"butt"===t&&(t="butt"===t?"flat":t),n.push(["endcap",t]))):n.push(["on","false"]),n}}),j=O.extend({init:function(t,e,n){this.opacity=n,O.fn.init.call(this,t)},createElement:function(){this.element=n("fill"),this.setFill()},optionsChange:function(t){s(t.field)&&this.setFill()},refreshOpacity:function(t){this.opacity=t,this.setOpacity()},setFill:function(){this.allAttr(this.mapFill())},setOpacity:function(){this.setFill()},attr:function(t,e){var n,i=this.element;if(i){for(n=t.split(".");n.length>1;)i=i[n.shift()];i[n[0]]=e}},mapFill:function(){var t=this.srcElement.fill(),e=[["on","false"]];return t&&(t.nodeType==z?e=this.mapGradient(t):S(t.color)||(e=this.mapFillColor(t))),e},mapFillColor:function(t){var e=[["on","true"],["color",t.color]];return this.mapOpacityTo(e,t.opacity),e},mapGradient:function(t){var e,n=this.srcElement.options,i=n.fallbackFill||t.fallbackFill&&t.fallbackFill();return e=t instanceof _.LinearGradient?this.mapLinearGradient(t):t instanceof _.RadialGradient&&t.supportVML?this.mapRadialGradient(t):i?this.mapFillColor(i):[["on","false"]]},mapLinearGradient:function(t){var e=t.start(),n=t.end(),i=C.deg(f(n.y-e.y,n.x-e.x)),o=[["on","true"],["type",z],["focus",0],["method","none"],["angle",270-i]];return this.addColors(o),o},mapRadialGradient:function(t){var e=this.srcElement.rawBBox(),n=t.center(),i=(n.x-e.origin.x)/e.width(),o=(n.y-e.origin.y)/e.height(),r=[["on","true"],["type","gradienttitle"],["focus","100%"],["focusposition",i+" "+o],["method","none"]];return this.addColors(r),r},addColors:function(t){var e,n,i=this.srcElement.options,o=P(this.opacity,1),r=[],s=i.fill.stops,l=i.baseColor,c=this.element.colors?"colors.value":"colors",h=a(l,s[0],o),u=a(l,s[s.length-1],o);for(n=0;s.length>n;n++)e=s[n],r.push(d.round(100*e.offset())+"% "+a(l,e,o));t.push([c,r.join(",")],["color",h],["color2",u])}}),G=O.extend({init:function(t,e){this.transform=e,O.fn.init.call(this,t)},createElement:function(){this.element=n("skew"),this.setTransform()},optionsChange:function(t){"transform"===t.field&&this.refresh(this.srcElement.currentTransform())},refresh:function(t){this.transform=t,this.setTransform()},transformOrigin:function(){return"-0.5,-0.5"},setTransform:function(){this.allAttr(this.mapTransform())},mapTransform:function(){var t=this.transform,e=[],n=b(t);return n?(n.round(L),e.push(["on","true"],["matrix",[n.a,n.c,n.b,n.d,0,0].join(",")],["offset",n.e+"px,"+n.f+"px"],["origin",this.transformOrigin()])):e.push(["on","false"]),e}}),W=N.extend({init:function(t,e,n){this.fill=this.createFillNode(t,e,n),
this.stroke=new U(t,n),this.transform=this.createTransformNode(t,e),N.fn.init.call(this,t)},attachTo:function(t,e){this.fill.attachTo(this.element),this.stroke.attachTo(this.element),this.transform.attachTo(this.element),O.fn.attachTo.call(this,t,e)},createFillNode:function(t,e,n){return new j(t,e,n)},createTransformNode:function(t,e){return new G(t,e)},createElement:function(){this.element=n("shape"),this.setCoordsize(),this.setStyle()},optionsChange:function(t){s(t.field)?this.fill.optionsChange(t):0===t.field.indexOf("stroke")?this.stroke.optionsChange(t):"transform"===t.field?this.transform.optionsChange(t):"opacity"===t.field&&(this.fill.setOpacity(),this.stroke.setOpacity()),N.fn.optionsChange.call(this,t)},refreshTransform:function(t){this.transform.refresh(this.srcElement.currentTransform(t))},refreshOpacity:function(t){t*=P(this.srcElement.options.opacity,1),this.fill.refreshOpacity(t),this.stroke.refreshOpacity(t)},mapStyle:function(t,e){var n,i=N.fn.mapStyle.call(this);return t&&e||(t=e=B),i.push(["position","absolute"],["width",t+"px"],["height",e+"px"]),n=this.srcElement.options.cursor,n&&i.push(["cursor",n]),i},setCoordsize:function(){this.allAttr([["coordorigin","0 0"],["coordsize",I+" "+I]])}}),q=O.extend({createElement:function(){this.element=n("path"),this.setPathData()},geometryChange:function(){this.setPathData()},setPathData:function(){this.attr("v",this.renderData())},renderData:function(){return o(this.srcElement)}}),$=W.extend({init:function(t,e,n){this.pathData=this.createDataNode(t),W.fn.init.call(this,t,e,n)},attachTo:function(t,e){this.pathData.attachTo(this.element),W.fn.attachTo.call(this,t,e)},createDataNode:function(t){return new q(t)},geometryChange:function(){this.pathData.geometryChange(),W.fn.geometryChange.call(this)}}),Y=q.extend({renderData:function(){var t,e,n,i=this.srcElement.paths;if(i.length>0){for(t=[],e=0;i.length>e;e++)n=i.length-1>e,t.push(o(i[e],n));return t.join(" ")}}}),X=$.extend({createDataNode:function(t){return new Y(t)}}),Q=G.extend({transformOrigin:function(){var t=this.srcElement.geometry().bbox(),e=t.center(),n=-p(e.x)/p(t.width()),i=-p(e.y)/p(t.height());return n+","+i}}),K=W.extend({createElement:function(){this.element=n("oval"),this.setStyle()},createTransformNode:function(t,e){return new Q(t,e)},geometryChange:function(){W.fn.geometryChange.call(this),this.setStyle(),this.refreshTransform()},mapStyle:function(){var t=this.srcElement.geometry(),e=t.radius,n=t.center,i=p(2*e),o=W.fn.mapStyle.call(this,i,i);return o.push(["left",p(n.x-e)+"px"],["top",p(n.y-e)+"px"]),o}}),Z=q.extend({renderData:function(){return o(this.srcElement.toPath())}}),J=$.extend({createDataNode:function(t){return new Z(t)}}),tt=q.extend({createElement:function(){q.fn.createElement.call(this),this.attr("textpathok",!0)},renderData:function(){var t=this.srcElement.rect(),e=t.center();return"m "+i([new x.Point(t.topLeft().x,e.y)])+" l "+i([new x.Point(t.bottomRight().x,e.y)])}}),et=O.extend({createElement:function(){this.element=n("textpath"),this.attr("on",!0),this.attr("fitpath",!1),this.setStyle(),this.setString()},optionsChange:function(t){"content"===t.field?this.setString():this.setStyle(),O.fn.optionsChange.call(this,t)},mapStyle:function(){return[["font",this.srcElement.options.font]]},setString:function(){this.attr("string",this.srcElement.content())}}),nt=$.extend({init:function(t,e,n){this.path=new et(t),$.fn.init.call(this,t,e,n)},createDataNode:function(t){return new tt(t)},attachTo:function(t,e){this.path.attachTo(this.element),$.fn.attachTo.call(this,t,e)},optionsChange:function(t){("font"===t.field||"content"===t.field)&&(this.path.optionsChange(t),this.pathData.geometryChange(t)),$.fn.optionsChange.call(this,t)}}),it=q.extend({renderData:function(){var t=this.srcElement.rect(),e=(new _.Path).moveTo(t.topLeft()).lineTo(t.topRight()).lineTo(t.bottomRight()).lineTo(t.bottomLeft()).close();return o(e)}}),ot=G.extend({init:function(t,e,n){this.opacity=n,G.fn.init.call(this,t,e)},createElement:function(){this.element=n("fill"),this.attr("type","frame"),this.attr("rotate",!0),this.setOpacity(),this.setSrc(),this.setTransform()},optionsChange:function(t){"src"===t.field&&this.setSrc(),G.fn.optionsChange.call(this,t)},geometryChange:function(){this.refresh()},refreshOpacity:function(t){this.opacity=t,this.setOpacity()},setOpacity:function(){var t=[];this.mapOpacityTo(t,this.srcElement.options.opacity),this.allAttr(t)},setSrc:function(){this.attr("src",this.srcElement.src())},mapTransform:function(){var t,e,n,i,o,r,s,a,l=this.srcElement,c=l.rawBBox(),h=c.center(),u=B/2,d=B,p=c.width()/d,m=c.height()/d,v=0,y=this.transform;return y?(n=b(y),i=g(n.a*n.a+n.b*n.b),o=g(n.c*n.c+n.d*n.d),p*=i,m*=o,r=A(f(n.b,n.d)),s=A(f(-n.c,n.a)),v=(r+s)/2,0!==v?(a=l.bbox().center(),t=(a.x-u)/d,e=(a.y-u)/d):(t=(h.x*i+n.e-u)/d,e=(h.y*o+n.f-u)/d)):(t=(h.x-u)/d,e=(h.y-u)/d),p=D(p,L),m=D(m,L),t=D(t,L),e=D(e,L),v=D(v,L),[["size",p+","+m],["position",t+","+e],["angle",v]]}}),rt=$.extend({createFillNode:function(t,e,n){return new ot(t,e,n)},createDataNode:function(t){return new it(t)},optionsChange:function(t){("src"===t.field||"transform"===t.field)&&this.fill.optionsChange(t),$.fn.optionsChange.call(this,t)},geometryChange:function(){this.fill.geometryChange(),$.fn.geometryChange.call(this)},refreshTransform:function(t){$.fn.refreshTransform.call(this,t),this.fill.refresh(this.srcElement.currentTransform(t))}}),st=q.extend({renderData:function(){var t=this.srcElement.geometry(),e=["m",i([t.topLeft()]),"l",i([t.topRight(),t.bottomRight(),t.bottomLeft()]),"x e"];return e.join(" ")}}),at=$.extend({createDataNode:function(t){return new st(t)}}),lt={Group:H,Text:nt,Path:$,MultiPath:X,Circle:K,Arc:J,Image:rt,Rect:at};m.support.vml=function(){var t=m.support.browser;return t.msie&&9>t.version}(),h="inherit",m.support.browser.msie&&8>m.support.browser.version&&(h="rect(auto auto auto auto)"),m.support.vml&&_.SurfaceFactory.current.register("vml",R,30),v(_,{vml:{ArcDataNode:Z,ArcNode:J,CircleTransformNode:Q,CircleNode:K,FillNode:j,GroupNode:H,ImageNode:rt,ImageFillNode:ot,ImagePathDataNode:it,MultiPathDataNode:Y,MultiPathNode:X,Node:O,PathDataNode:q,PathNode:$,RectDataNode:st,RectNode:at,RootNode:F,StrokeNode:U,Surface:R,TextNode:nt,TextPathNode:et,TextPathDataNode:tt,TransformNode:G}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/html.min",["kendo.color.min","drawing/shapes.min","util/main.min","util/text-metrics"],t)}(function(){!function(t,e,n){"use strict";function i(n,i){function r(e){var n=new st.Group,o=e.getBoundingClientRect();return E(n,[1,0,0,1,-o.left,-o.top]),ft._clipbox=!1,ft._matrix=at.Matrix.unit(),ft._stackingContext={element:e,group:n},ft._avoidLinks=i.avoidLinks===!0?"a":i.avoidLinks,t(e).addClass("k-pdf-export"),tt(e,n),t(e).removeClass("k-pdf-export"),n}function s(e){return null!=e?("string"==typeof e&&(e=kendo.template(e.replace(/^\s+|\s+$/g,""))),"function"==typeof e?function(n){var i=e(n);return i?t(i)[0]:void 0}:function(){return t(e).clone()[0]}):void 0}function a(e){var n,i,o,r,s=e.cloneNode(!1);if(1==e.nodeType){n=t(e),i=t(s),r=n.data();for(o in r)i.data(o,r[o]);if(/^canvas$/i.test(e.tagName))s.getContext("2d").drawImage(e,0,0);else for(o=e.firstChild;o;o=o.nextSibling)s.appendChild(a(o))}return s}function l(n,i,o,r,l,c,h){function u(){function t(){setTimeout(function(){n({pages:k,container:S})},10)}var e,i;("-"!=o||l)&&f(C),e=m(),C.parentNode.insertBefore(e,C),e.appendChild(C),x?(i=k.length,k.forEach(function(e,n){var o=x({element:e,pageNum:n+1,totalPages:k.length});o&&(e.appendChild(o),d(o,function(){0===--i&&t()}))})):t()}function f(n){var i,r,s,a,c=_(n),h=e(w(c,"padding-bottom")),u=e(w(c,"border-bottom-width")),d=T;for(T+=h+u,i=!0,r=n.firstChild;r;r=r.nextSibling)if(1==r.nodeType){if(i=!1,s=t(r),s.is(o)){g(r);continue}if(!l){f(r);continue}if(!/^(?:static|relative)$/.test(w(_(r),"position")))continue;a=v(r),1==a?g(r):a&&(s.data("kendoChart")||/^(?:img|tr|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(r.tagName))?g(r):f(r)}else 3==r.nodeType&&l&&(y(r,i),i=!1);T=d}function p(t){var e=t.parentNode,n=e.firstChild;if(t===n)return!0;if(t===e.children[0]){if(7==n.nodeType||8==n.nodeType)return!0;if(3==n.nodeType)return!/\S/.test(n.data)}return!1}function g(e){var n,i,o;return 1==e.nodeType&&e!==C&&p(e)?g(e.parentNode):(n=t(e).closest("table").find("colgroup"),i=m(),o=b.createRange(),o.setStartBefore(C),o.setEndBefore(e),i.appendChild(o.extractContents()),C.parentNode.insertBefore(i,C),void(n[0]&&n.clone().prependTo(t(e).closest("table"))))}function m(){var e=b.createElement("KENDO-PDF-PAGE");return t(e).css({display:"block",boxSizing:"content-box",width:r||"auto",padding:c.top+"px "+c.right+"px "+c.bottom+"px "+c.left+"px",position:"relative",height:l||"auto",overflow:l||r?"hidden":"visible",clear:"both"}),h&&h.pageClassName&&(e.className=h.pageClassName),k.push(e),e}function v(t){var e,n,i=t.getBoundingClientRect();return 0===i.width||0===i.height?0:(e=C.getBoundingClientRect().top,n=l-T,i.height>n?3:i.top-e>n?1:i.bottom-e>n?2:0)}function y(t,e){var n,i,o,r,s;/\S/.test(t.data)&&(n=t.data.length,i=b.createRange(),i.selectNodeContents(t),o=v(i),o&&(r=t,1==o?g(e?t.parentNode:t):(!function a(e,n,o){return i.setEnd(t,n),e==n||n==o?n:v(i)?a(e,e+n>>1,n):a(n,n+o>>1,o)}(0,n>>1,n),!/\S/.test(""+i)&&e?g(t.parentNode):(r=t.splitText(i.endOffset),s=m(),i.setStartBefore(C),s.appendChild(i.extractContents()),C.parentNode.insertBefore(s,C))),y(r)))}var x=s(h.template),b=i.ownerDocument,k=[],C=a(i),S=b.createElement("KENDO-PDF-DOCUMENT"),T=0;t(C).find("tfoot").each(function(){this.parentNode.appendChild(this)}),t(C).find("ol").each(function(){t(this).children().each(function(t){this.setAttribute("kendo-split-index",t)})}),t(S).css({display:"block",position:"absolute",boxSizing:"content-box",left:"-10000px",top:"-10000px"}),r&&(t(S).css({width:r,paddingLeft:c.left,paddingRight:c.right}),t(C).css({overflow:"hidden"})),S.appendChild(C),i.parentNode.insertBefore(S,i),h.beforePageBreak?setTimeout(function(){h.beforePageBreak(S,u)},15):setTimeout(u,15)}i||(i={});var c=t.Deferred();if(n=t(n)[0],!n)return c.reject("No element to export");if("function"!=typeof window.getComputedStyle)throw Error("window.getComputedStyle is missing. You are using an unsupported browser, or running in IE8 compatibility mode. Drawing HTML is supported in Chrome, Firefox, Safari and IE9+.");return kendo.pdf&&kendo.pdf.defineFont(o(n.ownerDocument)),d(n,function(){var t,e=i&&i.forcePageBreak,o=i&&i.paperSize&&"auto"!=i.paperSize,s=o&&kendo.pdf.getPaperOptions(function(t,e){return t in i?i[t]:e}),a=o&&s.paperSize[0],h=o&&s.paperSize[1],u=i.margin&&s.margin;e||h?(u||(u={left:0,top:0,right:0,bottom:0}),t=new st.Group({pdf:{multiPage:!0,paperSize:o?s.paperSize:"auto"}}),l(function(e){if(i.progress){var n=!1,o=0;!function s(){e.pages.length>o?(t.append(r(e.pages[o])),i.progress({pageNum:++o,totalPages:e.pages.length,cancel:function(){n=!0}}),n?e.container.parentNode.removeChild(e.container):setTimeout(s)):(e.container.parentNode.removeChild(e.container),c.resolve(t))}()}else e.pages.forEach(function(e){t.append(r(e))}),e.container.parentNode.removeChild(e.container),c.resolve(t)},n,e,a?a-u.left-u.right:null,h?h-u.top-u.bottom:null,u,i)):c.resolve(r(n))}),c.promise()}function o(t){function e(t){if(t){var e=null;try{e=t.cssRules}catch(n){}e&&i(t,e)}}function n(t){var e,n=w(t.style,"src");return n?ot(n).reduce(function(t,e){var n=rt(e);return n&&t.push(n),t},[]):(e=rt(t.cssText),e?[e]:[])}function i(t,i){var r,s,a,l,c,h,u;for(r=0;i.length>r;++r)switch(s=i[r],s.type){case 3:e(s.styleSheet);break;case 5:a=s.style,l=ot(w(a,"font-family")),c=/^([56789]00|bold)$/i.test(w(a,"font-weight")),h="italic"==w(a,"font-style"),u=n(s),u.length>0&&o(t,l,c,h,u[0])}}function o(t,e,n,i,o){/^data:/i.test(o)||/^[^\/:]+:\/\//.test(o)||/^\//.test(o)||(o=(t.href+"").replace(/[^\/]*$/,"")+o),e.forEach(function(t){t=t.replace(/^(['"]?)(.*?)\1$/,"$2"),n&&(t+="|bold"),i&&(t+="|italic"),r[t]=o})}var r,s;for(null==t&&(t=document),r={},s=0;t.styleSheets.length>s;++s)e(t.styleSheets[s]);return r}function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function s(t){return t="_counter_"+t,ft[t]}function a(t){var e=[],n=ft;for(t="_counter_"+t;n;)r(n,t)&&e.push(n[t]),n=Object.getPrototypeOf(n);return e.reverse()}function l(t,e){var n=ft;for(t="_counter_"+t;n&&!r(n,t);)n=Object.getPrototypeOf(n);n||(n=ft._root),n[t]=(n[t]||0)+(null==e?1:e)}function c(t,e){t="_counter_"+t,ft[t]=null==e?0:e}function h(t,n,i){var o,r,s;for(o=0;t.length>o;)r=t[o++],s=e(t[o]),isNaN(s)?n(r,i):(n(r,s),++o)}function u(t,e){var n=kendo.parseColor(t);return n&&(n=n.toRGB(),e?n=n.toCssRgba():0===n.a&&(n=null)),n}function d(t,e){function n(t){dt[t]||(dt[t]=!0,r.push(t))}function i(){--o<=0&&e()}var o,r=[];!function s(t){/^img$/i.test(t.tagName)&&n(t.src),it(w(_(t),"background-image")).forEach(function(t){"url"==t.type&&n(t.url)}),t.children&<.call(t.children).forEach(s)}(t),o=r.length,0===o&&i(),r.forEach(function(t){var e=dt[t]=new Image;/^data:/i.test(t)||(e.crossOrigin="Anonymous"),e.src=t,e.complete?i():(e.onload=i,e.onerror=function(){dt[t]=null,i()})})}function f(t){var e,i="";do e=t%26,i=String.fromCharCode(97+e)+i,t=n.floor(t/26);while(t>0);return i}function p(t,e,n){var i,o;ft=Object.create(ft),ft[t.tagName.toLowerCase()]={element:t,style:e},i=w(e,"text-decoration"),i&&"none"!=i&&(o=w(e,"color"),i.split(/\s+/g).forEach(function(t){ft[t]||(ft[t]=o)})),y(e)&&(ft._stackingContext={element:t,group:n})}function g(){ft=Object.getPrototypeOf(ft)}function m(t){if(null!=ft._clipbox){var e=t.bbox(ft._matrix);ft._clipbox=ft._clipbox?at.Rect.intersect(ft._clipbox,e):e}}function v(){var t=ft._clipbox;return null==t?!0:t?0===t.width()||0===t.height():void 0}function y(t){function e(e){return w(t,e)}return"none"!=e("transform")||"static"!=e("position")&&"auto"!=e("z-index")||e("opacity")<1?!0:void 0}function _(t,e){return window.getComputedStyle(t,e||null)}function w(t,e){return t.getPropertyValue(e)||ct.webkit&&t.getPropertyValue("-webkit-"+e)||ct.mozilla&&t.getPropertyValue("-moz-"+e)||ct.opera&&t.getPropertyValue("-o-"+e)||ct.msie&&t.getPropertyValue("-ms-"+e)}function x(t,e,n,i){t.setProperty(e,n,i),ct.webkit?t.setProperty("-webkit-"+e,n,i):ct.mozilla?t.setProperty("-moz-"+e,n,i):ct.opera?t.setProperty("-o-"+e,n,i):ct.msie&&(t.setProperty("-ms-"+e,n,i),e="ms"+e.replace(/(^|-)([a-z])/g,function(t,e,n){return e+n.toUpperCase()}),t[e]=n)}function b(t){var e,n,i,o;if((ct.msie||ct.chrome)&&(e=t.getClientRects(),i=0,3>=e.length)){for(o=0;e.length>o;++o)1>=e[o].width?i++:n=e[o];if(i==e.length-1)return n}return t.getBoundingClientRect()}function k(t,n){return n="border-"+n,{width:e(w(t,n+"-width")),style:w(t,n+"-style"),color:u(w(t,n+"-color"),!0)}}function C(t,e){var n=t.style.cssText,i=e();return t.style.cssText=n,i}function S(t,n){var i=w(t,"border-"+n+"-radius").split(/\s+/g).map(e);return 1==i.length&&i.push(i[0]),z({x:i[0],y:i[1]})}function T(t){var e=t.getBoundingClientRect();return e=A(e,"border-*-width",t),e=A(e,"padding-*",t)}function A(t,n,i){var o,r,s,a,l;return"string"==typeof n?(o=_(i),r=e(w(o,n.replace("*","top"))),s=e(w(o,n.replace("*","right"))),a=e(w(o,n.replace("*","bottom"))),l=e(w(o,n.replace("*","left")))):"number"==typeof n&&(r=s=a=l=n),{top:t.top+r,right:t.right-s,bottom:t.bottom-a,left:t.left+l,width:t.right-t.left-s-l,height:t.bottom-t.top-a-r}}function D(t){var n,i,o=w(t,"transform");return"none"==o?null:(n=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(o),n?(i=w(t,"transform-origin"),n=n[1].split(/\s*,\s*/g).map(e),i=i.split(/\s+/g).map(e),{matrix:n,origin:i}):void 0)}function P(t){return 180*t/n.PI%360}function M(t){var i=e(t);return/grad$/.test(t)?n.PI*i/200:/rad$/.test(t)?i:/turn$/.test(t)?n.PI*i*2:/deg$/.test(t)?n.PI*i/180:void 0}function E(t,e){return e=new at.Matrix(e[0],e[1],e[2],e[3],e[4],e[5]),t.transform(e),e}function B(t,e){t.clip(e)}function I(t,e,n,i){for(var o=new at.Arc([e,n],i).curvePoints(),r=1;o.length>r;)t.curveTo(o[r++],o[r++],o[r++])}function z(t){return(0>=t.x||0>=t.y)&&(t.x=t.y=0),t}function L(t,e,i,o,r){var s=n.max(0,e.x),a=n.max(0,e.y),l=n.max(0,i.x),c=n.max(0,i.y),h=n.max(0,o.x),u=n.max(0,o.y),d=n.max(0,r.x),f=n.max(0,r.y),p=n.min(t.width/(s+l),t.height/(c+u),t.width/(h+d),t.height/(f+a));return 1>p&&(s*=p,a*=p,l*=p,c*=p,h*=p,u*=p,d*=p,f*=p),{tl:{x:s,y:a},tr:{x:l,y:c},br:{x:h,y:u},bl:{x:d,y:f}}}function R(t,n,i){var o,r,s,a,l,c,h,u,d=_(t),f=S(d,"top-left"),p=S(d,"top-right"),g=S(d,"bottom-left"),m=S(d,"bottom-right");return("padding"==i||"content"==i)&&(o=k(d,"top"),r=k(d,"right"),s=k(d,"bottom"),a=k(d,"left"),f.x-=a.width,f.y-=o.width,p.x-=r.width,p.y-=o.width,m.x-=r.width,m.y-=s.width,g.x-=a.width,g.y-=s.width,"content"==i&&(l=e(w(d,"padding-top")),c=e(w(d,"padding-right")),h=e(w(d,"padding-bottom")),u=e(w(d,"padding-left")),f.x-=u,f.y-=l,p.x-=c,p.y-=l,m.x-=c,m.y-=h,g.x-=u,g.y-=h)),"number"==typeof i&&(f.x-=i,f.y-=i,p.x-=i,p.y-=i,m.x-=i,m.y-=i,g.x-=i,g.y-=i),O(n,f,p,m,g)}function O(t,e,n,i,o){var r=L(t,e,n,i,o),s=r.tl,a=r.tr,l=r.br,c=r.bl,h=new st.Path({fill:null,stroke:null});return h.moveTo(t.left,t.top+s.y),s.x&&I(h,t.left+s.x,t.top+s.y,{startAngle:-180,endAngle:-90,radiusX:s.x,radiusY:s.y}),h.lineTo(t.right-a.x,t.top),a.x&&I(h,t.right-a.x,t.top+a.y,{startAngle:-90,endAngle:0,radiusX:a.x,radiusY:a.y}),h.lineTo(t.right,t.bottom-l.y),l.x&&I(h,t.right-l.x,t.bottom-l.y,{startAngle:0,endAngle:90,radiusX:l.x,radiusY:l.y}),h.lineTo(t.left+c.x,t.bottom),c.x&&I(h,t.left+c.x,t.bottom-c.y,{startAngle:90,endAngle:180,radiusX:c.x,radiusY:c.y}),h.close()}function F(t,n){var i=e(t)+"";switch(n){case"decimal-leading-zero":return 2>i.length&&(i="0"+i),i;case"lower-roman":return ht(t).toLowerCase();case"upper-roman":return ht(t).toUpperCase();case"lower-latin":case"lower-alpha":return f(t-1);case"upper-latin":case"upper-alpha":return f(t-1).toUpperCase();default:return i}}function V(t,e){function n(t,e,n){return n?(n=n.replace(/^\s*(["'])(.*)\1\s*$/,"$2"),a(t).map(function(t){return F(t,e)}).join(n)):F(s(t)||0,e)}var i,o=ot(e,/^\s+/),r=[];return o.forEach(function(e){var o;(i=/^\s*(["'])(.*)\1\s*$/.exec(e))?r.push(i[2].replace(/\\([0-9a-f]{4})/gi,function(t,e){return String.fromCharCode(parseInt(e,16))})):(i=/^\s*counter\((.*?)\)\s*$/.exec(e))?(o=ot(i[1]),r.push(n(o[0],o[1]))):(i=/^\s*counters\((.*?)\)\s*$/.exec(e))?(o=ot(i[1]),r.push(n(o[0],o[2],o[1]))):r.push((i=/^\s*attr\((.*?)\)\s*$/.exec(e))?t.getAttribute(i[1])||"":e)}),r.join("")}function N(t){var e,n;if(t.cssText)return t.cssText;for(e=[],n=0;t.length>n;++n)e.push(t[n]+": "+w(t,t[n]));return e.join(";\n")}function H(t,n){function i(n,i){var r,s=_(t,n);s.content&&"normal"!=s.content&&"none"!=s.content&&"0px"!=s.width&&(r=t.ownerDocument.createElement(ut),r.style.cssText=N(s),r.textContent=V(t,s.content),t.insertBefore(r,i),":before"!=n||/absolute|fixed/.test(w(r.style,"position"))||(r.style.marginLeft=e(w(r.style,"margin-left"))-r.offsetWidth+"px"),o.push(r))}if(t.tagName==ut)return void U(t,n);var o=[];i(":before",t.firstChild),i(":after",null),U(t,n),o.forEach(function(e){t.removeChild(e)})}function U(i,o){function r(t){var e,n,o,r,s,a;if(/^td$/i.test(i.tagName)&&(e=ft.table,e&&"collapse"==w(e.style,"border-collapse"))){if(n=k(e.style,"left").width,o=k(e.style,"top").width,0===n&&0===o)return t;if(r=e.element.getBoundingClientRect(),s=e.element.rows[0].cells[0],a=s.getBoundingClientRect(),a.top==r.top||a.left==r.left)return lt.call(t).map(function(t){return{left:t.left+n,top:t.top+o,right:t.right+n,bottom:t.bottom+o,height:t.height,width:t.width}})}return t}function s(t,e,i,r,s,a,l,c){function h(e,o,r){var s=n.PI/2*e/(e+i),a={x:o.x-e,y:o.y-i},l=new st.Path({fill:{color:t},stroke:null}).moveTo(0,0);E(l,r),I(l,0,o.y,{startAngle:-90,endAngle:-P(s),radiusX:o.x,radiusY:o.y}),a.x>0&&a.y>0?(l.lineTo(a.x*n.cos(s),o.y-a.y*n.sin(s)),I(l,0,o.y,{startAngle:-P(s),endAngle:-90,radiusX:a.x,radiusY:a.y,anticlockwise:!0})):a.x>0?l.lineTo(a.x,i).lineTo(0,i):l.lineTo(a.x,i).lineTo(a.x,0),d.append(l.close())}if(!(0>=i)){var u,d=new st.Group;E(d,c),o.append(d),z(a),z(l),u=new st.Path({fill:{color:t},stroke:null}),d.append(u),u.moveTo(a.x?n.max(a.x,r):0,0).lineTo(e-(l.x?n.max(l.x,s):0),0).lineTo(e-n.max(l.x,s),i).lineTo(n.max(a.x,r),i).close(),a.x&&h(r,a,[-1,0,0,1,a.x,0]),l.x&&h(s,l,[1,0,0,1,e-l.x,0])}}function a(e){var n,r,s=new st.Group;for(B(s,O(e,W,q,X,Y)),o.append(s),"A"==i.tagName&&i.href&&!/^#?$/.test(t(i).attr("href"))&&(ft._avoidLinks&&t(i).is(ft._avoidLinks)||(s._pdfLink={url:i.href,top:e.top,right:e.right,bottom:e.bottom,left:e.left})),Z&&(n=new st.Path({fill:{color:Z.toCssRgba()},stroke:null}),n.moveTo(e.left,e.top).lineTo(e.right,e.top).lineTo(e.right,e.bottom).lineTo(e.left,e.bottom).close(),s.append(n)),r=d.length;--r>=0;)l(s,e,d[r],p[r%p.length],g[r%g.length],v[r%v.length],y[r%y.length])}function l(t,n,o,r,s,a,l){function c(t,n,o,c,h){function u(){for(;m.origin.x>n.left;)m.origin.x-=o}function d(){for(;m.origin.y>n.top;)m.origin.y-=c}function f(){for(;n.right>m.origin.x;)h(t,m.clone()),m.origin.x+=o}var p,g,m,v,y=o/c,_=n;if("content-box"==a?(_=A(_,"border-*-width",i),_=A(_,"padding-*",i)):"padding-box"==a&&(_=A(_,"border-*-width",i)),/^\s*auto(\s+auto)?\s*$/.test(l)||(p=l.split(/\s+/g),o=/%$/.test(p[0])?_.width*e(p[0])/100:e(p[0]),c=1==p.length||"auto"==p[1]?o/y:/%$/.test(p[1])?_.height*e(p[1])/100:e(p[1])),g=(s+"").split(/\s+/),1==g.length&&(g[1]="50%"),g[0]=/%$/.test(g[0])?e(g[0])/100*(_.width-o):e(g[0]),g[1]=/%$/.test(g[1])?e(g[1])/100*(_.height-c):e(g[1]),m=new at.Rect([_.left+g[0],_.top+g[1]],[o,c]),"no-repeat"==r)h(t,m);else if("repeat-x"==r)u(),f();else if("repeat-y"==r)for(d();n.bottom>m.origin.y;)h(t,m.clone()),m.origin.y+=c;else if("repeat"==r)for(u(),d(),v=m.origin.clone();n.bottom>m.origin.y;)m.origin.x=v.x,f(),m.origin.y+=c}if(o&&"none"!=o)if("url"==o.type){if(/^url\(\"data:image\/svg/i.test(o.url))return;var h=dt[o.url];h&&h.width>0&&h.height>0&&c(t,n,h.width,h.height,function(t,e){t.append(new st.Image(o.url,e))})}else{if("linear"!=o.type)return;c(t,n,n.width,n.height,j(o))}}function c(){function t(t){C(i,function(){i.style.position="relative";var e=i.ownerDocument.createElement(ut);e.style.position="absolute",e.style.boxSizing="border-box","outside"==n?(e.style.width="6em",e.style.left="-6.8em",e.style.textAlign="right"):e.style.left="0px",t(e),i.insertBefore(e,i.firstChild),tt(e,o),i.removeChild(e)})}function e(t){var e,n=i.parentNode.children,o=i.getAttribute("kendo-split-index");if(null!=o)return t(0|o,n.length);for(e=0;n.length>e;++e)if(n[e]===i)return t(e,n.length)}var n,r=w(F,"list-style-type");if("none"!=r)switch(n=w(F,"list-style-position"),r){case"circle":case"disc":case"square":t(function(t){t.style.fontSize="60%",t.style.lineHeight="200%",t.style.paddingRight="0.5em",t.style.fontFamily="DejaVu Serif",t.innerHTML={disc:"โ",circle:"โฏ",square:"โ "}[r]});break;case"decimal":case"decimal-leading-zero":t(function(t){e(function(e){++e,"decimal-leading-zero"==r&&2>(e+"").length&&(e="0"+e),t.innerHTML=e+"."})});break;case"lower-roman":case"upper-roman":t(function(t){e(function(e){e=ht(e+1),"upper-roman"==r&&(e=e.toUpperCase()),t.innerHTML=e+"."})});break;case"lower-latin":case"lower-alpha":case"upper-latin":case"upper-alpha":t(function(t){e(function(e){e=f(e),/^upper/i.test(r)&&(e=e.toUpperCase()),t.innerHTML=e+"."})})}}function h(t,e,n){function r(t){return{x:t.y,y:t.x}}var l,c,h,u,d,f,p,g;if(0!==t.width&&0!==t.height&&(a(t),l=U.width>0&&(e&&"ltr"==Q||n&&"rtl"==Q),c=N.width>0&&(n&&"ltr"==Q||e&&"rtl"==Q),0!==V.width||0!==U.width||0!==N.width||0!==H.width)){if(V.color==N.color&&V.color==H.color&&V.color==U.color&&V.width==N.width&&V.width==H.width&&V.width==U.width&&l&&c)return t=A(t,V.width/2),h=R(i,t,V.width/2),h.options.stroke={color:V.color,width:V.width},void o.append(h);if(0===W.x&&0===q.x&&0===X.x&&0===Y.x&&2>V.width&&2>U.width&&2>N.width&&2>H.width)return V.width>0&&o.append(new st.Path({stroke:{width:V.width,color:V.color}}).moveTo(t.left,t.top+V.width/2).lineTo(t.right,t.top+V.width/2)),H.width>0&&o.append(new st.Path({stroke:{width:H.width,color:H.color}}).moveTo(t.left,t.bottom-H.width/2).lineTo(t.right,t.bottom-H.width/2)),l&&o.append(new st.Path({stroke:{width:U.width,color:U.color}}).moveTo(t.left+U.width/2,t.top).lineTo(t.left+U.width/2,t.bottom)),void(c&&o.append(new st.Path({stroke:{width:N.width,color:N.color}}).moveTo(t.right-N.width/2,t.top).lineTo(t.right-N.width/2,t.bottom)));u=L(t,W,q,X,Y),d=u.tl,f=u.tr,p=u.br,g=u.bl,s(V.color,t.width,V.width,U.width,N.width,d,f,[1,0,0,1,t.left,t.top]),s(H.color,t.width,H.width,N.width,U.width,p,g,[-1,0,0,-1,t.right,t.bottom]),s(U.color,t.height,U.width,H.width,V.width,r(g),r(d),[0,-1,1,0,t.left,t.bottom]),s(N.color,t.height,N.width,V.width,H.width,r(f),r(p),[0,1,-1,0,t.right,t.top])}}var d,p,g,v,y,x,b,T,D,M,F=_(i),V=k(F,"top"),N=k(F,"right"),H=k(F,"bottom"),U=k(F,"left"),W=S(F,"top-left"),q=S(F,"top-right"),Y=S(F,"bottom-left"),X=S(F,"bottom-right"),Q=w(F,"direction"),Z=w(F,"background-color");if(Z=u(Z),d=it(w(F,"background-image")),p=ot(w(F,"background-repeat")),g=ot(w(F,"background-position")),v=ot(w(F,"background-origin")),y=ot(w(F,"background-size")),ct.msie&&10>ct.version&&(g=ot(i.currentStyle.backgroundPosition)),x=A(i.getBoundingClientRect(),"border-*-width",i),function(){var t,n,i,r,s,a,l,c=w(F,"clip"),h=/^\s*rect\((.*)\)\s*$/.exec(c);h&&(t=h[1].split(/[ ,]+/g),n="auto"==t[0]?x.top:e(t[0])+x.top,i="auto"==t[1]?x.right:e(t[1])+x.left,r="auto"==t[2]?x.bottom:e(t[2])+x.top,s="auto"==t[3]?x.left:e(t[3])+x.left,a=new st.Group,l=(new st.Path).moveTo(s,n).lineTo(i,n).lineTo(i,r).lineTo(s,r).close(),B(a,l),o.append(a),o=a,m(l))}(),M=w(F,"display"),"table-row"==M)for(b=[],T=0,D=i.children;D.length>T;++T)b.push(D[T].getBoundingClientRect());else b=i.getClientRects(),1==b.length&&(b=[i.getBoundingClientRect()]);for(b=r(b),T=0;b.length>T;++T)h(b[T],0===T,T==b.length-1);return b.length>0&&"list-item"==M&&c(b[0]),function(){function t(){var t=R(i,x,"padding"),e=new st.Group;B(e,t),o.append(e),o=e,m(t)}$(i)?t():/^(hidden|auto|scroll)/.test(w(F,"overflow"))?t():/^(hidden|auto|scroll)/.test(w(F,"overflow-x"))?t():/^(hidden|auto|scroll)/.test(w(F,"overflow-y"))&&t()}(),G(i,o)||K(i,o),o}function j(t){return function(i,o){var r,s,a,l,c,h,u,d,f,p,g,m,v,y=o.width(),_=o.height();switch(t.type){case"linear":switch(r=null!=t.angle?t.angle:n.PI,t.to){case"top":r=0;break;case"left":r=-n.PI/2;break;case"bottom":r=n.PI;break;case"right":r=n.PI/2;break;case"top left":case"left top":r=-n.atan2(_,y);break;case"top right":case"right top":r=n.atan2(_,y);break;case"bottom left":case"left bottom":r=n.PI+n.atan2(_,y);break;case"bottom right":case"right bottom":r=n.PI-n.atan2(_,y)}t.reverse&&(r-=n.PI),r%=2*n.PI,0>r&&(r+=2*n.PI),s=n.abs(y*n.sin(r))+n.abs(_*n.cos(r)),a=n.atan(y*n.tan(r)/_),l=n.sin(a),c=n.cos(a),h=n.abs(l)+n.abs(c),u=h/2*l,d=h/2*c,r>n.PI/2&&3*n.PI/2>=r&&(u=-u,d=-d),f=[],p=0,g=t.stops.map(function(n,i){var o,r=n.percent;return r?r=e(r)/100:n.length?r=e(n.length)/s:0===i?r=0:i==t.stops.length-1&&(r=1),o={color:n.color.toCssRgba(),offset:r},null!=r?(p=r,f.forEach(function(t,e){var n=t.stop;n.offset=t.left+(p-t.left)*(e+1)/(f.length+1)}),f=[]):f.push({left:p,stop:o}),o}),m=[.5-u,.5+d],v=[.5+u,.5-d],i.append(st.Path.fromRect(o).stroke(null).fill(new st.LinearGradient({start:m,end:v,stops:g,userSpace:!1})));break;case"radial":window.console&&window.console.log&&window.console.log("Radial gradients are not yet supported in HTML renderer")}}}function G(e,n){var i,o,r,s;return e.getAttribute(kendo.attr("role"))&&(i=kendo.widgetInstance(t(e)),i&&(i.exportDOMVisual||i.exportVisual))?(o=i.exportDOMVisual?i.exportDOMVisual():i.exportVisual())?(r=new st.Group,r.children.push(o),s=e.getBoundingClientRect(),r.transform(at.transform().translate(s.left,s.top)),n.append(r),!0):!1:void 0}function W(t,e,n){var i=T(t),o=new at.Rect([i.left,i.top],[i.width,i.height]),r=new st.Image(e,o);B(r,R(t,i,"content")),n.append(r)}function q(t,n){var i=_(t),o=_(n),r=e(w(i,"z-index")),s=e(w(o,"z-index")),a=w(i,"position"),l=w(o,"position");return isNaN(r)&&isNaN(s)?/static|absolute/.test(a)&&/static|absolute/.test(l)?0:"static"==a?-1:"static"==l?1:0:isNaN(r)?0===s?0:s>0?-1:1:isNaN(s)?0===r?0:r>0?1:-1:e(r)-e(s)}function $(t){return/^(?:textarea|select|input)$/i.test(t.tagName)}function Y(t){return t.selectedOptions&&t.selectedOptions.length>0?t.selectedOptions[0]:t.options[t.selectedIndex]}function X(t,e){var i=_(t),o=w(i,"color"),r=t.getBoundingClientRect();"checkbox"==t.type?(e.append(st.Path.fromRect(new at.Rect([r.left+1,r.top+1],[r.width-2,r.height-2])).stroke(o,1)),t.checked&&e.append((new st.Path).stroke(o,1.2).moveTo(r.left+.22*r.width,r.top+.55*r.height).lineTo(r.left+.45*r.width,r.top+.75*r.height).lineTo(r.left+.78*r.width,r.top+.22*r.width))):(e.append(new st.Circle(new at.Circle([(r.left+r.right)/2,(r.top+r.bottom)/2],n.min(r.width-2,r.height-2)/2)).stroke(o,1)),t.checked&&e.append(new st.Circle(new at.Circle([(r.left+r.right)/2,(r.top+r.bottom)/2],n.min(r.width-8,r.height-8)/2)).fill(o).stroke(null)))}function Q(t,e){var n,i,o,r,s,a=t.tagName.toLowerCase();if("input"==a&&("checkbox"==t.type||"radio"==t.type))return X(t,e);if(n=t.parentNode,i=t.ownerDocument,o=i.createElement(ut),o.style.cssText=N(_(t)),o.style.display="inline-block","input"==a&&(o.style.whiteSpace="pre"),("select"==a||"textarea"==a)&&(o.style.overflow="auto"),"select"==a)if(t.multiple)for(s=0;t.options.length>s;++s)r=i.createElement(ut),r.style.cssText=N(_(t.options[s])),r.style.display="block",r.textContent=t.options[s].textContent,o.appendChild(r);else r=Y(t),r&&(o.textContent=r.textContent);else o.textContent=t.value;n.insertBefore(o,t),o.scrollLeft=t.scrollLeft,o.scrollTop=t.scrollTop,K(o,e),n.removeChild(o)}function K(t,e){var n,i,o,r,s,a,l,c,h;switch(ft._stackingContext.element===t&&(ft._stackingContext.group=e),t.tagName.toLowerCase()){case"img":W(t,t.src,e);break;case"canvas":try{W(t,t.toDataURL("image/png"),e)}catch(u){}break;case"textarea":case"input":case"select":Q(t,e);break;default:for(n=[],i=[],o=[],r=[],s=t.firstChild;s;s=s.nextSibling)switch(s.nodeType){case 3:/\S/.test(s.data)&&Z(t,s,e);break;case 1:a=_(s),l=w(a,"display"),c=w(a,"float"),h=w(a,"position"),"static"!=h?r.push(s):"inline"!=l?"none"!=c?i.push(s):n.push(s):o.push(s)}n.sort(q).forEach(function(t){tt(t,e)}),i.sort(q).forEach(function(t){tt(t,e)}),o.sort(q).forEach(function(t){tt(t,e)}),r.sort(q).forEach(function(t){tt(t,e)})}}function Z(t,i,o){function r(){var t,e,o,r,a,l,d,f=h,p=c.substr(h).search(/\S/);if(h+=p,0>p||h>=u)return!0;if(m.setStart(i,h),m.setEnd(i,h+1),t=b(m),e=!1,x&&(p=c.substr(h).search(/\s/),p>=0&&(m.setEnd(i,h+p),o=m.getBoundingClientRect(),o.bottom==t.bottom&&(t=o,e=!0,h+=p))),!e){if(p=function g(e,n,o){m.setEnd(i,n);var r=b(m);return r.bottom!=t.bottom&&n>e?g(e,e+n>>1,n):r.right!=t.right?(t=r,o>n?g(n,n+o>>1,o):n):n}(h,n.min(u,h+T),u),p==h)return!0;if(h=p,p=(""+m).search(/\s+$/),0===p)return;p>0&&(m.setEnd(i,m.startOffset+p),t=m.getBoundingClientRect())}if(ct.msie&&(t=m.getClientRects()[0]),r=""+m,/^(?:pre|pre-wrap)$/i.test(k)){if(/\t/.test(r)){for(a=0,p=f;m.startOffset>p;++p)l=c.charCodeAt(p),9==l?a+=8-a%8:10==l||13==l?a=0:a++;for(;(p=r.search(" "))>=0;)d=" ".substr(0,8-(a+p)%8),r=r.substr(0,p)+d+r.substr(p+1)}}else r=r.replace(/\s+/g," ");s(r,t)}function s(t,e){var n,i,r;ct.msie&&!isNaN(f)&&(n=kendo.util.measureText(t,{font:p}),i=(e.top+e.bottom-n.height)/2,e={top:i,right:e.right,bottom:i+n.height,left:e.left,height:n.height,width:e.right-e.left}),r=new nt(t,new at.Rect([e.left,e.top],[e.width,e.height]),{font:p,fill:{color:g}}),o.append(r),a(e)}function a(t){function e(e,n){var i,r;e&&(i=d/12,r=new st.Path({stroke:{width:i,color:e}}),n-=i,r.moveTo(t.left,n).lineTo(t.right,n),o.append(r))}e(ft.underline,t.bottom),e(ft["line-through"],t.bottom-t.height/2.7),e(ft.overline,t.top)}var l,c,h,u,d,f,p,g,m,y,x,k,C,S,T;if(!v()&&(l=_(t),!(e(w(l,"text-indent"))<-500)&&(c=i.data,h=0,u=c.search(/\S\s*$/)+1,
u&&(d=w(l,"font-size"),f=w(l,"line-height"),p=[w(l,"font-style"),w(l,"font-variant"),w(l,"font-weight"),d,w(l,"font-family")].join(" "),d=e(d),f=e(f),0!==d)))){for(g=w(l,"color"),m=t.ownerDocument.createRange(),y=w(l,"text-align"),x="justify"==y,k=w(l,"white-space"),ct.msie&&(C=l.textOverflow,"ellipsis"==C&&(S=t.style.textOverflow,t.style.textOverflow="clip")),T=t.getBoundingClientRect().width/d*5,0===T&&(T=500);!r(););ct.msie&&"ellipsis"==C&&(t.style.textOverflow=S)}}function J(t,n,i){var o,r,s,a,l,c;for("auto"!=i?(o=ft._stackingContext.group,i=e(i)):(o=n,i=0),r=o.children,s=0;r.length>s&&!(null!=r[s]._dom_zIndex&&r[s]._dom_zIndex>i);++s);return a=new st.Group,o.insertAt(a,s),a._dom_zIndex=i,o!==n&&ft._clipbox&&(l=ft._matrix.invert(),c=ft._clipbox.transformCopy(l),B(a,st.Path.fromRect(c))),a}function tt(t,n){var i,o,r,s,a,u,d,f=_(t),m=w(f,"counter-reset");m&&h(ot(m,/^\s+/),c,0),i=w(f,"counter-increment"),i&&h(ot(i,/^\s+/),l,1),/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(t.tagName)||null!=ft._clipbox&&(o=e(w(f,"opacity")),r=w(f,"visibility"),s=w(f,"display"),0!==o&&"hidden"!=r&&"none"!=s&&(a=D(f),d=w(f,"z-index"),(a||1>o)&&"auto"==d&&(d=0),u=J(t,n,d),1>o&&u.opacity(o*u.opacity()),p(t,f,u),a?C(t,function(){var e,n,i,o;x(t.style,"transform","none","important"),x(t.style,"transition","none","important"),"static"==w(f,"position")&&x(t.style,"position","relative","important"),e=t.getBoundingClientRect(),n=e.left+a.origin[0],i=e.top+a.origin[1],o=[1,0,0,1,-n,-i],o=et(o,a.matrix),o=et(o,[1,0,0,1,n,i]),o=E(u,o),ft._matrix=ft._matrix.multiplyCopy(o),H(t,u)}):H(t,u),g()))}function et(t,e){var n=t[0],i=t[1],o=t[2],r=t[3],s=t[4],a=t[5],l=e[0],c=e[1],h=e[2],u=e[3],d=e[4],f=e[5];return[n*l+i*h,n*c+i*u,o*l+r*h,o*c+r*u,s*l+a*h+d,s*c+a*u+f]}var nt,it,ot,rt,st=kendo.drawing,at=kendo.geometry,lt=Array.prototype.slice,ct=kendo.support.browser,ht=kendo.util.arabicToRoman,ut="KENDO-PSEUDO-ELEMENT",dt={},ft={};ft._root=ft,nt=st.Text.extend({nodeType:"Text",init:function(t,e,n){st.Text.fn.init.call(this,t,e.getOrigin(),n),this._pdfRect=e},rect:function(){return this._pdfRect},rawBBox:function(){return this._pdfRect}}),st.drawDOM=i,i.getFontFaces=o,it=function(){function t(t){function p(){var e=a.exec(t);e&&(t=t.substr(e[1].length))}function g(e){p();var n=e.exec(t);return n?(t=t.substr(n[1].length),n[1]):void 0}function m(){var e,o,r=kendo.parseColor(t,!0);return r?(t=t.substr(r.match[0].length),r=r.toRGB(),(e=g(i))||(o=g(n)),{color:r,length:e,percent:o}):void 0}function v(e){var i,r,a,u,d,f,p=[],v=!1;if(g(l)){for(i=g(s),i?(i=M(i),g(h)):(r=g(o),"to"==r?r=g(o):r&&/^-/.test(e)&&(v=!0),a=g(o),g(h)),/-moz-/.test(e)&&null==i&&null==r&&(u=g(n),d=g(n),v=!0,"0%"==u?r="left":"100%"==u&&(r="right"),"0%"==d?a="top":"100%"==d&&(a="bottom"),g(h));t&&!g(c)&&(f=m());)p.push(f),g(h);return{type:"linear",angle:i,to:r&&a?r+" "+a:r?r:a?a:null,stops:p,reverse:v}}}function y(){if(g(l)){var t=g(d);return t=t.replace(/^['"]+|["']+$/g,""),g(c),{type:"url",url:t}}}var _,w=t;return r(f,w)?f[w]:((_=g(e))?_=v(_):(_=g(u))&&(_=y()),f[w]=_||{type:"none"})}var e=/^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\s*)\(/,n=/^([-0-9.]+%)/,i=/^([-0-9.]+px)/,o=/^(left|right|top|bottom|to|center)\W/,s=/^([-0-9.]+(deg|grad|rad|turn))/,a=/^(\s+)/,l=/^(\()/,c=/^(\))/,h=/^(,)/,u=/^(url)\(/,d=/^(.*?)\)/,f={},p={};return function(e){return r(p,e)?p[e]:p[e]=ot(e).map(t)}}(),ot=function(){var t={};return function(e,n){function i(t){return d=t.exec(e.substr(c))}function o(t){return t.replace(/^\s+|\s+$/g,"")}var s,a,l,c,h,u,d;if(n||(n=/^\s*,\s*/),s=e+n,r(t,s))return t[s];for(a=[],l=0,c=0,h=0,u=!1;e.length>c;)!u&&i(/^[\(\[\{]/)?(h++,c++):!u&&i(/^[\)\]\}]/)?(h--,c++):!u&&i(/^[\"\']/)?(u=d[0],c++):"'"==u&&i(/^\\\'/)?c+=2:'"'==u&&i(/^\\\"/)?c+=2:"'"==u&&i(/^\'/)?(u=!1,c++):'"'==u&&i(/^\"/)?(u=!1,c++):i(n)?(!u&&!h&&c>l&&(a.push(o(e.substring(l,c))),l=c+d[0].length),c+=d[0].length):c++;return c>l&&a.push(o(e.substring(l,c))),t[s]=a}}(),rt=function(){var t={};return function(e){var n,i=t[e];return i||((n=/url\((['"]?)([^'")]*?)\1\)\s+format\((['"]?)truetype\3\)/.exec(e))?i=t[e]=n[2]:(n=/url\((['"]?)([^'")]*?\.ttf)\1\)/.exec(e))&&(i=t[e]=n[2])),i}}()}(window.kendo.jQuery,parseFloat,Math)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/animation.min",["drawing/geometry.min","drawing/core.min"],t)}(function(){!function(t){var e=t.noop,n=window.kendo,i=n.Class,o=n.util,r=n.animationFrame,s=n.deepExtend,a=i.extend({init:function(t,e){var n=this;n.options=s({},n.options,e),n.element=t},options:{duration:500,easing:"swing"},setup:e,step:e,play:function(){var e=this,n=e.options,i=t.easing[n.easing],s=n.duration,a=n.delay||0,l=o.now()+a,c=l+s;0===s?(e.step(1),e.abort()):setTimeout(function(){var t=function(){var n,a,h,u;e._stopped||(n=o.now(),a=o.limitValue(n-l,0,s),h=a/s,u=i(h,a,0,1,s),e.step(u),c>n?r(t):e.abort())};t()},a)},abort:function(){this._stopped=!0},destroy:function(){this.abort()}}),l=function(){this._items=[]};l.prototype={register:function(t,e){this._items.push({name:t,type:e})},create:function(t,e){var n,i,o,r=this._items;if(e&&e.type)for(i=e.type.toLowerCase(),o=0;r.length>o;o++)if(r[o].name.toLowerCase()===i){n=r[o];break}return n?new n.type(t,e):void 0}},l.current=new l,a.create=function(t,e,n){return l.current.create(t,e,n)},s(n.drawing,{Animation:a,AnimationFactory:l})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.drawing.min",["kendo.color.min","util/main.min","util/text-metrics","util/base64.min","mixins/observers.min","drawing/geometry.min","drawing/core.min","drawing/mixins.min","drawing/shapes.min","drawing/parser.min","drawing/svg.min","drawing/canvas.min","drawing/vml.min","drawing/html.min","drawing/animation.min"],t)}(function(){},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.core.min",["kendo.core.min","kendo.drawing.min"],t)}(function(){return function(t,e){function n(t,e){var n={top:0,right:0,bottom:0,left:0};return e=e||0,"number"==typeof t?n[Rt]=n[Lt]=n[ct]=n[Tt]=t:(n[Rt]=t[Rt]||e,n[Lt]=t[Lt]||e,n[ct]=t[ct]||e,n[Tt]=t[Tt]||e),n}function i(t,e){var n=t.tickX,i=t.tickY,o=t.position,r=new K.Path({stroke:{width:e.width,color:e.color}});return t.vertical?r.moveTo(n,o).lineTo(n+e.size,o):r.moveTo(o,i).lineTo(o,i+e.size),x(r),r}function o(t,e){var n=t.lineStart,i=t.lineEnd,o=t.position,r=new K.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?r.moveTo(n,o).lineTo(i,o):r.moveTo(o,n).lineTo(o,i),x(r),r}function r(t,e){var n,i,o,r=u(e-t,yt-1);if(0===r){if(0===e)return.1;r=rt.abs(e)}return n=rt.pow(10,rt.floor(rt.log(r)/rt.log(10))),i=u(r/n,yt),o=1,o=1.904762>i?.2:4.761904>i?.5:9.523809>i?1:2,u(n*o,yt)}function s(t,e,n,i,o){var r=o*wt;return new jt(n+(t-n)*rt.cos(r)+(e-i)*rt.sin(r),i-(t-n)*rt.sin(r)+(e-i)*rt.cos(r))}function a(e,n){if(e.x1==n.x1&&e.y1==n.y1&&e.x2==n.x2&&e.y2==n.y2)return n;var i=rt.min(e.x1,n.x1),o=rt.max(e.x1,n.x1),r=rt.min(e.x2,n.x2),s=rt.max(e.x2,n.x2),a=rt.min(e.y1,n.y1),l=rt.max(e.y1,n.y1),c=rt.min(e.y2,n.y2),h=rt.max(e.y2,n.y2),u=[];return u[0]=C(o,a,r,l),u[1]=C(i,l,o,c),u[2]=C(r,l,s,c),u[3]=C(o,c,r,h),e.x1==i&&e.y1==a||n.x1==i&&n.y1==a?(u[4]=C(i,a,o,l),u[5]=C(r,c,s,h)):(u[4]=C(r,a,s,l),u[5]=C(i,c,o,h)),t.grep(u,function(t){return t.height()>0&&t.width()>0})[0]}function l(t,e){return-1!=nt(t,e)}function c(t,e){return u(rt.ceil(t/e)*e,yt)}function h(t,e){return u(rt.floor(t/e)*e,yt)}function u(t,e){var n=rt.pow(10,e||0);return rt.round(t*n)/n}function d(t,e){return rt.log(t)/rt.log(e)}function f(t,e,n){var i=u(rt.abs(t%e),yt),o=e*(1-n);return 0===i||i>o}function p(t,e,n){return u(t+(e-t)*n,ut)}function g(t,e){return t-e}function m(t,e){return t.match(xt)?j.format.apply(this,arguments):j.toString(e,t)}function v(t,e){return 0>-t.x*e.y+t.y*e.x}function y(t,e){return t&&e?t.getTime()-e.getTime():-1}function _(t){var e=t.originalEvent,n=0;return e.wheelDelta&&(n=-e.wheelDelta/120,n=n>0?rt.ceil(n):rt.floor(n)),e.detail&&(n=u(e.detail/3)),n}function w(t){if(!t||!t.indexOf||t.indexOf("&")<0)return t;var e=w._element;return e.innerHTML=t,e.textContent||e.innerText}function x(t){var e,n;if(!j.support.vml)for(e=.5,t.options.stroke&&q(t.options.stroke.width)&&t.options.stroke.width%2===0&&(e=0),n=0;t.segments.length>n;n++)t.segments[n].anchor().round(0).translate(e,e);return t}function b(t){var e,n,i=t.stops,o=t.innerRadius/t.radius*100,r=i.length,s=[];for(e=0;r>e;e++)n=st({},i[e]),n.offset=(n.offset*(100-o)+o)/100,s.push(n);return s}function k(t){var e=t.origin,n=t.bottomRight();return new C(e.x,e.y,n.x,n.y)}var C,S,T,A,D,P,M,E,B,I,z,L,R,O,F,V,N,H,U,j=window.kendo,G=j.util,W=G.append,q=G.defined,$=G.last,Y=G.valueOrDefault,X=j.dataviz,Q=X.geometry,K=X.drawing,Z=K.util.measureText,J=j.Class,tt=j.template,et=t.noop,nt=t.inArray,it=t.isPlainObject,ot=t.trim,rt=Math,st=j.deepExtend,at="axisLabelClick",lt="#000",ct="bottom",ht="center",ut=3,dt="clip",ft="circle",pt="cross",gt="12px sans-serif",mt=400,vt=7,yt=10,_t=600,wt=rt.PI/180,xt=/\{\d+:?/,bt="height",kt=1e5,Ct=600,St="inside",Tt="left",At="linear",Dt=Number.MAX_VALUE,Pt=-Number.MAX_VALUE,Mt="none",Et="noteClick",Bt="noteHover",It="outside",zt="radial",Lt="right",Rt="top",Ot="triangle",Ft="width",Vt="#fff",Nt="x",Ht="y",Ut=.2,jt=function(t,n){var i=this;return i instanceof jt?(i.x=t||0,i.y=n||0,e):new jt(t,n)};jt.fn=jt.prototype={clone:function(){var t=this;return new jt(t.x,t.y)},equals:function(t){return t&&t.x===this.x&&t.y===this.y},rotate:function(t,e){var n=this,i=e*wt,o=rt.cos(i),r=rt.sin(i),s=t.x,a=t.y,l=n.x,c=n.y;return n.x=u(s+(l-s)*o+(c-a)*r,ut),n.y=u(a+(c-a)*o-(l-s)*r,ut),n},multiply:function(t){var e=this;return e.x*=t,e.y*=t,e},distanceTo:function(t){var e=this.x-t.x,n=this.y-t.y;return rt.sqrt(e*e+n*n)}},jt.onCircle=function(t,e,n){return e*=wt,new jt(t.x-n*rt.cos(e),t.y-n*rt.sin(e))},C=function(t,n,i,o){var r=this;return r instanceof C?(r.x1=t||0,r.x2=i||0,r.y1=n||0,r.y2=o||0,e):new C(t,n,i,o)},C.fn=C.prototype={width:function(){return this.x2-this.x1},height:function(){return this.y2-this.y1},translate:function(t,e){var n=this;return n.x1+=t,n.x2+=t,n.y1+=e,n.y2+=e,n},move:function(t,e){var n=this,i=n.height(),o=n.width();return q(t)&&(n.x1=t,n.x2=n.x1+o),q(e)&&(n.y1=e,n.y2=n.y1+i),n},wrap:function(t){var e=this;return e.x1=rt.min(e.x1,t.x1),e.y1=rt.min(e.y1,t.y1),e.x2=rt.max(e.x2,t.x2),e.y2=rt.max(e.y2,t.y2),e},wrapPoint:function(t){return this.wrap(new C(t.x,t.y,t.x,t.y)),this},snapTo:function(t,e){var n=this;return e!=Nt&&e||(n.x1=t.x1,n.x2=t.x2),e!=Ht&&e||(n.y1=t.y1,n.y2=t.y2),n},alignTo:function(t,e){var n,i,o=this,r=o.height(),s=o.width(),a=e==Rt||e==ct?Ht:Nt,l=a==Ht?r:s;return e===ht?(n=t.center(),i=o.center(),o.x1+=n.x-i.x,o.y1+=n.y-i.y):o[a+1]=e===Rt||e===Tt?t[a+1]-l:t[a+2],o.x2=o.x1+s,o.y2=o.y1+r,o},shrink:function(t,e){var n=this;return n.x2-=t,n.y2-=e,n},expand:function(t,e){return this.shrink(-t,-e),this},pad:function(t){var e=this,i=n(t);return e.x1-=i.left,e.x2+=i.right,e.y1-=i.top,e.y2+=i.bottom,e},unpad:function(t){var e=this,i=n(t);return i.left=-i.left,i.top=-i.top,i.right=-i.right,i.bottom=-i.bottom,e.pad(i)},clone:function(){var t=this;return new C(t.x1,t.y1,t.x2,t.y2)},center:function(){var t=this;return new jt(t.x1+t.width()/2,t.y1+t.height()/2)},containsPoint:function(t){var e=this;return t.x>=e.x1&&e.x2>=t.x&&t.y>=e.y1&&e.y2>=t.y},points:function(){var t=this;return[new jt(t.x1,t.y1),new jt(t.x2,t.y1),new jt(t.x2,t.y2),new jt(t.x1,t.y2)]},getHash:function(){var t=this;return[t.x1,t.y1,t.x2,t.y2].join(",")},overlaps:function(t){return!(this.y1>t.y2||t.y1>this.y2||this.x1>t.x2||t.x1>this.x2)},rotate:function(t){var e=this,n=e.width(),i=e.height(),o=e.center(),r=o.x,a=o.y,l=s(0,0,r,a,t),c=s(n,0,r,a,t),h=s(n,i,r,a,t),u=s(0,i,r,a,t);return n=rt.max(l.x,c.x,h.x,u.x)-rt.min(l.x,c.x,h.x,u.x),i=rt.max(l.y,c.y,h.y,u.y)-rt.min(l.y,c.y,h.y,u.y),e.x2=e.x1+n,e.y2=e.y1+i,e},toRect:function(){return new Q.Rect([this.x1,this.y1],[this.width(),this.height()])},hasSize:function(){return 0!==this.width()&&0!==this.height()},align:function(t,e,n){var i=this,o=e+1,r=e+2,s=e===Nt?Ft:bt,a=i[s]();l(n,[Tt,Rt])?(i[o]=t[o],i[r]=i[o]+a):l(n,[Lt,ct])?(i[r]=t[r],i[o]=i[r]-a):n==ht&&(i[o]=t[o]+(t[s]()-a)/2,i[r]=i[o]+a)}},S=J.extend({init:function(t,e,n,i,o){var r=this;r.c=t,r.ir=e,r.r=n,r.startAngle=i,r.angle=o},clone:function(){var t=this;return new S(t.c,t.ir,t.r,t.startAngle,t.angle)},middle:function(){return this.startAngle+this.angle/2},radius:function(t,e){var n=this;return e?n.ir=t:n.r=t,n},point:function(t,e){var n=this,i=t*wt,o=rt.cos(i),r=rt.sin(i),s=e?n.ir:n.r,a=u(n.c.x-o*s,ut),l=u(n.c.y-r*s,ut);return new jt(a,l)},adjacentBox:function(t,e,n){var i=this.clone().expand(t),o=i.middle(),r=i.point(o),s=e/2,a=n/2,l=r.x-s,c=r.y-a,h=rt.sin(o*wt),u=rt.cos(o*wt);return rt.abs(h)<.9&&(l+=s*-u/rt.abs(u)),rt.abs(u)<.9&&(c+=a*-h/rt.abs(h)),new C(l,c,l+e,c+n)},containsPoint:function(t){var e=this,n=e.c,i=e.ir,o=e.r,r=e.startAngle,s=e.startAngle+e.angle,a=t.x-n.x,l=t.y-n.y,c=new jt(a,l),h=e.point(r),d=new jt(h.x-n.x,h.y-n.y),f=e.point(s),p=new jt(f.x-n.x,f.y-n.y),g=u(a*a+l*l,ut);return(d.equals(c)||v(d,c))&&!v(p,c)&&g>=i*i&&o*o>=g},getBBox:function(){var t,e,n,i=this,o=new C(Dt,Dt,Pt,Pt),r=u(i.startAngle%360),s=u((r+i.angle)%360),a=i.ir,l=[0,90,180,270,r,s].sort(g),c=nt(r,l),h=nt(s,l);for(t=r==s?l:h>c?l.slice(c,h+1):[].concat(l.slice(0,h+1),l.slice(c,l.length)),e=0;t.length>e;e++)n=i.point(t[e]),o.wrapPoint(n),o.wrapPoint(n,a);return a||o.wrapPoint(i.c),o},expand:function(t){return this.r+=t,this}}),T=S.extend({init:function(t,e,n,i){S.fn.init.call(this,t,0,e,n,i)},expand:function(t){return S.fn.expand.call(this,t)},clone:function(){var t=this;return new T(t.c,t.r,t.startAngle,t.angle)},radius:function(t){return S.fn.radius.call(this,t)},point:function(t){return S.fn.point.call(this,t)}}),A=function(){},A.fn=A.prototype={createRing:function(t,e){var n,i=t.startAngle+180,o=t.angle+i,r=new Q.Point(t.c.x,t.c.y),s=rt.max(t.r,0),a=rt.max(t.ir,0),l=new Q.Arc(r,{startAngle:i,endAngle:o,radiusX:s,radiusY:s}),c=K.Path.fromArc(l,e).close();return a?(l.radiusX=l.radiusY=a,n=l.pointAt(o),c.lineTo(n.x,n.y),c.arc(o,i,a,a,!0)):c.lineTo(r.x,r.y),c}},A.current=new A,D=J.extend({init:function(t){var e=this;e.children=[],e.options=st({},e.options,t)},reflow:function(t){var e,n,i,o=this,r=o.children;for(n=0;r.length>n;n++)i=r[n],i.reflow(t),e=e?e.wrap(i.box):i.box.clone();o.box=e||t},destroy:function(){var t,e=this,n=e.children;for(this.animation&&this.animation.destroy(),t=0;n.length>t;t++)n[t].destroy()},getRoot:function(){var t=this.parent;return t?t.getRoot():null},getChart:function(){var t=this.getRoot();return t?t.chart:e},translateChildren:function(t,e){var n,i=this,o=i.children,r=o.length;for(n=0;r>n;n++)o[n].box.translate(t,e)},append:function(){W(this.children,arguments);for(var t=0;t<arguments.length;t++)arguments[t].parent=this},renderVisual:function(){this.options.visible!==!1&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},addVisual:function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},renderChildren:function(){var t,e=this.children;for(t=0;e.length>t;t++)e[t].renderVisual()},createVisual:function(){this.visual=new X.drawing.Group({zIndex:this.options.zIndex,visible:Y(this.options.visible,!0)})},createAnimation:function(){this.visual&&(this.animation=K.Animation.create(this.visual,this.options.animation))},appendVisual:function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):q(t.options.zIndex)?this.stackRoot().stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},clipRoot:function(){return this.parent?this.parent.clipRoot():this},stackRoot:function(){return this.parent?this.parent.stackRoot():this},stackVisual:function(t){var e,n,i,o=t.options.zIndex||0,r=this.visual.children;for(e=0;r.length>e&&(n=r[e],i=Y(n.options.zIndex,0),!(i>o));e++);this.visual.insertAt(t,e)},traverse:function(t){var e,n,i=this.children;for(e=0;i.length>e;e++)n=i[e],t(n),n.traverse&&n.traverse(t)},closest:function(t){for(var n=this,i=!1;n&&!i;)i=t(n),i||(n=n.parent);return i?n:e},renderComplete:t.noop,hasHighlight:function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&t.visible===!1)},toggleHighlight:function(e){var n,i=this,o=i._highlight,r=(i.options||{}).highlight,s=(r||{}).visual;if(!o){if(n={fill:{color:Vt,opacity:.2},stroke:{color:Vt,width:1,opacity:.2}},s){if(o=i._highlight=s(t.extend(i.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(n)},sender:i.getChart(),series:i.series,dataItem:i.dataItem,category:i.category,value:i.value,percentage:i.percentage,runningTotal:i.runningTotal,total:i.total})),!o)return}else o=i._highlight=i.createHighlight(n);o.options.zIndex=i.options.zIndex,i.appendVisual(o)}o.visible(e)},createGradientOverlay:function(t,e,n){var i=new K.Path(st({stroke:{color:Mt},fill:this.createGradient(n),closed:t.options.closed},e));return i.segments.elements(t.segments.elements()),i},createGradient:function(t){return this.parent?this.parent.createGradient(t):e}}),P=D.extend({init:function(t){var e=this;e.gradients={},D.fn.init.call(e,t)},options:{width:_t,height:mt,background:Vt,border:{color:lt,width:0},margin:n(5),zIndex:-2},reflow:function(){var t,e=this,n=e.options,i=e.children,o=new C(0,0,n.width,n.height);for(e.box=o.unpad(n.margin),t=0;i.length>t;t++)i[t].reflow(o),o=a(o,i[t].box)||C()},createVisual:function(){this.visual=new K.Group,this.createBackground()},createBackground:function(){var t=this.options,e=t.border||{},n=this.box.clone().pad(t.margin).unpad(e.width),i=K.Path.fromRect(n.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(i)},getRoot:function(){return this},createGradient:function(t){var e,n,i=this.gradients,o=G.objectKey(t),r=X.Gradients[t.gradient];return i[o]?e=i[o]:(n=st({},r,t),"linear"==r.type?e=new K.LinearGradient(n):(t.innerRadius&&(n.stops=b(n)),e=new K.RadialGradient(n),e.supportVML=r.supportVML!==!1),i[o]=e),e}}),M=D.extend({options:{align:Tt,vAlign:Rt,margin:{},padding:{},border:{color:lt,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0},reflow:function(t){function e(){a.align(t,Nt,l.align),a.align(t,Ht,l.vAlign),a.paddingBox=i.clone().unpad(f).unpad(g)}var i,o,r,s,a=this,l=a.options,c=l.width,h=l.height,u=c&&h,d=l.shrinkToFit,f=n(l.margin),p=n(l.padding),g=l.border.width,m=a.children;for(o=t.clone(),u&&(o.x2=o.x1+c,o.y2=o.y1+h),d&&o.unpad(f).unpad(g).unpad(p),D.fn.reflow.call(a,o),i=u?a.box=C(0,0,c,h):a.box,d&&u?(e(),o=a.contentBox=a.paddingBox.clone().unpad(p)):(o=a.contentBox=i.clone(),i.pad(p).pad(g).pad(f),e()),a.translateChildren(i.x1-o.x1+f.left+g+p.left,i.y1-o.y1+f.top+g+p.top),r=0;m.length>r;r++)s=m[r],s.reflow(s.box)},align:function(t,e,n){this.box.align(t,e,n)},hasBox:function(){var t=this.options;return t.border.width||t.background},createVisual:function(){D.fn.createVisual.call(this);var t=this.options;t.visible&&this.hasBox()&&this.visual.append(K.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},visualStyle:function(){var t=this,e=t.options,n=e.border||{};return{stroke:{width:n.width,color:n.color,opacity:Y(n.opacity,e.opacity),dashType:n.dashType},fill:{color:e.background,opacity:e.opacity},cursor:e.cursor}}}),E=D.extend({init:function(t,e){var n=this;D.fn.init.call(n,e),n.content=t,n.reflow(C())},options:{font:gt,color:lt,align:Tt,vAlign:""},reflow:function(t){var e,n=this,i=n.options;e=i.size=Z(n.content,{font:i.font}),n.baseline=e.baseline,n.box=C(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},createVisual:function(){var t=this.options;this.visual=new K.Text(this.content,this.box.toRect().topLeft(),{font:t.font,fill:{color:t.color,opacity:t.opacity},cursor:t.cursor})}}),B=D.extend({init:function(t){D.fn.init.call(this,t),this._initDirection()},_initDirection:function(){var t=this.options;t.vertical?(this.groupAxis=Nt,this.elementAxis=Ht,this.groupSizeField=Ft,this.elementSizeField=bt,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=Ht,this.elementAxis=Nt,this.groupSizeField=bt,this.elementSizeField=Ft,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},options:{vertical:!0,wrap:!0,vSpacing:0,spacing:0},reflow:function(t){this.box=t.clone(),this.reflowChildren()},reflowChildren:function(){var t,e,n,i,o,r,s,a,l,c,h=this,u=h.box,d=h.elementAxis,f=h.groupAxis,p=h.elementSizeField,g=h.groupSizeField,m=h.groupOptions(),v=m.groups,y=v.length,_=u[f+1]+h.alignStart(m.groupsSize,u[g]()),w=_;if(y){for(s=0;y>s;s++){for(n=v[s],i=n.groupElements,o=i.length,t=u[d+1],r=0;o>r;r++)a=i[r],c=h.elementSize(a),e=w+h.alignStart(c[g],n.groupSize),l=C(),l[f+1]=e,l[f+2]=e+c[g],l[d+1]=t,l[d+2]=t+c[p],a.reflow(l),t+=c[p]+h.elementSpacing;w+=n.groupSize+h.groupSpacing}u[f+1]=_,u[f+2]=_+m.groupsSize,u[d+2]=u[d+1]+m.maxGroupElementsSize}},alignStart:function(t,e){var n=0,i=this.options.align;return i==Lt||i==ct?n=e-t:i==ht&&(n=(e-t)/2),n},groupOptions:function(){var t,e,n=this,i=n.box,o=n.children,r=o.length,s=this.elementSizeField,a=this.groupSizeField,l=this.elementSpacing,c=this.groupSpacing,h=u(i[s]()),d=0,f=0,p=0,g=0,m=[],v=[],y=0;for(d=0;r>d;d++)e=o[d],e.box||e.reflow(i),t=this.elementSize(e),n.options.wrap&&u(p+l+t[s])>h&&(m.push({groupElements:v,groupSize:f,groupElementsSize:p}),y=rt.max(y,p),g+=c+f,f=0,p=0,v=[]),f=rt.max(f,t[a]),p>0&&(p+=l),p+=t[s],v.push(e);return m.push({groupElements:v,groupSize:f,groupElementsSize:p}),y=rt.max(y,p),g+=f,{groups:m,groupsSize:g,maxGroupElementsSize:y}},elementSize:function(t){return{width:t.box.width(),height:t.box.height()}},createVisual:et}),I=M.extend({ROWS_SPLIT_REGEX:/\n|\\n/m,init:function(t,e){var n=this;n.content=t,M.fn.init.call(n,e),n._initContainer(),n.reflow(C())},_initContainer:function(){var t,e,n=this,i=n.options,o=(n.content+"").split(n.ROWS_SPLIT_REGEX),r=new B({vertical:!0,align:i.align,wrap:!1}),s=st({},i,{opacity:1,animation:null});for(n.container=r,n.append(r),e=0;o.length>e;e++)t=new E(ot(o[e]),s),r.append(t)},reflow:function(t){var e,i,o,r=this.options,s=r.visual;this.container.options.align=r.align,s&&!this._boxReflow?(t.hasSize()||(this._boxReflow=!0,this.reflow(t),this._boxReflow=!1,t=this.box),this.visual=s(this.visualContext(t)),e=t,this.visual&&(e=k(this.visual.clippedBBox()||new Q.Rect),this.visual.options.zIndex=r.zIndex,this.visual.options.noclip=r.noclip),this.box=this.contentBox=this.paddingBox=e):(M.fn.reflow.call(this,t),r.rotation&&(i=n(r.margin),o=this.box.unpad(i),this.targetBox=t,this.normalBox=o.clone(),o=this.rotate(),o.translate(i.left-i.right,i.top-i.bottom),this.rotatedBox=o.clone(),o.pad(i)))},createVisual:function(){var t,e=this.options;e.visible&&(this.visual=new X.drawing.Group({transform:this.rotationTransform(),zIndex:e.zIndex,noclip:e.noclip}),this.hasBox()&&(t=K.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t)))},renderVisual:function(){this.options.visual?(this.addVisual(),this.createAnimation()):M.fn.renderVisual.call(this)},visualOptions:function(){var t=this.options;return{background:t.background,border:t.border,color:t.color,font:t.font,margin:t.margin,padding:t.padding,visible:t.visible}},visualContext:function(t){var e=this;return{text:e.content,rect:t.toRect(),sender:this.getChart(),options:e.visualOptions(),createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}}},getDefaultVisual:function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},rotate:function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,Nt,t.align),this.align(this.targetBox,Ht,t.vAlign),this.box},rotationTransform:function(){var t,e,n,i,o=this.options.rotation;return o?(t=this.normalBox.center(),e=t.x,n=t.y,i=this.rotatedBox.center(),Q.transform().translate(i.x-e,i.y-n).rotate(o,[e,n])):null}}),z=D.extend({init:function(t){var e=this;D.fn.init.call(e,t),t=e.options,e.append(new I(t.text,st({},t,{vAlign:t.position})))},options:{color:lt,position:Rt,align:ht,margin:n(5),padding:n(5)},reflow:function(t){var e=this;D.fn.reflow.call(e,t),e.box.snapTo(t,Nt)}}),z.buildTitle=function(t,e,n){var i;return"string"==typeof t&&(t={text:t}),t=st({visible:!0},n,t),t&&t.visible&&t.text&&(i=new z(t),e.append(i)),i},L=I.extend({init:function(t,e,n,i,o){var r=this;r.text=e,r.value=t,r.index=n,r.dataItem=i,I.fn.init.call(r,e,o)},visualContext:function(t){var e=I.fn.visualContext.call(this,t);return e.value=this.value,e.dataItem=this.dataItem,e.format=this.options.format,e.culture=this.options.culture,e},click:function(e,n){var i=this;e.trigger(at,{element:t(n.target),value:i.value,text:i.text,index:i.index,dataItem:i.dataItem,axis:i.parent.options})},rotate:function(){var t,e;return this.options.alignRotation!=ht?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=k(t.bbox(e.matrix()))):I.fn.rotate.call(this),this.box},rotationTransform:function(){var t,e,n,i,o,r,s,a,l,c,h,d,f,p,g,m,v,y,_=this.options,w=_.rotation;return w?_.alignRotation==ht?I.fn.rotationTransform.call(this):(t=Q.transform().rotate(w).matrix(),e=this.normalBox.toRect(),n=this.targetBox.toRect(),i=_.rotationOrigin||Rt,o=i==Rt||i==ct?Nt:Ht,r=i==Rt||i==ct?Ht:Nt,s=i==Rt||i==Tt?n.origin:n.bottomRight(),a=e.topLeft().transformCopy(t),l=e.topRight().transformCopy(t),c=e.bottomRight().transformCopy(t),h=e.bottomLeft().transformCopy(t),d=Q.Rect.fromPoints(a,l,c,h),f={},f[r]=n.origin[r]-d.origin[r],p=rt.abs(a[r]+f[r]-s[r]),g=rt.abs(l[r]+f[r]-s[r]),u(p,yt)===u(g,yt)?(m=a,v=l):p>g?(m=l,v=c):(m=a,v=h),y=m[o]+(v[o]-m[o])/2,f[o]=n.center()[o]-y,Q.transform().translate(f.x,f.y).rotate(w)):null}}),R=D.extend({init:function(t){var e=this;D.fn.init.call(e,t),e.options.visible||(e.options=st({},e.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),e.options.minorTicks=st({},{color:e.options.line.color,width:e.options.line.width,visible:e.options.minorTickType!=Mt},e.options.minorTicks,{size:e.options.minorTickSize,align:e.options.minorTickType}),e.options.majorTicks=st({},{color:e.options.line.color,width:e.options.line.width,visible:e.options.majorTickType!=Mt},e.options.majorTicks,{size:e.options.majorTickSize,align:e.options.majorTickType}),this.options._deferLabels||e.createLabels(),e.createTitle(),e.createNotes()},options:{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:lt,visible:!0},title:{visible:!0,position:ht},majorTicks:{align:It,size:4,skip:0,step:1},minorTicks:{align:It,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:It,minorTickType:Mt,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:lt,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1},labelsRange:function(){return{min:this.options.labels.skip,max:this.labelsCount()}},createLabels:function(){var e,n,i,o,r=this,s=r.options,a=s.vertical?Lt:ht,l=st({},s.labels,{align:a,zIndex:s.zIndex}),c=rt.max(1,l.step);if(r.children=t.grep(r.children,function(t){return!(t instanceof L)}),r.labels=[],l.visible)for(e=r.labelsRange(),n=l.rotation,it(n)&&(l.alignRotation=n.align,l.rotation=n.angle),"auto"==l.rotation&&(l.rotation=0,s.autoRotateLabels=!0),o=e.min;e.max>o;o+=c)i=r.createAxisLabel(o,l),i&&(r.append(i),r.labels.push(i))},lineBox:function(){var t=this,e=t.options,n=t.box,i=e.vertical,o=e.labels.mirror,r=o?n.x1:n.x2,s=o?n.y2:n.y1,a=e.line.width||0;return i?C(r,n.y1,r,n.y2-a):C(n.x1,s,n.x2-a,s)},createTitle:function(){var t,e=this,n=e.options,i=st({rotation:n.vertical?-90:0,text:"",zIndex:1,visualSize:!0},n.title);i.visible&&i.text&&(t=new I(i.text,i),e.append(t),e.title=t)},createNotes:function(){var t,e,n,i=this,o=i.options,r=o.notes,s=r.data||[];for(i.notes=[],t=0;s.length>t;t++)e=st({},r,s[t]),e.value=i.parseNoteValue(e.value),n=new O(e.value,e.label.text,null,null,null,e),n.options.visible&&(q(n.options.position)?o.vertical&&!l(n.options.position,[Tt,Lt])?n.options.position=o.reverse?Tt:Lt:o.vertical||l(n.options.position,[Rt,ct])||(n.options.position=o.reverse?ct:Rt):n.options.position=o.vertical?o.reverse?Tt:Lt:o.reverse?ct:Rt,i.append(n),i.notes.push(n))},parseNoteValue:function(t){return t},renderVisual:function(){D.fn.renderVisual.call(this),this.createPlotBands()},createVisual:function(){D.fn.createVisual.call(this),this.createBackground(),this.createLine()},gridLinesVisual:function(){var t=this._gridLines;return t||(t=this._gridLines=new K.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},createTicks:function(t){function e(e,n,o){var a,c=e.length;if(n.visible)for(a=n.skip;c>a;a+=n.step)q(o)&&a%o===0||(l.tickX=s?r.x2:r.x2-n.size,l.tickY=s?r.y1-n.size:r.y1,l.position=e[a],t.append(i(l,n)))}var n=this,o=n.options,r=n.lineBox(),s=o.labels.mirror,a=o.majorTicks.visible?o.majorUnit:0,l={vertical:o.vertical};e(n.getMajorTickPositions(),o.majorTicks),e(n.getMinorTickPositions(),o.minorTicks,a/o.minorUnit)},createLine:function(){var t,e,n=this,i=n.options,o=i.line,r=n.lineBox();o.width>0&&o.visible&&(t=new K.Path({stroke:{width:o.width,color:o.color,dashType:o.dashType}}),t.moveTo(r.x1,r.y1).lineTo(r.x2,r.y2),i._alignLines&&x(t),e=this._lineGroup=new K.Group,e.append(t),this.visual.append(e),this.createTicks(e))},getActualTickSize:function(){var t=this,e=t.options,n=0;return e.majorTicks.visible&&e.minorTicks.visible?n=rt.max(e.majorTicks.size,e.minorTicks.size):e.majorTicks.visible?n=e.majorTicks.size:e.minorTicks.visible&&(n=e.minorTicks.size),n},createBackground:function(){var t=this,e=t.options,n=e.background,i=t.box;n&&(t._backgroundPath=K.Path.fromRect(i.toRect(),{fill:{color:n},stroke:null}),this.visual.append(t._backgroundPath))},createPlotBands:function(){var e,n,i,o,r,s,a=this,l=a.options,c=l.plotBands||[],h=l.vertical,u=a.plotArea;0!==c.length&&(r=this._plotbandGroup=new K.Group({zIndex:-1}),s=t.grep(a.pane.axes,function(t){return t.options.vertical!==a.options.vertical})[0],t.each(c,function(t,l){var c,d;i=Y(l.from,Pt),o=Y(l.to,Dt),h?(e=(s||u.axisX).lineBox(),n=a.getSlot(l.from,l.to,!0)):(e=a.getSlot(l.from,l.to,!0),n=(s||u.axisY).lineBox()),0!==e.width()&&0!==n.height()&&(c=new Q.Rect([e.x1,n.y1],[e.width(),n.height()]),d=K.Path.fromRect(c,{fill:{color:l.color,opacity:l.opacity},stroke:null}),r.append(d))}),a.appendVisual(r))},createGridLines:function(t){function e(t,e,i){var r,a=t.length;if(e.visible)for(r=e.skip;a>r;r+=e.step)n=u(t[r]),l(n,g)||r%i===0||s&&f===n||(p.position=n,m.append(o(p,e)),g.push(n))}var n,i=this,r=i.options,s=t.options.line.visible,a=r.majorGridLines,c=a.visible?r.majorUnit:0,h=r.vertical,d=t.lineBox(),f=d[h?"y1":"x1"],p={lineStart:d[h?"x1":"y1"],lineEnd:d[h?"x2":"y2"],vertical:h},g=[],m=this.gridLinesVisual();return e(i.getMajorTickPositions(),r.majorGridLines),e(i.getMinorTickPositions(),r.minorGridLines,c/r.minorUnit),m.children},reflow:function(t){var e,n,i=this,o=i.options,r=o.vertical,s=i.labels,a=s.length,l=i.title,c=r?Ft:bt,h=l?l.box[c]():0,u=i.getActualTickSize()+o.margin+h,d=0,f=(this.getRoot()||{}).box||t,p=f[c]();for(n=0;a>n;n++)e=s[n].box[c](),p>=e+u&&(d=rt.max(d,e));i.box=r?C(t.x1,t.y1,t.x1+d+u,t.y2):C(t.x1,t.y1,t.x2,t.y1+d+u),i.arrangeTitle(),i.arrangeLabels(),i.arrangeNotes()},getLabelsTickPositions:function(){return this.getMajorTickPositions()},labelTickIndex:function(t){return t.index},arrangeLabels:function(){var t,e,n,i,o,r,s,a,l,c,h,u=this,d=u.options,f=u.labels,p=!d.justified,g=d.vertical,m=u.lineBox(),v=d.labels.mirror,y=u.getLabelsTickPositions(),_=u.getActualTickSize()+d.margin;for(n=0;f.length>n;n++)i=f[n],o=u.labelTickIndex(i),r=g?i.box.height():i.box.width(),s=y[o]-r/2,g?(p&&(a=y[o],l=y[o+1],c=a+(l-a)/2,s=c-r/2),h=m.x2,v?(h+=_,i.options.rotationOrigin=Tt):(h-=_+i.box.width(),i.options.rotationOrigin=Lt),t=i.box.move(h,s)):(p?(a=y[o],l=y[o+1]):(a=s,l=s+r),e=m.y1,v?(e-=_+i.box.height(),
i.options.rotationOrigin=ct):(e+=_,i.options.rotationOrigin=Rt),t=C(a,e,l,e+i.box.height())),i.reflow(t)},autoRotateLabels:function(){var t,e,n,i,o,r;if(this.options.autoRotateLabels&&!this.options.vertical){for(t=this.getMajorTickPositions(),e=this.labels,r=0;e.length>r;r++)if(o=t[r+1]-t[r],n=e[r].box,n.width()>o){if(n.height()>o){i=-90;break}i=-45}if(i){for(r=0;e.length>r;r++)e[r].options.rotation=i,e[r].reflow(C());return!0}}},arrangeTitle:function(){var t=this,e=t.options,n=e.labels.mirror,i=e.vertical,o=t.title;o&&(i?(o.options.align=n?Lt:Tt,o.options.vAlign=o.options.position):(o.options.align=o.options.position,o.options.vAlign=n?Rt:ct),o.reflow(t.box))},arrangeNotes:function(){var t,e,n,i,o=this;for(t=0;o.notes.length>t;t++)e=o.notes[t],i=e.options.value,q(i)?(o.shouldRenderNote(i)?e.show():e.hide(),n=o.getSlot(i)):e.hide(),e.reflow(n||o.lineBox())},alignTo:function(t){var e=this,n=t.lineBox(),i=e.options.vertical,o=i?Ht:Nt;e.box.snapTo(n,o),i?e.box.shrink(0,e.lineBox().height()-n.height()):e.box.shrink(e.lineBox().width()-n.width(),0),e.box[o+1]-=e.lineBox()[o+1]-n[o+1],e.box[o+2]-=e.lineBox()[o+2]-n[o+2]},axisLabelText:function(t,e,n){var i,o=t;return n.template?(i=tt(n.template),o=i({value:t,dataItem:e,format:n.format,culture:n.culture})):n.format&&(o=n.format.match(xt)?j.format(n.format,t):j.toString(t,n.format,n.culture)),o},slot:function(t,n){var i=this.getSlot(t,n);return i?i.toRect():e},contentBox:function(){var t=this.box.clone(),e=this.labels;return e.length&&(e[0].options.visible&&t.wrap(e[0].box),$(e).options.visible&&t.wrap($(e).box)),t},limitRange:function(t,e,n,i,o){var r,s=this.options;if(!(n>t&&0>o&&(!q(s.min)||n>=s.min)||e>i&&o>0&&(!q(s.max)||s.max>=i)))return n>e&&o>0||t>i&&0>o?{min:t,max:e}:(r=e-t,n>t?(t=G.limitValue(t,n,i),e=G.limitValue(t+r,n+r,i)):e>i&&(e=G.limitValue(e,n,i),t=G.limitValue(e-r,n,i-r)),{min:t,max:e})}}),O=M.extend({init:function(t,e,n,i,o,r){var s=this;M.fn.init.call(s,r),s.value=t,s.text=e,s.dataItem=n,s.category=i,s.series=o,s.render()},options:{icon:{visible:!0,type:ft},label:{position:St,visible:!0,align:ht,vAlign:ht},line:{visible:!0},visible:!0,position:Rt,zIndex:2},hide:function(){this.options.visible=!1},show:function(){this.options.visible=!0},render:function(){var t,e,n,i,o=this,r=o.options,s=r.label,a=o.text,l=r.icon,c=l.size,h=C();r.visible&&(q(s)&&s.visible&&(s.template?(i=tt(s.template),a=i({dataItem:o.dataItem,category:o.category,value:o.value,text:a,series:o.series})):s.format&&(a=m(s.format,a)),o.label=new I(a,st({},s)),s.position!==St||q(c)||(l.type===ft?c=rt.max(o.label.box.width(),o.label.box.height()):(e=o.label.box.width(),n=o.label.box.height()),h.wrap(o.label.box))),l.width=e||c||vt,l.height=n||c||vt,t=new F(st({},l)),o.marker=t,o.append(t),o.label&&o.append(o.label),t.reflow(C()),o.wrapperBox=h.wrap(t.box))},reflow:function(t){var e,n,i,o=this,r=o.options,s=t.center(),a=o.wrapperBox,c=r.line.length,h=r.position,u=o.label,d=o.marker;r.visible&&(l(h,[Tt,Lt])?h===Tt?(i=a.alignTo(t,h).translate(-c,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,s.y],o.linePoints=[e,[i.x2,s.y]],n=i.clone().wrapPoint(e))):(i=a.alignTo(t,h).translate(c,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,s.y],o.linePoints=[e,[i.x1,s.y]],n=i.clone().wrapPoint(e))):h===ct?(i=a.alignTo(t,h).translate(t.center().x-a.center().x,c),r.line.visible&&(e=[s.x,t.y2],o.linePoints=[e,[s.x,i.y1]],n=i.clone().wrapPoint(e))):(i=a.alignTo(t,h).translate(t.center().x-a.center().x,-c),r.line.visible&&(e=[s.x,t.y1],o.linePoints=[e,[s.x,i.y2]],n=i.clone().wrapPoint(e))),d&&d.reflow(i),u&&(u.reflow(i),d&&(r.label.position===It&&u.box.alignTo(d.box,h),u.reflow(u.box))),o.contentBox=i,o.targetBox=t,o.box=n||i)},createVisual:function(){M.fn.createVisual.call(this),this.options.visible&&this.createLine()},renderVisual:function(){var t=this,e=t.options,n=e.visual;e.visible&&n?(t.visual=n({dataItem:t.dataItem,category:t.category,value:t.value,text:t.text,sender:t.getChart(),series:t.series,rect:t.targetBox.toRect(),options:{background:e.background,border:e.background,icon:e.icon,label:e.label,line:e.line,position:e.position,visible:e.visible},createVisual:function(){t.createVisual(),t.renderChildren();var e=t.visual;return delete t.visual,e}}),t.addVisual()):M.fn.renderVisual.call(t)},createLine:function(){var t,e=this.options.line;this.linePoints&&(t=K.Path.fromPoints(this.linePoints,{stroke:{color:e.color,width:e.width,dashType:e.dashType}}),x(t),this.visual.append(t))},click:function(t,e){var n=this.eventArgs(e);t.trigger(Et,n)||e.preventDefault()},hover:function(t,e){var n=this.eventArgs(e);t.trigger(Bt,n)||e.preventDefault()},leave:function(t){t._unsetActivePoint()},eventArgs:function(e){var n=this,i=n.options;return{element:t(e.target),text:q(i.label)?i.label.text:"",dataItem:n.dataItem,series:n.series,value:n.value,category:n.category,visual:n.visual}}}),F=M.extend({init:function(t,e){this.pointData=e,M.fn.init.call(this,t)},options:{type:ft,align:ht,vAlign:ht},getElement:function(){var t,e,n=this,i=n.options,o=i.type,r=i.rotation,s=n.paddingBox,a=s.center(),l=s.width()/2;if(i.visible&&n.hasBox())return e=n.visualStyle(),o===ft?t=new K.Circle(new Q.Circle([u(s.x1+l,ut),u(s.y1+s.height()/2,ut)],l),e):o===Ot?t=K.Path.fromPoints([[s.x1+l,s.y1],[s.x1,s.y2],[s.x2,s.y2]],e).close():o===pt?(t=new K.MultiPath(e),t.moveTo(s.x1,s.y1).lineTo(s.x2,s.y2),t.moveTo(s.x1,s.y2).lineTo(s.x2,s.y1)):t=K.Path.fromRect(s.toRect(),e),r&&t.transform(Q.transform().rotate(-r,[a.x,a.y])),t.options.zIndex=this.options.zIndex,t},createElement:function(){var t,e=this,n=e.options.visual,i=e.pointData||{};return t=n?n({value:i.value,dataItem:i.dataItem,sender:e.getChart(),series:i.series,category:i.category,rect:e.paddingBox.toRect(),options:e.visualOptions(),createVisual:function(){return e.getElement()}}):e.getElement()},visualOptions:function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},createVisual:function(){this.visual=this.createElement()}}),V=R.extend({init:function(t,e,n){var i=this,o=i.initDefaults(t,e,n);R.fn.init.call(i,o)},startValue:function(){return 0},options:{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:lt},labels:{format:"#.####################"},zIndex:1},initDefaults:function(t,e,n){var i,o=this,s=n.narrowRange,a=o.autoAxisMin(t,e,s),l=o.autoAxisMax(t,e,s),u=r(a,l),d={majorUnit:u};return n.roundToMajorUnit!==!1&&(0>a&&f(a,u,1/3)&&(a-=u),l>0&&f(l,u,1/3)&&(l+=u)),d.min=h(a,u),d.max=c(l,u),this.totalMin=q(n.min)?rt.min(d.min,n.min):d.min,this.totalMax=q(n.max)?rt.max(d.max,n.max):d.max,this.totalMajorUnit=u,n&&(i=q(n.min)||q(n.max),i&&n.min===n.max&&(n.min>0?n.min=0:n.max=1),n.majorUnit?(d.min=h(d.min,n.majorUnit),d.max=c(d.max,n.majorUnit)):i&&(n=st(d,n),d.majorUnit=r(n.min,n.max))),d.minorUnit=(n.majorUnit||d.majorUnit)/5,st(d,n)},range:function(){var t=this.options;return{min:t.min,max:t.max}},autoAxisMax:function(t,e,n){var i,o;if(!t&&!e)return 1;if(0>=t&&0>=e){if(e=t==e?0:e,o=rt.abs((e-t)/e),n===!1||!n&&o>Ut)return 0;i=rt.min(0,e-(t-e)/2)}else t=t==e?0:t,i=e;return i},autoAxisMin:function(t,e,n){var i,o;if(!t&&!e)return 0;if(t>=0&&e>=0){if(t=t==e?0:t,o=(e-t)/e,n===!1||!n&&o>Ut)return 0;i=rt.max(0,t-(e-t)/2)}else e=t==e?0:e,i=t;return i},getDivisions:function(t){if(0===t)return 1;var e=this.options,n=e.max-e.min;return rt.floor(u(n/t,ut))+1},getTickPositions:function(t,e){var n,i=this,o=i.options,r=o.vertical,s=o.reverse,a=i.lineBox(),l=r?a.height():a.width(),c=o.max-o.min,h=l/c,d=t*h,f=0,p=i.getDivisions(t),g=(r?-1:1)*(s?-1:1),m=1===g?1:2,v=a[(r?Ht:Nt)+m],y=[];for(e&&(f=e/t),n=0;p>n;n++)n%f!==0&&y.push(u(v,ut)),v+=d*g;return y},getMajorTickPositions:function(){var t=this;return t.getTickPositions(t.options.majorUnit)},getMinorTickPositions:function(){var t=this;return t.getTickPositions(t.options.minorUnit)},getSlot:function(t,e,n){var i,o,r=this,s=r.options,a=s.reverse,l=s.vertical,c=l?Ht:Nt,h=r.lineBox(),u=h[c+(a?2:1)],d=l?h.height():h.width(),f=a?-1:1,p=f*(d/(s.max-s.min)),g=new C(h.x1,h.y1,h.x1,h.y1);return q(t)||(t=e||0),q(e)||(e=t||0),n&&(t=rt.max(rt.min(t,s.max),s.min),e=rt.max(rt.min(e,s.max),s.min)),l?(i=s.max-rt.max(t,e),o=s.max-rt.min(t,e)):(i=rt.min(t,e)-s.min,o=rt.max(t,e)-s.min),g[c+1]=rt.max(rt.min(u+p*(a?o:i),kt),-kt),g[c+2]=rt.max(rt.min(u+p*(a?i:o),kt),-kt),g},getValue:function(t){var e,n=this,i=n.options,o=i.reverse,r=i.vertical,s=1*i.max,a=1*i.min,l=r?Ht:Nt,c=n.lineBox(),h=c[l+(o?2:1)],d=r?c.height():c.width(),f=o?-1:1,p=f*(t[l]-h),g=(s-a)/d,m=p*g;return 0>p||p>d?null:(e=r?s-m:a+m,u(e,yt))},translateRange:function(t){var e=this,n=e.options,i=e.lineBox(),o=n.vertical,r=n.reverse,s=o?i.height():i.width(),a=n.max-n.min,l=s/a,c=u(t/l,yt);return!o&&!r||o&&r||(c=-c),{min:n.min+c,max:n.max+c}},scaleRange:function(t){var e=this,n=e.options,i=-t*n.majorUnit;return{min:n.min-i,max:n.max+i}},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(t,e){var n=this,i=n.options,o=u(i.min+t*i.majorUnit,yt),r=n.axisLabelText(o,null,e);return new L(o,r,t,null,e)},shouldRenderNote:function(t){var e=this.range();return t>=e.min&&e.max>=t},pan:function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax)},pointsRange:function(t,e){var n=this.getValue(t),i=this.getValue(e),o=rt.min(n,i),r=rt.max(n,i);return{min:o,max:r}},zoomRange:function(t){var n=this.scaleRange(t),i=this.totalMax,o=this.totalMin,r=G.limitValue(n.min,o,i),s=G.limitValue(n.max,o,i),a=this.options.max-this.options.min;return this.totalMajorUnit>a||s-r>=this.totalMajorUnit?{min:r,max:s}:e}}),N=R.extend({init:function(t,e,n){this.options=this._initOptions(t,e,n),R.fn.init.call(this,n)},startValue:function(){return this.options.min},options:{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:lt},zIndex:1},getSlot:function(t,n,i){var o,r,s=this,a=s.options,l=a.reverse,c=a.vertical,h=c?Ht:Nt,u=s.lineBox(),f=u[h+(l?2:1)],p=c?u.height():u.width(),g=l?-1:1,m=a.majorUnit,v=s.logMin,y=s.logMax,_=g*(p/(y-v)),w=new C(u.x1,u.y1,u.x1,u.y1);return q(t)||(t=n||1),q(n)||(n=t||1),0>=t||0>=n?e:(i&&(t=rt.max(rt.min(t,a.max),a.min),n=rt.max(rt.min(n,a.max),a.min)),t=d(t,m),n=d(n,m),c?(o=y-rt.max(t,n),r=y-rt.min(t,n)):(o=rt.min(t,n)-v,r=rt.max(t,n)-v),w[h+1]=f+_*(l?r:o),w[h+2]=f+_*(l?o:r),w)},getValue:function(t){var e,n=this,i=n.options,o=i.reverse,r=i.vertical,s=n.lineBox(),a=i.majorUnit,l=n.logMin,c=n.logMax,h=r===o?1:-1,d=1===h?1:2,f=r?s.height():s.width(),p=(c-l)/f,g=r?Ht:Nt,m=s[g+d],v=h*(t[g]-m),y=v*p;return 0>v||v>f?null:(e=l+y,u(rt.pow(a,e),yt))},range:function(){var t=this.options;return{min:t.min,max:t.max}},scaleRange:function(t){var e=this,n=e.options,i=n.majorUnit,o=-t;return{min:rt.pow(i,e.logMin-o),max:rt.pow(i,e.logMax+o)}},translateRange:function(t){var e=this,n=e.options,i=n.majorUnit,o=e.lineBox(),r=n.vertical,s=n.reverse,a=r?o.height():o.width(),l=a/(e.logMax-e.logMin),c=u(t/l,yt);return!r&&!s||r&&s||(c=-c),{min:rt.pow(i,e.logMin+c),max:rt.pow(i,e.logMax+c)}},labelsCount:function(){var t=this,e=rt.floor(t.logMax),n=rt.floor(e-t.logMin)+1;return n},getMajorTickPositions:function(){var t=this,e=[];return t.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},createTicks:function(t){function e(e,n){h.tickX=a?s.x2:s.x2-n.size,h.tickY=a?s.y1-n.size:s.y1,h.position=e,t.append(i(h,n))}var n=this,o=[],r=n.options,s=n.lineBox(),a=r.labels.mirror,l=r.majorTicks,c=r.minorTicks,h={vertical:r.vertical};return l.visible&&n.traverseMajorTicksPositions(e,l),c.visible&&n.traverseMinorTicksPositions(e,c),o},createGridLines:function(t){function e(t,e){l(t,u)||(h.position=t,d.append(o(h,e)),u.push(t))}var n=this,i=n.options,r=i.majorGridLines,s=i.minorGridLines,a=i.vertical,c=t.lineBox(),h={lineStart:c[a?"x1":"y1"],lineEnd:c[a?"x2":"y2"],vertical:a},u=[],d=this.gridLinesVisual();return r.visible&&n.traverseMajorTicksPositions(e,r),s.visible&&n.traverseMinorTicksPositions(e,s),d.children},traverseMajorTicksPositions:function(t,e){var n,i,o=this,r=o._lineOptions(),s=r.lineStart,a=r.step,l=o.logMin,c=o.logMax;for(n=rt.ceil(l)+e.skip;c>=n;n+=e.step)i=u(s+a*(n-l),yt),t(i,e)},traverseMinorTicksPositions:function(t,e){var n,i,o,r,s,a=this,l=a.options,c=a._lineOptions(),h=c.lineStart,f=c.step,p=l.majorUnit,g=a.logMin,m=a.logMax,v=rt.floor(g),y=l.max,_=l.min,w=l.minorUnit;for(n=v;m>n;n++)for(r=a._minorIntervalOptions(n),s=e.skip;w>s&&(i=r.value+s*r.minorStep,!(i>y));s+=e.step)i>=_&&(o=u(h+f*(d(i,p)-g),yt),t(o,e))},createAxisLabel:function(t,e){var n=this,i=n.options,o=rt.ceil(n.logMin+t),r=Math.pow(i.majorUnit,o),s=n.axisLabelText(r,null,e);return new L(r,s,t,null,e)},shouldRenderNote:function(t){var e=this.range();return t>=e.min&&e.max>=t},_throwNegativeValuesError:function(){throw Error("Non positive values cannot be used for a logarithmic axis")},_initOptions:function(t,e,n){var i=this,o=st({},i.options,{min:t,max:e},n),r=o.min,s=o.max,a=o.majorUnit,l=this._autoMax(e,a),c=this._autoMin(t,e,o);return 0>=o.axisCrossingValue&&i._throwNegativeValuesError(),q(n.max)?0>=n.max&&i._throwNegativeValuesError():s=l,q(n.min)?0>=n.min&&i._throwNegativeValuesError():r=c,this.totalMin=q(n.min)?rt.min(c,n.min):c,this.totalMax=q(n.max)?rt.max(l,n.max):l,i.logMin=u(d(r,a),yt),i.logMax=u(d(s,a),yt),o.max=s,o.min=r,o.minorUnit=n.minorUnit||u(a-1,yt),o},_autoMin:function(t,e,n){var i=t,o=n.majorUnit;return 0>=t?i=1>=e?rt.pow(o,-2):1:n.narrowRange||(i=rt.pow(o,rt.floor(d(t,o)))),i},_autoMax:function(t,e){var n,i=u(d(t,e),yt)%1;return n=0>=t?e:0!==i&&(.3>i||i>.9)?rt.pow(e,d(t,e)+.2):rt.pow(e,rt.ceil(d(t,e)))},pan:function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,-t)},pointsRange:function(t,e){var n=this.getValue(t),i=this.getValue(e),o=rt.min(n,i),r=rt.max(n,i);return{min:o,max:r}},zoomRange:function(t){var n=this.options,i=this.scaleRange(t),o=this.totalMax,r=this.totalMin,s=G.limitValue(i.min,r,o),a=G.limitValue(i.max,r,o),l=n.majorUnit,c=a>s&&n.min&&n.max&&u(d(n.max,l)-d(n.min,l),yt)<1,h=!(n.min===r&&n.max===o)&&u(d(a,l)-d(s,l),yt)>=1;return c||h?{min:s,max:a}:e},_minorIntervalOptions:function(t){var e=this.options.majorUnit,n=rt.pow(e,t),i=rt.pow(e,t+1),o=i-n,r=o/this.options.minorUnit;return{value:n,minorStep:r}},_lineOptions:function(){var t=this,e=t.options,n=e.reverse,i=e.vertical,o=i?Ht:Nt,r=t.lineBox(),s=i===n?1:-1,a=1===s?1:2,l=i?r.height():r.width(),c=s*(l/(t.logMax-t.logMin)),h=r[o+a];return{step:c,lineStart:h,lineBox:r}}}),X.Gradients={glass:{type:At,rotation:0,stops:[{offset:0,color:Vt,opacity:0},{offset:.25,color:Vt,opacity:.3},{offset:1,color:Vt,opacity:0}]},sharpBevel:{type:zt,stops:[{offset:0,color:Vt,opacity:.55},{offset:.65,color:Vt,opacity:0},{offset:.95,color:Vt,opacity:.25}]},roundedBevel:{type:zt,stops:[{offset:.33,color:Vt,opacity:.06},{offset:.83,color:Vt,opacity:.2},{offset:.95,color:Vt,opacity:0}]},roundedGlass:{type:zt,supportVML:!1,stops:[{offset:0,color:Vt,opacity:0},{offset:.5,color:Vt,opacity:.3},{offset:.99,color:Vt,opacity:0}]},sharpGlass:{type:zt,supportVML:!1,stops:[{offset:0,color:Vt,opacity:.2},{offset:.15,color:Vt,opacity:.15},{offset:.17,color:Vt,opacity:.35},{offset:.85,color:Vt,opacity:.05},{offset:.87,color:Vt,opacity:.15},{offset:.99,color:Vt,opacity:0}]}},H={extend:function(t,e){if(!t.exportVisual)throw Error("Mixin target has no exportVisual method defined.");t.exportSVG=this.exportSVG,t.exportImage=this.exportImage,t.exportPDF=this.exportPDF,e||(t.svg=this.svg,t.imageDataURL=this.imageDataURL)},exportSVG:function(t){return K.exportSVG(this.exportVisual(),t)},exportImage:function(t){return K.exportImage(this.exportVisual(t),t)},exportPDF:function(t){return K.exportPDF(this.exportVisual(),t)},svg:function(){if(K.svg.Surface)return K.svg._exportGroup(this.exportVisual());throw Error("SVG Export failed. Unable to export instantiate kendo.drawing.svg.Surface")},imageDataURL:function(){var e,n,i;if(!j.support.canvas)return null;if(K.canvas.Surface)return e=t("<div />").css({display:"none",width:this.element.width(),height:this.element.height()}).appendTo(document.body),n=new K.canvas.Surface(e),n.draw(this.exportVisual()),i=n._rootElement.toDataURL(),n.destroy(),e.remove(),i;throw Error("Image Export failed. Unable to export instantiate kendo.drawing.canvas.Surface")}},U=function(t){this.closed=t},U.prototype=U.fn={WEIGHT:.333,EXTREMUM_ALLOWED_DEVIATION:.01,process:function(t){var e,n,i,o,r,s,a,l,c,h,u=this,d=u.closed,f=t.slice(0),p=f.length,g=[];if(p>2&&(u.removeDuplicates(0,f),p=f.length),2>p||2==p&&f[0].equals(f[1]))return g;for(e=f[0],n=f[1],i=f[2],g.push(new K.Segment(e));e.equals(f[p-1]);)d=!0,f.pop(),p--;if(2==p)return a=u.tangent(e,n,Nt,Ht),$(g).controlOut(u.firstControlPoint(a,e,n,Nt,Ht)),g.push(new K.Segment(n,u.secondControlPoint(a,e,n,Nt,Ht))),g;for(d?(e=f[p-1],n=f[0],i=f[1],o=u.controlPoints(e,n,i),r=o[1],s=o[0]):(a=u.tangent(e,n,Nt,Ht),r=u.firstControlPoint(a,e,n,Nt,Ht)),l=r,c=0;p-3>=c;c++)u.removeDuplicates(c,f),p=f.length,p>=c+3&&(e=f[c],n=f[c+1],i=f[c+2],o=u.controlPoints(e,n,i),$(g).controlOut(l),l=o[1],h=o[0],g.push(new K.Segment(n,h)));return d?(e=f[p-2],n=f[p-1],i=f[0],o=u.controlPoints(e,n,i),$(g).controlOut(l),g.push(new K.Segment(n,o[0])),$(g).controlOut(o[1]),g.push(new K.Segment(i,s))):(a=u.tangent(n,i,Nt,Ht),$(g).controlOut(l),g.push(new K.Segment(i,u.secondControlPoint(a,n,i,Nt,Ht)))),g},removeDuplicates:function(t,e){for(;e[t].equals(e[t+1])||e[t+1].equals(e[t+2]);)e.splice(t+1,1)},invertAxis:function(t,e,n){var i,o,r=this,s=!1;return t.x===e.x?s=!0:e.x===n.x?(n.y>e.y&&e.y>=t.y||e.y>n.y&&t.y>=e.y)&&(s=!0):(i=r.lineFunction(t,e),o=r.calculateFunction(i,n.x),e.y>=t.y&&o>=n.y||t.y>=e.y&&n.y>=o||(s=!0)),s},isLine:function(t,e,n){var i=this,o=i.lineFunction(t,e),r=i.calculateFunction(o,n.x);return t.x==e.x&&e.x==n.x||u(r,1)===u(n.y,1)},lineFunction:function(t,e){var n=(e.y-t.y)/(e.x-t.x),i=t.y-n*t.x;return[i,n]},controlPoints:function(t,e,n){var i,o,r,s,a,l,c=this,h=Nt,u=Ht,d=!1,f=!1,p=c.EXTREMUM_ALLOWED_DEVIATION;return c.isLine(t,e,n)?i=c.tangent(t,e,Nt,Ht):(o={x:c.isMonotonicByField(t,e,n,Nt),y:c.isMonotonicByField(t,e,n,Ht)},o.x&&o.y?(i=c.tangent(t,n,Nt,Ht),d=!0):(c.invertAxis(t,e,n)&&(h=Ht,u=Nt),o[h]?i=0:(a=t[u]>n[u]&&e[u]>=t[u]||n[u]>t[u]&&t[u]>=e[u]?c.sign((n[u]-t[u])*(e[h]-t[h])):-c.sign((n[h]-t[h])*(e[u]-t[u])),i=p*a,f=!0))),s=c.secondControlPoint(i,t,e,h,u),f&&(l=h,h=u,u=l),r=c.firstControlPoint(i,e,n,h,u),d&&(c.restrictControlPoint(t,e,s,i),c.restrictControlPoint(e,n,r,i)),[s,r]},sign:function(t){return 0>=t?-1:1},restrictControlPoint:function(t,e,n,i){e.y>t.y?n.y>e.y?(n.x=t.x+(e.y-t.y)/i,n.y=e.y):t.y>n.y&&(n.x=e.x-(e.y-t.y)/i,n.y=t.y):e.y>n.y?(n.x=t.x-(t.y-e.y)/i,n.y=e.y):n.y>t.y&&(n.x=e.x+(t.y-e.y)/i,n.y=t.y)},tangent:function(t,e,n,i){var o,r=e[n]-t[n],s=e[i]-t[i];return o=0===r?0:s/r},isMonotonicByField:function(t,e,n,i){return n[i]>e[i]&&e[i]>t[i]||e[i]>n[i]&&t[i]>e[i]},firstControlPoint:function(t,e,n,i,o){var r=this,s=e[i],a=n[i],l=(a-s)*r.WEIGHT;return r.point(s+l,e[o]+l*t,i,o)},secondControlPoint:function(t,e,n,i,o){var r=this,s=e[i],a=n[i],l=(a-s)*r.WEIGHT;return r.point(a-l,n[o]-l*t,i,o)},point:function(t,e,n,i){var o=new Q.Point;return o[n]=t,o[i]=e,o},calculateFunction:function(t,e){var n,i=0,o=t.length;for(n=0;o>n;n++)i+=Math.pow(e,n)*t[n];return i}},w._element=document.createElement("span"),st(j.dataviz,{AXIS_LABEL_CLICK:at,COORD_PRECISION:ut,DEFAULT_PRECISION:yt,DEFAULT_WIDTH:_t,DEFAULT_HEIGHT:mt,DEFAULT_FONT:gt,INITIAL_ANIMATION_DURATION:Ct,NOTE_CLICK:Et,NOTE_HOVER:Bt,CLIP:dt,Axis:R,AxisLabel:L,Box2D:C,BoxElement:M,ChartElement:D,CurveProcessor:U,ExportMixin:H,FloatElement:B,LogarithmicAxis:N,Note:O,NumericAxis:V,Point2D:jt,Ring:S,RootElement:P,Sector:T,ShapeBuilder:A,ShapeElement:F,Text:E,TextBox:I,Title:z,alignPathToPixel:x,autoFormat:m,autoMajorUnit:r,boxDiff:a,dateComparer:y,decodeEntities:w,getSpacing:n,inArray:l,interpolateValue:p,mwDelta:_,rectToBox:k,rotatePoint:s,round:u,ceil:c,floor:h})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.themes.min",["kendo.dataviz.core.min"],t)}(function(){return function(t){function e(e,n){return t.map(e,function(t,e){return[[t,n[e]]]})}var n=window.kendo,i=n.dataviz.ui,o=n.deepExtend,r=1.5,s=.4,a="#000",l="Arial,Helvetica,sans-serif",c="11px "+l,h="12px "+l,u="16px "+l,d="#fff",f={title:{font:u},legend:{labels:{font:h}},seriesDefaults:{visible:!0,labels:{font:c},donut:{margin:1},line:{width:2},vericalLine:{width:2},scatterLine:{width:1},area:{opacity:.4,markers:{visible:!1,size:6},highlight:{markers:{border:{color:"#fff",opacity:1,width:1}}},line:{opacity:1,width:0}},verticalArea:{opacity:.4,markers:{visible:!1,size:6},line:{opacity:1,width:0}},radarLine:{width:2,markers:{visible:!1}},radarArea:{opacity:.5,markers:{visible:!1,size:6},line:{opacity:1,width:0}},candlestick:{line:{width:1,color:a},border:{width:1,_brightness:.8},gap:1,spacing:.3,downColor:d,highlight:{line:{width:2},border:{width:2,opacity:1}}},ohlc:{line:{width:1},gap:1,spacing:.3,highlight:{line:{width:3,opacity:1}}},bubble:{opacity:.6,border:{width:0},labels:{background:"transparent"}},bar:{gap:r,spacing:s},column:{gap:r,spacing:s},rangeColumn:{gap:r,spacing:s},rangeBar:{gap:r,spacing:s},waterfall:{gap:.5,spacing:s,line:{width:1,color:a}},horizontalWaterfall:{gap:.5,spacing:s,line:{width:1,color:a}},bullet:{gap:r,spacing:s,target:{color:"#ff0000"}},verticalBullet:{gap:r,spacing:s,target:{color:"#ff0000"}},boxPlot:{outliersField:"",meanField:"",whiskers:{width:1,color:a},mean:{width:1,color:a},median:{width:1,color:a},border:{width:1,_brightness:.8},gap:1,spacing:.3,downColor:d,highlight:{whiskers:{width:2},border:{width:2,opacity:1}}},funnel:{labels:{color:"",background:""}},notes:{icon:{border:{width:1}},label:{padding:3,font:h},line:{length:10,width:1},visible:!0}},categoryAxis:{majorGridLines:{visible:!0}},axisDefaults:{labels:{font:h},title:{font:u,margin:5},crosshair:{tooltip:{font:h}},notes:{icon:{size:7,border:{width:1}},label:{padding:3,font:h},line:{length:10,width:1},visible:!0}},tooltip:{font:h},navigator:{pane:{height:90,margin:{top:10}}}},p={scale:{labels:{font:h}}},g={shapeDefaults:{hover:{opacity:.2},stroke:{width:0}},editable:{resize:{handles:{width:7,height:7}}},selectable:{stroke:{width:1,dashType:"dot"}},connectionDefaults:{stroke:{width:2},selection:{handles:{width:8,height:8}},editable:{tools:["edit","delete"]}}},m=i.themes,v=i.registerTheme=function(t,e){var n,i={};i.chart=o({},f,e.chart),i.gauge=o({},p,e.gauge),i.diagram=o({},g,e.diagram),i.treeMap=o({},e.treeMap),n=i.chart.seriesDefaults,n.verticalLine=o({},n.line),n.verticalArea=o({},n.area),n.polarArea=o({},n.radarArea),n.polarLine=o({},n.radarLine),m[t]=i};v("black",{chart:{title:{color:d},legend:{labels:{color:d},inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}},seriesDefaults:{labels:{color:d},errorBars:{color:d},notes:{icon:{background:"#3b3b3b",border:{color:"#8e8e8e"}},label:{color:d},line:{color:"#8e8e8e"}},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#3d3d3d"}},scatter:{markers:{background:"#3d3d3d"}},scatterLine:{markers:{background:"#3d3d3d"}},waterfall:{line:{color:"#8e8e8e"}},horizontalWaterfall:{line:{color:"#8e8e8e"}},candlestick:{downColor:"#555",line:{color:d},border:{_brightness:1.5,opacity:1},highlight:{border:{color:d,opacity:.2}}},ohlc:{line:{color:d}}},chartArea:{background:"#3d3d3d"},seriesColors:["#0081da","#3aafff","#99c900","#ffeb3d","#b20753","#ff4195"],axisDefaults:{line:{color:"#8e8e8e"},labels:{color:d},majorGridLines:{color:"#545454"},minorGridLines:{color:"#454545"},title:{color:d},crosshair:{color:"#8e8e8e"},notes:{icon:{background:"#3b3b3b",border:{color:"#8e8e8e"}},label:{color:d},line:{color:"#8e8e8e"}}}},gauge:{pointer:{color:"#0070e4"},scale:{rangePlaceholderColor:"#1d1d1d",labels:{color:d},minorTicks:{color:d},majorTicks:{color:d},line:{color:d}}},diagram:{shapeDefaults:{fill:{color:"#0066cc"},connectorDefaults:{fill:{color:d},stroke:{color:"#384049"},hover:{fill:{color:"#3d3d3d"},stroke:{color:"#efefef"}}},content:{color:d}},editable:{resize:{handles:{fill:{color:"#3d3d3d"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:d}}}},rotate:{thumb:{stroke:{color:d},fill:{color:d}}}},selectable:{stroke:{color:d}},connectionDefaults:{stroke:{color:d},content:{color:d},selection:{handles:{fill:{color:"#3d3d3d"},stroke:{color:"#efefef"}}}}},treeMap:{colors:[["#0081da","#314b5c"],["#3aafff","#3c5464"],["#99c900","#4f5931"],["#ffeb3d","#64603d"],["#b20753","#543241"],["#ff4195","#643e4f"]]}}),v("blueopal",{chart:{title:{color:"#293135"},legend:{labels:{color:"#293135"},inactiveItems:{labels:{color:"#27A5BA"},markers:{color:"#27A5BA"}}},seriesDefaults:{labels:{color:a,background:d,opacity:.5},errorBars:{color:"#293135"},candlestick:{downColor:"#c4d0d5",line:{color:"#9aabb2"}},waterfall:{line:{color:"#9aabb2"}},horizontalWaterfall:{line:{color:"#9aabb2"}},notes:{icon:{background:"transparent",border:{color:"#9aabb2"}},label:{color:"#293135"},line:{color:"#9aabb2"}}},seriesColors:["#0069a5","#0098ee","#7bd2f6","#ffb800","#ff8517","#e34a00"],axisDefaults:{line:{color:"#9aabb2"},labels:{color:"#293135"},majorGridLines:{color:"#c4d0d5"},minorGridLines:{color:"#edf1f2"},title:{color:"#293135"},crosshair:{color:"#9aabb2"},notes:{icon:{background:"transparent",border:{color:"#9aabb2"}},label:{color:"#293135"},line:{color:"#9aabb2"}}}},gauge:{pointer:{color:"#005c83"},scale:{rangePlaceholderColor:"#daecf4",labels:{color:"#293135"},minorTicks:{color:"#293135"},majorTicks:{color:"#293135"},line:{color:"#293135"}}},diagram:{shapeDefaults:{fill:{color:"#7ec6e3"},connectorDefaults:{fill:{color:"#003f59"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#003f59"}}},content:{color:"#293135"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#003f59"},hover:{fill:{color:"#003f59"},stroke:{color:"#003f59"}}}},rotate:{thumb:{stroke:{color:"#003f59"},fill:{color:"#003f59"}}}},selectable:{stroke:{color:"#003f59"}},connectionDefaults:{stroke:{color:"#003f59"},content:{color:"#293135"},selection:{handles:{fill:{color:"#3d3d3d"},stroke:{color:"#efefef"}}}}},treeMap:{colors:[["#0069a5","#bad7e7"],["#0098ee","#b9e0f5"],["#7bd2f6","#ceeaf6"],["#ffb800","#e6e3c4"],["#ff8517","#e4d8c8"],["#e34a00","#ddccc2"]]}}),v("highcontrast",{chart:{title:{color:"#ffffff"},legend:{labels:{color:"#ffffff"},inactiveItems:{labels:{color:"#66465B"},markers:{color:"#66465B"}}},seriesDefaults:{labels:{color:"#ffffff"},errorBars:{color:"#ffffff"},notes:{icon:{background:"transparent",border:{color:"#ffffff"}},label:{color:"#ffffff"},line:{color:"#ffffff"}},pie:{overlay:{gradient:"sharpGlass"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#2c232b"}},scatter:{markers:{background:"#2c232b"}},scatterLine:{markers:{background:"#2c232b"}},area:{opacity:.5},waterfall:{line:{color:"#ffffff"}},horizontalWaterfall:{line:{color:"#ffffff"}},candlestick:{downColor:"#664e62",line:{color:"#ffffff"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:"#ffffff",opacity:1}}},ohlc:{line:{color:"#ffffff"}}},chartArea:{background:"#2c232b"},seriesColors:["#a7008f","#ffb800","#3aafff","#99c900","#b20753","#ff4195"],axisDefaults:{line:{color:"#ffffff"},labels:{color:"#ffffff"},majorGridLines:{color:"#664e62"},minorGridLines:{color:"#4f394b"},title:{color:"#ffffff"},crosshair:{color:"#ffffff"},notes:{icon:{background:"transparent",border:{color:"#ffffff"}},label:{color:"#ffffff"},line:{color:"#ffffff"}}}},gauge:{pointer:{color:"#a7008f"},scale:{rangePlaceholderColor:"#2c232b",labels:{color:"#ffffff"},minorTicks:{color:"#2c232b"},majorTicks:{color:"#664e62"},line:{color:"#ffffff"}}},diagram:{shapeDefaults:{fill:{color:"#a7018f"},connectorDefaults:{fill:{color:d},stroke:{color:"#2c232b"},hover:{fill:{color:"#2c232b"},stroke:{color:d}}},content:{color:d}},editable:{resize:{handles:{fill:{color:"#2c232b"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:d}}}},rotate:{thumb:{stroke:{color:d},fill:{color:d}}}},selectable:{stroke:{color:d}},connectionDefaults:{stroke:{color:d},content:{color:d},selection:{handles:{fill:{color:"#2c232b"},stroke:{color:d}}}}},treeMap:{colors:[["#a7008f","#451c3f"],["#ffb800","#564122"],["#3aafff","#2f3f55"],["#99c900","#424422"],["#b20753","#471d33"],["#ff4195","#562940"]]}}),v("default",{chart:{title:{color:"#8e8e8e"},legend:{labels:{color:"#232323"},inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}},seriesDefaults:{labels:{color:a,background:d,opacity:.5},errorBars:{color:"#232323"},candlestick:{downColor:"#dedede",line:{color:"#8d8d8d"}},waterfall:{line:{color:"#8e8e8e"}},horizontalWaterfall:{line:{color:"#8e8e8e"}},notes:{icon:{background:"transparent",border:{color:"#8e8e8e"}},label:{color:"#232323"},line:{color:"#8e8e8e"}}},seriesColors:["#ff6800","#a0a700","#ff8d00","#678900","#ffb53c","#396000"],axisDefaults:{line:{color:"#8e8e8e"},labels:{color:"#232323"},minorGridLines:{color:"#f0f0f0"},majorGridLines:{color:"#dfdfdf"},title:{color:"#232323"},crosshair:{color:"#8e8e8e"},notes:{icon:{background:"transparent",border:{color:"#8e8e8e"}},label:{color:"#232323"},line:{color:"#8e8e8e"}}}},gauge:{pointer:{color:"#ea7001"},scale:{rangePlaceholderColor:"#dedede",labels:{color:"#2e2e2e"},minorTicks:{color:"#2e2e2e"},majorTicks:{color:"#2e2e2e"},line:{color:"#2e2e2e"}}},diagram:{shapeDefaults:{fill:{color:"#e15613"},connectorDefaults:{fill:{color:"#282828"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#282828"}}},content:{color:"#2e2e2e"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#282828"},hover:{fill:{color:"#282828"},stroke:{color:"#282828"}}}},rotate:{thumb:{stroke:{color:"#282828"},fill:{color:"#282828"}}}},selectable:{stroke:{color:"#a7018f"}},connectionDefaults:{stroke:{color:"#282828"},content:{color:"#2e2e2e"},selection:{handles:{fill:{color:d},stroke:{color:"#282828"}}}}},treeMap:{colors:[["#ff6800","#edcfba"],["#a0a700","#dadcba"],["#ff8d00","#edd7ba"],["#678900","#cfd6ba"],["#ffb53c","#eddfc6"],["#396000","#c6ceba"]]}}),v("silver",{chart:{title:{color:"#4e5968"},legend:{labels:{color:"#4e5968"},inactiveItems:{labels:{color:"#B1BCC8"},markers:{color:"#B1BCC8"}}},seriesDefaults:{labels:{color:"#293135",background:"#eaeaec",opacity:.5},errorBars:{color:"#4e5968"},notes:{icon:{background:"transparent",border:{color:"#4e5968"}},label:{color:"#4e5968"},line:{color:"#4e5968"}},line:{markers:{background:"#eaeaec"}},scatter:{markers:{background:"#eaeaec"}},scatterLine:{markers:{background:"#eaeaec"}},pie:{connectors:{color:"#A6B1C0"}},donut:{connectors:{color:"#A6B1C0"}},waterfall:{line:{color:"#a6b1c0"}},horizontalWaterfall:{line:{color:"#a6b1c0"}},candlestick:{downColor:"#a6afbe"}},chartArea:{background:"#eaeaec"},seriesColors:["#007bc3","#76b800","#ffae00","#ef4c00","#a419b7","#430B62"],axisDefaults:{line:{color:"#a6b1c0"},labels:{color:"#4e5968"},majorGridLines:{color:"#dcdcdf"},minorGridLines:{color:"#eeeeef"},title:{color:"#4e5968"},crosshair:{color:"#a6b1c0"},notes:{icon:{background:"transparent",border:{color:"#4e5968"}},label:{color:"#4e5968"},line:{color:"#4e5968"}}}},gauge:{pointer:{color:"#0879c0"},scale:{rangePlaceholderColor:"#f3f3f4",labels:{color:"#515967"},minorTicks:{color:"#515967"},majorTicks:{color:"#515967"},line:{color:"#515967"}}},diagram:{shapeDefaults:{fill:{color:"#1c82c2"},connectorDefaults:{fill:{color:"#515967"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#282828"}}},content:{color:"#515967"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#515967"},hover:{fill:{color:"#515967"},stroke:{color:"#515967"}}}},rotate:{thumb:{stroke:{color:"#515967"},fill:{color:"#515967"}}}},selectable:{stroke:{color:"#515967"}},connectionDefaults:{stroke:{color:"#515967"},content:{color:"#515967"},selection:{handles:{fill:{color:d},stroke:{color:"#515967"
}}}}},treeMap:{colors:[["#007bc3","#c2dbea"],["#76b800","#dae7c3"],["#ffae00","#f5e5c3"],["#ef4c00","#f2d2c3"],["#a419b7","#e3c7e8"],["#430b62","#d0c5d7"]]}}),v("metro",{chart:{title:{color:"#777777"},legend:{labels:{color:"#777777"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:a},errorBars:{color:"#777777"},notes:{icon:{background:"transparent",border:{color:"#777777"}},label:{color:"#777777"},line:{color:"#777777"}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},waterfall:{line:{color:"#c7c7c7"}},horizontalWaterfall:{line:{color:"#c7c7c7"}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:["#8ebc00","#309b46","#25a0da","#ff6900","#e61e26","#d8e404","#16aba9","#7e51a1","#313131","#ed1691"],axisDefaults:{line:{color:"#c7c7c7"},labels:{color:"#777777"},minorGridLines:{color:"#c7c7c7"},majorGridLines:{color:"#c7c7c7"},title:{color:"#777777"},crosshair:{color:"#c7c7c7"},notes:{icon:{background:"transparent",border:{color:"#777777"}},label:{color:"#777777"},line:{color:"#777777"}}}},gauge:{pointer:{color:"#8ebc00"},scale:{rangePlaceholderColor:"#e6e6e6",labels:{color:"#777"},minorTicks:{color:"#777"},majorTicks:{color:"#777"},line:{color:"#777"}}},diagram:{shapeDefaults:{fill:{color:"#8ebc00"},connectorDefaults:{fill:{color:a},stroke:{color:d},hover:{fill:{color:d},stroke:{color:a}}},content:{color:"#777"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#787878"},hover:{fill:{color:"#787878"},stroke:{color:"#787878"}}}},rotate:{thumb:{stroke:{color:"#787878"},fill:{color:"#787878"}}}},selectable:{stroke:{color:"#515967"}},connectionDefaults:{stroke:{color:"#787878"},content:{color:"#777"},selection:{handles:{fill:{color:d},stroke:{color:"#787878"}}}}},treeMap:{colors:[["#8ebc00","#e8f2cc"],["#309b46","#d6ebda"],["#25a0da","#d3ecf8"],["#ff6900","#ffe1cc"],["#e61e26","#fad2d4"],["#d8e404","#f7facd"],["#16aba9","#d0eeee"],["#7e51a1","#e5dcec"],["#313131","#d6d6d6"],["#ed1691","#fbd0e9"]]}}),v("metroblack",{chart:{title:{color:"#ffffff"},legend:{labels:{color:"#ffffff"},inactiveItems:{labels:{color:"#797979"},markers:{color:"#797979"}}},seriesDefaults:{border:{_brightness:1},labels:{color:"#ffffff"},errorBars:{color:"#ffffff"},notes:{icon:{background:"transparent",border:{color:"#cecece"}},label:{color:"#ffffff"},line:{color:"#cecece"}},line:{markers:{background:"#0e0e0e"}},bubble:{opacity:.6},scatter:{markers:{background:"#0e0e0e"}},scatterLine:{markers:{background:"#0e0e0e"}},candlestick:{downColor:"#828282",line:{color:"#ffffff"}},waterfall:{line:{color:"#cecece"}},horizontalWaterfall:{line:{color:"#cecece"}},overlay:{gradient:"none"}},chartArea:{background:"#0e0e0e"},seriesColors:["#00aba9","#309b46","#8ebc00","#ff6900","#e61e26","#d8e404","#25a0da","#7e51a1","#313131","#ed1691"],axisDefaults:{line:{color:"#cecece"},labels:{color:"#ffffff"},minorGridLines:{color:"#2d2d2d"},majorGridLines:{color:"#333333"},title:{color:"#ffffff"},crosshair:{color:"#cecece"},notes:{icon:{background:"transparent",border:{color:"#cecece"}},label:{color:"#ffffff"},line:{color:"#cecece"}}}},gauge:{pointer:{color:"#00aba9"},scale:{rangePlaceholderColor:"#2d2d2d",labels:{color:"#ffffff"},minorTicks:{color:"#333333"},majorTicks:{color:"#cecece"},line:{color:"#cecece"}}},diagram:{shapeDefaults:{fill:{color:"#00aba9"},connectorDefaults:{fill:{color:d},stroke:{color:"#0e0e0e"},hover:{fill:{color:"#0e0e0e"},stroke:{color:d}}},content:{color:d}},editable:{resize:{handles:{fill:{color:"#0e0e0e"},stroke:{color:"#787878"},hover:{fill:{color:"#787878"},stroke:{color:"#787878"}}}},rotate:{thumb:{stroke:{color:d},fill:{color:d}}}},selectable:{stroke:{color:"#787878"}},connectionDefaults:{stroke:{color:d},content:{color:d},selection:{handles:{fill:{color:"#0e0e0e"},stroke:{color:d}}}}},treeMap:{colors:[["#00aba9","#0b2d2d"],["#309b46","#152a19"],["#8ebc00","#28310b"],["#ff6900","#3e200b"],["#e61e26","#391113"],["#d8e404","#36390c"],["#25a0da","#132b37"],["#7e51a1","#241b2b"],["#313131","#151515"],["#ed1691","#3b1028"]]}}),v("moonlight",{chart:{title:{color:"#ffffff"},legend:{labels:{color:"#ffffff"},inactiveItems:{labels:{color:"#A1A7AB"},markers:{color:"#A1A7AB"}}},seriesDefaults:{labels:{color:"#ffffff"},errorBars:{color:"#ffffff"},notes:{icon:{background:"transparent",border:{color:"#8c909e"}},label:{color:"#ffffff"},line:{color:"#8c909e"}},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#212a33"}},bubble:{opacity:.6},scatter:{markers:{background:"#212a33"}},scatterLine:{markers:{background:"#212a33"}},area:{opacity:.3},candlestick:{downColor:"#757d87",line:{color:"#ea9d06"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:d,opacity:.2}}},waterfall:{line:{color:"#8c909e"}},horizontalWaterfall:{line:{color:"#8c909e"}},ohlc:{line:{color:"#ea9d06"}}},chartArea:{background:"#212a33"},seriesColors:["#ffca08","#ff710f","#ed2e24","#ff9f03","#e13c02","#a00201"],axisDefaults:{line:{color:"#8c909e"},minorTicks:{color:"#8c909e"},majorTicks:{color:"#8c909e"},labels:{color:"#ffffff"},majorGridLines:{color:"#3e424d"},minorGridLines:{color:"#2f3640"},title:{color:"#ffffff"},crosshair:{color:"#8c909e"},notes:{icon:{background:"transparent",border:{color:"#8c909e"}},label:{color:"#ffffff"},line:{color:"#8c909e"}}}},gauge:{pointer:{color:"#f4af03"},scale:{rangePlaceholderColor:"#2f3640",labels:{color:d},minorTicks:{color:"#8c909e"},majorTicks:{color:"#8c909e"},line:{color:"#8c909e"}}},diagram:{shapeDefaults:{fill:{color:"#f3ae03"},connectorDefaults:{fill:{color:d},stroke:{color:"#414550"},hover:{fill:{color:"#414550"},stroke:{color:d}}},content:{color:d}},editable:{resize:{handles:{fill:{color:"#414550"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:d}}}},rotate:{thumb:{stroke:{color:d},fill:{color:d}}}},selectable:{stroke:{color:d}},connectionDefaults:{stroke:{color:d},content:{color:d},selection:{handles:{fill:{color:"#414550"},stroke:{color:d}}}}},treeMap:{colors:[["#ffca08","#4e4b2b"],["#ff710f","#4e392d"],["#ed2e24","#4b2c31"],["#ff9f03","#4e422a"],["#e13c02","#482e2a"],["#a00201","#3b232a"]]}}),v("uniform",{chart:{title:{color:"#686868"},legend:{labels:{color:"#686868"},inactiveItems:{labels:{color:"#B6B6B6"},markers:{color:"#B6B6B6"}}},seriesDefaults:{labels:{color:"#686868"},errorBars:{color:"#686868"},notes:{icon:{background:"transparent",border:{color:"#9e9e9e"}},label:{color:"#686868"},line:{color:"#9e9e9e"}},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#ffffff"}},bubble:{opacity:.6},scatter:{markers:{background:"#ffffff"}},scatterLine:{markers:{background:"#ffffff"}},area:{opacity:.3},candlestick:{downColor:"#cccccc",line:{color:"#cccccc"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:"#cccccc",opacity:.2}}},waterfall:{line:{color:"#9e9e9e"}},horizontalWaterfall:{line:{color:"#9e9e9e"}},ohlc:{line:{color:"#cccccc"}}},chartArea:{background:"#ffffff"},seriesColors:["#527aa3","#6f91b3","#8ca7c2","#a8bdd1","#c5d3e0","#e2e9f0"],axisDefaults:{line:{color:"#9e9e9e"},minorTicks:{color:"#aaaaaa"},majorTicks:{color:"#888888"},labels:{color:"#686868"},majorGridLines:{color:"#dadada"},minorGridLines:{color:"#e7e7e7"},title:{color:"#686868"},crosshair:{color:"#9e9e9e"},notes:{icon:{background:"transparent",border:{color:"#9e9e9e"}},label:{color:"#686868"},line:{color:"#9e9e9e"}}}},gauge:{pointer:{color:"#527aa3"},scale:{rangePlaceholderColor:"#e7e7e7",labels:{color:"#686868"},minorTicks:{color:"#aaaaaa"},majorTicks:{color:"#888888"},line:{color:"#9e9e9e"}}},diagram:{shapeDefaults:{fill:{color:"#d1d1d1"},connectorDefaults:{fill:{color:"#686868"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#686868"}}},content:{color:"#686868"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#686868"},hover:{fill:{color:"#686868"},stroke:{color:"#686868"}}}},rotate:{thumb:{stroke:{color:"#686868"},fill:{color:"#686868"}}}},selectable:{stroke:{color:"#686868"}},connectionDefaults:{stroke:{color:"#686868"},content:{color:"#686868"},selection:{handles:{fill:{color:d},stroke:{color:"#686868"}}}}},treeMap:{colors:[["#527aa3","#d0d8e1"],["#6f91b3","#d6dde4"],["#8ca7c2","#dce1e7"],["#a8bdd1","#e2e6ea"],["#c5d3e0","#e7eaed"],["#e2e9f0","#edeff0"]]}}),v("bootstrap",{chart:{title:{color:"#333333"},legend:{labels:{color:"#333333"},inactiveItems:{labels:{color:"#999999"},markers:{color:"#9A9A9A"}}},seriesDefaults:{labels:{color:"#333333"},overlay:{gradient:"none"},errorBars:{color:"#343434"},notes:{icon:{background:"#000000",border:{color:"#000000"}},label:{color:"#333333"},line:{color:"#000000"}},pie:{overlay:{gradient:"none"}},donut:{overlay:{gradient:"none"}},line:{markers:{background:"#ffffff"}},bubble:{opacity:.6},scatter:{markers:{background:"#ffffff"}},scatterLine:{markers:{background:"#ffffff"}},area:{opacity:.8},candlestick:{downColor:"#d0d0d0",line:{color:"#333333"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:"#b8b8b8",opacity:.2}}},waterfall:{line:{color:"#cccccc"}},horizontalWaterfall:{line:{color:"#cccccc"}},ohlc:{line:{color:"#333333"}}},chartArea:{background:"#ffffff"},seriesColors:["#428bca","#5bc0de","#5cb85c","#f2b661","#e67d4a","#da3b36"],axisDefaults:{line:{color:"#cccccc"},minorTicks:{color:"#ebebeb"},majorTicks:{color:"#cccccc"},labels:{color:"#333333"},majorGridLines:{color:"#cccccc"},minorGridLines:{color:"#ebebeb"},title:{color:"#333333"},crosshair:{color:"#000000"},notes:{icon:{background:"#000000",border:{color:"#000000"}},label:{color:"#ffffff"},line:{color:"#000000"}}}},gauge:{pointer:{color:"#428bca"},scale:{rangePlaceholderColor:"#cccccc",labels:{color:"#333333"},minorTicks:{color:"#ebebeb"},majorTicks:{color:"#cccccc"},line:{color:"#cccccc"}}},diagram:{shapeDefaults:{fill:{color:"#428bca"},connectorDefaults:{fill:{color:"#333333"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#333333"}}},content:{color:"#333333"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#333333"},hover:{fill:{color:"#333333"},stroke:{color:"#333333"}}}},rotate:{thumb:{stroke:{color:"#333333"},fill:{color:"#333333"}}}},selectable:{stroke:{color:"#333333"}},connectionDefaults:{stroke:{color:"#c4c4c4"},content:{color:"#333333"},selection:{handles:{fill:{color:d},stroke:{color:"#333333"}},stroke:{color:"#333333"}}}},treeMap:{colors:[["#428bca","#d1e0ec"],["#5bc0de","#d6eaf0"],["#5cb85c","#d6e9d6"],["#5cb85c","#f4e8d7"],["#e67d4a","#f2ddd3"],["#da3b36","#f0d0cf"]]}}),v("flat",{chart:{title:{color:"#4c5356"},legend:{labels:{color:"#4c5356"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:"#4c5356"},errorBars:{color:"#4c5356"},notes:{icon:{background:"transparent",border:{color:"#cdcdcd"}},label:{color:"#4c5356"},line:{color:"#cdcdcd"}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},area:{opacity:.9},waterfall:{line:{color:"#cdcdcd"}},horizontalWaterfall:{line:{color:"#cdcdcd"}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:["#10c4b2","#ff7663","#ffb74f","#a2df53","#1c9ec4","#ff63a5","#1cc47b"],axisDefaults:{line:{color:"#cdcdcd"},labels:{color:"#4c5356"},minorGridLines:{color:"#cdcdcd"},majorGridLines:{color:"#cdcdcd"},title:{color:"#4c5356"},crosshair:{color:"#cdcdcd"},notes:{icon:{background:"transparent",border:{color:"#cdcdcd"}},label:{color:"#4c5356"},line:{color:"#cdcdcd"}}}},gauge:{pointer:{color:"#10c4b2"},scale:{rangePlaceholderColor:"#cdcdcd",labels:{color:"#4c5356"},minorTicks:{color:"#4c5356"},majorTicks:{color:"#4c5356"},line:{color:"#4c5356"}}},diagram:{shapeDefaults:{fill:{color:"#10c4b2"},connectorDefaults:{fill:{color:"#363940"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#363940"}}},content:{color:"#4c5356"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#363940"},hover:{fill:{color:"#363940"},stroke:{color:"#363940"}}}},rotate:{thumb:{stroke:{color:"#363940"},fill:{color:"#363940"}}}},selectable:{stroke:{color:"#363940"}},connectionDefaults:{stroke:{color:"#cdcdcd"},content:{color:"#4c5356"},selection:{handles:{fill:{color:d},stroke:{color:"#363940"}},stroke:{color:"#363940"}}}},treeMap:{colors:[["#10c4b2","#cff3f0"],["#ff7663","#ffe4e0"],["#ffb74f","#fff1dc"],["#a2df53","#ecf9dd"],["#1c9ec4","#d2ecf3"],["#ff63a5","#ffe0ed"],["#1cc47b","#d2f3e5"]]}}),v("material",{chart:{title:{color:"#444444"},legend:{labels:{color:"#444444"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:"#444444"},errorBars:{color:"#444444"},notes:{icon:{background:"transparent",border:{color:"#e5e5e5"}},label:{color:"#444444"},line:{color:"#e5e5e5"}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},area:{opacity:.9},waterfall:{line:{color:"#e5e5e5"}},horizontalWaterfall:{line:{color:"#e5e5e5"}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#ff9800","#ff5722"],axisDefaults:{line:{color:"#e5e5e5"},labels:{color:"#444444"},minorGridLines:{color:"#e5e5e5"},majorGridLines:{color:"#e5e5e5"},title:{color:"#444444"},crosshair:{color:"#7f7f7f"},notes:{icon:{background:"transparent",border:{color:"#e5e5e5"}},label:{color:"#444444"},line:{color:"#e5e5e5"}}}},gauge:{pointer:{color:"#3f51b5"},scale:{rangePlaceholderColor:"#e5e5e5",labels:{color:"#444444"},minorTicks:{color:"#444444"},majorTicks:{color:"#444444"},line:{color:"#444444"}}},diagram:{shapeDefaults:{fill:{color:"#3f51b5"},connectorDefaults:{fill:{color:"#7f7f7f"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#7f7f7f"}}},content:{color:"#444444"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#444444"},hover:{fill:{color:"#444444"},stroke:{color:"#444444"}}}},rotate:{thumb:{stroke:{color:"#444444"},fill:{color:"#444444"}}}},selectable:{stroke:{color:"#444444"}},connectionDefaults:{stroke:{color:"#7f7f7f"},content:{color:"#444444"},selection:{handles:{fill:{color:d},stroke:{color:"#444444"}},stroke:{color:"#444444"}}}},treeMap:{colors:[["#3f51b5","#cff3f0"],["#03a9f4","#e5f6fe"],["#4caf50","#edf7ed"],["#f9ce1d","#fefae8"],["#ff9800","#fff4e5"],["#ff5722","#ffeee8"]]}}),v("materialblack",{chart:{title:{color:"#fff"},legend:{labels:{color:"#fff"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:"#fff"},errorBars:{color:"#fff"},notes:{icon:{background:"transparent",border:{color:"#e5e5e5"}},label:{color:"#fff"},line:{color:"#e5e5e5"}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},area:{opacity:.9},waterfall:{line:{color:"#4d4d4d"}},horizontalWaterfall:{line:{color:"#4d4d4d"}},overlay:{gradient:"none"},border:{_brightness:1}},chartArea:{background:"#1c1c1c"},seriesColors:["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#ff9800","#ff5722"],axisDefaults:{line:{color:"#4d4d4d"},labels:{color:"#fff"},minorGridLines:{color:"#4d4d4d"},majorGridLines:{color:"#4d4d4d"},title:{color:"#fff"},crosshair:{color:"#7f7f7f"},notes:{icon:{background:"transparent",border:{color:"#4d4d4d"}},label:{color:"#fff"},line:{color:"#4d4d4d"}}}},gauge:{pointer:{color:"#3f51b5"},scale:{rangePlaceholderColor:"#4d4d4d",labels:{color:"#fff"},minorTicks:{color:"#fff"},majorTicks:{color:"#fff"},line:{color:"#fff"}}},diagram:{shapeDefaults:{fill:{color:"#3f51b5"},connectorDefaults:{fill:{color:"#7f7f7f"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#7f7f7f"}}},content:{color:"#fff"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#fff"},hover:{fill:{color:"#fff"},stroke:{color:"#fff"}}}},rotate:{thumb:{stroke:{color:"#fff"},fill:{color:"#fff"}}}},selectable:{stroke:{color:"#fff"}},connectionDefaults:{stroke:{color:"#7f7f7f"},content:{color:"#fff"},selection:{handles:{fill:{color:d},stroke:{color:"#fff"}},stroke:{color:"#fff"}}}},treeMap:{colors:[["#3f51b5","#cff3f0"],["#03a9f4","#e5f6fe"],["#4caf50","#edf7ed"],["#f9ce1d","#fefae8"],["#ff9800","#fff4e5"],["#ff5722","#ffeee8"]]}}),function(){function t(){return{icon:{background:"#007cc0",border:{color:"#007cc0"}},label:{color:"#ffffff"},line:{color:r}}}var n="#333333",i="#7f7f7f",o="#bdbdbd",r="#c8c8c8",s="#dddddd",a=["#008fd3","#99d101","#f39b02","#f05662","#c03c53","#acacac"],l=["#cbe8f5","#eaf5cb","#fceacc","#fbdcdf","#f2d7dc","#eeeeee"],c=a[0],h=d;v("fiori",{chart:{title:{color:n},legend:{labels:{color:n},inactiveItems:{labels:{color:i},markers:{color:i}}},seriesDefaults:{labels:{color:n},errorBars:{color:n},notes:t(),candlestick:{downColor:r,line:{color:o}},area:{opacity:.8},waterfall:{line:{color:r}},horizontalWaterfall:{line:{color:r}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:a,axisDefaults:{line:{color:r},labels:{color:n},minorGridLines:{color:s},majorGridLines:{color:r},title:{color:n},crosshair:{color:i},notes:t()}},gauge:{pointer:{color:c},scale:{rangePlaceholderColor:r,labels:{color:n},minorTicks:{color:n},majorTicks:{color:n},line:{color:n}}},diagram:{shapeDefaults:{fill:{color:c},connectorDefaults:{fill:{color:n},stroke:{color:h},hover:{fill:{color:h},stroke:{color:n}}},content:{color:n}},editable:{resize:{handles:{fill:{color:h},stroke:{color:o},hover:{fill:{color:o},stroke:{color:o}}}},rotate:{thumb:{stroke:{color:o},fill:{color:o}}}},selectable:{stroke:{color:o}},connectionDefaults:{stroke:{color:o},content:{color:o},selection:{handles:{fill:{color:h},stroke:{color:o}},stroke:{color:o}}}},treeMap:{colors:e(a,l)}})}(),function(){function t(){return{icon:{background:"#00b0ff",border:{color:"#00b0ff"}},label:{color:"#ffffff"},line:{color:r}}}var n="#4e4e4e",i="#7f7f7f",o="#bdbdbd",r="#c8c8c8",s="#e5e5e5",a=["#0072c6","#5db2ff","#008a17","#82ba00","#ff8f32","#ac193d"],l=["#cbe2f3","#deeffe","#cbe7d0","#e5f0cb","#fee8d5","#eed0d7"],c=a[0],h=d;v("office365",{chart:{title:{color:n},legend:{labels:{color:n},inactiveItems:{labels:{color:i},markers:{color:i}}},seriesDefaults:{labels:{color:n},errorBars:{color:n},notes:t(),candlestick:{downColor:r,line:{color:o}},area:{opacity:.8},waterfall:{line:{color:r}},horizontalWaterfall:{line:{color:r}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:a,axisDefaults:{line:{color:r},labels:{color:n},minorGridLines:{color:s},majorGridLines:{color:r},title:{color:n},crosshair:{color:i},notes:t()}},gauge:{pointer:{color:c},scale:{rangePlaceholderColor:r,labels:{color:n},minorTicks:{color:n},majorTicks:{color:n},line:{color:n}}},diagram:{shapeDefaults:{fill:{color:c},connectorDefaults:{fill:{color:n},stroke:{color:h},hover:{fill:{color:h},stroke:{color:n}}},content:{color:n}},editable:{resize:{handles:{fill:{color:h},stroke:{color:o},hover:{fill:{color:o},stroke:{color:o}}}},rotate:{thumb:{stroke:{color:o},fill:{color:o}}}},selectable:{stroke:{color:o}},connectionDefaults:{stroke:{color:o},content:{color:o},selection:{handles:{fill:{color:h},stroke:{color:o}},stroke:{color:o}}}},treeMap:{colors:e(a,l)}})}(),function(){function t(){return{icon:{background:"#007cc0",border:{color:"#007cc0"}},label:{color:"#ffffff"},line:{color:r}}}var n="#32364c",i="#7f7f7f",o="#bdbdbd",r="#dfe0e1",s="#dfe0e1",a=["#ff4350","#ff9ea5","#00acc1","#80deea","#ffbf46","#ffd78c"],l=["#ffd9dc","#ffeced","#cceef3","#e6f8fb","#fff2da","#fff7e8"],c=a[0],h=d;v("nova",{chart:{title:{color:n},legend:{labels:{color:n},inactiveItems:{labels:{color:i},markers:{color:i}}},seriesDefaults:{labels:{color:n},errorBars:{color:n},notes:t(),candlestick:{downColor:r,line:{color:o}},area:{opacity:.8},waterfall:{line:{color:r}},horizontalWaterfall:{line:{color:r}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:a,axisDefaults:{line:{color:r},labels:{color:n},minorGridLines:{color:s},majorGridLines:{color:r},title:{color:n},crosshair:{color:n},notes:t()}},gauge:{pointer:{color:c},scale:{rangePlaceholderColor:r,labels:{color:n},minorTicks:{color:n},majorTicks:{color:n},line:{color:n}}},diagram:{shapeDefaults:{fill:{color:c},connectorDefaults:{fill:{color:n},stroke:{color:h},hover:{fill:{color:h},stroke:{color:n}}},content:{color:n}},editable:{resize:{handles:{fill:{color:h},stroke:{color:o},hover:{fill:{color:o},stroke:{color:o}}}},rotate:{thumb:{stroke:{color:o},fill:{color:o}}}},selectable:{stroke:{color:o}},connectionDefaults:{stroke:{color:o},content:{color:o},selection:{handles:{fill:{color:h},stroke:{color:o}},stroke:{color:o}}}},treeMap:{colors:e(a,l)}})}()}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.chart.min",["kendo.data.min","kendo.userevents.min","kendo.dataviz.core.min","kendo.drawing.min","kendo.dataviz.themes.min"],t)}(function(){return function(t,e){function n(){return this}function i(){this._defaults={}}function o(t,e,n,i){var o,r,s=(i.x-n.x)*(t.y-n.y)-(i.y-n.y)*(t.x-n.x),a=(i.y-n.y)*(e.x-t.x)-(i.x-n.x)*(e.y-t.y);return 0!==a&&(r=s/a,o=new tn(t.x+r*(e.x-t.x),t.y+r*(e.y-t.y))),o}function r(t,e){var n,i,o,r=t.series,a=r.length,l=t.seriesDefaults,c=Fe({},t.seriesDefaults),h=e?Fe({},e.seriesDefaults):{},u=Fe({},h);for(s(c),s(u),n=0;a>n;n++)i=r[n].type||t.seriesDefaults.type,o=Fe({data:[]},u,h[i],{tooltip:t.tooltip},c,l[i]),r[n]._defaults=o,r[n]=Fe({},o,r[n])}function s(t){delete t.bar,delete t.column,delete t.rangeColumn,delete t.line,delete t.verticalLine,delete t.pie,delete t.donut,delete t.area,delete t.verticalArea,delete t.scatter,delete t.scatterLine,delete t.bubble,delete t.candlestick,delete t.ohlc,delete t.boxPlot,delete t.bullet,delete t.verticalBullet,delete t.polarArea,delete t.polarLine,delete t.radarArea,delete t.radarLine,delete t.waterfall}function a(t){var e,n,i,o,r=t.series,s=t.seriesColors||[];for(e=0;r.length>e;e++)n=r[e],i=s[e%s.length],n.color=n.color||i,o=n._defaults,o&&(o.color=o.color||i)}function l(t){var e;Se([Wn,Qo,ir,or],function(){e=this+"Axes",t[e]&&(t[this+"Axis"]=t[e],delete t[e])})}function c(e,n){var i=(n||{}).axisDefaults||{};Se([Wn,Qo,ir,or],function(){var n=this+"Axis",o=[].concat(e[n]),r=e.axisDefaults||{};o=t.map(o,function(t){var e=(t||{}).color,o=Fe({},i,i[n],r,r[n],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete o[n],o}),e[n]=o.length>1?o:o[0]})}function h(t){var e,n=t.length,i=0;for(e=0;n>e;e++)i=Pe.max(i,t[e].data.length);return i}function u(t){return t*t}function d(t,e){if(null===e)return e;var n=Ve(t,!0);return n(e)}function f(t,e){if(null===e)return e;var n="_date_"+t,i=e[n];return i||(i=p(Ve(t,!0)(e)),e[n]=i),i}function p(t){var e,n;if(t instanceof Date)e=t;else if(typeof t===Io)e=Ie.parseDate(t)||new Date(t);else if(t)if(Te(t))for(e=[],n=0;t.length>n;n++)e.push(p(t[n]));else e=new Date(t);return e}function g(t){return Te(t)?De(t,g):t?p(t).getTime():e}function m(t,e,n,i){var o,r=t;return t&&(t=p(t),o=t.getHours(),n===rr?(r=new Date(t.getFullYear()+e,0,1),Ie.date.adjustDST(r,0)):n===Yi?(r=new Date(t.getFullYear(),t.getMonth()+e,1),Ie.date.adjustDST(r,o)):n===er?(r=m(v(t,i),7*e,ri),Ie.date.adjustDST(r,o)):n===ri?(r=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),Ie.date.adjustDST(r,o)):n===Pi?r=b(new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours()),e*Oo):n===$i?(r=b(t,e*Ro),r.getSeconds()>0&&r.setSeconds(0)):n===bo&&(r=b(t,e*Lo)),r.getMilliseconds()>0&&r.setMilliseconds(0)),r}function v(t,e){var n=t.getDay(),i=0;if(!isNaN(n))for(e=e||0;n!==e;)0===n?n=6:n--,i++;return b(t,-i*Fo)}function y(t,e,n){return t=p(t),m(t,0,e,n)}function _(t,e,n){return t=p(t),t&&y(t,e,n).getTime()===t.getTime()?t:m(t,1,e,n)}function w(t,e){var n=t.getTime()-e,i=t.getTimezoneOffset()-e.getTimezoneOffset();return n-(i*n>0?i*Ro:0)}function x(t,e){var n=t.getTime()-e,i=t.getTimezoneOffset()-e.getTimezoneOffset();return n-i*Ro}function b(t,e){var n=t.getTimezoneOffset(),i=new Date(t.getTime()+e),o=i.getTimezoneOffset()-n;return new Date(i.getTime()+(e*o>0?o*Ro:0))}function k(t,e,n){var i;return i=n===rr?e.getFullYear()-t.getFullYear():n===Yi?12*k(t,e,rr)+e.getMonth()-t.getMonth():Pe.floor(n===ri?w(e,t)/Fo:w(e,t)/Uo[n])}function C(t,e,n,i){var o,r=p(t),s=p(e);return o=n==Yi?r.getMonth()-s.getMonth()+12*(r.getFullYear()-s.getFullYear())+S(r,new Date(r.getFullYear(),r.getMonth()),ri)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():n===rr?r.getFullYear()-s.getFullYear()+C(r,new Date(r.getFullYear(),0),Yi,1)/12:S(r,s,n),o/i}function S(t,e,n){return w(t,e)/Uo[n]}function T(t){return 1===t.length?t[0]:t}function A(t){var e,n,i,o=t.length;if(o>0)for(n=0;o>n;n++)i=t[n].contentBox(),e?e.wrap(i):e=i.clone();return e||We()}function D(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function P(t,e){return t&&e?g(t)===g(e):t===e}function M(t,e){null!==e&&t.push(e)}function E(t,e){for(var n,i,o=0,r=e.length-1;r>=o;)if(n=Pe.floor((o+r)/2),i=e[n],t>i)o=n+1;else{if(!(i>t)){for(;P(e[n-1],t);)n--;return n}r=n-1}return t>=e[n]?n:n-1}function B(t){return"number"==typeof t&&!isNaN(t)}function I(t){var e,n,i=t.length,o=0;for(e=0;i>e;e++)n=t[e],B(n)&&o++;return o}function z(t){return I(t)===t.length}function L(t){var e,n,i,o={};for(e=0;t.length>e;e++)n=t[e],i=n.options.name,i&&(o[i]=n.range());return o}function R(t,e,n,i){var o,r,s,a,l,c=!1;if(n=n||{},s=n.excluded=n.excluded||[],a=n.defaults=n.defaults||{},l=n.depth=n.depth||0,!(l>ji)){for(o in t)!dn(o,n.excluded)&&t.hasOwnProperty(o)&&(r=t[o],Ne(r)?(c=!0,i||(t[o]=Sn(r(e),a[o]))):typeof r===so&&(n.defaults=a[o],n.depth++,c=R(r,e,n,i)||c,n.depth--));return c}}function O(t,n){var i,o,r,s=[],a=t.groupNameTemplate,l=n.length;if(0===l)return r=Fe({},t),r.visibleInLegend=!1,[r];for(yn(a)?(Ie.logToConsole("'groupNameTemplate' is obsolete and will be removed in future versions. Specify the group name template as 'series.name'"),a&&(i=He(a))):(i=He(t.name||""),0===i._slotCount&&(i=He(yn(t.name)?"#= group.value #: #= series.name #":"#= group.value #"))),o=0;l>o;o++)r=Fe({},t),Ne(r.color)||(r.color=e),r._groupIx=o,s.push(r),i&&(r.name=i({series:r,group:n[o]}));return s}function F(t,e){var n,i,o=[];for(e=[].concat(e),n=0;t.length>n;n++)i=t[n],dn(i.type,e)&&o.push(i);return o}function V(e,n){if(e instanceof Date){for(var i=0,o=n.length;o>i;i++)if(P(n[i],e))return i;return-1}return t.inArray(e,n)}function N(t,e){e=e||hn;for(var n=1,i=t.length;i>n;n++)if(e(t[n],t[n-1])<0){t.sort(e);break}return t}function H(t,e){var n,i=N(t,e),o=i.length,r=o>0?[i[0]]:[];for(e=e||hn,n=1;o>n;n++)0!==e(i[n],_n(r))&&r.push(i[n]);return r}function U(t,e){var n=t.type,i=e instanceof Date;return!n&&i||D(n,oi)}function j(t){var e,n,i,o,r=[],s=t.length;for(e=0;s>e;e++)for(n=t[e],o=n.length,i=0;o>i;i++)r[i]=r[i]||[],r[i].push(n[i]);return r}function G(t,e){if(t.indexOf(".")>-1)for(var n,i=t.split("."),o="";i.length>1;)o+=i.shift(),n=Ie.getter(o)(e)||{},Ie.setter(o)(e,n),o+="."}function W(t){var e,n,i,o=t.data,r=0;for(e=0;o.length>e;e++)n=tt.current.bindPoint(t,e),i=n.valueFields.value,typeof i===Io&&(i=parseFloat(i)),B(i)&&n.fields.visible!==!1&&(r+=Pe.abs(i));return r}function q(t){var e=t.overlay;return e&&e.gradient&&"none"!=e.gradient}function $(t){for(var e=0;t.length>e;e++)if(yn(t[e].zIndex))return!0}function Y(){this._defaultPrevented=!0}function X(t,e){if(t)for(var n=0;t.length>n;n++)if(t[n].category===e)return[t[n]]}function Q(t){return yn(t)&&null!==t}function K(t){var e,n,i={};for(n=0;t.length>n;n++)e=t[n],e.axis.options.name&&(i[e.axis.options.name]={min:e.range.min,max:e.range.max});return i}function Z(t,e){var n=(e||"").toLowerCase(),i="none"==n&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[n+"Key"];return i}var J,tt,et,nt,it,ot,rt,st,at,lt,ct,ht,ut,dt,ft,pt,gt,mt,vt,yt,_t,wt,xt,bt,kt,Ct,St,Tt,At,Dt,Pt,Mt,Et,Bt,It,zt,Lt,Rt,Ot,Ft,Vt,Nt,Ht,Ut,jt,Gt,Wt,qt,$t,Yt,Xt,Qt,Kt,Zt,Jt,te,ee,ne,ie,oe,re,se,ae,le,ce,he,ue,de,fe,pe,ge,me,ve,ye,_e,we,xe,be,ke,Ce,Se=t.each,Te=t.isArray,Ae=t.isPlainObject,De=t.map,Pe=Math,Me=t.noop,Ee=t.extend,Be=t.proxy,Ie=window.kendo,ze=Ie.Class,Le=Ie.Observable,Re=Ie.data.DataSource,Oe=Ie.ui.Widget,Fe=Ie.deepExtend,Ve=Ie.getter,Ne=Ie.isFunction,He=Ie.template,Ue=Ie.dataviz,je=Ue.Axis,Ge=Ue.AxisLabel,We=Ue.Box2D,qe=Ue.BoxElement,$e=Ue.ChartElement,Ye=Ie.drawing.Color,Xe=Ue.CurveProcessor,Qe=Ue.FloatElement,Ke=Ue.Note,Ze=Ue.LogarithmicAxis,Je=Ue.NumericAxis,tn=Ue.Point2D,en=Ue.RootElement,nn=Ue.Ring,on=Ue.ShapeElement,rn=Ue.ShapeBuilder,sn=Ue.TextBox,an=Ue.Title,ln=Ue.alignPathToPixel,cn=Ue.autoFormat,hn=Ue.dateComparer,un=Ue.getSpacing,dn=Ue.inArray,fn=Ue.interpolateValue,pn=Ue.mwDelta,gn=Ue.round,mn=Ie.util,vn=mn.append,yn=mn.defined,_n=mn.last,wn=mn.limitValue,xn=mn.sparseArrayLimits,bn=mn.sparseArrayMin,kn=mn.sparseArrayMax,Cn=mn.renderTemplate,Sn=mn.valueOrDefault,Tn=Ue.geometry,An=Ue.drawing,Dn=".kendoChart",Pn="above",Mn="area",En="auto",Bn="fit",In=Ue.AXIS_LABEL_CLICK,zn="bar",Ln=6,Rn=.8,On="below",Fn="#000",Vn="both",Nn="bottom",Hn="boxPlot",Un="bubble",jn="bullet",Gn="candlestick",Wn="category",qn="center",$n="change",Yn="circle",Xn="contextmenu"+Dn,Qn=Ue.CLIP,Kn="color",Zn="column",Jn=Ue.COORD_PRECISION,ti="cross",ei="k-",ni="custom",ii="dataBound",oi="date",ri="days",si=Ue.DEFAULT_FONT,ai=Ue.DEFAULT_HEIGHT,li=Ue.DEFAULT_PRECISION,ci=Ue.DEFAULT_WIDTH,hi=4,ui="donut",di=50,fi="drag",pi="dragEnd",gi="dragStart",mi="errorLow",vi="errorHigh",yi="xErrorLow",_i="xErrorHigh",wi="yErrorLow",xi="yErrorHigh",bi="fadeIn",ki="first",Ci="from",Si="funnel",Ti="glass",Ai="horizontal",Di="horizontalWaterfall",Pi="hours",Mi=Ue.INITIAL_ANIMATION_DURATION,Ei="insideBase",Bi="insideEnd",Ii="interpolate",zi="leave",Li="left",Ri="legendItemClick",Oi="legendItemHover",Fi="line",Vi=8,Ni="linear",Hi="log",Ui="max",ji=5,Gi=Number.MAX_VALUE,Wi="min",qi=-Number.MAX_VALUE,$i="minutes",Yi="months",Xi="mouseleave"+Dn,Qi="mousemove.tracking",Ki="mouseover"+Dn,Zi="mouseout"+Dn,Ji="mousemove"+Dn,to=20,eo=150,no="DOMMouseScroll"+Dn+" mousewheel"+Dn,io=Ue.NOTE_CLICK,oo=Ue.NOTE_HOVER,ro="noteText",so="object",ao="ohlc",lo="outsideEnd",co="pie",ho=70,uo="plotAreaClick",fo="pointer",po="rangeBar",go="rangeColumn",mo="render",vo="right",yo="roundedBevel",_o="roundedGlass",wo="scatter",xo="scatterLine",bo="seconds",ko="selectStart",Co="select",So="selectEnd",To="seriesClick",Ao="seriesHover",Do=.001,Po="step",Mo="smooth",Eo="stderr",Bo="stddev",Io="string",zo="summary",Lo=1e3,Ro=60*Lo,Oo=60*Ro,Fo=24*Oo,Vo=7*Fo,No=31*Fo,Ho=365*Fo,Uo={years:Ho,months:No,weeks:Vo,days:Fo,hours:Oo,minutes:Ro,seconds:Lo},jo="to",Go="top",Wo=150,qo=5,$o=100,Yo=100,Xo="chart-tooltip-inverse",Qo="value",Ko="verticalArea",Zo="verticalBullet",Jo="verticalLine",tr="waterfall",er="weeks",nr="#fff",ir="x",or="y",rr="years",sr="zero",ar=3,lr="zoomStart",cr="zoom",hr="zoomEnd",ur=[bo,$i,Pi,ri,er,Yi,rr],dr=[zn,Zn,ao,Gn,Hn,jn,go,po,tr,Di],fr={seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},pr=Oe.extend({init:function(t,n){var i,o,r=this;Ie.destroy(t),Oe.fn.init.call(r,t),r.element.addClass(ei+this.options.name.toLowerCase()).css("position","relative"),n&&(o=n.dataSource,n.dataSource=e),i=Fe({},r.options,n),r._originalOptions=Fe({},i),r._initTheme(i),r._initSurface(),r.bind(r.events,r.options),r.wrapper=r.element,n&&(n.dataSource=o),r._initDataSource(n),Ie.notify(r,Ue.ui)},_initTheme:function(n){var i,o=this,r=Ue.ui.themes||{},s=n.theme,c=r[s]||r[s.toLowerCase()],h=s&&c?c.chart:{},u=[],d=n.series||[];for(i=0;d.length>i;i++)u.push(t.extend({},d[i]));n.series=u,l(n),o._applyDefaults(n,h),null===n.seriesColors&&(n.seriesColors=e),o.options=Fe({},h,n),a(o.options)},_initDataSource:function(t){var e=this,n=(t||{}).dataSource;e._dataChangeHandler=Be(e._onDataChanged,e),e.dataSource=Re.create(n).bind($n,e._dataChangeHandler),e._bindCategories(),n&&(e._hasDataSource=!0),e._redraw(),e._attachEvents(),n&&e.options.autoBind&&e.dataSource.fetch()},setDataSource:function(t){var e=this;e.dataSource.unbind($n,e._dataChangeHandler),e.dataSource=t=Re.create(t),e._hasDataSource=!0,e._hasData=!1,t.bind($n,e._dataChangeHandler),e.options.autoBind&&t.fetch()},events:[ii,To,Ao,In,Ri,Oi,uo,gi,fi,pi,lr,cr,hr,ko,Co,So,io,oo,mo],items:function(){return t()},options:{name:"Chart",renderAs:"",theme:"default",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},autoBind:!0,seriesDefaults:{type:Zn,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1
}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1},refresh:function(){var t=this;t._applyDefaults(t.options),a(t.options),t._bindSeries(),t._bindCategories(),t.trigger(ii),t._redraw()},getSize:function(){return Ie.dimensions(this.element)},_resize:function(){var t=this.options.transitions;this.options.transitions=!1,this._redraw(),this.options.transitions=t},redraw:function(t){var e,n,i=this;i._applyDefaults(i.options),a(i.options),t?(n=i._model._plotArea,e=n.findPane(t),n.redraw(e)):i._redraw()},getAxis:function(t){var e,n=this._plotArea.axes;for(e=0;n.length>e;e++)if(n[e].options.name===t)return new Ce(n[e])},toggleHighlight:function(t,e){var n,i,o,r,s=this._plotArea,a=this._highlight,l=(s.srcSeries||s.series||[])[0];if(Ae(e)?(n=e.series,i=e.category):n=i=e,o=l.type===ui?X(s.pointsBySeriesName(n),i):l.type===co||l.type===Si?X((s.charts[0]||{}).points,i):s.pointsBySeriesName(n))for(r=0;o.length>r;r++)a.togglePointHighlight(o[r],t)},_initSurface:function(){var t=this.surface,e=this._surfaceWrap(),n=this.options.chartArea;n.width&&e.css("width",n.width),n.height&&e.css("height",n.height),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(t&&t.destroy(),this.surface=An.Surface.create(e,{type:this.options.renderAs}))},_surfaceWrap:function(){return this.element},_redraw:function(){var t,e=this,n=e._getModel();e._destroyView(),e._model=n,e._plotArea=n._plotArea,n.renderVisual(),this.options.transitions!==!1&&n.traverse(function(t){t.animation&&t.animation.setup()}),e._initSurface(),e.surface.draw(n.visual),this.options.transitions!==!1&&n.traverse(function(t){t.animation&&t.animation.play()}),e._tooltip=e._createTooltip(),e._highlight=new de(t),e._setupSelection(),e._createPannable(),e._createZoomSelection(),e._createMousewheelZoom(),e._hasDataSource&&!e._hasData&&e.options.autoBind||e.trigger(mo)},exportVisual:function(t){var e,n,i,o;return t&&(t.width||t.height)?(n=this.options.chartArea,i=this._originalOptions.chartArea,Fe(n,t),o=this._getModel(),n.width=i.width,n.height=i.height,o.renderVisual(),e=o.visual):e=this.surface.exportVisual(),e},_sharedTooltip:function(){var t=this,e=t.options;return t._plotArea instanceof re&&e.tooltip.shared},_createPannable:function(){var t=this.options;t.pannable!==!1&&(this._pannable=new we(this._plotArea,t.pannable))},_createZoomSelection:function(){var t=this.options.zoomable,e=(t||{}).selection;t!==!1&&e!==!1&&(this._zoomSelection=new xe(this,e))},_createMousewheelZoom:function(){var t=this.options.zoomable,e=(t||{}).mousewheel;t!==!1&&e!==!1&&(this._mousewheelZoom=new be(this,e))},_createTooltip:function(){var t,e=this,n=e.options,i=e.element;return t=e._sharedTooltip()?new ge(i,e._plotArea,n.tooltip):new pe(i,n.tooltip),t.bind(zi,Be(e._tooltipleave,e)),t},_tooltipleave:function(){var t=this,e=t._plotArea,n=t._highlight;e.hideCrosshairs(),n.hide()},_applyDefaults:function(t,e){c(t,e),r(t,e)},_getModel:function(){var t,e=this,n=e.options,i=new en(e._modelOptions());return i.chart=e,an.buildTitle(n.title,i),t=i._plotArea=e._createPlotArea(),n.legend.visible&&i.append(new ot(t.options.legend)),i.append(t),i.reflow(),i},_modelOptions:function(){var t=this,e=t.options,n=t.element,i=Pe.floor(n.height()),o=Pe.floor(n.width());return t._size=null,Fe({width:o||ci,height:i||ai,transitions:e.transitions},e.chartArea)},_createPlotArea:function(t){var e=this,n=e.options;return J.current.create(t?[]:n.series,n)},_setupSelection:function(){var t,e,n,i,o,r,s=this,a=s._plotArea,l=a.axes,c=s._selections=[];for(s._selectStartHandler||(s._selectStartHandler=Be(s._selectStart,s),s._selectHandler=Be(s._select,s),s._selectEndHandler=Be(s._selectEnd,s)),e=0;l.length>e;e++)n=l[e],r=n.options,n instanceof rt&&r.select&&!r.vertical&&(i=0,o=r.categories.length-1,n instanceof st&&(i=r.categories[i],o=r.categories[o]),r.justified||(n instanceof st?o=m(o,1,r.baseUnit,r.weekStartDay):o++),t=new _e(s,n,Fe({min:i,max:o},r.select)),t.bind(ko,s._selectStartHandler),t.bind(Co,s._selectHandler),t.bind(So,s._selectEndHandler),c.push(t))},_selectStart:function(t){return this.trigger(ko,t)},_select:function(t){return this.trigger(Co,t)},_selectEnd:function(t){return this.trigger(So,t)},_attachEvents:function(){var t=this,e=t.element;e.on(Xn,Be(t._click,t)),e.on(Ki,Be(t._mouseover,t)),e.on(Zi,Be(t._mouseout,t)),e.on(no,Be(t._mousewheel,t)),e.on(Xi,Be(t._mouseleave,t)),t._mousemove=Ie.throttle(Be(t._mousemove,t),to),t._shouldAttachMouseMove()&&e.on(Ji,t._mousemove),Ie.UserEvents&&(t._userEvents=new Ie.UserEvents(e,{global:!0,filter:":not(.k-selector)",multiTouch:!1,fastTap:!0,tap:Be(t._tap,t),start:Be(t._start,t),move:Be(t._move,t),end:Be(t._end,t)}))},_mouseout:function(t){var e=this,n=e._getChartElement(t);n&&n.leave&&n.leave(e,t)},_start:function(t){var e=this,n=e._events;yn(n[gi]||n[fi]||n[pi])&&e._startNavigation(t,gi),e._pannable&&e._pannable.start(t),e._zoomSelection&&e._zoomSelection.start(t)},_move:function(t){var e,n,i,o,r,s,a=this,l=a._navState,c=a._pannable,h={};if(c)t.preventDefault(),h=c.move(t),h&&!a.trigger(fi,{axisRanges:h,originalEvent:t})&&c.pan();else if(l){for(t.preventDefault(),e=l.axes,n=0;e.length>n;n++)i=e[n],o=i.options.name,o&&(r=i.options.vertical?t.y:t.x,s=r.startLocation-r.location,0!==s&&(h[i.options.name]=i.translateRange(s)));l.axisRanges=h,a.trigger(fi,{axisRanges:h,originalEvent:t})}a._zoomSelection&&a._zoomSelection.move(t)},_end:function(t){if(this._endNavigation(t,pi),this._zoomSelection){var e=this._zoomSelection.end(t);e&&!this.trigger(cr,{axisRanges:e,originalEvent:t})&&this._zoomSelection.zoom()}this._pannable&&this._pannable.end(t)},_mousewheel:function(t){var e,n,i,o,r,s,a=this,l=t.originalEvent,c=pn(t),h=a._navState,u={},d=a._mousewheelZoom;if(d)t.preventDefault(),u=d.updateRanges(c),u&&!a.trigger(cr,{delta:c,axisRanges:u,originalEvent:t})&&d.zoom();else if(h||(e=a._startNavigation(l,lr),e||(h=a._navState)),h){for(n=h.totalDelta||c,h.totalDelta=n+c,i=a._navState.axes,o=0;i.length>o;o++)r=i[o],s=r.options.name,s&&(u[s]=r.scaleRange(-n));a.trigger(cr,{delta:c,axisRanges:u,originalEvent:t}),a._mwTimeout&&clearTimeout(a._mwTimeout),a._mwTimeout=setTimeout(function(){a._endNavigation(t,hr)},eo)}},_startNavigation:function(t,e){var n,i,o,r=this,s=r._eventCoordinates(t),a=r._model._plotArea,l=a.findPointPane(s),c=a.axes.slice(0),h=!1;if(l){for(n=0;c.length>n;n++)if(i=c[n],i.box.containsPoint(s)){h=!0;break}!h&&a.backgroundBox().containsPoint(s)&&(o=r.trigger(e,{axisRanges:L(c),originalEvent:t}),o?r._userEvents.cancel():(r._suppressHover=!0,r._unsetActivePoint(),r._navState={pane:l,axes:c}))}},_endNavigation:function(t,e){var n=this;n._navState&&(n.trigger(e,{axisRanges:n._navState.axisRanges,originalEvent:t}),n._suppressHover=!1,n._navState=null)},_getChartElement:function(t,n){var i,o=this.surface.eventTarget(t);if(o){for(;o&&!i;)i=o.chartElement,o=o.parent;return i?(i.aliasFor&&(i=i.aliasFor(t,this._eventCoordinates(t))),n&&(i=i.closest(n)),i):e}},_eventCoordinates:function(t){var e=this,n=yn((t.x||{}).client),i=n?t.x.client:t.clientX,o=n?t.y.client:t.clientY;return e._toModelCoordinates(i,o)},_toModelCoordinates:function(e,n){var i=this.element,o=i.offset(),r=parseInt(i.css("paddingLeft"),10),s=parseInt(i.css("paddingTop"),10),a=t(window);return new tn(e-o.left-r+a.scrollLeft(),n-o.top-s+a.scrollTop())},_tap:function(t){var e=this,n=e._getChartElement(t);e._activePoint===n?e._click(t):(e._startHover(t)||e._unsetActivePoint(),e._click(t))},_click:function(t){for(var e=this,n=e._getChartElement(t);n;)n.click&&n.click(e,t),n=n.parent},_startHover:function(t){var n,i=this,o=i._getChartElement(t),r=i._tooltip,s=i._highlight,a=i.options.tooltip;if(!i._suppressHover&&s&&!s.isHighlighted(o)&&!i._sharedTooltip())return n=i._getChartElement(t,function(t){return t.hover}),n&&!n.hover(i,t)?(i._activePoint=n,a=Fe({},a,n.options.tooltip),a.visible&&r.show(n),s.show(n),n.tooltipTracking):e},_mouseover:function(e){var n=this;n._startHover(e)&&t(document).on(Qi,Be(n._mouseMoveTracking,n))},_mouseMoveTracking:function(e){var n,i,o=this,r=o.options,s=o._tooltip,a=o._highlight,l=o._eventCoordinates(e),c=o._activePoint;o._plotArea.box.containsPoint(l)?c&&c.tooltipTracking&&c.series&&c.parent.getNearestPoint&&(i=c.parent.getNearestPoint(l.x,l.y,c.seriesIx),i&&i!=c&&(i.hover(o,e),o._activePoint=i,n=Fe({},r.tooltip,c.options.tooltip),n.visible&&s.show(i),a.show(i))):(t(document).off(Qi),o._unsetActivePoint())},_mousemove:function(t){var e=this._eventCoordinates(t);this._trackCrosshairs(e),this._sharedTooltip()&&this._trackSharedTooltip(e,t)},_trackCrosshairs:function(t){var e,n,i=this._plotArea.crosshairs;for(e=0;i.length>e;e++)n=i[e],n.box.containsPoint(t)?n.showAt(t):n.hide()},_trackSharedTooltip:function(e,n){var i,o,r,s,a=this,l=a.options,c=a._plotArea,h=c.categoryAxis,u=a._tooltip,d=l.tooltip,f=a._highlight;c.box.containsPoint(e)&&(i=h.pointCategoryIndex(e),i!==a._tooltipCategoryIx&&(o=c.pointsByCategoryIndex(i),r=t.map(o,function(t){return t.eventArgs(n)}),s=r[0]||{},s.categoryPoints=r,o.length>0&&!this.trigger(Ao,s)?(d.visible&&u.showAt(o,e),f.show(o)):u.hide(),a._tooltipCategoryIx=i))},_mouseleave:function(e){var n=this,i=n._plotArea,o=n._tooltip,r=n._highlight,s=e.relatedTarget;s&&t(s).closest(o.element).length||(n._mousemove.cancel(),i.hideCrosshairs(),r.hide(),setTimeout(Be(o.hide,o),Yo),n._tooltipCategoryIx=null)},_unsetActivePoint:function(){var t=this,e=t._tooltip,n=t._highlight;t._activePoint=null,e&&e.hide(),n&&n.hide()},_onDataChanged:function(){var t,e,n=this,i=n.options,o=n._sourceSeries||i.series,r=o.length,s=n.dataSource.view(),l=(n.dataSource.group()||[]).length>0,c=[];for(t=0;r>t;t++)e=o[t],n._isBindable(e)&&l?vn(c,O(e,s)):c.push(e||[]);n._sourceSeries=o,i.series=c,a(n.options),n._bindSeries(),n._bindCategories(),n._hasData=!0,n._deferRedraw()},_deferRedraw:function(){var t=this;Ie.support.vml?(t._clearRedrawTimeout(),t._redrawTimeout=setTimeout(function(){t.surface&&(t.trigger(ii),t._redraw())},0)):(t.trigger(ii),t._redraw())},_clearRedrawTimeout:function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},_bindSeries:function(){var t,e,n,i,o=this,r=o.dataSource.view(),s=o.options.series,a=s.length;for(t=0;a>t;t++)e=s[t],o._isBindable(e)&&(n=e._groupIx,i=yn(n)?(r[n]||{}).items:r,e.autoBind!==!1&&(e.data=i))},_bindCategories:function(){var t,e,n=this,i=n.dataSource.view()||[],o=(n.dataSource.group()||[]).length>0,r=i,s=n.options,a=[].concat(s.categoryAxis);for(o&&i.length&&(r=i[0].items),t=0;a.length>t;t++)e=a[t],e.autoBind!==!1&&n._bindCategoryAxis(e,r,t)},_bindCategoryAxis:function(t,e,n){var i,o,r,s=(e||[]).length;if(t.field)for(t.categories=[],i=0;s>i;i++)r=e[i],o=d(t.field,r),0===i?(t.categories=[o],t.dataItems=[r]):(t.categories.push(o),t.dataItems.push(r));else this._bindCategoryAxisFromSeries(t,n)},_bindCategoryAxisFromSeries:function(t,e){var n,i,o,r,s,a,l,c,h,u,p,g=this,m=[],v=g.options.series,y=v.length,_={};for(i=0;y>i;i++)if(o=v[i],r=o.categoryAxis===t.name||!o.categoryAxis&&0===e,s=o.data,l=s.length,o.categoryField&&r&&l>0)for(p=U(t,d(o.categoryField,s[0])),u=p?f:d,a=0;l>a;a++)c=s[a],h=u(o.categoryField,c),(p||!_[h])&&(m.push([h,c]),p||(_[h]=!0));m.length>0&&(p&&(m=H(m,function(t,e){return hn(t[0],e[0])})),n=j(m),t.categories=n[0],t.dataItems=n[1])},_isBindable:function(t){var e,n,i=tt.current.valueFields(t),o=!0;for(n=0;i.length>n;n++)if(e=i[n],e===Qo?e="field":e+="Field",!yn(t[e])){o=!1;break}return o},_legendItemClick:function(t,e){var n,i,o,r=this,s=r._plotArea,a=(s.srcSeries||s.series)[t],l=(r._sourceSeries||[])[t]||a;dn(a.type,[co,ui,Si])?(o=l.data[e],i=yn(o.visible)?!o.visible:!1,o.visible=i):(i=!l.visible,l.visible=i,a.visible=i),r.options.transitions&&(r.options.transitions=!1,n=!0),r.redraw(),n&&(r.options.transitions=!0)},_legendItemHover:function(t,e){var n,i,o=this,r=o._plotArea,s=o._highlight,a=(r.srcSeries||r.series)[t];n=dn(a.type,[co,ui,Si])?e:t,i=r.pointsBySeriesIndex(n),s.show(i)},_shouldAttachMouseMove:function(){var t=this;return t._plotArea.crosshairs.length||t._tooltip&&t._sharedTooltip()},setOptions:function(n){var i=this,o=n.dataSource;n.dataSource=e,i._originalOptions=Fe(i._originalOptions,n),i.options=Fe({},i._originalOptions),i._sourceSeries=null,t(document).off(Ji),Oe.fn._setEvents.call(i,n),i._initTheme(i.options),o&&i.setDataSource(o),i._hasDataSource?i._onDataChanged():(i._bindCategories(),i.redraw()),i._shouldAttachMouseMove()&&i.element.on(Ji,i._mousemove)},destroy:function(){var e=this,n=e.dataSource;e.element.off(Dn),n.unbind($n,e._dataChangeHandler),t(document).off(Qi),e._userEvents&&e._userEvents.destroy(),e._destroyView(),e.surface.destroy(),e.surface=null,e._clearRedrawTimeout(),Oe.fn.destroy.call(e)},_destroyView:function(){var t=this,e=t._model,n=t._selections;if(e&&(e.destroy(),t._model=null),n)for(;n.length>0;)n.shift().destroy();t._unsetActivePoint(),t._tooltip&&t._tooltip.destroy(),t._highlight&&t._highlight.destroy(),t._zoomSelection&&t._zoomSelection.destroy()}});Ue.ExportMixin.extend(pr.fn),Ie.PDFMixin&&Ie.PDFMixin.extend(pr.fn),J=ze.extend({init:function(){this._registry=[]},register:function(t,e){this._registry.push({type:t,seriesTypes:e})},create:function(t,e){var n,i,o,r=this._registry,s=r[0];for(n=0;r.length>n;n++)if(i=r[n],o=F(t,i.seriesTypes),o.length>0){s=i;break}return new s.type(o,e)}}),J.current=new J,tt=ze.extend({init:function(){this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}},register:function(t,n,i){var o,r,s=this;for(n=n||[Qo],o=0;t.length>o;o++)r=t[o],s._valueFields[r]=n,s._otherFields[r]=i,s._nullValue[r]=s._makeValue(n,null),s._undefinedValue[r]=s._makeValue(n,e)},canonicalFields:function(t){return this.valueFields(t).concat(this.otherFields(t))},valueFields:function(t){return this._valueFields[t.type]||[Qo]},otherFields:function(t){return this._otherFields[t.type]||[Qo]},bindPoint:function(t,e,n){var i,o,r,s,a,l=this,c=t.data,h=yn(n)?n:c[e],u={valueFields:{value:h}},d=l.valueFields(t),f=l._otherFields[t.type];return null===h?a=l._nullValue[t.type]:yn(h)?Te(h)?(o=h.slice(d.length),a=l._bindFromArray(h,d),i=l._bindFromArray(o,f)):typeof h===so&&(r=l.sourceFields(t,d),s=l.sourceFields(t,f),a=l._bindFromObject(h,d,r),i=l._bindFromObject(h,f,s)):a=l._undefinedValue[t.type],yn(a)&&(1===d.length?u.valueFields.value=a[d[0]]:u.valueFields=a),u.fields=i||{},u},_makeValue:function(t,e){var n,i,o={},r=t.length;for(n=0;r>n;n++)i=t[n],o[i]=e;return o},_bindFromArray:function(t,e){var n,i,o={};if(e)for(i=Pe.min(e.length,t.length),n=0;i>n;n++)o[e[n]]=t[n];return o},_bindFromObject:function(t,e,n){var i,o,r,s,a={};if(e)for(o=e.length,n=n||e,i=0;o>i;i++)r=e[i],s=n[i],a[r]=d(s,t);return a},sourceFields:function(t,e){var n,i,o,r,s;if(e)for(i=e.length,r=[],n=0;i>n;n++)o=e[n],s=o===Qo?"field":o+"Field",r.push(t[s]||o);return r}}),tt.current=new tt,et=$e.extend({init:function(t,e){var n=this;$e.fn.init.call(n,e),this.textBox=new sn(t,n.options),n.append(this.textBox)},options:{position:lo,margin:un(3),padding:un(4),color:Fn,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:bi,delay:Mi},zIndex:2},createVisual:function(){this.textBox.options.noclip=this.options.noclip},reflow:function(t){var e=this,n=e.options,i=n.vertical,o=n.aboveAxis,r=e.children[0],s=r.box,a=r.options.padding;r.options.align=i?qn:Li,r.options.vAlign=i?Go:qn,n.position==Bi?i?(r.options.vAlign=Go,!o&&s.height()<t.height()&&(r.options.vAlign=Nn)):r.options.align=o?vo:Li:n.position==qn?(r.options.vAlign=qn,r.options.align=qn):n.position==Ei?i?r.options.vAlign=o?Nn:Go:r.options.align=o?Li:vo:n.position==lo&&(i?t=o?new We(t.x1,t.y1-s.height(),t.x2,t.y1):new We(t.x1,t.y2,t.x2,t.y2+s.height()):(r.options.align=qn,t=o?new We(t.x2,t.y1,t.x2+s.width(),t.y2):new We(t.x1-s.width(),t.y1,t.x1,t.y2))),n.rotation||(i?a.left=a.right=(t.width()-r.contentBox.width())/2:a.top=a.bottom=(t.height()-r.contentBox.height())/2),r.reflow(t)},alignToClipBox:function(t){var e,n=this,i=n.options.vertical,o=i?or:ir,r=o+"1",s=o+"2",a=n.children[0],l=n.parent.box;(t[r]>l[r]||l[s]>t[s])&&(e=a.paddingBox.clone(),e[r]=Pe.max(l[r],t[r]),e[s]=Pe.min(l[s],t[s]),this.reflow(e))}}),nt=qe.extend({init:function(t){var e=this;qe.fn.init.call(e,t),e.createContainer(),e.createMarker(),e.createLabel()},createContainer:function(){var t=this;t.container=new Qe({vertical:!1,wrap:!1,align:qn}),t.append(t.container)},createMarker:function(){this.container.append(new on(this.markerOptions()))},markerOptions:function(){var t=this.options,e=t.markerColor;return Fe({},t.markers,{background:e,border:{color:e}})},createLabel:function(){var t=this,e=t.options,n=Fe({},e.labels);t.container.append(new sn(e.text,n))},renderComplete:function(){var t,e;$e.fn.renderComplete.call(this),t=this.options.cursor||{},e=this._itemOverlay=An.Path.fromRect(this.container.box.toRect(),{fill:{color:nr,opacity:0},stroke:null,cursor:t.style||t}),this.appendVisual(e)},click:function(t,e){var n=this.eventArgs(e);t.trigger(Ri,n)||(e.preventDefault(),t._legendItemClick(n.seriesIndex,n.pointIndex))},hover:function(t,e){var n=this.eventArgs(e);return t.trigger(Oi,n)||(e.preventDefault(),t._legendItemHover(n.seriesIndex,n.pointIndex)),!0},leave:function(t){t._unsetActivePoint()},eventArgs:function(e){var n=this.options;return{element:t(e.target),text:n.text,series:n.series,seriesIndex:n.series.index,pointIndex:n.pointIndex}},renderVisual:function(){var t=this,e=t.options,n=e.visual;n?(t.visual=n({active:e.active,series:e.series,pointIndex:e.pointIndex,options:{markers:t.markerOptions(),labels:e.labels},createVisual:function(){t.createVisual(),t.renderChildren(),t.renderComplete();var e=t.visual;return delete t.visual,e}}),this.addVisual()):$e.fn.renderVisual.call(t)}}),it=$e.extend({render:function(){var t,e,n=this.children,i=this.options,o=i.vertical;for(this.visual=new An.Layout(null,{spacing:o?0:i.spacing,lineSpacing:o?i.spacing:0,orientation:o?"vertical":"horizontal"}),e=0;n.length>e;e++)t=n[e],t.reflow(new We),t.renderVisual()},reflow:function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?Ue.rectToBox(e):new We},renderVisual:function(){this.addVisual()},createVisual:Me}),ot=$e.extend({init:function(t){var e=this;$e.fn.init.call(e,t),dn(e.options.position,[Go,vo,Nn,Li,ni])||(e.options.position=vo),e.createContainer(),e.createItems()},options:{position:vo,items:[],labels:{margin:{left:6}},offsetX:0,offsetY:0,margin:un(5),padding:un(5),border:{color:Fn,width:0},item:{cursor:fo},spacing:6,background:"",zIndex:1,markers:{border:{width:1},width:7,height:7,type:"rect",align:Li,vAlign:qn}},createContainer:function(){var t=this,e=t.options,n=e.align,i=e.position,o=i,r=qn;i==ni?o=Li:dn(i,[Go,Nn])?(o="start"==n?Li:"end"==n?vo:qn,r=i):n&&("start"==n?r=Go:"end"==n&&(r=Nn)),t.container=new qe({margin:e.margin,padding:e.padding,background:e.background,border:e.border,vAlign:r,align:o,zIndex:e.zIndex,shrinkToFit:!0}),t.append(t.container)},createItems:function(){var t,e,n,i=this,o=i.options,r=o.items,s=r.length,a=i.isVertical();for(t=new it({vertical:a,spacing:o.spacing}),o.reverse&&(r=r.slice(0).reverse()),e=0;s>e;e++)n=r[e],t.append(new nt(Fe({},{markers:o.markers,labels:o.labels},o.item,n)));t.render(),i.container.append(t)},isVertical:function(){var t=this,e=t.options,n=e.orientation,i=e.position,o=i==ni&&n!=Ai||(yn(n)?n!=Ai:dn(i,[Li,vo]));return o},hasItems:function(){return this.container.children[0].children.length>0},reflow:function(t){var n=this,i=n.options;return t=t.clone(),n.hasItems()?(i.position===ni?(n.containerCustomReflow(t),n.box=t):n.containerReflow(t),e):(n.box=t,e)},containerReflow:function(t){var e,n=this,i=n.options,o=i.position,r=o==Go||o==Nn?ir:or,s=t.clone(),a=n.container,l=i.width,c=i.height,h=n.isVertical(),u=t.clone();(o==Li||o==vo)&&(s.y1=u.y1=0),h&&c?(s.y2=s.y1+c,s.align(u,or,a.options.vAlign)):!h&&l&&(s.x2=s.x1+l,s.align(u,ir,a.options.align)),a.reflow(s),s=a.box,e=s.clone(),(i.offsetX||i.offsetY)&&(s.translate(i.offsetX,i.offsetY),n.container.reflow(s)),e[r+1]=t[r+1],e[r+2]=t[r+2],n.box=e},containerCustomReflow:function(t){var e=this,n=e.options,i=n.offsetX,o=n.offsetY,r=e.container,s=n.width,a=n.height,l=e.isVertical(),c=t.clone();l&&a?c.y2=c.y1+a:!l&&s&&(c.x2=c.x1+s),r.reflow(c),c=r.box,r.reflow(We(i,o,i+c.width(),o+c.height()))},renderVisual:function(){this.hasItems()&&$e.fn.renderVisual.call(this)}}),rt=je.extend({init:function(t){var e=this;t=t||{},this._initFields(),this._initCategories(t),je.fn.init.call(e,t)},_initFields:function(){this._ticks={},this.outOfRangeMin=0,this.outOfRangeMax=0},_initCategories:function(t){var e,n,i=(t.categories||[]).slice(0),o=yn(t.min),r=yn(t.max);t.categories=i,(o||r)&&i.length&&(t.srcCategories=t.categories,e=o?Pe.floor(t.min):0,n=r?t.justified?Pe.floor(t.max)+1:Pe.ceil(t.max):i.length,t.categories=t.categories.slice(e,n))},options:{type:Wn,categories:[],vertical:!1,majorGridLines:{visible:!1,width:1,color:Fn},labels:{zIndex:1},justified:!1},rangeIndices:function(){var t,e=this.options,n=e.categories.length||1,i=B(e.min)?e.min%1:0;return t=B(e.max)&&e.max%1!==0&&e.max<this.totalRange().max?n-(1-e.max%1):n-(e.justified?1:0),{min:i,max:t}},totalRangeIndices:function(t){var e,n,i=this.options,o=B(i.min)?i.min:0;return e=B(i.max)?i.max:B(i.min)?o+i.categories.length:(i.srcCategories||i.categories).length-(i.justified?1:0)||1,t&&(n=this.totalRange(),o=wn(o,0,n.max),e=wn(e,0,n.max)),{min:o,max:e}},range:function(){var t=this.options;return{min:B(t.min)?t.min:0,max:B(t.max)?t.max:t.categories.length}},totalRange:function(){var t=this.options;return{min:0,max:Pe.max(this._seriesMax||0,(t.srcCategories||t.categories).length)-(t.justified?1:0)}},getScale:function(){var t=this.rangeIndices(),e=t.min,n=t.max,i=this.lineBox(),o=this.options.vertical?i.height():i.width(),r=o/(n-e||1);return r*(this.options.reverse?-1:1)},getTickPositions:function(t){for(var e=this,n=e.options,i=n.vertical,o=e.lineBox(),r=n.reverse,s=e.getScale(),a=e.rangeIndices(),l=a.min,c=a.max,h=l%1!==0?Pe.floor(l/1)+t:l,u=o[(i?or:ir)+(r?2:1)],d=[];c>=h;)d.push(u+gn(s*(h-l),Jn)),h+=t;return d},getLabelsTickPositions:function(){var t=this.getMajorTickPositions().slice(0),e=this.rangeIndices(),n=this.getScale(),i=this.lineBox(),o=this.options,r=o.vertical?or:ir,s=o.reverse?2:1,a=o.reverse?1:2;return e.min%1!==0&&t.unshift(i[r+s]-n*(e.min%1)),e.max%1!==0&&t.push(i[r+a]+n*(1-e.max%1)),t},labelTickIndex:function(t){var e=t.index,n=this.rangeIndices();return n.min>0&&(e-=Pe.floor(n.min)),e},arrangeLabels:function(){je.fn.arrangeLabels.call(this),this.hideOutOfRangeLabels()},hideOutOfRangeLabels:function(){var t=this.box,e=this.labels,n=this.options.vertical?or:ir,i=t[n+1],o=t[n+2],r=e[0],s=_n(e);e.length&&((r.box[n+1]>o||i>r.box[n+2])&&(r.options.visible=!1),(s.box[n+1]>o||i>s.box[n+2])&&(s.options.visible=!1))},getMajorTickPositions:function(){return this.getTicks().majorTicks},getMinorTickPositions:function(){return this.getTicks().minorTicks},getTicks:function(){var t,e=this,n=e._ticks,i=e.options,o=e.rangeIndices(),r=i.reverse,s=i.justified,a=e.lineBox();return t=a.getHash()+o.min+","+o.max+r+s,n._hash!==t&&(n._hash=t,n.majorTicks=e.getTickPositions(1),n.minorTicks=e.getTickPositions(.5)),n},getSlot:function(t,e,n){var i,o,r=this,s=r.options,a=s.reverse,l=s.justified,c=s.vertical?or:ir,h=r.lineBox(),u=r.rangeIndices(),d=u.min,f=this.getScale(),p=h[c+(a?2:1)],g=h.clone(),m=!yn(e);return t=Sn(t,0),e=Sn(e,t),e=Pe.max(e-1,t),e=Pe.max(t,e),i=p+(t-d)*f,o=p+(e+1-d)*f,m&&l&&(o=i),n&&(i=wn(i,h[c+1],h[c+2]),o=wn(o,h[c+1],h[c+2])),g[c+1]=a?o:i,g[c+2]=a?i:o,g},pointCategoryIndex:function(t){var e,n,i,o=this,r=o.options,s=r.reverse,a=r.justified,l=r.vertical?or:ir,c=o.lineBox(),h=o.rangeIndices(),u=s?h.max:h.min,d=this.getScale(),f=c[l+1],p=c[l+2],g=t[l];return f>g||g>p?null:(e=g-f,n=e/d,n=u+n,i=n%1,a?n=Pe.round(n):0===i&&n>0&&n--,Pe.floor(n))},getCategory:function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.options.categories[e]},categoryIndex:function(t){var e=this.options,n=V(t,e.srcCategories||e.categories);return n-Pe.floor(e.min||0)},translateRange:function(t){var e=this,n=e.options,i=e.lineBox(),o=n.vertical?i.height():i.width(),r=n.categories.length,s=o/r,a=gn(t/s,li);return{min:a,max:r+a}},zoomRange:function(t){var n=this.totalRangeIndices(),i=this.totalRange(),o=i.max,r=i.min,s=wn(n.min+t,r,o),a=wn(n.max-t,r,o);return a-s>0?{min:s,max:a}:e},scaleRange:function(t){var e=this,n=e.options,i=n.categories.length,o=t*i;return{min:-o,max:i+o}},labelsCount:function(){var t=this.labelsRange();return t.max-t.min},labelsRange:function(){var t,e=this.options,n=e.labels,i=e.justified,o=this.totalRangeIndices(!0),r=o.min,s=o.max,a=Pe.floor(r);return i?(r=Pe.ceil(r),s=Pe.floor(s)):(r=Pe.floor(r),s=Pe.ceil(s)),t=r>n.skip?n.skip+n.step*Pe.ceil((r-n.skip)/n.step):n.skip,{min:t-a,max:(e.categories.length?s+(i?1:0):0)-a}},createAxisLabel:function(t,e){var n=this,i=n.options,o=i.dataItems?i.dataItems[t]:null,r=Sn(i.categories[t],""),s=n.axisLabelText(r,o,e);return new Ge(r,s,t,o,e)},shouldRenderNote:function(t){var e=this.options.categories;return e.length&&e.length>t&&t>=0},pan:function(t){var e=this.totalRangeIndices(!0),n=this.getScale(),i=gn(t/n,li),o=this.totalRange(),r=e.min+i,s=e.max+i;return this.limitRange(r,s,0,o.max,i)},pointsRange:function(t,e){var n=this,i=n.options,o=i.reverse,r=i.vertical?or:ir,s=n.lineBox(),a=n.totalRangeIndices(!0),l=this.getScale(),c=s[r+(o?2:1)],h=t[r]-c,u=e[r]-c,d=a.min+h/l,f=a.min+u/l;return{min:Pe.min(d,f),max:Pe.max(d,f)}}}),st=rt.extend({init:function(t){var e,n,i=this;t=t||{},t=Fe({roundToBaseUnit:!0},t,{categories:p(t.categories),min:p(t.min),max:p(t.max)}),t.userSetBaseUnit=t.userSetBaseUnit||t.baseUnit,t.userSetBaseUnitStep=t.userSetBaseUnitStep||t.baseUnitStep,t.categories&&t.categories.length>0?(e=(t.baseUnit||"").toLowerCase(),n=e!==Bn&&!dn(e,ur),n&&(t.baseUnit=i.defaultBaseUnit(t)),(e===Bn||t.baseUnitStep===En)&&i.autoBaseUnit(t),this._groupsStart=m(t.categories[0],0,t.baseUnit,t.weekStartDay),i.groupCategories(t)):t.baseUnit=t.baseUnit||ri,this._initFields(),je.fn.init.call(i,t)},options:{type:oi,labels:{dateFormats:fr},autoBaseUnitSteps:{seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10},shouldRenderNote:function(t){var e=this,n=e.range(),i=e.options.categories||[];return hn(t,n.min)>=0&&hn(t,n.max)<=0&&i.length},parseNoteValue:function(t){return p(t)},translateRange:function(t){var e,n,i=this,o=i.options,r=o.baseUnit,s=o.weekStartDay,a=i.lineBox(),l=o.vertical?a.height():a.width(),c=i.range(),h=l/(c.max-c.min),u=gn(t/h,li);return c.min&&c.max&&(e=b(o.min||c.min,u),n=b(o.max||c.max,u),c={min:m(e,0,r,s),max:m(n,0,r,s)}),c},scaleRange:function(t){var e,n=this,i=Pe.abs(t),o=n.range(),r=o.min,s=o.max;if(o.min&&o.max){for(;i--;)o=w(r,s),e=Pe.round(.1*o),0>t?(r=b(r,e),s=b(s,-e)):(r=b(r,-e),s=b(s,e));o={min:r,max:s}}return o},defaultBaseUnit:function(t){var e,n,i,o,r,s=t.categories,a=yn(s)?s.length:0,l=Gi;for(e=0;a>e;e++)n=s[e],n&&o&&(i=x(n,o),i>0&&(l=Pe.min(l,i),r=l>=Ho?rr:l>=No-3*Fo?Yi:l>=Vo?er:l>=Fo?ri:l>=Oo?Pi:l>=Ro?$i:bo)),o=n;return r||ri},_categoryRange:function(t){var e=t._range;return e||(e=t._range=xn(t)),e},totalRange:function(){return{min:0,max:this.options.categories.length}},rangeIndices:function(){var t=this.options,e=t.baseUnit,n=t.baseUnitStep||1,i=t.categories,o=this.categoriesRange(),r=p(t.min||o.min),s=p(t.max||o.max),a=0,l=0;return i.length&&(a=C(r,i[0],e,n),l=C(s,i[0],e,n),t.roundToBaseUnit&&(a=Pe.floor(a),l=t.justified?Pe.floor(l):Pe.ceil(l))),{min:a,max:l}},labelsRange:function(){var t=this.options,e=t.labels,n=this.rangeIndices(),i=Pe.floor(n.min),o=Pe.ceil(n.max);return{min:i+e.skip,max:t.categories.length?o+(t.justified?1:0):0}},categoriesRange:function(){var t=this.options,e=this._categoryRange(t.srcCategories||t.categories),n=p(e.max);return!t.justified&&P(n,this._roundToTotalStep(n,t,!1))&&(n=this._roundToTotalStep(n,t,!0,!0)),{min:p(e.min),max:n}},currentRange:function(){var t=this.options,e=t.roundToBaseUnit!==!1,n=this.categoriesRange(),i=t.min,o=t.max;return i||(i=e?this._roundToTotalStep(n.min,t,!1):n.min),o||(o=e?this._roundToTotalStep(n.max,t,!t.justified):n.max),{min:i,max:o}},datesRange:function(){var t=this._categoryRange(this.options.srcCategories||this.options.categories);return{min:p(t.min),max:p(t.max)}},pan:function(t){var n,i,o,r=this,s=r.options,a=s.baseUnit,l=r.lineBox(),c=s.vertical?l.height():l.width(),h=this.currentRange(),u=this.totalLimits(),d=h.min,f=h.max,m=c/(f-d),v=gn(t/m,li);return i=b(d,v),o=b(f,v),n=this.limitRange(g(i),g(o),g(u.min),g(u.max),v),n?(n.min=p(n.min),n.max=p(n.max),n.baseUnit=a,n.baseUnitStep=s.baseUnitStep||1,n.userSetBaseUnit=s.userSetBaseUnit,n.userSetBaseUnitStep=s.userSetBaseUnitStep,n):e},pointsRange:function(t,e){var n=rt.fn.pointsRange.call(this,t,e),i=this.currentRange(),o=this.rangeIndices(),r=w(i.max,i.min)/(o.max-o.min),s=this.options,a=b(i.min,n.min*r),l=b(i.min,n.max*r);return{min:a,max:l,baseUnit:s.userSetBaseUnit,baseUnitStep:s.userSetBaseUnitStep}},zoomRange:function(t){var n,i,o,r,s,a,l,c,h,u=this.options,d=this.totalLimits(),f=this.currentRange(),g=u.baseUnit,v=u.baseUnitStep||1,y=u.weekStartDay,_=f.max,x=f.min,k=m(x,t*v,g,y),C=m(_,-t*v,g,y);if(u.userSetBaseUnit==Bn)if(n=u.autoBaseUnitSteps,i=u.maxDateGroups,o=V(g,ur),s=w(C,k),a=_n(n[g])*i*Uo[g],l=w(_,x),Uo[g]>s&&g!==bo)g=ur[o-1],r=_n(n[g]),c=(l-(i-1)*r*Uo[g])/2,k=b(x,c),C=b(_,-c);else if(s>a&&g!==rr){h=0;do{o++,g=ur[o],h=0,c=2*Uo[g];do r=n[g][h],h++;while(n[g].length>h&&l>c*r)}while(g!==rr&&l>c*r);c=(c*r-l)/2,c>0&&(k=b(x,-c),C=b(_,c),k=b(k,wn(C,d.min,d.max)-C),C=b(C,wn(k,d.min,d.max)-k))}return k=p(wn(k,d.min,d.max)),C=p(wn(C,d.min,d.max)),w(C,k)>0?{min:k,max:C,baseUnit:u.userSetBaseUnit,baseUnitStep:u.userSetBaseUnitStep}:e},totalLimits:function(){var t=this.options,e=this.datesRange(),n=this._roundToTotalStep(p(e.min),t,!1),i=e.max;return t.justified||(i=this._roundToTotalStep(i,t,!0,P(i,this._roundToTotalStep(i,t,!1)))),{min:n,max:i}},range:function(t){t=t||this.options;var e=t.categories,n=t.baseUnit===Bn,i=n?ur[0]:t.baseUnit,o=t.baseUnitStep||1,r={baseUnit:i,baseUnitStep:o,weekStartDay:t.weekStartDay},s=this._categoryRange(e),a=p(t.min||s.min),l=p(t.max||s.max);return{min:this._roundToTotalStep(a,r,!1),max:this._roundToTotalStep(l,r,!0,!0)}},autoBaseUnit:function(t){for(var e,n,i,o=this,r=this._categoryRange(t.categories),s=p(t.min||r.min),a=p(t.max||r.max),l=t.baseUnit===Bn,c=0,h=l?ur[c++]:t.baseUnit,u=a-s,d=u/Uo[h],f=d,g=t.maxDateGroups||o.options.maxDateGroups,m=Fe({},o.options.autoBaseUnitSteps,t.autoBaseUnitSteps);!n||d>=g;)if(e=e||m[h].slice(0),i=e.shift())n=i,d=f/n;else{if(h===_n(ur)){n=Pe.ceil(f/g);break}if(!l){d>g&&(n=Pe.ceil(f/g));break}h=ur[c++]||_n(ur),f=u/Uo[h],e=null}t.baseUnitStep=n,t.baseUnit=h},_timeScale:function(){var t,e,n,i=this,o=i.range(),r=i.options,s=i.lineBox(),a=r.vertical,l=a?s.height():s.width();return r.justified&&r._collapse!==!1?(e=this._categoryRange(r.categories),n=g(e.max),t=p(n)-o.min):t=o.max-o.min,l/t},groupCategories:function(t){var e,n,i=this,o=t.categories,r=p(kn(o)),s=t.baseUnit,a=t.baseUnitStep||1,l=i.range(t),c=l.max,h=[];for(e=l.min;c>e&&(h.push(e),n=m(e,a,s,t.weekStartDay),!(n>r)||t.max);e=n);t.srcCategories=o,t.categories=h},_roundToTotalStep:function(t,e,n,i){var o,r,s,a,l;return e=e||this.options,o=e.baseUnit,r=e.baseUnitStep||1,s=this._groupsStart,s?(a=C(t,s,o,r),l=n?Pe.ceil(a):Pe.floor(a),i&&l++,m(s,l*r,o,e.weekStartDay)):m(t,n?r:0,o,e.weekStartDay)},createAxisLabel:function(t,n){var i,o,r=this.options,s=r.dataItems?r.dataItems[t]:null,a=r.categories[t],l=r.baseUnit,c=!0,h=n.dateFormats[l];return r.justified?(i=y(a,l,r.weekStartDay),c=P(i,a)):r.roundToBaseUnit||(c=!P(this.range().max,a)),c&&(n.format=n.format||h,o=this.axisLabelText(a,s,n))?new Ge(a,o,t,s,n):e},categoryIndex:function(t){
var e=this,n=e.options,i=n.categories,o=-1;return i.length&&(o=Pe.floor(C(p(t),i[0],n.baseUnit,n.baseUnitStep||1))),o},getSlot:function(t,e,n){var i=this;return typeof t===so&&(t=i.categoryIndex(t)),typeof e===so&&(e=i.categoryIndex(e)),rt.fn.getSlot.call(i,t,e,n)}}),at=je.extend({init:function(t,e,n){var i=this;n=n||{},Fe(n,{min:p(n.min),max:p(n.max),axisCrossingValue:p(n.axisCrossingValues||n.axisCrossingValue)}),n=i.applyDefaults(p(t),p(e),n),je.fn.init.call(i,n)},options:{type:oi,majorGridLines:{visible:!0,width:1,color:Fn},labels:{dateFormats:fr}},applyDefaults:function(t,n,i){var o=this,r=i.min||t,s=i.max||n,a=i.baseUnit||(s&&r?o.timeUnits(x(s,r)):Pi),l=Uo[a],c=y(g(r)-1,a)||p(s),h=_(g(s)+1,a),u=i.majorUnit?i.majorUnit:e,d=u||Ue.ceil(Ue.autoMajorUnit(c.getTime(),h.getTime()),l)/l,f=k(c,h,a),v=Ue.ceil(f,d),w=v-f,b=Pe.floor(w/2),C=w-b;return i.baseUnit||delete i.baseUnit,i.baseUnit=i.baseUnit||a,i.min=i.min||m(c,-b,a),i.max=i.max||m(h,C,a),i.minorUnit=i.minorUnit||d/5,i.majorUnit=d,this.totalMin=g(y(g(t)-1,a)),this.totalMax=g(_(g(n)+1,a)),i},range:function(){var t=this.options;return{min:t.min,max:t.max}},getDivisions:function(t){var e=this.options;return Pe.floor(k(e.min,e.max,e.baseUnit)/t+1)},getTickPositions:function(t){var e,n,i,o=this.options,r=o.vertical,s=o.reverse,a=this.lineBox(),l=(r?-1:1)*(s?-1:1),c=1===l?1:2,h=a[(r?or:ir)+c],u=this.getDivisions(t),d=w(o.max,o.min),f=r?a.height():a.width(),p=f/d,g=[h];for(e=1;u>e;e++)n=m(o.min,e*o.majorUnit,o.baseUnit),i=h+w(n,o.min)*p*l,g.push(gn(i,Jn));return g},getMajorTickPositions:function(){var t=this;return t.getTickPositions(t.options.majorUnit)},getMinorTickPositions:function(){var t=this;return t.getTickPositions(t.options.minorUnit)},getSlot:function(t,e,n){return Je.fn.getSlot.call(this,p(t),p(e),n)},getValue:function(t){var e=Je.fn.getValue.call(this,t);return null!==e?p(e):null},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(t,e){var n,i,o=this.options,r=t*o.majorUnit,s=o.min;return r>0&&(s=m(s,r,o.baseUnit)),n=e.dateFormats[o.baseUnit],e.format=e.format||n,i=this.axisLabelText(s,null,e),new Ge(s,i,t,null,e)},timeUnits:function(t){var e=Pi;return t>=Ho?e=rr:t>=No?e=Yi:t>=Vo?e=er:t>=Fo&&(e=ri),e},translateRange:function(t,e){var n=this,i=n.options,o=i.baseUnit,r=i.weekStartDay,s=n.lineBox(),a=i.vertical?s.height():s.width(),l=n.range(),c=a/w(l.max,l.min),h=gn(t/c,li),u=b(i.min,h),d=b(i.max,h);return e||(u=m(u,0,o,r),d=m(d,0,o,r)),{min:u,max:d}},scaleRange:function(t){for(var e,n,i=this,o=i.options,r=Pe.abs(t),s=o.min,a=o.max;r--;)e=w(s,a),n=Pe.round(.1*e),0>t?(s=b(s,n),a=b(a,-n)):(s=b(s,-n),a=b(a,n));return{min:s,max:a}},shouldRenderNote:function(t){var e=this.range();return hn(t,e.min)>=0&&hn(t,e.max)<=0},pan:function(t){var n=this.translateRange(t,!0),i=this.limitRange(g(n.min),g(n.max),this.totalMin,this.totalMax);return i?{min:p(i.min),max:p(i.max)}:e},pointsRange:function(t,e){var n=this.getValue(t),i=this.getValue(e),o=Pe.min(n,i),r=Pe.max(n,i);return{min:p(o),max:p(r)}},zoomRange:function(t){var e=this.scaleRange(t),n=p(wn(g(e.min),this.totalMin,this.totalMax)),i=p(wn(g(e.max),this.totalMin,this.totalMax));return{min:n,max:i}}}),lt=$e.extend({options:{vertical:!1,gap:0,spacing:0},reflow:function(t){var e,n,i=this,o=i.options,r=o.vertical,s=r?or:ir,a=i.children,l=o.gap,c=o.spacing,h=a.length,u=h+l+c*(h-1),d=(r?t.height():t.width())/u,f=t[s+1]+d*(l/2);for(n=0;h>n;n++)e=(a[n].box||t).clone(),e[s+1]=f,e[s+2]=f+d,a[n].reflow(e),h-1>n&&(f+=d*c),f+=d}}),ct=$e.extend({options:{vertical:!0},reflow:function(t){var e,n,i,o=this.options,r=o.vertical,s=r?ir:or,a=this.children,l=this.box=new We,c=a.length;for(e=0;c>e;e++)n=a[e],n.visible!==!1&&(i=n.box.clone(),i.snapTo(t,s),0===e&&(l=this.box=i.clone()),n.reflow(i),l.wrap(i))}}),ht={click:function(t,e){return t.trigger(To,this.eventArgs(e))},hover:function(t,e){return t.trigger(Ao,this.eventArgs(e))},eventArgs:function(e){return{value:this.value,percentage:this.percentage,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:t((e||{}).target),originalEvent:e,point:this}}},ut={createNote:function(){var t=this,e=t.options.notes,n=t.noteText||e.label.text;e.visible!==!1&&yn(n)&&null!==n&&(t.note=new Ke(t.value,n,t.dataItem,t.category,t.series,t.options.notes),t.append(t.note))}},dt=$e.extend({init:function(t,e){var n=this;$e.fn.init.call(n),n.options=e,n.color=e.color||nr,n.aboveAxis=Sn(n.options.aboveAxis,!0),n.value=t},defaults:{border:{width:1},vertical:!0,overlay:{gradient:Ti},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}},render:function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},createLabel:function(){var t,e,n=this.options,i=n.labels;i.visible&&(i.template?(e=He(i.template),t=e({dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total,series:this.series})):t=this.formatValue(i.format),this.label=new et(t,Fe({vertical:n.vertical},n.labels)),this.append(this.label))},formatValue:function(t){return this.owner.formatPointValue(this,t)},reflow:function(t){var e,n,i;if(this.render(),e=this,n=e.label,e.box=t,n&&(n.options.aboveAxis=e.aboveAxis,n.reflow(t)),e.note&&e.note.reflow(t),e.errorBars)for(i=0;e.errorBars.length>i;i++)e.errorBars[i].reflow(t)},createVisual:function(){var t,e=this,n=e.box,i=e.options,o=i.visual;e.visible!==!1&&($e.fn.createVisual.call(e),o?(t=this.rectVisual=o({category:e.category,dataItem:e.dataItem,value:e.value,sender:e.getChart(),series:e.series,percentage:e.percentage,runningTotal:e.runningTotal,total:e.total,rect:n.toRect(),createVisual:function(){var t=new An.Group;return e.createRect(t),t},options:i}),t&&e.visual.append(t)):n.width()>0&&n.height()>0&&e.createRect(e.visual))},createRect:function(t){var n,i,o,r,s=this.options,a=s.border,l=yn(a.opacity)?a.opacity:s.opacity,c=this.box.toRect();c.size.width=Math.round(c.size.width),n=this.rectVisual=An.Path.fromRect(c,{fill:{color:this.color,opacity:s.opacity},stroke:{color:this.getBorderColor(),width:a.width,opacity:l,dashType:a.dashType}}),i=this.box.width(),o=this.box.height(),r=s.vertical?i:o,r>Ln&&(ln(n),(1>i||1>o)&&(n.options.stroke.lineJoin="round")),t.append(n),q(s)&&t.append(this.createGradientOverlay(n,{baseColor:this.color},Fe({end:s.vertical?e:[0,1]},s.overlay)))},createHighlight:function(t){var e=An.Path.fromRect(this.box.toRect(),t);return ln(e)},highlightVisual:function(){return this.rectVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},getBorderColor:function(){var t=this,e=t.options,n=t.color,i=e.border,o=i.color,r=i._brightness||Rn;return yn(o)||(o=new Ye(n).brightness(r).toHex()),o},tooltipAnchor:function(t,e){var n,i,o,r,s=this,a=s.options,l=s.box,c=a.vertical,h=s.aboveAxis,u=s.owner.pane.clipBox()||l;return c?(n=l.x2+qo,i=h?Pe.max(l.y1,u.y1):Pe.min(l.y2,u.y2)-e):(o=Pe.max(l.x1,u.x1),r=Pe.min(l.x2,u.x2),a.isStacked?(n=h?r-t:o,i=l.y1-e-qo):(n=h?r+qo:o-t-qo,i=l.y1)),new tn(n,i)},overlapsBox:function(t){return this.box.overlaps(t)}}),Fe(dt.fn,ht),Fe(dt.fn,ut),ft=An.Animation.extend({options:{duration:Mi},setup:function(){var t,e,n=this.element,i=this.options,o=n.bbox();o?(this.origin=i.origin,t=i.vertical?or:ir,e=this.fromScale=new Tn.Point(1,1),e[t]=Do,n.transform(Tn.transform().scale(e.x,e.y))):this.abort()},step:function(t){var e=fn(this.fromScale.x,1,t),n=fn(this.fromScale.y,1,t);this.element.transform(Tn.transform().scale(e,n,this.origin))},abort:function(){An.Animation.fn.abort.call(this),this.element.transform(null)}}),An.AnimationFactory.current.register(zn,ft),pt=An.Animation.extend({options:{duration:200,easing:Ni},setup:function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},step:function(t){this.element.opacity(t*this.fadeTo)}}),An.AnimationFactory.current.register(bi,pt),gt=function(t,e,n){var i=this;i.initGlobalRanges(t,e,n)},gt.prototype=gt.fn={percentRegex:/percent(?:\w*)\((\d+)\)/,standardDeviationRegex:RegExp("^"+Bo+"(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),initGlobalRanges:function(t,e,n){var i,o,r,s,a,l=this,c=e.data,h=l.standardDeviationRegex.exec(t);h?(l.valueGetter=l.createValueGetter(e,n),i=l.getAverage(c),o=l.getStandardDeviation(c,i,!1),r=h[1]?parseFloat(h[1]):1,s={low:i.value-o*r,high:i.value+o*r},l.globalRange=function(){return s}):t.indexOf&&t.indexOf(Eo)>=0&&(l.valueGetter=l.createValueGetter(e,n),a=l.getStandardError(c,l.getAverage(c)),l.globalRange=function(t){return{low:t-a,high:t+a}})},createValueGetter:function(t,e){var n,i,o,r=t.data,s=tt.current,a=s.valueFields(t),l=yn(r[0])?r[0]:{};return Te(l)?(n=e?V(e,a):0,o=Ve("["+n+"]")):B(l)?o=Ve():typeof l===so&&(i=s.sourceFields(t,a),o=Ve(i[V(e,a)])),o},getErrorRange:function(t,e){var n,i,o,r,s=this;if(yn(e)){if(s.globalRange)return s.globalRange(t);if(Te(e))n=t-e[0],i=t+e[1];else if(B(o=parseFloat(e)))n=t-o,i=t+o;else{if(!(o=s.percentRegex.exec(e)))throw Error("Invalid ErrorBar value: "+e);r=t*(parseFloat(o[1])/100),n=t-Pe.abs(r),i=t+Pe.abs(r)}return{low:n,high:i}}},getStandardError:function(t,e){return this.getStandardDeviation(t,e,!0)/Pe.sqrt(e.count)},getStandardDeviation:function(t,e,n){var i,o,r=0,s=t.length,a=n?e.count-1:e.count;for(o=0;s>o;o++)i=this.valueGetter(t[o]),B(i)&&(r+=Pe.pow(i-e.value,2));return Pe.sqrt(r/a)},getAverage:function(t){var e,n,i=0,o=0,r=t.length;for(n=0;r>n;n++)e=this.valueGetter(t[n]),B(e)&&(i+=e,o++);return{value:i/o,count:o}}},mt=$e.extend({init:function(t,e){var n=this;$e.fn.init.call(n,e),n.plotArea=t,n.categoryAxis=t.seriesCategoryAxis(e.series[0]),n.valueAxisRanges={},n.points=[],n.categoryPoints=[],n.seriesPoints=[],n.seriesOptions=[],n._evalSeries=[],n.render()},options:{series:[],invertAxes:!1,isStacked:!1,clip:!0},render:function(){var t=this;t.traverseDataPoints(Be(t.addValue,t))},pointOptions:function(t,e){var n,i=this.seriesOptions[e];return i||(n=this.pointType().fn.defaults,this.seriesOptions[e]=i=Fe({},n,{vertical:!this.options.invertAxes},t)),i},plotValue:function(t){var e,n,i,o,r,s,a,l;if(!t)return 0;if(this.options.isStacked100&&B(t.value)){for(e=t.categoryIx,n=this.categoryPoints[e],i=0,o=[],r=0;n.length>r;r++)if(s=n[r]){if(a=t.series.stack,l=s.series.stack,a&&l&&a.group!==l.group)continue;B(s.value)&&(i+=Pe.abs(s.value),o.push(Pe.abs(s.value)))}if(i>0)return t.value/i}return t.value},plotRange:function(t,e){var n,i,o,r,s,a,l,c,h,u,d,f,p=t.categoryIx,g=this.categoryPoints[p];if(this.options.isStacked){for(e=e||0,n=this.plotValue(t),i=n>=0,o=e,r=!1,s=0;g.length>s&&(a=g[s],t!==a);s++){if(l=t.series.stack,c=a.series.stack,l&&c){if(typeof l===Io&&l!==c)continue;if(l.group&&l.group!==c.group)continue}h=this.plotValue(a),(h>=0&&i||0>h&&!i)&&(o+=h,n+=h,r=!0,this.options.isStacked100&&(n=Pe.min(n,1)))}return r&&(o-=e),[o,n]}return u=t.series,d=this.seriesValueAxis(u),f=this.categoryAxisCrossingValue(d),[f,t.value||f]},stackLimits:function(t,e){var n,i,o,r,s,a=Gi,l=qi;for(n=0;this.categoryPoints.length>n;n++)for(i=this.categoryPoints[n],o=0;i.length>o;o++)r=i[o],r&&(r.series.stack===e||r.series.axis===t)&&(s=this.plotRange(r,0)[1],yn(s)&&isFinite(s)&&(l=Pe.max(l,s),a=Pe.min(a,s)));return{min:a,max:l}},updateStackRange:function(){var t,e,n,i,o,r,s=this,a=s.options.series,l=s.options.isStacked,c={};if(l)for(e=0;a.length>e;e++)n=a[e],i=n.axis,o=i+n.stack,t=c[o],t||(t=s.stackLimits(i,n.stack),r=s.errorTotals,r&&(r.negative.length&&(t.min=Pe.min(t.min,bn(r.negative))),r.positive.length&&(t.max=Pe.max(t.max,kn(r.positive)))),t.min!==Gi||t.max!==qi?c[o]=t:t=null),t&&(s.valueAxisRanges[i]=t)},addErrorBar:function(t,e,n){var i,o=this,r=t.value,s=t.series,a=t.seriesIx,l=t.options.errorBars,c=e.fields[mi],h=e.fields[vi];B(c)&&B(h)?i={low:c,high:h}:l&&yn(l.value)&&(o.seriesErrorRanges=o.seriesErrorRanges||[],o.seriesErrorRanges[a]=o.seriesErrorRanges[a]||new gt(l.value,s,Qo),i=o.seriesErrorRanges[a].getErrorRange(r,l.value)),i&&(t.low=i.low,t.high=i.high,o.addPointErrorBar(t,n))},addPointErrorBar:function(t,e){var n,i,o,r=this,s=t.series,a=t.low,l=t.high,c=!r.options.invertAxes,h=t.options.errorBars;r.options.isStacked?(i=r.stackedErrorRange(t,e),a=i.low,l=i.high):(o={categoryIx:e,series:s},r.updateRange({value:a},o),r.updateRange({value:l},o)),n=new Ct(a,l,c,r,s,h),t.errorBars=[n],t.append(n)},stackedErrorRange:function(t,e){var n=this,i=n.plotRange(t,0)[1]-t.value,o=t.low+i,r=t.high+i;return n.errorTotals=n.errorTotals||{positive:[],negative:[]},0>o&&(n.errorTotals.negative[e]=Pe.min(n.errorTotals.negative[e]||0,o)),r>0&&(n.errorTotals.positive[e]=Pe.max(n.errorTotals.positive[e]||0,r)),{low:o,high:r}},addValue:function(e,n){var i,o,r=this,s=n.categoryIx,a=n.series,l=n.seriesIx,c=r.categoryPoints[s];c||(r.categoryPoints[s]=c=[]),i=r.seriesPoints[l],i||(r.seriesPoints[l]=i=[]),o=r.createPoint(e,n),o&&(t.extend(o,n),o.owner=r,o.dataItem=a.data[s],o.noteText=e.fields.noteText,r.addErrorBar(o,e,s)),r.points.push(o),i.push(o),c.push(o),r.updateRange(e.valueFields,n)},evalPointOptions:function(t,e,n,i,o,r){var s={defaults:o._defaults,excluded:["data","aggregate","_events","tooltip","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[r];return yn(a)||(this._evalSeries[r]=a=R(t,{},s,!0)),a&&(t=Fe({},t),R(t,{value:e,category:n,index:i,series:o,dataItem:o.data[i]},s)),t},updateRange:function(t,e){var n=this,i=e.series.axis,o=t.value,r=n.valueAxisRanges[i];isFinite(o)&&null!==o&&(r=n.valueAxisRanges[i]=r||{min:Gi,max:qi},r.min=Pe.min(r.min,o),r.max=Pe.max(r.max,o))},seriesValueAxis:function(t){var e=this.plotArea,n=t.axis,i=n?e.namedValueAxes[n]:e.valueAxis;if(!i)throw Error("Unable to locate value axis with name "+n);return i},reflow:function(t){var e,n,i,o=this,r=0,s=o.categorySlots=[],a=o.points,l=o.categoryAxis;o.traverseDataPoints(function(t,c){var h,u,d,f,p=c.categoryIx,g=c.series;e=o.pointValue(t),n=o.seriesValueAxis(g),i=a[r++],h=s[p],h||(s[p]=h=o.categorySlot(l,p,n)),i&&(u=o.plotRange(i,n.startValue()),d=n.getSlot(u[0],u[1],!o.options.clip),d?(f=o.pointSlot(h,d),i.aboveAxis=o.aboveAxis(i,n),o.options.isStacked100&&(i.percentage=o.plotValue(i)),o.reflowPoint(i,f)):i.visible=!1)}),o.reflowCategories(s),o.box=t},aboveAxis:function(t,e){var n=this.categoryAxisCrossingValue(e),i=t.value;return e.options.reverse?n>i:i>=n},categoryAxisCrossingValue:function(t){var e=this.categoryAxis,n=t.options,i=[].concat(n.axisCrossingValues||n.axisCrossingValue);return i[e.axisIndex||0]||0},reflowPoint:function(t,e){t.reflow(e)},reflowCategories:function(){},pointSlot:function(t,e){var n=this,i=n.options,o=i.invertAxes,r=o?e:t,s=o?t:e;return new We(r.x1,s.y1,r.x2,s.y2)},categorySlot:function(t,e){return t.getSlot(e)},traverseDataPoints:function(t){var e,n,i,o,r,s=this,a=s.options,l=a.series,c=s.categoryAxis.options.categories||[],u=h(l),d=l.length;for(n=0;d>n;n++)this._outOfRangeCallback(l[n],"_outOfRangeMinPoint",n,t);for(e=0;u>e;e++)for(n=0;d>n;n++)r=l[n],o=c[e],i=this._bindPoint(r,n,e),t(i,{category:o,categoryIx:e,series:r,seriesIx:n});for(n=0;d>n;n++)this._outOfRangeCallback(l[n],"_outOfRangeMaxPoint",n,t)},_outOfRangeCallback:function(t,e,n,i){var o,r,s=t[e];s&&(o=s.categoryIx,r=this._bindPoint(t,n,o,s.item),i(r,{category:s.category,categoryIx:o,series:t,seriesIx:n}))},_bindPoint:function(t,e,n,i){var o,r;return this._bindCache||(this._bindCache=[]),o=this._bindCache[e],o||(o=this._bindCache[e]=[]),r=o[n],r||(r=o[n]=tt.current.bindPoint(t,n,i)),r},formatPointValue:function(t,e){return null===t.value?"":cn(e,t.value)},pointValue:function(t){return t.valueFields.value}}),vt=mt.extend({options:{animation:{type:zn}},render:function(){var t=this;mt.fn.render.apply(t),t.updateStackRange()},pointType:function(){return dt},clusterType:function(){return lt},stackType:function(){return ct},stackLimits:function(t,e){var n=mt.fn.stackLimits.call(this,t,e);return n},createPoint:function(t,e){var n,i,o,r,s=this,a=e.categoryIx,l=e.category,c=e.series,h=e.seriesIx,u=s.pointValue(t),d=s.options,f=s.children,p=s.options.isStacked,g=s.pointType(),m=s.clusterType(),v=this.pointOptions(c,h),y=v.labels;return p&&y.position==lo&&(y.position=Bi),v.isStacked=p,o=t.fields.color||c.color,0>u&&v.negativeColor&&(o=v.negativeColor),v=s.evalPointOptions(v,u,l,a,c,h),Ie.isFunction(c.color)&&(o=v.color),n=new g(u,v),n.color=o,i=f[a],i||(i=new m({vertical:d.invertAxes,gap:d.gap,spacing:d.spacing}),s.append(i)),p?(r=s.getStackWrap(c,i),r.append(n)):i.append(n),n},getStackWrap:function(t,e){var n,i,o,r=t.stack,s=r?r.group||r:r,a=e.children;if(typeof s===Io){for(i=0;a.length>i;i++)if(a[i]._stackGroup===s){n=a[i];break}}else n=a[0];return n||(o=this.stackType(),n=new o({vertical:!this.options.invertAxes}),n._stackGroup=s,e.append(n)),n},categorySlot:function(t,e,n){var i,o,r=this,s=r.options,a=t.getSlot(e),l=n.startValue();return s.isStacked&&(o=n.getSlot(l,l,!0),i=s.invertAxes?ir:or,a[i+1]=a[i+2]=o[i+1]),a},reflowCategories:function(t){var e,n=this,i=n.children,o=i.length;for(e=0;o>e;e++)i[e].reflow(t[e])},createAnimation:function(){this._setAnimationOptions(),$e.fn.createAnimation.call(this),$(this.options.series)&&this._setChildrenAnimation()},_setChildrenAnimation:function(){var t,e,n,i=this.points;for(n=0;i.length>n;n++)t=i[n],e=t.visual,e&&yn(e.options.zIndex)&&(t.options.animation=this.options.animation,t.createAnimation())},_setAnimationOptions:function(){var t,e,n=this.options,i=n.animation||{};this.options.isStacked?(e=this.seriesValueAxis(n.series[0]),t=e.getSlot(e.startValue())):t=this.categoryAxis.getSlot(0),i.origin=new Tn.Point(t.x1,t.y1),i.vertical=!n.invertAxes}}),yt=dt.extend({defaults:{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}},createLabel:function(){var t=this.options.labels,e=Fe({},t,t.from),n=Fe({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),n.visible&&(this.labelTo=this._createLabel(n),this.append(this.labelTo))},_createLabel:function(t){var e,n;return t.template?(n=He(t.template),e=n({dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total,series:this.series})):e=this.formatValue(t.format),new et(e,Fe({vertical:this.options.vertical},t))},reflow:function(t){this.render();var e=this,n=e.labelFrom,i=e.labelTo;e.box=t,n&&(n.options.aboveAxis=e.value.from>e.value.to,n.reflow(t)),i&&(i.options.aboveAxis=e.value.to>e.value.from,i.reflow(t)),e.note&&e.note.reflow(t)}}),_t=vt.extend({pointType:function(){return yt},pointValue:function(t){return t.valueFields},formatPointValue:function(t,e){return null===t.value.from&&null===t.value.to?"":cn(e,t.value.from,t.value.to)},plotLimits:mt.fn.plotLimits,plotRange:function(t){return t?[t.value.from,t.value.to]:0},updateRange:function(t,e){var n=this,i=e.series.axis,o=t.from,r=t.to,s=n.valueAxisRanges[i];null!==t&&B(o)&&B(r)&&(s=n.valueAxisRanges[i]=s||{min:Gi,max:qi},s.min=Pe.min(s.min,o),s.max=Pe.max(s.max,o),s.min=Pe.min(s.min,r),s.max=Pe.max(s.max,r))},aboveAxis:function(t){var e=t.value;return e.to>e.from}}),wt=mt.extend({init:function(t,e){var n=this;n.wrapData(e),mt.fn.init.call(n,t,e)},options:{animation:{type:zn}},wrapData:function(t){var e,n,i,o=t.series;for(e=0;o.length>e;e++)i=o[e],n=i.data,n&&!Te(n[0])&&typeof n[0]!=so&&(i.data=[n])},reflowCategories:function(t){var e,n=this,i=n.children,o=i.length;for(e=0;o>e;e++)i[e].reflow(t[e])},plotRange:function(t){var e=t.series,n=this.seriesValueAxis(e),i=this.categoryAxisCrossingValue(n);return[i,t.value.current||i]},createPoint:function(t,e){var n,i,o=this,r=e.categoryIx,s=e.category,a=e.series,l=e.seriesIx,c=t.valueFields,h=o.options,u=o.children,d=Fe({vertical:!h.invertAxes,overlay:a.overlay,categoryIx:r,invertAxes:h.invertAxes},a),f=t.fields.color||a.color;return d=o.evalPointOptions(d,c,s,r,a,l),Ie.isFunction(a.color)&&(f=d.color),n=new xt(c,d),n.color=f,i=u[r],i||(i=new lt({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing}),o.append(i)),i.append(n),n},updateRange:function(t,e){var n=this,i=e.series.axis,o=t.current,r=t.target,s=n.valueAxisRanges[i];yn(o)&&!isNaN(o)&&yn(r&&!isNaN(r))&&(s=n.valueAxisRanges[i]=s||{min:Gi,max:qi},s.min=Pe.min.apply(Pe,[s.min,o,r]),s.max=Pe.max.apply(Pe,[s.max,o,r]))},formatPointValue:function(t,e){return cn(e,t.value.current,t.value.target)},pointValue:function(t){return t.valueFields.current},aboveAxis:function(t){var e=t.value.current;return e>0},createAnimation:function(){var t,e,n=this.points;for(this._setAnimationOptions(),e=0;n.length>e;e++)t=n[e],t.options.animation=this.options.animation,t.createAnimation()},_setAnimationOptions:vt.fn._setAnimationOptions}),xt=$e.extend({init:function(t,e){var n=this;$e.fn.init.call(n,e),n.aboveAxis=n.options.aboveAxis,n.color=e.color||nr,n.value=t},options:{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}</br>Target: {1}"}},render:function(){var t=this,e=t.options;t._rendered||(t._rendered=!0,yn(t.value.target)&&(t.target=new bt({type:e.target.shape,background:e.target.color||t.color,opacity:e.opacity,zIndex:e.zIndex,border:e.target.border,vAlign:Go,align:vo}),t.append(t.target)),t.createNote())},reflow:function(t){this.render();var e,n=this,i=n.options,o=n.owner,r=n.target,s=i.invertAxes,a=o.seriesValueAxis(n.options),l=o.categorySlot(o.categoryAxis,i.categoryIx,a),c=a.getSlot(n.value.target),h=s?c:l,u=s?l:c;r&&(e=new We(h.x1,u.y1,h.x2,u.y2),r.options.height=s?e.height():i.target.line.width,r.options.width=s?i.target.line.width:e.width(),r.reflow(e)),n.note&&n.note.reflow(t),n.box=t},createVisual:function(){var t,e;$e.fn.createVisual.call(this),t=this.options,e=An.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null}),t.border.width>0&&e.options.set("stroke",{color:t.border.color||this.color,width:t.border.width,dashType:t.border.dashType,opacity:Sn(t.border.opacity,t.opacity)}),this.bodyVisual=e,ln(e),this.visual.append(e)},createAnimation:function(){this.bodyVisual&&(this.animation=An.Animation.create(this.bodyVisual,this.options.animation))},tooltipAnchor:function(t,e){var n,i,o,r,s=this,a=s.options,l=s.box,c=a.vertical,h=s.aboveAxis,u=s.owner.pane.clipBox()||l;return c?(n=l.x2+qo,i=h?Pe.max(l.y1,u.y1):Pe.min(l.y2,u.y2)-e):(o=Pe.max(l.x1,u.x1),r=Pe.min(l.x2,u.x2),a.isStacked?(n=h?r-t:o,i=l.y1-e-qo):(n=h?r+qo:o-t-qo,i=l.y1)),new tn(n,i)},createHighlight:function(t){return An.Path.fromRect(this.box.toRect(),t)},highlightVisual:function(){return this.bodyVisual},highlightVisualArgs:function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},formatValue:function(t){var e=this;return e.owner.formatPointValue(e,t)}}),Fe(xt.fn,ht),Fe(xt.fn,ut),bt=on.extend(),Fe(bt.fn,ht),kt=$e.extend({init:function(t,e,n,i,o,r){var s=this;s.low=t,s.high=e,s.isVertical=n,s.chart=i,s.series=o,$e.fn.init.call(s,r)},options:{animation:{type:bi,delay:Mi},endCaps:!0,line:{width:1},zIndex:1},getAxis:function(){},reflow:function(t){var e,n=this,i=n.options.endCaps,o=n.isVertical,r=n.getAxis(),s=r.getSlot(n.low,n.high),a=t.center(),l=n.getCapsWidth(t,o),c=o?a.x:a.y,h=c-l,u=c+l;o?(e=[tn(a.x,s.y1),tn(a.x,s.y2)],i&&e.push(tn(h,s.y1),tn(u,s.y1),tn(h,s.y2),tn(u,s.y2)),n.box=We(h,s.y1,u,s.y2)):(e=[tn(s.x1,a.y),tn(s.x2,a.y)],i&&e.push(tn(s.x1,h),tn(s.x1,u),tn(s.x2,h),tn(s.x2,u)),n.box=We(s.x1,h,s.x2,u)),n.linePoints=e},getCapsWidth:function(t,e){var n=e?t.width():t.height(),i=Pe.min(Pe.floor(n/2),hi)||hi;return i},createVisual:function(){var t=this,e=t.options,n=e.visual;n?t.visual=n({low:t.low,high:t.high,rect:t.box.toRect(),sender:t.getChart(),options:{endCaps:e.endCaps,color:e.color,line:e.line},createVisual:function(){t.createDefaultVisual();var e=t.visual;return delete t.visual,e}}):t.createDefaultVisual()},createDefaultVisual:function(){var t,e,n=this,i=n.options,o={stroke:{color:i.color,width:i.line.width,dashType:i.line.dashType}},r=n.linePoints;for($e.fn.createVisual.call(this),t=0;r.length>t;t+=2)e=new An.Path(o).moveTo(r[t].x,r[t].y).lineTo(r[t+1].x,r[t+1].y),this.visual.append(e)}}),Ct=kt.extend({getAxis:function(){var t=this,e=t.chart,n=t.series,i=e.seriesValueAxis(n);return i}}),St=kt.extend({getAxis:function(){var t=this,e=t.chart,n=t.series,i=e.seriesAxes(n),o=t.isVertical?i.y:i.x;return o}}),Tt=$e.extend({init:function(t,e){var n=this;$e.fn.init.call(n),n.value=t,n.options=e,n.aboveAxis=Sn(n.options.aboveAxis,!0),n.tooltipTracking=!0},defaults:{vertical:!0,markers:{visible:!0,background:nr,size:Vi,type:Yn,border:{width:2},opacity:1},labels:{visible:!1,position:Pn,margin:un(3),padding:un(4),animation:{type:bi,delay:Mi}},notes:{label:{}},highlight:{markers:{border:{}}}},render:function(){var t,e=this,n=e.options,i=n.markers,o=n.labels,r=e.value;e._rendered||(e._rendered=!0,i.visible&&i.size&&(e.marker=e.createMarker(),e.append(e.marker)),o.visible&&(o.template?(t=He(o.template),r=t({dataItem:e.dataItem,category:e.category,value:e.value,percentage:e.percentage,series:e.series})):o.format&&(r=e.formatValue(o.format)),e.label=new sn(r,Fe({align:qn,vAlign:qn,margin:{left:5,right:5},zIndex:Sn(o.zIndex,this.series.zIndex)},o)),e.append(e.label)),e.createNote(),e.errorBar&&e.append(e.errorBar))},markerBorder:function(){var t=this.options.markers,e=t.background,n=Fe({color:this.color},t.border);return yn(n.color)||(n.color=new Ye(e).brightness(Rn).toHex()),n},createVisual:Me,createMarker:function(){var t=this.options.markers,e=new on({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,zIndex:Sn(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});return e},markerBox:function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},reflow:function(t){var e,n,i,o,r=this,s=r.options,a=s.vertical,l=r.aboveAxis;if(r.render(),r.box=t,e=t.clone(),a?l?e.y1-=e.height():e.y2+=e.height():l?e.x1+=e.width():e.x2-=e.width(),r._childBox=e,r.marker&&r.marker.reflow(e),r.reflowLabel(e),r.errorBars)for(i=0;r.errorBars.length>i;i++)r.errorBars[i].reflow(e);r.note&&(o=r.markerBox(),r.marker||(n=o.center(),o=We(n.x,n.y,n.x,n.y)),r.note.reflow(o))},reflowLabel:function(t){var e=this,n=e.options,i=e.label,o=n.labels.position;i&&(o=o===Pn?Go:o,o=o===On?Nn:o,i.reflow(t),i.box.alignTo(e.markerBox(),o),i.reflow(i.box))},createHighlight:function(){var t=this.options.highlight,e=t.markers,n=this.markerBorder().color,i=this.options.markers,o=new on({type:i.type,width:i.size,height:i.size,rotation:i.rotation,background:e.color||n,border:{color:e.border.color,width:e.border.width,opacity:Sn(e.border.opacity,1)},opacity:Sn(e.opacity,1)});return o.reflow(this._childBox),o.getElement()},highlightVisual:function(){return(this.marker||{}).visual},highlightVisualArgs:function(){var t,e,n,i,o,r=this.marker;return r?(e=r.paddingBox.toRect(),t=r.visual):(n=this.options.markers.size,i=n/2,o=this.box.center(),e=new Tn.Rect([o.x-i,o.y-i],[n,n])),{options:this.options,rect:e,visual:t}},tooltipAnchor:function(t,n){var i=this,o=i.markerBox(),r=i.aboveAxis,s=o.x2+qo,a=r?o.y1-n:o.y2,l=i.owner.pane.clipBox(),c=!l||l.overlaps(o);return c?tn(s,a):e},formatValue:function(t){var e=this;return e.owner.formatPointValue(e,t)},overlapsBox:function(t){var e=this.markerBox();return e.overlaps(t)}}),Fe(Tt.fn,ht),Fe(Tt.fn,ut),At=Tt.extend({init:function(t,e){var n=this;Tt.fn.init.call(n,t,e),n.category=t.category},defaults:{labels:{position:qn},highlight:{opacity:1,border:{width:1,opacity:1}}},createHighlight:function(){var t=this.options.highlight,e=t.border,n=this.options.markers,i=this.box.center(),o=n.size/2-e.width/2,r=new An.Circle(new Tn.Circle([i.x,i.y],o),{stroke:{color:e.color||new Ye(n.background).brightness(Rn).toHex(),width:e.width,opacity:e.opacity},fill:{color:n.background,opacity:t.opacity}});return r}}),Dt=$e.extend({init:function(t,e,n){var i=this;$e.fn.init.call(i),i.linePoints=t,i.series=e,i.seriesIx=n},options:{closed:!1},points:function(t){var e,n,i=this,o=i.linePoints.concat(t||[]),r=[];for(e=0,n=o.length;n>e;e++)o[e].visible!==!1&&r.push(o[e]._childBox.toRect().center());return r},createVisual:function(){var t,e=this.options,n=this.series,i=n._defaults,o=n.color;Ne(o)&&i&&(o=i.color),t=An.Path.fromPoints(this.points(),{stroke:{color:o,width:n.width,opacity:n.opacity,dashType:n.dashType},zIndex:n.zIndex}),e.closed&&t.close(),this.visual=t},aliasFor:function(t,e){var n=this,i=n.seriesIx;return n.parent.getNearestPoint(e.x,e.y,i)}}),Pt={renderSegments:function(){var t,e,n,i,o,r,s,a,l=this,c=l.options,h=c.series,u=l.seriesPoints,d=u.length;for(this._segments=[],e=0;d>e;e++){for(t=h[e],n=l.sortPoints(u[e]),s=n.length,i=[],r=0;s>r;r++)o=n[r],o?i.push(o):l.seriesMissingValues(t)!==Ii&&(i.length>1&&(a=l.createSegment(i,t,e,a),this._addSegment(a)),i=[]);i.length>1&&(a=l.createSegment(i,t,e,a),this._addSegment(a))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){var e=t.missingValues,n=!e&&this.options.isStacked;return n?sr:e||Ii},getNearestPoint:function(t,e,n){var i,o,r,s,a,l=new tn(t,e),c=this.seriesPoints[n],h=Gi;for(o=0;c.length>o;o++)r=c[o],r&&yn(r.value)&&null!==r.value&&r.visible!==!1&&(s=r.box,a=s.center().distanceTo(l),h>a&&(i=r,h=a));return i}},Mt={createAnimation:function(){var t,e,n=this.getRoot();n&&(n.options||{}).transitions!==!1&&(t=n.box,e=An.Path.fromRect(t.toRect()),this.visual.clip(e),this.animation=new Bt(e,{box:t}),$(this.options.series)&&this._setChildrenAnimation(e))},_setChildrenAnimation:function(t){var e,n,i=this.animationPoints();for(n=0;i.length>n;n++)e=i[n],e&&e.visual&&yn(e.visual.options.zIndex)&&e.visual.clip(t)}},Et=mt.extend({render:function(){var t=this;mt.fn.render.apply(t),t.updateStackRange(),t.renderSegments()},pointType:function(){return Tt},createPoint:function(t,e){var n,i,o,r=this,s=e.categoryIx,a=e.category,l=e.series,c=e.seriesIx,h=t.valueFields.value,u=r.seriesMissingValues(l);if(!yn(h)||null===h){if(u!==sr)return null;h=0}return i=this.pointOptions(l,c),i=r.evalPointOptions(i,h,a,s,l,c),o=t.fields.color||l.color,Ie.isFunction(l.color)&&(o=i.color),n=new Tt(h,i),n.color=o,r.append(n),n},plotRange:function(t){var e,n,i,o,r=this.plotValue(t);if(this.options.isStacked)for(e=t.categoryIx,n=this.categoryPoints[e],i=0;n.length>i&&(o=n[i],t!==o);i++)r+=this.plotValue(o);return[r,r]},createSegment:function(t,e,n){var i,o=e.style;return new(i=o===Po?It:o===Mo?zt:Dt)(t,e,n)},animationPoints:function(){var t,e=this.points,n=[];for(t=0;e.length>t;t++)n.push((e[t]||{}).marker);return n.concat(this._segments)}}),Fe(Et.fn,Pt,Mt),Bt=An.Animation.extend({options:{duration:Mi},setup:function(){this._setEnd(this.options.box.x1)},step:function(t){var e=this.options.box;this._setEnd(fn(e.x1,e.x2,t))},_setEnd:function(t){var e=this.element,n=e.segments,i=n[1].anchor(),o=n[2].anchor();e.suspend(),i.setX(t),e.resume(),o.setX(t)}}),An.AnimationFactory.current.register(Qn,Bt),It=Dt.extend({points:function(t){var e,n=this;return e=n.calculateStepPoints(n.linePoints),t&&t.length&&(e=e.concat(n.calculateStepPoints(t).reverse())),e},calculateStepPoints:function(t){var e,n,i,o,r,s=this,a=s.parent,l=a.plotArea,c=l.seriesCategoryAxis(s.series),h=a.seriesMissingValues(s.series)===Ii,u=t.length,d=c.options.reverse,f=c.options.vertical,p=d?2:1,g=d?1:2,m=[];for(i=1;u>i;i++)e=t[i-1],n=t[i],o=e.markerBox().center(),r=n.markerBox().center(),c.options.justified?(m.push(new Tn.Point(o.x,o.y)),m.push(f?new Tn.Point(o.x,r.y):new Tn.Point(r.x,o.y)),m.push(new Tn.Point(r.x,r.y))):f?(m.push(new Tn.Point(o.x,e.box[or+p])),m.push(new Tn.Point(o.x,e.box[or+g])),h&&m.push(new Tn.Point(o.x,n.box[or+p])),m.push(new Tn.Point(r.x,n.box[or+p])),m.push(new Tn.Point(r.x,n.box[or+g]))):(m.push(new Tn.Point(e.box[ir+p],o.y)),
m.push(new Tn.Point(e.box[ir+g],o.y)),h&&m.push(new Tn.Point(n.box[ir+p],o.y)),m.push(new Tn.Point(n.box[ir+p],r.y)),m.push(new Tn.Point(n.box[ir+g],r.y)));return m||[]}}),zt=Dt.extend({createVisual:function(){var t,e,n,i=this.series,o=i._defaults,r=i.color;Ne(r)&&o&&(r=o.color),t=new Xe(this.options.closed),e=t.process(this.points()),n=new An.Path({stroke:{color:r,width:i.width,opacity:i.opacity,dashType:i.dashType},zIndex:i.zIndex}),n.segments.push.apply(n.segments,e),this.visual=n}}),Lt={points:function(){var t,e,n=this,i=n.parent,o=i.plotArea,r=i.options.invertAxes,s=i.seriesValueAxis(n.series),a=s.lineBox(),l=o.seriesCategoryAxis(n.series),c=l.lineBox(),h=r?c.x1:c.y1,u=n.stackPoints,d=n._linePoints(u),f=r?ir:or;return h=wn(h,a[f+1],a[f+2]),!n.stackPoints&&d.length>1&&(t=d[0],e=_n(d),r?(d.unshift(new Tn.Point(h,t.y)),d.push(new Tn.Point(h,e.y))):(d.unshift(new Tn.Point(t.x,h)),d.push(new Tn.Point(e.x,h)))),d},createVisual:function(){var t=this.series,e=t._defaults,n=t.color;Ne(n)&&e&&(n=e.color),this.visual=new An.Group({zIndex:t.zIndex}),this.createArea(n),this.createLine(n)},createLine:function(t){var e,n=this.series,i=Fe({color:t,opacity:n.opacity},n.line);i.visible!==!1&&i.width>0&&(e=An.Path.fromPoints(this._linePoints(),{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType,lineCap:"butt"}}),this.visual.append(e))},createArea:function(t){var e=this.series,n=An.Path.fromPoints(this.points(),{fill:{color:t,opacity:e.opacity},stroke:null});this.visual.append(n)}},Rt=Dt.extend({init:function(t,e,n,i){var o=this;o.stackPoints=e,Dt.fn.init.call(o,t,n,i)},_linePoints:Dt.fn.points}),Fe(Rt.fn,Lt),Ot=Et.extend({createSegment:function(t,e,n,i){var o,r,s,a=this,l=a.options,c=l.isStacked,h=(e.line||{}).style;return c&&n>0&&i&&(s=this.seriesMissingValues(e),o="gap"!=s?i.linePoints:this._gapStackPoints(t,n,h),h!==Po&&(o=o.slice(0).reverse())),h===Mo?new Ft(t,i,c,e,n):new(r=h===Po?Vt:Rt)(t,o,e,n)},reflow:function(t){var e,n,i,o;if(Et.fn.reflow.call(this,t),e=this._stackPoints)for(o=0;e.length>o;o++)n=e[o],i=this.categoryAxis.getSlot(n.categoryIx),n.reflow(i)},_gapStackPoints:function(t,e,n){var i,o,r,s,a=this.seriesPoints,l=t[0].categoryIx,c=l+t.length,h=[];for(this._stackPoints=this._stackPoints||[],s=l;c>s;s++){i=e;do i--,o=a[i][s];while(i>0&&!o);o?(n!==Po&&s>l&&!a[i][s-1]&&h.push(this._previousSegmentPoint(s,s-1,i)),h.push(o),n!==Po&&c>s+1&&!a[i][s+1]&&h.push(this._previousSegmentPoint(s,s+1,i))):(r=this._createGapStackPoint(s),this._stackPoints.push(r),h.push(r))}return h},_previousSegmentPoint:function(t,e,n){for(var i,o=this.seriesPoints;n>0&&!i;)n--,i=o[n][e];return i?i=o[n][t]:(i=this._createGapStackPoint(t),this._stackPoints.push(i)),i},_createGapStackPoint:function(t){var e=this.pointOptions({},0),n=new Tt(0,e);return n.categoryIx=t,n.series={},n},seriesMissingValues:function(t){return t.missingValues||sr}}),Ft=Rt.extend({init:function(t,e,n,i,o){var r=this;r.prevSegment=e,r.isStacked=n,Dt.fn.init.call(r,t,i,o)},strokeSegments:function(){var t,e,n=this._strokeSegments;return n||(t=new Xe(this.options.closed),e=Dt.fn.points.call(this),n=this._strokeSegments=t.process(e)),n},createVisual:function(){var t=this.series,e=t._defaults,n=t.color;Ne(n)&&e&&(n=e.color),this.visual=new An.Group({zIndex:t.zIndex}),this.createFill({fill:{color:n,opacity:t.opacity},stroke:null}),this.createStroke({stroke:Fe({color:n,opacity:t.opacity,lineCap:"butt"},t.line)})},createFill:function(e){var n,i,o,r,s,a=this.strokeSegments(),l=a.slice(0),c=this.prevSegment;this.isStacked&&c&&(n=c.strokeSegments(),i=_n(n).anchor(),l.push(new An.Segment(i,i,_n(a).anchor())),o=t.map(n,function(t){return new An.Segment(t.anchor(),t.controlOut(),t.controlIn())}).reverse(),vn(l,o),r=l[0].anchor(),l.push(new An.Segment(r,r,_n(o).anchor()))),s=new An.Path(e),s.segments.push.apply(s.segments,l),this.closeFill(s),this.visual.append(s)},closeFill:function(t){var e=this,n=e.parent,i=e.prevSegment,o=n.plotArea,r=n.options.invertAxes,s=n.seriesValueAxis(e.series),a=s.lineBox(),l=o.seriesCategoryAxis(e.series),c=l.lineBox(),h=r?c.x1:c.y1,u=r?ir:or,d=e.strokeSegments(),f=d[0].anchor(),p=_n(d).anchor();h=wn(h,a[u+1],a[u+2]),n.options.isStacked&&i||!(d.length>1)||(r?t.lineTo(h,p.y).lineTo(h,f.y):t.lineTo(p.x,h).lineTo(f.x,h))},createStroke:function(t){if(t.stroke.width>0){var e=new An.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)}}}),Vt=It.extend({init:function(t,e,n,i){var o=this;o.stackPoints=e,It.fn.init.call(o,t,n,i)},_linePoints:It.fn.points}),Fe(Vt.fn,Lt),Nt=$e.extend({init:function(t,e){var n=this;$e.fn.init.call(n,e),n.plotArea=t,n.xAxisRanges={},n.yAxisRanges={},n.points=[],n.seriesPoints=[],n.seriesOptions=[],n._evalSeries=[],n.render()},options:{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0},render:function(){var t=this;t.traverseDataPoints(Be(t.addValue,t))},addErrorBar:function(t,e,n){var i,o=this,r=t.value[e],s=e+"Value",a=e+"ErrorLow",l=e+"ErrorHigh",c=n.seriesIx,h=n.series,u=t.options.errorBars,d=n[a],f=n[l];B(r)&&(B(d)&&B(f)&&(i={low:d,high:f}),u&&yn(u[s])&&(o.seriesErrorRanges=o.seriesErrorRanges||{x:[],y:[]},o.seriesErrorRanges[e][c]=o.seriesErrorRanges[e][c]||new gt(u[s],h,e),i=o.seriesErrorRanges[e][c].getErrorRange(r,u[s])),i&&o.addPointErrorBar(i,t,e))},addPointErrorBar:function(t,e,n){var i,o=this,r=t.low,s=t.high,a=e.series,l=n===or,c=e.options.errorBars,h={};e[n+"Low"]=r,e[n+"High"]=s,e.errorBars=e.errorBars||[],i=new St(r,s,l,o,a,c),e.errorBars.push(i),e.append(i),h[n]=r,o.updateRange(h,a),h[n]=s,o.updateRange(h,a)},addValue:function(t,e){var n,i=this,o=t.x,r=t.y,s=e.seriesIx,a=this.options.series[s],l=this.seriesMissingValues(a),c=i.seriesPoints[s];Q(o)&&Q(r)||(t=this.createMissingValue(t,l)),t&&(n=i.createPoint(t,e),n&&(Ee(n,e),i.addErrorBar(n,ir,e),i.addErrorBar(n,or,e)),i.updateRange(t,e.series)),i.points.push(n),c.push(n)},seriesMissingValues:function(t){return t.missingValues},createMissingValue:Me,updateRange:function(t,e){var n=this,i=t.x,o=t.y,r=e.xAxis,s=e.yAxis,a=n.xAxisRanges[r],l=n.yAxisRanges[s];Q(i)&&(a=n.xAxisRanges[r]=a||{min:Gi,max:qi},typeof i===Io&&(i=p(i)),a.min=Pe.min(a.min,i),a.max=Pe.max(a.max,i)),Q(o)&&(l=n.yAxisRanges[s]=l||{min:Gi,max:qi},typeof o===Io&&(o=p(o)),l.min=Pe.min(l.min,o),l.max=Pe.max(l.max,o))},evalPointOptions:function(t,e,n){var i=n.series,o=n.seriesIx,r={defaults:i._defaults,excluded:["data","tooltip","tempate","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[o];return yn(s)||(this._evalSeries[o]=s=R(t,{},r,!0)),s&&(t=Fe({},t),R(t,{value:e,series:i,dataItem:n.dataItem},r)),t},pointType:function(){return Tt},pointOptions:function(t,e){var n,i=this.seriesOptions[e];return i||(n=this.pointType().fn.defaults,this.seriesOptions[e]=i=Fe({},n,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},createPoint:function(t,e){var n,i=this,o=e.series,r=this.pointOptions(o,e.seriesIx),s=e.color||o.color;return r=i.evalPointOptions(r,t,e),Ie.isFunction(o.color)&&(s=r.color),n=new Tt(t,r),n.color=s,i.append(n),n},seriesAxes:function(t){var e=this.plotArea,n=t.xAxis,i=n?e.namedXAxes[n]:e.axisX,o=t.yAxis,r=o?e.namedYAxes[o]:e.axisY;if(!i)throw Error("Unable to locate X axis with name "+n);if(!r)throw Error("Unable to locate Y axis with name "+o);return{x:i,y:r}},reflow:function(t){var e,n,i=this,o=i.points,r=0,s=!i.options.clip;i.traverseDataPoints(function(t,a){e=o[r++],n=i.seriesAxes(a.series);var l,c=n.x.getSlot(t.x,t.x,s),h=n.y.getSlot(t.y,t.y,s);e&&(c&&h?(l=i.pointSlot(c,h),e.reflow(l)):e.visible=!1)}),i.box=t},pointSlot:function(t,e){return new We(t.x1,e.y1,t.x2,e.y2)},traverseDataPoints:function(t){var e,n,i,o,r,s,a,l=this,c=l.options,h=c.series,u=l.seriesPoints;for(n=0;h.length>n;n++)for(i=h[n],o=u[n],o||(u[n]=[]),e=0;i.data.length>e;e++)r=this._bindPoint(i,n,e),s=r.valueFields,a=r.fields,t(s,Fe({pointIx:e,series:i,seriesIx:n,dataItem:i.data[e],owner:l},a))},_bindPoint:mt.fn._bindPoint,formatPointValue:function(t,e){var n=t.value;return cn(e,n.x,n.y)},animationPoints:function(){var t,e=this.points,n=[];for(t=0;e.length>t;t++)n.push((e[t]||{}).marker);return n}}),Fe(Nt.fn,Mt),Ht=Nt.extend({render:function(){var t=this;Nt.fn.render.call(t),t.renderSegments()},createSegment:function(t,e,n){var i,o=e.style;return new(i=o===Mo?zt:Dt)(t,e,n)},animationPoints:function(){var t=Nt.fn.animationPoints.call(this);return t.concat(this._segments)},createMissingValue:function(t,e){if(e===sr){var n={x:t.x,y:t.y};return Q(n.x)||(n.x=0),Q(n.y)||(n.y=0),n}}}),Fe(Ht.fn,Pt),Ut=Nt.extend({init:function(t,e){this._maxSize=qi,Nt.fn.init.call(this,t,e)},options:{tooltip:{format:"{3}"},labels:{format:"{3}"}},addValue:function(t,e){null!==t.size&&(t.size>0||0>t.size&&e.series.negativeValues.visible)?(this._maxSize=Pe.max(this._maxSize,Pe.abs(t.size)),Nt.fn.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},reflow:function(t){var e=this;e.updateBubblesSize(t),Nt.fn.reflow.call(e,t)},pointType:function(){return At},createPoint:function(t,e){var n,i,o=this,r=e.series,s=r.data.length,a=e.pointIx*(Mi/s),l={delay:a,duration:Mi-a,type:Un},c=e.color||r.color;return 0>t.size&&r.negativeValues.visible&&(c=Sn(r.negativeValues.color,c)),i=Fe({labels:{animation:{delay:a,duration:Mi-a}}},this.pointOptions(r,e.seriesIx),{markers:{type:Yn,border:r.border,opacity:r.opacity,animation:l}}),i=o.evalPointOptions(i,t,e),Ie.isFunction(r.color)&&(c=i.color),i.markers.background=c,n=new At(t,i),n.color=c,o.append(n),n},updateBubblesSize:function(t){var e,n,i,o,r,s,a,l,c,h,u,d,f,p,g,m,v,y=this,_=y.options,w=_.series,x=Pe.min(t.width(),t.height());for(e=0;w.length>e;e++)for(i=w[e],o=y.seriesPoints[e],r=i.minSize||Pe.max(.02*x,10),s=i.maxSize||.2*x,a=r/2,l=s/2,c=Pe.PI*a*a,h=Pe.PI*l*l,u=h-c,d=u/y._maxSize,n=0;o.length>n;n++)f=o[n],f&&(p=Pe.abs(f.value.size)*d,g=Pe.sqrt((c+p)/Pe.PI),m=Sn(f.options.zIndex,0),v=m+(1-g/l),Fe(f.options,{zIndex:v,markers:{size:2*g,zIndex:v},labels:{zIndex:v+1}}))},formatPointValue:function(t,e){var n=t.value;return cn(e,n.x,n.y,n.size,t.category)},createAnimation:Me,createVisual:Me}),jt=$e.extend({init:function(t,e){$e.fn.init.call(this,e),this.value=t},options:{border:{_brightness:.8},line:{width:2},overlay:{gradient:Ti},tooltip:{format:"<table style='text-align: left;'><th colspan='2'>{4:d}</th><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}},reflow:function(t){var e,n,i,o=this,r=o.options,s=o.owner,a=o.value,l=s.seriesValueAxis(r),c=[];n=l.getSlot(a.open,a.close),i=l.getSlot(a.low,a.high),n.x1=i.x1=t.x1,n.x2=i.x2=t.x2,o.realBody=n,e=i.center().x,c.push([[e,i.y1],[e,n.y1]]),c.push([[e,n.y2],[e,i.y2]]),o.lines=c,o.box=i.clone().wrap(n),o._rendered||(o._rendered=!0,o.createNote()),o.reflowNote()},reflowNote:function(){var t=this;t.note&&t.note.reflow(t.box)},createVisual:function(){$e.fn.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},mainVisual:function(t){var e=new An.Group;return this.createBody(e,t),this.createLines(e,t),e},createBody:function(t,e){var n=An.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&n.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Sn(e.border.opacity,e.opacity)}),ln(n),t.append(n),q(e)&&t.append(this.createGradientOverlay(n,{baseColor:this.color},Fe({},e.overlay)))},createLines:function(t,e){this.drawLines(t,e,this.lines,e.line)},drawLines:function(t,e,n,i){var o,r,s;if(n)for(o={stroke:{color:i.color||this.color,opacity:Sn(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},r=0;n.length>r;r++)s=An.Path.fromPoints(n[r],o),ln(s),t.append(s)},getBorderColor:function(){var t=this,e=t.options,n=e.border,i=n.color;return yn(i)||(i=new Ye(t.color).brightness(n._brightness).toHex()),i},createOverlay:function(){var t=An.Path.fromRect(this.box.toRect(),{fill:{color:nr,opacity:0},stroke:null});this.visual.append(t)},createHighlight:function(){var t,e=this.options.highlight,n=this.color;return this.color=e.color||this.color,t=this.mainVisual(Fe({},this.options,{line:{color:this.getBorderColor()}},e)),this.color=n,t},highlightVisual:function(){return this._mainVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},tooltipAnchor:function(){var t=this,e=t.box,n=t.owner.pane.clipBox()||e;return new tn(e.x2+qo,Pe.max(e.y1,n.y1)+qo)},formatValue:function(t){var e=this;return e.owner.formatPointValue(e,t)},overlapsBox:function(t){return this.box.overlaps(t)}}),Fe(jt.fn,ht),Fe(jt.fn,ut),Gt=mt.extend({options:{},reflowCategories:function(t){var e,n=this,i=n.children,o=i.length;for(e=0;o>e;e++)i[e].reflow(t[e])},addValue:function(t,e){var n,i,o=this,r=e.categoryIx,s=e.category,a=e.series,l=e.seriesIx,c=o.options,h=t.valueFields,u=o.children,d=o.splitValue(h),f=z(d),p=o.categoryPoints[r],g=a.data[r];p||(o.categoryPoints[r]=p=[]),f&&(n=o.createPoint(t,e)),i=u[r],i||(i=new lt({vertical:c.invertAxes,gap:c.gap,spacing:c.spacing}),o.append(i)),n&&(o.updateRange(h,e),i.append(n),n.categoryIx=r,n.category=s,n.series=a,n.seriesIx=l,n.owner=o,n.dataItem=g,n.noteText=t.fields.noteText),o.points.push(n),p.push(n)},pointType:function(){return jt},createPoint:function(t,e){var n,i=this,o=e.categoryIx,r=e.category,s=e.series,a=e.seriesIx,l=t.valueFields,c=Fe({},s),h=i.pointType(),u=t.fields.color||s.color;return c=i.evalPointOptions(c,l,r,o,s,a),s.type==Gn&&l.open>l.close&&(u=t.fields.downColor||s.downColor||s.color),Ie.isFunction(s.color)&&(u=c.color),n=new h(l,c),n.color=u,n},splitValue:function(t){return[t.low,t.open,t.close,t.high]},updateRange:function(t,e){var n=this,i=e.series.axis,o=n.valueAxisRanges[i],r=n.splitValue(t);o=n.valueAxisRanges[i]=o||{min:Gi,max:qi},o=n.valueAxisRanges[i]={min:Pe.min.apply(Pe,r.concat([o.min])),max:Pe.max.apply(Pe,r.concat([o.max]))}},formatPointValue:function(t,e){var n=t.value;return cn(e,n.open,n.high,n.low,n.close,t.category)},animationPoints:function(){return this.points}}),Fe(Gt.fn,Mt),Wt=jt.extend({reflow:function(t){var e,n,i,o,r=this,s=r.options,a=r.owner,l=r.value,c=a.seriesValueAxis(s),h=[],u=[],d=[];o=c.getSlot(l.low,l.high),n=c.getSlot(l.open,l.open),i=c.getSlot(l.close,l.close),n.x1=i.x1=o.x1=t.x1,n.x2=i.x2=o.x2=t.x2,e=o.center().x,h.push([n.x1,n.y1]),h.push([e,n.y1]),u.push([e,i.y1]),u.push([i.x2,i.y1]),d.push([e,o.y1]),d.push([e,o.y2]),r.lines=[h,u,d],r.box=o.clone().wrap(n.clone().wrap(i)),r.reflowNote()},createBody:t.noop}),qt=Gt.extend({pointType:function(){return Wt}}),$t=Gt.extend({addValue:function(t,e){var n,i,o=this,r=e.categoryIx,s=e.category,a=e.series,l=e.seriesIx,c=o.options,h=o.children,u=t.valueFields,d=o.splitValue(u),f=z(d),p=o.categoryPoints[r],g=a.data[r];p||(o.categoryPoints[r]=p=[]),f&&(n=o.createPoint(t,e)),i=h[r],i||(i=new lt({vertical:c.invertAxes,gap:c.gap,spacing:c.spacing}),o.append(i)),n&&(o.updateRange(u,e),i.append(n),n.categoryIx=r,n.category=s,n.series=a,n.seriesIx=l,n.owner=o,n.dataItem=g),o.points.push(n),p.push(n)},pointType:function(){return Yt},splitValue:function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},updateRange:function(t,e){var n=this,i=e.series.axis,o=n.valueAxisRanges[i],r=n.splitValue(t).concat(n.filterOutliers(t.outliers));yn(t.mean)&&(r=r.concat(t.mean)),o=n.valueAxisRanges[i]=o||{min:Gi,max:qi},o=n.valueAxisRanges[i]={min:Pe.min.apply(Pe,r.concat([o.min])),max:Pe.max.apply(Pe,r.concat([o.max]))}},formatPointValue:function(t,e){var n=t.value;return cn(e,n.lower,n.q1,n.median,n.q3,n.upper,n.mean,t.category)},filterOutliers:function(t){var e,n,i=(t||[]).length,o=[];for(e=0;i>e;e++)n=t[e],yn(n)&&M(o,n);return o}}),Yt=jt.extend({init:function(t,e){var n=this;$e.fn.init.call(n,e),n.value=t,n.createNote()},options:{border:{_brightness:.8},line:{width:2},mean:{width:2,dashType:"dash"},overlay:{gradient:Ti},tooltip:{format:"<table style='text-align: left;'><th colspan='2'>{6:d}</th><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:Vi,type:ti,background:nr,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:Vi,type:Yn,background:nr,border:{width:2,opacity:1},opacity:0}},reflow:function(t){var e,n,i,o,r,s=this,a=s.options,l=s.owner,c=s.value,h=l.seriesValueAxis(a);i=h.getSlot(c.q1,c.q3),s.boxSlot=i,n=h.getSlot(c.lower,c.upper),o=h.getSlot(c.median),i.x1=n.x1=t.x1,i.x2=n.x2=t.x2,s.realBody=i,c.mean&&(r=h.getSlot(c.mean),s.meanPoints=[[[t.x1,r.y1],[t.x2,r.y1]]]),e=n.center().x,s.whiskerPoints=[[[e-5,n.y1],[e+5,n.y1],[e,n.y1],[e,i.y1]],[[e-5,n.y2],[e+5,n.y2],[e,n.y2],[e,i.y2]]],s.medianPoints=[[[t.x1,o.y1],[t.x2,o.y1]]],s.box=n.clone().wrap(i),s.reflowNote()},renderOutliers:function(t){var e,n,i,o,r=this,s=t.markers||{},a=r.value,l=a.outliers||[],c=3*Pe.abs(a.q3-a.q1),h=[];for(o=0;l.length>o;o++)i=l[o],s=a.q3+c>i&&i>a.q1-c?t.outliers:t.extremes,e=Fe({},s.border),yn(e.color)||(e.color=yn(r.color)?r.color:new Ye(s.background).brightness(Rn).toHex()),n=new on({type:s.type,width:s.size,height:s.size,rotation:s.rotation,background:s.background,border:e,opacity:s.opacity}),n.value=i,h.push(n);return this.reflowOutliers(h),h},reflowOutliers:function(t){var e,n,i,o=this.owner.seriesValueAxis(this.options),r=this.box.center().x;for(e=0;t.length>e;e++)n=t[e].value,i=o.getSlot(n).move(r),this.box=this.box.wrap(i),t[e].reflow(i)},mainVisual:function(t){var e,n,i=jt.fn.mainVisual.call(this,t),o=this.renderOutliers(t);for(e=0;o.length>e;e++)n=o[e].getElement(),n&&i.append(n);return i},createLines:function(t,e){this.drawLines(t,e,this.whiskerPoints,e.line),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},getBorderColor:function(){return this.color?this.color:jt.getBorderColor.call(this)}}),Fe(Yt.fn,ht),Xt=$e.extend({init:function(t,e,n){var i=this;i.value=t,i.sector=e,$e.fn.init.call(i,n)},options:{color:nr,overlay:{gradient:yo},border:{width:.5},labels:{visible:!1,distance:35,font:si,margin:un(.5),align:Yn,zIndex:1,position:lo},animation:{type:co},highlight:{visible:!0,border:{width:1}},visible:!0},render:function(){var t,e=this,n=e.options,i=n.labels,o=e.value;e._rendered||e.visible===!1||(e._rendered=!0,i.template?(t=He(i.template),o=t({dataItem:e.dataItem,category:e.category,value:e.value,series:e.series,percentage:e.percentage})):i.format&&(o=cn(i.format,o)),i.visible&&o&&(e.label=new sn(o,Fe({},i,{align:qn,vAlign:"",animation:{type:bi,delay:e.animationDelay}})),e.append(e.label)))},reflow:function(t){var e=this;e.render(),e.box=t,e.reflowLabel()},reflowLabel:function(){var t,e,n,i,o=this,r=o.sector.clone(),s=o.options,a=o.label,l=s.labels,c=l.distance,h=r.middle();a&&(i=a.box.height(),n=a.box.width(),l.position==qn?(r.r=Pe.abs((r.r-i)/2)+i,t=r.point(h),a.reflow(We(t.x,t.y-i/2,t.x,t.y))):l.position==Bi?(r.r=r.r-i/2,t=r.point(h),a.reflow(We(t.x,t.y-i/2,t.x,t.y))):(t=r.clone().expand(c).point(h),t.x>=r.c.x?(e=t.x+n,a.orientation=vo):(e=t.x-n,a.orientation=Li),a.reflow(We(e,t.y-i,t.x,t.y))))},createVisual:function(){var t,e,n=this,i=n.sector,o=n.options;$e.fn.createVisual.call(this),n.value&&(o.visual?(t=(i.startAngle+180)%360,e=o.visual({category:n.category,dataItem:n.dataItem,value:n.value,series:n.series,percentage:n.percentage,center:new Tn.Point(i.c.x,i.c.y),radius:i.r,innerRadius:i.ir,startAngle:t,endAngle:t+i.angle,options:o,createVisual:function(){var t=new An.Group;return n.createSegmentVisual(t),t}}),e&&n.visual.append(e)):n.createSegmentVisual(n.visual))},createSegmentVisual:function(t){var e,n=this,i=n.sector,o=n.options,r=o.border||{},s=r.width>0?{stroke:{color:r.color,width:r.width,opacity:r.opacity,dashType:r.dashType}}:{},a=o.color,l={color:a,opacity:o.opacity};e=n.createSegment(i,Fe({fill:l,stroke:{opacity:o.opacity},zIndex:o.zIndex},s)),t.append(e),q(o)&&t.append(this.createGradientOverlay(e,{baseColor:a,fallbackFill:l},Fe({center:[i.c.x,i.c.y],innerRadius:i.ir,radius:i.r,userSpace:!0},o.overlay)))},createSegment:function(t,e){return e.singleSegment?new An.Circle(new Tn.Circle(new Tn.Point(t.c.x,t.c.y),t.r),e):rn.current.createRing(t,e)},createAnimation:function(){var t=this.options,e=this.sector.c;Fe(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),$e.fn.createAnimation.call(this)},createHighlight:function(t){var e=this,n=e.options.highlight||{},i=n.border||{};return e.createSegment(e.sector,Fe({},t,{fill:{color:n.color,opacity:n.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},highlightVisual:function(){return this.visual.children[0]},highlightVisualArgs:function(){var t=this.sector;return{options:this.options,radius:t.r,innerRadius:t.ir,center:new Tn.Point(t.c.x,t.c.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},tooltipAnchor:function(t,e){var n=this,i=n.sector.adjacentBox(qo,t,e);return new tn(i.x1,i.y1)},formatValue:function(t){var e=this;return e.owner.formatPointValue(e,t)}}),Fe(Xt.fn,ht),Qt={createLegendItem:function(t,e,n){var i,o,r,s,a,l=this,c=l.options.legend||{},h=c.labels||{},u=c.inactiveItems||{},d=u.labels||{};n&&n.visibleInLegend!==!1&&(a=n.visible!==!1,i=n.category||"",o=a?h.template:d.template||h.template,o&&(i=He(o)({text:i,series:n.series,dataItem:n.dataItem,percentage:n.percentage,value:t})),a?(s={},r=e.color):(s={color:d.color,font:d.font},r=(u.markers||{}).color),i&&l.legendItems.push({pointIndex:n.index,text:i,series:n.series,markerColor:r,labels:s}))}},Kt=$e.extend({init:function(t,e){var n=this;$e.fn.init.call(n,e),n.plotArea=t,n.points=[],n.legendItems=[],n.render()},options:{startAngle:90,connectors:{width:1,color:"#939393",padding:4},inactiveItems:{markers:{},labels:{}}},render:function(){var t=this;t.traverseDataPoints(Be(t.addValue,t))},traverseDataPoints:function(t){var e,n,i,o,r,s,a,l,c,h,u,d,f,p=this,g=p.options,m=p.plotArea.options.seriesColors||[],v=m.length,y=g.series,_=y.length,w=0;for(o=0;_>o;o++){for(e=y[o],s=e.data,u=W(e),a=360/u,d=yn(e.startAngle)?e.startAngle:g.startAngle,o!=_-1&&e.labels.position==lo&&(e.labels.position=qn),f=0;s.length>f;f++)n=tt.current.bindPoint(e,f),l=n.valueFields.value,c=Pe.abs(l),i=n.fields,r=c*a,h=1!=s.length&&!!i.explode,Ne(e.color)||(e.color=i.color||m[f%v]),t(l,new nn(null,0,0,d,r),{owner:p,category:i.category||"",index:w,series:e,seriesIx:o,dataItem:s[f],percentage:0!==u?c/u:0,explode:h,visibleInLegend:i.visibleInLegend,visible:i.visible,zIndex:_-o,animationDelay:p.animationDelay(f,o,_)}),n.fields.visible!==!1&&(d+=r),w++;w=0}},evalSegmentOptions:function(t,e,n){var i=n.series;R(t,{value:e,series:i,dataItem:n.dataItem,category:n.category,percentage:n.percentage},{defaults:i._defaults,excluded:["data","template","visual","toggle"]})},addValue:function(t,e,n){var i,o=this,r=Fe({},n.series,{index:n.index});o.evalSegmentOptions(r,t,n),o.createLegendItem(t,r,n),n.visible!==!1&&(i=new Xt(t,e,r),Ee(i,n),o.append(i),o.points.push(i))},reflow:function(t){var e,n,i,o,r,s,a,l,c=this,h=c.options,u=t.clone(),d=5,f=Pe.min(u.width(),u.height()),p=f/2,g=f-.85*f,m=Sn(h.padding,g),v=We(u.x1,u.y1,u.x1+f,u.y1+f),y=v.center(),_=c.seriesConfigs||[],w=u.center(),x=c.points,b=x.length,k=h.series.length,C=[],S=[];for(m=m>p-d?p-d:m,v.translate(w.x-y.x,w.y-y.y),s=p-m,l=tn(s+v.x1+m,s+v.y1+m),a=0;b>a;a++)o=x[a],r=o.sector,r.r=s,r.c=l,n=o.seriesIx,_.length&&(e=_[n],r.ir=e.ir,r.r=e.r),n==k-1&&o.explode&&(r.c=r.clone().radius(.15*r.r).point(r.middle())),o.reflow(v),i=o.label,i&&i.options.position===lo&&n==k-1&&(i.orientation===vo?S.push(i):C.push(i));C.length>0&&(C.sort(c.labelComparator(!0)),c.leftLabelsReflow(C)),S.length>0&&(S.sort(c.labelComparator(!1)),c.rightLabelsReflow(S)),c.box=v},leftLabelsReflow:function(t){var e=this,n=e.distanceBetweenLabels(t);e.distributeLabels(n,t)},rightLabelsReflow:function(t){var e=this,n=e.distanceBetweenLabels(t);e.distributeLabels(n,t)},distanceBetweenLabels:function(t){var e,n,i,o=this,r=o.points,s=r[r.length-1],a=s.sector,l=t[0].box,c=t.length-1,h=a.r+s.options.labels.distance,u=[];for(n=gn(l.y1-(a.c.y-h-l.height()-l.height()/2)),u.push(n),i=0;c>i;i++)l=t[i].box,e=t[i+1].box,n=gn(e.y1-l.y2),u.push(n);return n=gn(a.c.y+h-t[c].box.y2-t[c].box.height()/2),u.push(n),u},distributeLabels:function(t,e){var n,i,o,r,s=this,a=t.length;for(r=0;a>r;r++)for(i=o=r,n=-t[r];n>0&&(i>=0||a>o);)n=s._takeDistance(t,r,--i,n),n=s._takeDistance(t,r,++o,n);s.reflowLabels(t,e)},_takeDistance:function(t,e,n,i){if(t[n]>0){var o=Pe.min(t[n],i);i-=o,t[n]-=o,t[e]+=o}return i},reflowLabels:function(t,e){var n,i,o,r,s=this,a=s.points,l=a[a.length-1],c=l.sector,h=e.length,u=l.options.labels,d=u.distance,f=c.c.y-(c.r+d)-e[0].box.height();for(t[0]+=2,r=0;h>r;r++)n=e[r],f+=t[r],o=n.box,i=s.hAlignLabel(o.x2,c.clone().expand(d),f,f+o.height(),n.orientation==vo),n.orientation==vo?(u.align!==Yn&&(i=c.r+c.c.x+d),n.reflow(We(i+o.width(),f,i,f))):(u.align!==Yn&&(i=c.c.x-c.r-d),n.reflow(We(i-o.width(),f,i,f))),f+=o.height()},createVisual:function(){var t,e,n,i,r,s,a,l,c,h,u,d,f,p,g=this,m=g.options,v=m.connectors,y=g.points,_=y.length,w=4;for($e.fn.createVisual.call(this),this._connectorLines=[],a=0;_>a;a++)i=y[a],e=i.sector,n=e.middle(),s=i.label,r={seriesId:i.seriesIx},s&&(t=new An.Path({stroke:{color:v.color,width:v.width},animation:{type:bi,delay:i.animationDelay}}),s.options.position===lo&&0!==i.value&&(l=s.box,c=e.c,h=e.point(n),u=tn(l.x1,l.center().y),h=e.clone().expand(v.padding).point(n),t.moveTo(h.x,h.y),s.orientation==vo?(f=tn(l.x1-v.padding,l.center().y),p=o(c,h,u,f),u=tn(f.x-w,f.y),p=p||u,p.x=Pe.min(p.x,u.x),g.pointInCircle(p,e.c,e.r+w)||e.c.x>p.x?(d=e.c.x+e.r+w,i.options.labels.align!==Zn?u.x>d?t.lineTo(d,h.y):t.lineTo(h.x+2*w,h.y):t.lineTo(d,h.y),t.lineTo(u.x,f.y)):(p.y=f.y,t.lineTo(p.x,p.y))):(f=tn(l.x2+v.padding,l.center().y),p=o(c,h,u,f),u=tn(f.x+w,f.y),p=p||u,p.x=Pe.max(p.x,u.x),g.pointInCircle(p,e.c,e.r+w)||p.x>e.c.x?(d=e.c.x-e.r-w,i.options.labels.align!==Zn?d>u.x?t.lineTo(d,h.y):t.lineTo(h.x-2*w,h.y):t.lineTo(d,h.y),t.lineTo(u.x,f.y)):(p.y=f.y,t.lineTo(p.x,p.y))),t.lineTo(f.x,f.y),this._connectorLines.push(t),this.visual.append(t)))},labelComparator:function(t){return t=t?-1:1,function(e,n){return e=(e.parent.sector.middle()+270)%360,n=(n.parent.sector.middle()+270)%360,(e-n)*t}},hAlignLabel:function(t,e,n,i,o){var r=e.c.x,s=e.c.y,a=e.r,l=Pe.min(Pe.abs(s-n),Pe.abs(s-i));return l>a?t:r+Pe.sqrt(a*a-l*l)*(o?1:-1)},pointInCircle:function(t,e,n){return u(e.x-t.x)+u(e.y-t.y)<u(n)},formatPointValue:function(t,e){return cn(e,t.value)},animationDelay:function(t){return t*ho}}),Fe(Kt.fn,Qt),Zt=Xt.extend({options:{overlay:{gradient:_o},labels:{position:qn},animation:{type:co}},reflowLabel:function(){var t,e,n=this,i=n.sector.clone(),o=n.options,r=n.label,s=o.labels,a=i.middle();r&&(e=r.box.height(),s.position==qn?(i.r-=(i.r-i.ir)/2,t=i.point(a),r.reflow(new We(t.x,t.y-e/2,t.x,t.y))):Xt.fn.reflowLabel.call(n))},createSegment:function(t,e){return rn.current.createRing(t,e)}}),Fe(Zt.fn,ht),Jt=Kt.extend({options:{startAngle:90,connectors:{width:1,color:"#939393",padding:4}},addValue:function(t,e,n){var i,o=this,r=Fe({},n.series,{index:n.index});o.evalSegmentOptions(r,t,n),o.createLegendItem(t,r,n),t&&n.visible!==!1&&(i=new Zt(t,e,r),Ee(i,n),o.append(i),o.points.push(i))},reflow:function(t){var e,n,i,o,r,s,a=this,l=a.options,c=t.clone(),h=5,u=Pe.min(c.width(),c.height()),d=u/2,f=u-.85*u,p=Sn(l.padding,f),g=l.series,m=g.length,v=0,y=0,_=0,w=0;for(a.seriesConfigs=[],p=p>d-h?d-h:p,i=d-p,r=0;m>r;r++)e=g[r],0===r&&yn(e.holeSize)&&(n=e.holeSize,i-=e.holeSize),yn(e.size)?i-=e.size:v++,yn(e.margin)&&r!=m-1&&(i-=e.margin);for(yn(n)||(w=(d-p)/(m+.75),n=.75*w,i-=n),_=n,r=0;m>r;r++)e=g[r],o=Sn(e.size,i/v),_+=y,s=_+o,a.seriesConfigs.push({ir:_,r:s}),y=e.margin||0,_=s;Kt.fn.reflow.call(a,t)},animationDelay:function(t,e,n){return t*di+Mi*(e+1)/(n+1)}}),te=vt.extend({render:function(){vt.fn.render.call(this),this.createSegments()},traverseDataPoints:function(t){var e,n,i,o,r,s,a,l,c,u,d=this.options.series,f=this.categoryAxis.options.categories||[],p=h(d),g=!this.options.invertAxes;for(e=0;d.length>e;e++)for(n=d[e],i=0,o=0,r=0;p>r;r++)s=tt.current.bindPoint(n,r),a=s.valueFields.value,l=s.fields.summary,c=i,l?"total"===l.toLowerCase()?(s.valueFields.value=i,c=0,u=i):(s.valueFields.value=o,u=c-o,o=0):B(a)&&(o+=a,i+=a,u=i),t(s,{category:f[r],categoryIx:r,series:n,seriesIx:e,total:i,runningTotal:o,from:c,to:u,isVertical:g})},updateRange:function(t,e){vt.fn.updateRange.call(this,{value:e.to},e)},aboveAxis:function(t){return t.value>=0},plotRange:function(t){return[t.from,t.to]},createSegments:function(){var t,e,n,i,o,r,s,a=this.options.series,l=this.seriesPoints,c=this.segments=[];for(t=0;a.length>t;t++)if(e=a[t],n=l[t])for(o=0;n.length>o;o++)r=n[o],r&&i&&(s=new ee(i,r,e),c.push(s),this.append(s)),i=r}}),ee=$e.extend({init:function(t,e,n){var i=this;$e.fn.init.call(i),i.from=t,i.to=e,i.series=n},options:{animation:{type:bi,delay:Mi}},linePoints:function(){var t,e,n=[],i=this.from,o=i.box,r=this.to.box;return i.isVertical?(t=i.aboveAxis?o.y1:o.y2,n.push([o.x1,t],[r.x2,t])):(e=i.aboveAxis?o.x2:o.x1,n.push([e,o.y1],[e,r.y2])),n},createVisual:function(){var t,e;$e.fn.createVisual.call(this),t=this.series.line||{},e=An.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}}),ln(e),this.visual.append(e)}}),ne=qe.extend({init:function(t){var e=this;qe.fn.init.call(e,t),t=e.options,e.id=Ie.guid(),e.createTitle(),e.content=new $e,e.chartContainer=new ie({},e),e.append(e.content),e.axes=[],e.charts=[]},options:{zIndex:-1,shrinkToFit:!0,title:{align:Li},visible:!0},createTitle:function(){var t=this,e=t.options.title;typeof e===so&&(e=Fe({},e,{align:e.position,position:Go})),t.title=an.buildTitle(e,t,ne.fn.options.title)},appendAxis:function(t){var e=this;e.content.append(t),e.axes.push(t),t.pane=e},appendChart:function(t){var e=this;e.chartContainer.parent!==e.content&&e.content.append(e.chartContainer),e.charts.push(t),e.chartContainer.append(t),t.pane=e},empty:function(){var t,e=this,n=e.parent;if(n){for(t=0;e.axes.length>t;t++)n.removeAxis(e.axes[t]);for(t=0;e.charts.length>t;t++)n.removeChart(e.charts[t])}e.axes=[],e.charts=[],e.content.destroy(),e.content.children=[],e.chartContainer.children=[]},reflow:function(t){var e,n=this;_n(n.children)===n.content&&(e=n.children.pop()),qe.fn.reflow.call(n,t),e&&n.children.push(e),n.title&&(n.contentBox.y1+=n.title.box.height())},visualStyle:function(){var t=qe.fn.visualStyle.call(this);return t.zIndex=-10,t},renderComplete:function(){this.options.visible&&this.createGridLines()},stackRoot:n,clipRoot:n,createGridLines:function(){var t,e,n,i,o,r,s=this,a=s.axes,l=a.concat(s.parent.axes),c=[],h=[];for(e=0;a.length>e;e++)for(i=a[e],o=i.options.vertical,t=o?c:h,n=0;l.length>n;n++)0===t.length&&(r=l[n],o!==r.options.vertical&&vn(t,i.createGridLines(r)))},refresh:function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=t.proxy(this.createGradient,this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete()},clipBox:function(){return this.chartContainer.clipBox}}),ie=$e.extend({init:function(t,e){var n=this;$e.fn.init.call(n,t),n.pane=e},shouldClip:function(){var t,e=this,n=e.children,i=n.length;for(t=0;i>t;t++)if(n[t].options.clip===!0)return!0;return!1},_clipBox:function(){var t,e,n,i,o=this,r=o.pane,s=r.axes,a=s.length,l=r.box.clone();
for(e=0;a>e;e++)i=s[e],t=i.options.vertical?or:ir,n=i.lineBox(),l[t+1]=n[t+1],l[t+2]=n[t+2];return l},createVisual:function(){var t,e,n;this.visual=new An.Group({zIndex:0}),this.shouldClip()&&(t=this.clipBox=this._clipBox(),e=t.toRect(),n=An.Path.fromRect(e),this.visual.clip(n),this.unclipLabels())},stackRoot:n,unclipLabels:function(){var t,e,n,i,o,r=this,s=r.children,a=r.clipBox;for(n=0;s.length>n;n++)for(t=s[n].points||{},o=t.length,i=0;o>i;i++)e=t[i],e&&e.label&&e.label.options.visible&&e.overlapsBox(a)&&(e.label.alignToClipBox&&e.label.alignToClipBox(a),e.label.options.noclip=!0)},destroy:function(){$e.fn.destroy.call(this),delete this.parent}}),oe=$e.extend({init:function(t,e){var n=this;$e.fn.init.call(n,e),n.series=t,n.initSeries(),n.charts=[],n.options.legend.items=[],n.axes=[],n.crosshairs=[],n.createPanes(),n.render(),n.createCrosshairs()},options:{series:[],plotArea:{margin:{}},background:"",border:{color:Fn,width:0},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}},initSeries:function(){var t,e,n=this.series;for(t=0;n.length>t;t++)e=n[t],e.index=t},createPanes:function(){var t,e,n=this,i=[],o=n.options.panes||[],r=Pe.max(o.length,1);for(t=0;r>t;t++)e=new ne(o[t]),e.paneIndex=t,i.push(e),n.append(e);n.panes=i},createCrosshairs:function(t){var e,n,i,o,r,s=this;for(t=t||s.panes,e=0;t.length>e;e++)for(i=t[e],n=0;i.axes.length>n;n++)o=i.axes[n],o.options.crosshair&&o.options.crosshair.visible&&(r=new me(o,o.options.crosshair),s.crosshairs.push(r),i.content.append(r))},removeCrosshairs:function(t){var e,n,i=this,o=i.crosshairs,r=t.axes;for(e=o.length-1;e>=0;e--)for(n=0;r.length>n;n++)if(o[e].axis===r[n]){o.splice(e,1);break}},hideCrosshairs:function(){var t,e=this.crosshairs;for(t=0;e.length>t;t++)e[t].hide()},findPane:function(t){var e,n,i=this,o=i.panes;for(e=0;o.length>e;e++)if(o[e].options.name===t){n=o[e];break}return n||o[0]},findPointPane:function(t){var e,n,i=this,o=i.panes;for(e=0;o.length>e;e++)if(o[e].box.containsPoint(t)){n=o[e];break}return n},appendAxis:function(t){var e=this,n=e.findPane(t.options.pane);n.appendAxis(t),e.axes.push(t),t.plotArea=e},removeAxis:function(t){var e,n,i=this,o=[];for(e=0;i.axes.length>e;e++)n=i.axes[e],t!==n?o.push(n):n.destroy();i.axes=o},appendChart:function(t,e){var n=this;n.charts.push(t),e?e.appendChart(t):n.append(t)},removeChart:function(t){var e,n,i=this,o=[];for(e=0;i.charts.length>e;e++)n=i.charts[e],n!==t?o.push(n):n.destroy();i.charts=o},addToLegend:function(t){var e,n,i,o,r,s,a,l,c,h=t.length,u=[],d=this.options.legend,f=d.labels||{},p=d.inactiveItems||{},g=p.labels||{};for(e=0;h>e;e++)n=t[e],l=n.visible!==!1,n.visibleInLegend!==!1&&(i=n.name||"",c=l?f.template:g.template||f.template,c&&(i=He(c)({text:i,series:n})),o=n.color,a=n._defaults,Ne(o)&&a&&(o=a.color),l?(r={},s=o):(r={color:g.color,font:g.font},s=p.markers.color),i&&u.push({text:i,labels:r,markerColor:s,series:n,active:l}));vn(d.items,u)},groupAxes:function(t){var e,n,i,o,r=[],s=[];for(i=0;t.length>i;i++)for(e=t[i].axes,o=0;e.length>o;o++)n=e[o],n.options.vertical?s.push(n):r.push(n);return{x:r,y:s,any:r.concat(s)}},groupSeriesByPane:function(){var t,e,n,i=this,o=i.series,r={};for(t=0;o.length>t;t++)n=o[t],e=i.seriesPaneName(n),r[e]?r[e].push(n):r[e]=[n];return r},filterVisibleSeries:function(t){var e,n,i=[];for(e=0;t.length>e;e++)n=t[e],n.visible!==!1&&i.push(n);return i},reflow:function(t){var e=this,n=e.options.plotArea,i=e.panes,o=un(n.margin);e.box=t.clone().unpad(o),e.reflowPanes(),e.reflowAxes(i),e.reflowCharts(i)},redraw:function(t){var e,n=this;for(t=[].concat(t),this.initSeries(),e=0;t.length>e;e++)n.removeCrosshairs(t[e]),t[e].empty();for(n.render(t),n.reflowAxes(n.panes),n.reflowCharts(t),n.createCrosshairs(t),e=0;t.length>e;e++)t[e].refresh()},axisCrossingValues:function(t,e){var n,i=t.options,o=[].concat(i.axisCrossingValues||i.axisCrossingValue),r=e.length-o.length,s=o[0]||0;for(n=0;r>n;n++)o.push(s);return o},alignAxisTo:function(t,e,n,i){var o=t.getSlot(n,n,!0),r=t.options.reverse?2:1,s=e.getSlot(i,i,!0),a=e.options.reverse?2:1,l=t.box.translate(s[ir+a]-o[ir+r],s[or+a]-o[or+r]);t.pane!==e.pane&&l.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(l)},alignAxes:function(t,e){var n,i,o,r,s=this,a=t[0],l=e[0],c=s.axisCrossingValues(a,e),h=s.axisCrossingValues(l,t),u={},d={},f={},p={};for(r=0;e.length>r;r++)o=e[r],n=o.pane,i=n.id,s.alignAxisTo(o,a,h[r],c[r]),o.options._overlap||(gn(o.lineBox().x1)===gn(a.lineBox().x1)&&(u[i]&&o.reflow(o.box.alignTo(u[i].box,Li).translate(-o.options.margin,0)),u[i]=o),gn(o.lineBox().x2)===gn(a.lineBox().x2)&&(o._mirrored||(o.options.labels.mirror=!o.options.labels.mirror,o._mirrored=!0),s.alignAxisTo(o,a,h[r],c[r]),d[i]&&o.reflow(o.box.alignTo(d[i].box,vo).translate(o.options.margin,0)),d[i]=o),0!==r&&l.pane===o.pane&&(o.alignTo(l),o.reflow(o.box)));for(r=0;t.length>r;r++)o=t[r],n=o.pane,i=n.id,s.alignAxisTo(o,l,c[r],h[r]),o.options._overlap||(gn(o.lineBox().y1)===gn(l.lineBox().y1)&&(o._mirrored||(o.options.labels.mirror=!o.options.labels.mirror,o._mirrored=!0),s.alignAxisTo(o,l,c[r],h[r]),f[i]&&o.reflow(o.box.alignTo(f[i].box,Go).translate(0,-o.options.margin)),f[i]=o),gn(o.lineBox().y2,Jn)===gn(l.lineBox().y2,Jn)&&(p[i]&&o.reflow(o.box.alignTo(p[i].box,Nn).translate(0,o.options.margin)),p[i]=o),0!==r&&(o.alignTo(a),o.reflow(o.box)))},shrinkAxisWidth:function(t){var e,n,i,o=this,r=o.groupAxes(t).any,s=A(r),a=0;for(e=0;t.length>e;e++)n=t[e],n.axes.length>0&&(a=Pe.max(a,s.width()-n.contentBox.width()));if(0!==a)for(e=0;r.length>e;e++)i=r[e],i.options.vertical||i.reflow(i.box.shrink(a,0))},shrinkAxisHeight:function(t){var e,n,i,o,r,s,a;for(e=0;t.length>e;e++)if(n=t[e],i=n.axes,o=Pe.max(0,A(i).height()-n.contentBox.height()),0!==o){for(r=0;i.length>r;r++)s=i[r],s.options.vertical&&s.reflow(s.box.shrink(0,o));a=!0}return a},fitAxes:function(t){var e,n,i,o,r,s,a,l,c=this,h=c.groupAxes(t).any,u=0;for(a=0;t.length>a;a++)if(r=t[a],e=r.axes,n=r.contentBox,e.length>0)for(i=A(e),u=Pe.max(u,n.x1-i.x1),o=Pe.max(n.y1-i.y1,n.y2-i.y2),l=0;e.length>l;l++)s=e[l],s.reflow(s.box.translate(0,o));for(a=0;h.length>a;a++)s=h[a],s.reflow(s.box.translate(u,0))},reflowAxes:function(t){var e,n=this,i=n.groupAxes(t);for(e=0;t.length>e;e++)n.reflowPaneAxes(t[e]);i.x.length>0&&i.y.length>0&&(n.alignAxes(i.x,i.y),n.shrinkAxisWidth(t),n.autoRotateAxisLabels(i),n.alignAxes(i.x,i.y),n.shrinkAxisWidth(t)&&n.alignAxes(i.x,i.y),n.shrinkAxisHeight(t),n.alignAxes(i.x,i.y),n.shrinkAxisHeight(t)&&n.alignAxes(i.x,i.y),n.fitAxes(t))},autoRotateAxisLabels:function(t){var e,n,i,o=this.axes,r=this.panes;for(n=0;o.length>n;n++)e=o[n],e.autoRotateLabels()&&(i=!0);if(i){for(n=0;r.length>n;n++)this.reflowPaneAxes(r[n]);t.x.length>0&&t.y.length>0&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(r))}},reflowPaneAxes:function(t){var e,n=t.axes,i=n.length;if(i>0)for(e=0;i>e;e++)n[e].reflow(t.contentBox)},reflowCharts:function(t){var e,n,i=this,o=i.charts,r=o.length,s=i.box;for(n=0;r>n;n++)e=o[n].pane,(!e||dn(e,t))&&o[n].reflow(s)},reflowPanes:function(){var t,e,n,i,o,r=this,s=r.box,a=r.panes,l=a.length,c=s.height(),h=l,u=0,d=s.y1;for(t=0;l>t;t++)e=a[t],i=e.options.height,e.options.width=s.width(),e.options.height?(i.indexOf&&i.indexOf("%")&&(o=parseInt(i,10)/100,e.options.height=o*s.height()),e.reflow(s.clone()),c-=e.options.height):u++;for(t=0;l>t;t++)e=a[t],e.options.height||(e.options.height=c/u);for(t=0;l>t;t++)e=a[t],n=s.clone().move(s.x1,d),e.reflow(n),h--,d+=e.options.height},backgroundBox:function(){var t,e,n,i,o,r,s=this,a=s.axes,l=a.length;for(n=0;l>n;n++)for(o=a[n],i=0;l>i;i++)r=a[i],o.options.vertical!==r.options.vertical&&(t=o.lineBox().clone().wrap(r.lineBox()),e=e?e.wrap(t):t);return e||s.box},createVisual:function(){var t,e,n,i,o,r;$e.fn.createVisual.call(this),t=this.backgroundBox(),e=this.options.plotArea,n=e.border||{},i=e.background,o=e.opacity,mn.isTransparent(i)&&(i=nr,o=0),r=this._bgVisual=An.Path.fromRect(t.toRect(),{fill:{color:i,opacity:o},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType},zIndex:-1}),this.appendVisual(r)},pointsByCategoryIndex:function(t){var e,n,i,o,r,s=this.charts,a=[];if(null!==t)for(e=0;s.length>e;e++)if(r=s[e],"_navigator"!==r.pane.options.name&&(i=s[e].categoryPoints[t],i&&i.length))for(n=0;i.length>n;n++)o=i[n],o&&yn(o.value)&&null!==o.value&&a.push(o);return a},pointsBySeriesIndex:function(t){var e,n,i,o,r,s=this.charts,a=[];for(i=0;s.length>i;i++)for(r=s[i],e=r.points,o=0;e.length>o;o++)n=e[o],n&&n.options.index===t&&a.push(n);return a},pointsBySeriesName:function(t){var e,n,i,o,r,s=this.charts,a=[];for(i=0;s.length>i;i++)for(r=s[i],e=r.points,o=0;e.length>o;o++)n=e[o],n&&n.series.name===t&&a.push(n);return a},paneByPoint:function(t){var e,n,i=this,o=i.panes;for(n=0;o.length>n;n++)if(e=o[n],e.box.containsPoint(t))return e}}),re=oe.extend({init:function(t,e){var n,i,o=this;if(o.namedCategoryAxes={},o.namedValueAxes={},o.valueAxisRangeTracker=new se,t.length>0)for(o.invertAxes=dn(t[0].type,[zn,jn,Jo,Ko,po,Di]),n=0;t.length>n;n++)if(i=t[n].stack,i&&"100%"===i.type){o.stack100=!0;break}oe.fn.init.call(o,t,e)},options:{categoryAxis:{categories:[]},valueAxis:{}},render:function(t){var e=this;t=t||e.panes,e.createCategoryAxes(t),e.aggregateCategories(t),e.createCategoryAxesLabels(t),e.createCharts(t),e.createValueAxes(t)},removeAxis:function(t){var e=this,n=t.options.name;oe.fn.removeAxis.call(e,t),t instanceof rt?delete e.namedCategoryAxes[n]:(e.valueAxisRangeTracker.reset(n),delete e.namedValueAxes[n]),t===e.categoryAxis&&delete e.categoryAxis,t===e.valueAxis&&delete e.valueAxis},createCharts:function(t){var e,n,i,o,r,s,a=this.groupSeriesByPane();for(e=0;t.length>e;e++)if(n=t[e],i=a[n.options.name||"default"]||[],this.addToLegend(i),o=this.filterVisibleSeries(i))for(r=this.groupSeriesByCategoryAxis(o),s=0;r.length>s;s++)this.createChartGroup(r[s],n)},createChartGroup:function(t,e){this.createAreaChart(F(t,[Mn,Ko]),e),this.createBarChart(F(t,[Zn,zn]),e),this.createRangeBarChart(F(t,[go,po]),e),this.createBulletChart(F(t,[jn,Zo]),e),this.createCandlestickChart(F(t,Gn),e),this.createBoxPlotChart(F(t,Hn),e),this.createOHLCChart(F(t,ao),e),this.createWaterfallChart(F(t,[tr,Di]),e),this.createLineChart(F(t,[Fi,Jo]),e)},aggregateCategories:function(t){var e,n,i,o,r,s=this,a=s.srcSeries||s.series,l=[];for(e=0;a.length>e;e++)n=a[e],i=s.seriesCategoryAxis(n),o=s.findPane(i.options.pane),r=D(i.options.type,oi),(r||n.categoryField)&&dn(o,t)?n=s.aggregateSeries(n,i):(B(i.options.min)||B(i.options.max))&&(n=s.filterSeries(n,i)),l.push(n);s.srcSeries=a,s.series=l},filterSeries:function(t,e){var n,i=e.totalRangeIndices(),o=e.options.justified,r=dn(t.type,[Fi,Jo,Mn,Ko]);return i.min=B(e.options.min)?Pe.floor(i.min):0,i.max=B(e.options.max)?o?Pe.floor(i.max)+1:Pe.ceil(i.max):t.data.length,t=Fe({},t),r&&(i.min-1>=0&&(n=i.min-1,t._outOfRangeMinPoint={item:t.data[n],category:e.options.srcCategories[n],categoryIx:-1}),t.data.length>i.max&&(n=i.max,t._outOfRangeMaxPoint={item:t.data[n],category:e.options.srcCategories[n],categoryIx:i.max-i.min})),e._seriesMax=Pe.max(e._seriesMax||0,t.data.length),t.data=(t.data||[]).slice(i.min,i.max),t},aggregateSeries:function(t,e){var n,o,r,s,a,l,c,h=e.options,u=D(e.options.type,oi),p=h.categories,g=h.srcCategories||p,m=t.data,v=[],y=Fe({},t),_=Fe({},t),w=h.dataItems||[],x=d,b=mn.MIN_NUM,k=mn.MAX_NUM,C=dn(t.type,[Fi,Jo,Mn,Ko]);for(y.data=s=[],u&&(x=f),n=0;m.length>n;n++)o=t.categoryField?x(t.categoryField,m[n]):g[n],yn(o)&&(r=e.categoryIndex(o),r>=0&&p.length>r?(v[r]=v[r]||[],v[r].push(n)):C&&(0>r?r==b?l.points.push(n):r>b&&(b=r,l={category:o,points:[n]}):r>=p.length&&(r==k?c.points.push(n):k>r&&(k=r,c={category:o,points:[n]}))));for(a=new ke(_,tt.current,i.current),n=0;p.length>n;n++)s[n]=a.aggregatePoints(v[n],p[n]),v[n]&&(w[n]=s[n]);return l&&s.length&&(y._outOfRangeMinPoint={item:a.aggregatePoints(l.points,l.category),categoryIx:b,category:l.category}),c&&s.length&&(y._outOfRangeMaxPoint={item:a.aggregatePoints(c.points,c.category),categoryIx:k,category:c.category}),e.options.dataItems=w,y},appendChart:function(t,e){for(var n=this,i=t.options.series,o=n.seriesCategoryAxis(i[0]),r=o.options.categories,s=Pe.max(0,h(i)-r.length);s--;)r.push("");n.valueAxisRangeTracker.update(t.valueAxisRanges),oe.fn.appendChart.call(n,t,e)},seriesPaneName:function(e){var n=this,i=n.options,o=e.axis,r=[].concat(i.valueAxis),s=t.grep(r,function(t){return t.name===o})[0],a=i.panes||[{}],l=(a[0]||{}).name||"default",c=(s||{}).pane||l;return c},seriesCategoryAxis:function(t){var e=this,n=t.categoryAxis,i=n?e.namedCategoryAxes[n]:e.categoryAxis;if(!i)throw Error("Unable to locate category axis with name "+n);return i},stackableChartOptions:function(t,e){var n,i=t.stack,o=i&&"100%"===i.type;return yn(e.options.clip)?n=e.options.clip:o&&(n=!1),{isStacked:i,isStacked100:o,clip:n}},groupSeriesByCategoryAxis:function(n){function i(e,i){return t.grep(n,function(t){return 0===i&&!t.categoryAxis||t.categoryAxis==e})}var o,r,s,a={},l=t.map(n,function(t){var n=t.categoryAxis||"$$default$$";return a.hasOwnProperty(n)?e:(a[n]=!0,n)}),c=[];for(o=0;l.length>o;o++)r=l[o],s=i(r,o),0!==s.length&&c.push(s);return c},createBarChart:function(t,e){if(0!==t.length){var n=this,i=t[0],o=new vt(n,Ee({series:t,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing},n.stackableChartOptions(i,e)));n.appendChart(o,e)}},createRangeBarChart:function(t,e){if(0!==t.length){var n=this,i=t[0],o=new _t(n,{series:t,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing});n.appendChart(o,e)}},createBulletChart:function(t,e){if(0!==t.length){var n=this,i=t[0],o=new wt(n,{series:t,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip});n.appendChart(o,e)}},createLineChart:function(t,e){if(0!==t.length){var n=this,i=t[0],o=new Et(n,Ee({invertAxes:n.invertAxes,series:t},n.stackableChartOptions(i,e)));n.appendChart(o,e)}},createAreaChart:function(t,e){if(0!==t.length){var n=this,i=t[0],o=new Ot(n,Ee({invertAxes:n.invertAxes,series:t},n.stackableChartOptions(i,e)));n.appendChart(o,e)}},createOHLCChart:function(t,e){if(0!==t.length){var n=this,i=t[0],o=new qt(n,{invertAxes:n.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});n.appendChart(o,e)}},createCandlestickChart:function(t,e){if(0!==t.length){var n=this,i=t[0],o=new Gt(n,{invertAxes:n.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});n.appendChart(o,e)}},createBoxPlotChart:function(t,e){if(0!==t.length){var n=this,i=t[0],o=new $t(n,{invertAxes:n.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});n.appendChart(o,e)}},createWaterfallChart:function(t,e){if(0!==t.length){var n=this,i=t[0],o=new te(n,{series:t,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing});n.appendChart(o,e)}},axisRequiresRounding:function(t,e){var n,i,o,r,s=this,a=F(s.series,dr);for(n=0;s.series.length>n;n++)o=s.series[n],(o.type===Fi||o.type===Mn)&&(r=o.line,r&&r.style===Po&&a.push(o));for(n=0;a.length>n;n++)if(i=a[n].categoryAxis||"",i===t||!i&&0===e)return!0},aggregatedAxis:function(t,e){var n,i,o=this,r=o.series;for(n=0;r.length>n;n++)if(i=r[n].categoryAxis||"",(i===t||!i&&0===e)&&r[n].categoryField)return!0},createCategoryAxesLabels:function(){var t,e=this.axes;for(t=0;e.length>t;t++)e[t]instanceof rt&&e[t].createLabels()},createCategoryAxes:function(t){var e,n,i,o,r,s,a,l,c=this,h=c.invertAxes,u=[].concat(c.options.categoryAxis),d=[];for(e=0;u.length>e;e++)if(n=u[e],i=c.findPane(n.pane),dn(i,t)){if(s=n.name,o=n.categories||[],r=n.type||"",n=Fe({vertical:h,axisCrossingValue:h?Gi:0,_deferLabels:!0},n),yn(n.justified)||(n.justified=c.isJustified()),c.axisRequiresRounding(s,e)&&(n.justified=!1),a=U(n,o[0])?new st(n):new rt(n),s){if(c.namedCategoryAxes[s])throw Error("Category axis with name "+s+" is already defined");c.namedCategoryAxes[s]=a}a.axisIndex=e,d.push(a),c.appendAxis(a)}l=c.categoryAxis||d[0],c.categoryAxis=l,h?c.axisY=l:c.axisX=l},isJustified:function(){var t,e,n=this,i=n.series;for(t=0;i.length>t;t++)if(e=i[t],!dn(e.type,[Mn,Ko]))return!1;return!0},createValueAxes:function(t){var e,n,i,o,r,s,a,l,c,h=this,u=h.valueAxisRangeTracker,d=u.query(),f=[].concat(h.options.valueAxis),p=h.invertAxes,g={vertical:!p},m=[];for(h.stack100&&(g.roundToMajorUnit=!1,g.labels={format:"P0"}),c=0;f.length>c;c++)if(e=f[c],n=h.findPane(e.pane),dn(n,t)){if(l=e.name,a=D(e.type,Hi)?{min:.1,max:1}:{min:0,max:1},r=u.query(l)||d||a,0===c&&r&&d&&(r.min=Pe.min(r.min,d.min),r.max=Pe.max(r.max,d.max)),s=D(e.type,Hi)?Ze:Je,i=new s(r.min,r.max,Fe({},g,e)),l){if(h.namedValueAxes[l])throw Error("Value axis with name "+l+" is already defined");h.namedValueAxes[l]=i}i.axisIndex=c,m.push(i),h.appendAxis(i)}o=h.valueAxis||m[0],h.valueAxis=o,p?h.axisX=o:h.axisY=o},click:function(e,n){var i,o,r,s=this,a=e._eventCoordinates(n),l=new tn(a.x,a.y),c=s.pointPane(l),h=[],u=[];if(c){for(i=c.axes,o=0;i.length>o;o++)r=i[o],r.getValue?M(u,r.getValue(l)):M(h,r.getCategory(l));0===h.length&&M(h,s.categoryAxis.getCategory(l)),h.length>0&&u.length>0&&e.trigger(uo,{element:t(n.target),originalEvent:n,category:T(h),value:T(u)})}},pointPane:function(t){var e,n,i=this,o=i.panes;for(n=0;o.length>n;n++)if(e=o[n],e.contentBox.containsPoint(t))return e},updateAxisOptions:function(t,e){var n=[].concat(t instanceof rt?this.options.categoryAxis:this.options.valueAxis);Fe(n[t.axisIndex],e)}}),se=ze.extend({init:function(){var t=this;t.axisRanges={}},update:function(t){var e,n,i,o=this,r=o.axisRanges;for(i in t)e=r[i],n=t[i],r[i]=e=e||{min:Gi,max:qi},e.min=Pe.min(e.min,n.min),e.max=Pe.max(e.max,n.max)},reset:function(t){this.axisRanges[t]=e},query:function(t){return this.axisRanges[t]}}),ae=oe.extend({init:function(t,e){var n=this;n.namedXAxes={},n.namedYAxes={},n.xAxisRangeTracker=new se,n.yAxisRangeTracker=new se,oe.fn.init.call(n,t,e)},options:{xAxis:{},yAxis:{}},render:function(t){var e,n,i,o,r=this,s=r.groupSeriesByPane();for(t=t||r.panes,e=0;t.length>e;e++)n=t[e],i=s[n.options.name||"default"]||[],r.addToLegend(i),o=r.filterVisibleSeries(i),o&&(r.createScatterChart(F(o,wo),n),r.createScatterLineChart(F(o,xo),n),r.createBubbleChart(F(o,Un),n));r.createAxes(t)},appendChart:function(t,e){var n=this;n.xAxisRangeTracker.update(t.xAxisRanges),n.yAxisRangeTracker.update(t.yAxisRanges),oe.fn.appendChart.call(n,t,e)},removeAxis:function(t){var e=this,n=t.options.name;oe.fn.removeAxis.call(e,t),t.options.vertical?(e.yAxisRangeTracker.reset(n),delete e.namedYAxes[n]):(e.xAxisRangeTracker.reset(n),delete e.namedXAxes[n]),t===e.axisX&&delete e.axisX,t===e.axisY&&delete e.axisY},seriesPaneName:function(e){var n=this,i=n.options,o=e.xAxis,r=[].concat(i.xAxis),s=t.grep(r,function(t){return t.name===o})[0],a=e.yAxis,l=[].concat(i.yAxis),c=t.grep(l,function(t){return t.name===a})[0],h=i.panes||[{}],u=h[0].name||"default",d=(s||{}).pane||(c||{}).pane||u;return d},createScatterChart:function(t,e){var n=this;t.length>0&&n.appendChart(new Nt(n,{series:t,clip:e.options.clip}),e)},createScatterLineChart:function(t,e){var n=this;t.length>0&&n.appendChart(new Ht(n,{series:t,clip:e.options.clip}),e)},createBubbleChart:function(t,e){var n=this;t.length>0&&n.appendChart(new Ut(n,{series:t,clip:e.options.clip}),e)},createXYAxis:function(t,e,n){var i,o,r,s,a,l,c,h,u=this,d=t.name,f=e?u.namedYAxes:u.namedXAxes,p=e?u.yAxisRangeTracker:u.xAxisRangeTracker,g=Fe({},t,{vertical:e}),m=D(g.type,Hi),v=p.query(),y=m?{min:.1,max:1}:{min:0,max:1},_=p.query(d)||v||y,w=u.series,x=[g.min,g.max];for(r=0;w.length>r;r++)if(s=w[r],a=s[e?"yAxis":"xAxis"],a==g.name||0===n&&!a){l=tt.current.bindPoint(s,0).valueFields,x.push(l[e?"y":"x"]);break}for(0===n&&v&&(_.min=Pe.min(_.min,v.min),_.max=Pe.max(_.max,v.max)),h=0;x.length>h;h++)if(x[h]instanceof Date){c=!0;break}if(o=D(g.type,oi)||!g.type&&c?at:m?Ze:Je,i=new o(_.min,_.max,g),d){if(f[d])throw Error((e?"Y":"X")+" axis with name "+d+" is already defined");f[d]=i}return u.appendAxis(i),i},createAxes:function(t){var e,n=this,i=n.options,o=[].concat(i.xAxis),r=[],s=[].concat(i.yAxis),a=[];Se(o,function(i){e=n.findPane(this.pane),dn(e,t)&&r.push(n.createXYAxis(this,!1,i))}),Se(s,function(i){e=n.findPane(this.pane),dn(e,t)&&a.push(n.createXYAxis(this,!0,i))}),n.axisX=n.axisX||r[0],n.axisY=n.axisY||a[0]},click:function(e,n){var i,o,r,s,a=this,l=e._eventCoordinates(n),c=new tn(l.x,l.y),h=a.axes,u=h.length,d=[],f=[];for(i=0;u>i;i++)o=h[i],s=o.options.vertical?f:d,r=o.getValue(c),null!==r&&s.push(r);d.length>0&&f.length>0&&e.trigger(uo,{element:t(n.target),originalEvent:n,x:T(d),y:T(f)})},updateAxisOptions:function(t,e){var n=t.options.vertical,i=V(t,[].concat(n?this.axisY:this.axisX)),o=[].concat(n?this.options.yAxis:this.options.xAxis)[i];Fe(o,e)}}),le=oe.extend({render:function(){var t=this,e=t.series;t.createPieChart(e)},createPieChart:function(t){var e=this,n=t[0],i=new Kt(e,{series:t,padding:n.padding,startAngle:n.startAngle,connectors:n.connectors,legend:e.options.legend});e.appendChart(i)},appendChart:function(t,e){oe.fn.appendChart.call(this,t,e),vn(this.options.legend.items,t.legendItems)}}),ce=le.extend({render:function(){var t=this,e=t.series;t.createDonutChart(e)},createDonutChart:function(t){var e=this,n=t[0],i=new Jt(e,{series:t,padding:n.padding,connectors:n.connectors,legend:e.options.legend});e.appendChart(i)}}),he=An.Animation.extend({options:{easing:"easeOutElastic",duration:Mi},setup:function(){this.element.transform(Tn.transform().scale(Do,Do,this.options.center))},step:function(t){this.element.transform(Tn.transform().scale(t,t,this.options.center))}}),An.AnimationFactory.current.register(co,he),ue=An.Animation.extend({options:{easing:"easeOutElastic"},setup:function(){var t=this.center=this.element.bbox().center();this.element.transform(Tn.transform().scale(Do,Do,t))},step:function(t){this.element.transform(Tn.transform().scale(t,t,this.center))}}),An.AnimationFactory.current.register(Un,ue),de=ze.extend({init:function(){this._points=[]},destroy:function(){this._points=[]},show:function(t){var e,n;for(t=[].concat(t),this.hide(),e=0;t.length>e;e++)n=t[e],n&&n.toggleHighlight&&n.hasHighlight()&&(this.togglePointHighlight(n,!0),this._points.push(n))},togglePointHighlight:function(t,e){var n,i=(t.options.highlight||{}).toggle;i?(n={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,preventDefault:Y,visual:t.highlightVisual(),show:e},i(n),n._defaultPrevented||t.toggleHighlight(e)):t.toggleHighlight(e)},hide:function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},isHighlighted:function(t){var e,n,i=this._points;for(e=0;i.length>e;e++)if(n=i[e],t==n)return!0;return!1}}),fe=Le.extend({init:function(e,n){var i,o,r=this;Le.fn.init.call(r),r.options=Fe({},r.options,n),r.chartElement=e,r.template=fe.template,r.template||(r.template=fe.template=Cn("<div class='"+ei+"tooltip "+ei+"chart-tooltip' style='display:none; position: absolute; font: #= d.font #;border: #= d.border.width #px solid;opacity: #= d.opacity #; filter: alpha(opacity=#= d.opacity * 100 #);'></div>")),i=un(r.options.padding||{},"auto"),r.element=t(r.template(r.options)).css({"padding-top":i.top,"padding-right":i.right,"padding-bottom":i.bottom,"padding-left":i.left}),r.move=Be(r.move,r),r._mouseleave=Be(r._mouseleave,r),o=Ie.format("[{0}='content'],[{0}='scroller']",Ie.attr("role")),r._mobileScroller=e.closest(o).data("kendoMobileScroller")},destroy:function(){this._clearShowTimeout(),this.element&&(this.element.off(Xi).remove(),this.element=null)},options:{border:{width:1},opacity:1,animation:{duration:Wo}},move:function(){var t,e=this,n=e.options,i=e.element;e.anchor&&e.element&&(t=e._offset(),e.visible||i.css({top:t.top,left:t.left}),e.visible=!0,e._ensureElement(document.body),i.stop(!0,!0).show().animate({left:t.left,top:t.top},n.animation.duration))},_clearShowTimeout:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)},_padding:function(){if(!this._chartPadding){var t=this.chartElement;this._chartPadding={top:parseInt(t.css("paddingTop"),10),left:parseInt(t.css("paddingLeft"),10)}}return this._chartPadding},_offset:function(){var e,n,i=this,o=i._measure(),r=i.anchor,s=i._padding(),a=i.chartElement.offset(),l=gn(r.y+s.top+a.top),c=gn(r.x+s.left+a.left),h=Ie.support.zoomLevel(),u=t(window),d=window.pageYOffset||document.documentElement.scrollTop||0,f=window.pageXOffset||document.documentElement.scrollLeft||0,p=(this._mobileScroller||{}).movable;return p&&1!==p.scale?(e=Tn.transform().scale(p.scale,p.scale,[p.x,p.y]),n=new Tn.Point(c,l).transform(e),c=n.x,l=n.y):(l+=i._fit(l-d,o.height,u.outerHeight()/h),c+=i._fit(c-f,o.width,u.outerWidth()/h)),{top:l,left:c}},setStyle:function(t,e){var n,i,o=t.background,r=t.border.color;e&&(n=e.color||e.options.color,o=Sn(o,n),r=Sn(r,n)),yn(t.color)||(i=new Ye(o).percBrightness(),this.element.toggleClass(ei+Xo,i>180)),this.element.css({backgroundColor:o,borderColor:r,font:t.font,color:t.color,opacity:t.opacity,borderWidth:t.border.width})},show:function(){this._clearShowTimeout(),this.showTimeout=setTimeout(this.move,$o)},hide:function(){var t=this;clearTimeout(t.showTimeout),t._hideElement(),t.visible&&(t.point=null,t.visible=!1,t.index=null)},_measure:function(){this._ensureElement();var t={width:this.element.outerWidth(),height:this.element.outerHeight()};return t},_ensureElement:function(){this.element&&this.element.appendTo(document.body).on(Xi,this._mouseleave)},_mouseleave:function(e){var n=e.relatedTarget,i=this.chartElement[0];n&&n!==i&&!t.contains(i,n)&&(this.trigger(zi),this.hide())},_hideElement:function(){var t=this,e=this.element;e&&e.fadeOut({always:function(){t.visible||e.off(Xi).remove()}})},_pointContent:function(t){var e,n,i=this,o=Fe({},i.options,t.options.tooltip);return yn(t.value)&&(e=""+t.value),o.template?(n=He(o.template),e=n({value:t.value,category:t.category,series:t.series,dataItem:t.dataItem,percentage:t.percentage,runningTotal:t.runningTotal,total:t.total,low:t.low,high:t.high,xLow:t.xLow,xHigh:t.xHigh,yLow:t.yLow,yHigh:t.yHigh})):o.format&&(e=t.formatValue(o.format)),e},_pointAnchor:function(t){var e=this._measure();return t.tooltipAnchor(e.width,e.height)},_fit:function(t,e,n){var i=0;return t+e>n&&(i=n-(t+e)),0>t&&(i=-t),i}}),pe=fe.extend({show:function(t){var e=this,n=Fe({},e.options,t.options.tooltip);t&&t.tooltipAnchor&&e.element&&(e.element.html(e._pointContent(t)),e.anchor=e._pointAnchor(t),e.anchor?(e.setStyle(n,t),fe.fn.show.call(e,t)):e.hide())}}),ge=fe.extend({init:function(t,e,n){var i=this;fe.fn.init.call(i,t,n),i.plotArea=e},options:{sharedTemplate:"<table><th colspan='2'>#= categoryText #</th># for(var i = 0; i < points.length; i++) { ## var point = points[i]; #<tr># if(point.series.name) { # <td> #= point.series.name #:</td># } #<td>#= content(point) #</td></tr># } #</table>",categoryFormat:"{0:d}"},showAt:function(e,n){var i,o=this,r=o.options,s=o.plotArea,a=s.categoryAxis,l=a.pointCategoryIndex(n),c=a.getCategory(n),h=a.getSlot(l);e=t.grep(e,function(t){var e=t.series.tooltip,n=e&&e.visible===!1;return!n}),e.length>0&&(i=o._content(e,c),o.element.html(i),o.anchor=o._slotAnchor(n,h),o.setStyle(r,e[0]),fe.fn.show.call(o))},_slotAnchor:function(t,e){var n,i=this,o=i.plotArea,r=o.categoryAxis,s=this._measure(),a=t.y-s.height/2;return n=r.options.vertical?tn(t.x,a):tn(e.center().x,a)},_content:function(t,e){var n,i,o=this;return n=Ie.template(o.options.sharedTemplate),i=n({points:t,category:e,categoryText:cn(o.options.categoryFormat,e),content:o._pointContent})}}),me=$e.extend({init:function(t,e){$e.fn.init.call(this,e),this.axis=t,this.stickyMode=t instanceof rt},options:{color:Fn,width:1,zIndex:-1,tooltip:{visible:!1}},showAt:function(t){this.point=t,this.moveLine(),this.line.visible(!0);var e=this.options.tooltip;e.visible&&(this.tooltip||(this.tooltip=new ve(this,Fe({},e,{stickyMode:this.stickyMode}))),this.tooltip.showAt(t))},hide:function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},moveLine:function(){var t,e,n,i=this,o=i.axis,r=o.options.vertical,s=i.getBox(),a=i.point,l=r?or:ir;e=new Tn.Point(s.x1,s.y1),n=r?new Tn.Point(s.x2,s.y1):new Tn.Point(s.x1,s.y2),a&&(i.stickyMode?(t=o.getSlot(o.pointCategoryIndex(a)),e[l]=n[l]=t.center()[l]):e[l]=n[l]=a[l]),i.box=s,this.line.moveTo(e).lineTo(n)},getBox:function(){var t,e,n,i=this,o=i.axis,r=o.pane.axes,s=r.length,a=o.options.vertical,l=o.lineBox().clone(),c=a?ir:or;for(n=0;s>n;n++)e=r[n],e.options.vertical!=a&&(t?t.wrap(e.lineBox()):t=e.lineBox().clone());return l[c+1]=t[c+1],l[c+2]=t[c+2],l},createVisual:function(){$e.fn.createVisual.call(this);var t=this.options;this.line=new An.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},destroy:function(){var t=this;t.tooltip&&t.tooltip.destroy(),$e.fn.destroy.call(t)}}),ve=fe.extend({init:function(t,e){var n=this,i=t.axis.getRoot().chart.element;n.crosshair=t,fe.fn.init.call(n,i,Fe({},n.options,{background:t.axis.plotArea.options.seriesColors[0]},e)),n.setStyle(n.options)},options:{padding:10},showAt:function(t){var e=this,n=e.element;n&&(e.point=t,e.element.html(e.content(t)),e.anchor=e.getAnchor(),e.move())},move:function(){var t=this,e=t.element,n=t._offset();t._ensureElement(),e.css({top:n.top,left:n.left}).show()},content:function(t){var e,n,i,o=this,r=o.options,s=o.crosshair.axis,a=s.options;return n=e=s[r.stickyMode?"getCategory":"getValue"](t),r.template?(i=He(r.template),e=i({value:n})):r.format?e=cn(r.format,n):a.type===oi&&(e=cn(a.labels.dateFormats[a.baseUnit],n)),e},getAnchor:function(){var t,e=this,n=e.options,i=n.position,o=this.crosshair,r=!o.axis.options.vertical,s=o.line.bbox(),a=this._measure(),l=a.width/2,c=a.height/2,h=n.padding;return t=r?i===Nn?s.bottomLeft().translate(-l,h):s.topLeft().translate(-l,-a.height-h):i===Li?s.topLeft().translate(-a.width-h,-c):s.topRight().translate(h,-c)},hide:function(){this.element.hide(),this.point=null},destroy:function(){fe.fn.destroy.call(this),this.point=null}}),ye={min:function(t){var e,n,i=Gi,o=t.length;for(e=0;o>e;e++)n=t[e],B(n)&&(i=Pe.min(i,n));return i===Gi?t[0]:i},max:function(t){var e,n,i=qi,o=t.length;for(e=0;o>e;e++)n=t[e],B(n)&&(i=Pe.max(i,n));return i===qi?t[0]:i},sum:function(t){var e,n,i=t.length,o=0;for(e=0;i>e;e++)n=t[e],B(n)&&(o+=n);return o},sumOrNull:function(t){var e=null;return I(t)&&(e=ye.sum(t)),e},count:function(t){var e,n,i=t.length,o=0;for(e=0;i>e;e++)n=t[e],null!==n&&yn(n)&&o++;return o},avg:function(t){var e=t[0],n=I(t);return n>0&&(e=ye.sum(t)/n),e},first:function(t){var e,n,i=t.length;for(e=0;i>e;e++)if(n=t[e],null!==n&&yn(n))return n;return t[0]}},i.prototype={register:function(t,e){for(var n=0;t.length>n;n++)this._defaults[t[n]]=e},query:function(t){return this._defaults[t]}},i.current=new i,_e=Le.extend({init:function(e,n,i){var o,r,s=this,a=e.element,l=n.lineBox(),c=s.getValueAxis(n),h=c.lineBox(),u="."+ei;Le.fn.init.call(s),s.options=Fe({},s.options,i),i=s.options,s.chart=e,s.chartElement=a,s.categoryAxis=n,s._dateAxis=s.categoryAxis instanceof st,s.valueAxis=c,s._dateAxis&&Fe(i,{min:p(i.min),max:p(i.max),from:p(i.from),to:p(i.to)}),s.template=_e.template,s.template||(s.template=_e.template=Cn("<div class='"+ei+"selector' style='width: #= d.width #px; height: #= d.height #px; top: #= d.offset.top #px; left: #= d.offset.left #px;'><div class='"+ei+"mask'></div><div class='"+ei+"mask'></div><div class='"+ei+"selection'><div class='"+ei+"selection-bg'></div><div class='"+ei+"handle "+ei+"leftHandle'><div></div></div><div class='"+ei+"handle "+ei+"rightHandle'><div></div></div></div></div>")),r={left:parseInt(a.css("paddingLeft"),10),right:parseInt(a.css("paddingTop"),10)},s.options=Fe({},{width:l.width(),height:h.height(),padding:r,offset:{left:h.x2+r.left,top:h.y1+r.right},from:i.min,to:i.max},i),s.options.visible&&(s.wrapper=o=t(s.template(s.options)).appendTo(a),s.selection=o.find(u+"selection"),s.leftMask=o.find(u+"mask").first(),s.rightMask=o.find(u+"mask").last(),s.leftHandle=o.find(u+"leftHandle"),s.rightHandle=o.find(u+"rightHandle"),s.options.selection={border:{left:parseFloat(s.selection.css("border-left-width"),10),
right:parseFloat(s.selection.css("border-right-width"),10)}},s.leftHandle.css("top",(s.selection.height()-s.leftHandle.height())/2),s.rightHandle.css("top",(s.selection.height()-s.rightHandle.height())/2),s.set(s._index(i.from),s._index(i.to)),s.bind(s.events,s.options),s.wrapper[0].style.cssText=s.wrapper[0].style.cssText,s.wrapper.on(no,Be(s._mousewheel,s)),Ie.UserEvents?s.userEvents=new Ie.UserEvents(s.wrapper,{global:!0,stopPropagation:!0,multiTouch:!0,fastTap:!0,start:Be(s._start,s),move:Be(s._move,s),end:Be(s._end,s),tap:Be(s._tap,s),gesturestart:Be(s._gesturechange,s),gesturechange:Be(s._gesturechange,s)}):s.leftHandle.add(s.rightHandle).removeClass(ei+"handle"))},events:[ko,Co,So],options:{visible:!0,mousewheel:{zoom:Vn},min:qi,max:Gi},destroy:function(){var t=this,e=t.userEvents;e&&e.destroy(),clearTimeout(t._mwTimeout),t._state=null,t.wrapper.remove()},_rangeEventArgs:function(t){var e=this;return{axis:e.categoryAxis.options,from:e._value(t.from),to:e._value(t.to)}},_start:function(e){var n,i=this,o=i.options,r=t(e.event.target);!i._state&&r&&(i.chart._unsetActivePoint(),i._state={moveTarget:r.parents(".k-handle").add(r).first(),startLocation:e.x?e.x.location:0,range:{from:i._index(o.from),to:i._index(o.to)}},n=i._rangeEventArgs({from:i._index(o.from),to:i._index(o.to)}),i.trigger(ko,n)&&(i.userEvents.cancel(),i._state=null))},_move:function(t){if(this._state){var e=this,n=e._state,i=e.options,o=e.categoryAxis.options.categories,r=e._index(i.from),s=e._index(i.to),a=e._index(i.min),l=e._index(i.max),c=n.startLocation-t.x.location,h=n.range,u={from:h.from,to:h.to},d=h.to-h.from,f=n.moveTarget,p=e.wrapper.width()/(o.length-1),g=Pe.round(c/p);f&&(t.preventDefault(),f.is(".k-selection, .k-selection-bg")?(h.from=Pe.min(Pe.max(a,r-g),l-d),h.to=Pe.min(h.from+d,l)):f.is(".k-leftHandle")?(h.from=Pe.min(Pe.max(a,r-g),l-1),h.to=Pe.max(h.from+1,h.to)):f.is(".k-rightHandle")&&(h.to=Pe.min(Pe.max(a+1,s-g),l),h.from=Pe.min(h.to-1,h.from)),(h.from!==u.from||h.to!==u.to)&&(e.move(h.from,h.to),e.trigger(Co,e._rangeEventArgs(h))))}},_end:function(){var t=this,e=t._state.range;delete t._state,t.set(e.from,e.to),t.trigger(So,t._rangeEventArgs(e))},_gesturechange:function(t){if(this._state){var e=this,n=e.chart,i=e._state,o=e.options,r=e.categoryAxis,s=i.range,a=n._toModelCoordinates(t.touches[0].x.location).x,l=n._toModelCoordinates(t.touches[1].x.location).x,c=Pe.min(a,l),h=Pe.max(a,l);t.preventDefault(),i.moveTarget=null,s.from=r.pointCategoryIndex(new Ue.Point2D(c))||o.min,s.to=r.pointCategoryIndex(new Ue.Point2D(h))||o.max,e.move(s.from,s.to)}},_tap:function(t){var e=this,n=e.options,i=e.chart._eventCoordinates(t),o=e.categoryAxis,r=o.pointCategoryIndex(new Ue.Point2D(i.x,o.box.y1)),s=e._index(n.from),a=e._index(n.to),l=e._index(n.min),c=e._index(n.max),h=a-s,u=s+h/2,d=Pe.round(u-r),f={},p=3===t.event.which;e._state||p||(t.preventDefault(),e.chart._unsetActivePoint(),o.options.justified||d--,f.from=Pe.min(Pe.max(l,s-d),c-h),f.to=Pe.min(f.from+h,c),e._start(t),e._state&&(e._state.range=f,e.trigger(Co,e._rangeEventArgs(f)),e._end()))},_mousewheel:function(t){var e,n=this,i=n.options,o=pn(t);n._start({event:{target:n.selection}}),n._state&&(e=n._state.range,t.preventDefault(),t.stopPropagation(),Pe.abs(o)>1&&(o*=ar),i.mousewheel.reverse&&(o*=-1),n.expand(o)&&n.trigger(Co,{axis:n.categoryAxis.options,delta:o,originalEvent:t,from:n._value(e.from),to:n._value(e.to)}),n._mwTimeout&&clearTimeout(n._mwTimeout),n._mwTimeout=setTimeout(function(){n._end()},eo))},_index:function(t){var e=this,n=e.categoryAxis,i=n.options.categories,o=t;return t instanceof Date&&(o=E(t,i),!n.options.justified&&t>_n(i)&&(o+=1)),o},_value:function(t){var e=this,n=this.categoryAxis,i=n.options.categories,o=t;return e._dateAxis&&(o=t>i.length-1?e.options.max:i[t]),o},_slot:function(t){var e=this,n=this.categoryAxis;return n.getSlot(e._index(t))},move:function(t,e){var n,i,o,r,s=this,a=s.options,l=a.offset,c=a.padding,h=a.selection.border;o=s._slot(t),n=gn(o.x1-l.left+c.left),s.leftMask.width(n),s.selection.css("left",n),o=s._slot(e),i=gn(a.width-(o.x1-l.left+c.left)),s.rightMask.width(i),r=a.width-i,r!=a.width&&(r+=h.right),s.rightMask.css("left",r),s.selection.width(Pe.max(a.width-(n+i)-h.right,0))},set:function(t,e){var n=this,i=n.options,o=n._index(i.min),r=n._index(i.max);t=wn(n._index(t),o,r),e=wn(n._index(e),t+1,r),i.visible&&n.move(t,e),i.from=n._value(t),i.to=n._value(e)},expand:function(t){var n=this,i=n.options,o=n._index(i.min),r=n._index(i.max),s=i.mousewheel.zoom,a=n._index(i.from),l=n._index(i.to),c={from:a,to:l},h=Fe({},c);return n._state&&(c=n._state.range),s!==vo&&(c.from=wn(wn(a-t,0,l-1),o,r)),s!==Li&&(c.to=wn(wn(l+t,c.from+1,r),o,r)),c.from!==h.from||c.to!==h.to?(n.set(c.from,c.to),!0):e},getValueAxis:function(t){var e,n,i=t.pane.axes,o=i.length;for(e=0;o>e;e++)if(n=i[e],n.options.vertical!==t.options.vertical)return n}}),we=ze.extend({init:function(t,e){this.plotArea=t,this.options=Fe({},this.options,e)},options:{key:"none",lock:"none"},start:function(t){this._active=Z(t.event,this.options.key)},move:function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,ir).concat(this._panAxes(t,or));if(e.length)return this.axisRanges=e,K(e)}},end:function(){this._active=!1},pan:function(){var t,e,n=this.plotArea,i=this.axisRanges;if(i.length){for(e=0;i.length>e;e++)t=i[e],n.updateAxisOptions(t.axis,t.range);n.redraw(n.panes)}},_panAxes:function(t,e){var n,i,o,r,s=this.plotArea,a=-t[e].delta,l=(this.options.lock||"").toLowerCase(),c=[];if(0!==a&&(l||"").toLowerCase()!=e)for(n=s.axes,r=0;n.length>r;r++)i=n[r],(e==ir&&!i.options.vertical||e==or&&i.options.vertical)&&(o=i.pan(a),o&&(o.limitRange=!0,c.push({axis:i,range:o})));return c}}),xe=ze.extend({init:function(e,n){this.chart=e,this.options=Fe({},this.options,n),this._marquee=t("<div class='k-marquee'><div class='k-marquee-color'></div></div>")},options:{key:"shift",lock:"none"},start:function(t){var e,n,i,o,r;Z(t.event,this.options.key)&&(e=this.chart,n=e._toModelCoordinates(t.x.client,t.y.client),i=this._zoomPane=e._plotArea.paneByPoint(n),i&&(o=i.clipBox().clone(),r=this._elementOffset(),o.translate(r.left,r.top),this._zoomPaneClipBox=o,this._marquee.appendTo(document.body).css({left:t.x.client+1,top:t.y.client+1,width:0,height:0})))},_elementOffset:function(){var t=this.chart.element,e=t.offset();return{left:parseInt(t.css("paddingTop"),10)+e.left,top:parseInt(t.css("paddingLeft"),10)+e.top}},move:function(t){var e,n=this._zoomPane;n&&(e=this._selectionPosition(t),this._marquee.css(e))},end:function(t){var n,i,o,r,s=this._zoomPane;return s?(n=this._elementOffset(),i=this._selectionPosition(t),i.left-=n.left,i.top-=n.top,o={x:i.left,y:i.top},r={x:i.left+i.width,y:i.top+i.height},this._updateAxisRanges(o,r),this._marquee.remove(),delete this._zoomPane,K(this.axisRanges)):e},zoom:function(){var t,e,n,i=this.axisRanges;if(i&&i.length){for(t=this.chart._plotArea,n=0;i.length>n;n++)e=i[n],t.updateAxisOptions(e.axis,e.range);t.redraw(t.panes)}},destroy:function(){this._marquee.remove(),delete this._marquee},_updateAxisRanges:function(t,e){var n,i,o,r,s=(this.options.lock||"").toLowerCase(),a=[],l=this._zoomPane.axes;for(o=0;l.length>o;o++)n=l[o],i=n.options.vertical,s==ir&&!i||s===or&&i||(r=n.pointsRange(t,e),a.push({axis:n,range:r}));this.axisRanges=a},_selectionPosition:function(t){var e=(this.options.lock||"").toLowerCase(),n=Pe.min(t.x.startLocation,t.x.location),i=Pe.min(t.y.startLocation,t.y.location),o=Pe.abs(t.x.initialDelta),r=Pe.abs(t.y.initialDelta),s=this._zoomPaneClipBox;return e==ir&&(n=s.x1,o=s.width()),e==or&&(i=s.y1,r=s.height()),t.x.location>s.x2&&(o=s.x2-t.x.startLocation),s.x1>t.x.location&&(o=t.x.startLocation-s.x1),t.y.location>s.y2&&(r=s.y2-t.y.startLocation),s.y1>t.y.location&&(r=t.y.startLocation-s.y1),{left:Pe.max(n,s.x1),top:Pe.max(i,s.y1),width:o,height:r}}}),be=ze.extend({init:function(t,e){this.chart=t,this.options=Fe({},this.options,e)},updateRanges:function(t){var e,n,i,o,r=(this.options.lock||"").toLowerCase(),s=[],a=this.chart._plotArea.axes;for(i=0;a.length>i;i++)e=a[i],n=e.options.vertical,r==ir&&!n||r===or&&n||(o=e.zoomRange(-t),o&&s.push({axis:e,range:o}));return this.axisRanges=s,K(s)},zoom:function(){var t,e,n,i=this.axisRanges;if(i&&i.length){for(t=this.chart._plotArea,n=0;i.length>n;n++)e=i[n],t.updateAxisOptions(e.axis,e.range);t.redraw(t.panes)}}}),ke=function(t,e,n){var i,o,r,s=this,a=e.canonicalFields(t),l=e.valueFields(t),c=e.sourceFields(t,a),h=s._seriesFields=[],u=n.query(t.type),d=t.aggregate||u;for(s._series=t,s._binder=e,i=0;a.length>i;i++){if(o=a[i],typeof d===so)r=d[o];else{if(0!==i&&!dn(o,l))break;r=d}r&&h.push({canonicalName:o,name:c[i],transform:Ne(r)?r:ye[r]})}},ke.prototype={aggregatePoints:function(t,e){var n,i,o,r,s,a=this,l=a._bindPoints(t||[]),c=a._series,h=a._seriesFields,u=l.dataItems[0],d={};for(!u||B(u)||Te(u)||(s=function(){},s.prototype=u,d=new s),n=0;h.length>n;n++){if(i=h[n],o=a._bindField(l.values,i.canonicalName),r=i.transform(o,c,l.dataItems,e),!(null===r||typeof r!==so||yn(r.length)||r instanceof Date)){d=r;break}yn(r)&&(G(i.name,d),Ie.setter(i.name)(d,r))}return d},_bindPoints:function(t){var e,n,i=this,o=i._binder,r=i._series,s=[],a=[];for(e=0;t.length>e;e++)n=t[e],s.push(o.bindPoint(r,n)),a.push(r.data[n]);return{values:s,dataItems:a}},_bindField:function(t,e){var n,i,o,r,s=[],a=t.length;for(n=0;a>n;n++)i=t[n],r=i.valueFields,o=yn(r[e])?r[e]:i.fields[e],s.push(o);return s}},Ce=ze.extend({init:function(t){this._axis=t},slot:function(t,e){return this._axis.slot(t,e)},range:function(){return this._axis.range()}}),Ee(t.easing,{easeOutElastic:function(t,e,n,i){var o=1.70158,r=0,s=i;return 0===t?n:1===t?n+i:(r||(r=.5),s<Pe.abs(i)?(s=i,o=r/4):o=r/(2*Pe.PI)*Pe.asin(i/s),s*Pe.pow(2,-10*t)*Pe.sin((1*t-o)*(1.1*Pe.PI)/r)+i+n)}}),Ue.ui.plugin(pr),J.current.register(re,[zn,Zn,Fi,Jo,Mn,Ko,Gn,ao,jn,Zo,Hn,go,po,tr,Di]),J.current.register(ae,[wo,xo,Un]),J.current.register(le,[co]),J.current.register(ce,[ui]),tt.current.register([zn,Zn,Fi,Jo,Mn,Ko],[Qo],[Wn,Kn,ro,mi,vi]),tt.current.register([go,po],[Ci,jo],[Wn,Kn,ro]),tt.current.register([tr,Di],[Qo],[Wn,Kn,ro,zo]),i.current.register([zn,Zn,Fi,Jo,Mn,Ko,tr,Di],{value:Ui,color:ki,noteText:ki,errorLow:Wi,errorHigh:Ui}),i.current.register([go,po],{from:Wi,to:Ui,color:ki,noteText:ki}),tt.current.register([wo,xo,Un],[ir,or],[Kn,ro,yi,_i,wi,xi]),tt.current.register([Un],[ir,or,"size"],[Kn,Wn,ro]),tt.current.register([Gn,ao],["open","high","low","close"],[Wn,Kn,"downColor",ro]),i.current.register([Gn,ao],{open:Ui,high:Ui,low:Wi,close:Ui,color:ki,downColor:ki,noteText:ki}),tt.current.register([Hn],["lower","q1","median","q3","upper","mean","outliers"],[Wn,Kn,ro]),i.current.register([Hn],{lower:Ui,q1:Ui,median:Ui,q3:Ui,upper:Ui,mean:Ui,outliers:ki,color:ki,noteText:ki}),tt.current.register([jn,Zo],["current","target"],[Wn,Kn,"visibleInLegend",ro]),i.current.register([jn,Zo],{current:Ui,target:Ui,color:ki,noteText:ki}),tt.current.register([co,ui],[Qo],[Wn,Kn,"explode","visibleInLegend","visible"]),Fe(Ue,{EQUALLY_SPACED_SERIES:dr,Aggregates:ye,AreaChart:Ot,AreaSegment:Rt,AxisGroupRangeTracker:se,Bar:dt,BarChart:vt,BarLabel:et,BubbleChart:Ut,Bullet:xt,BulletChart:wt,CandlestickChart:Gt,Candlestick:jt,CategoricalChart:mt,CategoricalErrorBar:Ct,CategoricalPlotArea:re,CategoryAxis:rt,ChartAxis:Ce,ChartContainer:ie,ClipAnimation:Bt,ClusterLayout:lt,Crosshair:me,CrosshairTooltip:ve,DateCategoryAxis:st,DateValueAxis:at,DefaultAggregates:i,DonutChart:Jt,DonutPlotArea:ce,DonutSegment:Zt,ErrorBarBase:kt,ErrorRangeCalculator:gt,Highlight:de,SharedTooltip:ge,Legend:ot,LegendItem:nt,LegendLayout:it,LineChart:Et,LinePoint:Tt,LineSegment:Dt,Pane:ne,PieAnimation:he,PieChart:Kt,PieChartMixin:Qt,PiePlotArea:le,PieSegment:Xt,PlotAreaBase:oe,PlotAreaFactory:J,PointEventsMixin:ht,RangeBar:yt,RangeBarChart:_t,ScatterChart:Nt,ScatterErrorBar:St,ScatterLineChart:Ht,Selection:_e,SeriesAggregator:ke,SeriesBinder:tt,ShapeElement:on,SplineSegment:zt,SplineAreaSegment:Ft,StackWrap:ct,Tooltip:pe,OHLCChart:qt,OHLCPoint:Wt,WaterfallChart:te,WaterfallSegment:ee,XYPlotArea:ae,addDuration:m,areNumbers:z,axisGroupBox:A,categoriesCount:h,ceilDate:_,countNumbers:I,duration:k,ensureTree:G,indexOf:V,isNumber:B,floorDate:y,filterSeriesByType:F,hasValue:Q,lteDateIndex:E,evalOptions:R,seriesTotal:W,singleItemOrArray:T,sortDates:N,startOfWeek:v,transpose:j,toDate:p,toTime:g,uniqueDates:H})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.chart.polar.min",["kendo.dataviz.chart.min","kendo.drawing.min"],t)}(function(){return function(t,e){function n(t,e){return t.value.x-e.value.x}function i(t,e){return 180-C.abs(C.abs(t-e)-180)}var o,r,s,a,l,c,h,u,d,f,p,g,m,v,y,_,w,x,b,k,C=Math,S=window.kendo,T=S.deepExtend,A=S.util,D=A.append,P=S.drawing,M=S.geometry,E=S.dataviz,B=E.AreaSegment,I=E.Axis,z=E.AxisGroupRangeTracker,L=E.BarChart,R=E.Box2D,O=E.CategoryAxis,F=E.CategoricalChart,V=E.CategoricalPlotArea,N=E.ChartElement,H=E.CurveProcessor,U=E.DonutSegment,j=E.LineChart,G=E.LineSegment,W=E.LogarithmicAxis,q=E.NumericAxis,$=E.PlotAreaBase,Y=E.PlotAreaFactory,X=E.Point2D,Q=E.Ring,K=E.ScatterChart,Z=E.ScatterLineChart,J=E.SeriesBinder,tt=E.ShapeBuilder,et=E.SplineSegment,nt=E.SplineAreaSegment,it=E.getSpacing,ot=E.filterSeriesByType,rt=A.limitValue,st=E.round,at="arc",lt="#000",ct=E.COORD_PRECISION,ht=.15,ut=C.PI/180,dt="gap",ft="interpolate",pt="log",gt="plotAreaClick",mt="polarArea",vt="polarLine",yt="polarScatter",_t="radarArea",wt="radarColumn",xt="radarLine",bt="smooth",kt="x",Ct="y",St="zero",Tt=[mt,vt,yt],At=[_t,wt,xt],Dt={createGridLines:function(t){var e,n,i=this,o=i.options,r=C.abs(i.box.center().y-t.lineBox().y1),s=!1,a=[];return o.majorGridLines.visible&&(e=i.majorGridLineAngles(t),s=!0,a=i.renderMajorGridLines(e,r,o.majorGridLines)),o.minorGridLines.visible&&(n=i.minorGridLineAngles(t,s),D(a,i.renderMinorGridLines(n,r,o.minorGridLines,t,s))),a},renderMajorGridLines:function(t,e,n){return this.renderGridLines(t,e,n)},renderMinorGridLines:function(t,e,n,i,o){var r=this.radiusCallback&&this.radiusCallback(e,i,o);return this.renderGridLines(t,e,n,r)},renderGridLines:function(t,e,n,i){var o,r,s={stroke:{width:n.width,color:n.color,dashType:n.dashType}},a=this.box.center(),l=new M.Circle([a.x,a.y],e),c=this.gridLinesVisual();for(o=0;t.length>o;o++)r=new P.Path(s),i&&(l.radius=i(t[o])),r.moveTo(l.center).lineTo(l.pointAt(t[o])),c.append(r);return c.children},gridLineAngles:function(n,i,o,r,s){var a=this,l=a.intervals(i,o,r,s),c=n.options,h=c.visible&&(c.line||{}).visible!==!1;return t.map(l,function(t){var n=a.intervalAngle(t);return h&&90===n?e:n})}},Pt=O.extend({options:{startAngle:90,labels:{margin:it(10)},majorGridLines:{visible:!0},justified:!0},range:function(){return{min:0,max:this.options.categories.length}},reflow:function(t){this.box=t,this.reflowLabels()},lineBox:function(){return this.box},reflowLabels:function(){var t,e,n=this,i=n.options.labels,o=i.skip||0,r=i.step||1,s=new R,a=n.labels;for(e=0;a.length>e;e++)a[e].reflow(s),t=a[e].box,a[e].reflow(n.getSlot(o+e*r).adjacentBox(0,t.width(),t.height()))},intervals:function(t,e,n,i){var o,r=this,s=r.options,a=s.categories.length,l=0,c=a/t||1,h=360/c,u=[];for(e=e||0,n=n||1,o=e;c>o;o+=n)l=s.reverse?360-o*h:o*h,l=st(l,ct)%360,i&&E.inArray(l,i)||u.push(l);return u},majorIntervals:function(){return this.intervals(1)},minorIntervals:function(){return this.intervals(.5)},intervalAngle:function(t){return(360+t+this.options.startAngle)%360},majorAngles:function(){return t.map(this.majorIntervals(),t.proxy(this.intervalAngle,this))},createLine:function(){return[]},majorGridLineAngles:function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},minorGridLineAngles:function(t,e){var n=this.options,i=n.minorGridLines,o=n.majorGridLines,r=e?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,r)},radiusCallback:function(t,n,i){var o,r,s,a;return n.options.type!==at?(o=360/(2*this.options.categories.length),r=C.cos(o*ut)*t,s=this.majorAngles(),a=function(e){return!i&&E.inArray(e,s)?t:r}):e},createPlotBands:function(){var t,e,n,i,o,r,s,a=this,l=a.options,c=l.plotBands||[],h=this._plotbandGroup=new P.Group({zIndex:-1});for(t=0;c.length>t;t++)e=c[t],n=a.plotBandSlot(e),i=a.getSlot(e.from),o=e.from-C.floor(e.from),n.startAngle+=o*i.angle,r=C.ceil(e.to)-e.to,n.angle-=(r+o)*i.angle,s=tt.current.createRing(n,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:e.opacity}}),h.append(s);a.appendVisual(h)},plotBandSlot:function(t){return this.getSlot(t.from,t.to-1)},getSlot:function(t,e){var n,i,o,r=this,s=r.options,a=s.justified,l=r.box,c=r.majorAngles(),h=c.length,u=360/h;return s.reverse&&!a&&(t=(t+1)%h),t=rt(C.floor(t),0,h-1),i=c[t],a&&(i-=u/2,0>i&&(i+=360)),e=rt(C.ceil(e||t),t,h-1),n=e-t+1,o=u*n,new Q(l.center(),0,l.height()/2,i,o)},slot:function(t,e){var n=this.getSlot(t,e),i=n.startAngle+180,o=i+n.angle;return new M.Arc([n.c.x,n.c.y],{startAngle:i,endAngle:o,radiusX:n.r,radiusY:n.r})},pointCategoryIndex:function(t){var e,n,i=this,o=null,r=i.options.categories.length;for(e=0;r>e;e++)if(n=i.getSlot(e),n.containsPoint(t)){o=e;break}return o}});T(Pt.fn,Dt),o={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t,e,n,i,o,r,s=this,a=s.options,l=a.plotBands||[],c=a.majorGridLines.type,h=s.plotArea.polarAxis,u=h.majorAngles(),d=h.box.center(),f=this._plotbandGroup=new P.Group({zIndex:-1});for(t=0;l.length>t;t++)e=l[t],n={fill:{color:e.color,opacity:e.opacity},stroke:{opacity:e.opacity}},i=s.getSlot(e.from,e.to,!0),o=new Q(d,d.y-i.y2,d.y-i.y1,0,360),r=c===at?tt.current.createRing(o,n):P.Path.fromPoints(s.plotBandPoints(o,u),n).close(),f.append(r);s.appendVisual(f)},plotBandPoints:function(t,e){var n,i=[],o=[],r=[t.c.x,t.c.y],s=new M.Circle(r,t.ir),a=new M.Circle(r,t.r);for(n=0;e.length>n;n++)i.push(s.pointAt(e[n])),o.push(a.pointAt(e[n]));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e,n=this,i=n.options,o=n.radarMajorGridLinePositions(),r=t.majorAngles(),s=t.box.center(),a=[];return i.majorGridLines.visible&&(a=n.renderGridLines(s,o,r,i.majorGridLines)),i.minorGridLines.visible&&(e=n.radarMinorGridLinePositions(),D(a,n.renderGridLines(s,e,r,i.minorGridLines))),a},renderGridLines:function(t,e,n,i){var o,r,s,a,l,c={stroke:{width:i.width,color:i.color,dashType:i.dashType}},h=this.gridLinesVisual();for(r=0;e.length>r;r++)if(o=t.y-e[r],o>0)if(a=new M.Circle([t.x,t.y],o),i.type===at)h.append(new P.Circle(a,c));else{for(l=new P.Path(c),s=0;n.length>s;s++)l.lineTo(a.pointAt(n[s]));l.close(),h.append(l)}return h.children},getValue:function(t){var e,n,o,r,s,a,l,c=this,h=c.options,u=c.lineBox(),d=c.plotArea.polarAxis,f=d.majorAngles(),p=d.box.center(),g=t.distanceTo(p),m=g;return h.majorGridLines.type!==at&&f.length>1&&(e=t.x-p.x,n=t.y-p.y,o=(C.atan2(n,e)/ut+540)%360,f.sort(function(t,e){return i(t,o)-i(e,o)}),r=i(f[0],f[1])/2,s=i(o,f[0]),a=90-r,l=180-s-a,m=g*(C.sin(l*ut)/C.sin(a*ut))),c.axisType().fn.getValue.call(c,new X(u.x1,u.y2-m))}},r=q.extend({radarMajorGridLinePositions:function(){return this.getTickPositions(this.options.majorUnit)},radarMinorGridLinePositions:function(){var t=this,e=t.options,n=0;return e.majorGridLines.visible&&(n=e.majorUnit),t.getTickPositions(e.minorUnit,n)},axisType:function(){return q}}),T(r.fn,o),s=W.extend({radarMajorGridLinePositions:function(){var t=this,e=[];return t.traverseMajorTicksPositions(function(t){e.push(t)},t.options.majorGridLines),e},radarMinorGridLinePositions:function(){var t=this,e=[];return t.traverseMinorTicksPositions(function(t){e.push(t)},t.options.minorGridLines),e},axisType:function(){return W}}),T(s.fn,o),a=I.extend({init:function(t){var e=this;I.fn.init.call(e,t),t=e.options,t.minorUnit=t.minorUnit||e.options.majorUnit/2},options:{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:it(10)},majorGridLines:{color:lt,visible:!0,width:1},minorGridLines:{color:"#aaa"}},getDivisions:function(t){return q.fn.getDivisions.call(this,t)-1},reflow:function(t){this.box=t,this.reflowLabels()},reflowLabels:function(){var t,e,n=this,i=n.options,o=i.labels,r=o.skip||0,s=o.step||1,a=new R,l=n.intervals(i.majorUnit,r,s),c=n.labels;for(e=0;c.length>e;e++)c[e].reflow(a),t=c[e].box,c[e].reflow(n.getSlot(l[e]).adjacentBox(0,t.width(),t.height()))},lineBox:function(){return this.box},intervals:function(t,e,n,i){var o,r,s=this,a=s.options,l=s.getDivisions(t),c=a.min,h=[];for(e=e||0,n=n||1,r=e;l>r;r+=n)o=(360+c+r*t)%360,i&&E.inArray(o,i)||h.push(o);return h},majorIntervals:function(){return this.intervals(this.options.majorUnit)},minorIntervals:function(){return this.intervals(this.options.minorUnit)},intervalAngle:function(t){return(540-t-this.options.startAngle)%360},majorAngles:Pt.fn.majorAngles,createLine:function(){return[]},majorGridLineAngles:function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},minorGridLineAngles:function(t,e){var n=this.options,i=n.minorGridLines,o=n.majorGridLines,r=e?this.intervals(n.majorUnit,o.skip,o.step):null;return this.gridLineAngles(t,this.options.minorUnit,i.skip,i.step,r)},createPlotBands:Pt.fn.createPlotBands,plotBandSlot:function(t){return this.getSlot(t.from,t.to)},getSlot:function(t,e){var n,i=this,o=i.options,r=o.startAngle,s=i.box;return t=rt(t,o.min,o.max),e=rt(e||t,t,o.max),o.reverse&&(t*=-1,e*=-1),t=(540-t-r)%360,e=(540-e-r)%360,t>e&&(n=t,t=e,e=n),new Q(s.center(),0,s.height()/2,t,e-t)},slot:function(t,e){var n,i,o,r,s=this.options,a=360-s.startAngle,l=this.getSlot(t,e);return E.util.defined(e)||(e=t),o=C.min(t,e),r=C.max(t,e),s.reverse?(n=o,i=r):(n=360-r,i=360-o),n=(n+a)%360,i=(i+a)%360,new M.Arc([l.c.x,l.c.y],{startAngle:n,endAngle:i,radiusX:l.r,radiusY:l.r})},getValue:function(t){var e=this,n=e.options,i=e.box.center(),o=t.x-i.x,r=t.y-i.y,s=C.round(C.atan2(r,o)/ut),a=n.startAngle;return n.reverse||(s*=-1,a*=-1),(s+a+360)%360},range:q.fn.range,labelsCount:q.fn.labelsCount,createAxisLabel:q.fn.createAxisLabel}),T(a.fn,Dt),l=N.extend({options:{gap:1,spacing:0},reflow:function(t){var e,n,i=this,o=i.options,r=i.children,s=o.gap,a=o.spacing,l=r.length,c=l+s+a*(l-1),h=t.angle/c,u=t.startAngle+h*(s/2);for(n=0;l>n;n++)e=t.clone(),e.startAngle=u,e.angle=h,r[n].sector&&(e.r=r[n].sector.r),r[n].reflow(e),r[n].sector=e,u+=h+h*a}}),c=N.extend({reflow:function(t){var e,n,i=this,o=i.options.isReversed,r=i.children,s=r.length,a=o?s-1:0,l=o?-1:1;for(i.box=new R,n=a;n>=0&&s>n;n+=l)e=r[n].sector,e.startAngle=t.startAngle,e.angle=t.angle}}),h=U.extend({init:function(t,e){U.fn.init.call(this,t,null,e)},options:{overlay:{gradient:null},labels:{distance:10}}}),u=L.extend({pointType:function(){return h},clusterType:function(){return l},stackType:function(){return c},categorySlot:function(t,e){return t.getSlot(e)},pointSlot:function(t,e){var n=t.clone(),i=t.c.y;return n.r=i-e.y1,n.ir=i-e.y2,n},reflow:F.fn.reflow,reflowPoint:function(t,e){t.sector=e,t.reflow()},options:{clip:!1,animation:{type:"pie"}},createAnimation:function(){this.options.animation.center=this.box.toRect().center(),L.fn.createAnimation.call(this)}}),d=j.extend({options:{clip:!1},pointSlot:function(t,e){var n=t.c.y-e.y1,i=X.onCircle(t.c,t.middle(),n);return new R(i.x,i.y,i.x,i.y)},createSegment:function(t,e,n){var i,o,r=e.style;return o=r==bt?et:G,i=new o(t,e,n),t.length===e.data.length&&(i.options.closed=!0),i}}),f=B.extend({points:function(){return G.fn.points.call(this,this.stackPoints)}}),p=nt.extend({closeFill:t.noop}),g=d.extend({createSegment:function(t,e,n,i){var o,r,s=this,a=s.options,l=a.isStacked,c=(e.line||{}).style;return c===bt?(r=new p(t,i,l,e,n),r.options.closed=!0):(l&&n>0&&i&&(o=i.linePoints.slice(0).reverse()),t.push(t[0]),r=new f(t,o,e,n)),r},seriesMissingValues:function(t){return t.missingValues||St}}),m=K.extend({pointSlot:function(t,e){var n=t.c.y-e.y1,i=X.onCircle(t.c,t.startAngle,n);return new R(i.x,i.y,i.x,i.y)},options:{clip:!1}}),v=Z.extend({pointSlot:m.fn.pointSlot,options:{clip:!1}}),y=B.extend({points:function(){var t=this,e=t.parent,n=e.plotArea,i=n.polarAxis,o=i.box.center(),r=t.stackPoints,s=G.fn.points.call(t,r);return s.unshift([o.x,o.y]),s.push([o.x,o.y]),s}}),_=nt.extend({closeFill:function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},_polarAxisCenter:function(){var t=this.parent,e=t.plotArea,n=e.polarAxis,i=n.box.center();return i},strokeSegments:function(){var t,e,n,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new H(!1),n=G.fn.points.call(this),n.push(t),i=this._strokeSegments=e.process(n),i.pop()),i}}),w=v.extend({createSegment:function(t,e,n){var i,o=(e.line||{}).style;return i=o==bt?new _(t,null,!1,e,n):new y(t,[],e,n)},createMissingValue:function(t,e){var n;return E.hasValue(t.x)&&e!=ft&&(n={x:t.x,y:t.y},e==St&&(n.y=0)),n},seriesMissingValues:function(t){return t.missingValues||St},_hasMissingValuesGap:function(){var t,e=this.options.series;for(t=0;e.length>t;t++)if(this.seriesMissingValues(e[t])===dt)return!0},sortPoints:function(t){var e,i,o;if(t.sort(n),this._hasMissingValuesGap())for(o=0;t.length>o;o++)i=t[o],i&&(e=i.value,E.hasValue(e.y)||this.seriesMissingValues(i.series)!==dt||delete t[o]);return t}}),x=$.extend({init:function(t,e){var n=this;n.valueAxisRangeTracker=new z,$.fn.init.call(n,t,e)},render:function(){var t=this;t.addToLegend(t.series),t.createPolarAxis(),t.createCharts(),t.createValueAxis()},alignAxes:function(){var t=this.valueAxis,e=t.range(),n=t.options.reverse?e.max:e.min,i=t.getSlot(n),o=this.polarAxis.getSlot(0).c,r=t.box.translate(o.x-i.x1,o.y-i.y1);t.reflow(r)},createValueAxis:function(){var t,e,n,i,o=this,a=o.valueAxisRangeTracker,l=a.query(),c=o.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});c.type===pt?(n=s,i={min:.1,max:1}):(n=r,i={min:0,max:1}),t=a.query(name)||l||i,t&&l&&(t.min=C.min(t.min,l.min),t.max=C.max(t.max,l.max)),e=new n(t.min,t.max,c),o.valueAxis=e,o.appendAxis(e)},reflowAxes:function(){var t,e=this,n=e.options.plotArea,i=e.valueAxis,o=e.polarAxis,r=e.box,s=C.min(r.width(),r.height())*ht,a=it(n.padding||{},s),l=r.clone().unpad(a),c=l.clone().shrink(0,l.height()/2);o.reflow(l),i.reflow(c),t=i.lineBox().height()-i.box.height(),i.reflow(i.box.unpad({top:t})),e.axisBox=l,e.alignAxes(l)},backgroundBox:function(){return this.box}}),b=x.extend({options:{categoryAxis:{categories:[]},valueAxis:{}},createPolarAxis:function(){var t,e=this;t=new Pt(e.options.categoryAxis),e.polarAxis=t,e.categoryAxis=t,e.appendAxis(t)},valueAxisOptions:function(t){var e=this;return e._hasBarCharts&&T(t,{majorGridLines:{type:at},minorGridLines:{type:at}}),e._isStacked100&&T(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),T(t,e.options.valueAxis)},appendChart:V.fn.appendChart,createCharts:function(){var t=this,e=t.filterVisibleSeries(t.series),n=t.panes[0];t.createAreaChart(ot(e,[_t]),n),t.createLineChart(ot(e,[xt]),n),t.createBarChart(ot(e,[wt]),n)},chartOptions:function(t){var e,n,i={series:t},o=t[0];return o&&(e=this.filterVisibleSeries(t),n=o.stack,i.isStacked=n&&e.length>1,i.isStacked100=n&&"100%"===n.type&&e.length>1,i.isStacked100&&(this._isStacked100=!0)),i},createAreaChart:function(t,e){if(0!==t.length){var n=new g(this,this.chartOptions(t));this.appendChart(n,e)}},createLineChart:function(t,e){if(0!==t.length){var n=new d(this,this.chartOptions(t));this.appendChart(n,e)}},createBarChart:function(t,e){var n,i,o;0!==t.length&&(n=t[0],i=this.chartOptions(t),i.gap=n.gap,i.spacing=n.spacing,o=new u(this,i),this.appendChart(o,e),this._hasBarCharts=!0)},seriesCategoryAxis:function(){return this.categoryAxis},click:function(e,n){var i,o,r=this,s=e._eventCoordinates(n),a=new X(s.x,s.y);i=r.categoryAxis.getCategory(a),o=r.valueAxis.getValue(a),null!==i&&null!==o&&e.trigger(gt,{element:t(n.target),category:i,value:o})},createCrosshairs:t.noop}),k=x.extend({options:{xAxis:{},yAxis:{}},createPolarAxis:function(){var t,e=this;t=new a(e.options.xAxis),e.polarAxis=t,e.axisX=t,e.appendAxis(t)},valueAxisOptions:function(t){var e=this;return T(t,{majorGridLines:{type:at},minorGridLines:{type:at}},e.options.yAxis)},createValueAxis:function(){var t=this;x.fn.createValueAxis.call(t),t.axisY=t.valueAxis},appendChart:function(t,e){var n=this;n.valueAxisRangeTracker.update(t.yAxisRanges),$.fn.appendChart.call(n,t,e)},createCharts:function(){var t=this,e=t.filterVisibleSeries(t.series),n=t.panes[0];t.createLineChart(ot(e,[vt]),n),t.createScatterChart(ot(e,[yt]),n),t.createAreaChart(ot(e,[mt]),n)},createLineChart:function(t,e){if(0!==t.length){var n=this,i=new v(n,{series:t});n.appendChart(i,e)}},createScatterChart:function(t,e){if(0!==t.length){var n=this,i=new m(n,{series:t});n.appendChart(i,e)}},createAreaChart:function(t,e){if(0!==t.length){var n=this,i=new w(n,{series:t});n.appendChart(i,e)}},click:function(e,n){var i,o,r=this,s=e._eventCoordinates(n),a=new X(s.x,s.y);i=r.axisX.getValue(a),o=r.axisY.getValue(a),null!==i&&null!==o&&e.trigger(gt,{element:t(n.target),x:i,y:o})},createCrosshairs:t.noop}),Y.current.register(k,Tt),Y.current.register(b,At),J.current.register(Tt,[kt,Ct],["color"]),J.current.register(At,["value"],["color"]),E.DefaultAggregates.current.register(At,{value:"max",color:"first"}),T(E,{PolarAreaChart:w,PolarAxis:a,PolarLineChart:v,PolarPlotArea:k,RadarAreaChart:g,RadarBarChart:u,RadarCategoryAxis:Pt,RadarClusterLayout:l,RadarLineChart:d,RadarNumericAxis:r,RadarPlotArea:b,SplinePolarAreaSegment:_,SplineRadarAreaSegment:p,RadarStackLayout:c})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.chart.funnel.min",["kendo.dataviz.chart.min","kendo.drawing.min"],t)}(function(){return function(t,e){var n,i=window.kendo,o=i.deepExtend,r=t.extend,s=i.isFunction,a=i.template,l=i.util,c=l.append,h=i.drawing,u=i.geometry,d=i.dataviz,f=i.drawing.Color,p=d.ChartElement,g=d.PieChartMixin,m=d.PlotAreaBase,v=d.PlotAreaFactory,y=d.Point2D,_=d.Box2D,w=d.SeriesBinder,x=d.TextBox,b=d.autoFormat,k=d.evalOptions,C=l.limitValue,S=d.seriesTotal,T="category",A="color",D="funnel",P="value",M="black",E="white",B=m.extend({render:function(){var t=this,e=t.series;t.createFunnelChart(e)},createFunnelChart:function(t){var e=this,n=t[0],i=new I(e,{series:t,legend:e.options.legend,neckRatio:n.neckRatio,dynamicHeight:n.dynamicHeight,dynamicSlope:n.dynamicSlope,segmentSpacing:n.segmentSpacing,highlight:n.highlight});e.appendChart(i)},appendChart:function(t,e){m.fn.appendChart.call(this,t,e),c(this.options.legend.items,t.legendItems)}}),I=p.extend({init:function(t,e){var n=this;p.fn.init.call(n,e),n.plotArea=t,n.points=[],n.labels=[],n.legendItems=[],n.render()},options:{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:"center",position:"center"}},formatPointValue:function(t,e){return b(e,t.value)},render:function(){var t,n,i,r,a,l,c,h=this,u=h.options,d=h.plotArea.options.seriesColors||[],f=d.length,p=u.series[0],g=p.data;if(g)for(i=S(p),a=0;g.length>a;a++)t=w.current.bindPoint(p,a),r=t.valueFields.value,null!==r&&r!==e&&(n=t.fields,s(p.color)||(p.color=n.color||d[a%f]),n=o({index:a,owner:h,series:p,category:n.category,dataItem:g[a],percentage:Math.abs(r)/i,visibleInLegend:n.visibleInLegend,visible:n.visible},n),l=h.createSegment(r,n),c=h.createLabel(r,n),l&&c&&l.append(c))},evalSegmentOptions:function(t,e,n){var i=n.series;k(t,{value:e,series:i,dataItem:n.dataItem,index:n.index},{defaults:i._defaults,excluded:["data","toggle","visual"]})},createSegment:function(t,i){var s,a=this,l=o({},i.series);return a.evalSegmentOptions(l,t,i),a.createLegendItem(t,l,i),i.visible!==!1?(s=new n(t,l,i),r(s,i),a.append(s),a.points.push(s),s):e},createLabel:function(t,n){var i,r,s,l=this,c=n.series,h=n.dataItem,u=o({},l.options.labels,c.labels),d=t;return u.visible?(u.template?(r=a(u.template),d=r({dataItem:h,value:t,percentage:n.percentage,category:n.category,series:c})):u.format&&(d=b(u.format,d)),
u.color||"center"!==u.align||(s=new f(c.color).percBrightness(),u.color=s>180?M:E),l.evalSegmentOptions(u,t,n),i=new x(d,o({vAlign:u.position},u)),l.labels.push(i),i):e},labelPadding:function(){var t,e,n,i,o=this.labels,r={left:0,right:0};for(i=0;o.length>i;i++)t=o[i],e=t.options.align,"center"!==e&&(n=o[i].box.width(),"left"===e?r.left=Math.max(r.left,n):r.right=Math.max(r.right,n));return r},reflow:function(e){var n,i,o,r,s,a,l,c,h,d,f,p,g=this,m=g.options,v=g.points,y=v.length,_=1>=m.neckRatio,w=e.clone().unpad(g.labelPadding()),x=w.width(),b=0,k=_?0:(x-x/m.neckRatio)/2,S=m.segmentSpacing,T=m.dynamicSlope,A=w.height()-S*(y-1),D=_?m.neckRatio*x:x;if(y){if(T)for(l=v[0],c=l,t.each(v,function(t,e){e.percentage>c.percentage&&(c=e)}),o=l.percentage/c.percentage*x,k=(x-o)/2,n=0;y>n;n++)s=v[n].percentage,h=v[n+1],d=h?h.percentage:s,r=v[n].points=[],i=m.dynamicHeight?A*s:A/y,a=s?(x-o*(d/s))/2:d?0:x/2,a=C(a,0,x),r.push(new u.Point(w.x1+k,w.y1+b)),r.push(new u.Point(w.x1+x-k,w.y1+b)),r.push(new u.Point(w.x1+x-a,w.y1+i+b)),r.push(new u.Point(w.x1+a,w.y1+i+b)),k=a,b+=i+S,o=C(x-2*a,0,x);else for(f=_?x:x-2*k,p=(f-D)/2,n=0;y>n;n++)r=v[n].points=[],s=v[n].percentage,a=m.dynamicHeight?p*s:p/y,i=m.dynamicHeight?A*s:A/y,r.push(new u.Point(w.x1+k,w.y1+b)),r.push(new u.Point(w.x1+x-k,w.y1+b)),r.push(new u.Point(w.x1+x-k-a,w.y1+i+b)),r.push(new u.Point(w.x1+k+a,w.y1+i+b)),k+=a,b+=i+S;for(n=0;y>n;n++)v[n].reflow(e)}}});o(I.fn,g),n=p.extend({init:function(t,e,n){var i=this;p.fn.init.call(i,e),i.value=t,i.options.index=n.index},options:{color:E,border:{width:1}},reflow:function(t){var e=this,n=e.points,i=e.children[0];e.box=new _(n[0].x,n[0].y,n[1].x,n[2].y),i&&i.reflow(new _(t.x1,n[0].y,t.x2,n[2].y))},createVisual:function(){var t,e=this,n=e.options;p.fn.createVisual.call(this),t=n.visual?n.visual({category:e.category,dataItem:e.dataItem,value:e.value,series:e.series,percentage:e.percentage,points:e.points,options:n,createVisual:function(){return e.createPath()}}):e.createPath(),t&&this.visual.append(t)},createPath:function(){var t=this.options,e=t.border,n=h.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close();return n},createHighlight:function(t){return h.Path.fromPoints(this.points,t)},highlightVisual:function(){return this.visual.children[0]},highlightVisualArgs:function(){var t=h.Path.fromPoints(this.points).close();return{options:this.options,path:t}},highlightOverlay:function(t,e){var n,i,o,s=this.options,a=s.highlight||{};if(a.visible!==!1)return n=a.border||{},i=r({},e,{fill:a.color,stroke:n.color,strokeOpacity:n.opacity,strokeWidth:n.width,fillOpacity:a.opacity}),o=t.createPolyline(this.points,!0,i)},tooltipAnchor:function(t){var e=this.box;return new y(e.center().x-t/2,e.y1)},formatValue:function(t){var e=this;return e.owner.formatPointValue(e,t)}}),o(n.fn,d.PointEventsMixin),v.current.register(B,[D]),w.current.register([D],[P],[T,A,"visibleInLegend","visible"]),o(d,{FunnelChart:I,FunnelSegment:n})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.gauge.min",["kendo.dataviz.core.min","kendo.drawing.min","kendo.dataviz.themes.min"],t)}(function(){return function(t,e){function n(t,e){var n=t.box,i=t.children[0].box,r=e.border||{},s=e.background||"",a=new D,l=P.fromRect(new M([n.x1,n.y1],[n.width(),n.height()]),{stroke:{}}),c=new E(t.text,new A(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),h=o(c.bbox().clone(),e.padding),u=P.fromRect(h,{stroke:{color:r.width?r.color:"",width:r.width,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:s}});return a.append(l),a.append(u),a.append(c),a}function i(t,e,n){var i=w(t.from)?t.from:H,o=w(t.to)?t.to:N;return t.from=l.max(l.min(o,i),e),t.to=l.min(l.max(o,i),n),t}function o(t,e){var n=t.getOrigin(),i=t.getSize(),o=k(e);return t.setOrigin([n.x-o.left,n.y-o.top]),t.setSize([i.width+(o.left+o.right),i.height+(o.top+o.bottom)]),t}function r(t,e){var n=k(e);return n.left=-n.left,n.top=-n.top,n.right=-n.right,n.bottom=-n.bottom,o(t,n)}var s,a,l=Math,c=window.kendo,h=c.util,u=c.ui.Widget,d=c.deepExtend,f=c.dataviz,p=f.autoMajorUnit,g=f.ChartElement,m=f.NumericAxis,v=f.Axis,y=f.Box2D,_=c.Class,w=h.defined,x=h.isNumber,b=f.interpolateValue,k=f.getSpacing,C=f.round,S=f.geometry,T=f.drawing,A=S.Point,D=T.Group,P=T.Path,M=S.Rect,E=T.Text,B=150,I=250,z="arrow",L="arrowPointer",R="barPointer",O="#000",F=.05,V=f.COORD_PRECISION,N=Number.MAX_VALUE,H=-Number.MAX_VALUE,U=200,j=.5,G=200,W=60,q=60,$=5,Y=l.PI/180,X=180,Q="inside",K="linear",Z="needle",J="outside",tt="radialPointer",et="x",nt="y",it=_.extend({init:function(t,e){var n=this,i=t.options;g.fn.init.call(n,e),e=n.options,e.fill=e.color,n.scale=t,e.value=w(e.value)?l.min(l.max(e.value,i.min),i.max):i.min},options:{color:O},value:function(t){var n=this,i=n.options,o=i.value,r=n.scale.options;return 0===arguments.length?o:(i._oldValue=i._oldValue!==e?i.value:r.min,i.value=l.min(l.max(t,r.min),r.max),n.elements&&n.repaint(),e)}}),ot=it.extend({options:{shape:Z,cap:{size:F},arrow:{width:16,height:14},animation:{type:tt,duration:B}},setRadius:function(t){var e=this;t&&(e.elements.clear(),e.render(e.parent,e.center,t))},setAngle:function(t){this.elements.transform(S.transform().rotate(t,this.center))},repaint:function(){var t=this,e=t.scale,n=t.options,i=e.slotAngle(n._oldValue),o=e.slotAngle(n.value);n.animation.transitions===!1?t.setAngle(o):new ft(t.elements,d(n.animation,{oldAngle:i,newAngle:o})).play()},render:function(){var t=this,e=t.scale,n=e.arc.center,i=t.options,o=new D;return i.animation!==!1&&d(i.animation,{startAngle:0,center:n,reverse:e.options.reverse}),i.shape===Z?o.append(t._renderNeedle(),t._renderCap()):o.append(t._renderArrow()),t.elements=o,t.setAngle(Y),o},reflow:function(t){var e=this,n=e.center=t.center,i=e.radius=t.getRadiusX(),o=e.capSize=Math.round(i*e.options.cap.size);e.bbox=M.fromPoints(new A(n.x-o,n.y-o),new A(n.x+o,n.y+o))},_renderNeedle:function(){var t=this,e=t.options,n=t.scale.options.minorTicks.size,i=t.center,o=e.color,r=new P({fill:{color:o},stroke:{color:o,width:j}});return r.moveTo(i.x+t.radius-n,i.y).lineTo(i.x,i.y-t.capSize/2).lineTo(i.x,i.y+t.capSize/2).close(),r},_renderCap:function(){var t=this,e=t.options,n=e.cap.color||e.color,i=new S.Circle(t.center,t.capSize),o=new T.Circle(i,{fill:{color:n},stroke:{color:n}});return o}}),rt=m.extend({init:function(t){var e=this;e.options=d({},e.options,t),e.options.majorUnit=e.options.majorUnit||p(e.options.min,e.options.max),e.options.minorUnit=e.options.minorUnit||e.options.majorUnit/10,v.fn.init.call(e,e.options)},options:{min:0,max:100,majorTicks:{size:15,align:Q,color:O,width:j,visible:!0},minorTicks:{size:10,align:Q,color:O,width:j,visible:!0},startAngle:-30,endAngle:210,labels:{position:Q,padding:2}},render:function(t,e){var n=this,i=n.renderArc(t,e);n.bbox=i.bbox(),n.labelElements=n.renderLabels(),n.ticks=n.renderTicks(),n.ranges=n.renderRanges()},reflow:function(t){var n=this,i=t.center(),o=l.min(t.height(),t.width())/2;return n.bbox===e?n.render(i,o):(n.bbox=n.arc.bbox(),n.radius(n.arc.getRadiusX()),n.repositionRanges(),n.renderLabels(),e)},slotAngle:function(t){var e,n=this.options,i=n.startAngle,o=n.reverse,r=n.endAngle-i,s=n.min,a=n.max;return e=o?n.endAngle-(t-s)/(a-s)*r:(t-s)/(a-s)*r+i,e+X},renderLabels:function(){var t,i,o,r,s,a,c,h,u,d,p,g,m,v,y=this,_=y.options,w=_.majorTicks.size,x=y.arc.clone(),b=x.getRadiusX(),k=y.tickAngles(x,_.majorUnit),C=y.labels,T=C.length,P=_.labels,E=P.padding,B=.05*b,I=_.rangeSize=_.rangeSize||.1*b,z=_.ranges||[],L=new D;for(y.options.rangeDistance!==e?B=y.options.rangeDistance:y.options.rangeDistance=B,P.position===Q&&(b-=w,z.length&&y.labelElements===e&&(b-=I+B),x.setRadiusX(b).setRadiusY(b)),c=0;T>c;c++)s=C[c],t=s.box.width()/2,i=s.box.height()/2,r=k[c],o=(r-X)*Y,d=P.position===Q,a=x.pointAt(r),h=a.x+l.cos(o)*(t+E)*(d?1:-1),u=a.y+l.sin(o)*(i+E)*(d?1:-1),s.reflow(new f.Box2D(h-t,u-i,h+t,u+i)),g=new A(s.box.x1,s.box.y1),y.labelElements===e?(p=n(s,_.labels),L.append(p)):(p=y.labelElements.children[c],m=p.bbox().origin,v=p.transform()||S.transform(),v.translate(g.x-m.x,g.y-m.y),p.transform(v)),y.bbox=M.union(y.bbox,p.bbox());return L},repositionRanges:function(){var t,e,n,i=this,o=i.ranges.children,r=i.options.rangeSize,s=i.options.rangeDistance;if(o.length>0){for(t=i.getRangeRadius(),i.options.labels.position===Q&&(t+=r+s),e=t+r/2,n=0;o.length>n;n++)o[n]._geometry.setRadiusX(e).setRadiusY(e);i.bbox=M.union(i.bbox,i.ranges.bbox())}},renderRanges:function(){var t,e,n,i,o,r,s=this,a=s.arc,l=new D,c=s.rangeSegments(),h=c.length,u=s.options.reverse,d=s.options.rangeSize,f=s.options.rangeDistance;if(h)for(i=s.getRangeRadius(),s.radius(s.radius()-d-f),r=0;h>r;r++)n=c[r],t=s.slotAngle(n[u?"to":"from"]),e=s.slotAngle(n[u?"from":"to"]),e-t!==0&&(o=new S.Arc(a.center,{radiusX:i+d/2,radiusY:i+d/2,startAngle:t,endAngle:e}),l.append(new T.Arc(o,{stroke:{width:d,color:n.color,opacity:n.opacity}})));return l},rangeSegments:function(){function t(t,e,n,i){return{from:t,to:e,color:n,opacity:i}}var e,n,o,r,s,a=this,l=a.options,c=l.ranges||[],h=c.length,u=l.rangePlaceholderColor,d=[],f=l.min,p=l.max;if(h)for(d.push(t(f,p,u)),r=0;h>r;r++)for(e=i(c[r],f,p),n=d.length,s=0;n>s;s++)if(o=d[s],e.from>=o.from&&o.to>=e.from){d.push(t(e.from,e.to,e.color,e.opacity)),e.to>=o.from&&o.to>=e.to&&d.push(t(e.to,o.to,u,e.opacity)),o.to=e.from;break}return d},getRangeRadius:function(){var t,e=this,n=e.options,i=n.majorTicks.size,o=n.rangeSize,r=n.rangeDistance,s=e.arc;return t=n.labels.position===J?s.getRadiusX()-i-r-o:s.getRadiusX()-o},renderArc:function(t,e){var n=this,i=n.options,o=n.arc=new S.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+X,endAngle:i.endAngle+X});return o},renderTicks:function(){function t(t,e,n,i){var o,r,s,a=new D,l=t.center,c=t.getRadiusX(),h=i.visible;if(h)for(o=0;e.length>o;o++)r=t.pointAt(e[o]),s=new A(l.x+c-i.size,l.y).rotate(e[o],l),a.append(new P({stroke:{color:i.color,width:i.width}}).moveTo(r).lineTo(s));return a}var e=this,n=e.arc,i=e.options,o=i.labels.position,r=new D,s=i.majorTicks.size,a=i.minorTicks.size,l=n.clone(),c=l.getRadiusX();return e.majorTickAngles=e.tickAngles(n,i.majorUnit),e.majorTicks=t(l,e.majorTickAngles,i.majorUnit,i.majorTicks),r.append(e.majorTicks),e._tickDifference=s-a,o===J&&l.setRadiusX(c-s+a).setRadiusY(c-s+a),e.minorTickAngles=e.normalizeTickAngles(e.tickAngles(n,i.minorUnit)),e.minorTicks=t(l,e.minorTickAngles,i.minorUnit,i.minorTicks,i.majorUnit),r.append(e.minorTicks),r},normalizeTickAngles:function(t){var e,n=this,i=n.options,o=i.majorUnit/i.minorUnit;for(e=t.length-1;e>=0;e--)e%o===0&&t.splice(e,1);return t},tickAngles:function(t,e){var n,i=this,o=i.options,r=o.reverse,s=o.max-o.min,a=t.endAngle-t.startAngle,l=t.startAngle,c=s/e,h=a/c,u=[];for(r&&(l+=a,h=-h),n=0;c>n;n++)u.push(C(l,V)),l+=h;return C(l)<=t.endAngle&&u.push(l),u},radius:function(t){var n=this;return t?(n.arc.setRadiusX(t).setRadiusY(t),n.repositionTicks(n.majorTicks.children,n.majorTickAngles),n.repositionTicks(n.minorTicks.children,n.minorTickAngles,!0),e):n.arc.getRadiusX()},repositionTicks:function(t,e,n){var i,o,r,s,a,l=this,c=n?l._tickDifference||0:0,h=l.arc,u=h.getRadiusX();for(n&&l.options.labels.position===J&&0!==c&&(h=l.arc.clone(),h.setRadiusX(u-c).setRadiusY(u-c)),i=0;t.length>i;i++)o=h.pointAt(e[i]),r=t[i].segments,s=o.x-r[0].anchor().x,a=o.y-r[0].anchor().y,t[i].transform((new S.Transformation).translate(s,a))}}),st=u.extend({init:function(e,n){var i,o,r,s,a,l=this,h=f.ui.themes||{};if(c.destroy(e),t(e).empty(),u.fn.init.call(l,e),l.wrapper=l.element,l._originalOptions=d({},n),i=d({},l.options,n),r=i.theme,s=h[r]||h[r.toLowerCase()],o=r&&s?s.gauge:{},l.options=d({},o,i),t.isArray(i.pointer))for(a=0;i.pointer.length>a;a++)l.options.pointer[a]=d({},o.pointer,i.pointer[a]);l.element.addClass("k-gauge"),l.surface=l._createSurface(),l.redraw()},options:{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}},destroy:function(){this.surface.destroy(),u.fn.destroy.call(this)},value:function(t){var n=this,i=n.pointers[0];return 0===arguments.length?i.value():(i.value(t),n._setValueOptions(t),e)},_draw:function(){var t=this.surface;t.clear(),t.draw(this._visuals)},exportVisual:function(){return this._visuals},allValues:function(e){var n,i=this,o=i.pointers,r=[];if(0===arguments.length){for(n=0;o.length>n;n++)r.push(o[n].value());return r}if(t.isArray(e))for(n=0;e.length>n;n++)x(e[n])&&o[n].value(e[n]);i._setValueOptions(e)},_setValueOptions:function(t){var e,n=[].concat(this.options.pointer);for(t=[].concat(t),e=0;t.length>e;e++)n[e].value=t[e]},_resize:function(){var t,e=this,n=e.options.transitions;for(e.options.transitions=!1,t=0;e.pointers.length>t;t++)e.pointers[t].options.animation.transitions=!1;for(e.redraw(),e.options.transitions=n,t=0;e.pointers.length>t;t++)e.pointers[t].options.animation.transitions=n},redraw:function(){var t,e=this,n=d(e._getSize(),e.options.gaugeArea),i=new M([0,0],[n.width,n.height]);e.surface.clear(),e.gaugeArea=e._createGaugeArea(),e.surface.element.css({width:n.width,height:n.height}),e._createModel(),t=r(i.bbox(),e._gaugeAreaMargin),e.reflow(t)},_createGaugeArea:function(){var t,e=this,n=e.options.gaugeArea,i=e.surface.size(),o=n.border||{},s=new M([0,0],[i.width,i.height]);return e._gaugeAreaMargin=n.margin||$,o.width>0&&(s=r(s,o.width)),t=P.fromRect(s,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n.background}})},_createSurface:function(){var e,n=this,i=n.options,o=n._getSize();return o=i.gaugeArea?d(o,i.gaugeArea):o,e=t("<div></div>").appendTo(n.element).css({width:o.width,height:o.height}),new T.Surface.create(e,{type:i.renderAs})},getSize:function(){return this._getSize()},_getSize:function(){var t=this,e=t.element,n=e.width(),i=e.height();return n||(n=G),i||(i=U),{width:n,height:i}}}),at=st.extend({init:function(t,e){var n=this;st.fn.init.call(n,t,e),c.notify(n,f.ui)},options:{name:"RadialGauge",transitions:!0,gaugeArea:{background:""}},reflow:function(t){var e,n=this,i=n.pointers;for(n.scale.reflow(t),n._initialPlotArea=n.scale.bbox,e=0;i.length>e;e++)i[e].reflow(n.scale.arc),n._initialPlotArea=M.union(n._initialPlotArea,i[e].bbox);n.fitScale(t),n.alignScale(t),n._buildVisual(n.gaugeArea,i,n.scale),n._draw()},_buildVisual:function(t,e,n){var i,o,r=new D;for(r.append(t),r.append(n.ticks),r.append(n.ranges),o=0;e.length>o;o++)i=e[o],i.render(),r.append(i.elements),i.value(i.options.value);r.append(n.labelElements),this._visuals=r},fitScale:function(t){for(var e,n,i,o,r,s=this,a=s.scale,c=a.arc,h=s._initialPlotArea,u=l.abs(s.getDiff(h,t)),d=C(u,V),f=C(-u,V),p=0,g=0;!(!(g++<100)||(p=r===i?p+1:0,p>5)||d!=o&&(e=s.getPlotBox(d,t,c),e>=0&&2>=e)||f!=o&&(i=s.getPlotBox(f,t,c),i>=0&&2>=i)||(o=e>0&&i>0?2*d:0>e&&0>i?2*f:C((d+f)/2||1,V),n=s.getPlotBox(o,t,c),n>=0&&2>=n));)r=i,n>0?(f=o,i=n):(d=o,e=n)},getPlotBox:function(t,e,n){var i,o=this,r=o.scale,s=o.pointers,a=n.getRadiusX();for(n=n.clone(),n.setRadiusX(a+t).setRadiusY(a+t),r.arc=n,r.reflow(e),o.plotBbox=r.bbox,i=0;s.length>i;i++)s[i].reflow(n),o.plotBbox=M.union(o.plotBbox,s[i].bbox);return o.getDiff(o.plotBbox,e)},getDiff:function(t,e){return l.min(e.width()-t.width(),e.height()-t.height())},alignScale:function(t){var e,n=this,i=n.plotBbox.center(),o=t.center(),r=i.x-o.x,s=i.y-o.y,a=n.scale,l=n.pointers;for(a.arc.center.x-=r,a.arc.center.y-=s,a.reflow(t),e=0;l.length>e;e++)l[e].reflow(a.arc),n.plotBbox=M.union(a.bbox,l[e].bbox)},_createModel:function(){var e,n,i=this,o=i.options,r=o.pointer,s=i.scale=new rt(o.scale);for(i.pointers=[],r=t.isArray(r)?r:[r],n=0;r.length>n;n++)e=new ot(s,d({},r[n],{animation:{transitions:o.transitions}})),i.pointers.push(e)}}),lt=st.extend({init:function(t,e){var n=this;st.fn.init.call(n,t,e),c.notify(n,f.ui)},options:{name:"LinearGauge",transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}},reflow:function(t){var e,n=this,i=n.pointers,o=t.origin.x,r=t.origin.y,s=new f.Box2D(o,o,o+t.width(),r+t.height());for(n.scale.reflow(s),e=0;i.length>e;e++)i[e].reflow();n.bbox=n._getBox(s),n._alignElements(),n._shrinkElements(),n._buildVisual(),n._draw()},_buildVisual:function(){var t,e,n=this,i=new D,o=n.scale.render(),r=n.pointers;for(i.append(n.gaugeArea),i.append(o),e=0;r.length>e;e++)t=r[e],i.append(t.render()),t.value(t.options.value);n._visuals=i},_createModel:function(){var e,n,i,o=this,r=o.options,s=r.pointer,a=o.scale=new ct(r.scale);for(o.pointers=[],s=t.isArray(s)?s:[s],i=0;s.length>i;i++)n=d({},s[i],{animation:{transitions:r.transitions}}),e=n.shape===z?new ut(a,n):new dt(a,n),o.pointers.push(e)},_getSize:function(){var t=this,e=t.element,n=e.width(),i=e.height(),o=t.options.scale.vertical;return n||(n=o?W:G),i||(i=o?U:q),{width:n,height:i}},_getBox:function(t){var e,n,i=this,o=i.scale,r=i.pointers,s=t.center(),a=r[0].box.clone().wrap(o.box);for(n=0;r.length>n;n++)a.wrap(r[n].box.clone());return o.options.vertical?(e=a.width()/2,a=new y(s.x-e,t.y1,s.x+e,t.y2)):(e=a.height()/2,a=new y(t.x1,s.y-e,t.x2,s.y+e)),a},_alignElements:function(){var t,e,n=this,i=n.scale,o=n.pointers,r=i.box,s=o[0].box.clone().wrap(i.box),a=n.bbox;for(e=0;o.length>e;e++)s.wrap(o[e].box.clone());for(i.options.vertical?(t=a.center().x-s.center().x,i.reflow(new y(r.x1+t,a.y1,r.x2+t,a.y2))):(t=a.center().y-s.center().y,i.reflow(new y(a.x1,r.y1+t,a.x2,r.y2+t))),e=0;o.length>e;e++)o[e].reflow(n.bbox)},_shrinkElements:function(){var t,e=this,n=e.scale,i=e.pointers,o=n.box.clone(),r=n.options.vertical?"y":"x",s=i[0].box;for(t=0;i.length>t;t++)s.wrap(i[t].box.clone());for(o[r+1]+=l.max(o[r+1]-s[r+1],0),o[r+2]-=l.max(s[r+2]-o[r+2],0),n.reflow(o),t=0;i.length>t;t++)i[t].reflow(e.bbox)}}),ct=m.extend({init:function(t){var e=this;e.options=d({},e.options,t),e.options=d({},e.options,{labels:{mirror:e.options.mirror}}),e.options.majorUnit=e.options.majorUnit||p(e.options.min,e.options.max),v.fn.init.call(e,e.options),e.options.minorUnit=e.options.minorUnit||e.options.majorUnit/10},options:{min:0,max:50,majorTicks:{size:15,align:Q,color:O,width:j,visible:!0},minorTicks:{size:10,align:Q,color:O,width:j,visible:!0},line:{width:j},labels:{position:Q,padding:2},mirror:!1,_alignLines:!1},render:function(){var t=this,e=t.elements=new D,n=t.renderLabels(),i=t.renderLine(),o=t.renderTicks(),r=t.renderRanges();return e.append(i,n,o,r),e},renderRanges:function(){var t,e,n,o,r,s=this,a=s.options,l=a.min,c=a.max,h=a.ranges||[],u=a.vertical,d=a.labels.mirror,f=new D,p=h.length,g=a.rangeSize||a.minorTicks.size/2;if(p)for(r=0;p>r;r++)t=i(h[r],l,c),e=s.getSlot(t.from,t.to),n=u?s.lineBox():e,o=u?e:s.lineBox(),u?n.x1-=g*(d?-1:1):o.y2+=g*(d?-1:1),f.append(P.fromRect(new M([n.x1,o.y1],[n.x2-n.x1,o.y2-o.y1]),{fill:{color:t.color,opacity:t.opacity},stroke:{}}));return f},renderLabels:function(){var t,e=this,i=e.options,o=e.labels,r=new D;for(t=0;o.length>t;t++)r.append(n(o[t],i.labels));return r},renderLine:function(){var t,e=this,n=e.options,i=n.line,o=e.lineBox(),r=new D;return i.width>0&&i.visible&&(t=new P({stroke:{color:i.color,dashType:i.dashType,width:i.width}}),t.moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),r.append(t)),r},renderTicks:function(){function t(t,i){var s,l=t.length;if(i.visible)for(s=i.skip;l>s;s+=i.step)s%i.skipUnit!==0&&(a.tickX=r?o.x2:o.x2-i.size,a.tickY=r?o.y1-i.size:o.y1,a.position=t[s],n.append(e.renderAxisTick(a,i)))}var e=this,n=new D,i=e.options,o=e.lineBox(),r=i.labels.mirror,s=i.majorTicks.visible?i.majorUnit:0,a={_alignLines:i._alignLines,vertical:i.vertical};return t(e.getMajorTickPositions(),i.majorTicks),t(e.getMinorTickPositions(),d({},{skipUnit:s/i.minorUnit},i.minorTicks)),n},renderAxisTick:function(t,e){var n,i,o,r=t.tickX,s=t.tickY,a=t.position;return t.vertical?(n=new A(r,a),i=new A(r+e.size,a)):(n=new A(a,s),i=new A(a,s+e.size)),o=new P({stroke:{color:e.color,width:e.width}}).moveTo(n).lineTo(i)}}),ht=it.extend({init:function(t,e){var n=this;it.fn.init.call(n,t,e),n.options=d({track:{visible:w(e.track)}},n.options)},options:{shape:R,track:{border:{width:1}},color:O,border:{width:1},opacity:1,margin:k(3),animation:{type:R},visible:!0},reflow:function(){var t,e,n,i=this,o=i.options,r=i.scale,s=r.lineBox(),a=o.track.size||o.size,l=o.size/2,c=r.options.mirror,h=k(o.margin),u=r.options.vertical,d=u?h[c?"left":"right"]:h[c?"bottom":"top"];d=c?-d:d,u?(n=new y(s.x1+d,s.y1,s.x1+d,s.y2),c?n.x1-=a:n.x2+=a,o.shape!==R&&(e=new y(s.x2+d,s.y1-l,s.x2+d,s.y2+l),t=e)):(n=new y(s.x1,s.y1-d,s.x2,s.y1-d),c?n.y2+=a:n.y1-=a,o.shape!==R&&(e=new y(s.x1-l,s.y1-d,s.x2+l,s.y1-d),t=e)),i.trackBox=n,i.pointerRangeBox=e,i.box=t||n.clone().pad(o.border.width)},getElementOptions:function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:w(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},_margin:function(){var t=this,e=t.options,n=t.scale,i=n.options.mirror,o=k(e.margin),r=n.options.vertical,s=r?o[i?"left":"right"]:o[i?"bottom":"top"];return s}}),ut=ht.extend({init:function(t,n){ht.fn.init.call(this,t,n),this.options.size===e&&(this.options.size=.6*this.scale.options.majorTicks.size)},pointerShape:function(){var t,e,n=this,i=n.options,o=n.scale,r=i.size,s=o.options.vertical,a=r/2,l=o.options.mirror?-1:1,c=o.options.reverse;return s?(t=c?"y2":"y1",e=[new A(0,0-a),new A(0-l*r,0),new A(0,0+a)]):(t=c?"x1":"x2",e=[new A(0-a,0),new A(0,0+l*r),new A(0+a,0)]),e},repaint:function(){var t=this,e=t.scale,n=t.options,i=new s(t.elements,d(n.animation,{vertical:e.options.vertical,mirror:e.options.mirror,margin:t._margin(n.margin),from:e.getSlot(n._oldValue),to:e.getSlot(n.value)}));n.animation.transitions===!1&&(i.options.duration=0),i.setup(),i.play()},render:function(){var t,e=this,n=e.options,i=new D,o=e.scale,r=e.getElementOptions(),s=e.pointerShape(n.value);return n.animation.type=L,i=new P({stroke:r.stroke,fill:r.fill}).moveTo(s[0]).lineTo(s[1]).lineTo(s[2]).close(),t=o.getSlot(n.value),i.transform(S.transform().translate(t.x1,t.y1)),e.elements=i,i}}),dt=ht.extend({init:function(t,n){ht.fn.init.call(this,t,n),this.options.size===e&&(this.options.size=.3*this.scale.options.majorTicks.size)},pointerShape:function(t){var e,n,i,o=this,r=o.options,s=o.scale,a=s.options.vertical,l=s.options.mirror,c=l==a?-1:1,h=r.size*c,u=s.getSlot(s.options.min),d=s.getSlot(t),f=a?nt:et,p=a?et:nt,g=o._margin()*c,m=new A;return m[f]=u[f+"1"],m[p]=u[p+"1"],e=new A,e[f]=d[f+"1"],e[p]=d[p+"1"],a?(m.translate(g,0),e.translate(g,0)):(m.translate(0,g),e.translate(0,g)),n=e.clone(),i=m.clone(),a?(n.translate(h,0),i.translate(h,0)):(n.translate(0,h),i.translate(0,h)),[m,e,n,i]},repaint:function(){var t,e=this,n=e.scale,i=e.options,o=e.pointerShape(i.value),r=e.elements.children[0],s=e.pointerShape(i._oldValue);r.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close(),t=new a(r,d(i.animation,{reverse:n.options.reverse,vertical:n.options.vertical,oldPoints:[s[1],s[2]],newPoints:[o[1],o[2]]})),i.animation.transitions===!1&&(t.options.duration=0),t.setup(),t.play()},render:function(){var t=this,e=new D,n=t.getElementOptions(),i=new P({stroke:n.stroke,fill:n.fill});return e.append(i),t.elements=e,e}}),ft=T.Animation.extend({init:function(t,e){T.Animation.fn.init.call(this,t,e),e=this.options,e.duration=l.max(l.abs(e.newAngle-e.oldAngle)/e.duration*1e3,1)},options:{easing:K,duration:B},step:function(t){var e=this,n=e.options,i=b(n.oldAngle,n.newAngle,t);e.element.transform(S.transform().rotate(i,n.center))}});T.AnimationFactory.current.register(tt,ft),s=T.Animation.extend({options:{easing:K,duration:I},setup:function(){var t,e,n=this.options,i=n.margin,o=n.from,r=n.to,s=n.vertical?"x1":"y1";n.mirror==n.vertical?(o[s]-=i,r[s]-=i):(o[s]+=i,r[s]+=i),t=this.fromScale=new A(o.x1,o.y1),e=this.toScale=new A(r.x1,r.y1),0!==n.duration&&(n.duration=l.max(t.distanceTo(e)/n.duration*1e3,1))},step:function(t){var e=b(this.fromScale.x,this.toScale.x,t),n=b(this.fromScale.y,this.toScale.y,t);this.element.transform(S.transform().translate(e,n))}}),T.AnimationFactory.current.register(L,s),a=T.Animation.extend({options:{easing:K,speed:I},setup:function(){var t=this.options,e=t.newPoints,n=t.oldPoints,i=this.axis=t.vertical?nt:et,o=this.to=e[0][i],r=this.from=n[0][i];0!==t.duration&&(t.duration=l.max(l.abs(o-r)/t.speed*1e3,1)),this._set(r)},step:function(t){var e=b(this.from,this.to,t);this._set(e)},_set:function(t){var e="set"+this.axis.toUpperCase(),n=this.options.newPoints;n[0][e](t),n[1][e](t)}}),T.AnimationFactory.current.register(R,a),f.ui.plugin(at),f.ui.plugin(lt),f.ExportMixin.extend(st.fn),d(f,{Gauge:st,RadialPointer:ot,LinearPointer:ht,ArrowLinearPointer:ut,BarLinearPointer:dt,LinearScale:ct,RadialScale:rt,LinearGauge:lt,RadialGauge:at})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.barcode.min",["kendo.dataviz.core.min","kendo.drawing.min"],t)}(function(){return function(t,e){function n(t,e,n){return t.substring(e,e+n)}var i,o,r,s,a,l,c=window.kendo,h=c.ui.Widget,u=t.extend,d=c.deepExtend,f=t.inArray,p=t.isPlainObject,g=c.drawing,m=c.geometry,v=c.util,y=v.defined,_=c.dataviz,w=_.Box2D,x=_.TextBox,b=300,k=100,C=10,S=/^\d+$/,T=/^[a-z0-9]+$/i,A="Character '{0}' is not valid for symbology {1}",D=c.Class.extend({init:function(t){this.setOptions(t)},setOptions:function(t){var e=this;e.options=u({},e.options,t),e.quietZoneLength=e.options.addQuietZone?2*e.options.quietZoneLength:0},encode:function(t,e,n){var i=this;return y(t)&&(t+=""),i.initValue(t,e,n),i.options.addQuietZone&&i.addQuietZone(),i.addData(),i.options.addQuietZone&&i.addQuietZone(),{baseUnit:i.baseUnit,pattern:i.pattern}},options:{quietZoneLength:C,addQuietZone:!0,addCheckSum:!0},initValue:function(){},addQuietZone:function(){this.pattern.push(this.options.quietZoneLength||C)},addData:function(){},invalidCharacterError:function(t){throw Error(c.format(A,t,this.name))}}),P={},M=D.extend({minBaseUnitLength:.7,addData:function(){var t,e=this,n=e.value;for(e.addStart(),t=0;n.length>t;t++)e.addCharacter(n.charAt(t));e.options.addCheckSum&&e.pushCheckSum(),e.addStop(),e.prepareValues()},addCharacter:function(t){var e=this,n=e.characterMap[t];n||e.invalidCharacterError(t),e.addBase(n)},addBase:function(){}}),E={addCharacter:function(t){var e=this;e.characterMap[t]?e.addBase(e.characterMap[t]):t.charCodeAt(0)>127?e.invalidCharacterError(t):e.addExtended(t.charCodeAt(0))},addExtended:function(t){var n,i,o,r=this;for(i=0;r.extendedMappings.length>i;i++)if(n=r.extendedMappings[i].call(r,t)){for(o=0;n.length>o;o++)r.addBase(n[o]);return r.dataLength+=n.length-1,e}},extendedMappings:[function(t){if(t>=97&&122>=t){var e=this;return[e.characterMap[e.shiftCharacters[0]],e.characterMap[String.fromCharCode(t-32)]]}},function(t){if(t>=33&&58>=t){var e=this;return[e.characterMap[e.shiftCharacters[1]],e.characterMap[String.fromCharCode(t+32)]]}},function(t){if(t>=1&&26>=t){var e=this;return[e.characterMap[e.shiftCharacters[2]],e.characterMap[String.fromCharCode(t+64)]]}},function(t){var e,n,i,o=this;if(o.specialAsciiCodes[t])for(e=[],i=0;o.specialAsciiCodes[t].length>i;i++)e.push(o.characterMap[o.shiftCharacters[3]]),e.push(o.characterMap[o.specialAsciiCodes[t][i]]);else n=6*Math.floor(t/32)+(t-27)%32+64,e=[o.characterMap[o.shiftCharacters[3]],o.characterMap[String.fromCharCode(n)]];return e}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]};P.code39=M.extend({name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",initValue:function(t,e,n){var i=this;i.width=e,i.height=n,i.value=t,i.dataLength=t.length,i.pattern=[],i.patternString=""},prepareValues:function(){var t,e,n=this,i=n.minBaseUnitLength,o=n.maxRatio,r=n.minRatio,s=Math.max(.15*n.width,24);if(s>n.height)throw Error("Insufficient Height. The minimum height for value: "+n.value+" is: "+s);for(;(t=n.getBaseUnit(o))<i&&o>r;)o=parseFloat((o-.1).toFixed(1));if(i>t)throw e=Math.ceil(n.getBaseWidth(r)*i),Error("Insufficient width. The minimum width for value: "+n.value+" is: "+e);n.ratio=o,n.baseUnit=t,n.patternString=n.patternString.substring(0,n.patternString.length-1),n.pattern=n.pattern.concat(n.patternString.replace(/ratio/g,o).split(n.splitCharacter))},getBaseUnit:function(t){return this.width/this.getBaseWidth(t)},getBaseWidth:function(t){var e=this,n=3*(t+2);return e.quietZoneLength+n*(e.dataLength+2)+e.gapWidth*(e.dataLength+1)},addStart:function(){var t=this;t.addPattern(t.characterMap.START.pattern),t.addCharacterGap()},addBase:function(t){this.addPattern(t.pattern),this.addCharacterGap()},addStop:function(){this.addPattern(this.characterMap.START.pattern)},addPattern:function(t){for(var e=0;t.length>e;e++)this.patternString+=this.patternMappings[t.charAt(e)]},addCharacterGap:function(){var t=this;t.patternString+=t.gapWidth+t.splitCharacter},patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}},options:{addCheckSum:!1}}),P.code39extended=P.code39.extend(d({},E,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})),P.code93=M.extend({name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,initValue:function(t,e,n){var i=this;i.value=t,i.width=e,i.height=n,i.pattern=[],i.values=[],i.dataLength=t.length},prepareValues:function(){var t=this,e=Math.max(.15*t.width,24);if(e>t.height)throw Error("Insufficient Height");if(t.setBaseUnit(),t.minBaseUnitLength>t.baseUnit)throw Error("Insufficient Width")},setBaseUnit:function(){var t=this,e=2;t.baseUnit=t.width/(9*(t.dataLength+2+e)+t.quietZoneLength+1)},addStart:function(){var t=this.characterMap.START.pattern;this.addPattern(t)},addStop:function(){var t=this;t.addStart(),t.pattern.push(t.characterMap.TERMINATION_BAR)},addBase:function(t){this.addPattern(t.pattern),this.values.push(t.value)},pushCheckSum:function(){var t,e,n=this,i=n._getCheckValues();for(n.checksum=i.join(""),e=0;i.length>e;e++)t=n.characterMap[n._findCharacterByValue(i[e])],n.addPattern(t.pattern)},_getCheckValues:function(){var t,e,n,i=this,o=i.values,r=o.length,s=0;for(n=r-1;n>=0;n--)s+=i.weightedValue(o[n],r-n,i.cCheckSumTotal);for(t=s%i.checkSumMod,s=i.weightedValue(t,1,i.kCheckSumTotal),n=r-1;n>=0;n--)s+=i.weightedValue(o[n],r-n+1,i.kCheckSumTotal);
return e=s%i.checkSumMod,[t,e]},_findCharacterByValue:function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},weightedValue:function(t,e,n){return(e%n||n)*t},addPattern:function(t){var e,n;for(n=0;t.length>n;n++)e=parseInt(t.charAt(n),10),this.pattern.push(e)},characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}}),P.code93extended=P.code93.extend(d({},E,{name:"Code 93 extended",pushCheckSum:function(){var t,e,n=this,i=n._getCheckValues();for(n.checksum=i.join(""),e=0;i.length>e;e++)t=i[e],n.shiftValuesAsciiCodes[t]?n.addExtended(n.shiftValuesAsciiCodes[t]):n.addPattern(n.characterMap[n._findCharacterByValue(t)].pattern)}})),i=c.Class.extend({init:function(t){this.encoding=t},addStart:function(){},is:function(){},move:function(){},pushState:function(){}}),o=i.extend({FNC4:"FNC4",init:function(t,e){var n=this;n.encoding=t,n.states=e,n._initMoves(e)},addStart:function(){this.encoding.addPattern(this.START)},is:function(t,e){var n=t.charCodeAt(e);return this.isCode(n)},move:function(t){for(var e=this,n=0;!e._moves[n].call(e,t)&&e._moves.length>n;)n++},pushState:function(t){var e,n,i=this,o=i.states,r=t.value,s=r.length;for(f("C",o)>=0&&(n=r.substr(t.index).match(/\d{4,}/g),n&&(s=r.indexOf(n[0],t.index)));(e=t.value.charCodeAt(t.index))>=0&&i.isCode(e)&&s>t.index;)i.encoding.addPattern(i.getValue(e)),t.index++},_initMoves:function(t){var e=this;e._moves=[],f(e.FNC4,t)>=0&&e._moves.push(e._moveFNC),f(e.shiftKey,t)>=0&&e._moves.push(e._shiftState),e._moves.push(e._moveState)},_moveFNC:function(t){return t.fnc?(t.fnc=!1,t.previousState==this.key):e},_shiftState:function(t){var n=this;return t.previousState==n.shiftKey&&(t.index+1>=t.value.length||n.encoding[n.shiftKey].is(t.value,t.index+1))?(n.encoding.addPattern(n.SHIFT),t.shifted=!0,!0):e},_moveState:function(){return this.encoding.addPattern(this.MOVE),!0},SHIFT:98}),r={},r.A=o.extend({key:"A",shiftKey:"B",isCode:function(t){return t>=0&&96>t},getValue:function(t){return 32>t?t+64:t-32},MOVE:101,START:103}),r.B=o.extend({key:"B",shiftKey:"A",isCode:function(t){return t>=32&&128>t},getValue:function(t){return t-32},MOVE:100,START:104}),r.C=i.extend({key:"C",addStart:function(){this.encoding.addPattern(this.START)},is:function(t,e){var i=n(t,e,4);return(t.length>=e+4||2==t.length)&&S.test(i)},move:function(){this.encoding.addPattern(this.MOVE)},pushState:function(t){for(var e;(e=n(t.value,t.index,2))&&S.test(e)&&2==e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},getValue:function(t){return t},MOVE:99,START:105}),r.FNC4=i.extend({key:"FNC4",dependentStates:["A","B"],init:function(t,e){this.encoding=t,this._initSubStates(e)},addStart:function(t){var e=t.value.charCodeAt(0)-128,n=this._getSubState(e);this.encoding[n].addStart()},is:function(t,e){var n=t.charCodeAt(e);return this.isCode(n)},isCode:function(t){return t>=128&&256>t},pushState:function(t){var e,n=this,i=n._initSubState(t),o=n.encoding,r=i.value.length;if(t.index+=r,3>r)for(;r>i.index;i.index++)e=i.value.charCodeAt(i.index),i.state=n._getSubState(e),i.previousState!=i.state&&(i.previousState=i.state,o[i.state].move(i)),o.addPattern(o[i.state].MOVE),o.addPattern(o[i.state].getValue(e));else i.state!=i.previousState&&o[i.state].move(i),n._pushStart(i),o.pushData(i,n.subStates),t.value.length>t.index&&n._pushStart(i);t.fnc=!0,t.state=i.state},_pushStart:function(t){var e=this;e.encoding.addPattern(e.encoding[t.state].MOVE),e.encoding.addPattern(e.encoding[t.state].MOVE)},_initSubState:function(t){var e=this,n={value:e._getAll(t.value,t.index),index:0};return n.state=e._getSubState(n.value.charCodeAt(0)),n.previousState=t.previousState==e.key?n.state:t.previousState,n},_initSubStates:function(t){var e,n=this;for(n.subStates=[],e=0;t.length>e;e++)f(t[e],n.dependentStates)>=0&&n.subStates.push(t[e])},_getSubState:function(t){var e,n=this;for(e=0;n.subStates.length>e;e++)if(n.encoding[n.subStates[e]].isCode(t))return n.subStates[e]},_getAll:function(t,e){for(var n,i="";(n=t.charCodeAt(e++))&&this.isCode(n);)i+=String.fromCharCode(n-128);return i}}),r.FNC1=i.extend({key:"FNC1",startState:"C",dependentStates:["C","B"],startAI:"(",endAI:")",init:function(t,e){this.encoding=t,this.states=e},addStart:function(){this.encoding[this.startState].addStart()},is:function(){return f(this.key,this.states)>=0},pushState:function(t){var e,n,i,o=this,r=o.encoding,s=t.value.replace(/\s/g,""),a=RegExp("["+o.startAI+o.endAI+"]","g"),l=t.index,c={state:o.startState};for(r.addPattern(o.START);;){if(c.index=0,i=s.charAt(l)===o.startAI?2:0,e=i>0?o.getBySeparator(s,l):o.getByLength(s,l),e.ai.length)n=l+i+e.id.length+e.ai.length;else if(n=s.indexOf(o.startAI,l+1),0>n){if(s.length>l+e.ai.max+e.id.length+i)throw Error("Separators are required after variable length identifiers");n=s.length}if(c.value=s.substring(l,n).replace(a,""),o.validate(e,c.value),r.pushData(c,o.dependentStates),n>=s.length)break;l=n,c.state!=o.startState&&(r[o.startState].move(c),c.state=o.startState),e.ai.length||r.addPattern(o.START)}t.index=t.value.length},validate:function(t,e){var n=e.substr(t.id.length),i=t.ai;if(!i.type&&!S.test(n))throw Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"==i.type&&!T.test(n))throw Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==n.length)throw Error("Application identifier "+t.id+" must be "+i.length+" characters long.");if(i.min&&i.min>n.length)throw Error("Application identifier "+t.id+" must be at least "+i.min+" characters long.");if(i.max&&n.length>i.max)throw Error("Application identifier "+t.id+" must be at most "+i.max+" characters long.")},getByLength:function(t,e){var i,o,r,s=this;for(r=2;4>=r;r++)if(i=n(t,e,r),o=s.getAI(i)||s.getAI(i.substring(0,i.length-1)))return{id:i,ai:o};s.unsupportedAIError(i)},unsupportedAIError:function(t){throw Error(c.format("'{0}' is not a supported Application Identifier"),t)},getBySeparator:function(t,e){var n=this,i=t.indexOf(n.startAI,e),o=t.indexOf(n.endAI,i),r=t.substring(i+1,o),s=n.getAI(r)||n.getAI(r.substr(r.length-1));return s||n.unsupportedAIError(r),{ai:s,id:r}},getAI:function(t){var e,n,i,o=this.applicationIdentifiers,r=o.multiKey;if(o[t])return o[t];for(e=0;r.length>e;e++){if(r[e].ids&&f(t,r[e].ids)>=0)return r[e].type;if(r[e].ranges)for(n=r[e].ranges,i=0;n.length>i;i++)if(t>=n[i][0]&&n[i][1]>=t)return r[e].type}},applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102}),s=D.extend({init:function(t){D.fn.init.call(this,t),this._initStates()},_initStates:function(){var t,e=this;for(t=0;e.states.length>t;t++)e[e.states[t]]=new r[e.states[t]](e,e.states)},initValue:function(t,e,n){var i=this;i.pattern=[],i.value=t,i.width=e,i.height=n,i.checkSum=0,i.totalUnits=0,i.index=0,i.position=1},addData:function(){var t=this,e={value:t.value,index:0,state:""};0!==t.value.length&&(e.state=e.previousState=t.getNextState(e,t.states),t.addStart(e),t.pushData(e,t.states),t.addCheckSum(),t.addStop(),t.setBaseUnit())},pushData:function(t,e){for(var n,i=this;;){if(i[t.state].pushState(t),t.index>=t.value.length)break;t.shifted?(n=t.state,t.state=t.previousState,t.previousState=n,t.shifted=!1):(t.previousState=t.state,t.state=i.getNextState(t,e),i[t.state].move(t))}},addStart:function(t){this[t.state].addStart(t),this.position=1},addCheckSum:function(){var t=this;t.checksum=t.checkSum%103,t.addPattern(t.checksum)},addStop:function(){this.addPattern(this.STOP)},setBaseUnit:function(){var t=this;t.baseUnit=t.width/(t.totalUnits+t.quietZoneLength)},addPattern:function(t){var e,n,i=this,o=""+i.characterMap[t];for(n=0;o.length>n;n++)e=parseInt(o.charAt(n),10),i.pattern.push(e),i.totalUnits+=e;i.checkSum+=t*i.position++},getNextState:function(t,e){for(var n=0;e.length>n;n++)if(this[e[n]].is(t.value,t.index))return e[n];this.invalidCharacterError(t.value.charAt(t.index))},characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106}),P.code128a=s.extend({name:"Code 128 A",states:["A"]}),P.code128b=s.extend({name:"Code 128 B",states:["B"]}),P.code128c=s.extend({name:"Code 128 C",states:["C"]}),P.code128=s.extend({name:"Code 128",states:["C","B","A","FNC4"]}),P["gs1-128"]=s.extend({name:"Code GS1-128",states:["FNC1","C","B"]}),a=D.extend({initValue:function(t,e){var n=this;n.pattern=[],n.value=t,n.checkSumLength=0,n.width=e},setBaseUnit:function(){var t=this,e=7;t.baseUnit=t.width/(12*(t.value.length+t.checkSumLength)+t.quietZoneLength+e)},addData:function(){var t,e=this,n=e.value;for(e.addPattern(e.START),t=0;n.length>t;t++)e.addCharacter(n.charAt(t));e.options.addCheckSum&&e.addCheckSum(),e.addPattern(e.STOP),e.setBaseUnit()},addCharacter:function(t){var e=this,n=e.characterMap[t];n||e.invalidCharacterError(t),e.addPattern(n)},addPattern:function(t){for(var e=0;t.length>e;e++)this.pattern.push(parseInt(t.charAt(e),10))},addCheckSum:function(){var t,e=this,n=e.checkSums[e.checkSumType],i=n.call(e.checkSums,e.value);for(e.checksum=i.join(""),t=0;i.length>t;t++)e.checkSumLength++,e.addPattern(e.characterMap[i[t]])},checkSums:{Modulo10:function(t){var e,n,i,o=[0,""],r=t.length%2;for(e=0;t.length>e;e++)o[(e+r)%2]+=parseInt(t.charAt(e),10);for(i=o[0],n=""+2*o[1],e=0;n.length>e;e++)i+=parseInt(n.charAt(e),10);return[(10-i%10)%10]},Modulo11:function(t){var e,n,i,o=0,r=11,s=t.length;for(i=0;s>i;i++)e=((s-i)%6||6)+1,o+=e*t.charAt(i);return n=(r-o%r)%r,10!=n?[n]:[1,0]},Modulo11Modulo10:function(t){var e,n=this.Modulo11(t);return e=t+n[0],n.concat(this.Modulo10(e))},Modulo10Modulo10:function(t){var e,n=this.Modulo10(t);return e=t+n[0],n.concat(this.Modulo10(e))}},characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:""}),P.msimod10=a.extend({name:"MSI Modulo10",checkSumType:"Modulo10"}),P.msimod11=a.extend({name:"MSI Modulo11",checkSumType:"Modulo11"}),P.msimod1110=a.extend({name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"}),P.msimod1010=a.extend({name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"}),P.code11=D.extend({name:"Code 11",cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221",initValue:function(t,e){var n=this;n.pattern=[],n.value=t,n.width=e,n.totalUnits=0},addData:function(){var t,e=this,n=e.value;for(e.addPattern(e.START),t=0;n.length>t;t++)e.addCharacter(n.charAt(t));e.options.addCheckSum&&e.addCheckSum(),e.addPattern(e.STOP),e.setBaseUnit()},setBaseUnit:function(){var t=this;t.baseUnit=t.width/(t.totalUnits+t.quietZoneLength)},addCheckSum:function(){var t,e=this,n=e.value,i=n.length,o=e.getWeightedSum(n,i,e.cCheckSumTotal)%e.checkSumMod;e.checksum=o+"",e.addPattern(e.characterMap[o]),i++,i>=e.kCheckSumMinLength&&(t=(o+e.getWeightedSum(n,i,e.kCheckSumTotal))%e.checkSumMod,e.checksum+=t,e.addPattern(e.characterMap[t]))},getWeightedSum:function(t,e,n){var i,o=0;for(i=0;t.length>i;i++)o+=this.weightedValue(this.getValue(t.charAt(i)),e,i,n);return o},weightedValue:function(t,e,n,i){var o=(e-n)%i||i;return o*t},getValue:function(t){var e=this;return isNaN(t)?(t!==e.DASH&&e.invalidCharacterError(t),e.DASH_VALUE):parseInt(t,10)},addCharacter:function(t){var e=this,n=e.getValue(t),i=e.characterMap[n];e.addPattern(i)},addPattern:function(t){var e,n;for(n=0;t.length>n;n++)e=parseInt(t.charAt(n),10),this.pattern.push(e),this.totalUnits+=e},characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],options:{addCheckSum:!0}}),P.postnet=D.extend({name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",initValue:function(t,e,n){var i=this;i.height=n,i.width=e,i.baseHeight=n/2,i.value=t.replace(RegExp(i.DIGIT_SEPARATOR,"g"),""),i.pattern=[],i.validate(i.value),i.checkSum=0,i.setBaseUnit()},addData:function(){var t,e=this,n=e.value;for(e.addPattern(e.START),t=0;n.length>t;t++)e.addCharacter(n.charAt(t));e.options.addCheckSum&&e.addCheckSum(),e.addPattern(e.START),e.pattern.pop()},addCharacter:function(t){var e=this,n=e.characterMap[t];e.checkSum+=parseInt(t,10),e.addPattern(n)},addCheckSum:function(){var t=this;t.checksum=(10-t.checkSum%10)%10,t.addCharacter(t.checksum)},setBaseUnit:function(){var t=this,e=3;t.baseUnit=t.width/(10*(t.value.length+1)+e+t.quietZoneLength)},validate:function(t){var e=this;if(S.test(t)||e.invalidCharacterError(t.match(/[^0-9]/)[0]),f(t.length,e.VALID_CODE_LENGTHS)<0)throw Error("Invalid value length. Valid lengths for the Postnet symbology are "+e.VALID_CODE_LENGTHS.join(","))},addPattern:function(t){var e,n,i=this;for(n=0;t.length>n;n++)e=i.height-i.baseHeight*t.charAt(n),i.pattern.push({width:1,y1:e,y2:i.height}),i.pattern.push(1)},characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]}),P.ean13=D.extend({initValue:function(t,e,n){if(t+="",12!=t.length||/\D/.test(t))throw Error('The value of the "EAN13" encoding should be 12 symbols');var i=this;i.pattern=[],i.options.height=n,i.baseUnit=e/(95+i.quietZoneLength),i.value=t,i.checksum=i.calculateChecksum(),i.leftKey=t[0],i.leftPart=t.substr(1,6),i.rightPart=t.substr(7)+i.checksum},addData:function(){var t=this;t.addPieces(t.characterMap.start),t.addSide(t.leftPart,t.leftKey),t.addPieces(t.characterMap.middle),t.addSide(t.rightPart),t.addPieces(t.characterMap.start)},addSide:function(t,e){var n,i=this;for(n=0;t.length>n;n++)e&&parseInt(i.keyTable[e].charAt(n),10)?i.addPieces(Array.prototype.slice.call(i.characterMap.digits[t.charAt(n)]).reverse(),!0):i.addPieces(i.characterMap.digits[t.charAt(n)],!0)},addPieces:function(t,e){var n,i=this;for(n=0;t.length>n;n++)i.pattern.push(e?{y1:0,y2:.95*i.options.height,width:t[n]}:t[n])},calculateChecksum:function(){var t,e,n=0,i=0,o=this.value.split("").reverse().join("");for(t=0;o.length>t;t++)t%2?i+=parseInt(o.charAt(t),10):n+=parseInt(o.charAt(t),10);return e=(10-(3*n+i)%10)%10},keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}}),P.ean8=P.ean13.extend({initValue:function(t,e,n){var i=this;if(7!=t.length||/\D/.test(t))throw Error("Invalid value provided");i.value=t,i.options.height=n,i.checksum=i.calculateChecksum(i.value),i.leftPart=i.value.substr(0,4),i.rightPart=i.value.substr(4)+i.checksum,i.pattern=[],i.baseUnit=e/(67+i.quietZoneLength)}}),l=h.extend({init:function(e,n){var i=this;h.fn.init.call(i,e,n),i.element=t(e),i.wrapper=i.element,i.element.addClass("k-barcode").css("display","block"),i.surfaceWrap=t("<div />").css("position","relative").appendTo(this.element),i.surface=g.Surface.create(i.surfaceWrap,{type:i.options.renderAs}),i.setOptions(n)},setOptions:function(t){var e=this;if(e.type=(t.type||e.options.type).toLowerCase(),"upca"==e.type&&(e.type="ean13",t.value="0"+t.value),"upce"==e.type&&(e.type="ean8",t.value="0"+t.value),!P[e.type])throw Error("Encoding "+e.type+"is not supported.");e.encoding=new P[e.type],e.options=u(!0,e.options,t),y(t.value)&&e.redraw()},redraw:function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},getSize:function(){return c.dimensions(this.element)},_resize:function(){this.redraw()},createVisual:function(){this.visual=this._render()},_render:function(){var t,e,n,i=this,o=i.options,r=o.value,s=o.text,a=_.getSpacing(s.margin),l=i._getSize(),c=o.border||{},h=i.encoding,u=w(0,0,l.width,l.height).unpad(c.width).unpad(o.padding),d=u.height(),f=new g.Group;return i.contentBox=u,f.append(i._getBackground(l)),s.visible&&(n=g.util.measureText(r,{font:s.font}).height,d-=n+a.top+a.bottom),t=h.encode(r,u.width(),d),s.visible&&(e=r,o.checksum&&y(h.checksum)&&(e+=" "+h.checksum),f.append(i._getText(e))),i.barHeight=d,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),f.append(this._bandsGroup),f},exportVisual:function(){return this._render()},_getSize:function(){var t=this,e=t.element,n=new m.Size(b,k);return e.width()>0&&(n.width=e.width()),e.height()>0&&(n.height=e.height()),t.options.width&&(n.width=t.options.width),t.options.height&&(n.height=t.options.height),n},value:function(t){var n=this;return y(t)?(n.options.value=t+"",n.redraw(),e):n.options.value},_getBands:function(t,e){var n,i,o,r,s,a=this,l=a.contentBox,c=l.x1,h=new g.Group;for(o=0;t.length>o;o++)i=p(t[o])?t[o]:{width:t[o],y1:0,y2:a.barHeight},n=i.width*e,o%2&&(r=m.Rect.fromPoints(new m.Point(c,i.y1+l.y1),new m.Point(c+n,i.y2+l.y1)),s=g.Path.fromRect(r,{fill:{color:a.options.color},stroke:null}),h.append(s)),c+=n;return h},_getBackground:function(t){var e=this,n=e.options,i=n.border||{},o=w(0,0,t.width,t.height).unpad(i.width/2),r=g.Path.fromRect(o.toRect(),{fill:{color:n.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}});return r},_getText:function(t){var e=this,n=e.options.text,i=e._textbox=new x(t,{font:n.font,color:n.color,align:"center",vAlign:"bottom",margin:n.margin});return i.reflow(e.contentBox),i.renderVisual(),i.visual},options:{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}}}),_.ExportMixin.extend(l.fn),_.ui.plugin(l),c.deepExtend(_,{encodings:P,Encoding:D})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.qrcode.min",["kendo.dataviz.core.min","kendo.drawing.min"],t)}(function(){return function(t,e){function n(t){return parseInt(t,2)}function i(t,e){var n=(+t).toString(2);return e>n.length&&(n=Array(e-n.length+1).join(0)+n),n}function o(t,e){for(var n=[],i=0;t.length>i;)n.push(t.substring(i,i+e)),i+=e;return n}function r(t,e,n,i){for(var o=0;t.length>o;o++)t[o][n][i]=e}function s(t,e,n,i){for(var o=0;vt.length>o;o++)t[o][n][i]=vt[o](n,i)?1^e:parseInt(e,10)}function a(){var t,e;for(e=1;255>e;e++)t=2*rt[e-1],t>255&&(t=285^t),rt[e]=t,ot[t]=e;t=2*rt[e-1]^285,rt[e]=t,rt[-1]=0}function l(){var t,e,n,i=68;for(t=2;i>=t;t++)e=st[t-1],n=[t,0],st[t]=w(e,n)}function c(t,n){var i=[],o=t.length-1;do i[o]=rt[(t[o]+n)%255],o--;while(t[o]!==e);return i}function h(t,e){return parseInt(t.charAt(e),10)}function u(t,e,n,i,o){e[t][i]=(e[t][i]<<1^o)%128,e[t][i]==mt&&(n[t]+=40)}function d(t,e,n,i,o,r){n[t][r]==i?o[t][r]++:(n[t][r]=i,o[t][r]>=5&&(e[t]+=3+o[t][r]-5),o[t][r]=1)}function f(t,e){var n=Math.floor(t/e*100),i=n%5,o=Math.abs(n-i-50),r=Math.abs(n+5-i-50),s=10*Math.min(o/5,r/5);return s}var p,g,m,v,y,_,w,x,b,k,C,S,T,A,D,P,M,E,B,I,z,L,R,O,F,V,N,H,U,j,G,W,q,$,Y=window.kendo,X=t.extend,Q=Y.drawing,K=Y.dataviz,Z=Y.ui.Widget,J=K.Box2D,tt="0000",et="numeric",nt="alphanumeric",it="byte",ot={1:0},rt={0:1},st=[[1,0],[1,25,0]],at={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},lt=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30
},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}],ct=[1,0,1,1,1],ht=[1,0,1],ut={L:"01",M:"00",Q:"11",H:"10"},dt="101010000010010",ft="10100110111",pt="1111100100101",gt=["11101100","00010001"],mt=93,vt=[function(t,e){return(t+e)%2===0},function(t){return t%2===0},function(t,e){return e%3===0},function(t,e){return(t+e)%3===0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2===0},function(t,e){return t*e%2+t*e%3===0},function(t,e){return(t*e%2+t*e%3)%2===0},function(t,e){return((t+e)%2+t*e%3)%2===0}],yt=/^\d+/,_t="A-Z0-9 $%*+./:-",wt="A-Z $%*+./:-",xt=RegExp("^["+wt+"]+"),bt=RegExp("^["+_t+"]+"),kt=RegExp("^[^"+_t+"]+"),Ct=8,St=5,Tt=8,At=17,Dt=9,Pt=16,Mt=Math.round,Et=Y.Class.extend({getVersionIndex:function(t){return 10>t?0:t>26?2:1},getBitsCharacterCount:function(t){var e=this;return e.bitsInCharacterCount[e.getVersionIndex(t||40)]},getModeCountString:function(t,e){var n=this;return n.modeIndicator+i(t,n.getBitsCharacterCount(e))},encode:function(){},getStringBitsLength:function(){},getValue:function(){},modeIndicator:"",bitsInCharacterCount:[]}),Bt={};Bt[et]=Et.extend({bitsInCharacterCount:[10,12,14],modeIndicator:"0001",getValue:function(t){return parseInt(t,10)},encode:function(t,e){var n,r=this,s=o(t,3),a=r.getModeCountString(t.length,e);for(n=0;s.length-1>n;n++)a+=i(s[n],10);return a+i(s[n],1+3*s[n].length)},getStringBitsLength:function(t,e){var n=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*n+(0===n?0:1)}}),Bt[nt]=Et.extend({characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010",getValue:function(t){return this.characters[t]},encode:function(t,e){var n,r,s=this,a=o(t,2),l=s.getModeCountString(t.length,e);for(r=0;a.length-1>r;r++)n=45*s.getValue(a[r].charAt(0))+s.getValue(a[r].charAt(1)),l+=i(n,11);return n=2==a[r].length?45*s.getValue(a[r].charAt(0))+s.getValue(a[r].charAt(1)):s.getValue(a[r].charAt(0)),l+i(n,1+5*a[r].length)},getStringBitsLength:function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+6*(t%2)}}),Bt[it]=Et.extend({bitsInCharacterCount:[8,16,16],modeIndicator:"0100",getValue:function(t){var e=t.charCodeAt(0);if(127>=e||e>=160&&255>=e)return e;throw Error("Unsupported character: "+t)},encode:function(t,e){var n,o=this,r=o.getModeCountString(t.length,e);for(n=0;t.length>n;n++)r+=i(o.getValue(t.charAt(n)),8);return r},getStringBitsLength:function(t,e){return 4+this.getBitsCharacterCount(e)+8*t}}),p={};for(g in Bt)p[g]=new Bt[g];m=function(t){var n=this,i=t.length-1,o=t.length-1,r=o,s=-1,a=0;n.move=function(){i+=s*a,a^=1,o=r-a},n.getNextCell=function(){for(;t[i][o]!==e;)n.move(),(0>i||i>=t.length)&&(s=-s,r-=8!=r?2:3,o=r,i=0>s?t.length-1:0);return{row:i,column:o}},n.getNextRemainderCell=function(){return n.move(),t[i][o]===e?{row:i,column:o}:e}},v=function(t,e){var n,i,o,r,a,l,c=new m(t[0]);for(r=0;e.length>r;r++)for(n=e[r],i=0;n.length>0;){for(a=0;n.length>a;a++)for(l=0;8>l;l++)o=c.getNextCell(),s(t,n[a][i].charAt(l),o.row,o.column);for(i++;n[0]&&i==n[0].length;)n.splice(0,1)}for(;o=c.getNextRemainderCell();)s(t,0,o.row,o.column)},y=function(t,e){for(var n=8*e,i=0,o=0;n>t.length&&tt.length>i;)t+=tt.charAt(i++);for(t.length%8!==0&&(t+=Array(9-t.length%8).join("0"));n>t.length;)t+=gt[o],o^=1;return t},_=function(t,e){var n,i=[],o=t.length-2;for(n=o;n>=0;n--)i[n]=t[n]^e[n];return i},w=function(t,n){var i,o,r=[];for(i=0;t.length>i;i++)for(o=0;n.length>o;o++)r[i+o]=r[i+o]===e?(t[i]+(n[o]>=0?n[o]:0))%255:ot[rt[r[i+o]]^rt[(t[i]+n[o])%255]];return r},a(),l(),x=function(t,e){var n,o,r=st[e-1],s=Array(e).concat(t),a=Array(s.length-r.length).concat(r),l=t.length,h=[];for(o=0;l>o;o++)n=c(a,ot[s[s.length-1]]),a.splice(0,1),s=_(n,s);for(o=s.length-1;o>=0;o--)h[e-1-o]=i(s[o],8);return h},b=function(t,e){var i,o,r,s,a,l,c,h,u=0,d=[],f=[],p=e.groups;for(l=0;p.length>l;l++)for(r=p[l][0],c=0;r>c;c++){for(o=p[l][1],i=[],s=[],h=1;o>=h;h++)a=t.substring(u,u+8),i.push(a),s[o-h]=n(a),u+=8;d.push(i),f.push(x(s,e.errorCodewordsPerBlock))}return[d,f]},k=function(t,e,n,i,o){var r,s,a=yt.exec(t),l=a?a[0]:"",c=xt.exec(t),h=c?c[0]:"",u=bt.exec(t),d=u?u[0]:"";return l&&(l.length>=e||t.length==l.length||l.length>=n&&!bt.test(t.charAt(l.length)))?(r=et,s=l):d&&(t.length==d.length||d.length>=i||o==nt)?(r=nt,s=l||h):(r=it,s=d?d+kt.exec(t.substring(d.length))[0]:kt.exec(t)[0]),{mode:r,modeString:s}},C=function(t){var e,n,i=[],o=0;for(i.push(k(t,Ct,St,Tt,e)),e=i[0].mode,t=t.substr(i[0].modeString.length);t.length>0;)n=k(t,At,Dt,Pt,e),n.mode!=e?(e=n.mode,i.push(n),o++):i[o].modeString+=n.modeString,t=t.substr(n.modeString.length);return i},S=function(t){var e,n,i=0;for(n=0;t.length>n;n++)e=p[t[n].mode],i+=e.getStringBitsLength(t[n].modeString.length);return Math.ceil(i/8)},T=function(t,e){var n=0,i=lt.length-1,o=Math.floor(lt.length/2);do lt[o][e].totalDataCodewords>t?i=o:n=o,o=n+Math.floor((i-n)/2);while(i-n>1);return lt[n][e].totalDataCodewords>=t?o+1:i+1},A=function(t,e){var n,i,o="";for(i=0;t.length>i;i++)n=p[t[i].mode],o+=n.encode(t[i].modeString,e);return o},D=function(t){var e,i,o=n(t),r="";if(0===o)return"101010000010010";for(e=P(n(t),ft,15),i=0;e.length>i;i++)r+=e.charAt(i)^dt.charAt(i);return r},P=function(t,e,o){var r=n(e),s=e.length-1,a=t<<s,l=o-s,c=i(t,l),h=M(a,r);return h=c+i(h,s)},M=function(t,e){var n=e.toString(2).length,i=t.toString(2).length;do t^=e<<i-n,i=t.toString(2).length;while(i>=n);return t},E=function(t){var e,n,i=[],o=17+4*t;for(e=0;vt.length>e;e++)for(i[e]=Array(o),n=0;o>n;n++)i[e][n]=Array(o);return i},B=function(t,e){var n,i,o=t[0],s=0,a=e.length;for(n=0,i=8;8>=n;n++)6!==n&&r(t,h(e,a-1-s++),n,i);for(n=8,i=7;i>=0;i--)6!==i&&r(t,h(e,a-1-s++),n,i);for(s=0,i=o.length-1,n=8;i>=o.length-8;i--)r(t,h(e,a-1-s++),n,i);for(r(t,1,o.length-8,8),n=o.length-7,i=8;o.length>n;n++)r(t,h(e,a-1-s++),n,i)},I=function(t){return P(t,pt,18)},z=function(t,e){var n,i,o,s,a=t[0],l=a.length,c=0,u=l-11,d=l-11,f=0;for(s=0;e.length>s;s++)n=Math.floor(s/3),i=s%3,o=h(e,e.length-s-1),r(t,o,c+n,u+i),r(t,o,d+i,f+n)},L=function(t,e,n,i){var o,s,a,l=e.length+2,c=e.length+1;for(s=0;e.length>s;s++)for(a=s;l-s>a;a++)o=e[s],r(t,o,n+a,i+s),r(t,o,n+s,i+a),r(t,o,n+c-a,i+c-s),r(t,o,n+c-s,i+c-a)},R=function(t,e,n,i){var o=n,s=i,a=t[0];do r(t,0,o,i),r(t,0,n,s),o+=e[0],s+=e[1];while(o>=0&&a.length>o)},O=function(t){var e=t[0].length;L(t,ct,0,0),R(t,[-1,-1],7,7),L(t,ct,e-7,0),R(t,[1,-1],e-8,7),L(t,ct,0,e-7),R(t,[-1,1],7,e-8)},F=function(t,n){var i,o,r,s,a,l,c,h,u;if(!(2>n)){for(i=t[0],o=i.length,r=Math.floor(n/7),s=[6],c=0,(a=at[n])?l=(o-13-a)/r:a=l=(o-13)/(r+1),s.push(s[c++]+a);o>s[c]+l;)s.push(s[c++]+l);for(h=0;s.length>h;h++)for(u=0;s.length>u;u++)i[s[h]][s[u]]===e&&L(t,ht,s[h]-2,s[u]-2)}},V=function(t){var e,n=6,i=6,o=1,s=t[0].length;for(e=8;s-8>e;e++)r(t,o,n,e),r(t,o,e,i),o^=1},N=function(t){var e,n,i,o,r,s,a,l=[],c=[],h=[],p=[],g=[],m=0,v=1,y=t[0].length;for(n=0;t.length>n;n++)l[n]=0,h[n]=0,g[n]=[0,0],p[n]=[0,0],c[n]=[];for(n=0;y>n;n++)for(i=0;y>i;i++)for(o=0;t.length>o;o++)e=t[o],h[o]+=parseInt(e[n][i],10),c[o][m]===e[n][i]&&y>n+1&&i-1>=0&&e[n+1][i]==c[o][m]&&e[n+1][i-1]==c[o][m]&&(l[o]+=3),u(o,p,l,m,e[n][i]),u(o,p,l,v,e[i][n]),d(o,l,c,e[n][i],g,m),d(o,l,c,e[i][n],g,v);for(r=y*y,a=Number.MAX_VALUE,n=0;l.length>n;n++)l[n]+=f(h[n],r),a>l[n]&&(a=l[n],s=n);return s},H=function(t,e){this.dataString=t,this.version=e},U=function(){this.getEncodingResult=function(t,e){var n=C(t),i=S(n),o=T(i,e),r=A(n,o);return new H(r,o)}},j=function(){this.mode=p[this.encodingMode]},j.fn=j.prototype={encodingMode:it,utfBOM:"111011111011101110111111",initialModeCountStringLength:20,getEncodingResult:function(t,e){var n=this,i=n.encode(t),o=n.getDataCodewordsCount(i),r=T(o,e),s=n.mode.getModeCountString(i.length/8,r)+i;return new H(s,r)},getDataCodewordsCount:function(t){var e=this,n=t.length,i=Math.ceil((e.initialModeCountStringLength+n)/8);return i},encode:function(t){var e,n=this,i=n.utfBOM;for(e=0;t.length>e;e++)i+=n.encodeCharacter(t.charCodeAt(e));return i},encodeCharacter:function(t){var e,n,o=this.getBytesCount(t),r=o-1,s="";if(1==o)s=i(t,8);else{for(e=8-o,n=0;r>n;n++)s=i(t>>6*n&63|128,8)+s;s=(t>>6*r|255>>e<<e).toString(2)+s}return s},getBytesCount:function(t){var e,n=this.ranges;for(e=0;n.length>e;e++)if(n[e]>t)return e+1},ranges:[128,2048,65536,2097152,67108864]},G=function(t){return t&&t.toLowerCase().indexOf("utf_8")>=0?new j:new U},W=function(t,e,n){var o,r,s,a=new G(n),l=a.getEncodingResult(t,e),c=l.version,h=lt[c-1][e],u=y(l.dataString,h.totalDataCodewords),d=b(u,h),f=E(c);return O(f),F(f,c),V(f),c>=7&&z(f,i(0,18)),B(f,i(0,15)),v(f,d),o=N(f),r=f[o],c>=7&&z([r],I(c)),s=ut[e]+i(o,3),B([r],D(s)),r},q={DEFAULT_SIZE:200,QUIET_ZONE_LENGTH:4,DEFAULT_ERROR_CORRECTION_LEVEL:"L",DEFAULT_BACKGROUND:"#fff",DEFAULT_DARK_MODULE_COLOR:"#000",MIN_BASE_UNIT_SIZE:1},$=Z.extend({init:function(e,n){var i=this;Z.fn.init.call(i,e,n),i.element=t(e),i.wrapper=i.element,i.element.addClass("k-qrcode"),i.surfaceWrap=t("<div />").css("position","relative").appendTo(this.element),i.surface=Q.Surface.create(i.surfaceWrap,{type:i.options.renderAs}),i.setOptions(n)},redraw:function(){var t=this._getSize();this.surfaceWrap.css({width:t,height:t}),this.surface.clear(),this.createVisual(),this.surface.draw(this.visual)},getSize:function(){return Y.dimensions(this.element)},_resize:function(){this.redraw()},createVisual:function(){this.visual=this._render()},exportVisual:function(){return this._render()},_render:function(){var t,e,n,i,o,r,s,a=this,l=a._value,c=a.options.border||{},h=a.options.padding||0,u=c.width||0;return c.width=u,s=new Q.Group,l&&(n=W(l,a.options.errorCorrection,a.options.encoding),i=a._getSize(),r=i-2*(u+h),t=a._calculateBaseUnit(r,n.length),o=n.length*t,e=u+h+(r-o)/2,s.append(a._renderBackground(i,c)),s.append(a._renderMatrix(n,t,e))),s},_getSize:function(){var t,e,n,i=this;return i.options.size?t=parseInt(i.options.size,10):(e=i.element,n=Math.min(e.width(),e.height()),t=n>0?n:q.DEFAULT_SIZE),t},_calculateBaseUnit:function(t,e){var n=Math.floor(t/e);if(q.MIN_BASE_UNIT_SIZE>n)throw Error("Insufficient size.");return n*e>=t&&n-1>=q.MIN_BASE_UNIT_SIZE&&n--,n},_renderMatrix:function(t,e,n){var i,o,r,s,a,l,c,h,u=new Q.MultiPath({fill:{color:this.options.color},stroke:null});for(i=0;t.length>i;i++)for(o=n+i*e,r=0;t.length>r;){for(;0===t[i][r]&&t.length>r;)r++;if(t.length>r){for(s=r;1==t[i][r];)r++;a=Mt(n+s*e),l=Mt(o),c=Mt(n+r*e),h=Mt(o+e),u.moveTo(a,l).lineTo(a,h).lineTo(c,h).lineTo(c,l).close()}}return u},_renderBackground:function(t,e){var n=J(0,0,t,t).unpad(e.width/2);return Q.Path.fromRect(n.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},setOptions:function(t){var n=this;t=t||{},n.options=X(n.options,t),t.value!==e&&(n._value=n.options.value+""),n.redraw()},value:function(t){var n=this;return t===e?n._value:(n._value=t+"",n.redraw(),e)},options:{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:q.DEFAULT_ERROR_CORRECTION_LEVEL,background:q.DEFAULT_BACKGROUND,color:q.DEFAULT_DARK_MODULE_COLOR,size:"",padding:0,border:{color:"",width:0}}}),K.ExportMixin.extend($.fn),K.ui.plugin($),Y.deepExtend(K,{QRCode:$,QRCodeDefaults:q,QRCodeFunctions:{FreeCellVisitor:m,fillData:v,padDataString:y,generateErrorCodewords:x,xorPolynomials:_,getBlocks:b,multiplyPolynomials:w,chooseMode:k,getModes:C,getDataCodewordsCount:S,getVersion:T,getDataString:A,encodeFormatInformation:D,encodeBCH:P,dividePolynomials:M,initMatrices:E,addFormatInformation:B,encodeVersionInformation:I,addVersionInformation:z,addCentricPattern:L,addFinderSeparator:R,addFinderPatterns:O,addAlignmentPatterns:F,addTimingFunctions:V,scoreMaskMatrixes:N,encodeData:W,UTF8Encoder:j},QRCodeFields:{modes:p,powersOfTwo:ot,powersOfTwoResult:rt,generatorPolynomials:st}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.stock.min",["kendo.dataviz.chart.min"],t)}(function(){return function(t,e){function n(){}function i(t){return n.prototype=t,new n}var o,r=window.kendo,s=r.Class,a=r.Observable,l=r.deepExtend,c=Math,h=t.proxy,u=r.util,d=u.last,f=u.renderTemplate,p=r.dataviz,g=u.defined,m=p.filterSeriesByType,v=r.template,y=p.ui.Chart,_=p.Selection,w=p.addDuration,x=u.limitValue,b=p.lteDateIndex,k=p.toDate,C=p.toTime,S=28,T="change",A="k-",D="drag",P="dragEnd",M="_navigator",E=M,B=p.EQUALLY_SPACED_SERIES,I=3,z="zoom",L="zoomEnd",R=y.extend({init:function(e,n){t(e).addClass(A+"chart"),y.fn.init.call(this,e,n)},_applyDefaults:function(t,e){var n=this,i=n.element.width()||p.DEFAULT_WIDTH,o={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:c.floor(i/S)}}};e&&(e=l({},e,o)),n._navigator||O.setup(t,e),y.fn._applyDefaults.call(n,t,e)},_initDataSource:function(t){var e,n,i=t||{},o=i.dataSource,r=o&&o.serverFiltering,s=[].concat(i.categoryAxis)[0],a=i.navigator||{},c=a.select,h=c&&c.from&&c.to;r&&h&&(e=[].concat(o.filter||[]),n=new p.DateCategoryAxis(l({baseUnit:"fit"},s,{categories:[c.from,c.to]})),o.filter=O.buildFilter(n.range().min,c.to).concat(e)),y.fn._initDataSource.call(this,t)},options:{name:"StockChart",dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0,template:"#= kendo.toString(category, 'd') #"},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}},_resize:function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},_redraw:function(){var t=this,e=t._navigator;!this._dirty()&&e&&e.dataSource?e.redrawSlaves():t._fullRedraw()},_dirty:function(){var e=this.options,n=[].concat(e.series,e.navigator.series),i=t.grep(n,function(t){return t&&t.visible}).length,o=this._seriesCount!==i;return this._seriesCount=i,o},_fullRedraw:function(){var t=this,e=t._navigator;e||(e=t._navigator=new O(t)),e._setRange(),y.fn._redraw.call(t),e._initSelection()},_onDataChanged:function(){var t=this;y.fn._onDataChanged.call(t),t._dataBound=!0},_bindCategoryAxis:function(t,e,n){var i,o=this,r=o.options.categoryAxis,s=r.length;if(y.fn._bindCategoryAxis.apply(this,arguments),t.name===E)for(;s>n;)i=r[n++],i.pane==M&&(i.categories=t.categories)},_trackSharedTooltip:function(t){var e=this,n=e._plotArea,i=n.paneByPoint(t);i&&i.options.name===M?e._unsetActivePoint():y.fn._trackSharedTooltip.call(e,t)},destroy:function(){var t=this;t._navigator.destroy(),y.fn.destroy.call(t)}}),O=a.extend({init:function(t){var e=this;e.chart=t,e.options=l({},e.options,t.options.navigator),e._initDataSource(),g(e.options.hint.visible)||(e.options.hint.visible=e.options.visible),t.bind(D,h(e._drag,e)),t.bind(P,h(e._dragEnd,e)),t.bind(z,h(e._zoom,e)),t.bind(L,h(e._zoomEnd,e))},options:{},_initDataSource:function(){var t=this,e=t.options,n=e.autoBind,i=e.dataSource;g(n)||(n=t.chart.options.autoBind),t._dataChangedHandler=h(t._onDataChanged,t),i&&(t.dataSource=r.data.DataSource.create(i).bind(T,t._dataChangedHandler),n&&t.dataSource.fetch())},_onDataChanged:function(){var t,e,n,i,o,r=this,s=r.chart,a=s.options.series,l=a.length,c=s.options.categoryAxis,h=c.length,u=r.dataSource.view();for(t=0;l>t;t++)n=a[t],n.axis==E&&s._isBindable(n)&&(n.data=u);for(e=0;h>e;e++)i=c[e],i.pane==M&&(i.name==E?(s._bindCategoryAxis(i,u,e),o=i.categories):i.categories=o);s._model&&(r.redraw(),r.filterAxes(),(!s.options.dataSource||s.options.dataSource&&s._dataBound)&&r.redrawSlaves())},destroy:function(){var t=this,e=t.dataSource;e&&e.unbind(T,t._dataChangeHandler),t.selection&&t.selection.destroy()},redraw:function(){this._redrawSelf(),this._initSelection()},_initSelection:function(){var e=this,n=e.chart,r=e.options,s=e.mainAxis(),a=i(s),l=s.range(),c=l.min,h=l.max,u=s.options.categories,d=e.options.select,f=e.selection,p=k(d.from),g=k(d.to);0!==u.length&&(f&&(f.destroy(),f.wrapper.remove()),a.box=s.box,f=e.selection=new _(n,a,{min:c,max:h,from:p,to:g,selectStart:t.proxy(e._selectStart,e),select:t.proxy(e._select,e),selectEnd:t.proxy(e._selectEnd,e),mousewheel:{zoom:"left"}}),r.hint.visible&&(e.hint=new o(n.element,{min:c,max:h,template:r.hint.template,format:r.hint.format})))},_setRange:function(){var t,e=this.chart._createPlotArea(!0),n=e.namedCategoryAxes[E],i=n.options,o=n.range(),r=o.min,s=w(o.max,i.baseUnitStep,i.baseUnit),a=this.options.select||{},l=k(a.from)||r;r>l&&(l=r),t=k(a.to)||s,t>s&&(t=s),this.options.select={from:l,to:t},this.filterAxes()},_redrawSelf:function(t){var e=this.chart._plotArea;e&&e.redraw(d(e.panes),t)},redrawSlaves:function(){var t=this,e=t.chart,n=e._plotArea,i=n.panes.slice(0,-1);n.srcSeries=e.options.series,n.redraw(i)},_drag:function(t){var e,n,i,o=this,r=o.chart,s=r._eventCoordinates(t.originalEvent),a=o.mainAxis(),l=a.datesRange(),c=a.pane.box.containsPoint(s),h=r._plotArea.categoryAxis,u=t.axisRanges[h.options.name],d=o.options.select,f=o.selection;u&&!c&&f&&(e=d.from&&d.to?C(d.to)-C(d.from):C(f.options.to)-C(f.options.from),n=k(x(C(u.min),l.min,C(l.max)-e)),i=k(x(C(n)+e,C(l.min)+e,l.max)),o.options.select={from:n,to:i},o._liveDrag()&&(o.filterAxes(),o.redrawSlaves()),f.set(n,i),o.showHint(n,i))},_dragEnd:function(){var t=this;t.filterAxes(),t.filterDataSource(),t.redrawSlaves(),t.hint&&t.hint.hide()},_liveDrag:function(){var t=r.support,e=t.touch,n=t.browser,i=n.mozilla,o=n.msie&&9>n.version;return!e&&!i&&!o},readSelection:function(){var t=this,e=t.selection,n=e.options,i=t.options.select;i.from=n.from,i.to=n.to},filterAxes:function(){var t,e,n=this,i=n.options.select||{},o=n.chart,r=o.options.categoryAxis,s=i.from,a=i.to;for(t=0;r.length>t;t++)e=r[t],e.pane!==M&&(e.min=k(s),e.max=k(a))},filterDataSource:function(){var t,e=this,n=e.options.select||{},i=e.chart,o=i.dataSource,r=o&&o.options.serverFiltering;e.dataSource&&r&&(t=new p.DateCategoryAxis(l({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[n.from,n.to]})).options,o.filter(O.buildFilter(w(t.min,-t.baseUnitStep,t.baseUnit),w(t.max,t.baseUnitStep,t.baseUnit))))},_zoom:function(t){var e,n,i=this,o=i.chart,s=t.delta,a=o._plotArea.categoryAxis,l=i.options.select,h=i.selection,u=i.mainAxis().options.categories;h&&(e=b(h.options.from,u),n=b(h.options.to,u),t.originalEvent.preventDefault(),c.abs(s)>1&&(s*=I),n-e>1?(h.expand(s),i.readSelection()):(a.options.min=l.from,l.from=a.scaleRange(-t.delta).min),r.support.touch||(i.filterAxes(),i.redrawSlaves()),h.set(l.from,l.to),i.showHint(i.options.select.from,i.options.select.to))},_zoomEnd:function(t){this._dragEnd(t)},showHint:function(t,e){var n=this,i=n.chart,o=i._plotArea;n.hint&&n.hint.show(t,e,o.backgroundBox())},_selectStart:function(t){var e=this.chart;e._selectStart.call(e,t)},_select:function(t){var e=this,n=e.chart;e.showHint(t.from,t.to),n._select.call(n,t)},_selectEnd:function(t){var e=this,n=e.chart;e.hint&&e.hint.hide(),e.readSelection(),e.filterAxes(),e.filterDataSource(),e.redrawSlaves(),n._selectEnd.call(n,t)},mainAxis:function(){var t=this.chart._plotArea;return t?t.namedCategoryAxes[E]:e}});O.setup=function(t,e){t=t||{},e=e||{};var n=l({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),o=l({},n.pane,{name:M});n.visible||(o.visible=!1,o.height=.1),i.push(o),O.attachAxes(t,n),O.attachSeries(t,n,e)},O.attachAxes=function(t,e){var n=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),o=t.valueAxis=[].concat(t.valueAxis),r=m(n,B),s=0===r.length,a=l({type:"date",pane:M,roundToBaseUnit:!s,justified:s,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:!e.dataSource,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]},_overlap:!1}),c=e.categoryAxis;i.push(l({},a,{maxDateGroups:200},c,{name:E,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),l({},a,c,{name:E+"_labels",maxDateGroups:20,baseUnitStep:"auto",plotBands:[],autoBaseUnitSteps:{minutes:[]}}),l({},a,c,{name:E+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],labels:{visible:!1,mirror:!0}})),o.push(l({name:E,pane:M,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},O.attachSeries=function(t,e,n){var i,o=t.series=t.series||[],r=[].concat(e.series||[]),s=n.seriesColors,a=e.seriesDefaults;for(i=0;r.length>i;i++)o.push(l({color:s[i%s.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},a,r[i],{axis:E,categoryAxis:E,autoBind:!e.dataSource}))},O.buildFilter=function(t,e){return[{field:"Date",operator:"gte",value:k(t)},{field:"Date",operator:"lt",value:k(e)}]},o=s.extend({init:function(e,n){var i=this;i.options=l({},i.options,n),i.container=e,i.chartPadding={top:parseInt(e.css("paddingTop"),10),left:parseInt(e.css("paddingLeft"),10)},i.template=i.template,i.template||(i.template=i.template=f("<div class='"+A+"navigator-hint' style='display: none; position: absolute; top: 1px; left: 1px;'><div class='"+A+"tooltip "+A+"chart-tooltip'> </div><div class='"+A+"scroll' /></div>")),i.element=t(i.template()).appendTo(e)},options:{format:"{0:d} - {1:d}",hideDelay:500},show:function(t,e,n){var i,o=this,s=k(C(t)+C(e-t)/2),a=o.options,l=r.format(o.options.format,t,e),c=o.element.find("."+A+"tooltip"),h=o.element.find("."+A+"scroll"),u=.4*n.width(),d=n.center().x-u,f=n.center().x,p=f-d,g=a.max-a.min,m=p/g,y=s-a.min;o._hideTimeout&&clearTimeout(o._hideTimeout),o._visible||(o.element.stop(!1,!0).css("visibility","hidden").show(),o._visible=!0),a.template&&(i=v(a.template),l=i({from:t,to:e})),c.html(l).css({left:n.center().x-c.outerWidth()/2,top:n.y1}),h.css({width:u,left:d+y*m,top:n.y1+parseInt(c.css("margin-top"),10)+parseInt(c.css("border-top-width"),10)+c.height()/2}),o.element.css("visibility","visible")},hide:function(){var t=this;t._hideTimeout&&clearTimeout(t._hideTimeout),t._hideTimeout=setTimeout(function(){t._visible=!1,t.element.fadeOut("slow")},t.options.hideDelay)}}),p.ui.plugin(R),l(p,{Navigator:O})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.sparkline.min",["kendo.dataviz.chart.min"],t)}(function(){return function(t,e){function n(t){return"number"==typeof t?[t]:t}var i=window.kendo,o=i.dataviz,r=o.ui.Chart,s=i.data.ObservableArray,a=o.SharedTooltip,l=i.deepExtend,c=t.isArray,h=t.proxy,u=o.inArray,d=Math,f="k-",p=150,g=150,m="bar",v="bullet",y="pie",_="leave",w=[m,v],x=r.extend({init:function(e,i){var o=this,a=o.stage=t("<span />"),h=i||{};e=t(e).addClass(f+"sparkline").empty().append(a),o._initialWidth=d.floor(e.width()),h=n(h),(c(h)||h instanceof s)&&(h={seriesDefaults:{data:h}}),h.series||(h.series=[{data:n(h.data)}]),l(h,{seriesDefaults:{type:h.type}}),(u(h.series[0].type,w)||u(h.seriesDefaults.type,w))&&(h=l({},{categoryAxis:{crosshair:{visible:!1}}},h)),r.fn.init.call(o,e,h)},options:{name:"Sparkline",chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]},_modelOptions:function(){var e,n,i=this,o=i.options,r=i._initialWidth,s=i.stage;return i.stage.children().hide(),n=t("<span> </span>"),i.stage.append(n),e=l({width:r?r:i._autoWidth(),height:s.height(),transitions:o.transitions},o.chartArea,{inline:!0,align:!1}),s.css({width:e.width,height:e.height}),n.remove(),i.stage.children().show(),i.surface.resize(),e},_createTooltip:function(){var t,e=this,n=e.options,i=e.element;return t=e._sharedTooltip()?new b(i,e._plotArea,n.tooltip):r.fn._createTooltip.call(e),t.bind(_,h(e._tooltipleave,e)),t},_surfaceWrap:function(){return this.stage},_autoWidth:function(){var t,e,n,i=this,r=i.options,s=o.getSpacing(r.chartArea.margin),a=r.series,l=i.dataSource.total(),c=0;for(e=0;a.length>e;e++){if(n=a[e],n.type===m)return p;if(n.type===v)return g;if(n.type===y)return i.stage.height();n.data&&(c=d.max(c,n.data.length))}return t=d.max(l,c)*r.pointWidth,t>0&&(t+=s.left+s.right),t}}),b=a.extend({options:{animation:{duration:0}},_anchor:function(t,e){var n=a.fn._anchor.call(this,t,e),i=this._measure();return n.y=-i.height-this.options.offset,n},_hideElement:function(){this.element&&this.element.hide().remove()}});o.ui.plugin(x),l(o,{SparklineSharedTooltip:b})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/map/location.min",["kendo.drawing.min"],t)}(function(){!function(t,e){var n,i=Math,o=i.abs,r=i.atan,s=i.atan2,a=i.cos,l=i.max,c=i.min,h=i.sin,u=i.tan,d=window.kendo,f=d.Class,p=d.dataviz,g=d.deepExtend,m=d.util,v=m.defined,y=m.deg,_=m.rad,w=m.round,x=m.sqr,b=m.valueOrDefault,k=f.extend({init:function(t,e){1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)},DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6},{1:N6}",toArray:function(){return[this.lat,this.lng]},equals:function(t){return t&&t.lat===this.lat&&t.lng===this.lng},clone:function(){return new k(this.lat,this.lng)},round:function(t){return this.lng=w(this.lng,t),this.lat=w(this.lat,t),this},wrap:function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},distanceTo:function(t,e){return this.greatCircleTo(t,e).distance},destination:function(t,e,n){var o,r,l,c,u;return e=_(e),n=n||p.map.datums.WGS84,o=_(this.lat),r=_(this.lng),l=t/d.dataviz.map.datums.WGS84.a,c=i.asin(h(o)*a(l)+a(o)*h(l)*a(e)),u=r+s(h(e)*h(l)*a(o),a(l)-h(o)*h(c)),new k(y(c),y(u))},greatCircleTo:function(t,e){var n,l,c,d,f,g,m,v,b,C,S,T,A,D,P,M,E,B,I,z,L,R,O,F,V,N,H,U,j;if(t=k.create(t),e=e||p.map.datums.WGS84,!t||this.clone().round(8).equals(t.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(n=e.a,l=e.b,c=e.f,d=_(t.lng-this.lng),f=r((1-c)*u(_(this.lat))),g=h(f),m=a(f),v=r((1-c)*u(_(t.lat))),b=h(v),C=a(v),S=d,A=this.DISTANCE_ITERATIONS,D=!1;!D&&A-- >0;)P=h(S),M=a(S),E=i.sqrt(x(C*P)+x(m*b-g*C*M)),I=g*b+m*C*M,L=s(E,I),R=m*C*P/E,B=1-x(R),z=0,0!==B&&(z=I-2*g*b/B),T=S,O=c/16*B*(4+c*(4-3*B)),S=d+(1-O)*c*R*(L+O*E*(z+O*I*(-1+2*x(z)))),D=o(S-T)<=this.DISTANCE_CONVERGENCE;return F=B*(x(n)-x(l))/x(l),V=1+F/16384*(4096+F*(-768+F*(320-175*F))),N=F/1024*(256+F*(-128+F*(74-47*F))),H=N*E*(z+N/4*(I*(-1+2*x(z))-N/6*z*(-3+4*x(E))*(-3+4*x(z)))),U=s(C*P,m*b-g*C*M),j=s(m*P,-g*C+m*b*M),{distance:w(l*V*(L-H),this.DISTANCE_PRECISION),azimuthFrom:y(U),azimuthTo:y(j)}}});k.fn.toString=function(){return d.format(this.FORMAT,this.lat,this.lng)},k.fromLngLat=function(t){return new k(t[1],t[0])},k.fromLatLng=function(t){return new k(t[0],t[1])},k.create=function(t,n){return v(t)?t instanceof k?t.clone():1===arguments.length&&2===t.length?k.fromLatLng(t):new k(t,n):e},n=f.extend({init:function(t,e){t=k.create(t),e=k.create(e),t.lng+180>e.lng+180&&e.lat+90>t.lat+90?(this.se=t,this.nw=e):(this.se=e,this.nw=t)},contains:function(t){var e=this.nw,n=this.se,i=b(t.lng,t[1]),o=b(t.lat,t[0]);return t&&i+180>=e.lng+180&&n.lng+180>=i+180&&o+90>=n.lat+90&&e.lat+90>=o+90},center:function(){var t=this.nw,e=this.se,n=t.lng+(e.lng-t.lng)/2,i=t.lat+(e.lat-t.lat)/2;return new k(i,n)},containsAny:function(t){var e,n=!1;for(e=0;t.length>e;e++)n=n||this.contains(t[e]);return n},include:function(t){var e=this.nw,n=this.se,i=b(t.lng,t[1]),o=b(t.lat,t[0]);e.lng=c(e.lng,i),e.lat=l(e.lat,o),n.lng=l(n.lng,i),n.lat=c(n.lat,o)},includeAll:function(t){for(var e=0;t.length>e;e++)this.include(t[e])},edges:function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new k(t.lat,e.lng),se:this.se,sw:new k(e.lat,t.lng)}},toArray:function(){var t=this.nw,e=this.se;return[t,new k(t.lat,e.lng),e,new k(e.lat,t.lng)]},overlaps:function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())}}),n.World=new n([90,-180],[-90,180]),n.create=function(t,i){return t instanceof n?t:t&&i?new n(t,i):t&&4===t.length&&!i?new n([t[0],t[1]],[t[2],t[3]]):e},g(p,{map:{Extent:n,Location:k}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/map/attribution.min",["kendo.drawing.min"],t)}(function(){!function(){var t=window.kendo,e=t.ui.Widget,n=t.template,i=t.util.valueOrDefault,o=t.util.defined,r=e.extend({init:function(t,n){e.fn.init.call(this,t,n),this._initOptions(n),this.items=[],this.element.addClass("k-widget k-attribution")},options:{name:"Attribution",separator:" | ",itemTemplate:"#= text #"},filter:function(t,e){this._extent=t,this._zoom=e,this._render()},add:function(t){o(t)&&("string"==typeof t&&(t={text:t}),this.items.push(t),this._render())},remove:function(t){var e,n,i=[];for(e=0;this.items.length>e;e++)n=this.items[e],n.text!==t&&i.push(n);this.items=i,this._render()},clear:function(){this.items=[],this.element.empty()},_render:function(){var t,e,i,o=[],r=n(this.options.itemTemplate);for(t=0;this.items.length>t;t++)e=this.items[t],i=this._itemText(e),""!==i&&o.push(r({text:i}));o.length>0?this.element.empty().append(o.join(this.options.separator)).show():this.element.hide();
},_itemText:function(t){var e="",n=this._inZoomLevel(t.minZoom,t.maxZoom),i=this._inArea(t.extent);return n&&i&&(e+=t.text),e},_inZoomLevel:function(t,e){var n=!0;return t=i(t,-Number.MAX_VALUE),e=i(e,Number.MAX_VALUE),n=this._zoom>t&&e>this._zoom},_inArea:function(t){var e=!0;return t&&(e=t.contains(this._extent)),e}});t.dataviz.ui.plugin(r)}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/map/navigator.min",["kendo.core.min"],t)}(function(){!function(t){function e(t){return n.format('<button class="k-button k-navigator-{0}"><span class="k-icon k-i-arrow-{0}"/></button>',t)}var n=window.kendo,i=n.ui.Widget,o=n.keys,r=t.proxy,s=".kendoNavigator",a=e("n")+e("e")+e("s")+e("w"),l=i.extend({init:function(t,e){i.fn.init.call(this,t,e),this._initOptions(e),this.element.addClass("k-widget k-header k-shadow k-navigator").append(a).on("click"+s,".k-button",r(this,"_click"));var o=this.element.parent().closest("["+n.attr("role")+"]");this._keyroot=o.length>0?o:this.element,this._tabindex(this._keyroot),this._keydown=r(this._keydown,this),this._keyroot.on("keydown",this._keydown)},options:{name:"Navigator",panStep:1},events:["pan"],dispose:function(){this._keyroot.off("keydown",this._keydown)},_pan:function(t,e){var n=this.options.panStep;this.trigger("pan",{x:t*n,y:e*n})},_click:function(e){var n=0,i=0,o=t(e.currentTarget);o.is(".k-navigator-n")?i=1:o.is(".k-navigator-s")?i=-1:o.is(".k-navigator-e")?n=1:o.is(".k-navigator-w")&&(n=-1),this._pan(n,i),e.preventDefault()},_keydown:function(t){switch(t.which){case o.UP:this._pan(0,1),t.preventDefault();break;case o.DOWN:this._pan(0,-1),t.preventDefault();break;case o.RIGHT:this._pan(1,0),t.preventDefault();break;case o.LEFT:this._pan(-1,0),t.preventDefault()}}});n.dataviz.ui.plugin(l)}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/map/zoom.min",["kendo.core.min"],t)}(function(){!function(t){function e(t,e){return n.format('<button class="k-button k-zoom-{0}" title="zoom-{0}">{1}</button>',t,e)}var n=window.kendo,i=n.ui.Widget,o=n.keys,r=t.proxy,s=".kendoZoomControl",a=e("in","+")+e("out","-"),l=187,c=189,h=61,u=173,d=i.extend({init:function(t,e){i.fn.init.call(this,t,e),this._initOptions(e),this.element.addClass("k-widget k-zoom-control k-button-wrap k-buttons-horizontal").append(a).on("click"+s,".k-button",r(this,"_click"));var o=this.element.parent().closest("["+n.attr("role")+"]");this._keyroot=o.length>0?o:this.element,this._tabindex(this._keyroot),this._keydown=r(this._keydown,this),this._keyroot.on("keydown",this._keydown)},options:{name:"ZoomControl",zoomStep:1},events:["change"],_change:function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},_click:function(e){var n=t(e.currentTarget),i=1;n.is(".k-zoom-out")&&(i=-1),this._change(i),e.preventDefault()},_keydown:function(t){switch(t.which){case o.NUMPAD_PLUS:case l:case h:this._change(1);break;case o.NUMPAD_MINUS:case c:case u:this._change(-1)}}});n.dataviz.ui.plugin(d)}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/map/crs.min",["dataviz/map/location.min","kendo.drawing.min"],t)}(function(){!function(t,e){var n=Math,i=n.atan,o=n.exp,r=n.pow,s=n.sin,a=n.log,l=n.tan,c=window.kendo,h=c.Class,u=c.dataviz,d=c.deepExtend,f=c.geometry,p=f.Point,g=u.map,m=g.Location,v=c.util,y=v.rad,_=v.deg,w=v.limitValue,x=n.PI,b=x/2,k=x/4,C=x/180,S={a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149},T=h.extend({init:function(t){this._initOptions(t)},MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12,options:{centralMeridian:0,datum:S},forward:function(t,e){var n=this,i=n.options,o=i.datum,r=o.a,s=i.centralMeridian,a=w(t.lat,-n.MAX_LAT,n.MAX_LAT),l=e?w(t.lng,-n.MAX_LNG,n.MAX_LNG):t.lng,c=y(l-s)*r,h=n._projectLat(a);return new p(c,h)},_projectLat:function(t){var e=this.options.datum,n=e.e,i=e.a,o=y(t),c=l(k+o/2),h=n*s(o),u=r((1-h)/(1+h),n/2);return i*a(c*u)},inverse:function(t,e){var n=this,i=n.options,o=i.datum,r=o.a,s=i.centralMeridian,a=t.x/(C*r)+s,l=w(n._inverseY(t.y),-n.MAX_LAT,n.MAX_LAT);return e&&(a=w(a,-n.MAX_LNG,n.MAX_LNG)),new m(l,a)},_inverseY:function(t){var e,a,l,c,h=this,u=h.options.datum,d=u.a,f=u.e,p=f/2,g=o(-t/d),m=b-2*i(g);for(e=0;h.INVERSE_ITERATIONS>=e&&(a=f*s(m),l=r((1-a)/(1+a),p),c=b-2*i(g*l)-m,m+=c,!(n.abs(c)<=h.INVERSE_CONVERGENCE));e++);return _(m)}}),A=T.extend({MAX_LAT:85.0511287798,_projectLat:function(t){var e=this.options.datum.a,n=y(t),i=l(k+n/2);return e*a(i)},_inverseY:function(t){var e=this.options.datum.a,n=o(-t/e);return _(b-2*i(n))}}),D=h.extend({forward:function(t){return new p(t.lng,t.lat)},inverse:function(t){return new m(t.y,t.x)}}),P=h.extend({init:function(){var t=this,e=t._proj=new A,n=this.c=2*x*e.options.datum.a;this._tm=f.transform().translate(.5,.5).scale(1/n,-1/n),this._itm=f.transform().scale(n,-n).translate(-.5,-.5)},toPoint:function(t,e,n){var i=this._proj.forward(t,n);return i.transform(this._tm).scale(e||1)},toLocation:function(t,e,n){return t=t.clone().scale(1/(e||1)).transform(this._itm),this._proj.inverse(t,n)}}),M=h.extend({init:function(){this._proj=new T},toPoint:function(t){return this._proj.forward(t)},toLocation:function(t){return this._proj.inverse(t)}}),E=h.extend({init:function(){this._proj=new D},toPoint:function(t){return this._proj.forward(t)},toLocation:function(t){return this._proj.inverse(t)}});d(u,{map:{crs:{EPSG3395:M,EPSG3857:P,EPSG4326:E},datums:{WGS84:S},projections:{Equirectangular:D,Mercator:T,SphericalMercator:A}}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/map/layers/base.min",["kendo.core.min","dataviz/map/location.min"],t)}(function(){!function(t,e){var n=t.proxy,i=window.kendo,o=i.Class,r=i.dataviz,s=i.deepExtend,a=r.map.Extent,l=i.util,c=l.defined,h=o.extend({init:function(e,i){this._initOptions(i),this.map=e,this.element=t("<div class='k-layer'></div>").css({zIndex:this.options.zIndex,opacity:this.options.opacity}).appendTo(e.scrollElement),this._beforeReset=n(this._beforeReset,this),this._reset=n(this._reset,this),this._resize=n(this._resize,this),this._panEnd=n(this._panEnd,this),this._activate(),this._updateAttribution()},destroy:function(){this._deactivate()},show:function(){this.reset(),this._activate(),this._applyExtent(!0)},hide:function(){this._deactivate(),this._setVisibility(!1)},reset:function(){this._beforeReset(),this._reset()},_reset:function(){this._applyExtent()},_beforeReset:t.noop,_resize:t.noop,_panEnd:function(){this._applyExtent()},_applyExtent:function(){var t=this.options,e=this.map.zoom(),n=!c(t.minZoom)||e>=t.minZoom,i=!c(t.maxZoom)||t.maxZoom>=e,o=a.create(t.extent),r=!o||o.overlaps(this.map.extent());this._setVisibility(n&&i&&r)},_setVisibility:function(t){this.element.css("display",t?"":"none")},_activate:function(){var t=this.map;t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},_deactivate:function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},_updateAttribution:function(){var t=this.map.attribution;t&&t.add(this.options.attribution)}});s(r,{map:{layers:{Layer:h}}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/map/layers/shape.min",["dataviz/map/layers/base.min","dataviz/map/location.min"],t)}(function(){!function(t,e){var n=t.proxy,i=window.kendo,o=i.Class,r=i.data.DataSource,s=i.dataviz,a=i.deepExtend,l=i.util.last,c=i.util.defined,h=i.geometry,u=i.drawing,d=u.Group,f=s.map,p=f.Location,g=f.layers.Layer,m=g.extend({init:function(t,e){g.fn.init.call(this,t,e),this.surface=u.Surface.create(this.element,{width:t.scrollElement.width(),height:t.scrollElement.height()}),this._initRoot(),this.movable=new i.ui.Movable(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseenter=this._handler("shapeMouseEnter"),this.surface.bind("mouseenter",this._mouseenter),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave),this._initDataSource()},options:{autoBind:!0},destroy:function(){g.fn.destroy.call(this),this.surface.destroy(),this.dataSource.unbind("change",this._dataChange)},setDataSource:function(t){this.dataSource&&this.dataSource.unbind("change",this._dataChange),this.dataSource=i.data.DataSource.create(t),this.dataSource.bind("change",this._dataChange),this.options.autoBind&&this.dataSource.fetch()},_reset:function(){g.fn._reset.call(this),this._translateSurface(),this._data&&this._load(this._data)},_initRoot:function(){this._root=new d,this.surface.draw(this._root)},_beforeReset:function(){this.surface.clear(),this._initRoot()},_resize:function(){this.surface.size(this.map.size())},_initDataSource:function(){var t=this.options.dataSource;this._dataChange=n(this._dataChange,this),this.dataSource=r.create(t).bind("change",this._dataChange),t&&this.options.autoBind&&this.dataSource.fetch()},_dataChange:function(t){this._data=t.sender.view(),this._load(this._data)},_load:function(t){var e,n,i;for(this._clearMarkers(),this._loader||(this._loader=new v(this.map,this.options.style,this)),e=new d,n=0;t.length>n;n++)i=this._loader.parse(t[n]),i&&e.append(i);this._root.clear(),this._root.append(e)},shapeCreated:function(t){var e,n=!1;return t instanceof u.Circle&&(n=c(this._createMarker(t))),n||(e={layer:this,shape:t},n=this.map.trigger("shapeCreated",e)),n},_createMarker:function(t){var e=this.map.markers.bind({location:t.location},t.dataItem);return e&&this._markers.push(e),e},_clearMarkers:function(){for(var t=0;this._markers.length>t;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},_panEnd:function(t){g.fn._panEnd.call(this,t),this._translateSurface()},_translateSurface:function(){var t=this.map,e=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(e),this.movable.moveTo({x:e.x,y:e.y}))},_handler:function(t){var e=this;return function(n){if(n.element){var i={layer:e,shape:n.element,originalEvent:n.originalEvent};e.map.trigger(t,i)}}}}),v=o.extend({init:function(t,e,n){this.observer=n,this.locator=t,this.style=e},parse:function(t){var e=new d;return"Feature"===t.type?this._loadGeometryTo(e,t.geometry,t):this._loadGeometryTo(e,t,t),2>e.children.length&&(e=e.children[0]),e},_shapeCreated:function(t){var e=!1;return this.observer&&this.observer.shapeCreated&&(e=this.observer.shapeCreated(t)),e},_loadGeometryTo:function(t,e,n){var i,o,r=e.coordinates;switch(e.type){case"LineString":o=this._loadPolygon(t,[r],n),this._setLineFill(o);break;case"MultiLineString":for(i=0;r.length>i;i++)o=this._loadPolygon(t,[r[i]],n),this._setLineFill(o);break;case"Polygon":this._loadPolygon(t,r,n);break;case"MultiPolygon":for(i=0;r.length>i;i++)this._loadPolygon(t,r[i],n);break;case"Point":this._loadPoint(t,r,n);break;case"MultiPoint":for(i=0;r.length>i;i++)this._loadPoint(t,r[i],n)}},_setLineFill:function(t){var e=t.segments;(4>e.length||!e[0].anchor().equals(l(e).anchor()))&&(t.options.fill=null)},_loadShape:function(t,e){return this._shapeCreated(e)||t.append(e),e},_loadPolygon:function(t,e,n){var i=this._buildPolygon(e);return i.dataItem=n,this._loadShape(t,i)},_buildPolygon:function(t){var e,n,i,o=t.length>1?u.MultiPath:u.Path,r=new o(this.style);for(e=0;t.length>e;e++)for(n=0;t[e].length>n;n++)i=this.locator.locationToView(p.fromLngLat(t[e][n])),0===n?r.moveTo(i.x,i.y):r.lineTo(i.x,i.y);return r},_loadPoint:function(t,e,n){var i=p.fromLngLat(e),o=this.locator.locationToView(i),r=new h.Circle(o,10),s=new u.Circle(r,this.style);return s.dataItem=n,s.location=i,this._loadShape(t,s)}});a(i.data,{schemas:{geojson:{type:"json",data:function(t){return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t}}},transports:{geojson:{read:{dataType:"json"}}}}),a(s,{map:{layers:{shape:m,ShapeLayer:m},GeoJSONLoader:v}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/map/layers/bubble.min",["dataviz/map/layers/shape.min"],t)}(function(){!function(t,e){var n=window.kendo,i=n.getter,o=n.dataviz,r=n.deepExtend,s=n.util,a=s.defined,l=n.geometry,c=n.drawing,h=o.map,u=h.Location,d=h.layers.ShapeLayer,f=d.extend({options:{autoBind:!0,locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle"},_load:function(t){var e,n,o,r,s,l,c,h,d,f,p;if(this.surface.clear(),0!==t.length)for(e=this.options,n=i(e.valueField),t=t.slice(0),t.sort(function(t,e){return n(e)-n(t)}),o=this._scaleType(),s=0;t.length>s;s++)l=t[s],c=i(e.locationField)(l),h=i(e.valueField)(l),a(c)&&a(h)&&(r||(r=new o([0,h],[e.minSize,e.maxSize])),c=u.create(c),d=this.map.locationToView(c),f=r.map(h),p=this._createSymbol({center:d,size:f,style:e.style,dataItem:l,location:c}),p.dataItem=l,p.location=c,p.value=h,this._drawSymbol(p))},_scaleType:function(){var t=this.options.scale;return n.isFunction(t)?t:o.map.scales[t]},_createSymbol:function(t){var e=this.options.symbol;return n.isFunction(e)||(e=o.map.symbols[e]),e(t)},_drawSymbol:function(t){var e={layer:this,shape:t},n=this.map.trigger("shapeCreated",e);n||this.surface.draw(t)}}),p=n.Class.extend({init:function(t,e){var n,i;this._domain=t,this._range=e,n=Math.sqrt(t[1])-Math.sqrt(t[0]),i=e[1]-e[0],this._ratio=i/n},map:function(t){var e=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+e}}),g={circle:function(t){var e=new l.Circle(t.center,t.size/2);return new c.Circle(e,t.style)},square:function(t){var e=new c.Path(t.style),n=t.size/2,i=t.center;return e.moveTo(i.x-n,i.y-n).lineTo(i.x+n,i.y-n).lineTo(i.x+n,i.y+n).lineTo(i.x-n,i.y+n).close(),e}};r(o,{map:{layers:{bubble:f,BubbleLayer:f},scales:{sqrt:p},symbols:g}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/map/layers/tile.min",["dataviz/map/layers/base.min","dataviz/map/location.min"],t)}(function(){!function(t,e){function n(t){return new u(p(t.x),p(t.y))}var i=Math,o=t.proxy,r=window.kendo,s=r.Class,a=r.template,l=r.dataviz,c=r.deepExtend,h=r.geometry,u=h.Point,d=l.map.layers.Layer,f=r.util,p=f.round,g=f.renderSize,m=f.limitValue,v=d.extend({init:function(t,e){d.fn.init.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));var n=this._viewType();this._view=new n(this.element,this.options)},destroy:function(){d.fn.destroy.call(this),this._view.destroy(),this._view=null},_beforeReset:function(){var t=this.map,e=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(e)},_reset:function(){d.fn._reset.call(this),this._updateView(),this._view.reset()},_viewType:function(){return y},_activate:function(){d.fn._activate.call(this),r.support.mobileOS||(this._pan||(this._pan=r.throttle(o(this._render,this),100)),this.map.bind("pan",this._pan))},_deactivate:function(){d.fn._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},_updateView:function(){var t=this._view,e=this.map,n=e.extent(),i={nw:e.locationToLayer(n.nw).round(),se:e.locationToLayer(n.se).round()};t.center(e.locationToLayer(e.center())),t.extent(i),t.zoom(e.zoom())},_resize:function(){this._render()},_panEnd:function(t){d.fn._panEnd.call(this,t),this._render()},_render:function(){this._updateView(),this._view.render()}}),y=s.extend({init:function(t,e){this.element=t,this._initOptions(e),this.pool=new w},options:{tileSize:256,subdomains:["a","b","c"],urlTemplate:""},center:function(t){this._center=t},extent:function(t){this._extent=t},viewOrigin:function(t){this._viewOrigin=t},zoom:function(t){this._zoom=t},pointToTileIndex:function(t){return new u(i.floor(t.x/this.options.tileSize),i.floor(t.y/this.options.tileSize))},tileCount:function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),n=this._extent.nw,o=this.indexToPoint(e).translate(-n.x,-n.y);return{x:i.ceil((i.abs(o.x)+t.width)/this.options.tileSize),y:i.ceil((i.abs(o.y)+t.height)/this.options.tileSize)}},size:function(){var t=this._extent.nw,e=this._extent.se,n=e.clone().translate(-t.x,-t.y);return{width:n.x,height:n.y}},indexToPoint:function(t){var e=t.x,n=t.y;return new u(e*this.options.tileSize,n*this.options.tileSize)},subdomainText:function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},destroy:function(){this.element.empty(),this.pool.empty()},reset:function(){this.pool.reset(),this.subdomainIndex=0,this.render()},render:function(){var t,e,n,i=this.tileCount(),o=this.pointToTileIndex(this._extent.nw);for(e=0;i.x>e;e++)for(n=0;i.y>n;n++)t=this.createTile({x:o.x+e,y:o.y+n}),t.visible||t.show()},createTile:function(t){var e=this.tileOptions(t),n=this.pool.get(this._center,e);return 0===n.element.parent().length&&this.element.append(n.element),n},tileOptions:function(t){var e=this.wrapIndex(t),i=this.indexToPoint(t),o=this._viewOrigin,r=i.clone().translate(-o.x,-o.y);return{index:e,currentIndex:t,point:i,offset:n(r),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},wrapIndex:function(t){var e=i.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:m(t.y,0,e-1)}},wrapValue:function(t,e){var n=i.abs(t)%e;return t=t>=0?n:e-(0===n?e:n)}}),_=s.extend({init:function(t,e){this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()},options:{urlTemplate:"",errorUrlTemplate:""},createElement:function(){this.element=t("<img style='position: absolute; display: block;' />").css({width:this.options.size,height:this.options.size}).error(o(function(t){this.errorUrl()?t.target.setAttribute("src",this.errorUrl()):t.target.removeAttribute("src")},this))},show:function(){var t,e=this.element[0];e.style.top=g(this.options.offset.y),e.style.left=g(this.options.offset.x),t=this.url(),t&&e.setAttribute("src",t),e.style.visibility="visible",this.visible=!0},hide:function(){this.element[0].style.visibility="hidden",this.visible=!1},url:function(){var t=a(this.options.urlTemplate);return t(this.urlOptions())},errorUrl:function(){var t=a(this.options.errorUrlTemplate);return t(this.urlOptions())},urlOptions:function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},destroy:function(){this.element&&(this.element.remove(),this.element=null)}}),w=s.extend({init:function(){this._items=[]},options:{maxSize:100},get:function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},empty:function(){var t,e=this._items;for(t=0;e.length>t;t++)e[t].destroy();this._items=[]},reset:function(){var t,e=this._items;for(t=0;e.length>t;t++)e[t].hide()},_create:function(t){var e,n,i=this._items,o=f.hashKey(""+t.point+(""+t.offset)+t.zoom+t.urlTemplate);for(n=0;i.length>n;n++)i[n].id===o&&(e=i[n]);return e?e.show():(e=new _(o,t),this._items.push(e)),e},_remove:function(t){var e,n,i=this._items,o=-1,r=-1;for(e=0;i.length>e;e++)n=i[e].options.point.distanceTo(t),n>o&&(r=e,o=n);-1!==r&&(i[r].destroy(),i.splice(r,1))}});c(l,{map:{layers:{tile:v,TileLayer:v,ImageTile:_,TilePool:w,TileView:y}}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/map/layers/bing.min",["dataviz/map/layers/tile.min"],t)}(function(){!function(t,e){var n=window.kendo,i=n.dataviz,o=n.deepExtend,r=n.util.defined,s=i.map.Extent,a=i.map.Location,l=i.map.layers.TileLayer,c=i.map.layers.TileView,h=l.extend({init:function(e,n){l.fn.init.call(this,e,n),this._onMetadata=t.proxy(this._onMetadata,this),this._fetchMetadata()},options:{baseUrl:"//dev.virtualearth.net/REST/v1/Imagery/Metadata/",imagerySet:"road"},_fetchMetadata:function(){var e=this.options;if(!e.key)throw Error("Bing tile layer: API key is required");t.ajax({url:e.baseUrl+e.imagerySet,data:{output:"json",include:"ImageryProviders",key:e.key,uriScheme:this._scheme(window.location.protocol)},type:"get",dataType:"jsonp",jsonp:"jsonp",success:this._onMetadata})},_scheme:function(t){return"https"===t.replace(":","")?"https":"http"},_onMetadata:function(t){var e,n;t&&t.resourceSets.length&&(e=this.resource=t.resourceSets[0].resources[0],o(this._view.options,{urlTemplate:e.imageUrl.replace("{subdomain}","#= subdomain #").replace("{quadkey}","#= quadkey #").replace("{culture}","#= culture #"),subdomains:e.imageUrlSubdomains}),n=this.options,r(n.minZoom)||(n.minZoom=e.zoomMin),r(n.maxZoom)||(n.maxZoom=e.zoomMax),this._addAttribution(),"none"!==this.element.css("display")&&this._reset())},_viewType:function(){return u},_addAttribution:function(){var t,e,n,i,o,r=this.map.attribution;if(r&&(t=this.resource.imageryProviders))for(e=0;t.length>e;e++)for(n=t[e],i=0;n.coverageAreas.length>i;i++)o=n.coverageAreas[i],r.add({text:n.attribution,minZoom:o.zoomMin,maxZoom:o.zoomMax,extent:new s(new a(o.bbox[2],o.bbox[1]),new a(o.bbox[0],o.bbox[3]))})},imagerySet:function(t){return t?(this.options.imagerySet=t,this.map.attribution.clear(),this._fetchMetadata(),e):this.options.imagerySet}}),u=c.extend({options:{culture:"en-US"},tileOptions:function(t){var e=c.fn.tileOptions.call(this,t);return e.culture=this.options.culture,e.quadkey=this.tileQuadKey(this.wrapIndex(t)),e},tileQuadKey:function(t){var e,n,i,o="";for(i=this._zoom;i>0;i--)e=0,n=1<<i-1,0!==(t.x&n)&&e++,0!==(t.y&n)&&(e+=2),o+=e;return o}});o(i,{map:{layers:{bing:h,BingLayer:h,BingView:u}}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/map/layers/marker.min",["dataviz/map/layers/base.min","dataviz/map/location.min","kendo.data.min","kendo.tooltip.min"],t)}(function(){!function(t,e){var n=document,i=Math,o=t.inArray,r=t.proxy,s=window.kendo,a=s.Class,l=s.data.DataSource,c=s.ui.Tooltip,h=s.dataviz,u=s.deepExtend,d=h.map,f=d.Location,p=d.layers.Layer,g=p.extend({init:function(t,e){p.fn.init.call(this,t,e),this._markerClick=r(this._markerClick,this),this.element.on("click",".k-marker",this._markerClick),this.items=[],this._initDataSource()},destroy:function(){p.fn.destroy.call(this),this.element.off("click",".k-marker",this._markerClick),this.dataSource.unbind("change",this._dataChange),this.clear()},options:{zIndex:1e3,autoBind:!0,dataSource:{},locationField:"location",titleField:"title"},add:function(e){if(!t.isArray(e))return this._addOne(e);for(var n=0;e.length>n;n++)this._addOne(e[n])},remove:function(t){t.destroy();var e=o(t,this.items);e>-1&&this.items.splice(e,1)},clear:function(){for(var t=0;this.items.length>t;t++)this.items[t].destroy();this.items=[]},update:function(t){var e,n=t.location();n&&(t.showAt(this.map.locationToView(n)),e={marker:t,layer:this},this.map.trigger("markerActivate",e))},_reset:function(){var t,e;for(p.fn._reset.call(this),t=this.items,e=0;t.length>e;e++)this.update(t[e])},bind:function(t,n){var i,o,r=d.Marker.create(t,this.options);return r.dataItem=n,i={marker:r,layer:this},o=this.map.trigger("markerCreated",i),o?e:(this.add(r),r)},setDataSource:function(t){this.dataSource&&this.dataSource.unbind("change",this._dataChange),this.dataSource=s.data.DataSource.create(t),this.dataSource.bind("change",this._dataChange),this.options.autoBind&&this.dataSource.fetch()},_addOne:function(t){var e=m.create(t,this.options);return e.addTo(this),e},_initDataSource:function(){var t=this.options.dataSource;this._dataChange=r(this._dataChange,this),this.dataSource=l.create(t).bind("change",this._dataChange),t&&this.options.autoBind&&this.dataSource.fetch()},_dataChange:function(t){this._load(t.sender.view())},_load:function(t){var e,n,i,o;for(this._data=t,this.clear(),e=s.getter(this.options.locationField),n=s.getter(this.options.titleField),i=0;t.length>i;i++)o=t[i],this.bind({location:e(o),title:n(o)},o)},_markerClick:function(e){var n={marker:t(e.target).data("kendoMarker"),layer:this};this.map.trigger("markerClick",n)}}),m=a.extend({init:function(t){this.options=t||{}},addTo:function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},location:function(t){return t?(this.options.location=f.create(t).toArray(),this.layer&&this.layer.update(this),this):f.create(this.options.location)},showAt:function(t){this.render(),this.element.css({left:i.round(t.x),top:i.round(t.y)}),this.tooltip&&this.tooltip.popup&&this.tooltip.popup._position()},hide:function(){this.element&&(this.element.remove(),this.element=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)},destroy:function(){this.layer=null,this.hide()},render:function(){var e,i;this.element||(e=this.options,i=this.layer,this.element=t(n.createElement("span")).addClass("k-marker k-marker-"+s.toHyphens(e.shape||"pin")).attr("title",e.title).attr(e.attributes||{}).data("kendoMarker",this).css("zIndex",e.zIndex),i&&i.element.append(this.element),this.renderTooltip())},renderTooltip:function(){var t,e,n=this,i=n.options.title,o=n.options.tooltip||{};o&&c&&(t=o.template,t&&(e=s.template(t),o.content=function(t){return t.location=n.location(),t.marker=n,e(t)}),(i||o.content||o.contentUrl)&&(this.tooltip=new c(this.element,o),this.tooltip.marker=this))}});m.create=function(t,e){return t instanceof m?t:new m(u({},e,t))},u(h,{map:{layers:{marker:g,MarkerLayer:g},Marker:m}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/map/main.min",["dataviz/map/crs.min","dataviz/map/location.min"],t)}(function(){!function(t,e){var n=document,i=Math,o=i.min,r=i.pow,s=t.proxy,a=window.kendo,l=a.ui.Widget,c=a.deepExtend,h=a.dataviz,u=h.ui,d=a.geometry,f=d.Point,p=h.map,g=p.Extent,m=p.Location,v=p.crs.EPSG3857,y=a.util,_=y.defined,w=y.limitValue,x=y.renderPos,b=y.valueOrDefault,k="k-",C=.9,S=.93,T="DOMMouseScroll mousewheel",A=5,D=l.extend({init:function(t,e){a.destroy(t),l.fn.init.call(this,t),this._initOptions(e),this.bind(this.events,e),this.crs=new v,this.element.addClass(k+this.options.name.toLowerCase()).css("position","relative").empty().append(n.createElement("div")),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheel=s(this._mousewheel,this),this.element.bind("click",s(this._click,this)),this.element.bind(T,this._mousewheel)},options:{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0},events:["beforeReset","click","reset","pan","panEnd","markerActivate","markerClick","markerCreated","shapeClick","shapeCreated","shapeMouseEnter","shapeMouseLeave","zoomStart","zoomEnd"],destroy:function(){this.scroller.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),this.markers.destroy();for(var t=0;this.layers.length>t;t++)this.layers[t].destroy();l.fn.destroy.call(this)},zoom:function(t){var e=this.options;return _(t)?(t=i.round(w(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this._reset()),this):e.zoom},center:function(t){return t?(this.options.center=m.create(t).toArray(),this._reset(),this):m.create(this.options.center)},extent:function(t){return t?(this._setExtent(t),this):this._getExtent()},setOptions:function(t){l.fn.setOptions.call(this,t),this._reset()},locationToLayer:function(t,e){var n=!this.options.wraparound;return t=m.create(t),this.crs.toPoint(t,this._layerSize(e),n)},layerToLocation:function(t,e){var n=!this.options.wraparound;return t=f.create(t),this.crs.toLocation(t,this._layerSize(e),n)},locationToView:function(t){var e,n;return t=m.create(t),e=this.locationToLayer(this._viewOrigin),n=this.locationToLayer(t),n.translateWith(e.scale(-1))},viewToLocation:function(t,e){var n=this.locationToLayer(this._getOrigin(),e);return t=f.create(t),t=t.clone().translateWith(n),this.layerToLocation(t,e)},eventOffset:function(t){var e=this.element.offset(),n=t.originalEvent||t,i=b(n.pageX,n.clientX)-e.left,o=b(n.pageY,n.clientY)-e.top;return new d.Point(i,o)},eventToView:function(t){var e=this.eventOffset(t);return this.locationToView(this.viewToLocation(e))},eventToLayer:function(t){return this.locationToLayer(this.eventToLocation(t))},eventToLocation:function(t){var e=this.eventOffset(t);return this.viewToLocation(e)},viewSize:function(){var t=this.element,e=this._layerSize(),n=t.width();return this.options.wraparound||(n=o(e,n)),{width:n,height:o(e,t.height())}},exportVisual:function(){return this._reset(),!1},_setOrigin:function(t,e){var n,i=this.viewSize();return t=this._origin=m.create(t),n=this.locationToLayer(t,e),n.x+=i.width/2,n.y+=i.height/2,this.options.center=this.layerToLocation(n,e).toArray(),this},_getOrigin:function(t){var e,n=this.viewSize();return(t||!this._origin)&&(e=this.locationToLayer(this.center()),e.x-=n.width/2,e.y-=n.height/2,this._origin=this.layerToLocation(e)),this._origin},_setExtent:function(t){var e,n,o,r,s,a,l;for(t=g.create(t),this.center(t.center()),e=this.element.width(),n=this.element.height(),o=this.options.maxZoom;o>=this.options.minZoom&&(r=this.locationToLayer(t.nw,o),s=this.locationToLayer(t.se,o),a=i.abs(s.x-r.x),l=i.abs(s.y-r.y),!(e>=a&&n>=l));o--);this.zoom(o)},_getExtent:function(){var t,e=this._getOrigin(),n=this.locationToLayer(e),i=this.viewSize();return n.x+=i.width,n.y+=i.height,t=this.layerToLocation(n),new g(e,t)},_zoomAround:function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},_initControls:function(){var t=this.options.controls;u.Attribution&&t.attribution&&this._createAttribution(t.attribution),a.support.mobileOS||(u.Navigator&&t.navigator&&this._createNavigator(t.navigator),u.ZoomControl&&t.zoom&&this._createZoomControl(t.zoom))},_createControlElement:function(e,n){var i=e.position||n,o="."+x(i).replace(" ","."),r=t(".k-map-controls"+o,this.element);return 0===r.length&&(r=t("<div>").addClass("k-map-controls "+x(i)).appendTo(this.element)),t("<div>").appendTo(r)},_createAttribution:function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new u.Attribution(e,t)},_createNavigator:function(t){var e=this._createControlElement(t,"topLeft"),n=this.navigator=new u.Navigator(e,t);this._navigatorPan=s(this._navigatorPan,this),n.bind("pan",this._navigatorPan),this._navigatorCenter=s(this._navigatorCenter,this),n.bind("center",this._navigatorCenter)},_navigatorPan:function(t){var e=this,n=e.scroller,i=n.scrollLeft+t.x,o=n.scrollTop-t.y,r=this._virtualSize,s=this.element.height(),a=this.element.width();i=w(i,r.x.min,r.x.max-a),o=w(o,r.y.min,r.y.max-s),e.scroller.one("scroll",function(t){e._scrollEnd(t)}),e.scroller.scrollTo(-i,-o)},_navigatorCenter:function(){this.center(this.options.center)},_createZoomControl:function(t){var e=this._createControlElement(t,"topLeft"),n=this.zoomControl=new u.ZoomControl(e,t);this._zoomControlChange=s(this._zoomControlChange,this),n.bind("change",this._zoomControlChange)},_zoomControlChange:function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},_initScroller:function(){var t=a.support.mobileOS?S:C,e=this.options.zoomable!==!1,n=this.scroller=new a.mobile.ui.Scroller(this.element.children(0),{friction:t,velocityMultiplier:A,zoom:e,mousewheelScrolling:!1});n.bind("scroll",s(this._scroll,this)),n.bind("scrollEnd",s(this._scrollEnd,this)),
n.userEvents.bind("gesturestart",s(this._scaleStart,this)),n.userEvents.bind("gestureend",s(this._scale,this)),this.scrollElement=n.scrollElement},_initLayers:function(){var t,e,n,i,o,r=this.options.layers,s=this.layers=[];for(t=0;r.length>t;t++)e=r[t],n=e.type||"shape",i=this.options.layerDefaults[n],o=h.map.layers[n],s.push(new o(this,c({},i,e)))},_initMarkers:function(){this.markers=new p.layers.MarkerLayer(this,this.options.markerDefaults),this.markers.add(this.options.markers)},_scroll:function(t){var e=this.locationToLayer(this._viewOrigin).round(),n=t.sender.movable,i=new d.Point(n.x,n.y).scale(-1).scale(1/n.scale);e.x+=i.x,e.y+=i.y,this._scrollOffset=i,this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},_scrollEnd:function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTS=new Date,this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},_panComplete:function(){return new Date-(this._panEndTS||0)>50},_scaleStart:function(t){if(this.trigger("zoomStart",{originalEvent:t})){var e=t.touches[1];e&&e.cancel()}},_scale:function(t){var e=this.scroller.movable.scale,n=this._scaleToZoom(e),i=new d.Point(t.center.x,t.center.y),o=this.viewToLocation(i,n),r=this.locationToLayer(o,n),s=r.translate(-i.x,-i.y);this._zoomAround(s,n),this.trigger("zoomEnd",{originalEvent:t})},_scaleToZoom:function(t){var e=this._layerSize()*t,n=e/this.options.minSize,o=i.log(n)/i.log(2);return i.round(o)},_reset:function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.trigger("beforeReset"),this.trigger("reset")},_resetScroller:function(){var t,e,n,i,o=this.scroller,s=o.dimensions.x,a=o.dimensions.y,l=this._layerSize(),c=this.extent().nw,h=this.locationToLayer(c).round();o.movable.round=!0,o.reset(),o.userEvents.cancel(),t=this.zoom(),o.dimensions.forcedMinScale=r(2,this.options.minZoom-t),o.dimensions.maxScale=r(2,this.options.maxZoom-t),e={min:-h.x,max:l-h.x},n={min:-h.y,max:l-h.y},this.options.wraparound&&(e.max=20*l,e.min=-e.max),this.options.pannable===!1&&(i=this.viewSize(),e.min=n.min=0,e.max=i.width,n.max=i.height),s.makeVirtual(),a.makeVirtual(),s.virtualSize(e.min,e.max),a.virtualSize(n.min,n.max),this._virtualSize={x:e,y:n}},_renderLayers:function(){var t,e,n,i,o,r=this.options.layers,s=this.layers=[],a=this.scrollWrap;for(a.empty(),t=0;r.length>t;t++)e=r[t],n=e.type||"shape",i=this.options.layerDefaults[n],o=h.map.layers[n],s.push(new o(this,c({},i,e)))},_layerSize:function(t){return t=b(t,this.options.zoom),this.options.minSize*r(2,t)},_click:function(t){if(this._panComplete()){var e=this.eventOffset(t);this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)})}},_mousewheel:function(t){var e,n,i,o,r,s,a,l;t.preventDefault(),e=h.mwDelta(t)>0?-1:1,n=this.options,i=this.zoom(),o=w(i+e,n.minZoom,n.maxZoom),n.zoomable!==!1&&o!==i&&(this.trigger("zoomStart",{originalEvent:t})||(r=this.eventOffset(t),s=this.viewToLocation(r),a=this.locationToLayer(s,o),l=a.translate(-r.x,-r.y),this._zoomAround(l,o),this.trigger("zoomEnd",{originalEvent:t})))}});h.ui.plugin(D)}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.map.min",["kendo.data.min","kendo.userevents.min","kendo.tooltip.min","kendo.mobile.scroller.min","kendo.draganddrop.min","kendo.drawing.min","dataviz/map/location.min","dataviz/map/attribution.min","dataviz/map/navigator.min","dataviz/map/zoom.min","dataviz/map/crs.min","dataviz/map/layers/base.min","dataviz/map/layers/shape.min","dataviz/map/layers/bubble.min","dataviz/map/layers/tile.min","dataviz/map/layers/bing.min","dataviz/map/layers/marker.min","dataviz/map/main.min"],t)}(function(){},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/diagram/utils.min",["kendo.core.min"],t)}(function(){!function(t,e){function n(t,n,i){function o(t){for(var e=1;t*e%1;)e*=10;return e}var r,s,a,l;if(e===t||e===n)return[];if(i&&u.sign(n-t)!=u.sign(i))throw"The sign of the increment should allow to reach the stop-value.";if(i=i||1,t=t||0,n=n||t,(n-t)/i===1/0)throw"Infinite range defined.";if(r=[],s=-1,l=o(Math.abs(i)),t*=l,n*=l,i*=l,t>n&&i>0&&(i=-i),0>i)for(;(a=t+i*++s)>=n;)r.push(a/l);else for(;(a=t+i*++s)<=n;)r.push(a/l);return r}function i(t,e){if(t==e)return 0;var n=e.x-t.x,i=t.y-e.y,o=Math.atan(n/i);return i>=0?0>n?o+2*Math.PI:o:o+Math.PI}var o,r,s=window.kendo,a=s.dataviz.diagram={},l=s.deepExtend,c=t.isArray,h=1e-6,u={};l(u,{isNearZero:function(t){return Math.abs(t)<h},isDefined:function(t){return e!==t},isUndefined:function(t){return e===t||null===t},isObject:function(t){return t===Object(t)},has:function(t,e){return Object.hasOwnProperty.call(t,e)},isString:function(t){return"[object String]"==Object.prototype.toString.call(t)},isBoolean:function(t){return"[object Boolean]"==Object.prototype.toString.call(t)},isType:function(t,e){return Object.prototype.toString.call(t)=="[object "+e+"]"},isNumber:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},isEmpty:function(t){if(null===t)return!0;if(c(t)||u.isString(t))return 0===t.length;for(var e in t)if(u.has(t,e))return!1;return!0},simpleExtend:function(t,e){if(u.isObject(e))for(var n in e)t[n]=e[n]},initArray:function(t,e){var n,i=[];for(n=0;t>n;++n)i[n]=e;return i},serializePoints:function(t){var e,n,i=[];for(e=0;t.length>e;e++)n=t[e],i.push(n.x+";"+n.y);return i.join(";")},deserializePoints:function(t){var e,n=t.split(";"),i=[];if(n.length%2!==0)throw"Not an array of points.";for(e=0;n.length>e;e+=2)i.push(new a.Point(parseInt(n[e],10),parseInt(n[e+1],10)));return i},randomInteger:function(t,e){return parseInt(Math.floor(Math.random()*e)+t,10)},DFT:function(t,e){var n,i;if(e(t),t.childNodes)for(n=0;t.childNodes.length>n;n++)i=t.childNodes[n],this.DFT(i,e)},getMatrixAngle:function(t){return null===t||0===t.d?0:180*Math.atan2(t.b,t.d)/Math.PI},getMatrixScaling:function(t){var e=Math.sqrt(t.a*t.a+t.c*t.c),n=Math.sqrt(t.b*t.b+t.d*t.d);return[e,n]}}),u.sign=function(t){return t?0>t?-1:1:0},u.findAngle=function(t,e){return 180*i(t,e)/Math.PI},u.forEach=function(t,e,n){for(var i=0;t.length>i;i++)e.call(n,t[i],i,t)},u.any=function(t,e){for(var n=0;t.length>n;++n)if(e(t[n]))return t[n];return null},u.remove=function(t,e){for(var n;-1!==(n=u.indexOf(t,e));)t.splice(n,1);return t},u.contains=function(t,e){return-1!==u.indexOf(t,e)},u.indexOf=function(e,n){return t.inArray(n,e)},u.fold=function(t,e,n,i){var o,r,s=arguments.length>2;for(o=0;t.length>o;o++)r=t[o],s?n=e.call(i,n,r,o,t):(n=r,s=!0);if(!s)throw"Reduce of empty array with no initial value";return n},u.find=function(t,e,n){var i;return u.any(t,function(t,o,r){return e.call(n,t,o,r)?(i=t,!0):!1}),i},u.first=function(t,e,n){return 0===t.length?null:u.isUndefined(e)?t[0]:u.find(t,e,n)},u.insert=function(t,e,n){return t.splice(n,0,e),t},u.all=function(t,e,n){var i,o,r=!0;for(o=0;t.length>o&&(i=t[o],r=r&&e.call(n,i,o,t),r);o++);return r},u.clear=function(t){t.splice(0,t.length)},u.bisort=function(t,e,n){if(u.isUndefined(t))throw"First array is not specified.";if(u.isUndefined(e))throw"Second array is not specified.";if(t.length!=e.length)throw"The two arrays should have equal length";var i,o=[];for(i=0;t.length>i;i++)o.push({x:t[i],y:e[i]});for(o.sort(u.isUndefined(n)?function(t,e){return t.x-e.x}:function(t,e){return n(t.x,e.x)}),u.clear(t),u.clear(e),i=0;o.length>i;i++)t.push(o[i].x),e.push(o[i].y)},u.addRange=function(t,e){t.push.apply(t,e)},o={easeInOut:function(t){return-Math.cos(t*Math.PI)/2+.5}},r=s.Class.extend({init:function(){this.adapters=[],this.target=0,this.tick=0,this.interval=20,this.duration=800,this.lastTime=null,this.handlers=[];var t=this;this.transition=o.easeInOut,this.timerDelegate=function(){t.onTimerEvent()}},addAdapter:function(t){this.adapters.push(t)},onComplete:function(t){this.handlers.push(t)},removeHandler:function(e){this.handlers=t.grep(this.handlers,function(t){return t!==e})},trigger:function(){var t=this;this.handlers&&u.forEach(this.handlers,function(e){return e.call(null!==t.caller?t.caller:t)})},onStep:function(){},seekTo:function(t){this.seekFromTo(this.tick,t)},seekFromTo:function(t,e){this.target=Math.max(0,Math.min(1,e)),this.tick=Math.max(0,Math.min(1,t)),this.lastTime=(new Date).getTime(),this.intervalId||(this.intervalId=window.setInterval(this.timerDelegate,this.interval))},stop:function(){this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null,this.trigger())},play:function(t){0!==this.adapters.length&&(null!==t&&(this.caller=t),this.initState(),this.seekFromTo(0,1))},reverse:function(){this.seekFromTo(1,0)},initState:function(){if(0!==this.adapters.length)for(var t=0;this.adapters.length>t;t++)this.adapters[t].initState()},propagate:function(){var t,e=this.transition(this.tick);for(t=0;this.adapters.length>t;t++)this.adapters[t].update(e)},onTimerEvent:function(){var t,e=(new Date).getTime(),n=e-this.lastTime;this.lastTime=e,t=n/this.duration*(this.target>this.tick?1:-1),Math.abs(t)>=Math.abs(this.tick-this.target)?this.tick=this.target:this.tick+=t;try{this.propagate()}finally{this.onStep.call(this),this.target==this.tick&&this.stop()}}}),s.deepExtend(a,{init:function(t){s.init(t,a.ui)},Utils:u,Range:n,Ticker:r})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/diagram/math.min",["dataviz/diagram/utils.min","kendo.dataviz.core.min"],t)}(function(){!function(t,e){function n(t){return Math.abs(t)<I}function i(t,e,i,o,r){var s,a,l,c,h=(e.x-t.x)*(o.y-i.y)-(e.y-t.y)*(o.x-i.x);if(!n(h)&&(s=(t.y-i.y)*(o.x-i.x)-(t.x-i.x)*(o.y-i.y),a=(t.y-i.y)*(e.x-t.x)-(t.x-i.x)*(e.y-t.y),l=s/h,c=a/h,!r||!(0>l||l>1||0>c||c>1)))return new D(t.x+l*(e.x-t.x),t.y+l*(e.y-t.y))}function o(t,e){var n,i,o;do n=2*Math.random()-1,i=2*Math.random()-1,o=n*n+i*i;while(!o||o>1);return t+e*n*Math.sqrt(-2*Math.log(o)/o)}function r(t){var e,n,i;for(A.isUndefined(t)&&(t=10),e="",n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",i=t;i>0;--i)e+=n.charAt(Math.round(Math.random()*(n.length-1)));return e}var s,a,l,c,h,u,d,f,p,g,m,v,y,_,w,x,b=window.kendo,k=b.dataviz.diagram,C=b.Class,S=b.deepExtend,T=b.dataviz,A=k.Utils,D=T.Point2D,P=b.isFunction,M=A.contains,E=t.map,B=3,I=1e-6;S(D.fn,{plus:function(t){return new D(this.x+t.x,this.y+t.y)},minus:function(t){return new D(this.x-t.x,this.y-t.y)},offset:function(t){return new D(this.x-t,this.y-t)},times:function(t){return new D(this.x*t,this.y*t)},normalize:function(){return 0===this.length()?new D:this.times(1/this.length())},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},toString:function(){return"("+this.x+","+this.y+")"},lengthSquared:function(){return this.x*this.x+this.y*this.y},middleOf:function(t,e){return new D(e.x-t.x,e.y-t.y).times(.5).plus(t)},toPolar:function(t){var e,n,i,o=1;if(t&&(o=180/Math.PI),e=Math.atan2(Math.abs(this.y),Math.abs(this.x)),n=Math.PI/2,i=this.length(),0===this.x){if(0===this.y)return new u(0,0);if(this.y>0)return new u(i,o*n);if(0>this.y)return new u(i,3*o*n)}else if(this.x>0){if(0===this.y)return new u(i,0);if(this.y>0)return new u(i,o*e);if(0>this.y)return new u(i,o*(4*n-e))}else{if(0===this.y)return new u(i,2*n);if(this.y>0)return new u(i,o*(2*n-e));if(0>this.y)return new u(i,o*(2*n+e))}},isOnLine:function(t,e){var n,i,o,r,s;return t.x>e.x&&(n=e,e=t,t=n),i=new a(t.x,t.y).inflate(B,B),o=new a(e.x,e.y).inflate(B,B),i.union(o).contains(this)?t.x===e.x||t.y===e.y?!0:(e.y>t.y?(r=i.x+(o.x-i.x)*(this.y-(i.y+i.height))/(o.y+o.height-(i.y+i.height)),s=i.x+i.width+(o.x+o.width-(i.x+i.width))*(this.y-i.y)/(o.y-i.y)):(r=i.x+(o.x-i.x)*(this.y-i.y)/(o.y-i.y),s=i.x+i.width+(o.x+o.width-(i.x+i.width))*(this.y-(i.y+i.height))/(o.y+o.height-(i.y+i.height))),this.x>r&&s>this.x):!1}}),S(D,{parse:function(t){var n=t.slice(1,t.length-1),i=n.split(","),o=parseInt(i[0],10),r=parseInt(i[1],10);return isNaN(o)||isNaN(r)?e:new D(o,r)}}),s=C.extend({init:function(t,e,n){this.point=t,this.left=e,this.right=n}}),a=C.extend({init:function(t,e,n,i){this.x=t||0,this.y=e||0,this.width=n||0,this.height=i||0},contains:function(t){return t.x>=this.x&&this.x+this.width>=t.x&&t.y>=this.y&&this.y+this.height>=t.y},inflate:function(t,n){return n===e&&(n=t),this.x-=t,this.y-=n,this.width+=2*t+1,this.height+=2*n+1,this},offset:function(t,e){var n=t,i=e;return t instanceof D&&(n=t.x,i=t.y),this.x+=n,this.y+=i,this},union:function(t){var e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),i=Math.max(this.x+this.width,t.x+t.width),o=Math.max(this.y+this.height,t.y+t.height);return new a(e,n,i-e,o-n)},center:function(){return new D(this.x+this.width/2,this.y+this.height/2)},top:function(){return new D(this.x+this.width/2,this.y)},right:function(){return new D(this.x+this.width,this.y+this.height/2)},bottom:function(){return new D(this.x+this.width/2,this.y+this.height)},left:function(){return new D(this.x,this.y+this.height/2)},topLeft:function(){return new D(this.x,this.y)},topRight:function(){return new D(this.x+this.width,this.y)},bottomLeft:function(){return new D(this.x,this.y+this.height)},bottomRight:function(){return new D(this.x+this.width,this.y+this.height)},clone:function(){return new a(this.x,this.y,this.width,this.height)},isEmpty:function(){return!this.width&&!this.height},equals:function(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height},rotatedBounds:function(t){var e=this.clone(),n=this.rotatedPoints(t),i=n[0],o=n[1],r=n[2],s=n[3];return e.x=Math.min(r.x,i.x,o.x,s.x),e.y=Math.min(r.y,i.y,o.y,s.y),e.width=Math.max(r.x,i.x,o.x,s.x)-e.x,e.height=Math.max(r.y,i.y,o.y,s.y)-e.y,e},rotatedPoints:function(t){var e=this,n=e.center(),i=e.bottomRight().rotate(n,360-t),o=e.topLeft().rotate(n,360-t),r=e.topRight().rotate(n,360-t),s=e.bottomLeft().rotate(n,360-t);return[o,r,i,s]},toString:function(t){return t=t||" ",this.x+t+this.y+t+this.width+t+this.height},scale:function(t,e,n,i,o){var r,s,a,l=this.topLeft(),c=this.center();l.rotate(c,360-o).rotate(i,o),r=n.minus(l),s=new D(r.x*t,r.y*e),a=r.minus(s),l=l.plus(a),l.rotate(i,360-o).rotate(c,o),this.x=l.x,this.y=l.y,this.width*=t,this.height*=e},zoom:function(t){return this.x*=t,this.y*=t,this.width*=t,this.height*=t,this},overlaps:function(t){var e=this.bottomRight(),n=t.bottomRight(),i=!(t.x>e.x||t.y>e.y||this.x>n.x||this.y>n.y);return i}}),l=C.extend({init:function(t,e){this.width=t,this.height=e}}),l.prototype.Empty=new l(0,0),a.toRect=function(t){return t instanceof a||(t=new a(t.x,t.y,t.width,t.height)),t},a.empty=function(){return new a(0,0,0,0)},a.fromPoints=function(t,e){if(isNaN(t.x)||isNaN(t.y)||isNaN(e.x)||isNaN(e.y))throw"Some values are NaN.";return new a(Math.min(t.x,e.x),Math.min(t.y,e.y),Math.abs(t.x-e.x),Math.abs(t.y-e.y))},c={lines:function(t,e,n,o){return i(t,e,n,o)},segments:function(t,e,n,o){return i(t,e,n,o,!0)},rectWithLine:function(t,e,n){return c.segments(e,n,t.topLeft(),t.topRight())||c.segments(e,n,t.topRight(),t.bottomRight())||c.segments(e,n,t.bottomLeft(),t.bottomRight())||c.segments(e,n,t.topLeft(),t.bottomLeft())},rects:function(t,e,n){var i,o,r=e.topLeft(),s=e.topRight(),a=e.bottomLeft(),l=e.bottomRight(),h=e.center();return n&&(r=r.rotate(h,n),s=s.rotate(h,n),a=a.rotate(h,n),l=l.rotate(h,n)),i=t.contains(r)||t.contains(s)||t.contains(a)||t.contains(l)||c.rectWithLine(t,r,s)||c.rectWithLine(t,r,a)||c.rectWithLine(t,s,l)||c.rectWithLine(t,a,l),i||(r=t.topLeft(),s=t.topRight(),a=t.bottomLeft(),l=t.bottomRight(),n&&(o=360-n,r=r.rotate(h,o),s=s.rotate(h,o),a=a.rotate(h,o),l=l.rotate(h,o)),i=e.contains(r)||e.contains(s)||e.contains(a)||e.contains(l)),i}},h=C.extend({init:function(t){this.container=a.toRect(t)},align:function(t,e){var n,i=e.toLowerCase().split(" ");for(n=0;i.length>n;n++)t=this._singleAlign(t,i[n]);return t},_singleAlign:function(t,e){return P(this[e])?this[e](t):t},left:function(t){return this._align(t,this._left)},center:function(t){return this._align(t,this._center)},right:function(t){return this._align(t,this._right)},stretch:function(t){return this._align(t,this._stretch)},top:function(t){return this._align(t,this._top)},middle:function(t){return this._align(t,this._middle)},bottom:function(t){return this._align(t,this._bottom)},_left:function(t,e){e.x=t.x},_center:function(t,e){e.x=(t.width-e.width)/2||0},_right:function(t,e){e.x=t.width-e.width},_top:function(t,e){e.y=t.y},_middle:function(t,e){e.y=(t.height-e.height)/2||0},_bottom:function(t,e){e.y=t.height-e.height},_stretch:function(t,e){e.x=0,e.y=0,e.height=t.height,e.width=t.width},_align:function(t,e){return t=a.toRect(t),e(this.container,t),t}}),u=C.extend({init:function(t,e){this.r=t,this.angle=e}}),d=C.extend({init:function(t,e,n,i,o,r){this.a=t||0,this.b=e||0,this.c=n||0,this.d=i||0,this.e=o||0,this.f=r||0},plus:function(t){this.a+=t.a,this.b+=t.b,this.c+=t.c,this.d+=t.d,this.e+=t.e,this.f+=t.f},minus:function(t){this.a-=t.a,this.b-=t.b,this.c-=t.c,this.d-=t.d,this.e-=t.e,this.f-=t.f},times:function(t){return new d(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)},apply:function(t){return new D(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)},applyRect:function(t){return a.fromPoints(this.apply(t.topLeft()),this.apply(t.bottomRight()))},toString:function(){return"matrix("+this.a+" "+this.b+" "+this.c+" "+this.d+" "+this.e+" "+this.f+")"}}),S(d,{fromSVGMatrix:function(t){var e=new d;return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},fromMatrixVector:function(t){var e=new d;return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},fromList:function(t){if(6!==t.length)throw"The given list should consist of six elements.";var e=new d;return e.a=t[0],e.b=t[1],e.c=t[2],e.d=t[3],e.e=t[4],e.f=t[5],e},translation:function(t,e){var n=new d;return n.a=1,n.b=0,n.c=0,n.d=1,n.e=t,n.f=e,n},unit:function(){return new d(1,0,0,1,0,0)},rotation:function(t,e,n){var i=new d;return i.a=Math.cos(t*Math.PI/180),i.b=Math.sin(t*Math.PI/180),i.c=-i.b,i.d=i.a,i.e=e-e*i.a+n*i.b||0,i.f=n-n*i.a-e*i.b||0,i},scaling:function(t,e){var n=new d;return n.a=t,n.b=0,n.c=0,n.d=e,n.e=0,n.f=0,n},parse:function(t){var e,n;if(t){if(t=t.trim(),"matrix"===t.slice(0,6).toLowerCase()){if(n=t.slice(7,t.length-1).trim(),e=n.split(","),6===e.length)return d.fromList(E(e,function(t){return parseFloat(t)}));if(e=n.split(" "),6===e.length)return d.fromList(E(e,function(t){return parseFloat(t)}))}if("("===t.slice(0,1)&&")"===t.slice(t.length-1)&&(t=t.substr(1,t.length-1)),t.indexOf(",")>0&&(e=t.split(","),6===e.length))return d.fromList(E(e,function(t){return parseFloat(t)}));if(t.indexOf(" ")>0&&(e=t.split(" "),6===e.length))return d.fromList(E(e,function(t){return parseFloat(t)}))}return e}}),f=C.extend({init:function(t,e,n,i,o,r){this.a=t||0,this.b=e||0,this.c=n||0,this.d=i||0,this.e=o||0,this.f=r||0},fromMatrix:function(t){var e=new f;return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e}}),p={_distanceToLineSquared:function(t,e,n){function i(t,e){return(t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)}if(e===n)return i(t,e);var o=n.x-e.x,r=n.y-e.y,s=(t.x-e.x)*o+(t.y-e.y)*r;return 0>s?i(e,t):(s=(n.x-t.x)*o+(n.y-t.y)*r,0>s?i(n,t):(s=(n.x-t.x)*r-(n.y-t.y)*o,s*s/(o*o+r*r)))},distanceToLine:function(t,e,n){return Math.sqrt(this._distanceToLineSquared(t,e,n))},distanceToPolyline:function(t,e){var n,i,o,r,s=Number.MAX_VALUE;if(A.isUndefined(e)||0===e.length)return Number.MAX_VALUE;for(n=0;e.length-1>n;n++)i=e[n],o=e[n+1],r=this._distanceToLineSquared(t,i,o),s>r&&(s=r);return Math.sqrt(s)}},g=b.Class.extend({init:function(){this._buckets=[],this.length=0},add:function(t,e){var n=this._createGetBucket(t);return A.isDefined(e)&&(n.value=e),n},get:function(t){return this._bucketExists(t)?this._createGetBucket(t):null},set:function(t,e){this.add(t,e)},containsKey:function(t){return this._bucketExists(t)},remove:function(t){if(this._bucketExists(t)){var e=this._hash(t);return delete this._buckets[e],this.length--,t}},forEach:function(t){var e,n,i,o,r=this._hashes();for(e=0,n=r.length;n>e;e++)i=r[e],o=this._buckets[i],A.isUndefined(o)||t(o)},clone:function(){var t,e,n,i,o=new g,r=this._hashes();for(t=0,e=r.length;e>t;t++)n=r[t],i=this._buckets[n],A.isUndefined(i)||o.add(i.key,i.value);return o},_hashes:function(){var t,e=[];for(t in this._buckets)this._buckets.hasOwnProperty(t)&&e.push(t);return e},_bucketExists:function(t){var e=this._hash(t);return A.isDefined(this._buckets[e])},_createGetBucket:function(t){var e=this._hash(t),n=this._buckets[e];return A.isUndefined(n)&&(n={key:t},this._buckets[e]=n,this.length++),n},_hash:function(t){if(A.isNumber(t))return t;if(A.isString(t))return this._hashString(t);if(A.isObject(t))return this._objectHashId(t);throw"Unsupported key type."},_hashString:function(t){var e,n,i=0;if(0===t.length)return i;for(e=0;t.length>e;e++)n=t.charCodeAt(e),i=32*i-i+n;return i},_objectHashId:function(t){var e=t._hashId;return A.isUndefined(e)&&(e=r(),t._hashId=e),e}}),m=b.Observable.extend({init:function(e){var n,i=this;if(b.Observable.fn.init.call(i),this._hashTable=new g,this.length=0,A.isDefined(e))if(t.isArray(e))for(n=0;e.length>n;n++)this.add(e[n]);else e.forEach(function(t,e){this.add(t,e)},this)},add:function(t,e){var n=this._hashTable.get(t);n||(n=this._hashTable.add(t),this.length++,this.trigger("changed")),n.value=e},set:function(t,e){this.add(t,e)},get:function(t){var e=this._hashTable.get(t);if(e)return e.value;throw Error("Cannot find key "+t)},containsKey:function(t){return this._hashTable.containsKey(t)},remove:function(t){return this.containsKey(t)?(this.trigger("changed"),this.length--,this._hashTable.remove(t)):e},forEach:function(t,e){this._hashTable.forEach(function(n){t.call(e,n.key,n.value)})},forEachValue:function(t,e){this._hashTable.forEach(function(n){t.call(e,n.value)})},forEachKey:function(t,e){this._hashTable.forEach(function(n){t.call(e,n.key)})},keys:function(){var t=[];return this.forEachKey(function(e){t.push(e)}),t}}),v=b.Class.extend({init:function(){this._tail=null,this._head=null,this.length=0},enqueue:function(t){var e={value:t,next:null};this._head?(this._tail.next=e,this._tail=this._tail.next):(this._head=e,this._tail=this._head),this.length++},dequeue:function(){if(1>this.length)throw Error("The queue is empty.");var t=this._head.value;return this._head=this._head.next,this.length--,t},contains:function(t){for(var e=this._head;e;){if(e.value===t)return!0;e=e.next}return!1}}),y=b.Observable.extend({init:function(t){var e=this;b.Observable.fn.init.call(e),this._hashTable=new g,this.length=0,A.isDefined(t)&&(t instanceof g?t.forEach(function(t){this.add(t)}):t instanceof m&&t.forEach(function(t,e){this.add({key:t,value:e})},this))},contains:function(t){return this._hashTable.containsKey(t)},add:function(t){var e=this._hashTable.get(t);e||(this._hashTable.add(t,t),this.length++,this.trigger("changed"))},get:function(t){return this.contains(t)?this._hashTable.get(t).value:null},hash:function(t){return this._hashTable._hash(t)},remove:function(t){this.contains(t)&&(this._hashTable.remove(t),this.length--,this.trigger("changed"))},forEach:function(t,e){this._hashTable.forEach(function(e){t(e.value)},e)},toArray:function(){var t=[];return this.forEach(function(e){t.push(e)}),t}}),_=b.Class.extend({init:function(t,e){if(this.links=[],this.outgoing=[],this.incoming=[],this.weight=1,this.id=A.isDefined(t)?t:r(),A.isDefined(e)){this.associatedShape=e;var n=e.bounds();this.width=n.width,this.height=n.height,this.x=n.x,this.y=n.y}else this.associatedShape=null;this.data=null,this.type="Node",this.shortForm="Node '"+this.id+"'",this.isVirtual=!1},isIsolated:function(){return A.isEmpty(this.links)},bounds:function(t){return A.isDefined(t)?(this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,e):new k.Rect(this.x,this.y,this.width,this.height)},isLinkedTo:function(t){var e=this;return A.any(e.links,function(n){return n.getComplement(e)===t})},getChildren:function(){var t,e,n,i;if(0===this.outgoing.length)return[];for(t=[],e=0,n=this.outgoing.length;n>e;e++)i=this.outgoing[e],t.push(i.getComplement(this));return t},getParents:function(){var t,e,n,i;if(0===this.incoming.length)return[];for(t=[],e=0,n=this.incoming.length;n>e;e++)i=this.incoming[e],t.push(i.getComplement(this));return t},clone:function(){var t=new _;return A.isDefined(this.weight)&&(t.weight=this.weight),A.isDefined(this.balance)&&(t.balance=this.balance),A.isDefined(this.owner)&&(t.owner=this.owner),t.associatedShape=this.associatedShape,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},adjacentTo:function(t){return null!==this.isLinkedTo(t)},removeLink:function(t){t.source===this&&(A.remove(this.links,t),A.remove(this.outgoing,t),t.source=null),t.target===this&&(A.remove(this.links,t),A.remove(this.incoming,t),t.target=null)},hasLinkTo:function(t){return A.any(this.outgoing,function(e){return e.target===t})},degree:function(){return this.links.length},incidentWith:function(t){return M(this.links,t)},getLinksWith:function(t){return A.all(this.links,function(e){return e.getComplement(this)===t},this)},getNeighbors:function(){var t=[];return A.forEach(this.incoming,function(e){t.push(e.getComplement(this))},this),A.forEach(this.outgoing,function(e){t.push(e.getComplement(this))},this),t}}),w=b.Class.extend({init:function(t,e,n,i){if(A.isUndefined(t))throw"The source of the new link is not set.";if(A.isUndefined(e))throw"The target of the new link is not set.";var o,s;o=A.isString(t)?new _(t):t,s=A.isString(e)?new _(e):e,this.source=o,this.target=s,this.source.links.push(this),this.target.links.push(this),this.source.outgoing.push(this),this.target.incoming.push(this),this.id=A.isDefined(n)?n:r(),this.associatedConnection=A.isDefined(i)?i:null,this.type="Link",this.shortForm="Link '"+this.source.id+"->"+this.target.id+"'"},getComplement:function(t){if(this.source!==t&&this.target!==t)throw"The given node is not incident with this link.";return this.source===t?this.target:this.source},getCommonNode:function(t){return this.source===t.source||this.source===t.target?this.source:this.target===t.source||this.target===t.target?this.target:null},isBridging:function(t,e){return this.source===t&&this.target===e||this.source===e&&this.target===t},getNodes:function(){return[this.source,this.target]},incidentWith:function(t){return this.source===t||this.target===t},adjacentTo:function(t){return M(this.source.links,t)||M(this.target.links,t)},changeSource:function(t){A.remove(this.source.links,this),A.remove(this.source.outgoing,this),t.links.push(this),t.outgoing.push(this),this.source=t},changeTarget:function(t){A.remove(this.target.links,this),A.remove(this.target.incoming,this),t.links.push(this),t.incoming.push(this),this.target=t},changesNodes:function(t,e){this.source===t?this.changeSource(e):this.target===t&&this.changeTarget(e)},reverse:function(){var t=this.source,e=this.target;return this.source=e,A.remove(t.outgoing,this),this.source.outgoing.push(this),this.target=t,A.remove(e.incoming,this),this.target.incoming.push(this),this},directTo:function(t){if(this.source!==t&&this.target!==t)throw"The given node is not incident with this link.";this.target!==t&&this.reverse()},createReverseEdge:function(){var t=this.clone();return t.reverse(),t.reversed=!0,t},clone:function(){var t=new w(this.source,this.target);return t}}),x=b.Class.extend({init:function(t){this.links=[],this.nodes=[],this._nodeMap=new m,this.diagram=null,this._root=null,A.isDefined(t)?A.isString(t)?this.id=t:(this.diagram=t,this.id=t.id):this.id=r(),this.bounds=new a,this._hasCachedRelationships=!1,this.type="Graph"},cacheRelationships:function(t){var e,n,i;if(A.isUndefined(t)&&(t=!1),!this._hasCachedRelationships||t){for(e=0,n=this.nodes.length;n>e;e++)i=this.nodes[e],i.children=this.getChildren(i),i.parents=this.getParents(i);this._hasCachedRelationships=!0}},assignLevels:function(t,e,n){var i,o,r,s;if(!t)throw"Start node not specified.";for(A.isUndefined(e)&&(e=0),this.cacheRelationships(),A.isUndefined(n)&&(n=new m,A.forEach(this.nodes,function(t){n.add(t,!1)})),n.set(t,!0),t.level=e,i=t.children,o=0,r=i.length;r>o;o++)s=i[o],s&&!n.get(s)&&this.assignLevels(s,e+1,n)},root:function(t){if(A.isUndefined(t)){if(this._root)return this._root;var e=A.first(this.nodes,function(t){return 0===t.incoming.length});return e?e:A.first(this.nodes)}this._root=t},getConnectedComponents:function(){var t,e,n,i,o;for(this.componentIndex=0,this.setItemIndices(),t=A.initArray(this.nodes.length,-1),e=0;this.nodes.length>e;e++)-1===t[e]&&(this._collectConnectedNodes(t,e),this.componentIndex++);for(n=[],i=0;this.componentIndex>i;++i)n[i]=new x;for(i=0;t.length>i;++i)o=n[t[i]],o.addNodeAndOutgoings(this.nodes[i]);return n.sort(function(t,e){return e.nodes.length-t.nodes.length}),n},_collectConnectedNodes:function(t,e){t[e]=this.componentIndex;var n=this.nodes[e];A.forEach(n.links,function(e){var i=e.getComplement(n),o=i.index;-1===t[o]&&this._collectConnectedNodes(t,o)},this)},calcBounds:function(){var t,e,n,i;if(this.isEmpty())return this.bounds=new a;for(t=null,e=0,n=this.nodes.length;n>e;e++)i=this.nodes[e],t=t?t.union(i.bounds()):i.bounds();return this.bounds=t},getSpanningTree:function(t){var e,n,i,o,r,s,a,l,c,h,u,d,f=new x,p=new m;for(f.root=t.clone(),f.root.level=0,f.root.id=t.id,p.add(t,f.root),t.level=0,i=[],o=[],f._addNode(f.root),i.push(t),o.push(t),r=1;o.length>0;)for(s=o.pop(),a=0;s.links.length>a;a++)l=s.links[a],c=l.getComplement(s),M(i,c)||(c.level=s.level+1,c.level+1>r&&(r=c.level+1),M(o,c)||o.push(c),M(i,c)||i.push(c),p.containsKey(s)?e=p.get(s):(e=s.clone(),e.level=s.level,e.id=s.id,p.add(s,e)),p.containsKey(c)?n=p.get(c):(n=c.clone(),n.level=c.level,n.id=c.id,p.add(c,n)),h=new w(e,n),f.addLink(h));for(u=[],d=0;r>d;d++)u.push([]);return A.forEach(f.nodes,function(t){u[t.level].push(t)}),f.treeLevels=u,f.cacheRelationships(),f},takeRandomNode:function(e,n){if(A.isUndefined(e)&&(e=[]),A.isUndefined(n)&&(n=4),0===this.nodes.length)return null;if(1===this.nodes.length)return M(e,this.nodes[0])?null:this.nodes[0];var i=t.grep(this.nodes,function(t){return!M(e,t)&&t.degree()<=n});return A.isEmpty(i)?null:i[A.randomInteger(0,i.length)]},isEmpty:function(){return A.isEmpty(this.nodes)},isHealthy:function(){return A.all(this.links,function(t){return M(this.nodes,t.source)&&M(this.nodes,t.target)},this)},getParents:function(t){if(!this.hasNode(t))throw"The given node is not part of this graph.";return t.getParents()},getChildren:function(t){if(!this.hasNode(t))throw"The given node is not part of this graph.";return t.getChildren()},addLink:function(t,n,i){var o,r,s;if(A.isUndefined(t))throw"The source of the link is not defined.";if(A.isUndefined(n)){if(A.isDefined(t.type)&&"Link"===t.type)return this.addExistingLink(t),e;throw"The target of the link is not defined."}return o=this.getNode(t),A.isUndefined(o)&&(o=this.addNode(t)),r=this.getNode(n),A.isUndefined(r)&&(r=this.addNode(n)),s=new w(o,r),A.isDefined(i)&&(s.owner=i),this.links.push(s),s},removeAllLinks:function(){for(;this.links.length>0;){var t=this.links[0];this.removeLink(t)}},addExistingLink:function(t){var e,n;this.hasLink(t)||(this.links.push(t),this.hasNode(t.source.id)?(e=this.getNode(t.source.id),t.changeSource(e)):this.addNode(t.source),this.hasNode(t.target.id)?(n=this.getNode(t.target.id),t.changeTarget(n)):this.addNode(t.target))},hasLink:function(t){if(A.isString(t))return A.any(this.links,function(e){return e.id===t});if("Link"===t.type)return M(this.links,t);throw"The given object is neither an identifier nor a Link."},getNode:function(t){var n=t.id||t;return this._nodeMap.containsKey(n)?this._nodeMap.get(n):e},hasNode:function(t){var e=t.id||t;return this._nodeMap.containsKey(e)},_addNode:function(t){this.nodes.push(t),this._nodeMap.add(t.id,t)},_removeNode:function(t){A.remove(this.nodes,t),this._nodeMap.remove(t.id)},removeNode:function(t){var e,n,i,o,r=t;if(A.isString(t)&&(r=this.getNode(t)),
!A.isDefined(r))throw"The identifier should be a Node or the Id (string) of a node.";for(e=r.links,r.links=[],n=0,i=e.length;i>n;n++)o=e[n],this.removeLink(o);this._removeNode(r)},areConnected:function(t,e){return A.any(this.links,function(n){return n.source==t&&n.target==e||n.source==e&&n.target==t})},removeLink:function(t){A.remove(this.links,t),A.remove(t.source.outgoing,t),A.remove(t.source.links,t),A.remove(t.target.incoming,t),A.remove(t.target.links,t)},addNode:function(t,e,n){var i=null;if(!A.isDefined(t))throw"No Node or identifier for a new Node is given.";if(A.isString(t)){if(this.hasNode(t))return this.getNode(t);i=new _(t)}else{if(this.hasNode(t))return this.getNode(t);i=t}return A.isDefined(e)&&i.bounds(e),A.isDefined(n)&&(i.owner=n),this._addNode(i),i},addNodeAndOutgoings:function(t){this.hasNode(t)||this._addNode(t);var e=t.outgoing;t.outgoing=[],A.forEach(e,function(t){this.addExistingLink(t)},this)},setItemIndices:function(){var t;for(t=0;this.nodes.length>t;++t)this.nodes[t].index=t;for(t=0;this.links.length>t;++t)this.links[t].index=t},clone:function(t){var e,n=new x,i=A.isDefined(t)&&t===!0;return i&&(n.nodeMap=new m,n.linkMap=new m),e=new m,A.forEach(this.nodes,function(t){var o=t.clone();e.set(t,o),n._addNode(o),i&&n.nodeMap.set(o,t)}),A.forEach(this.links,function(t){if(e.containsKey(t.source)&&e.containsKey(t.target)){var o=n.addLink(e.get(t.source),e.get(t.target));i&&n.linkMap.set(o,t)}}),n},linearize:function(t){return x.Utils.linearize(this,t)},depthFirstTraversal:function(t,e){var n,i;if(A.isUndefined(t))throw"You need to supply a starting node.";if(A.isUndefined(e))throw"You need to supply an action.";if(!this.hasNode(t))throw"The given start-node is not part of this graph";n=this.getNode(t),i=[],this._dftIterator(n,e,i)},_dftIterator:function(t,e,n){var i,o,r,s;for(e(t),n.push(t),i=t.getChildren(),o=0,r=i.length;r>o;o++)s=i[o],M(n,s)||this._dftIterator(s,e,n)},breadthFirstTraversal:function(t,e){var n,i,o,r,s,a,l,c;if(A.isUndefined(t))throw"You need to supply a starting node.";if(A.isUndefined(e))throw"You need to supply an action.";if(!this.hasNode(t))throw"The given start-node is not part of this graph";for(n=this.getNode(t),i=new v,o=[],i.enqueue(n);i.length>0;)for(r=i.dequeue(),e(r),o.push(r),s=r.getChildren(),a=0,l=s.length;l>a;a++)c=s[a],M(o,c)||M(i,c)||i.enqueue(c)},_stronglyConnectedComponents:function(t,e,n,i,o,r,s){var a,l,c,h,u;for(n.add(e,s),i.add(e,s),s++,r.push(e),a=e.getChildren(),c=0,h=a.length;h>c;c++)l=a[c],n.containsKey(l)?M(r,l)&&i.add(e,Math.min(i.get(e),n.get(l))):(this._stronglyConnectedComponents(t,l,n,i,o,r,s),i.add(e,Math.min(i.get(e),i.get(l))));if(i.get(e)===n.get(e)){u=[];do l=r.pop(),u.push(l);while(l!==e);(!t||u.length>1)&&o.push(u)}},findCycles:function(t){var e,n,i,o,r,s,a;for(A.isUndefined(t)&&(t=!0),e=new m,n=new m,i=[],o=[],r=0,s=this.nodes.length;s>r;r++)a=this.nodes[r],e.containsKey(a)||this._stronglyConnectedComponents(t,a,e,n,i,o,0);return i},isAcyclic:function(){return A.isEmpty(this.findCycles())},isSubGraph:function(t){var e=t.linearize(),n=this.linearize();return A.all(e,function(t){return M(n,t)})},makeAcyclic:function(){var t,e,n,i,o,r,s,a,l,c,h,u,d,f,p,g,v,y,_,w,x,b,k,C,S,T,D,P,M,E,B,I;if(this.isEmpty()||1>=this.nodes.length||1>=this.links.length)return[];if(2==this.nodes.length){if(t=[],this.links.length>1)for(e=this.links[0],n=e.source,i=0,o=this.links.length;o>i;i++)r=this.links[i],r.source!=n&&(s=r.reverse(),t.push(s));return t}for(a=this.clone(!0),l=this.nodes.length,c=new m,h=function(t){return 0===t.outgoing.length?2-l:0===t.incoming.length?l-2:t.outgoing.length-t.incoming.length},u=function(t,e){var n=h(t,l);e.containsKey(n)||e.set(n,[]),e.get(n).push(t)},A.forEach(a.nodes,function(t){u(t,c)}),d=[],f=[];a.nodes.length>0;){if(c.containsKey(2-l))for(y=c.get(2-l);y.length>0;){for(g=y.pop(),_=0;g.links.length>_;_++)w=g.links[_],p=w.getComplement(g),v=h(p,l),A.remove(c.get(v),p),p.removeLink(w),u(p,c);a._removeNode(g),f.unshift(g)}if(c.containsKey(l-2))for(x=c.get(l-2);x.length>0;){for(p=x.pop(),b=0;p.links.length>b;b++)k=p.links[b],g=k.getComplement(p),v=h(g,l),A.remove(c.get(v),g),g.removeLink(k),u(g,c);d.push(p),a._removeNode(p)}if(a.nodes.length>0)for(C=l-3;C>2-l;C--)if(c.containsKey(C)&&c.get(C).length>0){for(S=c.get(C),T=S.pop(),D=0;T.links.length>D;D++)P=T.links[D],M=P.getComplement(T),v=h(M,l),A.remove(c.get(v),M),M.removeLink(P),u(M,c);d.push(T),a._removeNode(T);break}}for(d=d.concat(f),E=new m,B=0;this.nodes.length>B;B++)E.set(a.nodeMap.get(d[B]),B);return I=[],A.forEach(this.links,function(t){E.get(t.source)>E.get(t.target)&&(t.reverse(),I.push(t))}),I}}),x.Predefined={EightGraph:function(){return x.Utils.parse(["1->2","2->3","3->4","4->1","3->5","5->6","6->7","7->3"])},Mindmap:function(){return x.Utils.parse(["0->1","0->2","0->3","0->4","0->5","1->6","1->7","7->8","2->9","9->10","9->11","3->12","12->13","13->14","4->15","4->16","15->17","15->18","18->19","18->20","14->21","14->22","5->23","23->24","23->25","6->26"])},ThreeGraph:function(){return x.Utils.parse(["1->2","2->3","3->1"])},BinaryTree:function(t){return A.isUndefined(t)&&(t=5),x.Utils.createBalancedTree(t,2)},Linear:function(t){return A.isUndefined(t)&&(t=10),x.Utils.createBalancedTree(t,1)},Tree:function(t,e){return x.Utils.createBalancedTree(t,e)},Forest:function(t,e,n){return x.Utils.createBalancedForest(t,e,n)},Workflow:function(){return x.Utils.parse(["0->1","1->2","2->3","1->4","4->3","3->5","5->6","6->3","6->7","5->4"])},Grid:function(t,e){var n,i,o,r,s,a=new k.Graph;if(0>=t&&0>=e)return a;for(n=0;t+1>n;n++)for(i=null,o=0;e+1>o;o++)r=new _(""+n+"."+o),a.addNode(r),i&&a.addLink(i,r),n>0&&(s=a.getNode(""+(n-1)+"."+o),a.addLink(s,r)),i=r;return a}},x.Utils={parse:function(t){var e,n,i,o,r,s=new k.Graph,a=t.slice();for(n=0,i=a.length;i>n;n++){if(o=a[n],A.isString(o)){if(o.indexOf("->")<0)throw"The link should be specified as 'a->b'.";if(r=o.split("->"),2!=r.length)throw"The link should be specified as 'a->b'.";e=new w(r[0],r[1]),s.addLink(e)}if(A.isObject(o)){if(!e)throw"Specification found before Link definition.";b.deepExtend(e,o)}}return s},linearize:function(t,e){var n,i,o,r;if(A.isUndefined(t))throw"Expected an instance of a Graph object in slot one.";for(A.isUndefined(e)&&(e=!1),n=[],i=0,o=t.links.length;o>i;i++)r=t.links[i],n.push(r.source.id+"->"+r.target.id),e&&n.push({id:r.id});return n},_addShape:function(t,e,n,i){return A.isUndefined(e)&&(e=new k.Point(0,0)),A.isUndefined(n)&&(n=r()),i=b.deepExtend({width:20,height:20,id:n,radius:10,fill:"#778899",data:"circle",undoable:!1,x:e.x,y:e.y},i),t.addShape(i)},_addConnection:function(t,e,n,i){return t.connect(e,n,i)},createDiagramFromGraph:function(t,e,n,i){var o,r,s,l,c,h,u,d,f,p,g,m,v,y,_,w;if(A.isUndefined(t))throw"The diagram surface is undefined.";if(A.isUndefined(e))throw"No graph specification defined.";for(A.isUndefined(n)&&(n=!0),A.isUndefined(i)&&(i=!1),o=t.element.clientWidth||200,r=t.element.clientHeight||200,s=[],h=0,u=e.nodes.length;u>h;h++)l=e.nodes[h],d=l.position,A.isUndefined(d)&&(d=A.isDefined(l.x)&&A.isDefined(l.y)?new D(l.x,l.y):new D(A.randomInteger(10,o-20),A.randomInteger(10,r-20))),f={},"0"===l.id||i&&b.deepExtend(f,{width:150*Math.random()+20,height:80*Math.random()+50,data:"rectangle",fill:{color:"#778899"}}),c=this._addShape(t,d,l.id,f),p=c.bounds(),A.isDefined(p)&&(l.x=p.x,l.y=p.y,l.width=p.width,l.height=p.height),s[l.id]=c;for(g=0;e.links.length>g;g++)m=e.links[g],v=s[m.source.id],A.isUndefined(v)||(y=s[m.target.id],A.isUndefined(y)||this._addConnection(t,v,y,{id:m.id}));if(n)for(_=new t.SpringLayout(t),_.layoutGraph(e,{limitToView:!1}),w=0;e.nodes.length>w;w++)l=e.nodes[w],c=s[l.id],c.bounds(new a(l.x,l.y,l.width,l.height))},createBalancedTree:function(t,e){var n,i,o,r,s,a,l,c,h,u;if(A.isUndefined(t)&&(t=3),A.isUndefined(e)&&(e=3),n=new k.Graph,i=-1,o=[],0>=t||0>=e)return n;for(s=new _(""+ ++i),n.addNode(s),n.root=s,o.push(s),a=0;t>a;a++){for(r=[],l=0;o.length>l;l++)for(c=o[l],h=0;e>h;h++)u=new _(""+ ++i),n.addLink(c,u),r.push(u);o=r}return n},createBalancedForest:function(t,e,n){var i,o,r,s,a,l,c,h,u,d,f;if(A.isUndefined(t)&&(t=3),A.isUndefined(e)&&(e=3),A.isUndefined(n)&&(n=5),i=new k.Graph,o=-1,r=[],0>=t||0>=e||0>=n)return i;for(a=0;n>a;a++)for(l=new _(""+ ++o),i.addNode(l),r=[l],c=0;t>c;c++){for(s=[],h=0;r.length>h;h++)for(u=r[h],d=0;e>d;d++)f=new _(""+ ++o),i.addLink(u,f),s.push(f);r=s}return i},createRandomConnectedGraph:function(t,e,n){var i,o,r,s,a,l,c,h,u,d;if(A.isUndefined(t)&&(t=40),A.isUndefined(e)&&(e=4),A.isUndefined(n)&&(n=!1),i=new k.Graph,o=-1,0>=t)return i;if(r=new _(""+ ++o),i.addNode(r),1===t)return i;if(t>1){for(s=1;t>s&&(a=i.takeRandomNode([],e),a);s++)l=i.addNode(""+s),i.addLink(a,l);if(!n&&t>1)for(c=A.randomInteger(1,t),h=0;c>h;h++)u=i.takeRandomNode([],e),d=i.takeRandomNode([],e),u&&d&&!i.areConnected(u,d)&&i.addLink(u,d);return i}},randomDiagram:function(t,e,n,i,o){var r=b.dataviz.diagram.Graph.Utils.createRandomConnectedGraph(e,n,i);x.Utils.createDiagramFromGraph(t,r,!1,o)}},b.deepExtend(k,{init:function(t){b.init(t,k.ui)},Point:D,Intersect:c,Geometry:p,Rect:a,Size:l,RectAlign:h,Matrix:d,MatrixVector:f,normalVariable:o,randomId:r,Dictionary:m,HashTable:g,Queue:v,Set:y,Node:_,Link:w,Graph:x,PathDefiner:s})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/diagram/svg.min",["kendo.drawing.min","dataviz/diagram/math.min"],t)}(function(){!function(t,e){function n(t,e){var n,i,o,r=this.options,s=!1;for(o=0;e.length>o;o++)i=e[o],n=t[i],F(n)&&r[i]!==n&&(r[i]=n,s=!0);return s}function i(t){return{x:t.x||0,y:t.y||0,width:t.width||0,height:t.height||0}}function o(t){if(t){var e=t;return V(e)&&(e={color:e}),e.color&&(e.color=r(e.color)),e}}function r(t){var e;return e=t!=W?new U.Color(t).toHex():t}function s(t,e){var n=e.x-t.x,i=e.y-t.y,o=M.util.deg(Math.atan2(i,n));return o}function a(t,e){return new U.Segment(new H.Point(t,e))}function l(t){return t?new H.Rect([t.x,t.y],[t.width,t.height]):e}var c,h,u,d,f,p,g,m,v,y,_,w,x,b,k,C,S,T,A,D,P,M=window.kendo,E=M.dataviz.diagram,B=M.Class,I=M.deepExtend,z=E.Point,L=E.Rect,R=E.Matrix,O=E.Utils,F=O.isNumber,V=O.isString,N=E.MatrixVector,H=M.geometry,U=M.drawing,j=M.util.defined,G=t.inArray,W="transparent",q={none:"none",arrowStart:"ArrowStart",filledCircle:"FilledCircle",arrowEnd:"ArrowEnd"},$=360,Y="start",X="end",Q="width",K="height",Z="x",J="y";E.Markers=q,c=B.extend({init:function(t,e){this.x=t,this.y=e},toMatrix:function(){return R.scaling(this.x,this.y)},toString:function(){return M.format("scale({0},{1})",this.x,this.y)},invert:function(){return new c(1/this.x,1/this.y)}}),h=B.extend({init:function(t,e){this.x=t,this.y=e},toMatrixVector:function(){return new N(0,0,0,0,this.x,this.y)},toMatrix:function(){return R.translation(this.x,this.y)},toString:function(){return M.format("translate({0},{1})",this.x,this.y)},plus:function(t){this.x+=t.x,this.y+=t.y},times:function(t){this.x*=t,this.y*=t},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},normalize:function(){0!==this.Length&&this.times(1/this.length())},invert:function(){return new h(-this.x,-this.y)}}),u=B.extend({init:function(t,e,n){this.x=e||0,this.y=n||0,this.angle=t},toString:function(){return this.x&&this.y?M.format("rotate({0},{1},{2})",this.angle,this.x,this.y):M.format("rotate({0})",this.angle)},toMatrix:function(){return R.rotation(this.angle,this.x,this.y)},center:function(){return new z(this.x,this.y)},invert:function(){return new u($-this.angle,this.x,this.y)}}),u.ZERO=new u(0),u.create=function(t){return new u(t.angle,t.x,t.y)},u.parse=function(t){var e=t.slice(1,t.length-1).split(","),n=e[0],i=e[1],o=e[2],r=new u(n,i,o);return r},d=B.extend({init:function(t,n,i,o,r,s){this.translate=new h(t,n),i!==e&&o!==e&&(this.scale=new c(i,o)),r!==e&&(this.rotate=s?new u(r,s.x,s.y):new u(r))},toString:function(){var t=function(t){return t?""+t:""};return t(this.translate)+t(this.rotate)+t(this.scale)},render:function(t){t._transform=this,t._renderTransform()},toMatrix:function(){var t=R.unit();return this.translate&&(t=t.times(this.translate.toMatrix())),this.rotate&&(t=t.times(this.rotate.toMatrix())),this.scale&&(t=t.times(this.scale.toMatrix())),t},invert:function(){var t,n,i=this.rotate?this.rotate.invert():e,o=i?i.toMatrix():R.unit(),r=this.scale?this.scale.invert():e,s=r?r.toMatrix():R.unit(),a=new z(-this.translate.x,-this.translate.y);return a=o.times(s).apply(a),t=new h(a.x,a.y),n=new d,n.translate=t,n.rotate=i,n.scale=r,n}}),f={_setScale:function(){var t=this.options,e=this._originWidth,n=this._originHeight,i=t.width/e,o=t.height/n;F(i)||(i=1),F(o)||(o=1),this._transform.scale=new c(i,o)},_setTranslate:function(){var t=this.options,e=t.x||0,n=t.y||0;this._transform.translate=new h(e,n)},_initSize:function(){var t=this.options,e=!1;t.autoSize!==!1&&(j(t.width)||j(t.height))&&(this._measure(!0),this._setScale(),e=!0),(j(t.x)||j(t.y))&&(this._setTranslate(),e=!0),e&&this._renderTransform()},_updateSize:function(t){var e=!1;return this.options.autoSize!==!1&&this._diffNumericOptions(t,[Q,K])&&(e=!0,this._measure(!0),this._setScale()),this._diffNumericOptions(t,[Z,J])&&(e=!0,this._setTranslate()),e&&this._renderTransform(),e}},p=B.extend({init:function(t){var e=this;e.options=I({},e.options,t),e.id=e.options.id,e._originSize=L.empty(),e._transform=new d},visible:function(t){return this.drawingContainer().visible(t)},redraw:function(t){t&&t.id&&(this.id=t.id)},position:function(t,n){var i=this.options;return j(t)?(j(n)?(i.x=t,i.y=n):t instanceof z&&(i.x=t.x,i.y=t.y),this._transform.translate=new h(i.x,i.y),this._renderTransform(),e):new z(i.x,i.y)},rotate:function(t,e){return j(t)&&(this._transform.rotate=new u(t,e.x,e.y),this._renderTransform()),this._transform.rotate||u.ZERO},drawingContainer:function(){return this.drawingElement},_renderTransform:function(){var t=this._transform.toMatrix();this.drawingContainer().transform(new H.Matrix(t.a,t.b,t.c,t.d,t.e,t.f))},_hover:function(){},_diffNumericOptions:n,_measure:function(t){var e,n,i;return!this._measured||t?(n=this._boundingBox()||new H.Rect,i=n.topLeft(),e=new L(i.x,i.y,n.width(),n.height()),this._originSize=e,this._originWidth=e.width,this._originHeight=e.height,this._measured=!0):e=this._originSize,e},_boundingBox:function(){return this.drawingElement.rawBBox()}}),g=p.extend({init:function(t){p.fn.init.call(this,t),t=this.options,t.fill=o(t.fill),t.stroke=o(t.stroke)},options:{stroke:{color:"gray",width:1},fill:{color:W}},fill:function(t,e){this._fill({color:r(t),opacity:e})},stroke:function(t,e,n){this._stroke({color:r(t),width:e,opacity:n})},redraw:function(t){var e,n;t&&(e=t.stroke,n=t.fill,e&&this._stroke(o(e)),n&&this._fill(o(n)),p.fn.redraw.call(this,t))},_hover:function(t){var e,n=this.drawingElement,i=this.options,r=i.hover;r&&r.fill&&(e=t?o(r.fill):i.fill,n.fill(e.color,e.opacity))},_stroke:function(t){var e,n=this.options;I(n,{stroke:t}),t=n.stroke,e=null,t.width>0&&(e={color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}),this.drawingElement.options.set("stroke",e)},_fill:function(t){var e,n,i,o=this.options;I(o,{fill:t||{}}),e=o.fill,e.gradient?(n=e.gradient,i="radial"===n.type?U.RadialGradient:U.LinearGradient,this.drawingElement.fill(new i(n))):this.drawingElement.fill(e.color,e.opacity)}}),m=g.extend({init:function(t){this._textColor(t),g.fn.init.call(this,t),this._font(),this._initText(),this._initSize()},options:{fontSize:15,fontFamily:"sans-serif",stroke:{width:0},fill:{color:"black"},autoSize:!0},_initText:function(){var t=this.options;this.drawingElement=new U.Text(j(t.text)?t.text:"",new H.Point,{font:t.font}),this._fill(),this._stroke()},_textColor:function(t){t&&t.color&&I(t,{fill:{color:t.color}})},_font:function(){var t=this.options;t.fontFamily&&j(t.fontSize)?t.font=t.fontSize+"px "+t.fontFamily:delete t.font},content:function(t){return this.drawingElement.content(t)},redraw:function(t){var e,n;t&&(e=!1,n=this.options,this._textColor(t),g.fn.redraw.call(this,t),(t.fontFamily||j(t.fontSize))&&(I(n,{fontFamily:t.fontFamily,fontSize:t.fontSize}),this._font(),this.drawingElement.options.set("font",n.font),e=!0),t.text&&(this.content(t.text),e=!0),!this._updateSize(t)&&e&&this._initSize())}}),I(m.fn,f),v=g.extend({init:function(t){g.fn.init.call(this,t),this._initPath(),this._setPosition()},_setPosition:function(){var t=this.options,e=t.x,n=t.y;(j(e)||j(n))&&this.position(e||0,n||0)},redraw:function(t){t&&(g.fn.redraw.call(this,t),this._diffNumericOptions(t,[Q,K])&&this._drawPath(),this._diffNumericOptions(t,[Z,J])&&this._setPosition())},_initPath:function(){var t=this.options;this.drawingElement=new U.Path({stroke:t.stroke,closed:!0}),this._fill(),this._drawPath()},_drawPath:function(){var t=this.drawingElement,e=i(this.options),n=e.width,o=e.height;t.segments.elements([a(0,0),a(n,0),a(n,o),a(0,o)])}}),y=g.extend({init:function(t){g.fn.init.call(this,t);var e=this.options.anchor;this.anchor=new H.Point(e.x,e.y),this.createElement()},options:{stroke:{color:W,width:0},fill:{color:"black"}},_transformToPath:function(t,e){var n=e.transform();return t&&n&&(t=t.transformCopy(n)),t},redraw:function(t){t&&(t.position&&(this.options.position=t.position),g.fn.redraw.call(this,t))}}),_=y.extend({options:{radius:4,anchor:{x:0,y:0}},createElement:function(){var t=this.options;this.drawingElement=new U.Circle(new H.Circle(this.anchor,t.radius),{fill:t.fill,stroke:t.stroke})},positionMarker:function(t){var e,n,i=this.options,o=i.position,r=t.segments;e=o==Y?r[0]:r[r.length-1],e&&(n=this._transformToPath(e.anchor(),t),this.drawingElement.transform(H.transform().translate(n.x,n.y)))}}),w=y.extend({options:{path:"M 0 0 L 10 5 L 0 10 L 3 5 z",anchor:{x:10,y:5}},createElement:function(){var t=this.options;this.drawingElement=U.Path.parse(t.path,{fill:t.fill,stroke:t.stroke})},positionMarker:function(t){var e,n,i=this._linePoints(t),o=i.start,r=i.end,a=H.transform();o&&a.rotate(s(o,r),r),r&&(e=this.anchor,n=r.clone().translate(-e.x,-e.y),a.translate(n.x,n.y)),this.drawingElement.transform(a)},_linePoints:function(t){var n,i,o,r,s,a=this.options,l=t.segments;return a.position==Y?(o=l[0],o&&(i=o.anchor(),n=o.controlOut(),r=l[1],!n&&r&&(n=r.anchor()))):(o=l[l.length-1],o&&(i=o.anchor(),n=o.controlIn(),s=l[l.length-2],!n&&s&&(n=s.anchor()))),i?{start:this._transformToPath(n,t),end:this._transformToPath(i,t)}:e}}),x={_getPath:function(t){var n=this.drawingElement;return n instanceof U.MultiPath&&(n=t==Y?n.paths[0]:n.paths[n.paths.length-1]),n&&n.segments.length?n:e},_normalizeMarkerOptions:function(t){var e=t.startCap,n=t.endCap;V(e)&&(t.startCap={type:e}),V(n)&&(t.endCap={type:n})},_removeMarker:function(t){var e=this._markers[t];e&&(this.drawingContainer().remove(e.drawingElement),delete this._markers[t])},_createMarkers:function(){var t=this.options;this._normalizeMarkerOptions(t),this._markers={},this._markers[Y]=this._createMarker(t.startCap,Y),this._markers[X]=this._createMarker(t.endCap,X)},_createMarker:function(t,n){var i,o,r=(t||{}).type,s=this._getPath(n);return s?(r==q.filledCircle?i=_:r==q.arrowStart||r==q.arrowEnd?i=w:this._removeMarker(n),i?(o=new i(I({},t,{position:n})),o.positionMarker(s),this.drawingContainer().append(o.drawingElement),o):e):(this._removeMarker(n),e)},_positionMarker:function(t){var e,n=this._markers[t];n&&(e=this._getPath(t),e?n.positionMarker(e):this._removeMarker(t))},_capMap:{start:"startCap",end:"endCap"},_redrawMarker:function(t,e,n){var i,o,r,s,a;return this._normalizeMarkerOptions(n),i=this.options,o=this._capMap[e],r=(i[o]||{}).type,s=n[o],a=!1,s?(i[o]=I({},i[o],s),s.type&&r!=s.type?(this._removeMarker(e),this._markers[e]=this._createMarker(i[o],e),a=!0):this._markers[e]&&this._markers[e].redraw(s)):t&&!this._markers[e]&&i[o]&&(this._markers[e]=this._createMarker(i[o],e),a=!0),a},_redrawMarkers:function(t,e){!this._redrawMarker(t,Y,e)&&t&&this._positionMarker(Y),!this._redrawMarker(t,X,e)&&t&&this._positionMarker(X)}},b=g.extend({init:function(t){g.fn.init.call(this,t),this.container=new U.Group,this._createElements(),this._initSize()},options:{autoSize:!0},drawingContainer:function(){return this.container},data:function(t){var n=this.options;return t?(n.data!=t&&(n.data=t,this._setData(t),this._initSize(),this._redrawMarkers(!0,{})),e):n.data},redraw:function(t){var e,n;t&&(g.fn.redraw.call(this,t),e=this.options,n=t.data,j(n)&&e.data!=n?(e.data=n,this._setData(n),this._updateSize(t)||this._initSize(),this._redrawMarkers(!0,t)):(this._updateSize(t),this._redrawMarkers(!1,t)))},_createElements:function(){var t=this.options;this.drawingElement=U.Path.parse(t.data||"",{stroke:t.stroke}),this._fill(),this.container.append(this.drawingElement),this._createMarkers()},_setData:function(t){var e=this.drawingElement,n=U.Path.parse(t||""),i=n.paths.slice(0);n.paths.elements([]),e.paths.elements(i)}}),I(b.fn,f),I(b.fn,x),k=g.extend({init:function(t){g.fn.init.call(this,t),this.container=new U.Group,this._initPath(),this._createMarkers()},drawingContainer:function(){return this.container},redraw:function(t){var e,n;t&&(t=t||{},e=t.from,n=t.to,e&&(this.options.from=e),n&&(this.options.to=n),e||n?(this._drawPath(),this._redrawMarkers(!0,t)):this._redrawMarkers(!1,t),g.fn.redraw.call(this,t))},_initPath:function(){var t=this.options,e=this.drawingElement=new U.Path({stroke:t.stroke});this._fill(),this._drawPath(),this.container.append(e)},_drawPath:function(){var t=this.options,e=this.drawingElement,n=t.from||new z,i=t.to||new z;e.segments.elements([a(n.x,n.y),a(i.x,i.y)])}}),I(k.fn,x),C=g.extend({init:function(t){g.fn.init.call(this,t),this.container=new U.Group,this._initPath(),this._createMarkers()},drawingContainer:function(){return this.container},points:function(t){var n=this.options;return t?(n.points=t,this._updatePath(),e):n.points},redraw:function(t){if(t){var e=t.points;g.fn.redraw.call(this,t),e&&this._pointsDiffer(e)?(this.points(e),this._redrawMarkers(!0,t)):this._redrawMarkers(!1,t)}},_initPath:function(){var t=this.options;this.drawingElement=new U.Path({stroke:t.stroke}),this._fill(),this.container.append(this.drawingElement),t.points&&this._updatePath()},_pointsDiffer:function(t){var e,n=this.options.points,i=n.length!==t.length;if(!i)for(e=0;t.length>e;e++)if(n[e].x!==t[e].x||n[e].y!==t[e].y){i=!0;break}return i},_updatePath:function(){var t,e,n=this.drawingElement,i=this.options,o=i.points,r=[];for(e=0;o.length>e;e++)t=o[e],r.push(a(t.x,t.y));n.segments.elements(r)},options:{points:[]}}),I(C.fn,x),S=p.extend({init:function(t){p.fn.init.call(this,t),this._initImage()},redraw:function(t){t&&(t.source&&this.drawingElement.src(t.source),this._diffNumericOptions(t,[Q,K,Z,J])&&this.drawingElement.rect(this._rect()),p.fn.redraw.call(this,t))},_initImage:function(){var t=this.options,e=this._rect();this.drawingElement=new U.Image(t.source,e,{})},_rect:function(){var t=i(this.options),e=new H.Point(t.x,t.y),n=new H.Size(t.width,t.height);return new H.Rect(e,n)}}),T=p.extend({init:function(t){this.children=[],p.fn.init.call(this,t),this.drawingElement=new U.Group,this._initSize()},options:{autoSize:!1},append:function(t){this.drawingElement.append(t.drawingContainer()),this.children.push(t),this._childrenChange=!0},remove:function(t){this._remove(t)&&(this._childrenChange=!0)},_remove:function(t){var n=G(t,this.children);return n>=0?(this.drawingElement.removeAt(n),this.children.splice(n,1),!0):e},clear:function(){this.drawingElement.clear(),this.children=[],this._childrenChange=!0},toFront:function(t){var e,n;for(n=0;t.length>n;n++)e=t[n],this._remove(e)&&this.append(e)},toBack:function(t){this._reorderChildren(t,0)},toIndex:function(t,e){this._reorderChildren(t,e)},_reorderChildren:function(t,e){var n,i,o,r,s,a=this.drawingElement,l=a.children.slice(0),c=this.children,h=F(e);for(n=0;t.length>n;n++)s=t[n],r=s.drawingContainer(),i=G(s,c),i>=0&&(l.splice(i,1),c.splice(i,1),o=h?e:e[n],l.splice(o,0,r),c.splice(o,0,s));a.clear(),a.append.apply(a,l)},redraw:function(t){t&&(this._childrenChange?(this._childrenChange=!1,this._updateSize(t)||this._initSize()):this._updateSize(t),p.fn.redraw.call(this,t))},_boundingBox:function(){var t,e,n,i,o=this.children;for(i=0;o.length>i;i++)e=o[i],e.visible()&&e._includeInBBox!==!1&&(n=e.drawingContainer().clippedBBox(null),n&&(t=t?L.union(t,n):n));return t}}),I(T.fn,f),A=T.extend({init:function(t,e){this.children=[],p.fn.init.call(this,e),this.drawingElement=new U.Layout(l(t),e),this._initSize()},rect:function(t){if(t)this.drawingElement.rect(l(t));else{var e=this.drawingElement.rect();if(e)return new L(e.origin.x,e.origin.y,e.size.width,e.size.height)}},reflow:function(){this.drawingElement.reflow()},redraw:function(t){M.deepExtend(this.drawingElement.options,t),T.fn.redraw.call(this,t)}}),D=g.extend({init:function(t){g.fn.init.call(this,t),this._initCircle(),this._initSize()},redraw:function(t){if(t){var e=this.options;t.center&&(I(e,{center:t.center}),this._center.move(e.center.x,e.center.y)),this._diffNumericOptions(t,["radius"])&&this._circle.setRadius(e.radius),this._updateSize(t),g.fn.redraw.call(this,t)}},_initCircle:function(){var t,e=this.options,n=e.width,i=e.height,o=e.radius;j(o)||(j(n)||(n=i),j(i)||(i=n),e.radius=o=Math.min(n,i)/2),t=e.center||{x:o,y:o},this._center=new H.Point(t.x,t.y),this._circle=new H.Circle(this._center,o),this.drawingElement=new U.Circle(this._circle,{stroke:e.stroke}),this._fill()}}),I(D.fn,f),P=B.extend({init:function(t,e){e=e||{},this.element=t,this.surface=U.Surface.create(t,e),M.isFunction(this.surface.translate)&&(this.translate=this._translate),this.drawingElement=new U.Group,this._viewBox=new L(0,0,e.width,e.height),this.size(this._viewBox)},bounds:function(){var t=this.drawingElement.clippedBBox();return new L(0,0,t.width(),t.height())},size:function(t){var e=this._viewBox;return j(t)&&(e.width=t.width,e.height=t.height,this.surface.setSize(t)),{width:e.width,height:e.height}},_translate:function(t,e){var n=this._viewBox;return j(t)&&j(e)&&(n.x=t,n.y=e,this.surface.translate({x:t,y:e})),{x:n.x,y:n.y}},draw:function(){this.surface.draw(this.drawingElement)},append:function(t){return this.drawingElement.append(t.drawingContainer()),this},remove:function(t){this.drawingElement.remove(t.drawingContainer())},insertBefore:function(){},clear:function(){this.drawingElement.clear()},destroy:function(e){this.surface.destroy(),e&&t(this.element).remove()}}),M.deepExtend(E,{init:function(t){M.init(t,E.ui)},diffNumericOptions:n,Element:p,Scale:c,Translation:h,Rotation:u,Circle:D,Group:T,Rectangle:v,Canvas:P,Path:b,Layout:A,Line:k,MarkerBase:y,ArrowMarker:w,CircleMarker:_,Polyline:C,CompositeTransform:d,TextBlock:m,Image:S,VisualBase:g})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/diagram/services.min",["kendo.drawing.min","dataviz/diagram/svg.min"],t)}(function(){!function(t,e){function n(t,e){t.isSelected?e.ctrlKey&&t.select(!1):t.diagram.select(t,{addToSelection:e.ctrlKey})}function i(t){return t.ctrlKey===!1&&t.altKey===!1&&t.shiftKey===!1}function o(t,e){var n=t!==!1;return t.key&&"none"!=t.key&&(n=e[t.key+"Key"]),n}function r(t,e){return e.charCodeAt(0)==t||e.toUpperCase().charCodeAt(0)==t}function s(t,e){var n;return-1==t.x&&-1==t.y?n=e.bottomRight():1==t.x&&1==t.y?n=e.topLeft():-1==t.x&&1==t.y?n=e.topRight():1==t.x&&-1==t.y?n=e.bottomLeft():0===t.x&&-1==t.y?n=e.bottom():0===t.x&&1==t.y?n=e.top():1==t.x&&0===t.y?n=e.left():-1==t.x&&0===t.y&&(n=e.right()),n}function a(t){var e=t.options.editable;return e&&e.drag!==!1}function l(t,e){var n,i,o,r;for(r=0;t.connectors.length>r;r++)if(n=t.connectors[r],i=n.position(),o=new q(i.x,i.y),o.inflate(st,st),o.contains(e))return n}var c,h,u,d,f,p,g,m,v,y,_,w,x,b,k,C,S,T,A,D,P,M,E,B,I,z,L,R,O,F,V,N,H=window.kendo,U=H.dataviz,j=U.diagram,G=H.Class,W=j.Group,q=j.Rect,$=j.Rectangle,Y=j.Utils,X=Y.isUndefined,Q=j.Point,K=j.Circle,Z=j.Ticker,J=H.deepExtend,tt=H.ui.Movable,et=H.support.browser,nt=H.util.defined,it=t.inArray,ot=t.proxy,rt={arrow:"default",grip:"pointer",cross:"pointer",add:"pointer",move:"move",select:"pointer",south:"s-resize",east:"e-resize",west:"w-resize",north:"n-resize",rowresize:"row-resize",colresize:"col-resize"},st=10,at="Auto",lt="Top",ct="Right",ht="Left",ut="Bottom",dt=10,ft=10,pt="dragStart",gt="drag",mt="dragEnd",vt="itemRotate",yt="itemBoundsChange",_t=5,wt=5,xt="mouseEnter",bt="mouseLeave",kt="zoomStart",Ct="zoomEnd",St=-2e4,Tt=2e4,At=.9,Dt=.93,Pt=5,Mt="transparent",Et="pan",Bt="rotated";j.Cursors=rt,c=H.Class.extend({init:function(t){this.layoutState=t,this.diagram=t.diagram},initState:function(){function t(t,e){var n=this.diagram.getShapeById(t);n&&(this.subjects.push(n),this.froms.push(n.bounds().topLeft()),this.tos.push(e.topLeft()))}this.froms=[],this.tos=[],this.subjects=[],this.layoutState.nodeMap.forEach(t,this)},update:function(t){if(!(0>=this.subjects.length))for(var e=0;this.subjects.length>e;e++)this.subjects[e].position(new Q(this.froms[e].x+(this.tos[e].x-this.froms[e].x)*t,this.froms[e].y+(this.tos[e].y-this.froms[e].y)*t))}}),h=G.extend({init:function(t,e,n){this.animate=X(n)?!1:n,this._initialState=t,this._finalState=e,this.title="Diagram layout"},undo:function(){this.setState(this._initialState)},redo:function(){this.setState(this._finalState)},setState:function(t){var e,n=t.diagram;this.animate?(t.linkMap.forEach(function(t,e){var i=n.getShapeById(t);i.visible(!1),i&&i.points(e)}),e=new Z,e.addAdapter(new c(t)),e.onComplete(function(){t.linkMap.forEach(function(t){var e=n.getShapeById(t);e.visible(!0)})}),e.play()):(t.nodeMap.forEach(function(t,e){var i=n.getShapeById(t);i&&i.position(e.topLeft())}),t.linkMap.forEach(function(t,e){var i=n.getShapeById(t);i&&i.points(e)}))}}),u=G.extend({init:function(t){this.units=[],this.title="Composite unit",t!==e&&this.units.push(t)},add:function(t){this.units.push(t)},undo:function(){for(var t=0;this.units.length>t;t++)this.units[t].undo()},redo:function(){for(var t=0;this.units.length>t;t++)this.units[t].redo()}}),d=G.extend({init:function(t,e,n){this.item=t,this._redoSource=e,this._redoTarget=n,nt(e)&&(this._undoSource=t.source()),nt(n)&&(this._undoTarget=t.target()),this.title="Connection Editing"},undo:function(){this._undoSource!==e&&this.item._updateConnector(this._undoSource,"source"),this._undoTarget!==e&&this.item._updateConnector(this._undoTarget,"target"),this.item.updateModel()},redo:function(){this._redoSource!==e&&this.item._updateConnector(this._redoSource,"source"),this._redoTarget!==e&&this.item._updateConnector(this._redoTarget,"target"),this.item.updateModel()}}),f=G.extend({init:function(t,e,n){this.item=t,this._undoSource=e,this._undoTarget=n,this._redoSource=t.source(),this._redoTarget=t.target(),this.title="Connection Editing"},undo:function(){this.item._updateConnector(this._undoSource,"source"),this.item._updateConnector(this._undoTarget,"target"),this.item.updateModel()},redo:function(){this.item._updateConnector(this._redoSource,"source"),this.item._updateConnector(this._redoTarget,"target"),this.item.updateModel()}}),p=G.extend({init:function(t){this.connection=t,this.diagram=t.diagram,this.targetConnector=t.targetConnector,this.title="Delete connection"},undo:function(){this.diagram._addConnection(this.connection,!1)},redo:function(){this.diagram.remove(this.connection,!1)}}),g=G.extend({init:function(t){this.shape=t,this.diagram=t.diagram,this.title="Deletion"},undo:function(){this.diagram._addShape(this.shape,!1),this.shape.select(!1)},redo:function(){this.shape.select(!1),this.diagram.remove(this.shape,!1)}}),m=G.extend({init:function(t,e,n){var i,o;for(this.shapes=t,this.undoStates=e,this.title="Transformation",this.redoStates=[],this.adorner=n,i=0;this.shapes.length>i;i++)o=this.shapes[i],this.redoStates.push(o.bounds())},undo:function(){var t,e;for(t=0;this.shapes.length>t;t++)e=this.shapes[t],e.bounds(this.undoStates[t]),e.hasOwnProperty("layout")&&e.layout(e,this.redoStates[t],this.undoStates[t]),e.updateModel();this.adorner&&(this.adorner.refreshBounds(),
this.adorner.refresh())},redo:function(){var t,e;for(t=0;this.shapes.length>t;t++)e=this.shapes[t],e.bounds(this.redoStates[t]),e.hasOwnProperty("layout")&&e.layout(e,this.undoStates[t],this.redoStates[t]),e.updateModel();this.adorner&&(this.adorner.refreshBounds(),this.adorner.refresh())}}),v=G.extend({init:function(t,e){this.connection=t,this.diagram=e,this.title="New connection"},undo:function(){this.diagram.remove(this.connection,!1)},redo:function(){this.diagram._addConnection(this.connection,!1)}}),y=G.extend({init:function(t,e){this.shape=t,this.diagram=e,this.title="New shape"},undo:function(){this.diagram.deselect(),this.diagram.remove(this.shape,!1)},redo:function(){this.diagram._addShape(this.shape,!1)}}),_=G.extend({init:function(t,e,n){this.initial=t,this.finalPos=e,this.diagram=n,this.title="Pan Unit"},undo:function(){this.diagram.pan(this.initial)},redo:function(){this.diagram.pan(this.finalPos)}}),w=G.extend({init:function(t,e,n){var i,o;for(this.shapes=e,this.undoRotates=n,this.title="Rotation",this.redoRotates=[],this.redoAngle=t._angle,this.adorner=t,this.center=t._innerBounds.center(),i=0;this.shapes.length>i;i++)o=this.shapes[i],this.redoRotates.push(o.rotate().angle)},undo:function(){var t,e;for(t=0;this.shapes.length>t;t++)e=this.shapes[t],e.rotate(this.undoRotates[t],this.center,!1),e.hasOwnProperty("layout")&&e.layout(e),e.updateModel();this.adorner&&(this.adorner._initialize(),this.adorner.refresh())},redo:function(){var t,e;for(t=0;this.shapes.length>t;t++)e=this.shapes[t],e.rotate(this.redoRotates[t],this.center,!1),e.hasOwnProperty("layout")&&e.layout(e),e.updateModel();this.adorner&&(this.adorner._initialize(),this.adorner.refresh())}}),x=G.extend({init:function(t,e,n){this.diagram=t,this.indices=n,this.items=e,this.title="Rotate Unit"},undo:function(){this.diagram._toIndex(this.items,this.indices)},redo:function(){this.diagram.toFront(this.items,!1)}}),b=G.extend({init:function(t,e,n){this.diagram=t,this.indices=n,this.items=e,this.title="Rotate Unit"},undo:function(){this.diagram._toIndex(this.items,this.indices)},redo:function(){this.diagram.toBack(this.items,!1)}}),k=H.Observable.extend({init:function(t){H.Observable.fn.init.call(this,t),this.bind(this.events,t),this.stack=[],this.index=0,this.capacity=100},events:["undone","redone"],begin:function(){this.composite=new u},cancel:function(){this.composite=e},commit:function(t){this.composite.units.length>0&&this._restart(this.composite,t),this.composite=e},addCompositeItem:function(t){this.composite?this.composite.add(t):this.add(t)},add:function(t,e){this._restart(t,e)},pop:function(){this.index>0&&(this.stack.pop(),this.index--)},count:function(){return this.stack.length},undo:function(){this.index>0&&(this.index--,this.stack[this.index].undo(),this.trigger("undone"))},redo:function(){this.stack.length>0&&this.stack.length>this.index&&(this.stack[this.index].redo(),this.index++,this.trigger("redone"))},_restart:function(t,e){this.stack.splice(this.index,this.stack.length-this.index),this.stack.push(t),e!==!1?this.redo():this.index++,this.stack.length>this.capacity&&(this.stack.splice(0,this.stack.length-this.capacity),this.index=this.capacity)},clear:function(){this.stack=[],this.index=0}}),C=G.extend({init:function(t){this.toolService=t},start:function(){},move:function(){},end:function(){},tryActivate:function(){return!1},getCursor:function(){return rt.arrow}}),S=C.extend({init:function(e){var n,i,o,r,s=this,a=H.support.mobileOS?Dt:At;C.fn.init.call(s,e),n=s.toolService.diagram,i=n.canvas,o=n.scroller=s.scroller=t(n.scrollable).kendoMobileScroller({friction:a,velocityMultiplier:Pt,mousewheelScrolling:!1,zoom:!1,scroll:ot(s._move,s)}).data("kendoMobileScroller"),i.translate&&(s.movableCanvas=new tt(i.element)),r=function(t,e,n){t.makeVirtual(),t.virtualSize(e||St,n||Tt)},r(o.dimensions.x),r(o.dimensions.y),o.disable()},tryActivate:function(t,e){var n=this.toolService,o=n.diagram.options.pannable,r=e.ctrlKey;return nt(o.key)&&(r=o.key&&"none"!=o.key?e[o.key+"Key"]&&!(e.ctrlKey&&nt(n.hoveredItem)):i(e)),o!==!1&&r&&!nt(n.hoveredAdorner)&&!nt(n._hoveredConnector)},start:function(){this.scroller.enable()},move:function(){},_move:function(t){var e=this,n=e.toolService.diagram,i=n.canvas,o=new Q(t.scrollLeft,t.scrollTop);i.translate?(n._storePan(o.times(-1)),e.movableCanvas.moveTo(o),i.translate(o.x,o.y)):o=o.plus(n._pan.times(-1)),n.trigger(Et,{pan:o})},end:function(){this.scroller.disable()},getCursor:function(){return rt.move}}),T=G.extend({init:function(t){this.toolService=t},tryActivate:function(){return!0},start:function(t,e){var i=this.toolService,r=i.diagram,s=i.hoveredItem,a=r.options.selectable;s&&(o(a,e)&&n(s,e),s.adorner&&(this.adorner=s.adorner,this.handle=this.adorner._hitTest(t))),this.handle||(this.handle=r._resizingAdorner._hitTest(t),this.handle&&(this.adorner=r._resizingAdorner)),this.adorner&&(this.adorner.isDragHandle(this.handle)&&r.trigger(pt,{shapes:this.adorner.shapes,connections:[]})?(i.startPoint=t,i.end(t)):this.adorner.start(t))},move:function(t){this.adorner&&(this.adorner.move(this.handle,t),this.adorner.isDragHandle(this.handle)&&this.toolService.diagram.trigger(gt,{shapes:this.adorner.shapes,connections:[]}))},end:function(t,n){var i,o=this.toolService.diagram,r=this.toolService,s=this.adorner;s&&(s.isDragHandle(this.handle)&&o.trigger(mt,{shapes:s.shapes,connections:[]})?s.cancel():(i=s.stop(),i&&o.undoRedoService.add(i,!1))),r.hoveredItem&&this.toolService.triggerClick({item:r.hoveredItem,point:t,meta:n}),this.adorner=e,this.handle=e},getCursor:function(t){return this.toolService.hoveredItem?this.toolService.hoveredItem._getCursor(t):rt.arrow}}),A=G.extend({init:function(t){this.toolService=t},tryActivate:function(t,e){var n=this.toolService,i=o(n.diagram.options.selectable,e);return i&&!nt(n.hoveredItem)&&!nt(n.hoveredAdorner)},start:function(t){var e=this.toolService.diagram;e.deselect(),e.selector.start(t)},move:function(t){var e=this.toolService.diagram;e.selector.move(t)},end:function(t,e){var n=this.toolService.diagram,i=this.toolService.hoveredItem,o=n.selector.bounds();i&&i.isSelected||e.ctrlKey||n.deselect(),o.isEmpty()||n.selectArea(o),n.selector.end()},getCursor:function(){return rt.arrow}}),D=G.extend({init:function(t){this.toolService=t,this.type="ConnectionTool"},tryActivate:function(){return this.toolService._hoveredConnector},start:function(t,e){var i=this.toolService.diagram,o=this.toolService._hoveredConnector,r=i._createConnection({},o._c,t);a(r)&&!i.trigger(pt,{shapes:[],connections:[r]})&&i._addConnection(r)?(this.toolService._connectionManipulation(r,o._c.shape,!0),this.toolService._removeHover(),n(this.toolService.activeConnection,e)):(r.source(null),this.toolService.end(t))},move:function(t){var e=this.toolService,n=e.activeConnection;return n.target(t),e.diagram.trigger(gt,{shapes:[],connections:[n]}),!0},end:function(t){var e,n=this.toolService,i=n.diagram,o=n.activeConnection,r=n.hoveredItem,s=n._hoveredConnector;o&&(e=s&&s._c!=o.sourceConnector?s._c:r&&r instanceof j.Shape?r.getConnector(at)||r.getConnector(t):t,o.target(e),i.trigger(mt,{shapes:[],connections:[o]})?(i.remove(o,!1),i.undoRedoService.pop()):(o.updateModel(),i._syncConnectionChanges()),n._connectionManipulation())},getCursor:function(){return rt.arrow}}),P=G.extend({init:function(t){this.toolService=t,this.type="ConnectionTool"},tryActivate:function(t,e){var n=this.toolService,i=n.diagram,r=i.options.selectable,s=n.hoveredItem,a=o(r,e)&&s&&s.path&&!(s.isSelected&&e.ctrlKey);return a&&(this._c=s),a},start:function(t,e){var i,o=this._c;n(o,e),i=o.adorner,a(o)&&i&&!this.toolService.diagram.trigger(pt,{shapes:[],connections:[o]})?(this.handle=i._hitTest(t),i.start(t)):(this.toolService.startPoint=t,this.toolService.end(t))},move:function(t){var n=this._c.adorner;return a(this._c)&&n?(n.move(this.handle,t),this.toolService.diagram.trigger(gt,{shapes:[],connections:[this._c]}),!0):e},end:function(t,e){var n,i=this._c,o=i.adorner,r=this.toolService,s=r.diagram;o&&(r.triggerClick({item:i,point:t,meta:e}),a(i)&&(n=o.stop(t),s.trigger(mt,{shapes:[],connections:[i]})?n.undo():(s.undoRedoService.add(n,!1),i.updateModel(),s._syncConnectionChanges())))},getCursor:function(){return rt.move}}),M=G.extend({init:function(t){this.diagram=t,this.tools=[new S(this),new P(this),new D(this),new A(this),new T(this)],this.activeTool=e},start:function(t,e){return e=J({},e),this.activeTool&&this.activeTool.end(t,e),this._updateHoveredItem(t),this._activateTool(t,e),this.activeTool.start(t,e),this._updateCursor(t),this.diagram.focus(),this.startPoint=t,!0},move:function(t,e){e=J({},e);var n=!0;return this.activeTool&&(n=this.activeTool.move(t,e)),n&&this._updateHoveredItem(t),this._updateCursor(t),!0},end:function(t,n){return n=J({},n),this.activeTool&&this.activeTool.end(t,n),this.activeTool=e,this._updateCursor(t),!0},keyDown:function(t,e){var n,i=this.diagram;if(e=J({ctrlKey:!1,metaKey:!1,altKey:!1},e),!e.ctrlKey&&!e.metaKey||e.altKey){if(46===t||8===t)return n=this.diagram._triggerRemove(i.select()),n.length&&(this.diagram.remove(n,!0),this.diagram._syncChanges(),this.diagram._destroyToolBar()),!0;if(27===t)return this._discardNewConnection(),i.deselect(),i._destroyToolBar(),!0}else{if(r(t,"a"))return i.selectAll(),i._destroyToolBar(),!0;if(r(t,"z"))return i.undo(),i._destroyToolBar(),!0;if(r(t,"y"))return i.redo(),i._destroyToolBar(),!0;r(t,"c")?(i.copy(),i._destroyToolBar()):r(t,"x")?(i.cut(),i._destroyToolBar()):r(t,"v")?(i.paste(),i._destroyToolBar()):r(t,"l")?(i.layout(),i._destroyToolBar()):r(t,"d")&&(i._destroyToolBar(),i.copy(),i.paste())}},wheel:function(t,e){var n=this.diagram,i=e.delta,o=n.zoom(),r=n.options,s=r.zoomRate,a={point:t,meta:e,zoom:o};if(!n.trigger(kt,a))return 0>i?o+=s:o-=s,o=H.dataviz.round(Math.max(r.zoomMin,Math.min(r.zoomMax,o)),2),a.zoom=o,n.zoom(o,a),n.trigger(Ct,a),!0},setTool:function(t,e){t.toolService=this,this.tools[e]=t},triggerClick:function(t){this.startPoint.equals(t.point)&&this.diagram.trigger("click",t)},_discardNewConnection:function(){this.newConnection&&(this.diagram.remove(this.newConnection),this.newConnection=e)},_activateTool:function(t,e){var n,i;for(n=0;this.tools.length>n;n++)if(i=this.tools[n],i.tryActivate(t,e)){this.activeTool=i;break}},_updateCursor:function(t){var e=this.diagram.element,n=this.activeTool?this.activeTool.getCursor(t):this.hoveredAdorner?this.hoveredAdorner._getCursor(t):this.hoveredItem?this.hoveredItem._getCursor(t):rt.arrow;e.css({cursor:n}),et.msie&&7==et.version&&(e[0].style.cssText=e[0].style.cssText)},_connectionManipulation:function(t,n,i){this.activeConnection=t,this.disabledShape=n,this.newConnection=i?this.activeConnection:e},_updateHoveredItem:function(t){var n=this._hitTest(t),i=this.diagram;n==this.hoveredItem||this.disabledShape&&n==this.disabledShape||(this.hoveredItem&&(i.trigger(bt,{item:this.hoveredItem}),this.hoveredItem._hover(!1)),n&&n.options.enable?(i.trigger(xt,{item:n}),this.hoveredItem=n,this.hoveredItem._hover(!0)):this.hoveredItem=e)},_removeHover:function(){this.hoveredItem&&(this.hoveredItem._hover(!1),this.hoveredItem=e)},_hitTest:function(t){var n,i,o,r,s=this.diagram;if(this._hoveredConnector&&(this._hoveredConnector._hover(!1),this._hoveredConnector=e),s._connectorsAdorner._visible&&(n=s._connectorsAdorner._hitTest(t)))return n;if(n=this.diagram._resizingAdorner._hitTest(t)){if(this.hoveredAdorner=s._resizingAdorner,0!==n.x||0!==n.y)return;n=e}else this.hoveredAdorner=e;if(!this.activeTool||"ConnectionTool"!==this.activeTool.type){for(r=[],o=0;s._selectedItems.length>o;o++)i=s._selectedItems[o],i instanceof j.Connection&&r.push(i);n=this._hitTestItems(r,t)}return n||this._hitTestElements(t)},_hitTestElements:function(t){var e,n,i,o,r=this.diagram,s=this._hitTestItems(r.shapes,t),a=this._hitTestItems(r.connections,t);return this.activeTool&&"ConnectionTool"==this.activeTool.type||!s||!a||l(s,t)||(n=r.mainLayer,i=it(s.visual,n.children),o=it(a.visual,n.children),e=i>o?s:a),e||s||a},_hitTestItems:function(t,e){var n,i,o;for(n=t.length-1;n>=0;n--)if(i=t[n],o=i._hitTest(e))return o}}),E=H.Class.extend({init:function(){}}),B=E.extend({init:function(t){var e=this;E.fn.init.call(e),this.connection=t},hitTest:function(t){var e=this.getBounds().inflate(st);return e.contains(t)?j.Geometry.distanceToPolyline(t,this.connection.allPoints())<st:!1},getBounds:function(){var t,e=this.connection.allPoints(),n=e[0],i=e[e.length-1],o=Math.max(n.x,i.x),r=Math.min(n.x,i.x),s=Math.min(n.y,i.y),a=Math.max(n.y,i.y);for(t=1;e.length-1>t;++t)o=Math.max(o,e[t].x),r=Math.min(r,e[t].x),s=Math.min(s,e[t].y),a=Math.max(a,e[t].y);return new q(r,s,o-r,a-s)}}),I=B.extend({init:function(t){var e=this;B.fn.init.call(e),this.connection=t},route:function(){}}),z=B.extend({SAME_SIDE_DISTANCE_RATIO:5,init:function(t){var e=this;B.fn.init.call(e),this.connection=t},routePoints:function(t,e,n,i){var o;return o=n&&i?this._connectorPoints(t,e,n,i):this._floatingPoints(t,e,n)},route:function(){var t=this.connection._resolvedSourceConnector,e=this.connection._resolvedTargetConnector,n=this.connection.sourcePoint(),i=this.connection.targetPoint(),o=this.routePoints(n,i,t,e);this.connection.points(o)},_connectorSides:[{name:"Top",axis:"y",boundsPoint:"topLeft",secondarySign:1},{name:"Left",axis:"x",boundsPoint:"topLeft",secondarySign:1},{name:"Bottom",axis:"y",boundsPoint:"bottomRight",secondarySign:-1},{name:"Right",axis:"x",boundsPoint:"bottomRight",secondarySign:-1}],_connectorSide:function(t,e){var n,i,o,r,s,a=t.position(),l=t.shape.bounds(Bt),c={topLeft:l.topLeft(),bottomRight:l.bottomRight()},h=this._connectorSides,u=H.util.MAX_NUM;for(s=0;h.length>s;s++)r=h[s],o=r.axis,n=Math.round(Math.abs(a[o]-c[r.boundsPoint][o])),u>n?(u=n,i=r):n===u&&(a[o]-e[o])*r.secondarySign>(a[i.axis]-e[i.axis])*i.secondarySign&&(i=r);return i.name},_sameSideDistance:function(t){var e=t.shape.bounds(Bt);return Math.min(e.width,e.height)/this.SAME_SIDE_DISTANCE_RATIO},_connectorPoints:function(t,e,n,i){var o,r,s=this._connectorSide(n,e),a=this._connectorSide(i,t),l=e.x-t.x,c=e.y-t.y,h=this._sameSideDistance(n),u=[];return s===lt||s==ut?a==lt||a==ut?s==a?(r=s==lt?Math.min(t.y,e.y)-h:Math.max(t.y,e.y)+h,u=[new Q(t.x,r),new Q(e.x,r)]):u=[new Q(t.x,t.y+c/2),new Q(e.x,t.y+c/2)]:u=[new Q(t.x,e.y)]:a==ht||a==ct?s==a?(o=s==ht?Math.min(t.x,e.x)-h:Math.max(t.x,e.x)+h,u=[new Q(o,t.y),new Q(o,e.y)]):u=[new Q(t.x+l/2,t.y),new Q(t.x+l/2,t.y+c)]:u=[new Q(e.x,t.y)],u},_floatingPoints:function(t,e,n){var i,o,r,s=n?this._connectorSide(n,e):null,a=this._startHorizontal(t,e,s),l=[t,t,e,e],c=e.x-t.x,h=e.y-t.y,u=l.length;for(r=1;u-1>r;++r)a?r%2!==0?(i=c/(u/2),o=0):(i=0,o=h/((u-1)/2)):r%2!==0?(i=0,o=h/(u/2)):(i=c/((u-1)/2),o=0),l[r]=new Q(l[r-1].x+i,l[r-1].y+o);return r--,l[u-2]=a&&r%2!==0||!a&&r%2===0?new Q(l[u-1].x,l[u-2].y):new Q(l[u-2].x,l[u-1].y),[l[1],l[2]]},_startHorizontal:function(t,e,n){var i;return i=null===n||n!==ct&&n!==ht?Math.abs(t.x-e.x)>Math.abs(t.y-e.y):!0}}),L=G.extend({init:function(t,e){var n=this;n.diagram=t,n.options=J({},n.options,e),n.visual=new W,n.diagram._adorners.push(n)},refresh:function(){}}),R=L.extend({init:function(t,e){var n,i,o,r=this;r.connection=t,n=r.connection.diagram,r._ts=n.toolService,L.fn.init.call(r,n,e),i=r.connection.sourcePoint(),o=r.connection.targetPoint(),r.spVisual=new K(J(r.options.handles,{center:i})),r.epVisual=new K(J(r.options.handles,{center:o})),r.visual.append(r.spVisual),r.visual.append(r.epVisual)},options:{handles:{}},_getCursor:function(){return rt.move},start:function(t){switch(this.handle=this._hitTest(t),this.startPoint=t,this._initialSource=this.connection.source(),this._initialTarget=this.connection.target(),this.handle){case-1:this.connection.targetConnector&&this._ts._connectionManipulation(this.connection,this.connection.targetConnector.shape);break;case 1:this.connection.sourceConnector&&this._ts._connectionManipulation(this.connection,this.connection.sourceConnector.shape)}},move:function(t,e){switch(t){case-1:this.connection.source(e);break;case 1:this.connection.target(e);break;default:var n=e.minus(this.startPoint);this.startPoint=e,this.connection.sourceConnector||this.connection.source(this.connection.sourcePoint().plus(n)),this.connection.targetConnector||this.connection.target(this.connection.targetPoint().plus(n))}return this.refresh(),!0},stop:function(t){var n,i=this.diagram.toolService,o=i.hoveredItem;return n=i._hoveredConnector?i._hoveredConnector._c:o&&o instanceof j.Shape?o.getConnector(at)||o.getConnector(t):t,-1===this.handle?this.connection.source(n):1===this.handle&&this.connection.target(n),this.handle=e,this._ts._connectionManipulation(),new f(this.connection,this._initialSource,this._initialTarget)},_hitTest:function(t){var e=this.connection.sourcePoint(),n=this.connection.targetPoint(),i=this.options.handles.width/2,o=this.options.handles.height/2,r=new q(e.x,e.y).inflate(i,o),s=new q(n.x,n.y).inflate(i,o);return r.contains(t)?-1:s.contains(t)?1:0},refresh:function(){this.spVisual.redraw({center:this.diagram.modelToLayer(this.connection.sourcePoint())}),this.epVisual.redraw({center:this.diagram.modelToLayer(this.connection.targetPoint())})}}),O=L.extend({init:function(t,e){var n=this;L.fn.init.call(n,t,e),n._refreshHandler=function(t){t.item==n.shape&&n.refresh()}},show:function(t){var e,n,i,o=this;for(o._visible=!0,o.shape=t,o.diagram.bind(yt,o._refreshHandler),e=t.connectors.length,o.connectors=[],o.visual.clear(),n=0;e>n;n++)i=new N(t.connectors[n]),o.connectors.push(i),o.visual.append(i.visual);o.visual.visible(!0),o.refresh()},destroy:function(){var t=this;t.diagram.unbind(yt,t._refreshHandler),t.shape=e,t._visible=e,t.visual.visible(!1)},_hitTest:function(t){var e,n;for(n=0;this.connectors.length>n;n++)if(e=this.connectors[n],e._hitTest(t)){e._hover(!0),this.diagram.toolService._hoveredConnector=e;break}},refresh:function(){if(this.shape){var e=this.shape.bounds();e=this.diagram.modelToLayer(e),this.visual.position(e.topLeft()),t.each(this.connectors,function(){this.refresh()})}}}),F=L.extend({init:function(t,e){var n=this;L.fn.init.call(n,t,e),n._manipulating=!1,n.map=[],n.shapes=[],n._initSelection(),n._createHandles(),n.redraw(),n.diagram.bind("select",function(t){n._initialize(t.selected)}),n._refreshHandler=function(){n._internalChange||(n.refreshBounds(),n.refresh())},n._rotatedHandler=function(){1==n.shapes.length&&(n._angle=n.shapes[0].rotate().angle),n._refreshHandler()},n.diagram.bind(yt,n._refreshHandler).bind(vt,n._rotatedHandler),n.refreshBounds(),n.refresh()},options:{handles:{fill:{color:"#fff"},stroke:{color:"#282828"},height:7,width:7,hover:{fill:{color:"#282828"},stroke:{color:"#282828"}}},selectable:{stroke:{color:"#778899",width:1,dashType:"dash"},fill:{color:Mt}},offset:10},_initSelection:function(){var t=this,e=t.diagram,n=e.options.selectable,i=J({},t.options.selectable,n);t.rect=new $(i),t.visual.append(t.rect)},_resizable:function(){return this.options.editable&&this.options.editable.resize!==!1},_handleOptions:function(){return(this.options.editable.resize||{}).handles||this.options.handles},_createHandles:function(){var t,e,n,i;if(this._resizable())for(t=this._handleOptions(),i=-1;1>=i;i++)for(n=-1;1>=n;n++)(0!==i||0!==n)&&(e=new $(t),e.drawingElement._hover=ot(this._hover,this),this.map.push({x:i,y:n,visual:e}),this.visual.append(e))},bounds:function(t){return t?(this._innerBounds=t.clone(),this._bounds=this.diagram.modelToLayer(t).inflate(this.options.offset,this.options.offset),e):this._bounds},_hitTest:function(t){var n,i,o,r,s=this.diagram.modelToLayer(t),a=this.map.length;if(this._angle&&(s=s.clone().rotate(this._bounds.center(),this._angle)),this._resizable())for(n=0;a>n;n++)if(r=this.map[n],i=new Q(r.x,r.y),o=this._getHandleBounds(i),o.offset(this._bounds.x,this._bounds.y),o.contains(s))return i;return this._bounds.contains(s)?new Q(0,0):e},_getHandleBounds:function(t){if(this._resizable()){var e=this._handleOptions(),n=e.width,i=e.height,o=new q(0,0,n,i);return 0>t.x?o.x=-n/2:0===t.x?o.x=Math.floor(this._bounds.width/2)-n/2:t.x>0&&(o.x=this._bounds.width+1-n/2),0>t.y?o.y=-i/2:0===t.y?o.y=Math.floor(this._bounds.height/2)-i/2:t.y>0&&(o.y=this._bounds.height+1-i/2),o}},_getCursor:function(t){var e,n=this._hitTest(t);if(n&&n.x>=-1&&1>=n.x&&n.y>=-1&&1>=n.y&&this._resizable()){if(e=this._angle,e&&(e=360-e,n.rotate(new Q(0,0),e),n=new Q(Math.round(n.x),Math.round(n.y))),-1==n.x&&-1==n.y)return"nw-resize";if(1==n.x&&1==n.y)return"se-resize";if(-1==n.x&&1==n.y)return"sw-resize";if(1==n.x&&-1==n.y)return"ne-resize";if(0===n.x&&-1==n.y)return"n-resize";if(0===n.x&&1==n.y)return"s-resize";if(1==n.x&&0===n.y)return"e-resize";if(-1==n.x&&0===n.y)return"w-resize"}return this._manipulating?rt.move:rt.select},_initialize:function(){var t,e,n=this,i=n.diagram.select();for(n.shapes=[],t=0;i.length>t;t++)e=i[t],e instanceof j.Shape&&(n.shapes.push(e),e._rotationOffset=new Q);n._angle=1==n.shapes.length?n.shapes[0].rotate().angle:0,n._startAngle=n._angle,n._rotates(),n._positions(),n.refreshBounds(),n.refresh(),n.redraw()},_rotates:function(){var t,e,n=this;for(n.initialRotates=[],t=0;n.shapes.length>t;t++)e=n.shapes[t],n.initialRotates.push(e.rotate().angle)},_positions:function(){var t,e,n=this;for(n.initialStates=[],t=0;n.shapes.length>t;t++)e=n.shapes[t],n.initialStates.push(e.bounds())},_hover:function(t,e){if(this._resizable()){var n=this._handleOptions(),i=n.hover,o=n.stroke,r=n.fill;t&&Y.isDefined(i.stroke)&&(o=J({},o,i.stroke)),t&&Y.isDefined(i.fill)&&(r=i.fill),e.stroke(o.color,o.width,o.opacity),e.fill(r.color,r.opacity)}},start:function(t){var e,n;for(this._sp=t,this._cp=t,this._lp=t,this._manipulating=!0,this._internalChange=!0,this.shapeStates=[],e=0;this.shapes.length>e;e++)n=this.shapes[e],this.shapeStates.push(n.bounds())},redraw:function(){var t,e,n=this._resizable();for(t=0;this.map.length>t;t++)e=this.map[t],e.visual.visible(n)},angle:function(t){return nt(t)&&(this._angle=t),this._angle},rotate:function(){var t,e,n=this._innerBounds.center(),i=this.angle();for(this._internalChange=!0,t=0;this.shapes.length>t;t++)e=this.shapes[t],i=(i+this.initialRotates[t]-this._startAngle)%360,e.rotate(i,n);this.refresh()},move:function(t,n){var i,o,r,l,c,h,u,d,f,p,g,m,v,y,_=new Q,w=new Q,x=0;if(-2===t.y&&-1===t.x){for(l=this._innerBounds.center(),this._angle=this._truncateAngle(Y.findAngle(l,n)),h=0;this.shapes.length>h;h++)c=this.shapes[h],u=(this._angle+this.initialRotates[h]-this._startAngle)%360,c.rotate(u,l),c.hasOwnProperty("layout")&&c.layout(c),this._rotating=!0;this.refresh()}else{if(this.shouldSnap()){if(m=this._truncateDistance(n.minus(this._lp)),0===m.x&&0===m.y)return this._cp=n,e;i=m,this._lp=new Q(this._lp.x+m.x,this._lp.y+m.y)}else i=n.minus(this._cp);for(this.isDragHandle(t)?(w=_=i,o=!0):(this._angle&&i.rotate(new Q(0,0),this._angle),-1==t.x?_.x=i.x:1==t.x&&(w.x=i.x),-1==t.y?_.y=i.y:1==t.y&&(w.y=i.y)),o||(f=s(t,this._innerBounds),p=(this._innerBounds.width+i.x*t.x)/this._innerBounds.width,g=(this._innerBounds.height+i.y*t.y)/this._innerBounds.height),h=0;this.shapes.length>h;h++){if(c=this.shapes[h],r=c.bounds(),o){if(!a(c))continue;d=this._displaceBounds(r,_,w,o)}else d=r.clone(),d.scale(p,g,f,this._innerBounds.center(),c.rotate().angle),v=d.center(),v.rotate(r.center(),-this._angle),d=new q(v.x-d.width/2,v.y-d.height/2,d.width,d.height);d.width>=c.options.minWidth&&d.height>=c.options.minHeight&&(y=r,c.bounds(d),c.hasOwnProperty("layout")&&c.layout(c,y,d),(y.width!==d.width||y.height!==d.height)&&c.rotate(c.rotate().angle),x+=1)}x&&(x==h?(d=this._displaceBounds(this._innerBounds,_,w,o),this.bounds(d)):this.refreshBounds(),this.refresh()),this._positions()}this._cp=n},isDragHandle:function(t){return 0===t.x&&0===t.y},cancel:function(){var t,n=this.shapes,i=this.shapeStates;for(t=0;n.length>t;t++)n[t].bounds(i[t]);this.refreshBounds(),this.refresh(),this._manipulating=e,this._internalChange=e,this._rotating=e},_truncatePositionToGuides:function(t){return this.diagram.ruler?this.diagram.ruler.truncatePositionToGuides(t):t},_truncateSizeToGuides:function(t){return this.diagram.ruler?this.diagram.ruler.truncateSizeToGuides(t):t},_truncateAngle:function(t){var e=this.snapOptions(),n=Math.max(e.angle||ft,wt);return e?Math.floor(t%360/n)*n:t%360},_truncateDistance:function(t){var e,n;return t instanceof j.Point?new j.Point(this._truncateDistance(t.x),this._truncateDistance(t.y)):(e=this.snapOptions()||{},n=Math.max(e.size||dt,_t),e?Math.floor(t/n)*n:t)},snapOptions:function(){var t=this.diagram.options.editable,e=((t||{}).drag||{}).snap||{};return e},shouldSnap:function(){var t=this.diagram.options.editable,e=(t||{}).drag,n=(e||{}).snap;return t!==!1&&e!==!1&&n!==!1},_displaceBounds:function(t,e,n,i){var o,r=t.topLeft().plus(e),s=t.bottomRight().plus(n),a=q.fromPoints(r,s);return i||(o=a.center(),o.rotate(t.center(),-this._angle),a=new q(o.x-a.width/2,o.y-a.height/2,a.width,a.height)),a},stop:function(){var t,n,i,o;if(this._cp!=this._sp)if(this._rotating)t=new w(this,this.shapes,this.initialRotates),this._rotating=!1;else if(this._diffStates()){if(this.diagram.ruler)for(n=0;this.shapes.length>n;n++)i=this.shapes[n],o=i.bounds(),o=this._truncateSizeToGuides(this._truncatePositionToGuides(o)),i.bounds(o),this.refreshBounds(),this.refresh();for(n=0;this.shapes.length>n;n++)i=this.shapes[n],i.updateModel();t=new m(this.shapes,this.shapeStates,this),this.diagram._syncShapeChanges()}return this._manipulating=e,this._internalChange=e,this._rotating=e,t},_diffStates:function(){var t,e=this.shapes,n=this.shapeStates;for(t=0;e.length>t;t++)if(!e[t].bounds().equals(n[t]))return!0;return!1},refreshBounds:function(){var t=1==this.shapes.length?this.shapes[0].bounds().clone():this.diagram.boundingBox(this.shapes,!0);this.bounds(t)},refresh:function(){var e,n,i,o,r=this;this.shapes.length>0?(n=this.bounds(),this.visual.visible(!0),this.visual.position(n.topLeft()),t.each(this.map,function(){e=r._getHandleBounds(new Q(this.x,this.y)),this.visual.position(e.topLeft())}),this.visual.position(n.topLeft()),i=new Q(n.width/2,n.height/2),this.visual.rotate(this._angle,i),this.rect.redraw({width:n.width,height:n.height}),this.rotationThumb&&(o=this.options.editable.rotate.thumb,this._rotationThumbBounds=new q(n.center().x,n.y+o.y,0,0).inflate(o.width),this.rotationThumb.redraw({x:n.width/2-o.width/2}))):this.visual.visible(!1)}}),V=G.extend({init:function(t){var e=t.options.selectable;this.options=J({},this.options,e),this.visual=new $(this.options),this.diagram=t},options:{stroke:{color:"#778899",width:1,dashType:"dash"},fill:{color:Mt}},start:function(t){this._sp=this._ep=t,this.refresh(),this.diagram._adorn(this,!0)},end:function(){this._sp=this._ep=e,this.diagram._adorn(this,!1)},bounds:function(t){return t&&(this._bounds=t),this._bounds},move:function(t){this._ep=t,this.refresh()},refresh:function(){if(this._sp){var t=q.fromPoints(this.diagram.modelToLayer(this._sp),this.diagram.modelToLayer(this._ep));this.bounds(q.fromPoints(this._sp,this._ep)),this.visual.position(t.topLeft()),this.visual.redraw({height:t.height+1,width:t.width+1})}}}),N=G.extend({init:function(t){this.options=J({},t.options),this._c=t,this.visual=new K(this.options),this.refresh()},_hover:function(t){var e=this.options,n=e.hover,i=e.stroke,o=e.fill;t&&Y.isDefined(n.stroke)&&(i=J({},i,n.stroke)),t&&Y.isDefined(n.fill)&&(o=n.fill),this.visual.redraw({stroke:i,fill:o})},refresh:function(){var t=this._c.shape.diagram.modelToView(this._c.position()),e=t.minus(this._c.shape.bounds("transformed").topLeft()),n=new q(t.x,t.y,0,0);n.inflate(this.options.width/2,this.options.height/2),this._visualBounds=n,this.visual.redraw({center:new Q(e.x,e.y)})},_hitTest:function(t){var e=this._c.shape.diagram.modelToView(t);return this._visualBounds.contains(e)}}),J(j,{CompositeUnit:u,TransformUnit:m,PanUndoUnit:_,AddShapeUnit:y,AddConnectionUnit:v,DeleteShapeUnit:g,DeleteConnectionUnit:p,ConnectionEditAdorner:R,ConnectionTool:D,ConnectorVisual:N,UndoRedoService:k,ResizingAdorner:F,Selector:V,ToolService:M,ConnectorsAdorner:O,LayoutUndoUnit:h,ConnectionEditUnit:d,ToFrontUnit:x,ToBackUnit:b,ConnectionRouterBase:E,PolylineRouter:I,CascadingRouter:z,SelectionTool:A,ScrollerTool:S,PointerTool:T,ConnectionEditTool:P,RotateUnit:w})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/diagram/layout.min",["dataviz/diagram/math.min"],t)}(function(){!function(t,e){var n=window.kendo,i=n.dataviz.diagram,o=i.Graph,r=i.Node,s=i.Link,a=n.deepExtend,l=i.Size,c=i.Rect,h=i.Dictionary,u=i.Set,d=i.Graph,f=i.Utils,p=i.Point,g=1e-6,m=Math.PI/180,v=f.contains,y=t.grep,_=n.Class.extend({defaultOptions:{type:"Tree",subtype:"Down",roots:null,animate:!1,limitToView:!1,friction:.9,nodeDistance:50,iterations:300,horizontalSeparation:90,verticalSeparation:50,underneathVerticalTopOffset:15,underneathHorizontalOffset:15,underneathVerticalSeparation:15,grid:{width:1500,offsetX:50,offsetY:50,componentSpacingX:20,componentSpacingY:20},layerSeparation:50,layeredIterations:2,startRadialAngle:0,endRadialAngle:360,radialSeparation:150,radialFirstLevelSeparation:200,keepComponentsInOneRadialLayout:!1,ignoreContainers:!0,layoutContainerChildren:!1,ignoreInvisible:!0,animateTransitions:!1},init:function(){},gridLayoutComponents:function(t){var e,n,i,o,r,s,a,l,c,h,u,d,g,m,v;if(!t)throw"No components supplied.";for(f.forEach(t,function(t){t.calcBounds()}),t.sort(function(t,e){return e.bounds.width-t.bounds.width}),e=this.options.grid.width,n=this.options.grid.componentSpacingX,i=this.options.grid.componentSpacingY,o=0,r=this.options.grid.offsetX,s=this.options.grid.offsetY,a=r,l=s,h=[],u=[];t.length>0;){for(a>=e&&(a=r,l+=o+i,o=0),d=t.pop(),this.moveToOffset(d,new p(a,l)),c=0;d.nodes.length>c;c++)u.push(d.nodes[c]);for(c=0;d.links.length>c;c++)h.push(d.links[c]);g=d.bounds,m=g.height,(0>=m||isNaN(m))&&(m=0),v=g.width,(0>=v||isNaN(v))&&(v=0),m>=o&&(o=m),a+=v+n}return{nodes:u,links:h}},moveToOffset:function(t,e){var n,i,o,r,s,a,l,h,u=t.bounds,d=e.x-u.x,f=e.y-u.y;for(n=0;t.nodes.length>n;n++)o=t.nodes[n],r=o.bounds(),0===r.width&&0===r.height&&0===r.x&&0===r.y&&(r=new c(0,0,0,0)),r.x+=d,r.y+=f,o.bounds(r);for(n=0;t.links.length>n;n++)if(s=t.links[n],s.points){for(a=[],l=s.points,i=0;l.length>i;i++)h=l[i],h.x+=d,h.y+=f,a.push(h);s.points=a}return this.currentHorizontalOffset+=u.width+this.options.grid.offsetX,new p(d,f)},transferOptions:function(t){this.options=n.deepExtend({},this.defaultOptions),f.isUndefined(t)||(this.options=n.deepExtend(this.options,t||{}))}}),w=n.Class.extend({init:function(t){this.nodeMap=new h,this.shapeMap=new h,this.nodes=[],this.edges=[],this.edgeMap=new h,this.finalNodes=[],this.finalLinks=[],this.ignoredConnections=[],this.ignoredShapes=[],this.hyperMap=new h,this.hyperTree=new o,this.finalGraph=null,this.diagram=t},convert:function(t){if(f.isUndefined(this.diagram))throw"No diagram to convert.";return this.options=n.deepExtend({ignoreInvisible:!0,ignoreContainers:!0,layoutContainerChildren:!1},t||{}),this.clear(),this._renormalizeShapes(),this._renormalizeConnections(),this.finalNodes=new h(this.nodes),this.finalLinks=new h(this.edges),this.finalGraph=new o,this.finalNodes.forEach(function(t){this.finalGraph.addNode(t)},this),this.finalLinks.forEach(function(t){this.finalGraph.addExistingLink(t)},this),this.finalGraph},mapConnection:function(t){return this.edgeMap.get(t.id)},mapShape:function(t){return this.nodeMap.get(t.id)},getEdge:function(t,e){return f.first(t.links,function(n){return n.getComplement(t)===e})},clear:function(){this.finalGraph=null,this.hyperTree=!this.options.ignoreContainers&&this.options.layoutContainerChildren?new d:null,this.hyperMap=!this.options.ignoreContainers&&this.options.layoutContainerChildren?new h:null,this.nodeMap=new h,this.shapeMap=new h,this.nodes=[],this.edges=[],this.edgeMap=new h,this.ignoredConnections=[],this.ignoredShapes=[],this.finalNodes=[],this.finalLinks=[]},listToRoot:function(t){var e=[],n=t.container;if(!n)return e;for(e.push(n);n.parentContainer;)n=n.parentContainer,
e.push(n);return e.reverse(),e},firstNonIgnorableContainer:function(t){return t.isContainer&&!this._isIgnorableItem(t)?t:t.parentContainer?this.firstNonIgnorableContainer(t.parentContainer):null},isContainerConnection:function(t,e){return t.isContainer&&this.isDescendantOf(t,e)?!0:e.isContainer&&this.isDescendantOf(e,t)},isDescendantOf:function(t,e){var n,i,o,r;if(!t.isContainer)throw"Expecting a container.";if(t===e)return!1;if(v(t.children,e))return!0;for(n=[],i=0,o=t.children.length;o>i;i++)r=t.children[i],r.isContainer&&this.isDescendantOf(r,e)&&n.push(r);return n.length>0},isIgnorableItem:function(t){return this.options.ignoreInvisible?t.isCollapsed&&this._isVisible(t)?!1:!t.isCollapsed&&this._isVisible(t)?!1:!0:t.isCollapsed&&!this._isTop(t)},isShapeMapped:function(t){return t.isCollapsed&&!this._isVisible(t)&&!this._isTop(t)},leastCommonAncestor:function(t,e){var n,i,o,r,s,a;if(!t)throw"Parameter should not be null.";if(!e)throw"Parameter should not be null.";if(!this.hyperTree)throw"No hypertree available.";if(n=this.listToRoot(t),i=this.listToRoot(e),o=null,f.isEmpty(n)||f.isEmpty(i))return this.hyperTree.root.data;for(r=n[0],s=i[0],a=0;r===s&&(o=n[a],a++,!(a>=n.length||a>=i.length));)r=n[a],s=i[a];return o?y(this.hyperTree.nodes,function(t){return t.data.container===o}):this.hyperTree.root.data},_isTop:function(t){return!t.parentContainer},_isVisible:function(t){return t.visible()?t.parentContainer?this._isVisible(t.parentContainer):t.visible():!1},_isCollapsed:function(t){return t.isContainer&&t.isCollapsed?!0:t.parentContainer&&this._isCollapsed(t.parentContainer)},_renormalizeShapes:function(){var t,e,n,i;if(!this.options.ignoreContainers)throw"Containers are not supported yet, but stay tuned.";for(t=0,e=this.diagram.shapes.length;e>t;t++)n=this.diagram.shapes[t],this.options.ignoreInvisible&&!this._isVisible(n)||n.isContainer?this.ignoredShapes.push(n):(i=new r(n.id,n),i.isVirtual=!1,this.nodeMap.add(n.id,i),this.nodes.push(i))},_renormalizeConnections:function(){var t,e,n,i,o,r,a,l;if(0!==this.diagram.connections.length)for(t=0,e=this.diagram.connections.length;e>t;t++)if(n=this.diagram.connections[t],this.isIgnorableItem(n))this.ignoredConnections.push(n);else if(i=n.sourceConnector?n.sourceConnector.shape:null,o=n.targetConnector?n.targetConnector.shape:null,i&&o)if(!v(this.ignoredShapes,i)||this.shapeMap.containsKey(i))if(!v(this.ignoredShapes,o)||this.shapeMap.containsKey(o))if(this.shapeMap.containsKey(i)&&(i=this.shapeMap[i]),this.shapeMap.containsKey(o)&&(o=this.shapeMap[o]),r=this.mapShape(i),a=this.mapShape(o),r===a||this.areConnectedAlready(r,a))this.ignoredConnections.push(n);else{if(null===r||null===a)throw"A shape was not mapped to a node.";if(!this.options.ignoreContainers)throw"Containers are not supported yet, but stay tuned.";r.isVirtual||a.isVirtual?this.ignoredConnections.push(n):(l=new s(r,a,n.id,n),this.edgeMap.add(n.id,l),this.edges.push(l))}else this.ignoredConnections.push(n);else this.ignoredConnections.push(n);else this.ignoredConnections.push(n)},areConnectedAlready:function(t,e){return f.any(this.edges,function(n){return n.source===t&&n.target===e||n.source===e&&n.target===t})}}),x=_.extend({init:function(t){var e=this;if(_.fn.init.call(e),f.isUndefined(t))throw"Diagram is not specified.";this.diagram=t},layout:function(t){var e,n,o,r,s,a;if(this.transferOptions(t),e=new w(this.diagram),n=e.convert(t),!n.isEmpty()&&(o=n.getConnectedComponents(),!f.isEmpty(o))){for(r=0;o.length>r;r++)s=o[r],this.layoutGraph(s,t);return a=this.gridLayoutComponents(o),new i.LayoutState(this.diagram,a)}},layoutGraph:function(t,e){var n,i,o;for(f.isDefined(e)&&this.transferOptions(e),this.graph=t,n=9*this.options.nodeDistance,this.temperature=n,i=this._expectedBounds(),this.width=i.width,this.height=i.height,o=0;this.options.iterations>o;o++)this.refineStage=o>=5*this.options.iterations/6,this.tick(),this.temperature=this.refineStage?n/30:n*(1-o/(2*this.options.iterations))},tick:function(){var t,e,n;for(t=0;this.graph.nodes.length>t;t++)this._repulsion(this.graph.nodes[t]);for(t=0;this.graph.links.length>t;t++)this._attraction(this.graph.links[t]);for(t=0;this.graph.nodes.length>t;t++){if(e=this.graph.nodes[t],n=Math.sqrt(e.dx*e.dx+e.dy*e.dy),0===n)return;e.x+=Math.min(n,this.temperature)*e.dx/n,e.y+=Math.min(n,this.temperature)*e.dy/n,this.options.limitToView&&(e.x=Math.min(this.width,Math.max(e.width/2,e.x)),e.y=Math.min(this.height,Math.max(e.height/2,e.y)))}},_shake:function(t){var e=Math.random()*this.options.nodeDistance/4,n=2*Math.random()*Math.PI;t.x+=e*Math.cos(n),t.y-=e*Math.sin(n)},_InverseSquareForce:function(t,e,n){var i,o,r,s,a,l,c;return this.refineStage?(o=e.x-n.x,r=e.y-n.y,s=e.width/2,a=e.height/2,l=n.width/2,c=n.height/2,i=Math.pow(o,2)/Math.pow(s+l+this.options.nodeDistance,2)+Math.pow(r,2)/Math.pow(a+c+this.options.nodeDistance,2)):i=Math.pow(t,2)/Math.pow(this.options.nodeDistance,2),4*i/3},_SquareForce:function(t,e,n){return 1/this._InverseSquareForce(t,e,n)},_repulsion:function(t){t.dx=0,t.dy=0,f.forEach(this.graph.nodes,function(e){var n,i,o,r;if(e!==t){for(;t.x===e.x&&t.y===e.y;)this._shake(e);n=t.x-e.x,i=t.y-e.y,o=Math.sqrt(n*n+i*i),r=2*this._SquareForce(o,t,e),t.dx+=n/o*r,t.dy+=i/o*r}},this)},_attraction:function(t){var e,n,i,o,r,s,a=t.target,l=t.source;if(l!==a){for(;l.x===a.x&&l.y===a.y;)this._shake(a);e=l.x-a.x,n=l.y-a.y,i=Math.sqrt(e*e+n*n),o=5*this._InverseSquareForce(i,l,a),r=e/i*o,s=n/i*o,a.dx+=r,a.dy+=s,l.dx-=r,l.dy-=s}},_expectedBounds:function(){var t,e,n,i,o,r=this.graph.nodes.length,s=1.5,a=4;return 0===r?t:(t=f.fold(this.graph.nodes,function(t,e){var n=e.width*e.height;return n>0?t+=Math.sqrt(n):0},0,this),e=t/r,n=e*Math.ceil(Math.sqrt(r)),i=n*Math.sqrt(s),o=n/Math.sqrt(s),{width:i*a,height:o*a})}}),b=n.Class.extend({init:function(t){this.center=null,this.options=t},layout:function(t,e){if(this.graph=t,this.graph.nodes&&0!==this.graph.nodes.length){if(!v(this.graph.nodes,e))throw"The given root is not in the graph.";this.center=e,this.graph.cacheRelationships(),this.layoutSwitch()}},layoutLeft:function(t){var e,n,i,o,r,s,a,c;for(this.setChildrenDirection(this.center,"Left",!1),this.setChildrenLayout(this.center,"Default",!1),e=0,n=0,o=0;t.length>o;o++)r=t[o],r.TreeDirection="Left",s=this.measure(r,l.Empty),n=Math.max(n,s.Width),e+=s.height+this.options.verticalSeparation;for(e-=this.options.verticalSeparation,a=this.center.x-this.options.horizontalSeparation,i=this.center.y+(this.center.height-e)/2,o=0;t.length>o;o++)r=t[o],c=new p(a-r.Size.width,i),this.arrange(r,c),i+=r.Size.height+this.options.verticalSeparation},layoutRight:function(t){var e,n,i,o,r,s,a,c;for(this.setChildrenDirection(this.center,"Right",!1),this.setChildrenLayout(this.center,"Default",!1),e=0,n=0,o=0;t.length>o;o++)r=t[o],r.TreeDirection="Right",s=this.measure(r,l.Empty),n=Math.max(n,s.Width),e+=s.height+this.options.verticalSeparation;for(e-=this.options.verticalSeparation,a=this.center.x+this.options.horizontalSeparation+this.center.width,i=this.center.y+(this.center.height-e)/2,o=0;t.length>o;o++)r=t[o],c=new p(a,i),this.arrange(r,c),i+=r.Size.height+this.options.verticalSeparation},layoutUp:function(t){var e,n,i,o,r,s,a;for(this.setChildrenDirection(this.center,"Up",!1),this.setChildrenLayout(this.center,"Default",!1),e=0,o=0;t.length>o;o++)i=t[o],i.TreeDirection="Up",r=this.measure(i,l.Empty),e+=r.width+this.options.horizontalSeparation;for(e-=this.options.horizontalSeparation,s=this.center.x+this.center.width/2-e/2,o=0;t.length>o;o++)i=t[o],n=this.center.y-this.options.verticalSeparation-i.Size.height,a=new p(s,n),this.arrange(i,a),s+=i.Size.width+this.options.horizontalSeparation},layoutDown:function(t){var e,n,i,o,r,s,a;for(this.setChildrenDirection(this.center,"Down",!1),this.setChildrenLayout(this.center,"Default",!1),i=0,n=0;t.length>n;n++)e=t[n],e.treeDirection="Down",r=this.measure(e,l.Empty),i+=r.width+this.options.horizontalSeparation;for(i-=this.options.horizontalSeparation,s=this.center.x+this.center.width/2-i/2,o=this.center.y+this.options.verticalSeparation+this.center.height,n=0;t.length>n;n++)e=t[n],a=new p(s,o),this.arrange(e,a),s+=e.Size.width+this.options.horizontalSeparation},layoutRadialTree:function(){var t,e;if(this.setChildrenDirection(this.center,"Radial",!1),this.setChildrenLayout(this.center,"Default",!1),this.previousRoot=null,t=this.options.startRadialAngle*m,e=this.options.endRadialAngle*m,t>=e)throw"Final angle should not be less than the start angle.";this.maxDepth=0,this.origin=new p(this.center.x,this.center.y),this.calculateAngularWidth(this.center,0),this.maxDepth>0&&this.radialLayout(this.center,this.options.radialFirstLevelSeparation,t,e),this.center.Angle=e-t},tipOverTree:function(t,e){var n,i,o,r,s,a,c;for(f.isUndefined(e)&&(e=0),this.setChildrenDirection(this.center,"Down",!1),this.setChildrenLayout(this.center,"Default",!1),this.setChildrenLayout(this.center,"Underneath",!1,e),n=0,r=0;t.length>r;r++)o=t[r],o.TreeDirection="Down",s=this.measure(o,l.Empty),n+=s.width+this.options.horizontalSeparation;for(n-=this.options.horizontalSeparation,n-=t[t.length-1].width,n+=t[t.length-1].associatedShape.bounds().width,a=this.center.x+this.center.width/2-n/2,i=this.center.y+this.options.verticalSeparation+this.center.height,r=0;t.length>r;r++)o=t[r],c=new p(a,i),this.arrange(o,c),a+=o.Size.width+this.options.horizontalSeparation},calculateAngularWidth:function(t,e){var n,i,o,r,s,a,l;if(e>this.maxDepth&&(this.maxDepth=e),n=0,i=1e3,o=1e3,r=0===e?0:Math.sqrt(i*i+o*o)/e,t.children.length>0){for(s=0,a=t.children.length;a>s;s++)l=t.children[s],n+=this.calculateAngularWidth(l,e+1);n=Math.max(r,n)}else n=r;return t.sectorAngle=n,n},sortChildren:function(t){var e,n,i,o,r,s,a,l,c,h,u,d=0;if(t.parents.length>1)throw"Node is not part of a tree.";if(n=t.parents[0],n&&(i=new p(n.x,n.y),o=new p(t.x,t.y),d=this.normalizeAngle(Math.atan2(i.y-o.y,i.x-o.x))),r=t.children.length,0===r)return null;for(s=[],a=[],e=0;r>e;++e)l=t.children[e],c=new p(l.x,l.y),a[e]=e,s[e]=this.normalizeAngle(-d+Math.atan2(c.y-c.y,c.x-c.x));for(f.bisort(s,a),h=[],u=t.children,e=0;r>e;++e)h.push(u[a[e]]);return h},normalizeAngle:function(t){for(;t>2*Math.PI;)t-=2*Math.PI;for(;0>t;)t+=2*Math.PI;return t},radialLayout:function(t,e,n,i){var o,r,s,a,l,c=i-n,h=c/2,u=t.sectorAngle,d=0,f=this.sortChildren(t);for(o=0,r=f.length;r>o;o++)s=f[o],a=s,l=a.sectorAngle/u,s.children.length>0&&this.radialLayout(s,e+this.options.radialSeparation,n+d*c,n+(d+l)*c),this.setPolarLocation(s,e,n+d*c+l*h),a.angle=l*c,d+=l},setPolarLocation:function(t,e,n){t.x=this.origin.x+e*Math.cos(n),t.y=this.origin.y+e*Math.sin(n),t.BoundingRectangle=new c(t.x,t.y,t.width,t.height)},setChildrenDirection:function(t,e,n){var i=t.treeDirection;this.graph.depthFirstTraversal(t,function(t){t.treeDirection=e}),n||(t.treeDirection=i)},setChildrenLayout:function(t,e,n,i){f.isUndefined(i)&&(i=0);var o=t.childrenLayout;i>0?(this.graph.assignLevels(t),this.graph.depthFirstTraversal(t,function(t){t.level>=i+1&&(t.childrenLayout=e)})):(this.graph.depthFirstTraversal(t,function(t){t.childrenLayout=e}),n||(t.childrenLayout=o))},measure:function(t,e){var n,i,o,r,s,a,c,h=0,u=0,d=new l(0,0);if(!t)throw"";if(i=t.associatedShape.bounds(),o=i.width,r=i.height,1!==t.parents.length)throw"Node not in a spanning tree.";if(s=t.parents[0],"Undefined"===t.treeDirection&&(t.treeDirection=s.treeDirection),f.isEmpty(t.children))d=new l(Math.abs(o)<g?50:o,Math.abs(r)<g?25:r);else if(1===t.children.length){switch(t.treeDirection){case"Radial":n=this.measure(t.children[0],e),h=o+this.options.radialSeparation*Math.cos(t.AngleToParent)+n.width,u=r+Math.abs(this.options.radialSeparation*Math.sin(t.AngleToParent))+n.height;break;case"Left":case"Right":switch(t.childrenLayout){case"TopAlignedWithParent":break;case"BottomAlignedWithParent":break;case"Underneath":n=this.measure(t.children[0],e),h=o+n.width+this.options.underneathHorizontalOffset,u=r+this.options.underneathVerticalTopOffset+n.height;break;case"Default":n=this.measure(t.children[0],e),h=o+this.options.horizontalSeparation+n.width,u=Math.max(r,n.height);break;default:throw"Unhandled TreeDirection in the Radial layout measuring."}break;case"Up":case"Down":switch(t.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":n=this.measure(t.children[0],e),h=Math.max(o,n.width+this.options.underneathHorizontalOffset),u=r+this.options.underneathVerticalTopOffset+n.height;break;case"Default":n=this.measure(t.children[0],e),u=r+this.options.verticalSeparation+n.height,h=Math.max(o,n.width);break;default:throw"Unhandled TreeDirection in the Down layout measuring."}break;default:throw"Unhandled TreeDirection in the layout measuring."}d=new l(h,u)}else{switch(t.treeDirection){case"Left":case"Right":switch(t.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(h=o,u=r+this.options.underneathVerticalTopOffset,a=0;t.children.length>a;a++)c=t.children[a],n=this.measure(c,e),h=Math.max(h,n.width+this.options.underneathHorizontalOffset),u+=n.height+this.options.underneathVerticalSeparation;u-=this.options.underneathVerticalSeparation;break;case"Default":for(h=o,u=0,a=0;t.children.length>a;a++)c=t.children[a],n=this.measure(c,e),h=Math.max(h,o+this.options.horizontalSeparation+n.width),u+=n.height+this.options.verticalSeparation;u-=this.options.verticalSeparation;break;default:throw"Unhandled TreeDirection in the Right layout measuring."}break;case"Up":case"Down":switch(t.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(h=o,u=r+this.options.underneathVerticalTopOffset,a=0;t.children.length>a;a++)c=t.children[a],n=this.measure(c,e),h=Math.max(h,n.width+this.options.underneathHorizontalOffset),u+=n.height+this.options.underneathVerticalSeparation;u-=this.options.underneathVerticalSeparation;break;case"Default":for(h=0,u=0,a=0;t.children.length>a;a++)c=t.children[a],n=this.measure(c,e),h+=n.width+this.options.horizontalSeparation,u=Math.max(u,n.height+this.options.verticalSeparation+r);h-=this.options.horizontalSeparation;break;default:throw"Unhandled TreeDirection in the Down layout measuring."}break;default:throw"Unhandled TreeDirection in the layout measuring."}d=new l(h,u)}return t.SectorAngle=Math.sqrt(h*h/4+u*u/4),t.Size=d,d},arrange:function(t,e){var n,i,o,r,s,a,l,h,u=t.associatedShape.bounds(),d=u.width,m=u.height;if(f.isEmpty(t.children))t.x=e.x,t.y=e.y,t.BoundingRectangle=new c(e.x,e.y,d,m);else switch(t.treeDirection){case"Left":switch(t.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(h=e,t.x=h.x,t.y=h.y,t.BoundingRectangle=new c(t.x,t.y,t.width,t.height),l=e.y+m+this.options.underneathVerticalTopOffset,n=0;r.children.length>n;n++)r=r.children[n],a=h.x-r.associatedShape.width-this.options.underneathHorizontalOffset,i=new p(a,l),this.arrange(r,i),l+=r.Size.height+this.options.underneathVerticalSeparation;break;case"Default":for(h=new p(e.x+t.Size.width-d,e.y+(t.Size.height-m)/2),t.x=h.x,t.y=h.y,t.BoundingRectangle=new c(t.x,t.y,t.width,t.height),a=h.x-this.options.horizontalSeparation,l=e.y,n=0;t.children.length>n;n++)r=t.children[n],i=new p(a-r.Size.width,l),this.arrange(r,i),l+=r.Size.height+this.options.verticalSeparation;break;default:throw"Unsupported TreeDirection"}break;case"Right":switch(t.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(h=e,t.x=h.x,t.y=h.y,t.BoundingRectangle=new c(t.x,t.y,t.width,t.height),a=e.x+d+this.options.underneathHorizontalOffset,l=e.y+m+this.options.underneathVerticalTopOffset,n=0;t.children.length>n;n++)r=t.children[n],i=new p(a,l),this.arrange(r,i),l+=r.Size.height+this.options.underneathVerticalSeparation;break;case"Default":for(h=new p(e.x,e.y+(t.Size.height-m)/2),t.x=h.x,t.y=h.y,t.BoundingRectangle=new c(t.x,t.y,t.width,t.height),a=e.x+d+this.options.horizontalSeparation,l=e.y,n=0;t.children.length>n;n++)r=t.children[n],i=new p(a,l),this.arrange(r,i),l+=r.Size.height+this.options.verticalSeparation;break;default:throw"Unsupported TreeDirection"}break;case"Up":if(h=new p(e.x+(t.Size.width-d)/2,e.y+t.Size.height-m),t.x=h.x,t.y=h.y,t.BoundingRectangle=new c(t.x,t.y,t.width,t.height),Math.abs(h.x-e.x)<g){for(s=0,n=0;t.children.length>n;n++)o=t.children[n],s+=o.Size.width+this.options.horizontalSeparation;s-=this.options.horizontalSeparation,a=e.x+(d-s)/2}else a=e.x;for(n=0;t.children.length>n;n++)r=t.children[n],l=h.y-this.options.verticalSeparation-r.Size.height,i=new p(a,l),this.arrange(r,i),a+=r.Size.width+this.options.horizontalSeparation;break;case"Down":switch(t.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(h=e,t.x=h.x,t.y=h.y,t.BoundingRectangle=new c(t.x,t.y,t.width,t.height),a=e.x+this.options.underneathHorizontalOffset,l=e.y+m+this.options.underneathVerticalTopOffset,n=0;t.children.length>n;n++)r=t.children[n],i=new p(a,l),this.arrange(r,i),l+=r.Size.height+this.options.underneathVerticalSeparation;break;case"Default":if(h=new p(e.x+(t.Size.width-d)/2,e.y),t.x=h.x,t.y=h.y,t.BoundingRectangle=new c(t.x,t.y,t.width,t.height),Math.abs(h.x-e.x)<g){for(s=0,n=0;t.children.length>n;n++)o=t.children[n],s+=o.Size.width+this.options.horizontalSeparation;s-=this.options.horizontalSeparation,a=e.x+(d-s)/2}else a=e.x;for(n=0;t.children.length>n;n++)r=t.children[n],l=h.y+this.options.verticalSeparation+m,i=new p(a,l),this.arrange(r,i),a+=r.Size.width+this.options.horizontalSeparation;break;default:throw"Unsupported TreeDirection"}break;case"None":break;default:throw"Unsupported TreeDirection"}},layoutSwitch:function(){var t,e,n,i,o,r;if(this.center&&!f.isEmpty(this.center.children))switch(t=this.options.subtype,f.isUndefined(t)&&(t="Down"),r=this.center.children,t.toLowerCase()){case"radial":case"radialtree":this.layoutRadialTree();break;case"mindmaphorizontal":case"mindmap":e=this.center.children,1===this.center.children.length?this.layoutRight(e):(o=r.length/2,n=y(this.center.children,function(t){return f.indexOf(r,t)<o}),i=y(this.center.children,function(t){return f.indexOf(r,t)>=o}),this.layoutLeft(n),this.layoutRight(i));break;case"mindmapvertical":e=this.center.children,1===this.center.children.length?this.layoutDown(e):(o=r.length/2,n=y(this.center.children,function(t){return f.indexOf(r,t)<o}),i=y(this.center.children,function(t){return f.indexOf(r,t)>=o}),this.layoutUp(n),this.layoutDown(i));break;case"right":this.layoutRight(this.center.children);break;case"left":this.layoutLeft(this.center.children);break;case"up":case"bottom":this.layoutUp(this.center.children);break;case"down":case"top":this.layoutDown(this.center.children);break;case"tipover":case"tipovertree":if(0>this.options.tipOverTreeStartLevel)throw"The tip-over level should be a positive integer.";this.tipOverTree(this.center.children,this.options.tipOverTreeStartLevel);break;case"undefined":case"none":}}}),k=_.extend({init:function(t){var e=this;if(_.fn.init.call(e),f.isUndefined(t))throw"No diagram specified.";this.diagram=t},layout:function(t){var e,n;return this.transferOptions(t),e=new w(this.diagram),this.graph=e.convert(),n=this.layoutComponents(),new i.LayoutState(this.diagram,n)},layoutComponents:function(){var t,e,n,i,o,r,s,a;if(!this.graph.isEmpty()&&(t=this.graph.getConnectedComponents(),!f.isEmpty(t))){for(e=new b(this.options),n=[],i=0;t.length>i;i++){if(o=t[i],r=this.getTree(o),!r)throw"Failed to find a spanning tree for the component.";s=r.root,a=r.tree,e.layout(a,s),n.push(a)}return this.gridLayoutComponents(n)}},getTree:function(t){var e,n,i,o,r,s=null;if(this.options.roots&&this.options.roots.length>0)for(e=0,n=t.nodes.length;n>e;e++)for(i=t.nodes[e],o=0;this.options.roots.length>o;o++)if(r=this.options.roots[o],r===i.associatedShape){s=i;break}if(!s&&(s=t.root(),!s))throw"Unable to find a root for the tree.";return this.getTreeForRoot(t,s)},getTreeForRoot:function(t,e){var n=t.getSpanningTree(e);return f.isUndefined(n)||n.isEmpty()?null:{tree:n,root:n.root}}}),C=_.extend({init:function(t){var e=this;if(_.fn.init.call(e),f.isUndefined(t))throw"Diagram is not specified.";this.diagram=t},layout:function(t){var e,n,o,r,s,a;if(this.transferOptions(t),e=new w(this.diagram),n=e.convert(t),!n.isEmpty()&&(o=n.getConnectedComponents(),!f.isEmpty(o))){for(r=0;o.length>r;r++)s=o[r],this.layoutGraph(s,t);return a=this.gridLayoutComponents(o),new i.LayoutState(this.diagram,a)}},_initRuntimeProperties:function(){var t,e;for(t=0;this.graph.nodes.length>t;t++)e=this.graph.nodes[t],e.layer=-1,e.downstreamLinkCount=0,e.upstreamLinkCount=0,e.isVirtual=!1,e.uBaryCenter=0,e.dBaryCenter=0,e.upstreamPriority=0,e.downstreamPriority=0,e.gridPosition=0},_prepare:function(t){var e,n,i,o,r,s,a,l,c,u,d,p=[],g=new h,m=0;for(f.forEach(t.nodes,function(t){0===t.incoming.length&&(g.set(t,0),p.push(t))});p.length>0;)for(r=p.shift(),e=0;r.outgoing.length>e;e++)i=r.outgoing[e],s=i.target,o=g.containsKey(s)?Math.max(g.get(r)+1,g.get(s)):g.get(r)+1,g.set(s,o),o>m&&(m=o),v(p,s)||p.push(s);for(a=g.keys(),a.sort(function(t,e){var n=g.get(t),i=g.get(e);return f.sign(i-n)}),l=0;a.length>l;++l)if(c=a[l],u=Number.MAX_VALUE,0!==c.outgoing.length){for(n=0;c.outgoing.length>n;++n)i=c.outgoing[n],u=Math.min(u,g.get(i.target));u>1&&g.set(c,u-1)}for(this.layers=[],e=0;m+1>e;e++)d=[],d.linksTo={},this.layers.push(d);for(g.forEach(function(t,e){t.layer=e,this.layers[e].push(t)},this),n=0;this.layers.length>n;n++)for(d=this.layers[n],e=0;d.length>e;e++)d[e].gridPosition=e},layoutGraph:function(t,e){if(f.isUndefined(t))throw"No graph given or graph analysis of the diagram failed.";f.isDefined(e)&&this.transferOptions(e),this.graph=t,t.setItemIndices();var n=t.makeAcyclic();this._initRuntimeProperties(),this._prepare(t,e),this._dummify(),this._optimizeCrossings(),this._swapPairs(),this.arrangeNodes(),this._moveThingsAround(),this._dedummify(),f.forEach(n,function(t){t.points&&t.points.reverse()})},setMinDist:function(t,e,n){var i=t.layer,o=t.layerIndex;this.minDistances[i][o]=n},getMinDist:function(t,e){var n,i=0,o=t.layerIndex,r=e.layerIndex,s=t.layer,a=Math.min(o,r),l=Math.max(o,r);for(n=a;l>n;++n)i+=this.minDistances[s][n];return i},placeLeftToRight:function(t){var e,n,i,o,r,s,a,l,c,u,d=new h;for(i=0;this.layers.length>i;++i)if(o=t[i]){for(e=0;o.length>e;e++)n=o[e],d.containsKey(n)||this.placeLeft(n,d,i);for(r=Number.POSITIVE_INFINITY,e=0;o.length>e;e++)n=o[e],s=this.rightSibling(n),s&&this.nodeLeftClass.get(s)!==i&&(r=Math.min(r,d.get(s)-d.get(n)-this.getMinDist(n,s)));if(r===Number.POSITIVE_INFINITY){for(a=[],e=0;o.length>e;e++)for(n=o[e],l=[],f.addRange(l,this.upNodes.get(n)),f.addRange(l,this.downNodes.get(n)),c=0;l.length>c;c++)u=l[c],this.nodeLeftClass.get(u)<i&&a.push(d.get(u)-d.get(n));a.sort(),r=0===a.length?0:a.length%2===1?a[this.intDiv(a.length,2)]:(a[this.intDiv(a.length,2)-1]+a[this.intDiv(a.length,2)])/2}for(e=0;o.length>e;e++)n=o[e],d.set(n,d.get(n)+r)}return d},placeRightToLeft:function(t){var e,n,i,o,r,s,a,l,c,u,d=new h;for(i=0;this.layers.length>i;++i)if(o=t[i]){for(e=0;o.length>e;e++)n=o[e],d.containsKey(n)||this.placeRight(n,d,i);for(r=Number.NEGATIVE_INFINITY,e=0;o.length>e;e++)n=o[e],s=this.leftSibling(n),s&&this.nodeRightClass.get(s)!==i&&(r=Math.max(r,d.get(s)-d.get(n)+this.getMinDist(s,n)));if(r===Number.NEGATIVE_INFINITY){for(a=[],e=0;o.length>e;e++)for(n=o[e],l=[],f.addRange(l,this.upNodes.get(n)),f.addRange(l,this.downNodes.get(n)),c=0;l.length>c;c++)u=l[c],this.nodeRightClass.get(u)<i&&a.push(d.get(n)-d.get(u));a.sort(),r=0===a.length?0:a.length%2===1?a[this.intDiv(a.length,2)]:(a[this.intDiv(a.length,2)-1]+a[this.intDiv(a.length,2)])/2}for(e=0;o.length>e;e++)n=o[e],d.set(n,d.get(n)+r)}return d},_getLeftWing:function(){var t={value:null},e=this.computeClasses(t,1);return this.nodeLeftClass=t.value,e},_getRightWing:function(){var t={value:null},e=this.computeClasses(t,-1);return this.nodeRightClass=t.value,e},computeClasses:function(t,e){var n,i,o,r,s,a,l,c,u,d=0,f=t.value=new h;for(n=0;this.layers.length>n;++n)for(d=n,i=this.layers[n],o=1===e?0:i.length-1;o>=0&&i.length>o;o+=e)if(r=i[o],f.containsKey(r))d=f.get(r);else if(f.set(r,d),r.isVirtual)for(s=this._nodesInLink(r),a=0;s.length>a;a++)l=s[a],f.set(l,d);for(c=[],u=0;this.layers.length>u;u++)c.push(null);return f.forEach(function(t,e){null===c[e]&&(c[e]=[]),c[e].push(t)}),c},_isVerticalLayout:function(){return"up"===this.options.subtype.toLowerCase()||"down"===this.options.subtype.toLowerCase()||"vertical"===this.options.subtype.toLowerCase()},_isHorizontalLayout:function(){return"right"===this.options.subtype.toLowerCase()||"left"===this.options.subtype.toLowerCase()||"horizontal"===this.options.subtype.toLowerCase()},_isIncreasingLayout:function(){return"right"===this.options.subtype.toLowerCase()||"down"===this.options.subtype.toLowerCase()},_moveThingsAround:function(){function t(t,e){var n,i,o=Number.MIN_VALUE;for(n=0;t.length>n;++n)i=t[n],o=e._isVerticalLayout()?Math.max(o,i.height):Math.max(o,i.width);return o}var e,n,i,o,r,s,a,l,c,u,d,p,g,m,v,y,_,w,x,b,k,C,S,T,A,D,P;for(n=0;this.layers.length>n;++n)o=this.layers[n],o.sort(this._gridPositionComparer);for(this.minDistances=[],n=0;this.layers.length>n;++n)for(o=this.layers[n],this.minDistances[n]=[],r=0;o.length>r;++r)i=o[r],i.layerIndex=r,this.minDistances[n][r]=this.options.nodeDistance,o.length-1>r&&(this.minDistances[n][r]+=this._isVerticalLayout()?(i.width+o[r+1].width)/2:(i.height+o[r+1].height)/2);for(this.downNodes=new h,this.upNodes=new h,f.forEach(this.graph.nodes,function(t){this.downNodes.set(t,[]),this.upNodes.set(t,[])},this),f.forEach(this.graph.links,function(t){var e=t.source,n=t.target,i=null,o=null;e.layer>n.layer?(i=t.source,o=t.target):(o=t.source,i=t.target),this.downNodes.get(o).push(i),this.upNodes.get(i).push(o)},this),this.downNodes.forEachValue(function(t){t.sort(this._gridPositionComparer)},this),this.upNodes.forEachValue(function(t){t.sort(this._gridPositionComparer)},this),n=0;this.layers.length-1>n;++n)for(o=this.layers[n],s=0;o.length-1>s;s++)if(a=o[s],a.isVirtual&&(l=this.downNodes.get(a)[0],l.isVirtual))for(r=s+1;o.length>r;++r)i=o[r],i.isVirtual&&(c=this.downNodes.get(i)[0],c.isVirtual&&l.gridPosition>c.gridPosition&&(u=l.gridPosition,l.gridPosition=c.gridPosition,c.gridPosition=u,d=l.layerIndex,p=c.layerIndex,this.layers[n+1][d]=c,this.layers[n+1][p]=l,l.layerIndex=p,c.layerIndex=d));for(g=this._getLeftWing(),m=this._getRightWing(),v=this.placeLeftToRight(g),y=this.placeRightToLeft(m),_=new h,f.forEach(this.graph.nodes,function(t){_.set(t,(v.get(t)+y.get(t))/2)}),w=new h,x=new h,n=0;this.layers.length>n;++n)for(o=this.layers[n],b=-1,k=-1,r=0;o.length>r;++r)i=o[r],w.set(i,0),x.set(i,!1),i.isVirtual&&(-1===b?b=r:b===r-1?b=r:(k=r,w.set(o[b],0),_.get(i)-_.get(o[b])===this.getMinDist(o[b],i)?x.set(o[b],!0):x.set(o[b],!1),b=r));for(C=[1,-1],f.forEach(C,function(t){var n,i,o,r,s,a,l,c=1===t?0:this.layers.length-1;for(n=c;n>=0&&this.layers.length>n;n+=t){if(i=this.layers[n],o=this._firstVirtualNode(i),r=null,s=null,-1!==o)for(r=i[o],s=[],e=0;o>e;e++)s.push(i[e]);else r=null,s=i;if(s.length>0){for(this._sequencer(_,null,r,t,s),e=0;s.length-1>e;++e)this.setMinDist(s[e],s[e+1],_.get(s[e+1])-_.get(s[e]));r&&this.setMinDist(s[s.length-1],r,_.get(r)-_.get(s[s.length-1]))}for(;r;){if(a=this.nextVirtualNode(i,r)){if(w.get(r)===t){for(o=r.layerIndex,l=a.layerIndex,s=[],e=o+1;l>e;e++)s.push(i[e]);s.length>0&&this._sequencer(_,r,a,t,s),x.set(r,!0)}}else{for(o=r.layerIndex,s=[],e=o+1;i.length>e;e++)s.push(i[e]);if(s.length>0){for(this._sequencer(_,r,null,t,s),e=0;s.length-1>e;++e)this.setMinDist(s[e],s[e+1],_.get(s[e+1])-_.get(s[e]));this.setMinDist(r,s[0],_.get(s[0])-_.get(r))}}r=a}this.adjustDirections(n,t,w,x)}},this),S=this._isIncreasingLayout()?0:this.layers.length-1,T=function(t,e){return e._isIncreasingLayout()?e.layers.length>t:t>=0},A=this._isIncreasingLayout()?1:-1,D=0,e=S;T(e,this);e+=A){for(o=this.layers[e],P=t(o,this),r=0;o.length>r;++r)i=o[r],this._isVerticalLayout()?(i.x=_.get(i),i.y=D+P/2):(i.x=D+P/2,i.y=_.get(i));D+=this.options.layerSeparation+P}},adjustDirections:function(t,e,n,i){var o,r,s,a,l,c,h,u,d,f,p,g,m,v;if(!(0>t+e||t+e>=this.layers.length))for(o=null,r=null,s=this.layers[t+e],a=0;s.length>a;++a)if(l=s[a],l.isVirtual&&(c=this.getNeighborOnLayer(l,t),c.isVirtual)){if(o){for(h=i.get(r),u=this.layers[t],d=r.layerIndex,f=c.layerIndex,p=d+1;f>p;++p)u[p].isVirtual&&(h=h&&i.get(u[p]));if(h)for(n.set(o,e),g=o.layerIndex,m=l.layerIndex,v=g+1;m>v;++v)s[v].isVirtual&&n.set(s[v],e)}o=l,r=c}},getNeighborOnLayer:function(t,e){var n=this.upNodes.get(t)[0];return n.layer===e?n:(n=this.downNodes.get(t)[0],n.layer===e?n:null)},_sequencer:function(t,e,n,i,o){if(1===o.length&&this._sequenceSingle(t,e,n,i,o[0]),o.length>1){var r=o.length,s=this.intDiv(r,2);this._sequencer(t,e,n,i,o.slice(0,s)),this._sequencer(t,e,n,i,o.slice(s)),this.combineSequences(t,e,n,i,o)}},_sequenceSingle:function(t,e,n,i,o){var r=-1===i?this.downNodes.get(o):this.upNodes.get(o),s=r.length;0!==s&&(s%2===1?t.set(o,t.get(r[this.intDiv(s,2)])):t.set(o,(t.get(r[this.intDiv(s,2)-1])+t.get(r[this.intDiv(s,2)]))/2),e&&t.set(o,Math.max(t.get(o),t.get(e)+this.getMinDist(e,o))),n&&t.set(o,Math.min(t.get(o),t.get(n)-this.getMinDist(o,n))))},combineSequences:function(t,e,n,i,o){var r,s,a,l,c,h,u,d,f,p,g=o.length,m=this.intDiv(g,2),v=[];for(r=0;m>r;++r){for(s=0,l=-1===i?this.downNodes.get(o[r]):this.upNodes.get(o[r]),a=0;l.length>a;++a)c=l[a],t.get(c)>=t.get(o[r])?s++:(s--,v.push({k:t.get(c)+this.getMinDist(o[r],o[m-1]),v:2}));v.push({k:t.get(o[r])+this.getMinDist(o[r],o[m-1]),v:s})}for(e&&v.push({k:t.get(e)+this.getMinDist(e,o[m-1]),v:Number.MAX_VALUE}),v.sort(this._positionDescendingComparer),u=[],r=m;g>r;++r){for(s=0,l=-1===i?this.downNodes.get(o[r]):this.upNodes.get(o[r]),a=0;l.length>a;++a)c=l[a],t.get(c)<=t.get(o[r])?s++:(s--,u.push({k:t.get(c)-this.getMinDist(o[r],o[m]),v:2}));u.push({k:t.get(o[r])-this.getMinDist(o[r],o[m]),v:s})}for(n&&u.push({k:t.get(n)-this.getMinDist(n,o[m]),v:Number.MAX_VALUE}),u.sort(this._positionAscendingComparer),d=0,f=0,p=this.getMinDist(o[m-1],o[m]);t.get(o[m])-t.get(o[m-1])<p;)if(f>d){if(0===v.length){t.set(o[m-1],t.get(o[m])-p);break}h=v.shift(),d+=h.v,t.set(o[m-1],h.k),t.set(o[m-1],Math.max(t.get(o[m-1]),t.get(o[m])-p))}else{if(0===u.length){t.set(o[m],t.get(o[m-1])+p);break}h=u.shift(),f+=h.v,t.set(o[m],h.k),t.set(o[m],Math.min(t.get(o[m]),t.get(o[m-1])+p))}for(r=m-2;r>=0;r--)t.set(o[r],Math.min(t.get(o[r]),t.get(o[m-1])-this.getMinDist(o[r],o[m-1])));for(r=m+1;g>r;r++)t.set(o[r],Math.max(t.get(o[r]),t.get(o[m])+this.getMinDist(o[r],o[m])))},placeLeft:function(t,e,n){var i=Number.NEGATIVE_INFINITY;f.forEach(this._getComposite(t),function(t){var o=this.leftSibling(t);o&&this.nodeLeftClass.get(o)===this.nodeLeftClass.get(t)&&(e.containsKey(o)||this.placeLeft(o,e,n),i=Math.max(i,e.get(o)+this.getMinDist(o,t)))},this),i===Number.NEGATIVE_INFINITY&&(i=0),f.forEach(this._getComposite(t),function(t){e.set(t,i)})},placeRight:function(t,e,n){var i=Number.POSITIVE_INFINITY;f.forEach(this._getComposite(t),function(t){var o=this.rightSibling(t);o&&this.nodeRightClass.get(o)===this.nodeRightClass.get(t)&&(e.containsKey(o)||this.placeRight(o,e,n),i=Math.min(i,e.get(o)-this.getMinDist(t,o)))},this),i===Number.POSITIVE_INFINITY&&(i=0),f.forEach(this._getComposite(t),function(t){e.set(t,i)})},leftSibling:function(t){var e=this.layers[t.layer],n=t.layerIndex;return 0===n?null:e[n-1]},rightSibling:function(t){var e=this.layers[t.layer],n=t.layerIndex;return n===e.length-1?null:e[n+1]},_getComposite:function(t){return t.isVirtual?this._nodesInLink(t):[t]},arrangeNodes:function(){var t,e,n,i,o,r,s,a;for(e=0;this.layers.length>e;e++)for(i=this.layers[e],n=0;i.length>n;n++)o=i[n],o.upstreamPriority=o.upstreamLinkCount,o.downstreamPriority=o.downstreamLinkCount;for(r=2,s=0;r>s;s++){for(t=this.layers.length-1;t>=1;t--)this.layoutLayer(!1,t);for(t=0;this.layers.length-1>t;t++)this.layoutLayer(!0,t);
}for(a=Number.MAX_VALUE,e=0;this.layers.length>e;e++)for(i=this.layers[e],n=0;i.length>n;n++)o=i[n],a=Math.min(a,o.gridPosition);if(0>a)for(e=0;this.layers.length>e;e++)for(i=this.layers[e],n=0;i.length>n;n++)o=i[n],o.gridPosition=o.gridPosition-a},layoutLayer:function(t,e){var n,i,o,r;for(i=t?this.layers[n=e+1]:this.layers[n=e-1],o=[],r=0;i.length>r;r++)o.push(i[r]);o.sort(function(t,e){var n=(t.upstreamPriority+t.downstreamPriority)/2,i=(e.upstreamPriority+e.downstreamPriority)/2;return Math.abs(n-i)<1e-4?0:i>n?1:-1}),f.forEach(o,function(t){var e=t.gridPosition,n=this.calcBaryCenter(t),o=(t.upstreamPriority+t.downstreamPriority)/2;if(!(Math.abs(e-n)<1e-4||Math.abs(e-n)<.2501))if(n>e)for(;n>e&&this.moveRight(t,i,o);)e=t.gridPosition;else for(;e>n&&this.moveLeft(t,i,o);)e=t.gridPosition},this),n>0&&this.calcDownData(n-1),this.layers.length-1>n&&this.calcUpData(n+1)},moveRight:function(t,e,n){var i,o,r=f.indexOf(e,t);return r===e.length-1?(t.gridPosition=t.gridPosition+.5,!0):(i=e[r+1],o=(i.upstreamPriority+i.downstreamPriority)/2,i.gridPosition>t.gridPosition+1?(t.gridPosition=t.gridPosition+.5,!0):o>n||Math.abs(o-n)<1e-4?!1:this.moveRight(i,e,n)?(t.gridPosition=t.gridPosition+.5,!0):!1)},moveLeft:function(t,e,n){var i,o,r=f.indexOf(e,t);return 0===r?(t.gridPosition=t.gridPosition-.5,!0):(i=e[r-1],o=(i.upstreamPriority+i.downstreamPriority)/2,t.gridPosition-1>i.gridPosition?(t.gridPosition=t.gridPosition-.5,!0):o>n||Math.abs(o-n)<1e-4?!1:this.moveLeft(i,e,n)?(t.gridPosition=t.gridPosition-.5,!0):!1)},mapVirtualNode:function(t,e){this.nodeToLinkMap.set(t,e),this.linkToNodeMap.containsKey(e)||this.linkToNodeMap.set(e,[]),this.linkToNodeMap.get(e).push(t)},_nodesInLink:function(t){return this.linkToNodeMap.get(this.nodeToLinkMap.get(t))},_dummify:function(){var t,e,n,i,o,a,l,c,u,d,p,g,m,v,y,_,w,x,b,k;for(this.linkToNodeMap=new h,this.nodeToLinkMap=new h,u=this.graph.links.slice(0),d=this.layers,p=function(t,e,n){d[t].linksTo[e]=d[t].linksTo[e]||[],d[t].linksTo[e].push(n)},c=0;u.length>c;c++)if(g=u[c],m=g.source,v=g.target,y=m.layer,_=v.layer,w=m.gridPosition,x=v.gridPosition,b=(x-w)/Math.abs(_-y),k=m,y-_>1){for(l=y-1;l>_;l--){for(n=new r,n.x=m.x,n.y=m.y,n.width=m.width/100,n.height=m.height/100,t=d[l],e=(l-_)*b+w,e>t.length&&(e=t.length),w>=d[y].length-1&&x>=d[_].length-1?e=t.length:0===w&&0===x&&(e=0),n.layer=l,n.uBaryCenter=0,n.dBaryCenter=0,n.upstreamLinkCount=0,n.downstreamLinkCount=0,n.gridPosition=e,n.isVirtual=!0,f.insert(t,n,e),o=e+1;t.length>o;o++)i=t[o],i.gridPosition=i.gridPosition+1;a=new s(k,n),a.depthOfDumminess=0,p(l-1,l,a),k=n,this.graph._addNode(n),this.graph.addLink(a),n.index=this.graph.nodes.length-1,this.mapVirtualNode(n,g)}p(_-1,_,a),g.changeSource(k),g.depthOfDumminess=y-_-1}else if(-1>y-_){for(l=y+1;_>l;l++){for(n=new r,n.x=m.x,n.y=m.y,n.width=m.width/100,n.height=m.height/100,t=d[l],e=(l-y)*b+w,e>t.length&&(e=t.length),w>=d[y].length-1&&x>=d[_].length-1?e=t.length:0===w&&0===x&&(e=0),n.layer=l,n.uBaryCenter=0,n.dBaryCenter=0,n.upstreamLinkCount=0,n.downstreamLinkCount=0,n.gridPosition=e,n.isVirtual=!0,e&=e,f.insert(t,n,e),o=e+1;t.length>o;o++)i=t[o],i.gridPosition=i.gridPosition+1;a=new s(k,n),a.depthOfDumminess=0,p(l-1,l,a),k=n,this.graph._addNode(n),this.graph.addLink(a),n.index=this.graph.nodes.length-1,this.mapVirtualNode(n,g)}p(_-1,_,g),g.changeSource(k),g.depthOfDumminess=_-y-1}else p(y,_,g)},_dedummify:function(){for(var t,e,n,i,o,r,s,a,l=!0;l;)for(l=!1,t=0;this.graph.links.length>t;t++)if(e=this.graph.links[t],e.depthOfDumminess){for(n=[],n.unshift({x:e.target.x,y:e.target.y}),n.unshift({x:e.source.x,y:e.source.y}),i=e,o=e.depthOfDumminess,r=0;o>r;r++)s=i.source,a=s.incoming[0],n.unshift({x:a.source.x,y:a.source.y}),i=a;e.changeSource(i.source),e.depthOfDumminess=0,n.length>2?(n.splice(0,1),n.splice(n.length-1),e.points=n):e.points=[],l=!0;break}},_optimizeCrossings:function(){for(var t,e=-1,n=3,i=0;0!==e&&!(i++>n);){for(e=0,t=this.layers.length-1;t>=1;t--)e+=this.optimizeLayerCrossings(!1,t);for(t=0;this.layers.length-1>t;t++)e+=this.optimizeLayerCrossings(!0,t)}},calcUpData:function(t){var e,n,i,o,r,s,a,l,c;if(0!==t){for(e=this.layers[t],r=new u,s=this.layers[t-1],n=0;s.length>n;n++)r.add(s[n]);for(n=0;e.length>n;n++){for(a=e[n],l=0,c=0,i=0;a.incoming.length>i;i++)o=a.incoming[i],r.contains(o.source)&&(c++,l+=o.source.gridPosition);for(i=0;a.outgoing.length>i;i++)o=a.outgoing[i],r.contains(o.target)&&(c++,l+=o.target.gridPosition);c>0?(a.uBaryCenter=l/c,a.upstreamLinkCount=c):(a.uBaryCenter=n,a.upstreamLinkCount=0)}}},calcDownData:function(t){var e,n,i,o,r,s,a,l,c;if(t!==this.layers.length-1){for(e=this.layers[t],r=new u,s=this.layers[t+1],n=0;s.length>n;n++)r.add(s[n]);for(n=0;e.length>n;n++){for(a=e[n],l=0,c=0,i=0;a.incoming.length>i;i++)o=a.incoming[i],r.contains(o.source)&&(c++,l+=o.source.gridPosition);for(i=0;a.outgoing.length>i;i++)o=a.outgoing[i],r.contains(o.target)&&(c++,l+=o.target.gridPosition);c>0?(a.dBaryCenter=l/c,a.downstreamLinkCount=c):(a.dBaryCenter=n,a.downstreamLinkCount=0)}}},optimizeLayerCrossings:function(t,e){var n,i,o,r,s,a,l,c;for(i=t?this.layers[n=e+1]:this.layers[n=e-1],o=i.slice(0),t?this.calcUpData(n):this.calcDownData(n),r=this,i.sort(function(t,e){var n,i=r.calcBaryCenter(t),o=r.calcBaryCenter(e);return Math.abs(i-o)<1e-4?t.degree()===e.degree()?r.compareByIndex(t,e):t.degree()<e.degree()?1:-1:(n=1e3*(o-i),n>0?-1:0>n?1:r.compareByIndex(t,e))}),a=0,s=0;i.length>s;s++)i[s]!==o[s]&&a++;if(a>0)for(l=0,s=0;i.length>s;s++)c=i[s],c.gridPosition=l++;return a},_swapPairs:function(){for(var t,e,n,i,o,r,s,a,l,c,h,u,d,f,p,g,m,v=this.options.layeredIterations,y=0;;){if(y++>v)break;for(t=1>=y%4,e=y%4===1,n=t?0:this.layers.length-1;t?this.layers.length-1>=n:n>=0;n+=t?1:-1){for(i=this.layers[n],o=!1,r=!0,s=0,a=0;i.length-1>a;a++)l=0,c=0,h=0,r?(0!==n&&(l=this.countLinksCrossingBetweenTwoLayers(n-1,n)),n!==this.layers.length-1&&(c=this.countLinksCrossingBetweenTwoLayers(n,n+1)),t?l*=2:c*=2,h=l+c):h=s,0!==h&&(u=i[a],d=i[a+1],f=u.gridPosition,p=d.gridPosition,i[a]=d,i[a+1]=u,u.gridPosition=p,d.gridPosition=f,l=0,0!==n&&(l=this.countLinksCrossingBetweenTwoLayers(n-1,n)),c=0,n!==this.layers.length-1&&(c=this.countLinksCrossingBetweenTwoLayers(n,n+1)),t?l*=2:c*=2,g=l+c,m=!1,m=e?g>=h:g>h,m?(u=i[a],d=i[a+1],f=u.gridPosition,p=d.gridPosition,i[a]=d,i[a+1]=u,u.gridPosition=p,d.gridPosition=f,s=h,r=!1):(o=!0,r=!0));o&&(n!==this.layers.length-1&&this.calcUpData(n+1),0!==n&&this.calcDownData(n-1))}}},countLinksCrossingBetweenTwoLayers:function(t,e){var n,i,o,r,s,a,l,c,h,u,d,f,p=this.layers[t].linksTo[e],g=0,m=p.length;for(l=0;m>l;l++)for(n=p[l],c=l+1;m>c;c++)i=p[c],n.target.layer===e?(o=n.source,r=n.target):(o=n.target,r=n.source),i.target.layer===e?(s=i.source,a=i.target):(s=i.target,a=i.source),h=o.gridPosition,u=r.gridPosition,d=s.gridPosition,f=a.gridPosition,0>(h-d)*(u-f)&&g++;return g},calcBaryCenter:function(t){var e=t.upstreamLinkCount,n=t.downstreamLinkCount,i=t.uBaryCenter,o=t.dBaryCenter;return e>0&&n>0?(i+o)/2:e>0?i:n>0?o:0},_gridPositionComparer:function(t,e){return e.gridPosition>t.gridPosition?-1:t.gridPosition>e.gridPosition?1:0},_positionAscendingComparer:function(t,e){return e.k>t.k?-1:t.k>e.k?1:0},_positionDescendingComparer:function(t,e){return e.k>t.k?1:t.k>e.k?-1:0},_firstVirtualNode:function(t){for(var e=0;t.length>e;e++)if(t[e].isVirtual)return e;return-1},compareByIndex:function(t,e){var n=t.index,i=e.index;return i>n?1:n>i?-1:0},intDiv:function(t,e){return(t-t%e)/e},nextVirtualNode:function(t,e){var n,i=e.layerIndex;for(n=i+1;t.length>n;++n)if(t[n].isVirtual)return t[n];return null}}),S=n.Class.extend({init:function(t,e){if(f.isUndefined(t))throw"No diagram given";this.diagram=t,this.nodeMap=new h,this.linkMap=new h,this.capture(e?e:t)},capture:function(t){var e,n,o,r,s,a,l,h,u;if(t instanceof i.Graph){for(r=0;t.nodes.length>r;r++)e=t.nodes[r],o=e.associatedShape,this.nodeMap.set(o.visual.id,new c(e.x,e.y,e.width,e.height));for(r=0;t.links.length>r;r++)a=t.links[r],s=a.associatedConnection,this.linkMap.set(s.visual.id,a.points())}else if(t instanceof Array)for(n=t,r=0;n.length>r;r++)e=n[r],o=e.associatedShape,o&&this.nodeMap.set(o.visual.id,new c(e.x,e.y,e.width,e.height));else if(t.hasOwnProperty("links")&&t.hasOwnProperty("nodes")){for(n=t.nodes,l=t.links,r=0;n.length>r;r++)e=n[r],o=e.associatedShape,o&&this.nodeMap.set(o.visual.id,new c(e.x,e.y,e.width,e.height));for(r=0;l.length>r;r++)a=l[r],s=a.associatedConnection,s&&this.linkMap.set(s.visual.id,a.points)}else{for(h=this.diagram.shapes,u=this.diagram.connections,r=0;h.length>r;r++)o=h[r],this.nodeMap.set(o.visual.id,o.bounds());for(r=0;u.length>r;r++)s=u[r],this.linkMap.set(s.visual.id,s.points())}}});a(i,{init:function(t){n.init(t,i.ui)},SpringLayout:x,TreeLayout:k,GraphAdapter:w,LayeredLayout:C,LayoutBase:_,LayoutState:S})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.toolbar.min",["kendo.core.min","kendo.userevents.min","kendo.popup.min"],t)}(function(){return function(t,e){function n(){var t,e=this.options.anchor,n=e.outerWidth();k.wrap(this.element).addClass("k-split-wrapper"),t="border-box"!==this.element.css("box-sizing")?n-(this.element.outerWidth()-this.element.width()):n,this.element.css({fontFamily:e.css("font-family"),"min-width":t})}function i(t){t.target.is(".k-toggle-button")||t.target.toggleClass(F,"press"==t.type)}function o(e){return e=t(e),e.hasClass("km-actionsheet")?e.closest(".km-popup-wrapper"):e.addClass("km-widget km-actionsheet").wrap('<div class="km-actionsheet-wrapper km-actionsheet-tablet km-widget km-popup"></div>').parent().wrap('<div class="km-popup-wrapper k-popup"></div>').parent()}function r(t){t.preventDefault()}function s(e,n){var i="next"===n?t.fn.next:t.fn.prev,o="next"===n?t.fn.first:t.fn.last,r=i.call(e);return r.is(":kendoFocusable")||!r.length?r:r.find(":kendoFocusable").length?o.call(r.find(":kendoFocusable")):s(r,n)}var a,l,c,h,u,d,f,p,g,m,v,y,_,w,x,b,k=window.kendo,C=k.Class,S=k.ui.Widget,T=t.proxy,A=k.isFunction,D=k.keys,P="k-toolbar",M="k-button",E="k-overflow-button",B="k-toggle-button",I="k-button-group",z="k-split-button",L="k-separator",R="k-popup",O="k-toolbar-resizable",F="k-state-active",V="k-state-disabled",N="k-state-hidden",H="k-group-start",U="k-group-end",j="k-primary",G="k-icon",W="k-i-",q="k-button-icon",$="k-button-icontext",Y="k-list-container k-split-container",X="k-split-button-arrow",Q="k-overflow-anchor",K="k-overflow-container",Z="k-toolbar-first-visible",J="k-toolbar-last-visible",tt="click",et="toggle",nt="open",it="close",ot="overflowOpen",rt="overflowClose",st="never",at="auto",lt="always",ct="k-overflow-hidden",ht=k.attr("uid");k.toolbar={},a={overflowAnchor:'<div tabindex="0" class="k-overflow-anchor"></div>',overflowContainer:'<ul class="k-overflow-container k-list-container"></ul>'},k.toolbar.registerComponent=function(t,e,n){a[t]={toolbar:e,overflow:n}},l=k.Class.extend({addOverflowAttr:function(){this.element.attr(k.attr("overflow"),this.options.overflow||at)},addUidAttr:function(){this.element.attr(ht,this.options.uid)},addIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id)},addOverflowIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id+"_overflow")},attributes:function(){this.options.attributes&&this.element.attr(this.options.attributes)},show:function(){this.element.removeClass(N).show(),this.options.hidden=!1},hide:function(){this.element.addClass(N).hide(),this.options.hidden=!0},remove:function(){this.element.remove()},enable:function(t){t===e&&(t=!0),this.element.toggleClass(V,!t),this.options.enable=t},twin:function(){var t=this.element.attr(ht);return this.overflow?this.toolbar.element.find("["+ht+"='"+t+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+ht+"='"+t+"']").data(this.options.type):e}}),k.toolbar.Item=l,c=l.extend({init:function(n,i){var o=t(n.useButtonTag?'<button tabindex="0"></button>':'<a href tabindex="0"></a>');this.element=o,this.options=n,this.toolbar=i,this.attributes(),n.primary&&o.addClass(j),n.togglable&&(o.addClass(B),this.toggle(n.selected)),n.url===e||n.useButtonTag||(o.attr("href",n.url),n.mobile&&o.attr(k.attr("role"),"button")),n.group&&(o.attr(k.attr("group"),n.group),this.group=this.toolbar.addToGroup(this,n.group)),!n.togglable&&n.click&&A(n.click)&&(this.clickHandler=n.click),n.togglable&&n.toggle&&A(n.toggle)&&(this.toggleHandler=n.toggle)},toggle:function(t,e){t=!!t,this.group&&t?this.group.select(this):this.group||this.select(t),e&&this.twin()&&this.twin().toggle(t)},getParentGroup:function(){return this.options.isChild?this.element.closest("."+I).data("buttonGroup"):e},_addGraphics:function(){var e,n,i,o=this.element,r=this.options.icon,s=this.options.spriteCssClass,a=this.options.imageUrl;(s||a||r)&&(e=!0,o.contents().not("span.k-sprite,span."+G+",img.k-image").each(function(n,i){(1==i.nodeType||3==i.nodeType&&t.trim(i.nodeValue).length>0)&&(e=!1)}),o.addClass(e?q:$)),r?(n=o.children("span."+G).first(),n[0]||(n=t('<span class="'+G+'"></span>').prependTo(o)),n.addClass(W+r)):s?(n=o.children("span.k-sprite").first(),n[0]||(n=t('<span class="k-sprite"></span>').prependTo(o)),n.addClass(s)):a&&(i=o.children("img.k-image").first(),i[0]||(i=t('<img alt="icon" class="k-image" />').prependTo(o)),i.attr("src",a))}}),k.toolbar.Button=c,h=c.extend({init:function(t,e){c.fn.init.call(this,t,e);var n=this.element;n.addClass(M),this.addIdAttr(),t.align&&n.addClass("k-align-"+t.align),"overflow"!=t.showText&&t.text&&n.html(t.mobile?'<span class="km-text">'+t.text+"</span>":t.text),t.hasIcon="overflow"!=t.showIcon&&(t.icon||t.spriteCssClass||t.imageUrl),t.hasIcon&&this._addGraphics(),this.addUidAttr(),this.addOverflowAttr(),this.enable(t.enable),t.hidden&&this.hide(),this.element.data({type:"button",button:this})},select:function(t){t===e&&(t=!1),this.element.toggleClass(F,t),this.options.selected=t}}),k.toolbar.ToolBarButton=h,u=c.extend({init:function(t,e){this.overflow=!0,c.fn.init.call(this,t,e);var n=this.element;"toolbar"!=t.showText&&t.text&&n.html(t.mobile?'<span class="km-text">'+t.text+"</span>":'<span class="k-text">'+t.text+"</span>"),t.hasIcon="toolbar"!=t.showIcon&&(t.icon||t.spriteCssClass||t.imageUrl),t.hasIcon&&this._addGraphics(),t.isChild||this._wrap(),this.addOverflowIdAttr(),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.enable(t.enable),n.addClass(E+" "+M),t.hidden&&this.hide(),this.element.data({type:"button",button:this})},_wrap:function(){this.element=this.element.wrap("<li></li>").parent()},overflowHidden:function(){this.element.addClass(ct)},select:function(t){t===e&&(t=!1),this.options.isChild?this.element.toggleClass(F,t):this.element.find(".k-button").toggleClass(F,t),this.options.selected=t}}),k.toolbar.OverflowButton=u,k.toolbar.registerComponent("button",h,u),d=l.extend({createButtons:function(e){var n,i,o=this.options,r=o.buttons||[];for(i=0;r.length>i;i++)r[i].uid||(r[i].uid=k.guid()),n=new e(t.extend({mobile:o.mobile,isChild:!0,type:"button"},r[i]),this.toolbar),n.element.appendTo(this.element)},refresh:function(){this.element.children().filter(":not('."+N+"'):first").addClass(H),this.element.children().filter(":not('."+N+"'):last").addClass(U)}}),k.toolbar.ButtonGroup=d,f=d.extend({init:function(e,n){var i=this.element=t("<div></div>");this.options=e,this.toolbar=n,this.addIdAttr(),e.align&&i.addClass("k-align-"+e.align),this.createButtons(h),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass(I),this.element.data({type:"buttonGroup",buttonGroup:this})}}),k.toolbar.ToolBarButtonGroup=f,p=d.extend({init:function(e,n){var i=this.element=t("<li></li>");this.options=e,this.toolbar=n,this.overflow=!0,this.addOverflowIdAttr(),this.createButtons(u),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass((e.mobile?"":I)+" k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(ct)}}),k.toolbar.OverflowButtonGroup=p,k.toolbar.registerComponent("buttonGroup",f,p),g=l.extend({init:function(e,n){var i=this.element=t('<div class="'+z+'" tabindex="0"></div>');this.options=e,this.toolbar=n,this.mainButton=new h(e,n),this.arrowButton=t('<a class="'+M+" "+X+'"><span class="'+(e.mobile?"km-icon km-arrowdown":"k-icon k-i-arrow-s")+'"></span></a>'),this.popupElement=t('<ul class="'+Y+'"></ul>'),this.mainButton.element.removeAttr("href tabindex").appendTo(i),this.arrowButton.appendTo(i),this.popupElement.appendTo(i),e.align&&i.addClass("k-align-"+e.align),e.id||(e.id=e.uid),i.attr("id",e.id+"_wrapper"),this.addOverflowAttr(),this.addUidAttr(),this.createMenuButtons(),this.createPopup(),this._navigatable(),this.mainButton.main=!0,i.data({type:"splitButton",splitButton:this,kendoPopup:this.popup})},_navigatable:function(){var e=this;e.popupElement.on("keydown","."+M,function(n){var i=t(n.target).parent();n.preventDefault(),n.keyCode===D.ESC||n.keyCode===D.TAB||n.altKey&&n.keyCode===D.UP?(e.toggle(),e.focus()):n.keyCode===D.DOWN?s(i,"next").focus():n.keyCode===D.UP?s(i,"prev").focus():(n.keyCode===D.SPACEBAR||n.keyCode===D.ENTER)&&e.toolbar.userEvents.trigger("tap",{target:t(n.target)})})},createMenuButtons:function(){var e,n,i=this.options,o=i.menuButtons;for(n=0;o.length>n;n++)e=new h(t.extend({mobile:i.mobile,type:"button",click:i.click},o[n]),this.toolbar),e.element.wrap("<li></li>").parent().appendTo(this.popupElement)},createPopup:function(){var e=this.options,i=this.element;this.popupElement.attr("id",e.id+"_optionlist").attr(ht,e.rootUid),e.mobile&&(this.popupElement=o(this.popupElement)),this.popup=this.popupElement.kendoPopup({appendTo:e.mobile?t(e.mobile).children(".km-pane"):null,anchor:i,isRtl:this.toolbar._isRtl,copyAnchorStyles:!1,animation:e.animation,open:n,activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(){i.focus()}}).data("kendoPopup"),this.popup.element.on(tt,"a.k-button",r)},remove:function(){this.popup.element.off(tt,"a.k-button"),this.popup.destroy(),this.element.remove()},toggle:function(){this.popup.toggle()},enable:function(t){t===e&&(t=!0),this.mainButton.enable(t),this.options.enable=t},focus:function(){this.element.focus()}}),k.toolbar.ToolBarSplitButton=g,m=l.extend({init:function(e,n){var i,o,r=this.element=t('<li class="'+z+'"></li>'),s=e.menuButtons;for(this.options=e,this.toolbar=n,this.overflow=!0,this.mainButton=new u(t.extend({isChild:!0},e)),this.mainButton.element.appendTo(r),o=0;s.length>o;o++)i=new u(t.extend({mobile:e.mobile,isChild:!0},s[o]),this.toolbar),i.element.appendTo(r);this.addUidAttr(),this.addOverflowAttr(),this.mainButton.main=!0,r.data({type:"splitButton",splitButton:this})},overflowHidden:function(){this.element.addClass(ct)}}),k.toolbar.OverflowSplitButton=m,k.toolbar.registerComponent("splitButton",g,m),v=l.extend({init:function(e,n){var i=this.element=t("<div> </div>");this.element=i,this.options=e,this.toolbar=n,this.attributes(),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),i.addClass(L),i.data({type:"separator",separator:this})}}),y=l.extend({init:function(e,n){var i=this.element=t("<li> </li>");this.element=i,this.options=e,this.toolbar=n,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),i.addClass(L),i.data({type:"separator",separator:this})},overflowHidden:function(){this.element.addClass(ct)}}),k.toolbar.registerComponent("separator",v,y),_=l.extend({init:function(e,n,i){var o=A(e)?e(n):e;o=o instanceof jQuery?o.wrap("<div></div>").parent():t("<div></div>").html(o),this.element=o,this.options=n,this.options.type="template",this.toolbar=i,this.attributes(),this.addUidAttr(),this.addIdAttr(),this.addOverflowAttr(),o.data({type:"template",template:this})}}),k.toolbar.TemplateItem=_,w=l.extend({init:function(e,n,i){var o=t(A(e)?e(n):e);o=o instanceof jQuery?o.wrap("<li></li>").parent():t("<li></li>").html(o),this.element=o,this.options=n,this.options.type="template",this.toolbar=i,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),this.addOverflowAttr(),o.data({type:"template",template:this})},overflowHidden:function(){this.element.addClass(ct)}}),k.toolbar.OverflowTemplateItem=w,x=C.extend({init:function(t){this.name=t,this.buttons=[]},add:function(t){this.buttons[this.buttons.length]=t},remove:function(e){var n=t.inArray(e,this.buttons);this.buttons.splice(n,1)},select:function(t){var e,n;for(n=0;this.buttons.length>n;n++)e=this.buttons[n],e.select(!1);t.select(!0),t.twin()&&t.twin().select(!0)}}),b=S.extend({init:function(e,n){var o,s=this;if(S.fn.init.call(s,e,n),n=s.options,e=s.wrapper=s.element,e.addClass(P+" k-widget"),this.uid=k.guid(),this._isRtl=k.support.isRtl(e),this._groups={},e.attr(ht,this.uid),s.isMobile="boolean"==typeof n.mobile?n.mobile:s.element.closest(".km-root")[0],s.animation=s.isMobile?{open:{effects:"fade"}}:{},s.isMobile&&(e.addClass("km-widget"),G="km-icon",W="km-",M="km-button",I="km-buttongroup km-widget",F="km-state-active",V="km-state-disabled"),n.resizable?(s._renderOverflow(),e.addClass(O),s.overflowUserEvents=new k.UserEvents(s.element,{threshold:5,allowSelection:!0,filter:"."+Q,tap:T(s._toggleOverflow,s)}),s._resizeHandler=k.onResize(function(){s.resize()})):s.popup={element:t([])},n.items&&n.items.length)for(o=0;n.items.length>o;o++)s.add(n.items[o]);s.userEvents=new k.UserEvents(document,{threshold:5,allowSelection:!0,filter:"["+ht+"="+this.uid+"] a."+M+", ["+ht+"="+this.uid+"] ."+E,tap:T(s._buttonClick,s),press:i,release:i}),s.element.on(tt,"a.k-button",r),s._navigatable(),n.resizable&&s.popup.element.on(tt,NaN,r),n.resizable&&this._toggleOverflowAnchor(),k.notify(s)},events:[tt,et,nt,it,ot,rt],options:{name:"ToolBar",items:[],resizable:!0,mobile:null},addToGroup:function(t,e){var n;return n=this._groups[e]?this._groups[e]:this._groups[e]=new x,n.add(t),n},destroy:function(){var e=this;e.element.find("."+z).each(function(e,n){t(n).data("kendoPopup").destroy()}),e.element.off(tt,"a.k-button"),e.userEvents.destroy(),e.options.resizable&&(k.unbindResize(e._resizeHandler),e.overflowUserEvents.destroy(),e.popup.element.off(tt,"a.k-button"),e.popup.destroy()),S.fn.destroy.call(e)},add:function(e){var n,i,o,r=a[e.type],s=e.template,l=this,c=l.isMobile?"":"k-item k-state-default",h=e.overflowTemplate;if(t.extend(e,{uid:k.guid(),animation:l.animation,mobile:l.isMobile,rootUid:l.uid}),e.menuButtons)for(o=0;e.menuButtons.length>o;o++)t.extend(e.menuButtons[o],{uid:k.guid()});s&&!h?e.overflow=st:e.overflow||(e.overflow=at),e.overflow!==st&&l.options.resizable&&(h?i=new w(h,e,l):r&&(i=new r.overflow(e,l),i.element.addClass(c)),i&&(e.overflow===at&&i.overflowHidden(),i.element.appendTo(l.popup.container),l.angular("compile",function(){return{elements:i.element.get()}}))),e.overflow!==lt&&(s?n=new _(s,e,l):r&&(n=new r.toolbar(e,l)),n&&(l.options.resizable?(n.element.appendTo(l.element).css("visibility","hidden"),l._shrink(l.element.innerWidth()),n.element.css("visibility","visible")):n.element.appendTo(l.element),l.angular("compile",function(){return{elements:n.element.get()}})))},_getItem:function(e){var n,i,o,r,s=this.options.resizable;return n=this.element.find(e),n.length||(n=t(".k-split-container[data-uid="+this.uid+"]").find(e)),r=n.length?n.data("type"):"",i=n.data(r),i?(i.main&&(n=n.parent("."+z),r="splitButton",i=n.data(r)),s&&(o=i.twin())):s&&(n=this.popup.element.find(e),r=n.length?n.data("type"):"",o=n.data(r),o&&o.main&&(n=n.parent("."+z),r="splitButton",o=n.data(r))),{type:r,toolbar:i,overflow:o}},remove:function(t){var e=this._getItem(t);e.toolbar&&e.toolbar.remove(),e.overflow&&e.overflow.remove(),this.resize(!0)},hide:function(t){var e=this._getItem(t);e.toolbar&&(e.toolbar.hide(),"button"===e.toolbar.options.type&&e.toolbar.options.isChild&&e.toolbar.getParentGroup().refresh()),e.overflow&&(e.overflow.hide(),"button"===e.overflow.options.type&&e.overflow.options.isChild&&e.overflow.getParentGroup().refresh()),this.resize(!0)},show:function(t){var e=this._getItem(t);e.toolbar?(e.toolbar.show(),"button"===e.toolbar.options.type&&e.toolbar.options.isChild&&e.toolbar.getParentGroup().refresh()):e.overflow&&(e.overflow.show(),"button"===e.overflow.options.type&&e.overflow.options.isChild&&e.overflow.getParentGroup().refresh()),this.resize(!0)},enable:function(t,n){var i=this._getItem(t);e===n&&(n=!0),i.toolbar&&i.toolbar.enable(n),i.overflow&&i.overflow.enable(n)},getSelectedFromGroup:function(t){return this.element.find("."+B+"[data-group='"+t+"']").filter("."+F)},toggle:function(n,i){var o=t(n),r=o.data("button");r.options.togglable&&(i===e&&(i=!0),r.toggle(i,!0))},_renderOverflow:function(){var e=this,n=a.overflowContainer,i=e._isRtl,r=i?"left":"right";e.overflowAnchor=t(a.overflowAnchor).addClass(M),e.element.append(e.overflowAnchor),e.isMobile?(e.overflowAnchor.append('<span class="km-icon km-more"></span>'),n=o(n)):e.overflowAnchor.append('<span class="k-icon k-i-arrow-s"></span>'),e.popup=new k.ui.Popup(n,{origin:"bottom "+r,position:"top "+r,anchor:e.overflowAnchor,isRtl:i,animation:e.animation,appendTo:e.isMobile?t(e.isMobile).children(".km-pane"):null,copyAnchorStyles:!1,open:function(n){var o=k.wrap(e.popup.element).addClass("k-overflow-wrapper");e.isMobile?e.popup.container.css("max-height",parseFloat(t(".km-content:visible").innerHeight())-15+"px"):o.css("margin-left",(i?-1:1)*((o.outerWidth()-o.width())/2+1)),e.trigger(ot)&&n.preventDefault()},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(t){e.trigger(rt)&&t.preventDefault(),this.element.focus()}}),e.popup.element.on("keydown","."+M,function(n){var i,o=t(n.target),r=o.parent(),a=r.is("."+I)||r.is("."+z);n.preventDefault(),n.keyCode===D.ESC||n.keyCode===D.TAB||n.altKey&&n.keyCode===D.UP?(e._toggleOverflow(),e.overflowAnchor.focus()):n.keyCode===D.DOWN?(i=!a||a&&o.is(":last-child")?r:o,s(i,"next").focus()):n.keyCode===D.UP?(i=!a||a&&o.is(":first-child")?r:o,s(i,"prev").focus()):(n.keyCode===D.SPACEBAR||n.keyCode===D.ENTER)&&e.userEvents.trigger("tap",{target:t(n.target)})}),e.popup.container=e.isMobile?e.popup.element.find("."+K):e.popup.element,e.popup.container.attr(ht,this.uid)},_toggleOverflowAnchor:function(){this.overflowAnchor.css(this.popup.element.children(":not(."+ct+", ."+R+")").length>0?{visibility:"visible",width:""}:{visibility:"hidden",width:"1px"})},_buttonClick:function(n){var i,o,r,s,a,l,c=this,h=n.target.closest("."+X).length;return n.preventDefault(),h?(c._toggle(n),e):(o=t(n.target).closest("."+M,c.element),o.hasClass(Q)||(r=o.data("button"),!r&&c.popup&&(o=t(n.target).closest("."+E,c.popup.container),r=o.parent("li").data("button")),r&&r.options.enable&&(r.options.togglable?(a=A(r.toggleHandler)?r.toggleHandler:null,r.toggle(!r.options.selected,!0),l={target:o,group:r.options.group,checked:r.options.selected,id:r.options.id},a&&a.call(c,l),c.trigger(et,l)):(a=A(r.clickHandler)?r.clickHandler:null,l={sender:c,target:o,id:r.options.id},a&&a.call(c,l),c.trigger(tt,l)),r.options.url&&(window.location.href=r.options.url),o.hasClass(E)&&c.popup.close(),s=o.closest(".k-split-container"),s[0]&&(i=s.data("kendoPopup"),(i?i:s.parents(".km-popup-wrapper").data("kendoPopup")).close()))),e)},_navigatable:function(){var e=this;e.element.attr("tabindex",0).focus(function(){var e=t(this).find(":kendoFocusable:first");e.is("."+Q)&&(e=s(e,"next")),e[0].focus()}).on("keydown",T(e._keydown,e))},_keydown:function(n){var i,o,r,s,a,l=t(n.target),c=n.keyCode,h=this.element.children(":not(.k-separator):visible");return c===D.TAB&&(i=l.parentsUntil(this.element).last(),o=!1,r=!1,i.length||(i=l),i.is("."+Q)&&(n.shiftKey&&n.preventDefault(),h.last().is(":kendoFocusable")?h.last().focus():h.last().find(":kendoFocusable").last().focus()),n.shiftKey||h.index(i)!==h.length-1||(o=i.is("."+I)?l.is(":last-child"):!0),n.shiftKey&&1===h.index(i)&&(r=i.is("."+I)?l.is(":first-child"):!0),o&&"hidden"!==this.overflowAnchor.css("visibility")&&(n.preventDefault(),this.overflowAnchor.focus()),r&&(n.preventDefault(),this.wrapper.prev(":kendoFocusable").focus())),n.altKey&&c===D.DOWN?(s=t(document.activeElement).data("splitButton"),a=t(document.activeElement).is("."+Q),s?s.toggle():a&&this._toggleOverflow(),e):c!==D.SPACEBAR&&c!==D.ENTER||l.is("input, checkbox")?e:(n.preventDefault(),l.is("."+z)&&(l=l.children().first()),this.userEvents.trigger("tap",{target:l}),e)},_toggle:function(e){var n,i=t(e.target).closest("."+z).data("splitButton");e.preventDefault(),i.options.enable&&(n=i.popup.element.is(":visible")?this.trigger(it,{target:i.element}):this.trigger(nt,{target:i.element}),n||i.toggle())},_toggleOverflow:function(){this.popup.toggle()},_resize:function(t){var e=t.width;this.options.resizable&&(this.popup.close(),this._shrink(e),this._stretch(e),this._markVisibles(),this._toggleOverflowAnchor())},_childrenWidth:function(){var e=0;return this.element.children(":visible:not('."+N+"')").each(function(){e+=t(this).outerWidth(!0)}),Math.ceil(e)},_shrink:function(t){var e,n,i;if(t<this._childrenWidth())for(n=this.element.children(":visible:not([data-overflow='never'], ."+Q+")"),i=n.length-1;i>=0&&(e=n.eq(i),!(t>this._childrenWidth()));i--)this._hideItem(e)},_stretch:function(t){var e,n,i;if(t>this._childrenWidth())for(n=this.element.children(":hidden:not('."+N+"')"),i=0;n.length>i&&(e=n.eq(i),!(t<this._childrenWidth())&&this._showItem(e,t));i++);},_hideItem:function(t){t.hide(),this.popup&&this.popup.container.find(">li[data-uid='"+t.data("uid")+"']").removeClass(ct)},_showItem:function(t,e){return t.length&&e>this._childrenWidth()+t.outerWidth(!0)?(t.show(),this.popup&&this.popup.container.find(">li[data-uid='"+t.data("uid")+"']").addClass(ct),!0):!1},_markVisibles:function(){var t=this.popup.container.children(),e=this.element.children(":not(.k-overflow-anchor)"),n=t.filter(":not(.k-overflow-hidden)"),i=e.filter(":visible");t.add(e).removeClass(Z+" "+J),n.first().add(i.first()).addClass(Z),n.last().add(i.last()).addClass(J)}}),k.ui.plugin(b)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.calendar.min",["kendo.core.min"],t)}(function(){return function(t,e){function n(t,e,n,i){var o,r=t.getFullYear(),s=e.getFullYear(),a=n.getFullYear();return r-=r%i,o=r+(i-1),s>r&&(r=s),o>a&&(o=a),r+"-"+o}function i(t){for(var e,n=0,i=t.min,o=t.max,r=t.start,s=t.setter,l=t.build,c=t.cells||12,h=t.perRow||4,u=t.content||z,d=t.empty||L,f=t.html||'<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><tbody><tr role="row">';c>n;n++)n>0&&n%h===0&&(f+='</tr><tr role="row">'),r=new vt(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0),D(r,0),e=l(r,n,t.disableDates),f+=a(r,i,o)?u(e):d(e),s(r,1);return f+"</tr></tbody></table>"}function o(t,e,n){var i=t.getFullYear(),o=e.getFullYear(),r=o,s=0;return n&&(o-=o%n,r=o-o%n+n-1),i>r?s=1:o>i&&(s=-1),s}function r(){var t=new vt;return new vt(t.getFullYear(),t.getMonth(),t.getDate())}function s(t,e,n){var i=r();return t&&(i=new vt(+t)),e>i?i=new vt(+e):i>n&&(i=new vt(+n)),i}function a(t,e,n){return+t>=+e&&+n>=+t}function l(t,e){return t.slice(e).concat(t.slice(0,e))}function c(t,e,n){e=e instanceof vt?e.getFullYear():t.getFullYear()+n*e,t.setFullYear(e)}function h(e){var n=t(this).hasClass("k-state-disabled");n||t(this).toggleClass(Q,st.indexOf(e.type)>-1||e.type==ot)}function u(t){t.preventDefault()}function d(t){return E(t).calendars.standard}function f(t){var n=yt[t.start],i=yt[t.depth],o=E(t.culture);t.format=P(t.format||o.calendars.standard.patterns.d),isNaN(n)&&(n=0,t.start=W),(i===e||i>n)&&(t.depth=W),t.dates||(t.dates=[])}function p(t){O&&t.find("*").attr("unselectable","on")}function g(t,e){for(var n=0,i=e.length;i>n;n++)if(t===+e[n])return!0;return!1}function m(t,e){return t?t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate():!1}function v(t,e){return t?t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth():!1;
}function y(e){return b.isFunction(e)?e:t.isArray(e)?_(e):t.noop}function _(e){var n,i,o,r,s,a=[],l=["su","mo","tu","we","th","fr","sa"];for(o=0;e.length>o;o++)r=e[o].toLowerCase(),s=t.inArray(r,l),s>-1&&a.push(s);return n="var found = date && $.inArray(date.getDay(),["+a+"]) > -1;if (found) { return true } else {return false}",i=Function("date",n)}function w(t,e){return t instanceof Date&&e instanceof Date&&(t=t.getTime(),e=e.getTime()),t===e}var x,b=window.kendo,k=b.support,C=b.ui,S=C.Widget,T=b.keys,A=b.parseDate,D=b.date.adjustDST,P=b._extractFormat,M=b.template,E=b.getCulture,B=b.support.transitions,I=B?B.css+"transform-origin":"",z=M('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>',{useWithBlock:!1}),L=M('<td role="gridcell"> </td>',{useWithBlock:!1}),R=b.support.browser,O=R.msie&&9>R.version,F=".kendoCalendar",V="click"+F,N="keydown"+F,H="id",U="min",j="left",G="slideIn",W="month",q="century",$="change",Y="navigate",X="value",Q="k-state-hover",K="k-state-disabled",Z="k-state-focused",J="k-other-month",tt=' class="'+J+'"',et="k-nav-today",nt="td:has(.k-link)",it="blur"+F,ot="focus",rt=ot+F,st=k.touch?"touchstart":"mouseenter",at=k.touch?"touchstart"+F:"mouseenter"+F,lt=k.touch?"touchend"+F+" touchmove"+F:"mouseleave"+F,ct=6e4,ht=864e5,ut="_prevArrow",dt="_nextArrow",ft="aria-disabled",pt="aria-selected",gt=t.proxy,mt=t.extend,vt=Date,yt={month:0,year:1,decade:2,century:3},_t=S.extend({init:function(e,n){var i,o,a=this;S.fn.init.call(a,e,n),e=a.wrapper=a.element,n=a.options,n.url=window.unescape(n.url),a.options.disableDates=y(a.options.disableDates),a._templates(),a._header(),a._footer(a.footer),o=e.addClass("k-widget k-calendar").on(at+" "+lt,nt,h).on(N,"table.k-content",gt(a._move,a)).on(V,nt,function(e){var n=e.currentTarget.firstChild,i=a._toDateObject(n);-1!=n.href.indexOf("#")&&e.preventDefault(),a.options.disableDates(i)||a._click(t(n))}).on("mouseup"+F,"table.k-content, .k-footer",function(){a._focusView(a.options.focusOnNav!==!1)}).attr(H),o&&(a._cellID=o+"_cell_selected"),f(n),i=A(n.value,n.format,n.culture),a._index=yt[n.start],a._current=new vt(+s(i,n.min,n.max)),a._addClassProxy=function(){if(a._active=!0,a._cell.hasClass(K)){var t=a._view.toDateString(r());a._cell=a._cellByDate(t)}a._cell.addClass(Z)},a._removeClassProxy=function(){a._active=!1,a._cell.removeClass(Z)},a.value(i),b.notify(a)},options:{name:"Calendar",value:null,min:new vt(1900,0,1),max:new vt(2099,11,31),dates:[],url:"",culture:"",footer:"",format:"",month:{},start:W,depth:W,animation:{horizontal:{effects:G,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}}},events:[$,Y],setOptions:function(t){var e=this;f(t),t.dates[0]||(t.dates=e.options.dates),t.disableDates=y(t.disableDates),S.fn.setOptions.call(e,t),e._templates(),e._footer(e.footer),e._index=yt[e.options.start],e.navigate()},destroy:function(){var t=this,e=t._today;t.element.off(F),t._title.off(F),t[ut].off(F),t[dt].off(F),b.destroy(t._table),e&&b.destroy(e.off(F)),S.fn.destroy.call(t)},current:function(){return this._current},view:function(){return this._view},focus:function(t){t=t||this._table,this._bindTable(t),t.focus()},min:function(t){return this._option(U,t)},max:function(t){return this._option("max",t)},navigateToPast:function(){this._navigate(ut,-1)},navigateToFuture:function(){this._navigate(dt,1)},navigateUp:function(){var t=this,e=t._index;t._title.hasClass(K)||t.navigate(t._current,++e)},navigateDown:function(t){var n=this,i=n._index,o=n.options.depth;if(t)return i===yt[o]?(w(n._value,n._current)&&w(n._value,t)||(n.value(t),n.trigger($)),e):(n.navigate(t,--i),e)},navigate:function(n,i){var o,r,a,l,c,h,u,d,f,g,m,v,y,_,w,b,k;i=isNaN(i)?yt[i]:i,o=this,r=o.options,a=r.culture,l=r.min,c=r.max,h=o._title,u=o._table,d=o._oldTable,f=o._value,g=o._current,m=n&&+n>+g,v=i!==e&&i!==o._index,n||(n=g),o._current=n=new vt(+s(n,l,c)),i===e?i=o._index:o._index=i,o._view=_=x.views[i],w=_.compare,b=i===yt[q],h.toggleClass(K,b).attr(ft,b),b=w(n,l)<1,o[ut].toggleClass(K,b).attr(ft,b),b=w(n,c)>-1,o[dt].toggleClass(K,b).attr(ft,b),u&&d&&d.data("animating")&&(d.kendoStop(!0,!0),u.kendoStop(!0,!0)),o._oldTable=u,(!u||o._changeView)&&(h.html(_.title(n,l,c,a)),o._table=y=t(_.content(mt({min:l,max:c,date:n,url:r.url,dates:r.dates,format:r.format,culture:a,disableDates:r.disableDates},o[_.name]))),p(y),k=u&&u.data("start")===y.data("start"),o._animate({from:u,to:y,vertical:v,future:m,replace:k}),o.trigger(Y),o._focus(n)),i===yt[r.depth]&&f&&!o.options.disableDates(f)&&o._class("k-state-selected",f),o._class(Z,n),!u&&o._cell&&o._cell.removeClass(Z),o._changeView=!0},value:function(t){var n=this,i=n._view,o=n.options,r=n._view,s=o.min,l=o.max;return t===e?n._value:(null===t&&(n._current=new Date(n._current.getFullYear(),n._current.getMonth(),n._current.getDate())),t=A(t,o.format,o.culture),null!==t&&(t=new vt(+t),a(t,s,l)||(t=null)),n.options.disableDates(t)?n._value===e&&(n._value=null):n._value=t,r&&null===t&&n._cell?n._cell.removeClass("k-state-selected"):(n._changeView=!t||i&&0!==i.compare(t,n._current),n.navigate(t)),e)},_move:function(e){var n,i,o,r,l=this,c=l.options,h=e.keyCode,u=l._view,d=l._index,f=l.options.min,p=l.options.max,g=new vt(+l._current),m=b.support.isRtl(l.wrapper),v=l.options.disableDates;return e.target===l._table[0]&&(l._active=!0),e.ctrlKey?h==T.RIGHT&&!m||h==T.LEFT&&m?(l.navigateToFuture(),i=!0):h==T.LEFT&&!m||h==T.RIGHT&&m?(l.navigateToPast(),i=!0):h==T.UP?(l.navigateUp(),i=!0):h==T.DOWN&&(l._click(t(l._cell[0].firstChild)),i=!0):(h==T.RIGHT&&!m||h==T.LEFT&&m?(n=1,i=!0):h==T.LEFT&&!m||h==T.RIGHT&&m?(n=-1,i=!0):h==T.UP?(n=0===d?-7:-4,i=!0):h==T.DOWN?(n=0===d?7:4,i=!0):h==T.ENTER?(l._click(t(l._cell[0].firstChild)),i=!0):h==T.HOME||h==T.END?(o=h==T.HOME?"first":"last",r=u[o](g),g=new vt(r.getFullYear(),r.getMonth(),r.getDate(),g.getHours(),g.getMinutes(),g.getSeconds(),g.getMilliseconds()),i=!0):h==T.PAGEUP?(i=!0,l.navigateToPast()):h==T.PAGEDOWN&&(i=!0,l.navigateToFuture()),(n||o)&&(o||u.setDate(g,n),v(g)&&(g=l._nextNavigatable(g,n)),a(g,f,p)&&l._focus(s(g,c.min,c.max)))),i&&e.preventDefault(),l._current},_nextNavigatable:function(t,e){var n=this,i=!0,o=n._view,r=n.options.min,s=n.options.max,l=n.options.disableDates,c=new Date(t.getTime());for(o.setDate(c,-e);i;){if(o.setDate(t,e),!a(t,r,s)){t=c;break}i=l(t)}return t},_animate:function(t){var e=this,n=t.from,i=t.to,o=e._active;n?n.parent().data("animating")?(n.off(F),n.parent().kendoStop(!0,!0).remove(),n.remove(),i.insertAfter(e.element[0].firstChild),e._focusView(o)):!n.is(":visible")||e.options.animation===!1||t.replace?(i.insertAfter(n),n.off(F).remove(),e._focusView(o)):e[t.vertical?"_vertical":"_horizontal"](n,i,t.future):(i.insertAfter(e.element[0].firstChild),e._bindTable(i))},_horizontal:function(t,e,n){var i=this,o=i._active,r=i.options.animation.horizontal,s=r.effects,a=t.outerWidth();s&&-1!=s.indexOf(G)&&(t.add(e).css({width:a}),t.wrap("<div/>"),i._focusView(o,t),t.parent().css({position:"relative",width:2*a,"float":j,"margin-left":n?0:-a}),e[n?"insertAfter":"insertBefore"](t),mt(r,{effects:G+":"+(n?"right":j),complete:function(){t.off(F).remove(),i._oldTable=null,e.unwrap(),i._focusView(o)}}),t.parent().kendoStop(!0,!0).kendoAnimate(r))},_vertical:function(t,e){var n,i,o=this,r=o.options.animation.vertical,s=r.effects,a=o._active;s&&-1!=s.indexOf("zoom")&&(e.css({position:"absolute",top:t.prev().outerHeight(),left:0}).insertBefore(t),I&&(n=o._cellByDate(o._view.toDateString(o._current)),i=n.position(),i=i.left+parseInt(n.width()/2,10)+"px "+(i.top+parseInt(n.height()/2,10)+"px"),e.css(I,i)),t.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){t.off(F).remove(),o._oldTable=null,e.css({position:"static",top:0,left:0}),o._focusView(a)}}),e.kendoStop(!0,!0).kendoAnimate(r))},_cellByDate:function(e){return this._table.find("td:not(."+J+")").filter(function(){return t(this.firstChild).attr(b.attr(X))===e})},_class:function(e,n){var i,o=this,r=o._cellID,s=o._cell,a=o._view.toDateString(n);s&&s.removeAttr(pt).removeAttr("aria-label").removeAttr(H),n&&(i=o.options.disableDates(n)),s=o._table.find("td:not(."+J+")").removeClass(e).filter(function(){return t(this.firstChild).attr(b.attr(X))===a}).attr(pt,!0),(e===Z&&!o._active&&o.options.focusOnNav!==!1||i)&&(e=""),s.addClass(e),s[0]&&(o._cell=s),r&&(s.attr(H,r),o._table.removeAttr("aria-activedescendant").attr("aria-activedescendant",r))},_bindTable:function(t){t.on(rt,this._addClassProxy).on(it,this._removeClassProxy)},_click:function(t){var e=this,n=e.options,i=new Date(+e._current),o=e._toDateObject(t);D(o,0),e.options.disableDates(o)&&(o=e._value),e._view.setDate(i,o),e.navigateDown(s(i,n.min,n.max))},_focus:function(t){var e=this,n=e._view;0!==n.compare(t,e._current)?e.navigate(t):(e._current=t,e._class(Z,t))},_focusView:function(t,e){t&&this.focus(e)},_footer:function(n){var i=this,o=r(),s=i.element,a=s.find(".k-footer");return n?(a[0]||(a=t('<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>').appendTo(s)),i._today=a.show().find(".k-link").html(n(o)).attr("title",b.toString(o,"D",i.options.culture)),i._toggle(),e):(i._toggle(!1),a.hide(),e)},_header:function(){var t,e=this,n=e.element;n.find(".k-header")[0]||n.html('<div class="k-header"><a href="#" role="button" class="k-link k-nav-prev"><span class="k-icon k-i-arrow-w"></span></a><a href="#" role="button" aria-live="assertive" aria-atomic="true" class="k-link k-nav-fast"></a><a href="#" role="button" class="k-link k-nav-next"><span class="k-icon k-i-arrow-e"></span></a></div>'),t=n.find(".k-link").on(at+" "+lt+" "+rt+" "+it,h).click(!1),e._title=t.eq(1).on(V,function(){e._active=e.options.focusOnNav!==!1,e.navigateUp()}),e[ut]=t.eq(0).on(V,function(){e._active=e.options.focusOnNav!==!1,e.navigateToPast()}),e[dt]=t.eq(2).on(V,function(){e._active=e.options.focusOnNav!==!1,e.navigateToFuture()})},_navigate:function(t,e){var n=this,i=n._index+1,o=new vt(+n._current);t=n[t],t.hasClass(K)||(i>3?o.setFullYear(o.getFullYear()+100*e):x.views[i].setDate(o,e),n.navigate(o))},_option:function(t,n){var i,o=this,r=o.options,s=o._value||o._current;return n===e?r[t]:(n=A(n,r.format,r.culture),n&&(r[t]=new vt(+n),i=t===U?n>s:s>n,(i||v(s,n))&&(i&&(o._value=null),o._changeView=!0),o._changeView||(o._changeView=!(!r.month.content&&!r.month.empty)),o.navigate(o._value),o._toggle()),e)},_toggle:function(t){var n=this,i=n.options,o=n.options.disableDates(r()),s=n._today;t===e&&(t=a(r(),i.min,i.max)),s&&(s.off(V),t&&!o?s.addClass(et).removeClass(K).on(V,gt(n._todayClick,n)):s.removeClass(et).addClass(K).on(V,u))},_todayClick:function(t){var e=this,n=yt[e.options.depth],i=e.options.disableDates,o=r();t.preventDefault(),i(o)||(0===e._view.compare(e._current,o)&&e._index==n&&(e._changeView=!1),e._value=o,e.navigate(o,n),e.trigger($))},_toDateObject:function(e){var n=t(e).attr(b.attr(X)).split("/");return n=new vt(n[0],n[1],n[2])},_templates:function(){var t=this,e=t.options,n=e.footer,i=e.month,o=i.content,r=i.empty;t.month={content:M('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" '+b.attr("value")+'="#=data.dateString#" title="#=data.title#">'+(o||"#=data.value#")+"</a></td>",{useWithBlock:!!o}),empty:M('<td role="gridcell">'+(r||" ")+"</td>",{useWithBlock:!!r})},t.footer=n!==!1?M(n||'#= kendo.toString(data,"D","'+e.culture+'") #',{useWithBlock:!1}):null}});C.plugin(_t),x={firstDayOfMonth:function(t){return new vt(t.getFullYear(),t.getMonth(),1)},firstVisibleDay:function(t,e){e=e||b.culture().calendar;for(var n=e.firstDay,i=new vt(t.getFullYear(),t.getMonth(),0,t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());i.getDay()!=n;)x.setTime(i,-1*ht);return i},setTime:function(t,e){var n=t.getTimezoneOffset(),i=new vt(t.getTime()+e),o=i.getTimezoneOffset()-n;t.setTime(i.getTime()+o*ct)},views:[{name:W,title:function(t,e,n,i){return d(i).months.names[t.getMonth()]+" "+t.getFullYear()},content:function(t){for(var e=this,n=0,o=t.min,r=t.max,s=t.date,a=t.dates,c=t.format,h=t.culture,u=t.url,f=u&&a[0],p=d(h),m=p.firstDay,v=p.days,y=l(v.names,m),_=l(v.namesShort,m),w=x.firstVisibleDay(s,p),k=e.first(s),C=e.last(s),S=e.toDateString,T=new vt,A='<table tabindex="0" role="grid" class="k-content" cellspacing="0" data-start="'+S(w)+'"><thead><tr role="row">';7>n;n++)A+='<th scope="col" title="'+y[n]+'">'+_[n]+"</th>";return T=new vt(T.getFullYear(),T.getMonth(),T.getDate()),D(T,0),T=+T,i({cells:42,perRow:7,html:A+='</tr></thead><tbody><tr role="row">',start:w,min:new vt(o.getFullYear(),o.getMonth(),o.getDate()),max:new vt(r.getFullYear(),r.getMonth(),r.getDate()),content:t.content,empty:t.empty,setter:e.setDate,disableDates:t.disableDates,build:function(t,e,n){var i=[],o=t.getDay(),r="",s="#";return(k>t||t>C)&&i.push(J),n(t)&&i.push(K),+t===T&&i.push("k-today"),(0===o||6===o)&&i.push("k-weekend"),f&&g(+t,a)&&(s=u.replace("{0}",b.toString(t,c,h)),r=" k-action-link"),{date:t,dates:a,ns:b.ns,title:b.toString(t,"D",h),value:t.getDate(),dateString:S(t),cssClass:i[0]?' class="'+i.join(" ")+'"':"",linkClass:r,url:s}}})},first:function(t){return x.firstDayOfMonth(t)},last:function(t){var e=new vt(t.getFullYear(),t.getMonth()+1,0),n=x.firstDayOfMonth(t),i=Math.abs(e.getTimezoneOffset()-n.getTimezoneOffset());return i&&e.setHours(n.getHours()+i/60),e},compare:function(t,e){var n,i=t.getMonth(),o=t.getFullYear(),r=e.getMonth(),s=e.getFullYear();return n=o>s?1:s>o?-1:i==r?0:i>r?1:-1},setDate:function(t,e){var n=t.getHours();e instanceof vt?t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()):x.setTime(t,e*ht),D(t,n)},toDateString:function(t){return t.getFullYear()+"/"+t.getMonth()+"/"+t.getDate()}},{name:"year",title:function(t){return t.getFullYear()},content:function(t){var e=d(t.culture).months.namesAbbr,n=this.toDateString,o=t.min,r=t.max;return i({min:new vt(o.getFullYear(),o.getMonth(),1),max:new vt(r.getFullYear(),r.getMonth(),1),start:new vt(t.date.getFullYear(),0,1),setter:this.setDate,build:function(t){return{value:e[t.getMonth()],ns:b.ns,dateString:n(t),cssClass:""}}})},first:function(t){return new vt(t.getFullYear(),0,t.getDate())},last:function(t){return new vt(t.getFullYear(),11,t.getDate())},compare:function(t,e){return o(t,e)},setDate:function(t,e){var n,i=t.getHours();e instanceof vt?(n=e.getMonth(),t.setFullYear(e.getFullYear(),n,t.getDate()),n!==t.getMonth()&&t.setDate(0)):(n=t.getMonth()+e,t.setMonth(n),n>11&&(n-=12),n>0&&t.getMonth()!=n&&t.setDate(0)),D(t,i)},toDateString:function(t){return t.getFullYear()+"/"+t.getMonth()+"/1"}},{name:"decade",title:function(t,e,i){return n(t,e,i,10)},content:function(t){var e=t.date.getFullYear(),n=this.toDateString;return i({start:new vt(e-e%10-1,0,1),min:new vt(t.min.getFullYear(),0,1),max:new vt(t.max.getFullYear(),0,1),setter:this.setDate,build:function(t,e){return{value:t.getFullYear(),ns:b.ns,dateString:n(t),cssClass:0===e||11==e?tt:""}}})},first:function(t){var e=t.getFullYear();return new vt(e-e%10,t.getMonth(),t.getDate())},last:function(t){var e=t.getFullYear();return new vt(e-e%10+9,t.getMonth(),t.getDate())},compare:function(t,e){return o(t,e,10)},setDate:function(t,e){c(t,e,1)},toDateString:function(t){return t.getFullYear()+"/0/1"}},{name:q,title:function(t,e,i){return n(t,e,i,100)},content:function(t){var e=t.date.getFullYear(),n=t.min.getFullYear(),o=t.max.getFullYear(),r=this.toDateString,s=n,a=o;return s-=s%10,a-=a%10,10>a-s&&(a=s+9),i({start:new vt(e-e%100-10,0,1),min:new vt(s,0,1),max:new vt(a,0,1),setter:this.setDate,build:function(t,e){var i=t.getFullYear(),s=i+9;return n>i&&(i=n),s>o&&(s=o),{ns:b.ns,value:i+" - "+s,dateString:r(t),cssClass:0===e||11==e?tt:""}}})},first:function(t){var e=t.getFullYear();return new vt(e-e%100,t.getMonth(),t.getDate())},last:function(t){var e=t.getFullYear();return new vt(e-e%100+99,t.getMonth(),t.getDate())},compare:function(t,e){return o(t,e,100)},setDate:function(t,e){c(t,e,10)},toDateString:function(t){var e=t.getFullYear();return e-e%10+"/0/1"}}]},x.isEqualDatePart=m,x.makeUnselectable=p,x.restrictValue=s,x.isInRange=a,x.normalize=f,x.viewsEnum=yt,x.disabled=y,b.calendar=x}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.datepicker.min",["kendo.calendar.min","kendo.popup.min"],t)}(function(){return function(t,e){function n(e){var n=e.parseFormats,i=e.format;R.normalize(e),n=t.isArray(n)?n:[n],n.length||n.push("yyyy-MM-dd"),-1===t.inArray(i,n)&&n.splice(0,0,e.format),e.parseFormats=n}function i(t){t.preventDefault()}var o,r=window.kendo,s=r.ui,a=s.Widget,l=r.parseDate,c=r.keys,h=r.template,u=r._activeElement,d="<div />",f="<span />",p=".kendoDatePicker",g="click"+p,m="open",v="close",y="change",_="disabled",w="readonly",x="k-state-default",b="k-state-focused",k="k-state-selected",C="k-state-disabled",S="k-state-hover",T="mouseenter"+p+" mouseleave"+p,A="mousedown"+p,D="id",P="min",M="max",E="month",B="aria-disabled",I="aria-expanded",z="aria-hidden",L="aria-readonly",R=r.calendar,O=R.isInRange,F=R.restrictValue,V=R.isEqualDatePart,N=t.extend,H=t.proxy,U=Date,j=function(e){var n,i=this,o=document.body,a=t(d).attr(z,"true").addClass("k-calendar-container").appendTo(o);i.options=e=e||{},n=e.id,n&&(n+="_dateview",a.attr(D,n),i._dateViewID=n),i.popup=new s.Popup(a,N(e.popup,e,{name:"Popup",isRtl:r.support.isRtl(e.anchor)})),i.div=a,i.value(e.value)};j.prototype={_calendar:function(){var e,n=this,o=n.calendar,a=n.options;o||(e=t(d).attr(D,r.guid()).appendTo(n.popup.element).on(A,i).on(g,"td:has(.k-link)",H(n._click,n)),n.calendar=o=new s.Calendar(e),n._setOptions(a),r.calendar.makeUnselectable(o.element),o.navigate(n._value||n._current,a.start),n.value(n._value))},_setOptions:function(t){this.calendar.setOptions({focusOnNav:!1,change:t.change,culture:t.culture,dates:t.dates,depth:t.depth,footer:t.footer,format:t.format,max:t.max,min:t.min,month:t.month,start:t.start,disableDates:t.disableDates})},setOptions:function(t){var e=this.options;this.options=N(e,t,{change:e.change,close:e.close,open:e.open}),this.calendar&&this._setOptions(this.options)},destroy:function(){this.popup.destroy()},open:function(){var t=this;t._calendar(),t.popup.open()},close:function(){this.popup.close()},min:function(t){this._option(P,t)},max:function(t){this._option(M,t)},toggle:function(){var t=this;t[t.popup.visible()?v:m]()},move:function(t){var e=this,n=t.keyCode,i=e.calendar,o=t.ctrlKey&&n==c.DOWN||n==c.ENTER,r=!1;if(t.altKey)n==c.DOWN?(e.open(),t.preventDefault(),r=!0):n==c.UP&&(e.close(),t.preventDefault(),r=!0);else if(e.popup.visible()){if(n==c.ESC||o&&i._cell.hasClass(k))return e.close(),t.preventDefault(),!0;e._current=i._move(t),r=!0}return r},current:function(t){this._current=t,this.calendar._focus(t)},value:function(t){var e=this,n=e.calendar,i=e.options,o=i.disableDates;o&&o(t)&&(t=null),e._value=t,e._current=new U(+F(t,i.min,i.max)),n&&n.value(t)},_click:function(t){-1!==t.currentTarget.className.indexOf(k)&&this.close()},_option:function(t,e){var n=this,i=n.calendar;n.options[t]=e,i&&i[t](e)}},j.normalize=n,r.DateView=j,o=a.extend({init:function(e,i){var o,s,c=this;a.fn.init.call(c,e,i),e=c.element,i=c.options,i.disableDates=r.calendar.disabled(i.disableDates),i.min=l(e.attr("min"))||l(i.min),i.max=l(e.attr("max"))||l(i.max),n(i),c._initialOptions=N({},i),c._wrapper(),c.dateView=new j(N({},i,{id:e.attr(D),anchor:c.wrapper,change:function(){c._change(this.value()),c.close()},close:function(t){c.trigger(v)?t.preventDefault():(e.attr(I,!1),s.attr(z,!0))},open:function(t){var n,i=c.options;c.trigger(m)?t.preventDefault():(c.element.val()!==c._oldText&&(n=l(e.val(),i.parseFormats,i.culture),c.dateView[n?"current":"value"](n)),e.attr(I,!0),s.attr(z,!1),c._updateARIA(n))}})),s=c.dateView.div,c._icon();try{e[0].setAttribute("type","text")}catch(h){e[0].type="text"}e.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":c.dateView._dateViewID}),c._reset(),c._template(),o=e.is("[disabled]")||t(c.element).parents("fieldset").is(":disabled"),o?c.enable(!1):c.readonly(e.is("[readonly]")),c._old=c._update(i.value||c.element.val()),c._oldText=e.val(),r.notify(c)},events:[m,v,y],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:E,depth:E,animation:{},month:{},dates:[],ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#'},setOptions:function(t){var e=this,i=e._value;a.fn.setOptions.call(e,t),t=e.options,t.min=l(t.min),t.max=l(t.max),n(t),e.dateView.setOptions(t),i&&(e.element.val(r.toString(i,t.format,t.culture)),e._updateARIA(i))},_editable:function(t){var e=this,n=e._dateIcon.off(p),o=e.element.off(p),r=e._inputWrapper.off(p),s=t.readonly,a=t.disable;s||a?(r.addClass(a?C:x).removeClass(a?x:C),o.attr(_,a).attr(w,s).attr(B,a).attr(L,s)):(r.addClass(x).removeClass(C).on(T,e._toggleHover),o.removeAttr(_).removeAttr(w).attr(B,!1).attr(L,!1).on("keydown"+p,H(e._keydown,e)).on("focusout"+p,H(e._blur,e)).on("focus"+p,function(){e._inputWrapper.addClass(b)}),n.on(g,H(e._click,e)).on(A,i))},readonly:function(t){this._editable({readonly:t===e?!0:t,disable:!1})},enable:function(t){this._editable({readonly:!1,disable:!(t=t===e?!0:t)})},destroy:function(){var t=this;a.fn.destroy.call(t),t.dateView.destroy(),t.element.off(p),t._dateIcon.off(p),t._inputWrapper.off(p),t._form&&t._form.off("reset",t._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(t){return this._option(P,t)},max:function(t){return this._option(M,t)},value:function(t){var n=this;return t===e?n._value:(n._old=n._update(t),null===n._old&&n.element.val(""),n._oldText=n.element.val(),e)},_toggleHover:function(e){t(e.currentTarget).toggleClass(S,"mouseenter"===e.type)},_blur:function(){var t=this,e=t.element.val();t.close(),e!==t._oldText&&t._change(e),t._inputWrapper.removeClass(b)},_click:function(){var t=this,e=t.element;t.dateView.toggle(),r.support.touch||e[0]===u()||e.focus()},_change:function(t){var e,n,i,o=this,r=o.element.val();t=o._update(t),e=+o._old!=+t,n=e&&!o._typing,i=r!==o.element.val(),(n||i)&&o.element.trigger(y),e&&(o._old=t,o._oldText=o.element.val(),o.trigger(y)),o._typing=!1},_keydown:function(t){var e=this,n=e.dateView,i=e.element.val(),o=!1;n.popup.visible()||t.keyCode!=c.ENTER||i===e._oldText?(o=n.move(t),e._updateARIA(n._current),o||(e._typing=!0)):e._change(i)},_icon:function(){var e,n=this,i=n.element;e=i.next("span.k-select"),e[0]||(e=t('<span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-calendar">select</span></span>').insertAfter(i)),n._dateIcon=e.attr({role:"button","aria-controls":n.dateView._dateViewID})},_option:function(t,n){var i=this,o=i.options;return n===e?o[t]:(n=l(n,o.parseFormats,o.culture),n&&(o[t]=new U(+n),i.dateView[t](n)),e)},_update:function(t){var e,n=this,i=n.options,o=i.min,s=i.max,a=n._value,c=l(t,i.parseFormats,i.culture),h=null===c&&null===a||c instanceof Date&&a instanceof Date;return i.disableDates(c)&&(c=null,n._old||(t=null)),+c===+a&&h?(e=r.toString(c,i.format,i.culture),e!==t&&n.element.val(null===c?t:e),c):(null!==c&&V(c,o)?c=F(c,o,s):O(c,o,s)||(c=null),n._value=c,n.dateView.value(c),n.element.val(c?r.toString(c,i.format,i.culture):t),n._updateARIA(c),c)},_wrapper:function(){var e,n=this,i=n.element;e=i.parents(".k-datepicker"),e[0]||(e=i.wrap(f).parent().addClass("k-picker-wrap k-state-default"),e=e.wrap(f).parent()),e[0].style.cssText=i[0].style.cssText,i.css({width:"100%",height:i[0].style.height}),n.wrapper=e.addClass("k-widget k-datepicker k-header").addClass(i[0].className),n._inputWrapper=t(e[0].firstChild)},_reset:function(){var e=this,n=e.element,i=n.attr("form"),o=i?t("#"+i):n.closest("form");o[0]&&(e._resetHandler=function(){e.value(n[0].defaultValue),e.max(e._initialOptions.max),e.min(e._initialOptions.min)},e._form=o.on("reset",e._resetHandler))},_template:function(){this._ariaTemplate=h(this.options.ARIATemplate)},_updateARIA:function(t){var e,n=this,i=n.dateView.calendar;n.element.removeAttr("aria-activedescendant"),i&&(e=i._cell,e.attr("aria-label",n._ariaTemplate({current:t||i.current()})),n.element.attr("aria-activedescendant",e.attr("id")))}}),s.plugin(o)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.numerictextbox.min",["kendo.core.min","kendo.userevents.min"],t)}(function(){return function(t,e){function n(t,e){return'<span unselectable="on" class="k-link"><span unselectable="on" class="k-icon k-i-arrow-'+t+'" title="'+e+'">'+e+"</span></span>"}var i=window.kendo,o=i.caret,r=i.keys,s=i.ui,a=s.Widget,l=i._activeElement,c=i._extractFormat,h=i.parseFloat,u=i.support.placeholder,d=i.getCulture,f=i._round,p="change",g="disabled",m="readonly",v="k-input",y="spin",_=".kendoNumericTextBox",w="touchend",x="mouseleave"+_,b="mouseenter"+_+" "+x,k="k-state-default",C="k-state-focused",S="k-state-hover",T="focus",A=".",D="k-state-selected",P="k-state-disabled",M="aria-disabled",E="aria-readonly",B=/^(-)?(\d*)$/,I=null,z=t.proxy,L=t.extend,R=a.extend({init:function(n,o){var r,s,l,h,u,d=this,f=o&&o.step!==e;a.fn.init.call(d,n,o),o=d.options,n=d.element.on("focusout"+_,z(d._focusout,d)).attr("role","spinbutton"),o.placeholder=o.placeholder||n.attr("placeholder"),d._initialOptions=L({},o),d._reset(),d._wrapper(),d._arrows(),d._input(),i.support.mobileOS?d._text.on(w+_+" "+T+_,function(){d._toggleText(!1),n.focus()}):d._text.on(T+_,z(d._click,d)),r=d.min(n.attr("min")),s=d.max(n.attr("max")),l=d._parse(n.attr("step")),o.min===I&&r!==I&&(o.min=r),o.max===I&&s!==I&&(o.max=s),f||l===I||(o.step=l),n.attr("aria-valuemin",o.min).attr("aria-valuemax",o.max),o.format=c(o.format),h=o.value,d.value(h!==I?h:n.val()),u=n.is("[disabled]")||t(d.element).parents("fieldset").is(":disabled"),u?d.enable(!1):d.readonly(n.is("[readonly]")),i.notify(d)},options:{name:"NumericTextBox",decimals:I,min:I,max:I,value:I,step:1,culture:"",format:"n",spinners:!0,placeholder:"",upArrowText:"Increase value",downArrowText:"Decrease value"},events:[p,y],_editable:function(t){var e=this,n=e.element,i=t.disable,o=t.readonly,r=e._text.add(n),s=e._inputWrapper.off(b);e._toggleText(!0),e._upArrowEventHandler.unbind("press"),e._downArrowEventHandler.unbind("press"),n.off("keydown"+_).off("keypress"+_).off("paste"+_),o||i?(s.addClass(i?P:k).removeClass(i?k:P),r.attr(g,i).attr(m,o).attr(M,i).attr(E,o)):(s.addClass(k).removeClass(P).on(b,e._toggleHover),r.removeAttr(g).removeAttr(m).attr(M,!1).attr(E,!1),e._upArrowEventHandler.bind("press",function(t){t.preventDefault(),e._spin(1),e._upArrow.addClass(D)}),e._downArrowEventHandler.bind("press",function(t){t.preventDefault(),e._spin(-1),e._downArrow.addClass(D)}),e.element.on("keydown"+_,z(e._keydown,e)).on("keypress"+_,z(e._keypress,e)).on("paste"+_,z(e._paste,e)))},readonly:function(t){this._editable({readonly:t===e?!0:t,disable:!1})},enable:function(t){this._editable({readonly:!1,disable:!(t=t===e?!0:t)})},destroy:function(){var t=this;t.element.add(t._text).add(t._upArrow).add(t._downArrow).add(t._inputWrapper).off(_),t._upArrowEventHandler.destroy(),t._downArrowEventHandler.destroy(),t._form&&t._form.off("reset",t._resetHandler),a.fn.destroy.call(t)},min:function(t){return this._option("min",t)},max:function(t){return this._option("max",t)},step:function(t){return this._option("step",t)},value:function(t){var n,i=this;return t===e?i._value:(t=i._parse(t),n=i._adjust(t),t===n&&(i._update(t),i._old=i._value),e)},focus:function(){this._focusin()},_adjust:function(t){var e=this,n=e.options,i=n.min,o=n.max;return t===I?t:(i!==I&&i>t?t=i:o!==I&&t>o&&(t=o),t)},_arrows:function(){var e,o=this,r=function(){clearTimeout(o._spinning),e.removeClass(D)},s=o.options,a=s.spinners,l=o.element;e=l.siblings(".k-icon"),e[0]||(e=t(n("n",s.upArrowText)+n("s",s.downArrowText)).insertAfter(l),e.wrapAll('<span class="k-select"/>')),a||(e.parent().toggle(a),o._inputWrapper.addClass("k-expand-padding")),o._upArrow=e.eq(0),o._upArrowEventHandler=new i.UserEvents(o._upArrow,{release:r}),o._downArrow=e.eq(1),o._downArrowEventHandler=new i.UserEvents(o._downArrow,{release:r})},_blur:function(){var t=this;t._toggleText(!0),t._change(t.element.val())},_click:function(t){var e=this;clearTimeout(e._focusing),e._focusing=setTimeout(function(){var n,i,r,s=t.target,a=o(s)[0],l=s.value.substring(0,a),c=e._format(e.options.format),h=c[","],u=0;h&&(i=RegExp("\\"+h,"g"),r=RegExp("([\\d\\"+h+"]+)(\\"+c[A]+")?(\\d+)?")),r&&(n=r.exec(l)),n&&(u=n[0].replace(i,"").length,-1!=l.indexOf("(")&&0>e._value&&u++),e._focusin(),o(e.element[0],u)})},_change:function(t){var e=this;e._update(t),t=e._value,e._old!=t&&(e._old=t,e._typing||e.element.trigger(p),e.trigger(p)),e._typing=!1},_culture:function(t){return t||d(this.options.culture)},_focusin:function(){var t=this;t._inputWrapper.addClass(C),t._toggleText(!1),t.element[0].focus()},_focusout:function(){var t=this;clearTimeout(t._focusing),t._inputWrapper.removeClass(C).removeClass(S),t._blur()},_format:function(t,e){var n=this._culture(e).numberFormat;return t=t.toLowerCase(),t.indexOf("c")>-1?n=n.currency:t.indexOf("p")>-1&&(n=n.percent),n},_input:function(){var e,n=this,i="k-formatted-value",o=n.element.addClass(v).show()[0],r=o.accessKey,s=n.wrapper;e=s.find(A+i),e[0]||(e=t('<input type="text"/>').insertBefore(o).addClass(i));try{o.setAttribute("type","text")}catch(a){o.type="text"}e[0].tabIndex=o.tabIndex,e[0].style.cssText=o.style.cssText,e[0].title=o.title,e.prop("placeholder",n.options.placeholder),r&&(e.attr("accesskey",r),o.accessKey=""),n._text=e.addClass(o.className)},_keydown:function(t){var e=this,n=t.keyCode;e._key=n,n==r.DOWN?e._step(-1):n==r.UP?e._step(1):n==r.ENTER?e._change(e.element.val()):e._typing=!0},_keypress:function(t){var e,n,i,s,a,l,c,h,u,d,f;0===t.which||t.metaKey||t.ctrlKey||t.keyCode===r.BACKSPACE||t.keyCode===r.ENTER||(e=this,n=e.options.min,i=e.element,s=o(i),a=s[0],l=s[1],c=String.fromCharCode(t.which),h=e._format(e.options.format),u=e._key===r.NUMPAD_DOT,d=i.val(),u&&(c=h[A]),d=d.substring(0,a)+c+d.substring(l),f=e._numericRegex(h).test(d),f&&u?(i.val(d),o(i,a+c.length),t.preventDefault()):(null!==n&&n>=0&&"-"===d.charAt(0)||!f)&&t.preventDefault(),e._key=0)},_numericRegex:function(t){var e=this,n=t[A],i=e.options.decimals;return n===A&&(n="\\"+n),i===I&&(i=t.decimals),0===i?B:(e._separator!==n&&(e._separator=n,e._floatRegExp=RegExp("^(-)?(((\\d+("+n+"\\d*)?)|("+n+"\\d*)))?$")),e._floatRegExp)},_paste:function(t){var e=this,n=t.target,i=n.value;setTimeout(function(){e._parse(n.value)===I&&e._update(i)})},_option:function(t,n){var i=this,o=i.options;return n===e?o[t]:(n=i._parse(n),(n||"step"!==t)&&(o[t]=n,i.element.attr("aria-value"+t,n).attr(t,n)),e)},_spin:function(t,e){var n=this;e=e||500,clearTimeout(n._spinning),n._spinning=setTimeout(function(){n._spin(t,50)},e),n._step(t)},_step:function(t){var e=this,n=e.element,i=e._parse(n.val())||0;l()!=n[0]&&e._focusin(),i+=e.options.step*t,e._update(e._adjust(i)),e._typing=!1,e.trigger(y)},_toggleHover:function(e){t(e.currentTarget).toggleClass(S,"mouseenter"===e.type)},_toggleText:function(t){var e=this;e._text.toggle(t),e.element.toggle(!t)},_parse:function(t,e){return h(t,this._culture(e),this.options.format)},_update:function(t){var e,n=this,o=n.options,r=o.format,s=o.decimals,a=n._culture(),l=n._format(r,a);s===I&&(s=l.decimals),t=n._parse(t,a),e=t!==I,e&&(t=parseFloat(f(t,s))),n._value=t=n._adjust(t),n._placeholder(i.toString(t,r,a)),e?(t=""+t,-1!==t.indexOf("e")&&(t=f(+t,s)),t=t.replace(A,l[A])):t="",n.element.val(t).attr("aria-valuenow",t)},_placeholder:function(t){this._text.val(t),u||t||this._text.val(this.options.placeholder)},_wrapper:function(){var e,n=this,i=n.element,o=i[0];e=i.parents(".k-numerictextbox"),e.is("span.k-numerictextbox")||(e=i.hide().wrap('<span class="k-numeric-wrap k-state-default" />').parent(),
e=e.wrap("<span/>").parent()),e[0].style.cssText=o.style.cssText,o.style.width="",n.wrapper=e.addClass("k-widget k-numerictextbox").addClass(o.className).css("display",""),n._inputWrapper=t(e[0].firstChild)},_reset:function(){var e=this,n=e.element,i=n.attr("form"),o=i?t("#"+i):n.closest("form");o[0]&&(e._resetHandler=function(){setTimeout(function(){e.value(n[0].value),e.max(e._initialOptions.max),e.min(e._initialOptions.min)})},e._form=o.on("reset",e._resetHandler))}});s.plugin(R)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.validator.min",["kendo.core.min"],t)}(function(){return function(t,e){function n(e){var n,i=l.ui.validator.ruleResolvers||{},o={};for(n in i)t.extend(!0,o,i[n].resolve(e));return o}function i(t){return t.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function o(t){return t=(t+"").split("."),t.length>1?t[1].length:0}function r(e){return t(t.parseHTML?t.parseHTML(e):e)}function s(e,n){var i,o,r,s,a=t();for(r=0,s=e.length;s>r;r++)i=e[r],d.test(i.className)&&(o=i.getAttribute(l.attr("for")),o===n&&(a=a.add(i)));return a}var a,l=window.kendo,c=l.ui.Widget,h=".kendoValidator",u="k-invalid-msg",d=RegExp(u,"i"),f="k-invalid",p="k-valid",g=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([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])))$/i,m=/^(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,v=":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",y=":checkbox:not([disabled],[readonly])",_="[type=number],[type=range]",w="blur",x="name",b="form",k="novalidate",C=t.proxy,S=function(t,e){return"string"==typeof e&&(e=RegExp("^(?:"+e+")$")),e.test(t)},T=function(t,e,n){var i=t.val();return t.filter(e).length&&""!==i?S(i,n):!0},A=function(t,e){return t.length?null!=t[0].attributes[e]:!1};l.ui.validator||(l.ui.validator={rules:{},messages:{}}),a=c.extend({init:function(e,i){var o=this,r=n(e),s="["+l.attr("validate")+"!=false]";i=i||{},i.rules=t.extend({},l.ui.validator.rules,r.rules,i.rules),i.messages=t.extend({},l.ui.validator.messages,r.messages,i.messages),c.fn.init.call(o,e,i),o._errorTemplate=l.template(o.options.errorTemplate),o.element.is(b)&&o.element.attr(k,k),o._inputSelector=v+s,o._checkboxSelector=y+s,o._errors={},o._attachEvents(),o._isValidated=!1},events:["validate","change"],options:{name:"Validator",errorTemplate:'<span class="k-widget k-tooltip k-tooltip-validation"><span class="k-icon k-warning"> </span> #=message#</span>',messages:{required:"{0} is required",pattern:"{0} is not valid",min:"{0} should be greater than or equal to {1}",max:"{0} should be smaller than or equal to {1}",step:"{0} is not valid",email:"{0} is not valid email",url:"{0} is not valid URL",date:"{0} is not valid date",dateCompare:"End date should be greater than or equal to the start date"},rules:{required:function(t){var e=t.filter("[type=checkbox]").length&&!t.is(":checked"),n=t.val();return!(A(t,"required")&&(""===n||!n||e))},pattern:function(t){return t.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length&&""!==t.val()?S(t.val(),t.attr("pattern")):!0},min:function(t){if(t.filter(_+",["+l.attr("type")+"=number]").filter("[min]").length&&""!==t.val()){var e=parseFloat(t.attr("min"))||0,n=l.parseFloat(t.val());return n>=e}return!0},max:function(t){if(t.filter(_+",["+l.attr("type")+"=number]").filter("[max]").length&&""!==t.val()){var e=parseFloat(t.attr("max"))||0,n=l.parseFloat(t.val());return e>=n}return!0},step:function(t){if(t.filter(_+",["+l.attr("type")+"=number]").filter("[step]").length&&""!==t.val()){var e,n=parseFloat(t.attr("min"))||0,i=parseFloat(t.attr("step"))||1,r=parseFloat(t.val()),s=o(i);return s?(e=Math.pow(10,s),Math.floor((r-n)*e)%(i*e)/Math.pow(100,s)===0):(r-n)%i===0}return!0},email:function(t){return T(t,"[type=email],["+l.attr("type")+"=email]",g)},url:function(t){return T(t,"[type=url],["+l.attr("type")+"=url]",m)},date:function(t){return t.filter("[type^=date],["+l.attr("type")+"=date]").length&&""!==t.val()?null!==l.parseDate(t.val(),t.attr(l.attr("format"))):!0}},validateOnBlur:!0},destroy:function(){c.fn.destroy.call(this),this.element.off(h)},value:function(){return this._isValidated?0===this.errors().length:!1},_submit:function(t){return this.validate()?!0:(t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault(),!1)},_checkElement:function(t){var e=this.value();this.validateInput(t),this.value()!==e&&this.trigger("change")},_attachEvents:function(){var e=this;e.element.is(b)&&e.element.on("submit"+h,C(e._submit,e)),e.options.validateOnBlur&&(e.element.is(v)?(e.element.on(w+h,function(){e._checkElement(e.element)}),e.element.is(y)&&e.element.on("click"+h,function(){e._checkElement(e.element)})):(e.element.on(w+h,e._inputSelector,function(){e._checkElement(t(this))}),e.element.on("click"+h,e._checkboxSelector,function(){e._checkElement(t(this))})))},validate:function(){var t,e,n,i,o=!1,r=this.value();if(this._errors={},this.element.is(v))o=this.validateInput(this.element);else{for(i=!1,t=this.element.find(this._inputSelector),e=0,n=t.length;n>e;e++)this.validateInput(t.eq(e))||(i=!0);o=!i}return this.trigger("validate",{valid:o}),r!==o&&this.trigger("change"),o},validateInput:function(e){var n,o,s,a,c,h,d,g,m,v;return e=t(e),this._isValidated=!0,n=this,o=n._errorTemplate,s=n._checkValidity(e),a=s.valid,c="."+u,h=e.attr(x)||"",d=n._findMessageContainer(h).add(e.next(c).filter(function(){var e=t(this);return e.filter("["+l.attr("for")+"]").length?e.attr(l.attr("for"))===h:!0})).hide(),e.removeAttr("aria-invalid"),a?delete n._errors[h]:(g=n._extractMessage(e,s.key),n._errors[h]=g,m=r(o({message:i(g)})),v=d.attr("id"),n._decorateMessageContainer(m,h),v&&m.attr("id",v),d.replaceWith(m).length||m.insertAfter(e),m.show(),e.attr("aria-invalid",!0)),e.toggleClass(f,!a),e.toggleClass(p,a),a},hideMessages:function(){var t=this,e="."+u,n=t.element;n.is(v)?n.next(e).hide():n.find(e).hide()},_findMessageContainer:function(e){var n,i,o,r=l.ui.validator.messageLocators,a=t();for(i=0,o=this.element.length;o>i;i++)a=a.add(s(this.element[i].getElementsByTagName("*"),e));for(n in r)a=a.add(r[n].locate(this.element,e));return a},_decorateMessageContainer:function(t,e){var n,i=l.ui.validator.messageLocators;t.addClass(u).attr(l.attr("for"),e||"");for(n in i)i[n].decorate(t,e);t.attr("role","alert")},_extractMessage:function(t,e){var n=this,i=n.options.messages[e],o=t.attr(x);return i=l.isFunction(i)?i(t):i,l.format(t.attr(l.attr(e+"-msg"))||t.attr("validationMessage")||t.attr("title")||i||"",o,t.attr(e))},_checkValidity:function(t){var e,n=this.options.rules;for(e in n)if(!n[e].call(this,t))return{valid:!1,key:e};return{valid:!0}},errors:function(){var t,e=[],n=this._errors;for(t in n)e.push(n[t]);return e}}),l.ui.plugin(a)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.editable.min",["kendo.datepicker.min","kendo.numerictextbox.min","kendo.validator.min","kendo.binder.min"],t)}(function(){return function(t,e){function n(e){return e=null!=e?e:"",e.type||t.type(e)||"string"}function i(e){e.find(":input:not(:button, ["+a.attr("role")+"=upload], ["+a.attr("skip")+"], [type=file]), select").each(function(){var e=a.attr("bind"),n=this.getAttribute(e)||"",i="checkbox"===this.type||"radio"===this.type?"checked:":"value:",o=this.name;-1===n.indexOf(i)&&o&&(n+=(n.length?",":"")+i+o,t(this).attr(e,n))})}function o(t){var e,i,o=(t.model.fields||t.model)[t.field],r=n(o),s=o?o.validation:{},l=a.attr("type"),c=a.attr("bind"),h={name:t.field};for(e in s)i=s[e],p(e,y)>=0?h[l]=e:d(i)||(h[e]=f(i)?i.value||e:i),h[a.attr(e+"-msg")]=i.message;return p(r,y)>=0&&(h[l]=r),h[c]=("boolean"===r?"checked:":"value:")+t.field,h}function r(t){var e,n,i,o,r,s;if(t&&t.length)for(s=[],e=0,n=t.length;n>e;e++)i=t[e],r=i.text||i.value||i,o=null==i.value?i.text||i:i.value,s[e]={text:r,value:o};return s}function s(t,e){var n,i,o=t?t.validation||{}:{};for(n in o)i=o[n],f(i)&&i.value&&(i=i.value),d(i)&&(e[n]=i)}var a=window.kendo,l=a.ui,c=l.Widget,h=t.extend,u=a.support.browser.msie&&9>a.support.browser.version,d=a.isFunction,f=t.isPlainObject,p=t.inArray,g=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,m='<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-warning"> </span>#=message#<div class="k-callout k-callout-n"></div></div>',v="change",y=["url","email","number","date","boolean"],_={number:function(e,n){var i=o(n);t('<input type="text"/>').attr(i).appendTo(e).kendoNumericTextBox({format:n.format}),t("<span "+a.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(e)},date:function(e,n){var i=o(n),r=n.format;r&&(r=a._extractFormat(r)),i[a.attr("format")]=r,t('<input type="text"/>').attr(i).appendTo(e).kendoDatePicker({format:n.format}),t("<span "+a.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(e)},string:function(e,n){var i=o(n);t('<input type="text" class="k-input k-textbox"/>').attr(i).appendTo(e)},"boolean":function(e,n){var i=o(n);t('<input type="checkbox" />').attr(i).appendTo(e)},values:function(e,n){var i=o(n),s=a.stringify(r(n.values));t("<select "+a.attr("text-field")+'="text"'+a.attr("value-field")+'="value"'+a.attr("source")+"='"+(s?s.replace(/\'/g,"'"):s)+"'"+a.attr("role")+'="dropdownlist"/>').attr(i).appendTo(e),t("<span "+a.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(e)}},w=c.extend({init:function(e,n){var i=this;n.target&&(n.$angular=n.target.options.$angular),c.fn.init.call(i,e,n),i._validateProxy=t.proxy(i._validate,i),i.refresh()},events:[v],options:{name:"Editable",editors:_,clearContainer:!0,errorTemplate:m},editor:function(t,e){var i=this,o=i.options.editors,r=f(t),s=r?t.field:t,l=i.options.model||{},c=r&&t.values,u=c?"values":n(e),d=r&&t.editor,p=d?t.editor:o[u],m=i.element.find("["+a.attr("container-for")+"="+s.replace(g,"\\$1")+"]");p=p?p:o.string,d&&"string"==typeof t.editor&&(p=function(e){e.append(t.editor)}),m=m.length?m:i.element,p(m,h(!0,{},r?t:{field:s},{model:l}))},_validate:function(e){var n,i=this,o=e.value,r=i._validationEventInProgress,s={},l=a.attr("bind"),c=e.field.replace(g,"\\$1"),h=RegExp("(value|checked)\\s*:\\s*"+c+"\\s*(,|$)");s[e.field]=e.value,n=t(":input["+l+'*="'+c+'"]',i.element).filter("["+a.attr("validate")+"!='false']").filter(function(){return h.test(t(this).attr(l))}),n.length>1&&(n=n.filter(function(){var e=t(this);return!e.is(":radio")||e.val()==o}));try{i._validationEventInProgress=!0,(!i.validatable.validateInput(n)||!r&&i.trigger(v,{values:s}))&&e.preventDefault()}finally{i._validationEventInProgress=!1}},end:function(){return this.validatable.validate()},destroy:function(){var t=this;t.angular("cleanup",function(){return{elements:t.element}}),c.fn.destroy.call(t),t.options.model.unbind("set",t._validateProxy),a.unbind(t.element),t.validatable&&t.validatable.destroy(),a.destroy(t.element),t.element.removeData("kendoValidator"),t.element.is("["+a.attr("role")+"=editable]")&&t.element.removeAttr(a.attr("role"))},refresh:function(){var n,o,r,l,c,h,d,p,g=this,m=g.options.fields||[],v=g.options.clearContainer?g.element.empty():g.element,y=g.options.model||{},_={};for(t.isArray(m)||(m=[m]),n=0,o=m.length;o>n;n++)r=m[n],l=f(r),c=l?r.field:r,h=(y.fields||y)[c],s(h,_),g.editor(r,h);if(g.options.target&&g.angular("compile",function(){return{elements:v,data:v.map(function(){return{dataItem:y}})}}),!o){d=y.fields||y;for(c in d)s(d[c],_)}i(v),g.validatable&&g.validatable.destroy(),a.bind(v,g.options.model),g.options.model.unbind("set",g._validateProxy),g.options.model.bind("set",g._validateProxy),g.validatable=new a.ui.Validator(v,{validateOnBlur:!1,errorTemplate:g.options.errorTemplate||e,rules:_}),p=v.find(":kendoFocusable").eq(0).focus(),u&&p.focus()}});l.plugin(w)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.window.min",["kendo.draganddrop.min"],t)}(function(){return function(t,e){function n(t){return e!==t}function i(t,e,n){return Math.max(Math.min(parseInt(t,10),n===1/0?n:parseInt(n,10)),parseInt(e,10))}function o(t,e){return function(){var n=this,i=n.wrapper,o=i[0].style,r=n.options;return r.isMaximized||r.isMinimized?n:(n.restoreOptions={width:o.width,height:o.height},i.children(k).hide().end().children(x).find(W).parent().hide().eq(0).before(J.action({name:"Restore"})),e.call(n),"maximize"==t?n.wrapper.children(x).find(Y).parent().hide():n.wrapper.children(x).find(Y).parent().show(),n)}}function r(){return!this.type||this.type.toLowerCase().indexOf("script")>=0}function s(t){var e=this;e.owner=t,e._draggable=new h(t.wrapper,{filter:">"+k,group:t.wrapper.id+"-resizing",dragstart:f(e.dragstart,e),drag:f(e.drag,e),dragend:f(e.dragend,e)}),e._draggable.userEvents.bind("press",f(e.addOverlay,e)),e._draggable.userEvents.bind("release",f(e.removeOverlay,e))}function a(t,e){var n=this;n.owner=t,n._draggable=new h(t.wrapper,{filter:e,group:t.wrapper.id+"-moving",dragstart:f(n.dragstart,n),drag:f(n.drag,n),dragend:f(n.dragend,n),dragcancel:f(n.dragcancel,n)}),n._draggable.userEvents.stopPropagation=!1}var l=window.kendo,c=l.ui.Widget,h=l.ui.Draggable,u=t.isPlainObject,d=l._activeElement,f=t.proxy,p=t.extend,g=t.each,m=l.template,v="body",y=".kendoWindow",_=".k-window",w=".k-window-title",x=w+"bar",b=".k-window-content",k=".k-resize-handle",C=".k-overlay",S="k-content-frame",T="k-loading",A="k-state-hover",D="k-state-focused",P="k-window-maximized",M=":visible",E="hidden",B="cursor",I="open",z="activate",L="deactivate",R="close",O="refresh",F="resize",V="resizeEnd",N="dragstart",H="dragend",U="error",j="overflow",G="zIndex",W=".k-window-actions .k-i-minimize,.k-window-actions .k-i-maximize",q=".k-i-pin",$=".k-i-unpin",Y=q+","+$,X=".k-window-titlebar .k-window-action",Q=".k-window-titlebar .k-i-refresh",K=l.isLocalUrl,Z=c.extend({init:function(i,o){var s,a,h,d,p,g,m,v=this,k={},C=!1,S=o&&o.actions&&!o.actions.length;c.fn.init.call(v,i,o),o=v.options,d=o.position,i=v.element,p=o.content,S&&(o.actions=[]),v.appendTo=t(o.appendTo),p&&!u(p)&&(p=o.content={url:p}),i.find("script").filter(r).remove(),i.parent().is(v.appendTo)||d.top!==e&&d.left!==e||(i.is(M)?(k=i.offset(),C=!0):(a=i.css("visibility"),h=i.css("display"),i.css({visibility:E,display:""}),k=i.offset(),i.css({visibility:a,display:h})),d.top===e&&(d.top=k.top),d.left===e&&(d.left=k.left)),n(o.visible)&&null!==o.visible||(o.visible=i.is(M)),s=v.wrapper=i.closest(_),i.is(".k-content")&&s[0]||(i.addClass("k-window-content k-content"),v._createWindow(i,o),s=v.wrapper=i.closest(_),v._dimensions()),v._position(),o.pinned&&v.pin(!0),p&&v.refresh(p),o.visible&&v.toFront(),g=s.children(b),v._tabindex(g),o.visible&&o.modal&&v._overlay(s.is(M)).css({opacity:.5}),s.on("mouseenter"+y,X,f(v._buttonEnter,v)).on("mouseleave"+y,X,f(v._buttonLeave,v)).on("click"+y,"> "+X,f(v._windowActionHandler,v)),g.on("keydown"+y,f(v._keydown,v)).on("focus"+y,f(v._focus,v)).on("blur"+y,f(v._blur,v)),this._resizable(),this._draggable(),m=i.attr("id"),m&&(m+="_wnd_title",s.children(x).children(w).attr("id",m),g.attr({role:"dialog","aria-labelledby":m})),s.add(s.children(".k-resize-handle,"+x)).on("mousedown"+y,f(v.toFront,v)),v.touchScroller=l.touchScroller(i),v._resizeHandler=f(v._onDocumentResize,v),v._marker=l.guid().substring(0,8),t(window).on("resize"+y+v._marker,v._resizeHandler),o.visible&&(v.trigger(I),v.trigger(z)),l.notify(v)},_buttonEnter:function(e){t(e.currentTarget).addClass(A)},_buttonLeave:function(e){t(e.currentTarget).removeClass(A)},_focus:function(){this.wrapper.addClass(D)},_blur:function(){this.wrapper.removeClass(D)},_dimensions:function(){var t,e,n=this.wrapper,o=this.options,r=o.width,s=o.height,a=o.maxHeight,l=["minWidth","minHeight","maxWidth","maxHeight"];for(this.title(o.title),t=0;l.length>t;t++)e=o[l[t]],e&&e!=1/0&&n.css(l[t],e);a&&a!=1/0&&this.element.css("maxHeight",a),r&&n.width((""+r).indexOf("%")>0?r:i(r,o.minWidth,o.maxWidth)),s&&n.height((""+s).indexOf("%")>0?s:i(s,o.minHeight,o.maxHeight)),o.visible||n.hide()},_position:function(){var t=this.wrapper,e=this.options.position;0===e.top&&(e.top=""+e.top),0===e.left&&(e.left=""+e.left),t.css({top:e.top||"",left:e.left||""})},_animationOptions:function(t){var e=this.options.animation,n={open:{effects:{}},close:{hide:!0,effects:{}}};return e&&e[t]||n[t]},_resize:function(){l.resize(this.element.children())},_resizable:function(){var e=this.options.resizable,n=this.wrapper;this.resizing&&(n.off("dblclick"+y).children(k).remove(),this.resizing.destroy(),this.resizing=null),e&&(n.on("dblclick"+y,x,f(function(e){t(e.target).closest(".k-window-action").length||this.toggleMaximization()},this)),g("n e s w se sw ne nw".split(" "),function(t,e){n.append(J.resizeHandle(e))}),this.resizing=new s(this)),n=null},_draggable:function(){var t=this.options.draggable;this.dragging&&(this.dragging.destroy(),this.dragging=null),t&&(this.dragging=new a(this,t.dragHandle||x))},_actions:function(){var e=this.options.actions,n=this.wrapper.children(x),i=n.find(".k-window-actions");e=t.map(e,function(t){return{name:t}}),i.html(l.render(J.action,e))},setOptions:function(t){var n,i;c.fn.setOptions.call(this,t),n=this.options.scrollable!==!1,this.restore(),this._dimensions(),this._position(),this._resizable(),this._draggable(),this._actions(),e!==t.modal&&(i=this.options.visible!==!1,this._overlay(t.modal&&i)),this.element.css(j,n?"":"hidden")},events:[I,z,L,R,O,F,V,N,H,U],options:{name:"Window",animation:{open:{effects:{zoom:{direction:"in"},fade:{direction:"in"}},duration:350},close:{effects:{zoom:{direction:"out",properties:{scale:.7}},fade:{direction:"out"}},duration:350,hide:!0}},title:"",actions:["Close"],autoFocus:!0,modal:!1,resizable:!0,draggable:!0,minWidth:90,minHeight:50,maxWidth:1/0,maxHeight:1/0,pinned:!1,scrollable:!0,position:{},content:null,visible:null,height:null,width:null,appendTo:"body"},_closable:function(){return t.inArray("close",t.map(this.options.actions,function(t){return t.toLowerCase()}))>-1},_keydown:function(t){var e,n,o,r,s,a,c=this,h=c.options,u=l.keys,d=t.keyCode,f=c.wrapper,p=10,g=c.options.isMaximized;t.target!=t.currentTarget||c._closing||(d==u.ESC&&c._closable()&&c._close(!1),!h.draggable||t.ctrlKey||g||(e=l.getOffset(f),d==u.UP?n=f.css("top",e.top-p):d==u.DOWN?n=f.css("top",e.top+p):d==u.LEFT?n=f.css("left",e.left-p):d==u.RIGHT&&(n=f.css("left",e.left+p))),h.resizable&&t.ctrlKey&&!g&&(d==u.UP?(n=!0,r=f.height()-p):d==u.DOWN&&(n=!0,r=f.height()+p),d==u.LEFT?(n=!0,o=f.width()-p):d==u.RIGHT&&(n=!0,o=f.width()+p),n&&(s=i(o,h.minWidth,h.maxWidth),a=i(r,h.minHeight,h.maxHeight),isNaN(s)||(f.width(s),c.options.width=s+"px"),isNaN(a)||(f.height(a),c.options.height=a+"px"),c.resize())),n&&t.preventDefault())},_overlay:function(e){var n=this.appendTo.children(C),i=this.wrapper;return n.length||(n=t("<div class='k-overlay' />")),n.insertBefore(i[0]).toggle(e).css(G,parseInt(i.css(G),10)-1),n},_actionForIcon:function(t){var e=/\bk-i-\w+\b/.exec(t[0].className)[0];return{"k-i-close":"_close","k-i-maximize":"maximize","k-i-minimize":"minimize","k-i-restore":"restore","k-i-refresh":"refresh","k-i-pin":"pin","k-i-unpin":"unpin"}[e]},_windowActionHandler:function(n){var i,o;if(!this._closing)return i=t(n.target).closest(".k-window-action").find(".k-icon"),o=this._actionForIcon(i),o?(n.preventDefault(),this[o](),!1):e},_modals:function(){var e=this,n=t(_).filter(function(){var n=t(this),i=e._object(n),o=i&&i.options;return o&&o.modal&&o.visible&&o.appendTo===e.options.appendTo&&n.is(M)}).sort(function(e,n){return+t(e).css("zIndex")-+t(n).css("zIndex")});return e=null,n},_object:function(t){var n=t.children(b),i=l.widgetInstance(n);return i instanceof Z?i:e},center:function(){var e,n,i=this,o=i.options.position,r=i.wrapper,s=t(window),a=0,l=0;return i.options.isMaximized?i:(i.options.pinned||(a=s.scrollTop(),l=s.scrollLeft()),n=l+Math.max(0,(s.width()-r.width())/2),e=a+Math.max(0,(s.height()-r.height()-parseInt(r.css("paddingTop"),10))/2),r.css({left:n,top:e}),o.top=e,o.left=n,i)},title:function(t){var e,n=this,i=n.wrapper,o=n.options,r=i.children(x),s=r.children(w);return arguments.length?(t===!1?(i.addClass("k-window-titleless"),r.remove()):(r.length?s.html(t):(i.prepend(J.titlebar(o)),n._actions(),r=i.children(x)),e=r.outerHeight(),i.css("padding-top",e),r.css("margin-top",-e)),n.options.title=t,n):s.html()},content:function(t,e){var i=this.wrapper.children(b),o=i.children(".km-scroll-container");return i=o[0]?o:i,n(t)?(this.angular("cleanup",function(){return{elements:i.children()}}),l.destroy(this.element.children()),i.empty().html(t),this.angular("compile",function(){var t,n=[];for(t=i.length;--t>=0;)n.push({dataItem:e});return{elements:i.children(),data:n}}),this):i.html()},open:function(){var e,n,i=this,o=i.wrapper,r=i.options,s=this._animationOptions("open"),a=o.children(b),c=t(document);return i.trigger(I)||(i._closing&&o.kendoStop(!0,!0),i._closing=!1,i.toFront(),r.autoFocus&&i.element.focus(),r.visible=!0,r.modal&&(e=i._overlay(!1),e.kendoStop(!0,!0),s.duration&&l.effects.Fade?(n=l.fx(e).fadeIn(),n.duration(s.duration||0),n.endValue(.5),n.play()):e.css("opacity",.5),e.show()),o.is(M)||(a.css(j,E),o.show().kendoStop().kendoAnimate({effects:s.effects,duration:s.duration,complete:f(this._activate,this)}))),r.isMaximized&&(i._documentScrollTop=c.scrollTop(),i._documentScrollLeft=c.scrollLeft(),t("html, body").css(j,E)),i},_activate:function(){var t=this.options.scrollable!==!1;this.options.autoFocus&&this.element.focus(),this.element.css(j,t?"":"hidden"),this.trigger(z)},_removeOverlay:function(n){var i,o=this._modals(),r=this.options,s=r.modal&&!o.length,a=r.modal?this._overlay(!0):t(e),c=this._animationOptions("close");s?!n&&c.duration&&l.effects.Fade?(i=l.fx(a).fadeOut(),i.duration(c.duration||0),i.startValue(.5),i.play()):this._overlay(!1).remove():o.length&&this._object(o.last())._overlay(!0)},_close:function(e){var n=this,i=n.wrapper,o=n.options,r=this._animationOptions("open"),s=this._animationOptions("close"),a=t(document);if(i.is(M)&&!n.trigger(R,{userTriggered:!e})){if(n._closing)return;n._closing=!0,o.visible=!1,t(_).each(function(e,n){var o=t(n).children(b);n!=i&&o.find("> ."+S).length>0&&o.children(C).remove()}),this._removeOverlay(),i.kendoStop().kendoAnimate({effects:s.effects||r.effects,reverse:s.reverse===!0,duration:s.duration,complete:f(this._deactivate,this)})}n.options.isMaximized&&(t("html, body").css(j,""),n._documentScrollTop&&n._documentScrollTop>0&&a.scrollTop(n._documentScrollTop),n._documentScrollLeft&&n._documentScrollLeft>0&&a.scrollLeft(n._documentScrollLeft))},_deactivate:function(){var t,e=this;e.wrapper.hide().css("opacity",""),e.trigger(L),e.options.modal&&(t=e._object(e._modals().last()),t&&t.toFront())},close:function(){return this._close(!0),this},_actionable:function(e){return t(e).is(X+","+X+" .k-icon,:input,a")},_shouldFocus:function(e){var n=d(),i=this.element;return this.options.autoFocus&&!t(n).is(i)&&!this._actionable(e)&&(!i.find(n).length||!i.find(e).length)},toFront:function(e){var n,i,o=this,r=o.wrapper,s=r[0],a=+r.css(G),l=a,c=e&&e.target||null;return t(_).each(function(e,n){var i=t(n),o=i.css(G),r=i.children(b);isNaN(o)||(a=Math.max(+o,a)),n!=s&&r.find("> ."+S).length>0&&r.append(J.overlay)}),(!r[0].style.zIndex||a>l)&&r.css(G,a+2),o.element.find("> .k-overlay").remove(),o._shouldFocus(c)&&(o.element.focus(),n=t(window).scrollTop(),i=parseInt(r.position().top,10),i>0&&n>i&&(n>0?t(window).scrollTop(i):r.css("top",n))),r=null,o},toggleMaximization:function(){return this._closing?this:this[this.options.isMaximized?"restore":"maximize"]()},restore:function(){var e=this,n=e.options,i=n.minHeight,o=e.restoreOptions,r=t(document);return n.isMaximized||n.isMinimized?(i&&i!=1/0&&e.wrapper.css("min-height",i),e.wrapper.css({position:n.pinned?"fixed":"absolute",left:o.left,top:o.top,width:o.width,height:o.height}).removeClass(P).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-restore").parent().remove().end().end().find(W).parent().show().end().end().find(Y).parent().show(),e.options.width=o.width,e.options.height=o.height,t("html, body").css(j,""),this._documentScrollTop&&this._documentScrollTop>0&&r.scrollTop(this._documentScrollTop),this._documentScrollLeft&&this._documentScrollLeft>0&&r.scrollLeft(this._documentScrollLeft),n.isMaximized=n.isMinimized=!1,e.resize(),e):e},maximize:o("maximize",function(){var e=this,n=e.wrapper,i=n.position(),o=t(document);p(e.restoreOptions,{left:i.left,top:i.top}),n.css({left:0,top:0,position:"fixed"}).addClass(P),this._documentScrollTop=o.scrollTop(),this._documentScrollLeft=o.scrollLeft(),t("html, body").css(j,E),e.options.isMaximized=!0,e._onDocumentResize()}),minimize:o("minimize",function(){var t=this;t.wrapper.css({height:"",minHeight:""}),t.element.hide(),t.options.isMinimized=!0}),pin:function(e){var n=this,i=t(window),o=n.wrapper,r=parseInt(o.css("top"),10),s=parseInt(o.css("left"),10);(e||!n.options.pinned&&!n.options.isMaximized)&&(o.css({position:"fixed",top:r-i.scrollTop(),left:s-i.scrollLeft()}),o.children(x).find(q).addClass("k-i-unpin").removeClass("k-i-pin"),n.options.pinned=!0)},unpin:function(){var e=this,n=t(window),i=e.wrapper,o=parseInt(i.css("top"),10),r=parseInt(i.css("left"),10);e.options.pinned&&!e.options.isMaximized&&(i.css({position:"",top:o+n.scrollTop(),left:r+n.scrollLeft()}),i.children(x).find($).addClass("k-i-pin").removeClass("k-i-unpin"),e.options.pinned=!1)},_onDocumentResize:function(){var e,n,i=this,o=i.wrapper,r=t(window),s=l.support.zoomLevel();i.options.isMaximized&&(e=r.width()/s,n=r.height()/s-parseInt(o.css("padding-top"),10),o.css({width:e,height:n}),i.options.width=e,i.options.height=n,i.resize())},refresh:function(e){var i,o,r,s=this,a=s.options,l=t(s.element);return u(e)||(e={url:e}),e=p({},a.content,e),o=n(a.iframe)?a.iframe:e.iframe,r=e.url,r?(n(o)||(o=!K(r)),o?(i=l.find("."+S)[0],i?i.src=r||i.src:l.html(J.contentFrame(p({},a,{content:e}))),l.find("."+S).unbind("load"+y).on("load"+y,f(this._triggerRefresh,this))):s._ajaxRequest(e)):(e.template&&s.content(m(e.template)({})),s.trigger(O)),l.toggleClass("k-window-iframecontent",!!o),s},_triggerRefresh:function(){this.trigger(O)},_ajaxComplete:function(){clearTimeout(this._loadingIconTimeout),this.wrapper.find(Q).removeClass(T)},_ajaxError:function(t,e){this.trigger(U,{status:e,xhr:t})},_ajaxSuccess:function(t){return function(e){var n=e;t&&(n=m(t)(e||{})),this.content(n,e),this.element.prop("scrollTop",0),this.trigger(O)}},_showLoading:function(){this.wrapper.find(Q).addClass(T)},_ajaxRequest:function(e){this._loadingIconTimeout=setTimeout(f(this._showLoading,this),100),t.ajax(p({type:"GET",dataType:"html",cache:!1,error:f(this._ajaxError,this),complete:f(this._ajaxComplete,this),success:f(this._ajaxSuccess(e.template),this)},e))},_destroy:function(){this.resizing&&this.resizing.destroy(),this.dragging&&this.dragging.destroy(),this.wrapper.off(y).children(b).off(y).end().find(".k-resize-handle,.k-window-titlebar").off(y),t(window).off("resize"+y+this._marker),clearTimeout(this._loadingIconTimeout),c.fn.destroy.call(this),this.unbind(e),l.destroy(this.wrapper),this._removeOverlay(!0)},destroy:function(){this._destroy(),this.wrapper.empty().remove(),this.wrapper=this.appendTo=this.element=t()},_createWindow:function(){var e,n,i=this.element,o=this.options,r=l.support.isRtl(i);o.scrollable===!1&&i.attr("style","overflow:hidden;"),n=t(J.wrapper(o)),e=i.find("iframe:not(.k-content)").map(function(){var t=this.getAttribute("src");return this.src="",t}),n.toggleClass("k-rtl",r).appendTo(this.appendTo).append(i).find("iframe:not(.k-content)").each(function(t){this.src=e[t]}),n.find(".k-window-title").css(r?"left":"right",n.find(".k-window-actions").outerWidth()+10),i.css("visibility","").show(),i.find("[data-role=editor]").each(function(){var e=t(this).data("kendoEditor");e&&e.refresh()}),n=i=null}}),J={wrapper:m("<div class='k-widget k-window' />"),action:m("<a role='button' href='\\#' class='k-window-action k-link'><span role='presentation' class='k-icon k-i-#= name.toLowerCase() #'>#= name #</span></a>"),titlebar:m("<div class='k-window-titlebar k-header'> <span class='k-window-title'>#= title #</span><div class='k-window-actions' /></div>"),overlay:"<div class='k-overlay' />",contentFrame:m("<iframe frameborder='0' title='#= title #' class='"+S+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),resizeHandle:m("<div class='k-resize-handle k-resize-#= data #'></div>")};s.prototype={addOverlay:function(){this.owner.wrapper.append(J.overlay)},removeOverlay:function(){this.owner.wrapper.find(C).remove()},dragstart:function(e){var n=this,i=n.owner,o=i.wrapper;n.elementPadding=parseInt(o.css("padding-top"),10),n.initialPosition=l.getOffset(o,"position"),n.resizeDirection=e.currentTarget.prop("className").replace("k-resize-handle k-resize-",""),n.initialSize={width:o.width(),height:o.height()},n.containerOffset=l.getOffset(i.appendTo,"position"),o.children(k).not(e.currentTarget).hide(),t(v).css(B,e.currentTarget.css(B))},drag:function(t){var e,n,o,r,s=this,a=s.owner,l=a.wrapper,c=a.options,h=s.resizeDirection,u=s.containerOffset,d=s.initialPosition,f=s.initialSize,p=Math.max(t.x.location,u.left),g=Math.max(t.y.location,u.top);h.indexOf("e")>=0?(e=p-d.left,l.width(i(e,c.minWidth,c.maxWidth))):h.indexOf("w")>=0&&(r=d.left+f.width,e=i(r-p,c.minWidth,c.maxWidth),l.css({left:r-e-u.left,width:e})),h.indexOf("s")>=0?(n=g-d.top-s.elementPadding,l.height(i(n,c.minHeight,c.maxHeight))):h.indexOf("n")>=0&&(o=d.top+f.height,n=i(o-g,c.minHeight,c.maxHeight),l.css({top:o-n-u.top,height:n})),e&&(a.options.width=e+"px"),n&&(a.options.height=n+"px"),a.resize()},dragend:function(e){var n=this,i=n.owner,o=i.wrapper;return o.children(k).not(e.currentTarget).show(),t(v).css(B,""),i.touchScroller&&i.touchScroller.reset(),
27==e.keyCode&&o.css(n.initialPosition).css(n.initialSize),i.trigger(V),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},a.prototype={dragstart:function(e){var n=this.owner,i=n.element,o=i.find(".k-window-actions"),r=l.getOffset(n.appendTo);n.trigger(N),n.initialWindowPosition=l.getOffset(n.wrapper,"position"),n.startPosition={left:e.x.client-n.initialWindowPosition.left,top:e.y.client-n.initialWindowPosition.top},n.minLeftPosition=o.length>0?o.outerWidth()+parseInt(o.css("right"),10)-i.outerWidth():20-i.outerWidth(),n.minLeftPosition-=r.left,n.minTopPosition=-r.top,n.wrapper.append(J.overlay).children(k).hide(),t(v).css(B,e.currentTarget.css(B))},drag:function(e){var n=this.owner,i=n.options.position,o=Math.max(e.y.client-n.startPosition.top,n.minTopPosition),r=Math.max(e.x.client-n.startPosition.left,n.minLeftPosition),s={left:r,top:o};t(n.wrapper).css(s),i.top=o,i.left=r},_finishDrag:function(){var e=this.owner;e.wrapper.children(k).toggle(!e.options.isMinimized).end().find(C).remove(),t(v).css(B,"")},dragcancel:function(t){this._finishDrag(),t.currentTarget.closest(_).css(this.owner.initialWindowPosition)},dragend:function(){return this._finishDrag(),this.owner.trigger(H),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},l.ui.plugin(Z)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.list.min",["kendo.data.min","kendo.popup.min"],t)}(function(){return function(t,e){function n(t,n){return t!==e&&""!==t&&null!==t&&("boolean"===n?t=!!t:"number"===n?t=+t:"string"===n&&(t=""+t)),t}function i(t,e){var n,i,o,r,s=e.length,a=t.length,l=[],c=[];if(a)for(o=0;a>o;o++){for(n=t[o],i=!1,r=0;s>r;r++)if(n===e[r]){i=!0,l.push({index:o,item:n});break}i||c.push(n)}return{changed:l,unchanged:c}}function o(e,n){var i,r=!1;return e.filters&&(i=t.grep(e.filters,function(t){return r=o(t,n),t.filters?t.filters.length:t.field!=n}),r||e.filters.length===i.length||(r=!0),e.filters=i),r}var r,s,a=window.kendo,l=a.ui,c=l.Widget,h=a.keys,u=a.support,d=a.htmlEncode,f=a._activeElement,p=a.data.ObservableArray,g="id",m="change",v="k-state-focused",y="k-state-hover",_="k-loading",w="open",x="close",b="cascade",k="select",C="selected",S="requestStart",T="requestEnd",A="width",D=t.extend,P=t.proxy,M=t.isArray,E=u.browser,B=E.msie&&9>E.version,I=/"/g,z={ComboBox:"DropDownList",DropDownList:"ComboBox"},L=a.ui.DataBoundWidget.extend({init:function(e,n){var i,o=this,r=o.ns;c.fn.init.call(o,e,n),e=o.element,n=o.options,o._isSelect=e.is(k),o._isSelect&&o.element[0].length&&(n.dataSource||(n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value")),o.ul=t('<ul unselectable="on" class="k-list k-reset"/>').attr({tabIndex:-1,"aria-hidden":!0}),o.list=t("<div class='k-list-container'/>").append(o.ul).on("mousedown"+r,P(o._listMousedown,o)),i=e.attr(g),i&&(o.list.attr(g,i+"-list"),o.ul.attr(g,i+"_listbox")),o._header(),o._accessors(),o._initValue()},options:{valuePrimitive:!1,headerTemplate:""},setOptions:function(t){c.fn.setOptions.call(this,t),t&&t.enable!==e&&(t.enabled=t.enable)},focus:function(){this._focused.focus()},readonly:function(t){this._editable({readonly:t===e?!0:t,disable:!1})},enable:function(t){this._editable({readonly:!1,disable:!(t=t===e?!0:t)})},_listOptions:function(e){var n=this,i=n.options,o=i.virtual,r=P(n._listBound,n);return o="object"==typeof o?o:{},e=t.extend({autoBind:!1,selectable:!0,dataSource:n.dataSource,click:P(n._click,n),change:P(n._listChange,n),activate:P(n._activateItem,n),deactivate:P(n._deactivateItem,n),dataBinding:function(){n.trigger("dataBinding"),n._angularItems("cleanup")},dataBound:r,listBound:r,height:i.height,dataValueField:i.dataValueField,dataTextField:i.dataTextField,groupTemplate:i.groupTemplate,fixedGroupTemplate:i.fixedGroupTemplate,template:i.template},e,o),e.template||(e.template="#:"+a.expr(e.dataTextField,"data")+"#"),e},_initList:function(){var t=this,e=t._listOptions({selectedItemChange:P(t._listChange,t)});t.listView=t.options.virtual?new a.ui.VirtualList(t.ul,e):new a.ui.StaticList(t.ul,e),t._setListValue()},_setListValue:function(t){t=t||this.options.value,t!==e&&this.listView.value(t).done(P(this._updateSelectionState,this))},_updateSelectionState:t.noop,_listMousedown:function(t){this.filterInput&&this.filterInput[0]===t.target||t.preventDefault()},_filterSource:function(t,e){var n=this,i=n.options,r=n.dataSource,s=D({},r.filter()||{}),a=o(s,i.dataTextField);(t||a)&&n.trigger("filtering",{filter:t})||(s={filters:s.filters||[],logic:"and"},t&&s.filters.push(t),n._cascading&&this.listView.setDSFilter(s),e?r.read({filter:s}):r.filter(s))},_header:function(){var e,n=this,i=n.options.headerTemplate;t.isFunction(i)&&(i=i({})),i&&(n.list.prepend(i),e=n.ul.prev(),n.header=e[0]?e:null,n.header&&n.angular("compile",function(){return{elements:n.header}}))},_initValue:function(){var t=this,e=t.options.value;null!==e?t.element.val(e):(e=t._accessor(),t.options.value=e),t._old=e},_ignoreCase:function(){var t,e=this,n=e.dataSource.reader.model;n&&n.fields&&(t=n.fields[e.options.dataTextField],t&&t.type&&"string"!==t.type&&(e.options.ignoreCase=!1))},_focus:function(t){return this.listView.focus(t)},current:function(t){return this._focus(t)},items:function(){return this.ul[0].children},destroy:function(){var t=this,e=t.ns;c.fn.destroy.call(t),t._unbindDataSource(),t.listView.destroy(),t.list.off(e),t.popup.destroy(),t._form&&t._form.off("reset",t._resetHandler)},dataItem:function(n){var i=this;if(n===e)return i.listView.selectedDataItems()[0];if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(t(n).data("uid"));n=t(i.items()).index(n)}return i.dataSource.flatView()[n]},_activateItem:function(){var t=this.listView.focus();t&&this._focused.add(this.filterInput).attr("aria-activedescendant",t.attr("id"))},_deactivateItem:function(){this._focused.add(this.filterInput).removeAttr("aria-activedescendant")},_accessors:function(){var t=this,e=t.element,n=t.options,i=a.getter,o=e.attr(a.attr("text-field")),r=e.attr(a.attr("value-field"));!n.dataTextField&&o&&(n.dataTextField=o),!n.dataValueField&&r&&(n.dataValueField=r),t._text=i(n.dataTextField),t._value=i(n.dataValueField)},_aria:function(t){var n=this,i=n.options,o=n._focused.add(n.filterInput);i.suggest!==e&&o.attr("aria-autocomplete",i.suggest?"both":"list"),t=t?t+" "+n.ul[0].id:n.ul[0].id,o.attr("aria-owns",t),n.ul.attr("aria-live",i.filter&&"none"!==i.filter?"polite":"off")},_blur:function(){var t=this;t._change(),t.close()},_change:function(){var t,i=this,o=i.selectedIndex,r=i.options.value,s=i.value();i._isSelect&&!i.listView.bound()&&r&&(s=r),s!==n(i._old,typeof s)?t=!0:o!==e&&o!==i._oldIndex&&(t=!0),t&&(i._old=s,i._oldIndex=o,i._typing||i.element.trigger(m),i.trigger(m)),i.typing=!1},_data:function(){return this.dataSource.view()},_enable:function(){var t=this,n=t.options,i=t.element.is("[disabled]");n.enable!==e&&(n.enabled=n.enable),!n.enabled||i?t.enable(!1):t.readonly(t.element.is("[readonly]"))},_dataValue:function(t){var n=this._value(t);return n===e&&(n=this._text(t)),n},_offsetHeight:function(){var e=0,n=this.listView.content.prevAll(":visible");return n.each(function(){var n=t(this);e+=n.hasClass("k-list-filter")?n.children().outerHeight():n.outerHeight()}),e},_height:function(t){var n,i,o=this,r=o.list,s=o.options.height,a=o.popup.visible();if(t){if(i=r.add(r.parent(".k-animation-container")).show(),!r.is(":visible"))return i.hide(),e;s=o.listView.content[0].scrollHeight>s?s:"auto",i.height(s),"auto"!==s&&(n=o._offsetHeight(),n&&(s-=n)),o.listView.content.height(s),a||i.hide()}return s},_adjustListWidth:function(){var t,e,n=this.list,i=n[0].style.width,o=this.wrapper;if(n.data(A)||!i)return t=window.getComputedStyle?window.getComputedStyle(o[0],null):0,e=parseFloat(t&&t.width)||o.outerWidth(),t&&E.msie&&(e+=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)+parseFloat(t.borderLeftWidth)+parseFloat(t.borderRightWidth)),i="border-box"!==n.css("box-sizing")?e-(n.outerWidth()-n.width()):e,n.css({fontFamily:o.css("font-family"),width:i}).data(A,i),!0},_openHandler:function(t){this._adjustListWidth(),this.trigger(w)?t.preventDefault():(this._focused.attr("aria-expanded",!0),this.ul.attr("aria-hidden",!1))},_closeHandler:function(t){this.trigger(x)?t.preventDefault():(this._focused.attr("aria-expanded",!1),this.ul.attr("aria-hidden",!0))},_focusItem:function(){var t=this.listView,n=t.focus(),i=t.select();i=i[i.length-1],i===e&&this.options.highlightFirst&&!n&&(i=0),i!==e?t.focus(i):t.scrollToIndex(0)},_calculateGroupPadding:function(t){var e=this.ul.children(".k-first:first"),n=this.listView.content.prev(".k-group-header"),i=0;n[0]&&"none"!==n[0].style.display&&("auto"!==t&&(i=a.support.scrollbar()),i+=parseFloat(e.css("border-right-width"),10)+parseFloat(e.children(".k-group").css("padding-right"),10),n.css("padding-right",i))},_calculatePopupHeight:function(t){var e=this._height(this.dataSource.flatView().length||t);this._calculateGroupPadding(e)},_resizePopup:function(t){this.options.virtual||(this.popup.element.is(":visible")?this._calculatePopupHeight(t):this.popup.one("open",function(t){return P(function(){this._calculatePopupHeight(t)},this)}.call(this,t)))},_popup:function(){var t=this;t.popup=new l.Popup(t.list,D({},t.options.popup,{anchor:t.wrapper,open:P(t._openHandler,t),close:P(t._closeHandler,t),animation:t.options.animation,isRtl:u.isRtl(t.wrapper)}))},_makeUnselectable:function(){B&&this.list.find("*").not(".k-textbox").attr("unselectable","on")},_toggleHover:function(e){t(e.currentTarget).toggleClass(y,"mouseenter"===e.type)},_toggle:function(t,n){var i=this,o=u.mobileOS&&(u.touch||u.MSPointers||u.pointers);t=t!==e?t:!i.popup.visible(),n||o||i._focused[0]===f()||(i._prevent=!0,i._focused.focus(),i._prevent=!1),i[t?w:x]()},_triggerCascade:function(){var t=this;t._cascadeTriggered&&t._old===t.value()&&t._oldIndex===t.selectedIndex||(t._cascadeTriggered=!0,t.trigger(b,{userTriggered:t._userTriggered}))},_triggerChange:function(){this._valueBeforeCascade!==this.value()&&this.trigger(m)},_unbindDataSource:function(){var t=this;t.dataSource.unbind(S,t._requestStartHandler).unbind(T,t._requestEndHandler).unbind("error",t._errorHandler)}});D(L,{inArray:function(t,e){var n,i,o=e.children;if(!t||t.parentNode!==e)return-1;for(n=0,i=o.length;i>n;n++)if(t===o[n])return n;return-1},unifyType:n}),a.ui.List=L,l.Select=L.extend({init:function(t,e){L.fn.init.call(this,t,e),this._initial=this.element.val()},setDataSource:function(t){var e,n=this;n.options.dataSource=t,n._dataSource(),n.listView.bound()&&(n._initialIndex=null),n.listView.setDataSource(n.dataSource),n.options.autoBind&&n.dataSource.fetch(),e=n._parentWidget(),e&&n._cascadeSelect(e)},close:function(){this.popup.close()},select:function(t){var n=this;return t===e?n.selectedIndex:(n._select(t),n._old=n._accessor(),n._oldIndex=n.selectedIndex,e)},search:function(t){var e,n,i,o,r,s;t="string"==typeof t?t:this.text(),e=this,n=t.length,i=e.options,o=i.ignoreCase,r=i.filter,s=i.dataTextField,clearTimeout(e._typingTimeout),(!n||n>=i.minLength)&&(e._state="filter","none"===r?e._filter(t):(e._open=!0,e._filterSource({value:o?t.toLowerCase():t,field:s,operator:r,ignoreCase:o})))},_accessor:function(t,e){return this[this._isSelect?"_accessorSelect":"_accessorInput"](t,e)},_accessorInput:function(t){var n=this.element[0];return t===e?n.value:(null===t&&(t=""),n.value=t,e)},_accessorSelect:function(t,n){var i,o=this.element[0],r=o.selectedIndex;return t===e?(r>-1&&(i=o.options[r]),i&&(t=i.value),t||""):(r>-1&&(o.options[r].removeAttribute(C),o.options[r].selected=!1),n===e&&(n=-1),null!==t&&""!==t&&-1==n?this._custom(t):(t?o.value=t:o.selectedIndex=n,o.selectedIndex>-1&&(i=o.options[o.selectedIndex]),i&&i.setAttribute(C,C)),e)},_custom:function(e){var n=this,i=n.element,o=n._customOption;o||(o=t("<option/>"),n._customOption=o,i.append(o)),o.text(e),o[0].setAttribute(C,C),o[0].selected=!0},_hideBusy:function(){var t=this;clearTimeout(t._busy),t._arrow.removeClass(_),t._focused.attr("aria-busy",!1),t._busy=null},_showBusy:function(){var t=this;t._request=!0,t._busy||(t._busy=setTimeout(function(){t._arrow&&(t._focused.attr("aria-busy",!0),t._arrow.addClass(_))},100))},_requestEnd:function(){this._request=!1,this._hideBusy()},_dataSource:function(){var e,n=this,i=n.element,o=n.options,r=o.dataSource||{};r=t.isArray(r)?{data:r}:r,n._isSelect&&(e=i[0].selectedIndex,e>-1&&(o.index=e),r.select=i,r.fields=[{field:o.dataTextField},{field:o.dataValueField}]),n.dataSource?n._unbindDataSource():(n._requestStartHandler=P(n._showBusy,n),n._requestEndHandler=P(n._requestEnd,n),n._errorHandler=P(n._hideBusy,n)),n.dataSource=a.data.DataSource.create(r).bind(S,n._requestStartHandler).bind(T,n._requestEndHandler).bind("error",n._errorHandler)},_firstItem:function(){this.listView.focusFirst()},_lastItem:function(){this.listView.focusLast()},_nextItem:function(){this.listView.focusNext()},_prevItem:function(){this.listView.focusPrev()},_move:function(t){var n,i,o,r,s=this,a=t.keyCode,l=a===h.DOWN;if(a===h.UP||l){if(t.altKey)s.toggle(l);else{if(!s.listView.bound())return s._fetch||(s.dataSource.one(m,function(){s._fetch=!1,s._move(t)}),s._fetch=!0,s._filterSource()),t.preventDefault(),!0;if(o=s._focus(),s._fetch||o&&!o.hasClass("k-state-selected")||(l?(s._nextItem(),s._focus()||s._lastItem()):(s._prevItem(),s._focus()||s._firstItem())),s.trigger(k,{item:s._focus()}))return s._focus(o),e;s._select(s._focus(),!0),s.popup.visible()||s._blur()}t.preventDefault(),i=!0}else if(a===h.ENTER||a===h.TAB){if(s.popup.visible()&&t.preventDefault(),o=s._focus(),n=s.dataItem(),s.popup.visible()||n&&s.text()===s._text(n)||(o=null),r=s.filterInput&&s.filterInput[0]===f(),o){if(s.trigger(k,{item:o}))return;s._select(o)}else s.input&&(s._accessor(s.input.val()),s.listView.value(s.input.val()));s._focusElement&&s._focusElement(s.wrapper),r&&a===h.TAB?s.wrapper.focusout():s._blur(),s.close(),i=!0}else a===h.ESC&&(s.popup.visible()&&t.preventDefault(),s.close(),i=!0);return i},_fetchData:function(){var t=this,e=!!t.dataSource.view().length;t._request||t.options.cascadeFrom||t.listView.bound()||t._fetch||e||(t._fetch=!0,t.dataSource.fetch().done(function(){t._fetch=!1}))},_options:function(t,n,i){var o,r,s,a,l=this,c=l.element,h=t.length,u="",f=0;for(n&&(u=n);h>f;f++)o="<option",r=t[f],s=l._text(r),a=l._value(r),a!==e&&(a+="",-1!==a.indexOf('"')&&(a=a.replace(I,""")),o+=' value="'+a+'"'),o+=">",s!==e&&(o+=d(s)),o+="</option>",u+=o;c.html(u),i!==e&&(c[0].value=i,c[0].value&&!i&&(c[0].selectedIndex=-1))},_reset:function(){var e=this,n=e.element,i=n.attr("form"),o=i?t("#"+i):n.closest("form");o[0]&&(e._resetHandler=function(){setTimeout(function(){e.value(e._initial)})},e._form=o.on("reset",e._resetHandler))},_parentWidget:function(){var e=this.options.name,n=t("#"+this.options.cascadeFrom),i=n.data("kendo"+e);return i||(i=n.data("kendo"+z[e])),i},_cascade:function(){var t,e,n=this,i=n.options,o=i.cascadeFrom;if(o){if(e=n._parentWidget(),!e)return;i.autoBind=!1,t=P(function(t){var n=this.value();this._userTriggered=t.userTriggered,this.listView.bound()&&this._clearSelection(e,!0),this._cascadeSelect(e,n)},n),e.first(b,t),e._focused.bind("focus",function(){e.unbind(b,t),e.first(m,t)}),e._focused.bind("focusout",function(){e.unbind(m,t),e.first(b,t)}),e.listView.bound()?n._cascadeSelect(e):e.value()||n.enable(!1)}},_cascadeChange:function(t){var e=this,n=e._accessor();e._userTriggered?e._clearSelection(t,!0):n?(n!==e.listView.value()[0]&&e.value(n),e.dataSource.view()[0]&&-1!==e.selectedIndex||e._clearSelection(t,!0)):e.dataSource.flatView().length&&e.select(e.options.index),e.enable(),e._triggerCascade(),e._triggerChange(),e._userTriggered=!1},_cascadeSelect:function(t,n){var i,r,s,a=this,l=t.dataItem(),c=l?t._value(l):null,h=a.options.cascadeFromField||t.options.dataValueField;a._valueBeforeCascade=n!==e?n:a.value(),c||0===c?(i=a.dataSource.filter()||{},o(i,h),r=i.filters||[],r.push({field:h,operator:"eq",value:c}),s=function(){a.unbind("dataBound",s),a._cascadeChange(t)},a.first("dataBound",s),a._cascading=!0,a._filterSource({field:h,operator:"eq",value:c}),a._cascading=!1):(a.enable(!1),a._clearSelection(t),a._triggerCascade(),a._triggerChange(),a._userTriggered=!1)}}),r=".StaticList",s=a.ui.DataBoundWidget.extend({init:function(e,n){c.fn.init.call(this,e,n),this.element.attr("role","listbox").on("click"+r,"li",P(this._click,this)).on("mouseenter"+r,"li",function(){t(this).addClass(y)}).on("mouseleave"+r,"li",function(){t(this).removeClass(y)}),this.content=this.element.wrap("<div class='k-list-scroller' unselectable='on'></div>").parent(),this.header=this.content.before('<div class="k-group-header" style="display:none"></div>').prev(),this.bound(!1),this._optionID=a.guid(),this._selectedIndices=[],this._view=[],this._dataItems=[],this._values=[];var i=this.options.value;i&&(this._values=t.isArray(i)?i.slice(0):[i]),this._getter(),this._templates(),this.setDataSource(this.options.dataSource),this._onScroll=P(function(){var t=this;clearTimeout(t._scrollId),t._scrollId=setTimeout(function(){t._renderHeader()},50)},this)},options:{name:"StaticList",dataValueField:null,valuePrimitive:!1,selectable:!0,template:null,groupTemplate:null,fixedGroupTemplate:null},events:["click",m,"activate","deactivate","dataBinding","dataBound","selectedItemChange"],setDataSource:function(e){var n,i=this,o=e||{};o=t.isArray(o)?{data:o}:o,o=a.data.DataSource.create(o),i.dataSource?(i.dataSource.unbind(m,i._refreshHandler),n=i.value(),i.value([]),i.bound(!1),i.value(n)):i._refreshHandler=P(i.refresh,i),i.setDSFilter(o.filter()),i.dataSource=o.bind(m,i._refreshHandler),i._fixedHeader()},skip:function(){return this.dataSource.skip()},setOptions:function(t){c.fn.setOptions.call(this,t),this._getter(),this._templates(),this._render()},destroy:function(){this.element.off(r),this._refreshHandler&&this.dataSource.unbind(m,this._refreshHandler),clearTimeout(this._scrollId),c.fn.destroy.call(this)},scrollToIndex:function(t){var e=this.element[0].children[t];e&&this.scroll(e)},scroll:function(t){if(t){t[0]&&(t=t[0]);var e=this.content[0],n=t.offsetTop,i=t.offsetHeight,o=e.scrollTop,r=e.clientHeight,s=n+i;o>n?o=n:s>o+r&&(o=s-r),e.scrollTop=o}},selectedDataItems:function(t){return t===e?this._dataItems.slice():(this._dataItems=t,this._values=this._getValues(t),e)},_getValues:function(e){var n=this._valueGetter;return t.map(e,function(t){return n(t)})},focusNext:function(){var t=this.focus();t=t?t.next():0,this.focus(t)},focusPrev:function(){var t=this.focus();t=t?t.prev():this.element[0].children.length-1,this.focus(t)},focusFirst:function(){this.focus(this.element[0].children[0])},focusLast:function(){this.focus(this.element[0].children[this.element[0].children.length-1])},focus:function(n){var i,o=this,r=o._optionID;return n===e?o._current:(n=o._get(n),n=n[n.length-1],n=t(this.element[0].children[n]),o._current&&(o._current.removeClass(v).removeAttr("aria-selected").removeAttr(g),o.trigger("deactivate")),i=!!n[0],i&&(n.addClass(v),o.scroll(n),n.attr("id",r)),o._current=i?n:null,o.trigger("activate"),e)},focusIndex:function(){return this.focus()?this.focus().index():e},skipUpdate:function(t){this._skipUpdate=t},select:function(n){var i,o,r=this,s=r.options.selectable,a="multiple"!==s&&s!==!1,l=r._selectedIndices,c=[],h=[];if(n===e)return l.slice();if(n=r._get(n),1===n.length&&-1===n[0]&&(n=[]),o=r.isFiltered(),!o||a||!r._deselectFiltered(n)){if(a&&!o&&-1!==t.inArray(n[n.length-1],l))return r._dataItems.length&&r._view.length&&(r._dataItems=[r._view[l[0]].item]),e;i=r._deselect(n),h=i.removed,n=i.indices,n.length&&(a&&(n=[n[n.length-1]]),c=r._select(n)),(c.length||h.length)&&(r._valueComparer=null,r.trigger(m,{added:c,removed:h}))}},removeAt:function(t){return this._selectedIndices.splice(t,1),this._values.splice(t,1),this._valueComparer=null,{position:t,dataItem:this._dataItems.splice(t,1)[0]}},setValue:function(e){e=t.isArray(e)||e instanceof p?e.slice(0):[e],this._values=e,this._valueComparer=null},value:function(n){var i,o=this,r=o._valueDeferred;return n===e?o._values.slice():(o.setValue(n),r&&"resolved"!==r.state()||(o._valueDeferred=r=t.Deferred()),o.bound()&&(i=o._valueIndices(o._values),"multiple"===o.options.selectable&&o.select(-1),o.select(i),r.resolve()),o._skipUpdate=!1,r)},items:function(){return this.element.children(".k-item")},_click:function(e){e.isDefaultPrevented()||this.trigger("click",{item:t(e.currentTarget)})||this.select(e.currentTarget)},_valueExpr:function(t,e){var i,o,r=this,s=0,a=[];if(!r._valueComparer||r._valueType!==t){for(r._valueType=t;e.length>s;s++)a.push(n(e[s],t));i="for (var idx = 0; idx < "+a.length+"; idx++) { if (current === values[idx]) { return idx; }} return -1;",o=Function("current","values",i),r._valueComparer=function(t){return o(t,a)}}return r._valueComparer},_dataItemPosition:function(t,e){var n=this._valueGetter(t),i=this._valueExpr(typeof n,e);return i(n)},_getter:function(){this._valueGetter=a.getter(this.options.dataValueField)},_deselect:function(e){var n,i,o,r=this,s=r.element[0].children,a=r.options.selectable,l=r._selectedIndices,c=r._dataItems,h=r._values,u=[],d=0,f=0;if(e=e.slice(),a!==!0&&e.length){if("multiple"===a)for(;e.length>d;d++)if(i=e[d],t(s[i]).hasClass("k-state-selected"))for(n=0;l.length>n;n++)if(o=l[n],o===i){t(s[o]).removeClass("k-state-selected"),u.push({position:n+f,dataItem:c.splice(n,1)[0]}),l.splice(n,1),e.splice(d,1),h.splice(n,1),f+=1,d-=1,n-=1;break}}else{for(;l.length>d;d++)t(s[l[d]]).removeClass("k-state-selected"),u.push({position:d,dataItem:c[d]});r._values=[],r._dataItems=[],r._selectedIndices=[]}return{indices:e,removed:u}},_deselectFiltered:function(e){for(var n,i,o,r=this.element[0].children,s=[],a=0;e.length>a;a++)i=e[a],n=this._view[i].item,o=this._dataItemPosition(n,this._values),o>-1&&(s.push(this.removeAt(o)),t(r[i]).removeClass("k-state-selected"));return s.length?(this.trigger(m,{added:[],removed:s}),!0):!1},_select:function(e){var n,i,o=this,r=o.element[0].children,s=o._view,a=[],l=0;for(-1!==e[e.length-1]&&o.focus(e);e.length>l;l++)i=e[l],n=s[i],-1!==i&&n&&(n=n.item,o._selectedIndices.push(i),o._dataItems.push(n),o._values.push(o._valueGetter(n)),t(r[i]).addClass("k-state-selected").attr("aria-selected",!0),a.push({dataItem:n}));return a},_get:function(n){return"number"==typeof n?n=[n]:M(n)||(n=t(n).data("offset-index"),n===e&&(n=-1),n=[n]),n},_template:function(){var t=this,e=t.options,n=e.template;return n?(n=a.template(n),n=function(t){return'<li tabindex="-1" role="option" unselectable="on" class="k-item">'+n(t)+"</li>"}):n=a.template('<li tabindex="-1" role="option" unselectable="on" class="k-item">${'+a.expr(e.dataTextField,"data")+"}</li>",{useWithBlock:!1}),n},_templates:function(){var t,e,n={template:this.options.template,groupTemplate:this.options.groupTemplate,fixedGroupTemplate:this.options.fixedGroupTemplate};for(e in n)t=n[e],t&&"function"!=typeof t&&(n[e]=a.template(t));this.templates=n},_normalizeIndices:function(t){for(var n=[],i=0;t.length>i;i++)t[i]!==e&&n.push(t[i]);return n},_valueIndices:function(t,e){var n,i=this._view,o=0;if(e=e?e.slice():[],!t.length)return[];for(;i.length>o;o++)n=this._dataItemPosition(i[o].item,t),-1!==n&&(e[n]=o);return this._normalizeIndices(e)},_firstVisibleItem:function(){for(var e=this.element[0],n=this.content[0],i=n.scrollTop,o=t(e.children[0]).height(),r=Math.floor(i/o)||0,s=e.children[r]||e.lastChild,a=i>s.offsetTop;s;)if(a){if(s.offsetTop+o>i||!s.nextSibling)break;s=s.nextSibling}else{if(i>=s.offsetTop||!s.previousSibling)break;s=s.previousSibling}return this._view[t(s).data("offset-index")]},_fixedHeader:function(){this.isGrouped()&&this.templates.fixedGroupTemplate?(this.header.show(),this.content.scroll(this._onScroll)):(this.header.hide(),this.content.off("scroll",this._onScroll))},_renderHeader:function(){var t,e=this.templates.fixedGroupTemplate;e&&(t=this._firstVisibleItem(),t&&this.header.html(e(t.group)))},_renderItem:function(t){var e='<li tabindex="-1" role="option" unselectable="on" class="k-item',n=t.item,i=0!==t.index,o=t.selected;return i&&t.newGroup&&(e+=" k-first"),o&&(e+=" k-state-selected"),e+='"'+(o?' aria-selected="true"':"")+' data-offset-index="'+t.index+'">',e+=this.templates.template(n),i&&t.newGroup&&(e+='<div class="k-group">'+this.templates.groupTemplate(t.group)+"</div>"),e+"</li>"},_render:function(){var t,e,n,i,o="",r=0,s=0,a=[],l=this.dataSource.view(),c=this.value(),h=this.isGrouped();if(h)for(r=0;l.length>r;r++)for(e=l[r],n=!0,i=0;e.items.length>i;i++)t={selected:this._selected(e.items[i],c),item:e.items[i],group:e.value,newGroup:n,index:s},a[s]=t,s+=1,o+=this._renderItem(t),n=!1;else for(r=0;l.length>r;r++)t={selected:this._selected(l[r],c),item:l[r],index:r},a[r]=t,o+=this._renderItem(t);this._view=a,this.element[0].innerHTML=o,h&&a.length&&this._renderHeader()},_selected:function(t,e){var n=!this.isFiltered()||"multiple"===this.options.selectable;return n&&-1!==this._dataItemPosition(t,e)},setDSFilter:function(t){this._lastDSFilter=D({},t)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!a.data.Query.compareFilters(this.dataSource.filter(),this._lastDSFilter)},refresh:function(t){var e,n=this,o=t&&t.action,r=n.options.skipUpdateOnBind,s="itemchange"===o;n.trigger("dataBinding"),n._fixedHeader(),n._render(),n.bound(!0),s||"remove"===o?(e=i(n._dataItems,t.items),e.changed.length&&(s?n.trigger("selectedItemChange",{items:e.changed}):n.value(n._getValues(e.unchanged)))):n.isFiltered()||n._skipUpdate?(n.focus(0),n._skipUpdate&&(n._skipUpdate=!1,n._selectedIndices=n._valueIndices(n._values,n._selectedIndices))):r||o&&"add"!==o||n.value(n._values),n._valueDeferred&&n._valueDeferred.resolve(),n.trigger("dataBound")},bound:function(t){return t===e?this._bound:(this._bound=t,e)},isGrouped:function(){return(this.dataSource.group()||[]).length}}),l.plugin(s)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dropdownlist.min",["kendo.list.min","kendo.mobile.scroller.min"],t)}(function(){return function(t,e){function n(t,e,n){for(var i,o=0,r=e.length-1;r>o;++o)i=e[o],i in t||(t[i]={}),t=t[i];t[e[r]]=n}function i(t,e){return t>=e&&(t-=e),t}function o(t,e){for(var n=0;t.length>n;n++)if(t.charAt(n)!==e)return!1;return!0}var r=window.kendo,s=r.ui,a=s.Select,l=r.support,c=r._activeElement,h=r.data.ObservableObject,u=r.keys,d=".kendoDropDownList",f="disabled",p="readonly",g="change",m="k-state-focused",v="k-state-default",y="k-state-disabled",_="aria-disabled",w="aria-readonly",x="mouseenter"+d+" mouseleave"+d,b="tabindex",k="filter",C="accept",S="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",T=t.proxy,A=a.extend({init:function(n,i){var o,s,l,c=this,h=i&&i.index;c.ns=d,i=t.isArray(i)?{dataSource:i}:i,a.fn.init.call(c,n,i),i=c.options,n=c.element.on("focus"+d,T(c._focusHandler,c)),c._focusInputHandler=t.proxy(c._focusInput,c),c.optionLabel=t(),c._optionLabel(),c._inputTemplate(),c._reset(),c._prev="",c._word="",c._wrapper(),c._tabindex(),c.wrapper.data(b,c.wrapper.attr(b)),c._span(),c._popup(),c._mobile(),c._dataSource(),c._ignoreCase(),c._filterHeader(),c._aria(),c._enable(),c._oldIndex=c.selectedIndex=-1,h!==e&&(i.index=h),c._initialIndex=i.index,c._initList(),c._cascade(),i.autoBind?c.dataSource.fetch():-1===c.selectedIndex&&(s=i.text||"",s||(o=i.optionLabel,o&&0===i.index?s=o:c._isSelect&&(s=n.children(":selected").text())),c._textAccessor(s)),l=t(c.element).parents("fieldset").is(":disabled"),l&&c.enable(!1),c.listView.bind("click",function(t){t.preventDefault()}),r.notify(c)},options:{name:"DropDownList",enabled:!0,autoBind:!0,index:0,text:null,value:null,delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{},filter:"none",minLength:1,virtual:!1,template:null,valueTemplate:null,optionLabelTemplate:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#"},events:["open","close",g,"select","filtering","dataBinding","dataBound","cascade"],setOptions:function(t){a.fn.setOptions.call(this,t),this.listView.setOptions(this._listOptions(t)),this._optionLabel(),this._inputTemplate(),this._accessors(),this._filterHeader(),this._enable(),this._aria(),!this.value()&&this.hasOptionLabel()&&this.select(0)},destroy:function(){var t=this;a.fn.destroy.call(t),t.wrapper.off(d),t.element.off(d),t._inputWrapper.off(d),t._arrow.off(),t._arrow=null,t.optionLabel.off()},open:function(){var t=this;t.popup.visible()||(t.listView.bound()&&t._state!==C?t._allowOpening()&&(t.popup.one("activate",t._focusInputHandler),t.popup.open(),t._focusItem()):(t._open=!0,t._state="rebind",t.filterInput&&(t.filterInput.val(""),t._prev=""),t._filterSource()))},_focusInput:function(){this._focusElement(this.filterInput)},_allowOpening:function(){return this.hasOptionLabel()||this.filterInput||this.dataSource.view().length},toggle:function(t){this._toggle(t,!0)},current:function(t){var n;return t===e?(n=this.listView.focus(),!n&&0===this.selectedIndex&&this.hasOptionLabel()?this.optionLabel:n):(this._focus(t),e)},dataItem:function(n){var i=this,o=null;if(null===n)return n;if(n===e)o=i.listView.selectedDataItems()[0];else{if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(t(n).data("uid"));n=n.hasClass("k-list-optionlabel")?-1:t(i.items()).index(n)}else i.hasOptionLabel()&&(n-=1);o=i.dataSource.flatView()[n]}return o||(o=i._optionLabelDataItem()),o},refresh:function(){this.listView.refresh()},text:function(t){var n,i,o=this,r=o.options.ignoreCase;return t=null===t?"":t,t===e?o._textAccessor():("string"==typeof t&&(i=r?t.toLowerCase():t,o._select(function(t){return t=o._text(t),r&&(t=(t+"").toLowerCase()),t===i}),n=o.dataItem(),n&&(t=n)),o._textAccessor(t),e)},value:function(t){var n=this,i=n.listView,o=n.dataSource;return t===e?(t=n._accessor()||n.listView.value()[0],t===e||null===t?"":t):(t&&(n._initialIndex=null),n._request&&n.options.cascadeFrom&&n.listView.bound()?(n._valueSetter&&o.unbind(g,n._valueSetter),n._valueSetter=T(function(){n.value(t)},n),o.one(g,n._valueSetter),e):(i.bound()&&i.isFiltered()?(i.bound(!1),n._filterSource()):n._fetchData(),i.value(t).done(function(){-1===n.selectedIndex&&n.text()&&(n.text(""),n._accessor("",-1)),n._old=n._accessor(),n._oldIndex=n.selectedIndex}),e))},hasOptionLabel:function(){return this.optionLabel&&!!this.optionLabel[0]},_optionLabel:function(){var n=this,i=n.options,o=i.optionLabel,s=i.optionLabelTemplate;return o?(s||(s="#:",s+="string"==typeof o?"data":r.expr(i.dataTextField,"data"),s+="#"),"function"!=typeof s&&(s=r.template(s)),n.optionLabelTemplate=s,n.hasOptionLabel()||(n.optionLabel=t('<div class="k-list-optionlabel"></div>').prependTo(n.list)),n.optionLabel.html(s(o)).off().click(T(n._click,n)).on(x,n._toggleHover),n.angular("compile",function(){return{elements:n.optionLabel}}),e):(n.optionLabel.off().remove(),n.optionLabel=t(),e)},_optionLabelText:function(){var t=this.options.optionLabel;return"string"==typeof t?t:this._text(t)},_optionLabelDataItem:function(){var e=this,n=e.options.optionLabel;return e.hasOptionLabel()?t.isPlainObject(n)?new h(n):e._assignInstance(e._optionLabelText(),""):null},_listBound:function(){var t,e,n=this,i=n._initialIndex,o=n.options.optionLabel,r=n._state===k,s=n.dataSource.flatView(),a=s.length;n._angularItems("compile"),n._presetValue=!1,n._resizePopup(!0),n.popup.position(),n._isSelect&&(e=n.value(),a?o&&(o=n._option("",n._optionLabelText())):e&&(o=n._option(e,n.text())),n._options(s,o,e)),n._makeUnselectable(),r||(n._open&&n.toggle(n._allowOpening()),n._open=!1,n._fetch||(a?(!n.listView.value().length&&i>-1&&null!==i&&n.select(i),n._initialIndex=null,
t=n.listView.selectedDataItems()[0],t&&n.text()!==n._text(t)&&n._selectValue(t)):n._textAccessor()!==n._optionLabelText()&&(n.listView.value(""),n._selectValue(null),n._oldIndex=n.selectedIndex))),n._hideBusy(),n.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),(this._presetValue||this._old&&-1===this._oldIndex)&&(this._oldIndex=this.selectedIndex)},_focusHandler:function(){this.wrapper.focus()},_focusinHandler:function(){this._inputWrapper.addClass(m),this._prevent=!1},_focusoutHandler:function(){var t=this,e=t._state===k,n=window.self!==window.top,i=t._focus();t._prevent||(clearTimeout(t._typingTimeout),e&&i&&!t.trigger("select",{item:i})&&t._select(i,!t.dataSource.view().length),l.mobileOS.ios&&n?t._change():t._blur(),t._inputWrapper.removeClass(m),t._prevent=!0,t._open=!1,t.element.blur())},_wrapperMousedown:function(){this._prevent=!!this.filterInput},_wrapperClick:function(t){t.preventDefault(),this.popup.unbind("activate",this._focusInputHandler),this._focused=this.wrapper,this._toggle()},_editable:function(t){var e=this,n=e.element,i=t.disable,o=t.readonly,r=e.wrapper.add(e.filterInput).off(d),s=e._inputWrapper.off(x);o||i?i?(r.removeAttr(b),s.addClass(y).removeClass(v)):(s.addClass(v).removeClass(y),r.on("focusin"+d,T(e._focusinHandler,e)).on("focusout"+d,T(e._focusoutHandler,e))):(n.removeAttr(f).removeAttr(p),s.addClass(v).removeClass(y).on(x,e._toggleHover),r.attr(b,r.data(b)).attr(_,!1).attr(w,!1).on("keydown"+d,T(e._keydown,e)).on("focusin"+d,T(e._focusinHandler,e)).on("focusout"+d,T(e._focusoutHandler,e)).on("mousedown"+d,T(e._wrapperMousedown,e)),e.wrapper.on("click"+d,T(e._wrapperClick,e)),e.filterInput||r.on("keypress"+d,T(e._keypress,e))),n.attr(f,i).attr(p,o),r.attr(_,i).attr(w,o)},_option:function(t,e){return'<option value="'+t+'">'+e+"</option>"},_keydown:function(t){var n,i,o=this,r=t.keyCode,s=t.altKey,a=o.popup.visible();if(o.filterInput&&(n=o.filterInput[0]===c()),r===u.LEFT?(r=u.UP,i=!0):r===u.RIGHT&&(r=u.DOWN,i=!0),!i||!n){if(t.keyCode=r,(s&&r===u.UP||r===u.ESC)&&o._focusElement(o.wrapper),r===u.ENTER&&o._typingTimeout&&o.filterInput&&a)return t.preventDefault(),e;i=o._move(t),i||(a&&o.filterInput||(r===u.HOME?(i=!0,o._firstItem()):r===u.END&&(i=!0,o._lastItem()),i&&(o._select(o._focus()),t.preventDefault())),s||i||!o.filterInput||o._search())}},_matchText:function(t,n){var i=this.options.ignoreCase;return t===e||null===t?!1:(t+="",i&&(t=t.toLowerCase()),0===t.indexOf(n))},_shuffleData:function(t,e){var n=this._optionLabelDataItem();return n&&(t=[n].concat(t)),t.slice(e).concat(t.slice(0,e))},_selectNext:function(){var t,e,n,r=this,s=r.dataSource.flatView().toJSON(),a=s.length+(r.hasOptionLabel()?1:0),l=o(r._word,r._last),c=r.selectedIndex;for(-1===c?c=0:(c+=l?1:0,c=i(c,a)),s=r._shuffleData(s,c),n=0;a>n&&(e=r._text(s[n]),!l||!r._matchText(e,r._last))&&!r._matchText(e,r._word);n++);n!==a&&(t=r._focus(),r._select(i(c+n,a)),r.trigger("select",{item:r._focus()})&&r._select(t),r.popup.visible()||r._change())},_keypress:function(t){var e,n=this;0!==t.which&&t.keyCode!==r.keys.ENTER&&(e=String.fromCharCode(t.charCode||t.keyCode),n.options.ignoreCase&&(e=e.toLowerCase())," "===e&&t.preventDefault(),n._word+=e,n._last=e,n._search())},_popupOpen:function(){var t=this.popup;t.wrapper=r.wrap(t.element),t.element.closest(".km-root")[0]&&(t.wrapper.addClass("km-popup km-widget"),this.wrapper.addClass("km-widget"))},_popup:function(){a.fn._popup.call(this),this.popup.one("open",T(this._popupOpen,this))},_click:function(n){var i=n.item||t(n.currentTarget);return n.preventDefault(),this.trigger("select",{item:i})?(this.close(),e):(this._userTriggered=!0,this._select(i),this._focusElement(this.wrapper),this._blur(),e)},_focusElement:function(t){var e=c(),n=this.wrapper,i=this.filterInput,o=t===i?n:i,r=l.mobileOS&&(l.touch||l.MSPointers||l.pointers);i&&i[0]===t[0]&&r||i&&o[0]===e&&(this._prevent=!0,this._focused=t.focus())},_filter:function(t){var e,n;t&&(e=this,n=e.options.ignoreCase,n&&(t=t.toLowerCase()),e._select(function(n){return e._matchText(e._text(n),t)}))},_search:function(){var t=this,n=t.dataSource;if(clearTimeout(t._typingTimeout),"none"!==t.options.filter)t._typingTimeout=setTimeout(function(){var e=t.filterInput.val();t._prev!==e&&(t._prev=e,t.search(e)),t._typingTimeout=null},t.options.delay);else{if(t._typingTimeout=setTimeout(function(){t._word=""},t.options.delay),!t.listView.bound())return n.fetch().done(function(){t._selectNext()}),e;t._selectNext()}},_get:function(e){var n,i,o,r="function"==typeof e,s=r?t():t(e);if(this.hasOptionLabel()&&("number"==typeof e?e>-1&&(e-=1):s.hasClass("k-list-optionlabel")&&(e=-1)),r){for(n=this.dataSource.flatView(),o=0;n.length>o;o++)if(e(n[o])){e=o,i=!0;break}i||(e=-1)}return e},_firstItem:function(){this.hasOptionLabel()?this._focus(this.optionLabel):this.listView.focusFirst()},_lastItem:function(){this._resetOptionLabel(),this.listView.focusLast()},_nextItem:function(){this.optionLabel.hasClass("k-state-focused")?(this._resetOptionLabel(),this.listView.focusFirst()):this.listView.focusNext()},_prevItem:function(){this.optionLabel.hasClass("k-state-focused")||(this.listView.focusPrev(),this.listView.focus()||this._focus(this.optionLabel))},_focusItem:function(){var t=this.listView,n=t.focus(),i=t.select();i=i[i.length-1],i===e&&this.options.highlightFirst&&!n&&(i=0),i!==e?t.focus(i):this.options.optionLabel?(this._focus(this.optionLabel),this._select(this.optionLabel)):t.scrollToIndex(0)},_resetOptionLabel:function(t){this.optionLabel.removeClass("k-state-focused"+(t||"")).removeAttr("id")},_focus:function(t){var n=this.listView,i=this.optionLabel;return t===e?(t=n.focus(),!t&&i.hasClass("k-state-focused")&&(t=i),t):(this._resetOptionLabel(),t=this._get(t),n.focus(t),-1===t&&(i.addClass("k-state-focused").attr("id",n._optionID),this._focused.add(this.filterInput).removeAttr("aria-activedescendant").attr("aria-activedescendant",n._optionID)),e)},_select:function(t,e){var n=this;t=n._get(t),n.listView.select(t),e||n._state!==k||(n._state=C),-1===t&&n._selectValue(null)},_selectValue:function(t){var n=this,i=n.options.optionLabel,o=n.listView.select(),r="",s="";o=o[o.length-1],o===e&&(o=-1),this._resetOptionLabel(" k-state-selected"),t?(s=t,r=n._dataValue(t),i&&(o+=1)):i&&(n._focus(n.optionLabel.addClass("k-state-selected")),s=n._optionLabelText(),r="string"==typeof i?"":n._value(i),o=0),n.selectedIndex=o,null===r&&(r=""),n._textAccessor(s),n._accessor(r,o),n._triggerCascade()},_mobile:function(){var t=this,e=t.popup,n=l.mobileOS,i=e.element.parents(".km-root").eq(0);i.length&&n&&(e.options.animation.open.effects=n.android||n.meego?"fadeIn":n.ios||n.wp?"slideIn:up":e.options.animation.open.effects)},_filterHeader:function(){var e,n=this.options,i="none"!==n.filter;this.filterInput&&(this.filterInput.off(d).parent().remove(),this.filterInput=null),i&&(e='<span unselectable="on" class="k-icon k-i-search">select</span>',this.filterInput=t('<input class="k-textbox"/>').attr({placeholder:this.element.attr("placeholder"),role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),this.list.prepend(t('<span class="k-list-filter" />').append(this.filterInput.add(e))))},_span:function(){var e,n=this,i=n.wrapper,o="span.k-input";e=i.find(o),e[0]||(i.append('<span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input"> </span><span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-arrow-s">select</span></span></span>').append(n.element),e=i.find(o)),n.span=e,n._inputWrapper=t(i[0].firstChild),n._arrow=i.find(".k-icon")},_wrapper:function(){var t,e=this,n=e.element,i=n[0];t=n.parent(),t.is("span.k-widget")||(t=n.wrap("<span />").parent(),t[0].style.cssText=i.style.cssText,t[0].title=i.title),n.hide(),e._focused=e.wrapper=t.addClass("k-widget k-dropdown k-header").addClass(i.className).css("display","").attr({accesskey:n.attr("accesskey"),unselectable:"on",role:"listbox","aria-haspopup":!0,"aria-expanded":!1})},_clearSelection:function(t){this.select(t.value()?0:-1)},_inputTemplate:function(){var e=this,n=e.options.valueTemplate;if(n=n?r.template(n):t.proxy(r.template("#:this._text(data)#",{useWithBlock:!1}),e),e.valueTemplate=n,e.hasOptionLabel())try{e.valueTemplate(e._optionLabelDataItem())}catch(i){throw Error(S)}},_textAccessor:function(n){var i,o=null,r=this.valueTemplate,s=this.options,a=s.optionLabel,l=this.span;if(n===e)return l.text();t.isPlainObject(n)||n instanceof h?o=n:a&&this._optionLabelText()===n&&(o=a,r=this.optionLabelTemplate),o||(o=this._assignInstance(n,this._accessor())),i=function(){return{elements:l.get(),data:[{dataItem:o}]}},this.angular("cleanup",i);try{l.html(r(o))}catch(c){l.html("")}this.angular("compile",i)},_preselect:function(t,e){t||e||(e=this._optionLabelText()),this._accessor(t),this._textAccessor(e),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(t),this._initialIndex=null,this._presetValue=!0},_assignInstance:function(t,e){var i=this.options.dataTextField,o={};return i?(n(o,i.split("."),t),n(o,this.options.dataValueField.split("."),e),o=new h(o)):o=t,o}});s.plugin(A)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("dataviz/diagram/dom.min",["kendo.data.min","kendo.draganddrop.min","kendo.toolbar.min","kendo.editable.min","kendo.window.min","kendo.dropdownlist.min","kendo.dataviz.core.min","kendo.dataviz.themes.min","dataviz/diagram/svg.min","dataviz/diagram/services.min","dataviz/diagram/layout.min"],t)}(function(){!function(t,e){function n(t){var e=t.originalEvent,n=0;return e.wheelDelta?(n=-e.wheelDelta/40,n=n>0?yt.ceil(n):yt.floor(n)):e.detail&&(n=e.detail),n}function i(t){return t.options.name.toLowerCase()===Mt.toLowerCase()}function o(t,e){var n,o,r,s,a=Lt,l=e.connectors;for(o=0;l.length>o;o++)r=l[o],i(r)||(s=t.distanceTo(r.position()),a>s&&(a=s,n=r));return n}function r(t,e){var n,i,o,r=[],s=t.drawingContainer().children,a=s.length;for(n=0;e.length>n;n++)for(i=e[n],o=0;a>o;o++)if(s[o]==i.drawingContainer()){r.push(o);break}return r}function s(t){var e={};return t=t||{},ft(t.text)&&null!==t.text&&(e.text=t.text),ft(t.x)&&null!==t.x&&(e.x=t.x),ft(t.y)&&null!==t.y&&(e.y=t.y),ft(t.width)&&null!==t.width&&(e.width=t.width),ft(t.height)&&null!==t.height&&(e.height=t.height),ft(t.type)&&null!==t.type&&(e.type=t.type),e}function a(t){var e={};return t=t||{},ft(t.text)&&null!==t.text&&(e.content=t.text),ft(t.type)&&null!==t.type&&(e.type=t.type),ft(t.from)&&null!==t.from&&(e.from=t.from),ft(t.fromConnector)&&null!==t.fromConnector&&(e.fromConnector=t.fromConnector),ft(t.fromX)&&null!==t.fromX&&(e.fromX=t.fromX),ft(t.fromY)&&null!==t.fromY&&(e.fromY=t.fromY),ft(t.to)&&null!==t.to&&(e.to=t.to),ft(t.toConnector)&&null!==t.toConnector&&(e.toConnector=t.toConnector),ft(t.toX)&&null!==t.toX&&(e.toX=t.toX),ft(t.toY)&&null!==t.toY&&(e.toY=t.toY),e}function l(e,n){var i,o=this.dataSource.reader.model;o&&(i=o.fn.fields.text?"text":o.idField,t("<input name='"+n.field+"' />").appendTo(e).kendoDropDownList({dataValueField:o.idField,dataTextField:i,dataSource:this.dataSource.data().toJSON(),optionLabel:" ",valuePrimitive:!0}))}function c(t){this.dataItem=t,this.callbacks=[]}function h(){this.items={}}function u(t){var e=t;return t instanceof kendo.data.Model&&(e=t.toJSON(),e[t.idField]=t._defaultId),e}function d(t){var e,n,i=[],o=[];for(n=0;t.length>n;n++)e=t[n],e instanceof w?o.push(e):i.push(e);return{shapes:o,connections:i}}function f(t,e){return t.reader.model?new t.reader.model(e):new kendo.data.ObservableObject(e)}function p(t,e){ft(e[t])&&e.set(t,null)}function g(t,e,n){var i,o;for(o=0;n.length>o;o++)i=n[o],e&&!ft(e[i])&&(e[i]=t[i])}function m(t){var e=t.drawingContainer().clippedBBox(null);(0!==e.origin.x||0!==e.origin.y)&&t.position(-e.origin.x,-e.origin.y)}var v,y,_,w,x,b,k,C,S,T,A,D,P=kendo.dataviz,M=kendo.drawing,E=kendo.geometry,B=P.diagram,I=kendo.ui.Widget,z=kendo.Class,L=t.proxy,R=kendo.deepExtend,O=t.extend,F=kendo.data.HierarchicalDataSource,V=B.Canvas,N=B.Group,H=B.Rectangle,U=B.Circle,j=B.CompositeTransform,G=B.Rect,W=B.Path,q=B.DeleteShapeUnit,$=B.DeleteConnectionUnit,Y=B.TextBlock,X=B.Image,Q=B.Point,K=B.Intersect,Z=B.ConnectionEditAdorner,J=B.UndoRedoService,tt=B.ToolService,et=B.Selector,nt=B.ResizingAdorner,it=B.ConnectorsAdorner,ot=B.Cursors,rt=B.Utils,st=kendo.Observable,at=B.ToBackUnit,lt=B.ToFrontUnit,ct=B.PolylineRouter,ht=B.CascadingRouter,ut=rt.isUndefined,dt=rt.isDefined,ft=kendo.util.defined,pt=t.isArray,gt=kendo.isFunction,mt=rt.isString,vt=t.isPlainObject,yt=Math,_t=".kendoDiagram",wt="cascading",xt="itemBoundsChange",bt="change",kt="click",Ct="drag",St="dragEnd",Tt="dragStart",At="mouseEnter",Dt="mouseLeave",Pt="error",Mt="Auto",Et="Top",Bt="Right",It="Left",zt="Bottom",Lt=9007199254740992,Rt="select",Ot="itemRotate",Ft="pan",Vt="zoomStart",Nt="zoomEnd",Ht="none",Ut=600,jt=600,Gt="rectangle",Wt=100,qt=100,$t=20,Yt=20,Xt=0,Qt="Yellow",Kt=Number.MAX_VALUE,Zt=-Number.MAX_VALUE,Jt="absolute",te="transformed",ee="rotated",ne="transparent",ie="width",oe="height",re="x",se="y",ae="DOMMouseScroll"+_t+" mousewheel"+_t,le=.05,ce=5,he='<a class="k-button k-button-icontext #=className#" href="\\#"><span class="#=iconClass# #=imageClass#"></span>#=text#</a>',ue=5;B.DefaultConnectors=[{name:Et},{name:zt},{name:It},{name:Bt},{name:Mt,position:function(t){return t.getPosition("center")}}],v={cancel:{text:"Cancel",imageClass:"k-cancel",className:"k-diagram-cancel",iconClass:"k-icon"},update:{text:"Update",imageClass:"k-update",className:"k-diagram-update",iconClass:"k-icon"}},B.shapeDefaults=function(t){var e={type:Gt,path:"",autoSize:!0,visual:null,x:Xt,y:Xt,minWidth:$t,minHeight:Yt,width:Wt,height:qt,hover:{},editable:{connect:!0,tools:[]},connectors:B.DefaultConnectors,rotation:{angle:0}};return rt.simpleExtend(e,t),e},y=st.extend({init:function(t){var e=this;e.dataItem=(t||{}).dataItem,st.fn.init.call(e),e.options=R({id:B.randomId()},e.options,t),e.isSelected=!1,e.visual=new N({id:e.options.id,autoSize:e.options.autoSize}),e.id=e.options.id,e._template()},options:{hover:{},cursor:ot.grip,content:{align:"center middle"},selectable:!0,serializable:!0,enable:!0},_getCursor:function(t){return this.adorner?this.adorner._getCursor(t):this.options.cursor},visible:function(t){return ut(t)?this.visual.visible():(this.visual.visible(t),e)},bounds:function(){},refresh:function(){this.visual.redraw()},position:function(t){this.options.x=t.x,this.options.y=t.y,this.visual.position(t)},toString:function(){return this.options.id},serialize:function(){var t=R({},{options:this.options});return this.dataItem&&(t.dataItem=""+this.dataItem),t},_content:function(t){var n,i,o;return t!==e&&(n=this.options,B.Utils.isString(t)?n.content.text=t:R(n.content,t),i=n.content,o=this._contentVisual,o?this._updateContentVisual(i):this._createContentVisual(i)),this.options.content.text},_createContentVisual:function(t){t.text&&(this._contentVisual=new Y(t),this._contentVisual._includeInBBox=!1,this.visual.append(this._contentVisual))},_updateContentVisual:function(t){this._contentVisual.redraw(t)},_hitTest:function(t){var e=this.bounds();return this.visible()&&e.contains(t)&&this.options.enable},_template:function(){var t,e,n=this;n.options.content.template&&(t=n.dataItem||{},e=kendo.template(n.options.content.template,{paramName:"dataItem"}),n.options.content.text=e(t))},_canSelect:function(){return this.options.selectable!==!1},toJSON:function(){return{id:this.options.id}}}),_=z.extend({init:function(t,e){this.options=R({},this.options,e),this.connections=[],this.shape=t},options:{width:7,height:7,fill:{color:Qt},hover:{}},position:function(){return this.options.position?this.options.position(this.shape):this.shape.getPosition(this.options.name)},toJSON:function(){return{shapeId:""+this.shape,connector:this.options.name}}}),_.parse=function(t,e){var n,i,o=e.split(":"),r=o[0],s=o[1]||Mt;for(n=0;t.shapes.length>n;n++)if(i=t.shapes[n],i.options.id==r)return i.getConnector(s.trim())},w=y.extend({init:function(t,e){var n=this;y.fn.init.call(n,t),this.diagram=e,this.updateOptionsFromModel(),t=n.options,n.connectors=[],n.type=t.type,n.createShapeVisual(),n.updateBounds(),n.content(n.content()),n._createConnectors()},options:B.shapeDefaults(),_setOptionsFromModel:function(t){var e=s(t||this.dataItem);this.options=R({},this.options,e),this.redrawVisual(),this.options.content&&(this._template(),this.content(this.options.content))},updateOptionsFromModel:function(t,e){var n,i;this.diagram&&this.diagram._isEditable&&(n=s(t||this.dataItem),t&&e?P.inArray(e,["x","y","width","height"])?(i=this.bounds(),i[e]=t[e],this.bounds(i)):(this.options.visual?this.redrawVisual():n.type&&(this.options=R({},this.options,n),this.redrawVisual()),this.options.content&&(this._template(),this.content(this.options.content))):this.options=R({},this.options,n))},redrawVisual:function(){this.visual.clear(),this._contentVisual=null,this.options.dataItem=this.dataItem,this.createShapeVisual(),this.updateBounds()},updateModel:function(t){var e,n,i=this.diagram;i&&i._isEditable&&(e=this._bounds,n=this.dataItem,n&&(i._suspendModelRefresh(),ft(n.x)&&e.x!==n.x&&n.set("x",e.x),ft(n.y)&&e.y!==n.y&&n.set("y",e.y),ft(n.width)&&e.width!==n.width&&n.set("width",e.width),ft(n.height)&&e.height!==n.height&&n.set("height",e.height),this.dataItem=n,i._resumeModelRefresh(),t&&i._syncShapeChanges()))},updateBounds:function(){var t=this.visual._measure(!0),e=this.options;this.bounds(new G(e.x,e.y,t.width,t.height)),this._rotate(),this._alignContent()},content:function(t){var e=this._content(t);return this._alignContent(),e},_alignContent:function(){var t,e,n,i,o,r=this.options.content||{},s=this._contentVisual;s&&r.align&&(t=this.visual._measure(),e=new B.RectAlign(t),n=s.drawingElement.bbox(null),i=new G(0,0,n.width(),n.height()),o=e.align(i,r.align),s.position(o.topLeft()))},_createConnectors:function(){var t,e,n=this.options,i=n.connectors.length,o=n.connectorDefaults;for(e=0;i>e;e++)t=new _(this,R({},o,n.connectors[e])),this.connectors.push(t)},bounds:function(t){var e,n;if(t)if(mt(t))switch(t){case te:e=this._transformedBounds();break;case Jt:e=this._transformedBounds(),n=this.diagram._pan,e.x+=n.x,e.y+=n.y;break;case ee:e=this._rotatedBounds();break;default:e=this._bounds}else this._setBounds(t),this._triggerBoundsChange(),this.diagram&&this.diagram._layouting||this.refreshConnections();else e=this._bounds;return e},_setBounds:function(t){var e=this.options,n=t.topLeft(),i=e.x=n.x,o=e.y=n.y,r=e.width=yt.max(t.width,e.minWidth),s=e.height=yt.max(t.height,e.minHeight);this._bounds=new G(i,o,r,s),this.visual.redraw({x:i,y:o,width:r,height:s})},position:function(t){return t?(this.bounds(new G(t.x,t.y,this._bounds.width,this._bounds.height)),e):this._bounds.topLeft()},clone:function(){var t=this.serialize();return t.options.id=B.randomId(),this.diagram&&this.diagram._isEditable&&ft(this.dataItem)&&(t.options.dataItem=u(this.dataItem)),new w(t.options)},select:function(t){var n,i,o=this.diagram;return ut(t)&&(t=!0),this._canSelect()&&this.isSelected!=t?(n=[],i=[],this.isSelected=t,this.isSelected?(o._selectedItems.push(this),n.push(this)):(rt.remove(o._selectedItems,this),i.push(this)),o._internalSelection||o._selectionChanged(n,i),!0):e},rotate:function(t,n,i){var o,r,s,a,l=this.visual.rotate();return t!==e&&(i!==!1&&this.diagram&&this.diagram.undoRedoService&&t!==l.angle&&this.diagram.undoRedoService.add(new B.RotateUnit(this.diagram._resizingAdorner,[this],[l.angle]),!1),o=this.bounds(),r=new Q(o.width/2,o.height/2),n&&(s=t-l.angle,a=o.center().rotate(n,360-s).minus(r),this._rotationOffset=this._rotationOffset.plus(a.minus(o.topLeft())),this.position(a)),this.visual.rotate(t,r),this.options.rotation.angle=t,this.diagram&&this.diagram._connectorsAdorner&&this.diagram._connectorsAdorner.refresh(),this.refreshConnections(),this.diagram&&this.diagram.trigger(Ot,{item:this})),l},connections:function(t){var e,n,i,o,r,s,a,l=[];for(e=0;this.connectors.length>e;e++)for(r=this.connectors[e],o=r.connections,n=0,o;o.length>n;n++)i=o[n],"out"==t?(s=i.source(),s.shape&&s.shape==this&&l.push(i)):"in"==t?(a=i.target(),a.shape&&a.shape==this&&l.push(i)):l.push(i);return l},refreshConnections:function(){t.each(this.connections(),function(){this.refresh()})},getConnector:function(t){var e,n;if(!mt(t))return t instanceof Q?o(t,this):this.connectors.length?this.connectors[0]:null;for(t=t.toLocaleLowerCase(),e=0;this.connectors.length>e;e++)if(n=this.connectors[e],n.options.name.toLocaleLowerCase()==t)return n},getPosition:function(t){var e=this.bounds(),n=t.charAt(0).toLowerCase()+t.slice(1);return gt(e[n])?this._transformPoint(e[n]()):e.center()},redraw:function(t){var e,n;t&&(e=this.options,this.shapeVisual.redraw(this._visualOptions(t)),this._diffNumericOptions(t,[ie,oe,re,se])&&(this.bounds(new G(e.x,e.y,e.width,e.height)),n=!0),t.connectors&&(e.connectors=t.connectors,this._updateConnectors()),e=R(e,t),(t.rotation||n)&&this._rotate(),e.content&&this.content(e.content))},_updateConnectors:function(){var t,e,n,i,o=this.connections();for(this.connectors=[],this._createConnectors(),i=0;o.length>i;i++)t=o[i],e=t.source(),n=t.target(),e.shape&&e.shape===this?t.source(this.getConnector(e.options.name)||null):n.shape&&n.shape===this&&t.target(this.getConnector(n.options.name)||null),t.updateModel()},_diffNumericOptions:B.diffNumericOptions,_visualOptions:function(t){return{data:t.path,source:t.source,hover:t.hover,fill:t.fill,stroke:t.stroke}},_triggerBoundsChange:function(){this.diagram&&this.diagram.trigger(xt,{item:this,bounds:this._bounds.clone()})},_transformPoint:function(t){var e=this.rotate(),n=this.bounds(),i=n.topLeft();return e.angle&&t.rotate(e.center().plus(i),360-e.angle),t},_transformedBounds:function(){var t=this.bounds(),e=t.topLeft(),n=t.bottomRight();return G.fromPoints(this.diagram.modelToView(e),this.diagram.modelToView(n))},_rotatedBounds:function(){var t=this.bounds().rotatedBounds(this.rotate().angle),e=t.topLeft(),n=t.bottomRight();return G.fromPoints(e,n)},_rotate:function(){var t=this.options.rotation;t&&t.angle&&this.rotate(t.angle),this._rotationOffset=new Q},_hover:function(t){var e=this.options,n=e.hover,i=e.stroke,o=e.fill;t&&dt(n.stroke)&&(i=R({},i,n.stroke)),t&&dt(n.fill)&&(o=n.fill),this.shapeVisual.redraw({stroke:i,fill:o}),e.editable&&e.editable.connect&&this.diagram._showConnectors(this,t)},_hitTest:function(t){if(this.visible()){var e,n=this.bounds(),i=this.rotate().angle;if(t.isEmpty&&!t.isEmpty())return K.rects(t,n,i?i:0);if(e=t.clone().rotate(n.center(),i),n.contains(e))return this}},toJSON:function(){return{shapeId:this.options.id}},createShapeVisual:function(){var t,e=this.options,n=this._visualOptions(e),i=e.visual,o=(e.type+"").toLocaleLowerCase();n.width=e.width,n.height=e.height,gt(i)?t=i.call(this,e):n.data?(t=new W(n),m(t)):t="rectangle"==o?new H(n):"circle"==o?new U(n):"text"==o?new Y(n):"image"==o?new X(n):new W(n),this.shapeVisual=t,this.visual.append(this.shapeVisual)}}),x=y.extend({init:function(t,e,n){var i=this;y.fn.init.call(i,n),this.updateOptionsFromModel(),this._initRouter(),i.path=new B.Polyline(i.options),i.path.fill(ne),i.visual.append(i.path),i._sourcePoint=i._targetPoint=new Q,i._setSource(t),i._setTarget(e),i.content(i.options.content),i.definers=[],ft(n)&&n.points&&i.points(n.points)},options:{hover:{stroke:{}},startCap:Ht,endCap:Ht,points:[],selectable:!0,fromConnector:Mt,toConenctor:Mt},_setOptionsFromModel:function(t){this.updateOptionsFromModel(t||this.dataItem)},updateOptionsFromModel:function(t){var e,n,i,o;this.diagram&&this.diagram._isEditable&&(e=this.diagram._dataMap,n=a(t||this.dataItem),t?(ft(n.from)?(i=e[n.from],i&&ft(n.fromConnector)&&(i=i.getConnector(n.fromConnector)),this.source(i)):ft(n.fromX)&&ft(n.fromY)&&this.source(new Q(n.fromX,n.fromY)),ft(n.to)?(o=e[n.to],o&&ft(n.toConnector)&&(o=o.getConnector(n.toConnector)),this.target(o)):ft(n.toX)&&ft(n.toY)&&this.target(new Q(n.toX,n.toY)),ft(n.type)&&this.type()!==n.type&&(this.points([]),this.type(n.type)),this.dataItem=t,this._template(),this.redraw(this.options)):this.options=R({},n,this.options))},updateModel:function(t){if(this.diagram&&this.diagram._isEditable&&this.diagram.connectionsDataSource){var e=this.diagram.connectionsDataSource.getByUid(this.dataItem.uid);e&&(this.diagram._suspendModelRefresh(),ft(this.options.fromX)&&null!==this.options.fromX?(p("from",e),p("fromConnector",e),e.set("fromX",this.options.fromX),e.set("fromY",this.options.fromY)):(e.set("from",this.options.from),ft(e.fromConnector)&&e.set("fromConnector",this.sourceConnector?this.sourceConnector.options.name:null),p("fromX",e),p("fromY",e)),ft(this.options.toX)&&null!==this.options.toX?(p("to",e),p("toConnector",e),e.set("toX",this.options.toX),e.set("toY",this.options.toY)):(e.set("to",this.options.to),ft(e.toConnector)&&e.set("toConnector",this.targetConnector?this.targetConnector.options.name:null),p("toX",e),p("toY",e)),ft(this.options.type)&&ft(e.type)&&e.set("type",this.options.type),this.dataItem=e,this.diagram._resumeModelRefresh(),t&&this.diagram._syncConnectionChanges())}},sourcePoint:function(){return this._resolvedSourceConnector?this._resolvedSourceConnector.position():this._sourcePoint},_setSource:function(t){var n,i=t instanceof w,o=this.options.fromConnector||Mt;(!i||t.getConnector(o))&&(t!==e&&(this.from=t),this._removeFromSourceConnector(),null===t?this.sourceConnector&&(this._sourcePoint=(this._resolvedSourceConnector||this.sourceConnector).position(),this._clearSourceConnector(),this._setFromOptions(null,this._sourcePoint)):t instanceof _?(n=t.shape.dataItem,n&&this._setFromOptions(n.id),this.sourceConnector=t,this.sourceConnector.connections.push(this)):t instanceof Q?(this._setFromOptions(null,t),this._sourcePoint=t,this.sourceConnector&&this._clearSourceConnector()):i&&(n=t.dataItem,n&&this._setFromOptions(n.id),this.sourceConnector=t.getConnector(o),this.sourceConnector.connections.push(this)))},source:function(t,e){return dt(t)&&(e&&this.diagram&&this.diagram.undoRedoService.addCompositeItem(new B.ConnectionEditUnit(this,t)),this._setSource(t),this.refresh()),this.sourceConnector?this.sourceConnector:this._sourcePoint},_setFromOptions:function(t,e){this.options.from=t,e?(this.options.fromX=e.x,this.options.fromY=e.y):(this.options.fromX=null,this.options.fromY=null)},sourceDefiner:function(t){if(!t)return this._sourceDefiner||(this._sourceDefiner=new B.PathDefiner(this.sourcePoint(),null,null)),this._sourceDefiner;if(!(t instanceof B.PathDefiner))throw"The sourceDefiner needs to be a PathDefiner.";t.left=null,this._sourceDefiner=t,this.source(t.point)},targetPoint:function(){return this._resolvedTargetConnector?this._resolvedTargetConnector.position():this._targetPoint},_setTarget:function(t){var n,i=t instanceof w,o=this.options.toConnector||Mt;(!i||t.getConnector(o))&&(t!==e&&(this.to=t),this._removeFromTargetConnector(),null===t?this.targetConnector&&(this._targetPoint=(this._resolvedTargetConnector||this.targetConnector).position(),this._clearTargetConnector(),this._setToOptions(null,this._targetPoint)):t instanceof _?(n=t.shape.dataItem,n&&this._setToOptions(n.id),this.targetConnector=t,this.targetConnector.connections.push(this)):t instanceof Q?(this._setToOptions(null,t),this._targetPoint=t,this.targetConnector&&this._clearTargetConnector()):i&&(n=t.dataItem,n&&this._setToOptions(n.id),this.targetConnector=t.getConnector(o),this.targetConnector.connections.push(this)))},target:function(t,n){return dt(t)&&(n&&this.diagram&&this.diagram.undoRedoService.addCompositeItem(new B.ConnectionEditUnit(this,e,t)),this._setTarget(t),this.refresh()),this.targetConnector?this.targetConnector:this._targetPoint},_setToOptions:function(t,e){this.options.to=t,e?(this.options.toX=e.x,this.options.toY=e.y):(this.options.toX=null,this.options.toY=null)},targetDefiner:function(t){if(!t)return this._targetDefiner||(this._targetDefiner=new B.PathDefiner(this.targetPoint(),null,null)),this._targetDefiner;if(!(t instanceof B.PathDefiner))throw"The sourceDefiner needs to be a PathDefiner.";t.right=null,this._targetDefiner=t,this.target(t.point)},_updateConnectors:function(){this._updateConnector(this.source(),"source"),this._updateConnector(this.target(),"target")},_updateConnector:function(t,e){var n,i,o,r,s=this,a=s.diagram;t instanceof _&&!a.getShapeById(t.shape.id)?(n=t.shape.dataItem,i=t.options.name,o=function(){var o=a._dataMap[n.id];t=o.getConnector(i),s[e](t,!1),s.updateModel()},a._dataMap[n.id]?o():(r=a._inactiveShapeItems.getByUid(n.uid),r&&a._deferredConnectionUpdates.push(r.onActivate(o)))):s[e](t,!1)},content:function(t){var e=this._content(t);return ft(t)&&this._alignContent(),e},_createContentVisual:function(t){var e;return gt(t.visual)?e=t.visual.call(this,t):t.text&&(e=new Y(t)),e&&(this._contentVisual=e,e._includeInBBox=!1,this.visual.append(e)),e},_updateContentVisual:function(t){gt(t.visual)?(this.visual.remove(this._contentVisual),this._createContentVisual(t)):this._contentVisual.redraw(t)},_alignContent:function(){var t,e,n,i,o,r,s,a,l,c,h,u,d,f,p,g;if(this._contentVisual){for(t=ue,e=this.allPoints(),n=yt.floor(e.length/2),i=n-1;i>0&&e[i].equals(e[n]);)i--,n++;o=e[n],r=e[i],s=this._contentVisual._measure(),a=s.width,l=s.height,c=e.length%2===0,h=r.distanceTo(o),c&&e.length>2&&h>0&&(r.y===o.y&&a>h||r.x===o.x&&l>h)&&(c=!1,t=0),c?(d=kendo.util.deg(yt.atan2(o.y-r.y,o.x-r.x)),u=new Q((o.x-r.x)/2+r.x,(o.y-r.y)/2+r.y),90===yt.abs(d)?(u.x+=t,u.y-=l/2):d%180===0?(u.x-=a/2,u.y-=l+t):-90>d||d>0&&90>d?u.y-=l:(0>d||d>90)&&(u.x-=a,u.y-=l)):(f=yt.floor(e.length/2),u=e[f].clone(),r=e[f-1],o=e[f+1],p=u.x>=r.x&&u.x>=o.x?t:-s.width-t,g=u.y>=r.y&&u.y>=o.y?t:-s.height-t,u.x+=p,u.y+=g),this._contentVisual.position(u)}},select:function(t){var n,i,o=this.diagram;return this._canSelect()&&this.isSelected!==t?(this.isSelected=t,n=[],i=[],this.isSelected?(this.adorner=new Z(this,this.options.selection),o._adorn(this.adorner,!0),o._selectedItems.push(this),n.push(this)):this.adorner&&(o._adorn(this.adorner,!1),rt.remove(o._selectedItems,this),this.adorner=e,i.push(this)),this.adorner&&this.adorner.refresh(),o._internalSelection||o._selectionChanged(n,i),!0):e},bounds:function(t){return!t||mt(t)?this._bounds:(this._bounds=t,e)},type:function(t){var n=this.options;return t?(t!==n.type&&(n.type=t,this._initRouter(),this.refresh()),e):n.type},_initRouter:function(){var t=(this.options.type||"").toLowerCase();this._router=t==wt?new ht(this):new ct(this)},points:function(t){var e,n,i,o;if(!t){if(i=[],dt(this.definers))for(o=0;this.definers.length>o;o++)i.push(this.definers[o].point);return i}for(this.definers=[],e=0;t.length>e;e++)if(n=t[e],n instanceof B.Point)this.definers.push(new B.PathDefiner(n));else{if(!n.hasOwnProperty("x")||!n.hasOwnProperty("y"))throw"A Connection point needs to be a Point or an object with x and y properties.";this.definers.push(new B.PathDefiner(new Q(n.x,n.y)))}},allPoints:function(){var t,e=[this.sourcePoint()];if(this.definers)for(t=0;this.definers.length>t;t++)e.push(this.definers[t].point);return e.push(this.targetPoint()),e},refresh:function(){this._resolveConnectors(),this._refreshPath(),this._alignContent(),this.adorner&&this.adorner.refresh()},_resolveConnectors:function(){var t,e,n,r,s=this,a=s.source(),l=s.target();a instanceof Q?t=a:a instanceof _&&(i(a)?n=a.shape:(s._resolvedSourceConnector=a,t=a.position())),l instanceof Q?e=l:l instanceof _&&(i(l)?r=l.shape:(s._resolvedTargetConnector=l,e=l.position())),t?r&&(s._resolvedTargetConnector=o(t,r)):n&&(e?s._resolvedSourceConnector=o(e,n):r&&this._resolveAutoConnectors(n,r))},_resolveAutoConnectors:function(t,e){var n,o,r,s,a,l,c,h,u,d,f,p,g=Lt,m=Lt,v=t.connectors;for(d=0;v.length>d;d++)if(h=v[d],!i(h))for(s=h.position(),n=e.connectors,f=0;n.length>f;f++)u=n[f],i(u)||(a=u.position(),p=yt.round(s.distanceTo(a)),g>p&&this.diagram&&this._testRoutePoints(s,a,h,u)&&(g=p,o=h,r=u),m>p&&(l=h,c=u,m=p));o&&(l=o,c=r),this._resolvedSourceConnector=l,
this._resolvedTargetConnector=c},_testRoutePoints:function(t,e,n,i){var o,r,s,a,l,c=this._router,h=!0;if(c instanceof ht)for(o=c.routePoints(t,e,n,i),o.unshift(t),o.push(e),l=1;o.length>l;l++)if(r=o[l-1],s=o[l],a=new G(yt.min(r.x,s.x),yt.min(r.y,s.y),yt.abs(r.x-s.x),yt.abs(r.y-s.y)),a.width>0&&(a.x++,a.width-=2),a.height>0&&(a.y++,a.height-=2),!a.isEmpty()&&this.diagram._shapesQuadTree.hitTestRect(a)){h=!1;break}return h},redraw:function(t){if(t){this.options=R({},this.options,t);var e=this.options.points;ft(e)&&e.length>0&&(this.points(e),this._refreshPath()),(t&&t.content||t.text)&&this.content(t.content),this.path.redraw({fill:t.fill,stroke:t.stroke,startCap:t.startCap,endCap:t.endCap})}},clone:function(){var t=this.serialize();return this.diagram&&this.diagram._isEditable&&ft(this.dataItem)&&(t.options.dataItem=u(this.dataItem)),new x(this.from,this.to,t.options)},serialize:function(){var t=this.from.toJSON?this.from.toJSON:""+this.from,e=this.to.toJSON?this.to.toJSON:""+this.to,n=R({},{options:this.options,from:t,to:e});return ft(this.dataItem)&&(n.dataItem=""+this.dataItem),n.options.points=this.points(),n},_hitTest:function(t){if(this.visible()){var e=new Q(t.x,t.y),n=this.sourcePoint(),i=this.targetPoint();if(t.isEmpty&&!t.isEmpty()&&t.contains(n)&&t.contains(i))return this;if(this._router.hitTest(e))return this}},_hover:function(t){var e=(this.options.stroke||{}).color;t&&dt(this.options.hover.stroke.color)&&(e=this.options.hover.stroke.color),this.path.redraw({stroke:{color:e}})},_refreshPath:function(){ft(this.path)&&(this._drawPath(),this.bounds(this._router.getBounds()))},_drawPath:function(){var t,e,n;this._router&&this._router.route(),t=this.sourcePoint(),e=this.targetPoint(),n=this.points(),this.path.redraw({points:[t].concat(n,[e])})},_clearSourceConnector:function(){this.sourceConnector=e,this._resolvedSourceConnector=e},_clearTargetConnector:function(){this.targetConnector=e,this._resolvedTargetConnector=e},_removeFromSourceConnector:function(){this.sourceConnector&&rt.remove(this.sourceConnector.connections,this)},_removeFromTargetConnector:function(){this.targetConnector&&rt.remove(this.targetConnector.connections,this)},toJSON:function(){var t,e,n,i=this;return i.from&&i.from.toJSON?t=i.from.toJSON():(n=i._sourcePoint,t={x:n.x,y:n.y}),i.to&&i.to.toJSON?e=i.to.toJSON():(n=i._targetPoint,e={x:n.x,y:n.y}),{from:t,to:e}}}),b=I.extend({init:function(t,e){var n=this;kendo.destroy(t),I.fn.init.call(n,t,e),n._initTheme(),n._initElements(),n._extendLayoutOptions(n.options),n._initDefaults(e),n._initCanvas(),n.mainLayer=new N({id:"main-layer"}),n.canvas.append(n.mainLayer),n._shapesQuadTree=new D(n),n._pan=new Q,n._adorners=[],n.adornerLayer=new N({id:"adorner-layer"}),n.canvas.append(n.adornerLayer),n._createHandlers(),n._initialize(),n._fetchFreshData(),n._createGlobalToolBar(),n._resizingAdorner=new nt(n,{editable:n.options.editable}),n._connectorsAdorner=new it(n),n._adorn(n._resizingAdorner,!0),n._adorn(n._connectorsAdorner,!0),n.selector=new et(n),n._clipboard=[],n.pauseMouseHandlers=!1,n._createOptionElements(),n.zoom(n.options.zoom),n.canvas.draw()},options:{name:"Diagram",theme:"default",layout:"",zoomRate:.1,zoom:1,zoomMin:0,zoomMax:2,dataSource:{},draggable:!0,template:"",autoBind:!0,editable:{rotate:{},resize:{},text:!0,tools:[],drag:{snap:{size:10,angle:10}},remove:!0},pannable:{key:"ctrl"},selectable:{key:"none"},tooltip:{enabled:!0,format:"{0}"},copy:{enabled:!0,offsetX:20,offsetY:20},shapeDefaults:B.shapeDefaults({undoable:!0}),connectionDefaults:{editable:{tools:[]},type:wt},shapes:[],connections:[]},events:[Nt,Vt,Ft,Rt,Ot,xt,bt,kt,At,Dt,"toolBarClick","save","cancel","edit","remove","add","dataBound",Tt,Ct,St],items:function(){return t()},_createGlobalToolBar:function(){var t,e=this.options.editable;e&&(t=e.tools,!this._isEditable||t===!1||t&&0!==t.length||(t=["createShape","undo","redo","rotateClockwise","rotateAnticlockwise"]),t&&t.length&&(this.toolBar=new k(this,{tools:t||{},click:L(this._toolBarClick,this),modal:!1}),this.toolBar.element.css({textAlign:"left"}),this.element.prepend(this.toolBar.element),this._resize()))},createShape:function(){var t,e,n,i,o,r;(this.editor&&this.editor.end()||!this.editor)&&(t=this.dataSource,e=t.view()||[],n=e.length,i=f(t,{}),o=this._createShape(i,{}),this.trigger("add",{shape:o})||(t.insert(n,i),r=this._inactiveShapeItems.getByUid(i.uid),r.element=o,this.edit(o)))},_createShape:function(t,e){e=R({},this.options.shapeDefaults,e),e.dataItem=t;var n=new w(e,this);return n},createConnection:function(){var t,e,n,i,o;(this.editor&&this.editor.end()||!this.editor)&&(t=this.connectionsDataSource,e=t.view()||[],n=e.length,i=f(t,{}),o=this._createConnection(i),this.trigger("add",{connection:o})||(this._connectionsDataMap[i.uid]=o,t.insert(n,i),this.addConnection(o,!1),this.edit(o)))},_createConnection:function(t,e,n){var i,o=R({},this.options.connectionDefaults);return o.dataItem=t,i=new x(e||new Q,n||new Q,o)},editModel:function(t,e){var n,i,o,r;if(this.cancelEdit(),o=this.options.editable,"shape"==e)n=o.shapeEditors,i=o.shapeTemplate;else{if("connection"!=e)return;r=L(l,this),n=R({},{from:r,to:r},o.connectionEditors),i=o.connectionTemplate}this.editor=new S(this.element,{update:L(this._update,this),cancel:L(this._cancel,this),model:t,type:e,target:this,editors:n,template:i}),this.trigger("edit",this._editArgs())},edit:function(t){if(t.dataItem){var e=t instanceof w?"shape":"connection";this.editModel(t.dataItem,e)}},cancelEdit:function(){this.editor&&(this._getEditDataSource().cancelChanges(this.editor.model),this._destroyEditor())},saveEdit:function(){this.editor&&this.editor.end()&&!this.trigger("save",this._editArgs())&&this._getEditDataSource().sync()},_update:function(){this.editor&&this.editor.end()&&!this.trigger("save",this._editArgs())&&(this._getEditDataSource().sync(),this._destroyEditor())},_cancel:function(){var t,e;this.editor&&!this.trigger("cancel",this._editArgs())&&(t=this.editor.model,this._getEditDataSource().cancelChanges(t),e=this._connectionsDataMap[t.uid]||this._dataMap[t.id],e&&e._setOptionsFromModel(t),this._destroyEditor())},_getEditDataSource:function(){return"shape"===this.editor.options.type?this.dataSource:this.connectionsDataSource},_editArgs:function(){var t={container:this.editor.wrapper};return t[this.editor.options.type]=this.editor.model,t},_destroyEditor:function(){this.editor&&(this.editor.close(),this.editor=null)},_initElements:function(){this.wrapper=this.element.empty().css("position","relative").attr("tabindex",0).addClass("k-widget k-diagram"),this.scrollable=t("<div />").appendTo(this.element)},_initDefaults:function(t){var e=this.options,n=e.editable,i=e.shapeDefaults,o=e.connectionDefaults,r=(t||{}).shapeDefaults;n===!1?(i.editable=!1,o.editable=!1):(g(n,i.editable,["drag","remove","connect"]),g(n,o.editable,["drag","remove"])),r&&r.connectors&&(e.shapeDefaults.connectors=r.connectors)},_initCanvas:function(){var e=t("<div class='k-layer'></div>").appendTo(this.scrollable)[0],n=this.viewport();this.canvas=new V(e,{width:n.width||Ut,height:n.height||jt})},_createHandlers:function(){var t=this,e=t.element;e.on(ae,L(t._wheel,t)),kendo.support.touch||kendo.support.mobileOS?(t._userEvents=new kendo.UserEvents(e,{multiTouch:!0,tap:L(t._tap,t)}),t._userEvents.bind(["gesturestart","gesturechange","gestureend"],{gesturestart:L(t._gestureStart,t),gesturechange:L(t._gestureChange,t),gestureend:L(t._gestureEnd,t)}),t.toolService=new tt(t),t.options.pannable!==!1&&t.scroller.enable()):(t.toolService=new tt(t),this.scroller.wrapper.on("mousemove"+_t,L(t._mouseMove,t)).on("mouseup"+_t,L(t._mouseUp,t)).on("mousedown"+_t,L(t._mouseDown,t)).on("mouseover"+_t,L(t._mouseover,t)).on("mouseout"+_t,L(t._mouseout,t)),e.on("keydown"+_t,L(t._keydown,t))),this._syncHandler=L(t._syncChanges,t),t._resizeHandler=L(t.resize,t,!1),kendo.onResize(t._resizeHandler),this.bind(Vt,L(t._destroyToolBar,t)),this.bind(Ft,L(t._destroyToolBar,t))},_tap:function(t){var e,n=this.toolService,i=this._caculateMobilePosition(t);n._updateHoveredItem(i),n.hoveredItem&&(e=n.hoveredItem,this.options.selectable!==!1&&(this._destroyToolBar(),e.isSelected?e.select(!1):this.select(e,{addToSelection:!0}),this._createToolBar()),this.trigger("click",{item:e,point:i}))},_caculateMobilePosition:function(t){return this.documentToModel(Q(t.x.location,t.y.location))},_gestureStart:function(t){var e,n;this._destroyToolBar(),this.scroller.disable(),e=this.documentToModel(new Q(t.center.x,t.center.y)),n={point:e,zoom:this.zoom()},this.trigger(Vt,n)||(this._gesture=t,this._initialCenter=e)},_gestureChange:function(t){var e,n,i=this._gesture,o=this._initialCenter,r=this.documentToView(new Q(t.center.x,t.center.y)),s=t.distance/i.distance,a=this._zoom,l=!1;yt.abs(s-1)>=le&&(this._zoom=a=this._getValidZoom(a*s),this.options.zoom=a,this._gesture=t,l=!0),e=o.times(a),n=r.minus(e),(l||this._pan.distanceTo(n)>=ce)&&(this._panTransform(n),this._updateAdorners()),t.preventDefault()},_gestureEnd:function(){this.options.pannable!==!1&&this.scroller.enable(),this.trigger(Nt,{point:this._initialCenter,zoom:this.zoom()})},_resize:function(){var t=this.viewport();this.canvas&&this.canvas.size(t),this.scrollable&&this.toolBar&&this.scrollable.height(t.height)},_mouseover:function(t){var e=t.target._kendoNode;e&&e.srcElement._hover&&e.srcElement._hover(!0,e.srcElement)},_mouseout:function(t){var e=t.target._kendoNode;e&&e.srcElement._hover&&e.srcElement._hover(!1,e.srcElement)},_initTheme:function(){var t=this,e=P.ui.themes||{},n=((t.options||{}).theme||"").toLowerCase(),i=(e[n]||{}).diagram;t.options=R({},i,t.options),t.options.editable===!0&&R(t.options,{editable:(i||{}).editable})},_createOptionElements:function(){var t=this.options,e=t.shapes.length;e&&this._createShapes(),t.connections.length&&this._createConnections(),e&&t.layout&&this.layout(t.layout)},_createShapes:function(){var t,e,n=this,i=n.options,o=i.shapes;for(e=0;o.length>e;e++)t=o[e],n.addShape(t)},_createConnections:function(){var t,e,n,i,o=this,r=o.options,s=r.connectionDefaults,a=r.connections;for(i=0;a.length>i;i++)t=a[i],e=o._findConnectionTarget(t.from),n=o._findConnectionTarget(t.to),o.connect(e,n,R({},s,t))},_findConnectionTarget:function(t){var e,n=this,i=mt(t)?t:t.shapeId||t.id;return i?(e=n.getShapeById(i),t.connector&&(e=e.getConnector(t.connector))):e=new Q(t.x||0,t.y||0),e},destroy:function(){var t=this;I.fn.destroy.call(t),this._userEvents&&this._userEvents.destroy(),kendo.unbindResize(t._resizeHandler),t.clear(),t.element.off(_t),t.scroller.wrapper.off(_t),t.canvas.destroy(!0),t.canvas=e,t._destroyEditor(),t.destroyScroller(),t._destroyGlobalToolBar(),t._destroyToolBar()},destroyScroller:function(){var t=this.scroller;t&&(t.destroy(),t.element.remove(),this.scroller=null)},save:function(){var t,e,n,i={shapes:[],connections:[]};for(t=0;this.shapes.length>t;t++)n=this.shapes[t],n.options.serializable&&i.shapes.push(n.options);for(t=0;this.connections.length>t;t++)e=this.connections[t],i.connections.push(R({},e.options,e.toJSON()));return i},focus:function(){if(!this.element.is(kendo._activeElement())){var t,e=this.element,n=e[0],i=[],o=[],r=document.documentElement;do n=n.parentNode,n.scrollHeight>n.clientHeight&&(i.push(n),o.push(n.scrollTop));while(n!=r);for(e.focus(),t=0;i.length>t;t++)i[t].scrollTop=o[t]}},load:function(t){this.clear(),this.setOptions(t),this._createShapes(),this._createConnections()},setOptions:function(t){R(this.options,t)},clear:function(){var t=this;t.select(!1),t.mainLayer.clear(),t._shapesQuadTree.clear(),t._initialize()},connect:function(t,e,n){var i,o;return this.connectionsDataSource&&this._isEditable?(o=this.connectionsDataSource.add({}),i=this._connectionsDataMap[o.uid],i.source(t),i.target(e),i.redraw(n),i.updateModel()):(i=new x(t,e,R({},this.options.connectionDefaults,n)),this.addConnection(i)),i},connected:function(t,e){var n,i;for(n=0;this.connections.length>n;n++)if(i=this.connections[n],i.from==t&&i.to==e)return!0;return!1},addConnection:function(t,e){return e!==!1&&this.undoRedoService.add(new B.AddConnectionUnit(t,this),!1),t.diagram=this,t._setOptionsFromModel(),t.refresh(),this.mainLayer.append(t.visual),this.connections.push(t),this.trigger(bt,{added:[t],removed:[]}),t},_addConnection:function(t,e){var n,i=this.connectionsDataSource;if(i&&this._isEditable){if(n=f(i,u(t.dataItem)),t.dataItem=n,t.updateModel(),!this.trigger("add",{connection:t}))return this._connectionsDataMap[n.uid]=t,i.add(n),this.addConnection(t,e),t._updateConnectors(),t}else if(!this.trigger("add",{connection:t}))return this.addConnection(t,e),t._updateConnectors(),t},addShape:function(t,e){var n,i=this.options.shapeDefaults;if(t instanceof w)n=t;else{if(t instanceof kendo.Class)return;i=R({},i,t||{}),n=new w(i,this)}return e!==!1&&this.undoRedoService.add(new B.AddShapeUnit(n,this),!1),this.shapes.push(n),n.diagram!==this&&(this._shapesQuadTree.insert(n),n.diagram=this),this.mainLayer.append(n.visual),this.trigger(bt,{added:[n],removed:[]}),n},_addShape:function(t,e){var n,i,o=this,r=o.dataSource;if(r&&this._isEditable){if(n=f(r,u(t.dataItem)),t.dataItem=n,t.updateModel(),!this.trigger("add",{shape:t}))return this.dataSource.add(n),i=this._inactiveShapeItems.getByUid(n.uid),i.element=t,i.undoable=e,t}else if(!this.trigger("add",{shape:t}))return this.addShape(t,e)},remove:function(t,e){var n,i,o,r;for(t=pt(t)?t.slice(0):[t],n=d(t),i=n.shapes,o=n.connections,ft(e)||(e=!0),e&&this.undoRedoService.begin(),this._suspendModelRefresh(),r=i.length-1;r>=0;r--)this._removeItem(i[r],e,o);for(r=o.length-1;r>=0;r--)this._removeItem(o[r],e);this._resumeModelRefresh(),e&&this.undoRedoService.commit(!1),this.trigger(bt,{added:[],removed:t})},_removeShapeDataItem:function(t){this._isEditable&&(this.dataSource.remove(t.dataItem),delete this._dataMap[t.dataItem.id])},_removeConnectionDataItem:function(t){this._isEditable&&(this.connectionsDataSource.remove(t.dataItem),delete this._connectionsDataMap[t.dataItem.uid])},_triggerRemove:function(t){var e,n,i,o,r=[];for(o=0;t.length>o;o++)e=t[o],i=e.options.editable,n=e instanceof w?{shape:e}:{connection:e},i&&i.remove!==!1&&!this.trigger("remove",n)&&r.push(e);return r},undo:function(){this.undoRedoService.undo()},redo:function(){this.undoRedoService.redo()},select:function(t,e){if(!dt(t))return this._selectedItems;e=R({addToSelection:!1},e);var n,i,o=e.addToSelection,r=[],s=[];for(o||this.deselect(),this._internalSelection=!0,t instanceof Array?r=t:t instanceof y&&(r=[t]),n=0;r.length>n;n++)i=r[n],i.select(!0)&&s.push(i);this._selectionChanged(s,[]),this._internalSelection=!1},selectAll:function(){this.select(this.shapes.concat(this.connections))},selectArea:function(t){var e,n,i,o;if(this._internalSelection=!0,o=[],t instanceof G)for(n=this.shapes.concat(this.connections),e=0;n.length>e;e++)i=n[e],t&&!i._hitTest(t)||!i.options.enable||i.select(!0)&&o.push(i);this._selectionChanged(o,[]),this._internalSelection=!1},deselect:function(t){this._internalSelection=!0;var e,n,i=[],o=[];for(t instanceof Array?o=t:t instanceof y?o.push(t):dt(t)||(o=this._selectedItems.slice(0)),n=0;o.length>n;n++)e=o[n],e.select(!1)&&i.push(e);this._selectionChanged([],i),this._internalSelection=!1},toFront:function(t,e){var n,i,o;t||(t=this._selectedItems.slice()),n=this._getDiagramItems(t),!ft(e)||e?(i=r(this.mainLayer,n.visuals),o=new lt(this,t,i),this.undoRedoService.add(o)):(this.mainLayer.toFront(n.visuals),this._fixOrdering(n,!0))},toBack:function(t,e){var n,i,o;t||(t=this._selectedItems.slice()),n=this._getDiagramItems(t),!ft(e)||e?(i=r(this.mainLayer,n.visuals),o=new at(this,t,i),this.undoRedoService.add(o)):(this.mainLayer.toBack(n.visuals),this._fixOrdering(n,!1))},bringIntoView:function(t,e){var n,i,o,r,s=this.viewport(),a=new B.RectAlign(s);0!==s.width&&0!==s.height&&(e=R({animate:!1,align:"center middle"},e),"none"==e.align&&(e.align="center middle"),t instanceof y?i=t.bounds(te):pt(t)?i=this.boundingBox(t):t instanceof G&&(i=t.clone()),o=i.clone(),i.zoom(this._zoom),(i.width>s.width||i.height>s.height)&&(this._zoom=this._getValidZoom(yt.min(s.width/o.width,s.height/o.height)),i=o.clone().zoom(this._zoom)),this._zoomMainLayer(),n=i.clone(),a.align(i,e.align),r=i.topLeft().minus(n.topLeft()),this.pan(r.times(-1),e.animate))},alignShapes:function(t){var e,n,i,o,r,s,a;if(ut(t)&&(t="Left"),e=this.select(),0!==e.length){switch(t.toLowerCase()){case"left":case"top":n=Kt;break;case"right":case"bottom":n=Zt}for(o=0;e.length>o;o++)if(i=e[o],i instanceof w)switch(t.toLowerCase()){case"left":n=yt.min(n,i.options.x);break;case"top":n=yt.min(n,i.options.y);break;case"right":n=yt.max(n,i.options.x);break;case"bottom":n=yt.max(n,i.options.y)}for(r=[],s=[],o=0;e.length>o;o++)if(i=e[o],i instanceof w)switch(s.push(i),r.push(i.bounds()),t.toLowerCase()){case"left":case"right":i.position(new Q(n,i.options.y));break;case"top":case"bottom":i.position(new Q(i.options.x,n))}a=new B.TransformUnit(s,r),this.undoRedoService.add(a,!1)}},zoom:function(t,e){var n,i,o,r;return t&&(n=e?e.point:new B.Point(0,0),t=this._zoom=this._getValidZoom(t),ut(n)||(n=new B.Point(yt.round(n.x),yt.round(n.y)),i=n.times(t),o=this.modelToView(n),r=o.minus(i),this._storePan(new B.Point(yt.round(r.x),yt.round(r.y)))),e&&(e.zoom=t),this._panTransform(),this._updateAdorners()),this._zoom},_getPan:function(t){var e=this.canvas;return e.translate||(t=t.plus(this._pan)),t},pan:function(t,e){var n,i;t instanceof Q&&(n=this,i=n.scroller,t=n._getPan(t),t=t.times(-1),e?i.animatedScrollTo(t.x,t.y,function(){n._updateAdorners()}):(i.scrollTo(t.x,t.y),n._updateAdorners()))},viewport:function(){var t=this.element,e=t.width(),n=t.height();return this.toolBar&&(n-=this.toolBar.element.outerHeight()),new G(0,0,e,n)},copy:function(){var t,e;if(this.options.copy.enabled)for(this._clipboard=[],this._copyOffset=1,t=0;this._selectedItems.length>t;t++)e=this._selectedItems[t],this._clipboard.push(e)},cut:function(){var t,e;if(this.options.copy.enabled){for(this._clipboard=[],this._copyOffset=0,t=0;this._selectedItems.length>t;t++)e=this._selectedItems[t],this._clipboard.push(e);this.remove(this._clipboard,!0)}},paste:function(){var t,e,n,i,o,r,s,a;if(this._clipboard.length>0){for(i={},o=d(this._clipboard),r=o.connections,s=o.shapes,a={x:this._copyOffset*this.options.copy.offsetX,y:this._copyOffset*this.options.copy.offsetY},this.deselect(),n=0;s.length>n;n++)t=s[n],e=t.clone(),i[t.id]=e,e.position(new Q(t.options.x+a.x,t.options.y+a.y)),e.diagram=this,e=this._addShape(e),e&&e.select();for(n=0;r.length>n;n++)t=r[n],e=this._addConnection(t.clone()),e&&(this._updateCopiedConnection(e,t,"source",i,a),this._updateCopiedConnection(e,t,"target",i,a),e.select(!0),e.updateModel());this._syncChanges(),this._copyOffset+=1}},_updateCopiedConnection:function(t,e,n,i,o){var r,s,a,l=e[n](),c=this;l instanceof _&&i[l.shape.id]?(a=i[l.shape.id],c.getShapeById(a.id)?t[n](a.getConnector(l.options.name)):(s=c._inactiveShapeItems.getByUid(a.dataItem.uid),s&&(r=function(e){a=c._dataMap[e.id],t[n](a.getConnector(l.options.name)),t.updateModel()},c._deferredConnectionUpdates.push(s.onActivate(r))))):t[n](new Q(e[n+"Point"]().x+o.x,e[n+"Point"]().y+o.y))},boundingBox:function(t,e){var n,i,o,r=G.empty(),s=dt(t)?this._getDiagramItems(t):{shapes:this.shapes};if(s.shapes.length>0)for(i=s.shapes[0],r=i.bounds(ee),o=1;s.shapes.length>o;o++)i=s.shapes[o],n=i.bounds(ee),e===!0&&(n.x-=i._rotationOffset.x,n.y-=i._rotationOffset.y),r=r.union(n);return r},_containerOffset:function(){var t=this.element.offset();return this.toolBar&&(t.top+=this.toolBar.element.outerHeight()),t},documentToView:function(t){var e=this._containerOffset();return new Q(t.x-e.left,t.y-e.top)},viewToDocument:function(t){var e=this._containerOffset();return new Q(t.x+e.left,t.y+e.top)},viewToModel:function(t){return this._transformWithMatrix(t,this._matrixInvert)},modelToView:function(t){return this._transformWithMatrix(t,this._matrix)},modelToLayer:function(t){return this._transformWithMatrix(t,this._layerMatrix)},layerToModel:function(t){return this._transformWithMatrix(t,this._layerMatrixInvert)},documentToModel:function(t){var e=this.documentToView(t);return this.canvas.translate||(e.x=e.x+this.scroller.scrollLeft,e.y=e.y+this.scroller.scrollTop),this.viewToModel(e)},modelToDocument:function(t){return this.viewToDocument(this.modelToView(t))},_transformWithMatrix:function(t,e){var n,i,o=t;return t instanceof Q?e&&(o=e.apply(t)):(n=this._transformWithMatrix(t.topLeft(),e),i=this._transformWithMatrix(t.bottomRight(),e),o=G.fromPoints(n,i)),o},setDataSource:function(t){this.options.dataSource=t,this._dataSource(),this.options.autoBind&&this.dataSource.fetch()},setConnectionsDataSource:function(t){this.options.connectionsDataSource=t,this._connectionDataSource(),this.options.autoBind&&this.connectionsDataSource.fetch()},layout:function(t){var e,n,i,o,r;switch(this._layouting=!0,ut(t)&&(t=this.options.layout),e=ut(t)||ut(t.type)?"Tree":t.type,e.toLowerCase()){case"tree":n=new B.TreeLayout(this);break;case"layered":n=new B.LayeredLayout(this);break;case"forcedirected":case"force":case"spring":case"springembedder":n=new B.SpringLayout(this);break;default:throw"Layout algorithm '"+e+"' is not supported."}i=new B.LayoutState(this),o=n.layout(t),o&&(r=new B.LayoutUndoUnit(i,o,t?t.animate:null),this.undoRedoService.add(r)),this._layouting=!1,this._redrawConnections()},getShapeById:function(t){var e;return(e=rt.first(this.shapes,function(e){return e.visual.id===t}))?e:e=rt.first(this.connections,function(e){return e.visual.id===t})},_extendLayoutOptions:function(t){t.layout&&(t.layout=R(B.LayoutBase.fn.defaultOptions||{},t.layout))},_selectionChanged:function(t,e){(t.length||e.length)&&this.trigger(Rt,{selected:t,deselected:e})},_getValidZoom:function(t){return yt.min(yt.max(t,this.options.zoomMin),this.options.zoomMax)},_panTransform:function(t){var e=this,n=t||e._pan;e.canvas.translate?(e.scroller.scrollTo(n.x,n.y),e._zoomMainLayer()):(e._storePan(n),e._transformMainLayer())},_finishPan:function(){this.trigger(Ft,{total:this._pan,delta:Number.NaN})},_storePan:function(t){this._pan=t,this._storeViewMatrix()},_zoomMainLayer:function(){var t=this._zoom,e=new j(0,0,t,t);e.render(this.mainLayer),this._storeLayerMatrix(e),this._storeViewMatrix()},_transformMainLayer:function(){var t=this._pan,e=this._zoom,n=new j(t.x,t.y,e,e);n.render(this.mainLayer),this._storeLayerMatrix(n),this._storeViewMatrix()},_storeLayerMatrix:function(t){this._layerMatrix=t.toMatrix(),this._layerMatrixInvert=t.invert().toMatrix()},_storeViewMatrix:function(){var t=this._pan,e=this._zoom,n=new j(t.x,t.y,e,e);this._matrix=n.toMatrix(),this._matrixInvert=n.invert().toMatrix()},_toIndex:function(t,e){var n=this._getDiagramItems(t);this.mainLayer.toIndex(n.visuals,e),this._fixOrdering(n,!1)},_fixOrdering:function(t,e){var n,i,o=e?this.shapes.length-1:0,r=e?this.connections.length-1:0;for(n=0;t.shapes.length>n;n++)i=t.shapes[n],rt.remove(this.shapes,i),rt.insert(this.shapes,i,o);for(n=0;t.cons.length>n;n++)i=t.cons[n],rt.remove(this.connections,i),rt.insert(this.connections,i,r)},_getDiagramItems:function(t){var e,n,i={},o=t;for(i.visuals=[],i.shapes=[],i.cons=[],t?pt(t)||(o=[t]):o=this._selectedItems.slice(),e=0;o.length>e;e++)n=o[e],n instanceof w?(i.shapes.push(n),i.visuals.push(n.visual)):n instanceof x&&(i.cons.push(n),i.visuals.push(n.visual));return i},_removeItem:function(t,e,n){t.select(!1),t instanceof w?(this._removeShapeDataItem(t),this._removeShape(t,e,n)):t instanceof x&&(this._removeConnectionDataItem(t),this._removeConnection(t,e)),this.mainLayer.remove(t.visual)},_removeShape:function(t,e,n){var i,o,r,s,a=[],l=[];for(this.toolService._removeHover(),e&&this.undoRedoService.addCompositeItem(new q(t)),rt.remove(this.shapes,t),this._shapesQuadTree.remove(t),i=0;t.connectors.length>i;i++)for(r=t.connectors[i],s=0;r.connections.length>s;s++)o=r.connections[s],n&&P.inArray(o,n)||(o.sourceConnector==r?a.push(o):o.targetConnector==r&&l.push(o));for(i=0;a.length>i;i++)a[i].source(null,e),a[i].updateModel();for(i=0;l.length>i;i++)l[i].target(null,e),l[i].updateModel()},_removeConnection:function(t,e){t.sourceConnector&&rt.remove(t.sourceConnector.connections,t),t.targetConnector&&rt.remove(t.targetConnector.connections,t),e&&this.undoRedoService.addCompositeItem(new $(t)),rt.remove(this.connections,t)},_removeDataItems:function(t,e){var n,i,o,r;for(t=pt(t)?t:[t];t.length;)if(n=t.shift(),o=this._dataMap[n.uid],o&&(this._removeShapeConnections(o),this._removeItem(o,!1),delete this._dataMap[n.uid],e&&n.hasChildren&&n.loaded()))for(i=n.children.data(),r=0;i.length>r;r++)t.push(i[r])},_removeShapeConnections:function(t){var e,n=t.connections();if(n)for(e=0;n.length>e;e++)this._removeItem(n[e],!1)},_addDataItem:function(t,e){var n,i;if(ft(t))return(n=this._dataMap[t.id])?n:(i=R({},this.options.shapeDefaults),i.dataItem=t,n=new w(i,this),this.addShape(n,e!==!1),this._dataMap[t.id]=n,n)},_addDataItemByUid:function(t){var e,n;if(ft(t))return(e=this._dataMap[t.uid])?e:(n=R({},this.options.shapeDefaults),n.dataItem=t,e=new w(n,this),this.addShape(e),this._dataMap[t.uid]=e,e)},_addDataItems:function(t,e){var n,i,o,r,s;for(i=0;t.length>i;i++)n=t[i],o=this._addDataItemByUid(n),r=this._addDataItemByUid(e),r&&!this.connected(r,o)&&(s=this.connect(r,o))},_refreshSource:function(t){var e,n,i=this,o=t.node,r=t.action,s=t.items,a=i.options;if(!t.field){if("remove"==r)this._removeDataItems(t.items,!0);else for(r&&"itemloaded"!==r||this._bindingRoots||(this._bindingRoots=!0,n=!0),r||o||i.clear(),this._addDataItems(s,o),e=0;s.length>e;e++)s[e].load();a.layout&&(n||"remove"==r||"add"==r)&&i.layout(a.layout),n&&(this.trigger("dataBound"),this._bindingRoots=!1)}},_mouseDown:function(t){var e=this._calculatePosition(t);1==t.which&&this.toolService.start(e,this._meta(t))&&(this._destroyToolBar(),t.preventDefault())},_addItem:function(t){t instanceof w?this.addShape(t):t instanceof x&&this.addConnection(t)},_mouseUp:function(t){var e=this._calculatePosition(t);1==t.which&&this.toolService.end(e,this._meta(t))&&(this._createToolBar(),t.preventDefault())},_createToolBar:function(){var t,e,n,i,o,r,s,a,l,c=this.toolService.diagram;this.singleToolBar||1!==c.select().length||(t=c.select()[0],t&&t.options.editable!==!1&&(e=t.options.editable,n=e.tools,this._isEditable&&0===n.length&&(t instanceof w?n=["edit","rotateClockwise","rotateAnticlockwise"]:t instanceof x&&(n=["edit"]),e&&e.remove!==!1&&n.push("delete")),n&&n.length&&(i=20,this.singleToolBar=new k(c,{tools:n,click:L(this._toolBarClick,this),modal:!0}),r=this.singleToolBar._popup.element.outerWidth(),s=this.singleToolBar._popup.element.outerHeight(),t instanceof w?(a=this.modelToView(t.bounds(ee)),o=Q(a.x,a.y).minus(Q((r-a.width)/2,s+i))):t instanceof x&&(l=this.modelToView(t.bounds()),o=Q(l.x,l.y).minus(Q((r-l.width-20)/2,s+i))),o?(this.canvas.translate||(o=o.minus(Q(this.scroller.scrollLeft,this.scroller.scrollTop))),o=this.viewToDocument(o),o=Q(yt.max(o.x,0),yt.max(o.y,0)),this.singleToolBar.showAt(o)):this._destroyToolBar())))},_toolBarClick:function(t){this.trigger("toolBarClick",t),this._destroyToolBar()},_mouseMove:function(t){if(!this.pauseMouseHandlers){var e=this._calculatePosition(t);0!==t.which&&1!=t.which||!this.toolService.move(e,this._meta(t))||t.preventDefault()}},_keydown:function(t){this.toolService.keyDown(t.keyCode,this._meta(t))&&t.preventDefault()},_wheel:function(t){var e=n(t),i=this._calculatePosition(t),o=R(this._meta(t),{delta:e});this.toolService.wheel(i,o)&&t.preventDefault()},_meta:function(t){return{ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,shiftKey:t.shiftKey}},_calculatePosition:function(t){var n=t.pageX===e?t.originalEvent:t,i=new Q(n.pageX,n.pageY),o=this.documentToModel(i);return o},_normalizePointZoom:function(t){return t.times(1/this.zoom())},_initialize:function(){this.shapes=[],this._selectedItems=[],this.connections=[],this._dataMap={},this._connectionsDataMap={},this._inactiveShapeItems=new h,this._deferredConnectionUpdates=[],this.undoRedoService=new J({undone:this._syncHandler,redone:this._syncHandler}),this.id=B.randomId()},_fetchFreshData:function(){var t=this;t._dataSource(),t._isEditable&&t._connectionDataSource(),t.options.autoBind&&(t._isEditable?(this._loadingShapes=!0,this._loadingConnections=!0,t.dataSource.fetch(),t.connectionsDataSource.fetch()):t.dataSource.fetch())},_dataSource:function(){var t,e;ft(this.options.connectionsDataSource)?(this._isEditable=!0,t=this.options.dataSource||{},e=pt(t)?{data:t}:t,this.dataSource&&this._shapesRefreshHandler?this.dataSource.unbind("change",this._shapesRefreshHandler).unbind("requestStart",this._shapesRequestStartHandler).unbind("error",this._shapesErrorHandler):(this._shapesRefreshHandler=L(this._refreshShapes,this),this._shapesRequestStartHandler=L(this._shapesRequestStart,this),this._shapesErrorHandler=L(this._error,this)),this.dataSource=kendo.data.DataSource.create(e).bind("change",this._shapesRefreshHandler).bind("requestStart",this._shapesRequestStartHandler).bind("error",this._shapesErrorHandler)):(this._treeDataSource(),this._isEditable=!1)},_connectionDataSource:function(){var t,e=this.options.connectionsDataSource;e&&(t=pt(e)?{data:e}:e,this.connectionsDataSource&&this._connectionsRefreshHandler?this.connectionsDataSource.unbind("change",this._connectionsRefreshHandler).unbind("requestStart",this._connectionsRequestStartHandler).unbind("error",this._connectionsErrorHandler):(this._connectionsRefreshHandler=L(this._refreshConnections,this),this._connectionsRequestStartHandler=L(this._connectionsRequestStart,this),this._connectionsErrorHandler=L(this._connectionsError,this)),this.connectionsDataSource=kendo.data.DataSource.create(t).bind("change",this._connectionsRefreshHandler).bind("requestStart",this._connectionsRequestStartHandler).bind("error",this._connectionsErrorHandler))},_shapesRequestStart:function(t){"read"==t.type&&(this._loadingShapes=!0)},_connectionsRequestStart:function(t){"read"==t.type&&(this._loadingConnections=!0)},_error:function(){this._loadingShapes=!1},_connectionsError:function(){this._loadingConnections=!1},_refreshShapes:function(t){"remove"===t.action?this._shouldRefresh()&&this._removeShapes(t.items):"itemchange"===t.action?this._shouldRefresh()&&this._updateShapes(t.items,t.field):"add"===t.action?this._inactiveShapeItems.add(t.items):"sync"===t.action?this._syncShapes(t.items):this.refresh()},_shouldRefresh:function(){return!this._suspended},_suspendModelRefresh:function(){this._suspended=(this._suspended||0)+1},_resumeModelRefresh:function(){this._suspended=yt.max((this._suspended||0)-1,0)},refresh:function(){this._loadingShapes=!1,this._loadingConnections||this._rebindShapesAndConnections()},_rebindShapesAndConnections:function(){this.clear(),this._addShapes(this.dataSource.view()),this.connectionsDataSource&&this._addConnections(this.connectionsDataSource.view(),!1),this.options.layout?this.layout(this.options.layout):this._redrawConnections(),this.trigger("dataBound")},refreshConnections:function(){this._loadingConnections=!1,this._loadingShapes||this._rebindShapesAndConnections()},_redrawConnections:function(){var t,e=this.connections;for(t=0;e.length>t;t++)e[t].refresh()},_removeShapes:function(t){var e,n,i=this._dataMap;for(n=0;t.length>n;n++)e=t[n],i[e.id]&&(this.remove(i[e.id],!1),i[e.id]=null)},_syncShapes:function(){var t=this,e=t._inactiveShapeItems;e.forEach(function(n){var i=n.dataItem,o=n.element;i.isNew()||(o?(o._setOptionsFromModel(),t.addShape(o,n.undoable),t._dataMap[i.id]=o):t._addDataItem(i),n.activate(),e.remove(i))})},_updateShapes:function(t,e){var n,i,o;for(n=0;t.length>n;n++)i=t[n],o=this._dataMap[i.id],o&&o.updateOptionsFromModel(i,e)},_addShapes:function(t){for(var e=0;t.length>e;e++)this._addDataItem(t[e],!1)},_refreshConnections:function(t){"remove"===t.action?this._shouldRefresh()&&this._removeConnections(t.items):"add"===t.action?this._addConnections(t.items):"sync"===t.action||("itemchange"===t.action?this._shouldRefresh()&&this._updateConnections(t.items):this.refreshConnections());
},_removeConnections:function(t){for(var e=0;t.length>e;e++)this.remove(this._connectionsDataMap[t[e].uid],!1),this._connectionsDataMap[t[e].uid]=null},_updateConnections:function(t){var e,n,i;for(e=0;t.length>e;e++)n=t[e],i=this._connectionsDataMap[n.uid],i.updateOptionsFromModel(n)},_addConnections:function(t,e){var n,i,o=t.length;for(n=0;o>n;n++)i=t[n],this._addConnectionDataItem(i,e)},_addConnectionDataItem:function(t,e){var n,i,o,r;this._connectionsDataMap[t.uid]||(n=this._validateConnector(t.from),ft(n)&&null!==n||(n=new Q(t.fromX,t.fromY)),i=this._validateConnector(t.to),ft(i)&&null!==i||(i=new Q(t.toX,t.toY)),ft(n)&&ft(i)&&(o=R({},this.options.connectionDefaults),o.dataItem=t,r=new x(n,i,o),this._connectionsDataMap[t.uid]=r,this.addConnection(r,e)))},_validateConnector:function(t){var e;return ft(t)&&null!==t&&(e=this._dataMap[t]),e},_treeDataSource:function(){var t=this,e=t.options,n=e.dataSource;n=pt(n)?{data:n}:n,n.fields||(n.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),t.dataSource&&t._refreshHandler&&t._unbindDataSource(),t._refreshHandler=L(t._refreshSource,t),t._errorHandler=L(t._error,t),t.dataSource=F.create(n).bind(bt,t._refreshHandler).bind(Pt,t._errorHandler)},_unbindDataSource:function(){var t=this;t.dataSource.unbind(bt,t._refreshHandler).unbind(Pt,t._errorHandler)},_adorn:function(t,n){n!==e&&t&&(n?(this._adorners.push(t),this.adornerLayer.append(t.visual)):(rt.remove(this._adorners,t),this.adornerLayer.remove(t.visual)))},_showConnectors:function(t,e){e?this._connectorsAdorner.show(t):this._connectorsAdorner.destroy()},_updateAdorners:function(){var t,e,n=this._adorners;for(t=0;n.length>t;t++)e=n[t],e.refreshBounds&&e.refreshBounds(),e.refresh()},_refresh:function(){for(var t=0;this.connections.length>t;t++)this.connections[t].refresh()},_destroyToolBar:function(){this.singleToolBar&&(this.singleToolBar.hide(),this.singleToolBar.destroy(),this.singleToolBar=null)},_destroyGlobalToolBar:function(){this.toolBar&&(this.toolBar.hide(),this.toolBar.destroy(),this.toolBar=null)},exportDOMVisual:function(){var t=this.canvas._viewBox,e=E.transform().translate(-t.x,-t.y),n=new E.Rect([0,0],[t.width,t.height]),i=M.Path.fromRect(n),o=new M.Group({transform:e}),r=new M.Group({clip:i}),s=this.canvas.drawingElement.children[0];return r.append(o),o.children.push(s),r},exportVisual:function(){var t=E.transform().scale(1/this._zoom),e=new M.Group({transform:t}),n=this.mainLayer.drawingElement;return e.children.push(n),e},_syncChanges:function(){this._syncShapeChanges(),this._syncConnectionChanges()},_syncShapeChanges:function(){this.dataSource&&this._isEditable&&this.dataSource.sync()},_syncConnectionChanges:function(){var e=this;e.connectionsDataSource&&e._isEditable&&(t.when.apply(t,e._deferredConnectionUpdates).then(function(){e.connectionsDataSource.sync()}),e.deferredConnectionUpdates=[])}}),P.ExportMixin.extend(b.fn,!0),kendo.PDFMixin&&kendo.PDFMixin.extend(b.fn),k=kendo.Observable.extend({init:function(t,e){kendo.Observable.fn.init.call(this),this.diagram=t,this.options=R({},this.options,e),this._tools=[],this.createToolBar(),this.createTools(),this.appendTools(),this.options.modal&&this.createPopup(),this.bind(this.events,e)},events:["click"],createPopup:function(){this.container=t("<div/>").append(this.element),this._popup=this.container.kendoPopup({}).getKendoPopup()},appendTools:function(){var t,e;for(t=0;this._tools.length>t;t++)e=this._tools[t],(e.buttons&&e.buttons.length||!ft(e.buttons))&&this._toolBar.add(e)},createToolBar:function(){this.element=t("<div/>"),this._toolBar=this.element.kendoToolBar({click:L(this.click,this),resizable:!1}).getKendoToolBar(),this.element.css("border","none")},createTools:function(){for(var t=0;this.options.tools.length>t;t++)this.createTool(this.options.tools[t])},createTool:function(t){var e=(vt(t)?t.name:t)+"Tool";this[e]?this[e](t):this._tools.push(t)},showAt:function(t){this._popup&&this._popup.open(t.x,t.y)},hide:function(){this._popup&&this._popup.close()},newGroup:function(){return{type:"buttonGroup",buttons:[]}},editTool:function(){this._tools.push({spriteCssClass:"k-icon k-i-pencil",showText:"overflow",type:"button",text:"Edit",attributes:this._setAttributes({action:"edit"})})},deleteTool:function(){this._tools.push({spriteCssClass:"k-icon k-i-close",showText:"overflow",type:"button",text:"Delete",attributes:this._setAttributes({action:"delete"})})},rotateAnticlockwiseTool:function(t){this._appendGroup("rotate"),this._rotateGroup.buttons.push({spriteCssClass:"k-icon k-i-rotateccw",showText:"overflow",text:"RotateAnticlockwise",group:"rotate",attributes:this._setAttributes({action:"rotateAnticlockwise",step:t.step})})},rotateClockwiseTool:function(t){this._appendGroup("rotate"),this._rotateGroup.buttons.push({spriteCssClass:"k-icon k-i-rotatecw",attributes:this._setAttributes({action:"rotateClockwise",step:t.step}),showText:"overflow",text:"RotateClockwise",group:"rotate"})},createShapeTool:function(){this._appendGroup("create"),this._createGroup.buttons.push({spriteCssClass:"k-icon k-i-shape",showText:"overflow",text:"CreateShape",group:"create",attributes:this._setAttributes({action:"createShape"})})},createConnectionTool:function(){this._appendGroup("create"),this._createGroup.buttons.push({spriteCssClass:"k-icon k-i-connector",showText:"overflow",text:"CreateConnection",group:"create",attributes:this._setAttributes({action:"createConnection"})})},undoTool:function(){this._appendGroup("history"),this._historyGroup.buttons.push({spriteCssClass:"k-icon k-i-undo",showText:"overflow",text:"Undo",group:"history",attributes:this._setAttributes({action:"undo"})})},redoTool:function(){this._appendGroup("history"),this._historyGroup.buttons.push({spriteCssClass:"k-icon k-i-redo",showText:"overflow",text:"Redo",group:"history",attributes:this._setAttributes({action:"redo"})})},_appendGroup:function(t){var e="_"+t+"Group";this[e]||(this[e]=this.newGroup(),this._tools.push(this[e]))},_setAttributes:function(t){var e={};return t.action&&(e[kendo.attr("action")]=t.action),t.step&&(e[kendo.attr("step")]=t.step),e},_getAttributes:function(t){var e,n={},i=t.attr(kendo.attr("action"));return i&&(n.action=i),e=t.attr(kendo.attr("step")),e&&(n.step=e),n},click:function(e){var n=this._getAttributes(t(e.target)),i=n.action;i&&this[i](n),this.trigger("click",this.eventData(i))},eventData:function(t){var e=this.selectedElements(),n=[],i=[];return e instanceof w?n.push(e):i.push(e),{shapes:n,connections:i,action:t}},"delete":function(){var t=this.diagram,e=t._triggerRemove(this.selectedElements());e.length&&(this.diagram.remove(e,!0),this.diagram._syncChanges())},edit:function(){this.diagram.edit(this.selectedElements()[0])},rotateClockwise:function(t){var e=parseFloat(t.step||90);this._rotate(e)},rotateAnticlockwise:function(t){var e=parseFloat(t.step||90);this._rotate(-e)},_rotate:function(t){var e=this.diagram._resizingAdorner;e.angle(e.angle()+t),e.rotate()},selectedElements:function(){return this.diagram.select()},createShape:function(){this.diagram.createShape()},createConnection:function(){this.diagram.createConnection()},undo:function(){this.diagram.undo()},redo:function(){this.diagram.redo()},destroy:function(){this.diagram=null,this.element=null,this.options=null,this._toolBar&&this._toolBar.destroy(),this._popup&&this._popup.destroy()}}),C=kendo.Observable.extend({init:function(t,e){kendo.Observable.fn.init.call(this),this.options=O(!0,{},this.options,e),this.element=t,this.model=this.options.model,this.fields=this._getFields(),this._initContainer(),this.createEditable()},options:{editors:{}},_initContainer:function(){this.wrapper=this.element},createEditable:function(){var t=this.options;this.editable=new kendo.ui.Editable(this.wrapper,{fields:this.fields,target:t.target,clearContainer:!1,model:this.model})},_isEditable:function(t){return this.model.editable&&this.model.editable(t)},_getFields:function(){var t,e,n,i=[],o=this.model.fields;for(t in o)e={},this._isEditable(t)&&(n=this.options.editors[t],n&&(e.editor=n),e.field=t,i.push(e));return i},end:function(){return this.editable.end()},destroy:function(){this.editable.destroy(),this.editable.element.find("["+kendo.attr("container-for")+"]").empty(),this.model=this.wrapper=this.element=this.columns=this.editable=null}}),S=C.extend({init:function(t,e){C.fn.init.call(this,t,e),this.bind(this.events,this.options),this.open()},events:["update","cancel"],options:{window:{modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1}},_initContainer:function(){var e,n=this;this.wrapper=t('<div class="k-popup-edit-form"/>').attr(kendo.attr("uid"),this.model.uid),e="",this.options.template?(e+=this._renderTemplate(),this.fields=[]):e+=this._renderFields(),e+=this._renderButtons(),this.wrapper.append(t('<div class="k-edit-form-container"/>').append(e)),this.window=new kendo.ui.Window(this.wrapper.appendTo(this.element),this.options.window),this.window.bind("close",function(t){t.userTriggered&&(t.sender.element.focus(),n._cancelClick(t))}),this._attachButtonEvents()},_renderTemplate:function(){var t=this.options.template;return"string"==typeof t&&(t=window.unescape(t)),t=kendo.template(t)(this.model)},_renderFields:function(){var t,e,n="";for(t=0;this.fields.length>t;t++)e=this.fields[t],n+='<div class="k-edit-label"><label for="'+e.field+'">'+(e.field||"")+"</label></div>",this._isEditable(e.field)&&(n+="<div "+kendo.attr("container-for")+'="'+e.field+'" class="k-edit-field"></div>');return n},_renderButtons:function(){var t='<div class="k-edit-buttons k-state-default">';return t+=this._createButton("update"),t+=this._createButton("cancel"),t+="</div>"},_createButton:function(t){return kendo.template(he)(v[t])},_attachButtonEvents:function(){this._cancelClickHandler=L(this._cancelClick,this),this.window.element.on(kt+_t,"a.k-diagram-cancel",this._cancelClickHandler),this._updateClickHandler=L(this._updateClick,this),this.window.element.on(kt+_t,"a.k-diagram-update",this._updateClickHandler)},_updateClick:function(t){t.preventDefault(),this.trigger("update")},_cancelClick:function(t){t.preventDefault(),this.trigger("cancel")},open:function(){this.window.center().open()},close:function(){this.window.bind("deactivate",L(this.destroy,this)).close()},destroy:function(){this.window.close().destroy(),this.window.element.off(kt+_t,"a.k-diagram-cancel",this._cancelClickHandler),this.window.element.off(kt+_t,"a.k-diagram-update",this._updateClickHandler),this._cancelClickHandler=null,this._editUpdateClickHandler=null,this.window=null,C.fn.destroy.call(this)}}),c.fn=c.prototype={onActivate:function(e){var n=t.Deferred();return this.callbacks.push({callback:e,deferred:n}),n},activate:function(){var t,e,n=this.callbacks;for(e=0;n.length>e;e++)t=this.callbacks[e],t.callback(this.dataItem),t.deferred.resolve();this.callbacks=[]}},h.fn=h.prototype={add:function(t){for(var e=0;t.length>e;e++)this.items[t[e].uid]=new c(t[e])},forEach:function(t){for(var e in this.items)t(this.items[e])},getByUid:function(t){return this.items[t]},remove:function(t){delete this.items[t.uid]}},T=z.extend({init:function(){this.shapes=[]},_add:function(t,e){this.shapes.push({bounds:e,shape:t}),t._quadNode=this},insert:function(t,e){this._add(t,e)},remove:function(t){var e,n=this.shapes,i=n.length;for(e=0;i>e;e++)if(n[e].shape===t){n.splice(e,1);break}},hitTestRect:function(t){var e,n=this.shapes,i=n.length;for(e=0;i>e;e++)if(this._testRect(n[e].shape,t))return!0},_testRect:function(t,e){var n,i=t.rotate().angle,o=t.bounds();return n=i?K.rects(e,o,-i):o.overlaps(e)}}),A=T.extend({init:function(t){T.fn.init.call(this),this.children=[],this.rect=t},inBounds:function(t){var e=this.rect,n=e.bottomRight(),i=t.bottomRight(),o=t.x>=e.x&&t.y>=e.y&&n.x>=i.x&&n.y>=i.y;return o},overlapsBounds:function(t){return this.rect.overlaps(t)},insert:function(t,e){var n,i=!1,o=this.children,r=o.length;if(this.inBounds(e)){if(!r&&4>this.shapes.length)this._add(t,e);else{for(r||this._initChildren(),n=0;o.length>n;n++)if(o[n].insert(t,e)){i=!0;break}i||this._add(t,e)}i=!0}return i},_initChildren:function(){var t,e,n=this.rect,i=this.children,o=this.shapes,r=n.center(),s=n.width/2,a=n.height/2;for(i.push(new A(new G(n.x,n.y,s,a)),new A(new G(r.x,n.y,s,a)),new A(new G(n.x,r.y,s,a)),new A(new G(r.x,r.y,s,a))),e=o.length-1;e>=0;e--)for(t=0;i.length>t;t++)if(i[t].insert(o[e].shape,o[e].bounds)){o.splice(e,1);break}},hitTestRect:function(t){var e,n=this.children,i=n.length,o=!1;if(this.overlapsBounds(t))if(T.fn.hitTestRect.call(this,t))o=!0;else for(e=0;i>e;e++)if(n[e].hitTestRect(t)){o=!0;break}return o}}),D=z.extend({ROOT_SIZE:1e3,init:function(t){var e=L(this._boundsChange,this);t.bind(xt,e),t.bind(Ot,e),this.initRoots()},initRoots:function(){this.rootMap={},this.root=new T},clear:function(){this.initRoots()},_boundsChange:function(t){t.item._quadNode&&t.item._quadNode.remove(t.item),this.insert(t.item)},insert:function(t){var e=t.bounds(ee),n=this.ROOT_SIZE,i=this.getSectors(e),o=i[0][0],r=i[1][0];this.inRoot(i)?this.root.insert(t,e):(this.rootMap[o]||(this.rootMap[o]={}),this.rootMap[o][r]||(this.rootMap[o][r]=new A(new G(o*n,r*n,n,n))),this.rootMap[o][r].insert(t,e))},remove:function(t){t._quadNode&&t._quadNode.remove(t)},inRoot:function(t){return t[0].length>1||t[1].length>1},getSectors:function(t){var e,n,i=this.ROOT_SIZE,o=t.bottomRight(),r=yt.floor(o.x/i),s=yt.floor(o.y/i),a=[[],[]];for(e=yt.floor(t.x/i);r>=e;e++)a[0].push(e);for(n=yt.floor(t.y/i);s>=n;n++)a[1].push(n);return a},hitTestRect:function(t){var e,n,i,o,r,s=this.getSectors(t);if(this.root.hitTestRect(t))return!0;for(e=0;s[0].length>e;e++)for(i=s[0][e],n=0;s[1].length>n;n++)if(o=s[1][n],r=(this.rootMap[i]||{})[o],r&&r.hitTestRect(t))return!0;return!1}}),P.ui.plugin(b),R(B,{Shape:w,Connection:x,Connector:_,DiagramToolBar:k,QuadNode:A,QuadRoot:T,ShapesQuadTree:D,PopupEditor:S})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.diagram.min",["kendo.data.min","kendo.draganddrop.min","kendo.userevents.min","kendo.mobile.scroller.min","kendo.drawing.min","dataviz/diagram/utils.min","dataviz/diagram/math.min","dataviz/diagram/svg.min","dataviz/diagram/services.min","dataviz/diagram/layout.min","dataviz/diagram/dom.min"],t)}(function(){},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.treemap.min",["kendo.data.min","kendo.userevents.min","kendo.dataviz.themes.min"],t)}(function(){return function(t,e){function n(t,e){if(null===e)return e;var n=b(t,!0);return n(e)}function i(t){return typeof t!==E}function o(t,e,n){var i,o,l=a(t),c=a(e),h=u(t)-u(e)<0,d=[];for(d.push(t),i=0;n>i;i++)o={r:r(l.r,c.r,i,n,h),g:r(l.g,c.g,i,n,h),b:r(l.b,c.b,i,n,h)},d.push(s(o));return d.push(e),d}function r(t,e,n,i,o){var r,s=f.min(f.abs(t),f.abs(e)),a=f.max(f.abs(t),f.abs(e)),l=(a-s)/(i+1),c=l*(n+1);return r=o?s+c:a-c}function s(t){return"#"+l(t.r)+l(t.g)+l(t.b)}function a(t){t=t.replace("#","");var e=c(t);return{r:h(e.r),g:h(e.g),b:h(e.b)}}function l(t){var e=f.round(t).toString(16).toUpperCase();return 1===e.length&&(e="0"+e),e}function c(t){var e=t.length,n={};return 3===e?(n.r=t[0],n.g=t[1],n.b=t[2]):(n.r=t.substring(0,2),n.g=t.substring(2,4),n.b=t.substring(4,6)),n}function h(t){return parseInt(t.toString(16),16)}function u(t){var e=0;return t&&(t=a(t),e=f.sqrt(.241*t.r*t.r+.691*t.g*t.g+.068*t.b*t.b)),e}function d(t){var e=f.pow(10,4);return f.round(t*e)/e}var f=Math,p=t.proxy,g=t.isArray,m=window.kendo,v=m.Class,y=m.ui.Widget,_=m.template,w=m.deepExtend,x=m.data.HierarchicalDataSource,b=m.getter,k=m.dataviz,C=".kendoTreeMap",S="change",T="dataBound",A="itemCreated",D=Number.MAX_VALUE,P="mouseover"+C,M="mouseleave"+C,E="undefined",B=y.extend({init:function(e,n){m.destroy(e),t(e).empty(),y.fn.init.call(this,e,n),this.wrapper=this.element,this._initTheme(this.options),this.element.addClass("k-widget k-treemap"),this._setLayout(),this._originalOptions=w({},this.options),this._initDataSource(),this._attachEvents(),m.notify(this,k.ui)},options:{name:"TreeMap",theme:"default",autoBind:!0,textField:"text",valueField:"value",colorField:"color"},events:[T,A],_initTheme:function(t){var e=this,n=k.ui.themes||{},i=((t||{}).theme||"").toLowerCase(),o=(n[i]||{}).treeMap;e.options=w({},o,t)},_attachEvents:function(){this.element.on(P,p(this._mouseover,this)).on(M,p(this._mouseleave,this)),this._resizeHandler=p(this.resize,this,!1),m.onResize(this._resizeHandler)},_setLayout:function(){"horizontal"===this.options.type?(this._layout=new L(!1),this._view=new R(this,this.options)):"vertical"===this.options.type?(this._layout=new L(!0),this._view=new R(this,this.options)):(this._layout=new I,this._view=new z(this,this.options))},_initDataSource:function(){var t=this,e=t.options,n=e.dataSource;t._dataChangeHandler=p(t._onDataChange,t),t.dataSource=x.create(n).bind(S,t._dataChangeHandler),n&&t.options.autoBind&&t.dataSource.fetch()},setDataSource:function(t){var e=this;e.dataSource.unbind(S,e._dataChangeHandler),e.dataSource=t.bind(S,e._dataChangeHandler),t&&e.options.autoBind&&e.dataSource.fetch()},_onDataChange:function(t){var e,n,i,o,r=t.node,s=t.items,a=this.options;if(r){if(s.length){for(i=this._getByUid(r.uid),i.children=[],s=new m.data.Query(s)._sortForGrouping(a.valueField,"desc"),n=0;s.length>n;n++)e=s[n],i.children.push(this._wrapItem(e));o=this._view.htmlSize(i),this._layout.compute(i.children,i.coord,o),this._setColors(i.children),this._view.render(i)}}else this._cleanItems(),this.element.empty(),e=this._wrapItem(s[0]),this._layout.createRoot(e,this.element.outerWidth(),this.element.outerHeight(),"vertical"===this.options.type),this._view.createRoot(e),this._root=e,this._colorIdx=0;for(n=0;s.length>n;n++)s[n].load();r&&this.trigger(T,{node:r})},_cleanItems:function(){var t=this;t.angular("cleanup",function(){return{elements:t.element.find(".k-leaf div,.k-treemap-title,.k-treemap-title-vertical")}})},_setColors:function(t){var e,n,r,s,a=this.options.colors,l=this._colorIdx,c=a[l%a.length];for(g(c)&&(e=o(c[0],c[1],t.length)),r=!1,s=0;t.length>s;s++)n=t[s],i(n.color)||(n.color=e?e[s]:c),n.dataItem.hasChildren||(r=!0);r&&this._colorIdx++},_contentSize:function(t){this.view.renderHeight(t)},_wrapItem:function(t){var e={};return i(this.options.valueField)&&(e.value=n(this.options.valueField,t)),i(this.options.colorField)&&(e.color=n(this.options.colorField,t)),i(this.options.textField)&&(e.text=n(this.options.textField,t)),e.level=t.level(),e.dataItem=t,e},_getByUid:function(t){for(var e,n=[this._root];n.length;){if(e=n.pop(),e.dataItem.uid===t)return e;e.children&&(n=n.concat(e.children))}},dataItem:function(e){var n=t(e).attr(m.attr("uid")),i=this.dataSource;return i&&i.getByUid(n)},findByUid:function(t){return this.element.find(".k-treemap-tile["+m.attr("uid")+"='"+t+"']")},_mouseover:function(e){var n=t(e.target);n.hasClass("k-leaf")&&(this._removeActiveState(),n.removeClass("k-state-hover").addClass("k-state-hover"))},_removeActiveState:function(){this.element.find(".k-state-hover").removeClass("k-state-hover")},_mouseleave:function(){this._removeActiveState()},destroy:function(){y.fn.destroy.call(this),this.element.off(C),this.dataSource&&this.dataSource.unbind(S,this._dataChangeHandler),this._root=null,m.unbindResize(this._resizeHandler),m.destroy(this.element)},items:function(){return t()},getSize:function(){return m.dimensions(this.element)},_resize:function(){var t,e,n=this._root;n&&(t=this.element,e=t.children(),n.coord.width=t.outerWidth(),n.coord.height=t.outerHeight(),e.css({width:n.coord.width,height:n.coord.height}),this._resizeItems(n,e))},_resizeItems:function(t,e){var n,i,o,r;if(t.children&&t.children.length)for(n=e.children(".k-treemap-wrap").children(),this._layout.compute(t.children,t.coord,{text:this._view.titleSize(t,e)}),r=0;t.children.length>r;r++)i=t.children[r],o=n.filter("["+m.attr("uid")+"='"+i.dataItem.uid+"']"),this._view.setItemSize(i,o),this._resizeItems(i,o)},setOptions:function(t){var n=t.dataSource;t.dataSource=e,this._originalOptions=w(this._originalOptions,t),this.options=w({},this._originalOptions),this._setLayout(),this._initTheme(this.options),y.fn._setEvents.call(this,t),n&&this.setDataSource(x.create(n)),this.options.autoBind&&this.dataSource.fetch()}}),I=v.extend({createRoot:function(t,e,n){t.coord={width:e,height:n,top:0,left:0}},leaf:function(t){return!t.children},layoutChildren:function(t,e){var n,i,o,r,s=e.width*e.height,a=0,l=[];for(n=0;t.length>n;n++)l[n]=parseFloat(t[n].value),a+=l[n];for(n=0;l.length>n;n++)t[n].area=s*l[n]/a;i=this.layoutHorizontal()?e.height:e.width,o=[t[0]],r=t.slice(1),this.squarify(r,o,i,e)},squarify:function(t,e,n,i){this.computeDim(t,e,n,i)},computeDim:function(t,n,i,o){var r,s,a;return t.length+n.length==1?(r=1==t.length?t:n,this.layoutLast(r,i,o),e):(t.length>=2&&0===n.length&&(n=[t[0]],t=t.slice(1)),0===t.length?(n.length>0&&this.layoutRow(n,i,o),e):(s=t[0],this.worstAspectRatio(n,i)>=this.worstAspectRatio([s].concat(n),i)?this.computeDim(t.slice(1),n.concat([s]),i,o):(a=this.layoutRow(n,i,o),this.computeDim(t,[],a.dim,a)),e))},layoutLast:function(t,e,n){t[0].coord=n},layoutRow:function(t,e,n){return this.layoutHorizontal()?this.layoutV(t,e,n):this.layoutH(t,e,n)},orientation:"h",layoutVertical:function(){return"v"===this.orientation},layoutHorizontal:function(){return"h"===this.orientation},layoutChange:function(){this.orientation=this.layoutVertical()?"h":"v"},worstAspectRatio:function(t,e){var n,i,o,r,s;if(!t||0===t.length)return D;for(n=0,i=0,o=D,r=0;t.length>r;r++)s=t[r].area,n+=s,o=s>o?o:s,i=i>s?i:s;return f.max(e*e*i/(n*n),n*n/(e*e*o))},compute:function(t,e,n){if(e.width>=e.height&&this.layoutHorizontal()||this.layoutChange(),t&&t.length>0){var i={width:e.width,height:e.height-n.text,top:0,left:0};this.layoutChildren(t,i)}},layoutV:function(t,e,n){var i,o,r,s=this._totalArea(t),a=0;for(e=d(s/e),i=0;t.length>i;i++)o=d(t[i].area/e),t[i].coord={height:o,width:e,top:n.top+a,left:n.left},a+=o;return r={height:n.height,width:n.width-e,top:n.top,left:n.left+e},r.dim=f.min(r.width,r.height),r.dim!=r.height&&this.layoutChange(),r},layoutH:function(t,e,n){var i,o,r=this._totalArea(t),s=d(r/e),a=n.top,l=0;for(i=0;t.length>i;i++)t[i].coord={height:s,width:d(t[i].area/s),top:a,left:n.left+l},l+=t[i].coord.width;return o={height:n.height-s,width:n.width,top:n.top+s,left:n.left},o.dim=f.min(o.width,o.height),o.dim!=o.width&&this.layoutChange(),o},_totalArea:function(t){var e,n=0;for(e=0;t.length>e;e++)n+=t[e].area;return n}}),z=v.extend({init:function(e,n){this.options=w({},this.options,n),this.treeMap=e,this.element=t(e.element),this.offset=0},titleSize:function(t,e){var n=e.children(".k-treemap-title");return n.height()},htmlSize:function(t){var e,n,i=this._getByUid(t.dataItem.uid),o={text:0};return t.children&&(this._clean(i),e=this._getText(t),e&&(n=this._createTitle(t),i.append(n),this._compile(n,t.dataItem),o.text=n.height()),i.append(this._createWrap()),this.offset=(i.outerWidth()-i.innerWidth())/2),o},_compile:function(t,e){this.treeMap.angular("compile",function(){return{elements:t,data:[{dataItem:e}]}})},_getByUid:function(t){return this.element.find(".k-treemap-tile["+m.attr("uid")+"='"+t+"']")},render:function(t){var e,n,i,o,r=this._getByUid(t.dataItem.uid),s=t.children;if(s)for(e=r.find(".k-treemap-wrap"),n=0;s.length>n;n++)i=s[n],o=this._createLeaf(i),e.append(o),this._compile(o.children(),i.dataItem),this.treeMap.trigger(A,{element:o})},createRoot:function(t){var e=this._createLeaf(t);this.element.append(e),this._compile(e.children(),t.dataItem),this.treeMap.trigger(A,{element:e})},_clean:function(t){this.treeMap.angular("cleanup",function(){return{elements:t.children(":not(.k-treemap-wrap)")}}),t.css("background-color",""),t.removeClass("k-leaf"),t.removeClass("k-inverse"),t.empty()},_createLeaf:function(e){return this._createTile(e).css("background-color",e.color).addClass("k-leaf").toggleClass("k-inverse",this._tileColorBrightness(e)>180).append(t("<div></div>").html(this._getText(e)))},_createTile:function(e){var n=t("<div class='k-treemap-tile'></div>");return this.setItemSize(e,n),i(e.dataItem)&&i(e.dataItem.uid)&&n.attr(m.attr("uid"),e.dataItem.uid),n},_itemCoordinates:function(t){var e={width:t.coord.width,height:t.coord.height,left:t.coord.left,top:t.coord.top};return e.width+=e.left&&this.offset?2*this.offset:this.offset,e.height+=e.top?2*this.offset:this.offset,e},setItemSize:function(t,e){var n=this._itemCoordinates(t);e.css({width:n.width,height:n.height,left:n.left,top:n.top})},_getText:function(t){var e=t.text;return this.options.template&&(e=this._renderTemplate(t)),e},_renderTemplate:function(t){var e=_(this.options.template);return e({dataItem:t.dataItem,text:t.text})},_createTitle:function(e){return t("<div class='k-treemap-title'></div>").append(t("<div></div>").html(this._getText(e)))},_createWrap:function(){return t("<div class='k-treemap-wrap'></div>")},_tileColorBrightness:function(t){return u(t.color)}}),L=v.extend({createRoot:function(t,e,n,i){t.coord={width:e,height:n,top:0,left:0},t.vertical=i},init:function(t){this.vertical=t,this.quotient=t?1:0},compute:function(t,e,n){var i,o,r;t.length>0&&(i=e.width,o=e.height,this.vertical?o-=n.text:i-=n.text,r={width:i,height:o,top:0,left:0},this.layoutChildren(t,r))},layoutChildren:function(t,e){var n,i,o=e.width*e.height,r=0,s=[];for(n=0;t.length>n;n++)i=t[n],s[n]=parseFloat(t[n].value),r+=s[n],i.vertical=this.vertical;for(n=0;s.length>n;n++)t[n].area=o*s[n]/r;this.sliceAndDice(t,e)},sliceAndDice:function(t,e){var n=this._totalArea(t);t[0].level%2===this.quotient?this.layoutHorizontal(t,e,n):this.layoutVertical(t,e,n)},layoutHorizontal:function(t,e,n){var i,o,r,s=0;for(i=0;t.length>i;i++)o=t[i],r=o.area/(n/e.width),o.coord={height:e.height,width:r,top:e.top,left:e.left+s},s+=r},layoutVertical:function(t,e,n){var i,o,r,s=0;for(i=0;t.length>i;i++)o=t[i],r=o.area/(n/e.height),o.coord={height:r,width:e.width,top:e.top+s,left:e.left},s+=r},_totalArea:function(t){var e,n=0;for(e=0;t.length>e;e++)n+=t[e].area;return n}}),R=z.extend({htmlSize:function(t){var e,n,i=this._getByUid(t.dataItem.uid),o={text:0,offset:0};return t.children&&(this._clean(i),e=this._getText(t),e&&(n=this._createTitle(t),i.append(n),this._compile(n,t.dataItem),o.text=t.vertical?n.height():n.width()),i.append(this._createWrap()),this.offset=(i.outerWidth()-i.innerWidth())/2),o},titleSize:function(t,e){var n;return n=t.vertical?e.children(".k-treemap-title").height():e.children(".k-treemap-title-vertical").width()},_createTitle:function(e){var n;return n=t(e.vertical?"<div class='k-treemap-title'></div>":"<div class='k-treemap-title-vertical'></div>"),n.append(t("<div></div>").html(this._getText(e)))}});k.ui.plugin(B)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.angular.min",["kendo.core.min"],t)}(function(){return function(t,e,n){"use strict";function i(t){var e=C;try{return C=function(t){return t()},t()}finally{C=e}}function o(e,i,o,c,h,m){function v(){var n,m,v,y,_,k,C;return o.kRebind&&(n=t(t(i)[0].cloneNode(!0))),S=r(e,i,o,c,b).options,i.is("select")&&!function(e){if(e.length>0){var n=t(e[0]);!/\S/.test(n.text())&&/^\?/.test(n.val())&&n.remove()}}(i[0].options),m=b.call(i,A=S).data(c),l(m,e,o,c,h),e.$emit("kendoWidgetCreated",m),v=f(e,m),o.kRebind&&g(m,e,i,n,o.kRebind,v,o),o.kNgDisabled&&(y=o.kNgDisabled,_=e.$eval(y),_&&m.enable(!_),s(m,e,i,y)),o.kNgReadonly&&(k=o.kNgReadonly,C=e.$eval(k),C&&m.readonly(C),a(m,e,i,k)),o.kNgModel&&d(m,e,o.kNgModel),w&&u(m,e,i,w,x),m&&p(m,i),m}var y,_,w,x,b,k,S,T,D,P,M,E,B,I;if(!(i instanceof jQuery))throw Error("The Kendo UI directives require jQuery to be available before AngularJS. Please include jquery before angular in the document.");if(y=o.kNgDelay,_=e.$eval(y),m=m||[],w=m[0],x=m[1],b=t(i)[c],!b)return window.console.error("Could not find: "+c),null;if(k=r(e,i,o,c,b),S=k.options,k.unresolved.length){for(T=[],D=0,P=k.unresolved.length;P>D;D++)M=k.unresolved[D],E=t.Deferred(function(t){var i=e.$watch(M.path,function(e){e!==n&&(i(),t.resolve())})}).promise(),T.push(E);return t.when.apply(null,T).then(v),n}return y&&!_?(B=e.$root||e,I=function(){var t=e.$watch(y,function(e){e!==n&&(t(),i.removeAttr(o.$attr.kNgDelay),y=null,C(v))})},/^\$(digest|apply)$/.test(B.$$phase)?I():e.$apply(I),n):v()}function r(i,o,r,s,a){function l(t,o){var r=e.copy(i.$eval(o));r===n?p.push({option:t,path:o}):c[t]=r}var c,h,u,d,f=s.replace(/^kendo/,""),p=[],g=r.kOptions||r.options,m=i.$eval(g);return g&&m===n&&p.push({option:"options",path:g}),c=e.extend({},r.defaultOptions,m),h=a.widget.prototype.options,u=a.widget.prototype.events,t.each(r,function(t,e){var n,i,o,r;"source"!==t&&"kDataSource"!==t&&"kScopeField"!==t&&"scopeField"!==t&&(n="data"+t.charAt(0).toUpperCase()+t.slice(1),0===t.indexOf("on")&&(i=t.replace(/^on./,function(t){return t.charAt(2).toLowerCase()}),u.indexOf(i)>-1&&(c[i]=e)),h.hasOwnProperty(n)?l(n,e):h.hasOwnProperty(t)&&!M[t]?l(t,e):P[t]||(o=t.match(/^k(On)?([A-Z].*)/),o&&(r=o[2].charAt(0).toLowerCase()+o[2].slice(1),o[1]&&"kOnLabel"!=t?c[r]=e:("kOnLabel"==t&&(r="onLabel"),l(r,e)))))}),d=r.kDataSource||r.source,d&&(c.dataSource=D(i,o,f,d)),c.$angular=[i],{options:c,unresolved:p}}function s(t,e,i,o){return kendo.ui.PanelBar&&t instanceof kendo.ui.PanelBar||kendo.ui.Menu&&t instanceof kendo.ui.Menu?(T.warn("k-ng-disabled specified on a widget that does not have the enable() method: "+t.options.name),n):(e.$watch(o,function(e,n){e!=n&&t.enable(!e)}),n)}function a(t,e,i,o){return"function"!=typeof t.readonly?(T.warn("k-ng-readonly specified on a widget that does not have the readonly() method: "+t.options.name),n):(e.$watch(o,function(e,n){e!=n&&t.readonly(e)}),n)}function l(t,e,n,i,o){if(n[o]){var r=k(n[o]).assign;if(!r)throw Error(o+" attribute used but expression in it is not assignable: "+n[i]);r(e,t)}}function c(t){return/checkbox|radio/i.test(t.attr("type"))?t.prop("checked"):t.val()}function h(t){return E.test(t[0].tagName)}function u(t,e,i,o,r){var s,a,l,u;t.value&&(s=h(i)?function(){return c(i)}:function(){return t.value()},o.$render=function(){var i=o.$viewValue;i===n&&(i=o.$modelValue),i===n&&(i=null),setTimeout(function(){if(t){var n=e[t.element.attr("k-ng-model")];n&&(i=n),t.options.autoBind!==!1||t.listView.bound()?t.value(i):i&&t.value(i)}},0)},a=!1,h(i)&&i.on("change",function(){a=!0}),l=function(t){return function(){var n;a||(t&&r&&(n=r.$pristine),o.$setViewValue(s()),t&&(o.$setPristine(),n&&r.$setPristine()),y(e))}},t.first("change",l(!1)),kendo.ui.AutoComplete&&t instanceof kendo.ui.AutoComplete||t.first("dataBound",l(!0)),u=s(),isNaN(o.$viewValue)||u==o.$viewValue||(o.$isEmpty(o.$viewValue)?null!=u&&""!==u&&u!=o.$viewValue&&o.$setViewValue(u):t.value(o.$viewValue)),o.$setPristine())}function d(e,i,o){var r,s,a,l,c,h,u,d,f;return"function"!=typeof e.value?(T.warn("k-ng-model specified on a widget that does not have the value() method: "+e.options.name),n):(r=t(e.element).parents("form"),s=i[r.attr("name")],a=k(o),l=a.assign,c=!1,h=kendo.ui.MultiSelect&&e instanceof kendo.ui.MultiSelect,u=function(t){return h?t.length:0},d=u(a(i)),e.$angular_setLogicValue(a(i)),f=function(t,i){t===n&&(t=null),c||t==i&&u(t)==d||(d=u(t),e.$angular_setLogicValue(t))},h?i.$watchCollection(o,f):i.$watch(o,f),e.first("change",function(){c=!0,s&&s.$pristine&&s.$setDirty(),y(i,function(){l(i,e.$angular_getLogicValue()),d=u(a(i))}),c=!1}),n)}function f(t,e){var n=t.$on("$destroy",function(){n(),e&&(e.element&&(e=v(e.element),e&&e.destroy()),e=null)});return n}function p(e,n){function i(){s.disconnect()}function o(){s.observe(t(n)[0],{attributes:!0})}var r,s;window.MutationObserver&&e.wrapper&&(r=[].slice.call(t(n)[0].classList),s=new MutationObserver(function(n){i(),e&&(n.forEach(function(n){var i,o=t(e.wrapper)[0];switch(n.attributeName){case"class":i=[].slice.call(n.target.classList),i.forEach(function(t){r.indexOf(t)<0&&(o.classList.add(t),kendo.ui.ComboBox&&e instanceof kendo.ui.ComboBox&&e.input[0].classList.add(t));
}),r.forEach(function(t){i.indexOf(t)<0&&(o.classList.remove(t),kendo.ui.ComboBox&&e instanceof kendo.ui.ComboBox&&e.input[0].classList.remove(t))}),r=i;break;case"disabled":"function"!=typeof e.enable||e.element.attr("readonly")||e.enable(!t(n.target).attr("disabled"));break;case"readonly":"function"!=typeof e.readonly||e.element.attr("disabled")||e.readonly(!!t(n.target).attr("readonly"))}}),o())}),o(),e.first("destroy",i))}function g(e,n,i,o,r,s,a){var l=n.$watch(r,function(r,c){var h,u,d,f,p;e._muteRebind||r===c||(l(),h=R[e.options.name],h&&h.forEach(function(e){var i=n.$eval(a["k"+e]);i&&o.append(t(i).attr(kendo.toHyphens("k"+e),""))}),u=t(e.wrapper)[0],d=t(e.element)[0],f="Upload"===e.options.name,f&&(i=t(d)),p=i.injector().get("$compile"),e._destroy(),s&&s(),e=null,d&&(u&&u.parentNode.replaceChild(d,u),t(i).replaceWith(o)),p(o)(n))},!0);y(n)}function m(t,n){function i(t,e){x.directive(t,["directiveFactory",function(n){return n.create(e,t)}])}var o,r,s,a,l=n?"Mobile":"";l+=t.fn.options.name,o=l,r="kendo"+l.charAt(0)+l.substr(1).toLowerCase(),l="kendo"+l,s=l.replace(/([A-Z])/g,"-$1"),-1==I.indexOf(l.replace("kendo",""))&&(a=l===r?[l]:[l,r],e.forEach(a,function(t){x.directive(t,function(){return{restrict:"E",replace:!0,template:function(t,e){var n=B[o]||"div",i=e.kScopeField||e.scopeField;return"<"+n+" "+s+(i?'="'+i+'"':"")+">"+t.html()+"</"+n+">"}}})})),z.indexOf(l.replace("kendo",""))>-1||(i(l,l),r!=l&&i(r,l))}function v(e){return e=t(e),kendo.widgetInstance(e,kendo.ui)||kendo.widgetInstance(e,kendo.mobile.ui)||kendo.widgetInstance(e,kendo.dataviz.ui)}function y(t,e){var n=t.$root||t,i=/^\$(digest|apply)$/.test(n.$$phase);e?i?e():n.$apply(e):i||n.$digest()}function _(e,n){e.$destroy(),n&&t(n).removeData("$scope").removeData("$$kendoScope").removeData("$isolateScope").removeData("$isolateScopeNoTemplate").removeClass("ng-scope")}function w(n,i,o){var r,s,a;if(t.isArray(n))return e.forEach(n,function(t){w(t,i,o)});if("string"==typeof n){for(r=n.split("."),s=kendo;s&&r.length>0;)s=s[r.shift()];if(!s)return L.push([n,i,o]),!1;n=s.prototype}return a=n[i],n[i]=function(){var t=this,e=arguments;return o.apply({self:t,next:function(){return a.apply(t,arguments.length>0?arguments:e)}},e)},!0}var x,b,k,C,S,T,A,D,P,M,E,B,I,z,L,R;e&&e.injector&&(x=e.module("kendo.directives",[]),b=e.injector(["ng"]),k=b.get("$parse"),C=b.get("$timeout"),T=b.get("$log"),D=function(){var t={TreeList:"TreeListDataSource",TreeView:"HierarchicalDataSource",Scheduler:"SchedulerDataSource",PanelBar:"$PLAIN",Menu:"$PLAIN",ContextMenu:"$PLAIN"},e=function(t,e){return"$PLAIN"==e?t:kendo.data[e].create(t)};return function(n,i,o,r){var s=t[o]||"DataSource",a=n.$eval(r),l=e(a,s);return n.$watch(r,function(t){var n,o=v(i);o&&"function"==typeof o.setDataSource&&t!==a&&(n=e(t,s),o.setDataSource(n),a=t)}),l}}(),P={kDataSource:!0,kOptions:!0,kRebind:!0,kNgModel:!0,kNgDelay:!0},M={name:!0,title:!0,style:!0},E=/^(input|select|textarea)$/i,x.factory("directiveFactory",["$compile",function(e){var n,i,r=!1;return S=e,i=function(e,i){return{restrict:"AC",require:["?ngModel","^?form"],scope:!1,controller:["$scope","$attrs","$element",function(t,e){var n=this;n.template=function(t,n){e[t]=kendo.stringify(n)},t.$on("$destroy",function(){n.template=null,n=null})}],link:function(s,a,l,c){var h,u=t(a),d=e.replace(/([A-Z])/g,"-$1");u.attr(d,u.attr("data-"+d)),u[0].removeAttribute("data-"+d),h=o(s,a,l,e,i,c),h&&(n&&clearTimeout(n),n=setTimeout(function(){s.$emit("kendoRendered"),r||(r=!0,t("form").each(function(){var e=t(this).controller("form");e&&e.$setPristine()}))}))}}},{create:i}}]),B={Editor:"textarea",NumericTextBox:"input",DatePicker:"input",DateTimePicker:"input",TimePicker:"input",AutoComplete:"input",ColorPicker:"input",MaskedTextBox:"input",MultiSelect:"input",Upload:"input",Validator:"form",Button:"button",MobileButton:"a",MobileBackButton:"a",MobileDetailButton:"a",ListView:"ul",MobileListView:"ul",TreeView:"ul",Menu:"ul",ContextMenu:"ul",ActionSheet:"ul"},I=["MobileView","MobileDrawer","MobileLayout","MobileSplitView","MobilePane","MobileModalView"],z=["MobileApplication","MobileView","MobileModalView","MobileLayout","MobileActionSheet","MobileDrawer","MobileSplitView","MobilePane","MobileScrollView","MobilePopOver"],e.forEach(["MobileNavBar","MobileButton","MobileBackButton","MobileDetailButton","MobileTabStrip","MobileScrollView","MobileScroller"],function(t){z.push(t),t="kendo"+t,x.directive(t,function(){return{restrict:"A",link:function(e,n,i){o(e,n,i,t,t)}}})}),L=[],kendo.onWidgetRegistered(function(e){L=t.grep(L,function(t){return!w.apply(null,t)}),m(e.widget,"Mobile"==e.prefix)}),w(["ui.Widget","mobile.ui.Widget"],"angular",function(o,r){var s,a=this.self;return"init"==o?(!r&&A&&(r=A),A=null,r&&r.$angular&&(a.$angular_scope=r.$angular[0],a.$angular_init(a.element,r)),n):(s=a.$angular_scope,s&&i(function(){var i,l,c=r(),h=c.elements,u=c.data;if(h.length>0)switch(o){case"cleanup":e.forEach(h,function(e){var n=t(e).data("$$kendoScope");n&&n!==s&&n.$$kendoScope&&_(n,e)});break;case"compile":i=a.element.injector(),l=i?i.get("$compile"):S,e.forEach(h,function(e,i){var o,r;c.scopeFrom?o=c.scopeFrom:(r=u&&u[i],r!==n?(o=t.extend(s.$new(),r),o.$$kendoScope=!0):o=s),t(e).data("$$kendoScope",o),l(e)(o)}),y(s)}}),n)}),w("ui.Widget","$angular_getLogicValue",function(){return this.self.value()}),w("ui.Widget","$angular_setLogicValue",function(t){this.self.value(t)}),w("ui.Select","$angular_getLogicValue",function(){var t=this.self.dataItem(),e=this.self.options.dataValueField;return t?this.self.options.valuePrimitive?e?t[e]:t:t.toJSON():null}),w("ui.Select","$angular_setLogicValue",function(t){var e=this.self,i=e.options,o=i.dataValueField,r=i.text||"";t===n&&(t=""),o&&!i.valuePrimitive&&t&&(r=t[i.dataTextField]||"",t=t[o||i.dataTextField]),e.options.autoBind!==!1||e.listView.bound()?e.value(t):!r&&t&&i.valuePrimitive?e.value(t):e._preselect(t,r)}),w("ui.MultiSelect","$angular_getLogicValue",function(){var e=this.self.dataItems().slice(0),n=this.self.options.dataValueField;return n&&this.self.options.valuePrimitive&&(e=t.map(e,function(t){return t[n]})),e}),w("ui.MultiSelect","$angular_setLogicValue",function(e){var n,i,o,r;null==e&&(e=[]),n=this.self,i=n.options,o=i.dataValueField,r=e,o&&!i.valuePrimitive&&(e=t.map(e,function(t){return t[o]})),i.autoBind!==!1||i.valuePrimitive||n.listView.bound()?n.value(e):n._preselect(r,e)}),w("ui.AutoComplete","$angular_getLogicValue",function(){var t,e,n,i,o,r=this.self.options,s=this.self.value().split(r.separator),a=r.valuePrimitive,l=this.self.dataSource.data(),c=[];for(t=0,e=l.length;e>t;t++)for(n=l[t],i=r.dataTextField?n[r.dataTextField]:n,o=0;s.length>o;o++)if(i===s[o]){c.push(a?i:n.toJSON());break}return c}),w("ui.AutoComplete","$angular_setLogicValue",function(e){null==e&&(e=[]);var i=this.self,o=i.options.dataTextField;o&&!i.options.valuePrimitive&&(e=e.length!==n?t.map(e,function(t){return t[o]}):e[o]),i.value(e)}),w("ui.Widget","$angular_init",function(e,n){var i,o,r,s,a=this.self;if(n&&!t.isArray(n))for(i=a.$angular_scope,o=a.events.length;--o>=0;)r=a.events[o],s=n[r],s&&"string"==typeof s&&(n[r]=a.$angular_makeEventHandler(r,i,s))}),w("ui.Widget","$angular_makeEventHandler",function(t,e,n){return n=k(n),function(t){y(e,function(){n(e,{kendoEvent:t})})}}),w(["ui.Grid","ui.ListView","ui.TreeView"],"$angular_makeEventHandler",function(t,n,i){return"change"!=t?this.next():(i=k(i),function(t){var o,r,s,a,l,c,h,u,d,f=t.sender,p=f.options,g={kendoEvent:t};for(e.isString(p.selectable)&&(o=-1!==p.selectable.indexOf("cell"),r=-1!==p.selectable.indexOf("multiple")),s=g.selected=this.select(),a=g.data=[],l=g.columns=[],h=0;s.length>h;h++)u=o?s[h].parentNode:s[h],d=f.dataItem(u),o?(e.element.inArray(d,a)<0&&a.push(d),c=e.element(s[h]).index(),e.element.inArray(c,l)<0&&l.push(c)):a.push(d);r||(g.dataItem=g.data=a[0],g.angularDataItem=kendo.proxyModelSetters(g.dataItem),g.selected=s[0]),y(n,function(){i(n,g)})})}),w("ui.Grid","$angular_init",function(i,o){if(this.next(),o.columns){var r=t.extend({},kendo.Template,o.templateSettings);e.forEach(o.columns,function(t){!t.field||t.template||t.format||t.values||t.encoded!==n&&!t.encoded||(t.template="<span ng-bind='"+kendo.expr(t.field,"dataItem")+"'>#: "+kendo.expr(t.field,r.paramName)+"#</span>")})}}),w("mobile.ui.ButtonGroup","value",function(t){var e=this.self;return null!=t&&(e.select(e.element.children("li.km-button").eq(t)),e.trigger("change"),e.trigger("select",{index:e.selectedIndex})),e.selectedIndex}),w("mobile.ui.ButtonGroup","_select",function(){this.next(),this.self.trigger("change")}),x.directive("kendoMobileApplication",function(){return{terminal:!0,link:function(t,e,n){o(t,e,n,"kendoMobileApplication","kendoMobileApplication")}}}).directive("kendoMobileView",function(){return{scope:!0,link:{pre:function(t,e,n){n.defaultOptions=t.viewOptions,n._instance=o(t,e,n,"kendoMobileView","kendoMobileView")},post:function(t,e,n){n._instance._layout(),n._instance._scroller()}}}}).directive("kendoMobileDrawer",function(){return{scope:!0,link:{pre:function(t,e,n){n.defaultOptions=t.viewOptions,n._instance=o(t,e,n,"kendoMobileDrawer","kendoMobileDrawer")},post:function(t,e,n){n._instance._layout(),n._instance._scroller()}}}}).directive("kendoMobileModalView",function(){return{scope:!0,link:{pre:function(t,e,n){n.defaultOptions=t.viewOptions,n._instance=o(t,e,n,"kendoMobileModalView","kendoMobileModalView")},post:function(t,e,n){n._instance._layout(),n._instance._scroller()}}}}).directive("kendoMobileSplitView",function(){return{terminal:!0,link:{pre:function(t,e,n){n.defaultOptions=t.viewOptions,n._instance=o(t,e,n,"kendoMobileSplitView","kendoMobileSplitView")},post:function(t,e,n){n._instance._layout()}}}}).directive("kendoMobilePane",function(){return{terminal:!0,link:{pre:function(t,e,n){n.defaultOptions=t.viewOptions,o(t,e,n,"kendoMobilePane","kendoMobilePane")}}}}).directive("kendoMobileLayout",function(){return{link:{pre:function(t,e,n){o(t,e,n,"kendoMobileLayout","kendoMobileLayout")}}}}).directive("kendoMobileActionSheet",function(){return{restrict:"A",link:function(e,n,i){n.find("a[k-action]").each(function(){t(this).attr("data-"+kendo.ns+"action",t(this).attr("k-action"))}),o(e,n,i,"kendoMobileActionSheet","kendoMobileActionSheet")}}}).directive("kendoMobilePopOver",function(){return{terminal:!0,link:{pre:function(t,e,n){n.defaultOptions=t.viewOptions,o(t,e,n,"kendoMobilePopOver","kendoMobilePopOver")}}}}).directive("kendoViewTitle",function(){return{restrict:"E",replace:!0,template:function(t){return"<span data-"+kendo.ns+"role='view-title'>"+t.html()+"</span>"}}}).directive("kendoMobileHeader",function(){return{restrict:"E",link:function(t,e){e.addClass("km-header").attr("data-role","header")}}}).directive("kendoMobileFooter",function(){return{restrict:"E",link:function(t,e){e.addClass("km-footer").attr("data-role","footer")}}}).directive("kendoMobileScrollViewPage",function(){return{restrict:"E",replace:!0,template:function(t){return"<div data-"+kendo.ns+"role='page'>"+t.html()+"</div>"}}}),e.forEach(["align","icon","rel","transition","actionsheetContext"],function(t){var e="k"+t.slice(0,1).toUpperCase()+t.slice(1);x.directive(e,function(){return{restrict:"A",priority:2,link:function(n,i,o){i.attr(kendo.attr(kendo.toHyphens(t)),n.$eval(o[e]))}}})}),R={TreeMap:["Template"],MobileListView:["HeaderTemplate","Template"],MobileScrollView:["EmptyTemplate","Template"],Grid:["AltRowTemplate","DetailTemplate","RowTemplate"],ListView:["EditTemplate","Template","AltTemplate"],Pager:["SelectTemplate","LinkTemplate"],PivotGrid:["ColumnHeaderTemplate","DataCellTemplate","RowHeaderTemplate"],Scheduler:["AllDayEventTemplate","DateHeaderTemplate","EventTemplate","MajorTimeHeaderTemplate","MinorTimeHeaderTemplate"],TreeView:["Template"],Validator:["ErrorTemplate"]},function(){var t={};e.forEach(R,function(n,i){e.forEach(n,function(e){t[e]||(t[e]=[]),t[e].push("?^^kendo"+i)})}),e.forEach(t,function(t,e){var n="k"+e,i=kendo.toHyphens(n);x.directive(n,function(){return{restrict:"A",require:t,terminal:!0,compile:function(e,o){if(""===o[n]){e.removeAttr(i);var r=e[0].outerHTML;return function(o,s,a,l){for(var c;!c&&l.length;)c=l.shift();c?(c.template(n,r),e.remove()):T.warn(i+" without a matching parent widget found. It can be one of the following: "+t.join(", "))}}}}})})}())}(window.kendo.jQuery,window.angular),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.webcomponents.min",["kendo.core.min"],t)}(function(){return function(t,e,n){function i(t,e){var i=t.getAttribute(e);return null===i?i=n:"null"===i?i=null:"true"===i?i=!0:"false"===i?i=!1:p.test(i)?i=parseFloat(i):d.test(i)&&!f.test(i)&&(i=Function("return ("+i+")")()),i}function o(t,e){var n={};return Object.keys(e).concat("dataSource").forEach(function(e){t.hasAttribute(kendo.toHyphens(e))&&(n[e]=i(t,kendo.toHyphens(e)))}),n}function r(t){var e={};return Object.keys(t).forEach(function(n){"_"!=n[0]&&(e[n]=t[n])}),e}function s(t,e){var n=document.createEvent("CustomEvent");n.initCustomEvent(t,!1,!0,r(e)),this.dispatchEvent(n),n.defaultPrevented&&e.preventDefault()}function a(t,e){var n,i=Object.keys(e);for(n=0;i.length>=n;n++)if("function"==typeof e[i[n]])t[i[n]]||(t[i[n]]=e[i[n]].bind(t.widget));else{if("options"===i[n])continue;t[i[n]]=t[i[n]]||e[i[n]]}}function l(e,n){var i=n.prototype.options,r=Object.create(HTMLElement.prototype);Object.defineProperty(r,"options",{get:function(){return this.widget.options},set:function(n){var i,o,r,s=this.widget;n=t.extend(!0,{},s.options,n),i=t(s.wrapper)[0],o=t(s.element)[0],s._destroy(),r=document.createElement(c[e]||"div"),i&&o&&(i.parentNode.replaceChild(o,i),t(o).replaceWith(r)),s.value&&(n.value=s.value()),s.init(r,n),this.bindEvents()}}),r.bindEvents=function(){n.prototype.events.forEach(function(t){this.widget.bind(t,s.bind(this,t)),this.hasAttribute(h+t)&&this.bind(t,function(e){window[this.getAttribute(h+t)].call(this,e)}.bind(this))}.bind(this))},r.attachedCallback=function(){var r,s=this,l=document.createElement(c[e]||"div");t(l).append(s.childNodes),t(l).attr("class",t(s).attr("class")),t(l).attr("style",t(s).attr("style")),s.appendChild(l),s.widget=new n(l,o(s,i)),r=s.widget;do a(s,r);while(r=Object.getPrototypeOf(r));this.bindEvents()},r.detachedCallback=function(){kendo.destroy(this.element)},kendo.webComponents.push("kendo-"+e),document.registerElement("kendo-"+e,{prototype:r})}var c,h,u,d,f,p;kendo.support.customElements&&!kendo.webComponents.length&&(!e||1!=e.version.major&&!e.injector)&&(c={editor:"textarea",numerictextbox:"input",datepicker:"input",datetimepicker:"input",timepicker:"input",autocomplete:"input",colorpicker:"input",maskedtextbox:"input",dropdownlist:"select",multiselect:"select",upload:"input",validator:"form",button:"button",mobilebutton:"a",mobilebackbutton:"a",mobiledetailbutton:"a",listview:"ul",mobilelistview:"ul",treeview:"ul",menu:"ul",contextmenu:"ul",actionsheet:"ul"},h="on-",u=[],kendo.onWidgetRegistered(function(t){var e=t.prefix+t.widget.prototype.options.name.toLowerCase();-1===u.indexOf(e)&&(u.push(e),l(e,t.widget))}),d=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,f=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]*\]$/,p=/^(\+|-?)\d+(\.?)\d*$/)}(window.kendo.jQuery,window.angular),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.angular2.min",["kendo.core.min","kendo.webcomponents.min"],t)}(function(){!function(t,e){var n,i;e&&e.register&&(n=this&&this.__decorate||function(t,e,n,i){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(t,e,n,i);switch(arguments.length){case 2:return t.reduceRight(function(t,e){return e&&e(t)||t},e);case 3:return t.reduceRight(function(t,i){return void(i&&i(e,n))},void 0);case 4:return t.reduceRight(function(t,i){return i&&i(e,n,t)||t},i)}},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},e.register("kendo/angular2",["angular2/angular2"],function(e){var o,r;return{setters:[function(t){o=t}],execute:function(){r=function(){function e(t,e){var n=this;this.elementRef=e,this.onChange=function(t){},this.onTouched=function(){},this.element=e.nativeElement,this.element.addEventListener("change",function(){n.onChange(n.element.value())}),this.element.addEventListener("spin",function(){n.onChange(n.element.value())}),t.valueAccessor=this,this.cd=t,t.valueAccessor=this}return e.prototype.writeValue=function(t){this.element.value(t)},e.prototype.registerOnChange=function(t){this.onChange=t},e.prototype.registerOnTouched=function(t){this.onTouched=t},e=n([o.Directive({selector:t.webComponents.join(",")}),i("design:paramtypes",[o.NgControl,o.ElementRef])],e)}(),e("KendoValueAccessor",r)}}}))}(window.kendo,window.System)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.min",["kendo.core.min","kendo.fx.min","kendo.router.min","kendo.view.min","kendo.data.odata.min","kendo.data.xml.min","kendo.data.min","kendo.data.signalr.min","kendo.binder.min","kendo.userevents.min","kendo.draganddrop.min","kendo.mobile.scroller.min","kendo.popup.min","kendo.tooltip.min","kendo.drawing.min","kendo.dataviz.core.min","kendo.dataviz.themes.min","kendo.dataviz.chart.min","kendo.dataviz.chart.polar.min","kendo.dataviz.chart.funnel.min","kendo.dataviz.gauge.min","kendo.dataviz.barcode.min","kendo.dataviz.qrcode.min","kendo.dataviz.stock.min","kendo.dataviz.sparkline.min","kendo.dataviz.map.min","kendo.dataviz.diagram.min","kendo.dataviz.treemap.min","kendo.angular.min","kendo.webcomponents.min","kendo.angular2.min"],t)}(function(){"bundle all"},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()});
//# sourceMappingURL=kendo.dataviz.min.js.map