text: /** 
   * Kendo UI v2017.1.118 (http://www.telerik.com/kendo-ui)                                                                                                                                               
   * Copyright 2017 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("drawing/util.min",["kendo.core.min"],t)}(function(){return function(t){function e(){return t.Deferred()}function n(e){return t.when.apply(t,e)}kendo.drawing.util=kendo.drawing.util||{},kendo.deepExtend(kendo.drawing.util,{createPromise:e,promiseAll:n})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("util/text-metrics.min",["kendo.core.min"],t)}(function(){!function(t){function e(t){var e,n=[];for(e in t)n.push(e+t[e]);return n.sort().join("")}function n(t){var e,n=2166136261;for(e=0;e<t.length;++e)n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24),n^=t.charCodeAt(e);return n>>>0}function i(){return{width:0,height:0,baseline:0}}function o(t,e,n){return h.current.measure(t,e,n)}var r,s,a,h;window.kendo.util=window.kendo.util||{},r=kendo.Class.extend({init:function(t){this._size=t,this._length=0,this._map={}},put:function(t,e){var n=this._map,i={key:t,value:e};n[t]=i,this._head?(this._tail.newer=i,i.older=this._tail,this._tail=i):this._head=this._tail=i,this._length>=this._size?(n[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},get:function(t){var e=this._map[t];if(e)return e===this._head&&e!==this._tail&&(this._head=e.newer,this._head.older=null),e!==this._tail&&(e.older&&(e.older.newer=e.newer,e.newer.older=e.older),e.older=this._tail,e.newer=null,this._tail.newer=e,this._tail=e),e.value}}),s={baselineMarkerSize:1},"undefined"!=typeof document&&(a=document.createElement("div"),a.style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: nowrap!important;"),h=kendo.Class.extend({init:function(e){this._cache=new r(1e3),this.options=t.extend({},s,e)},measure:function(t,o,r){var s,h,l,c,u,d,f,p;if(!t)return i();if(s=e(o),h=n(t+s),l=this._cache.get(h))return l;c=i(),u=r||a,d=this._baselineMarker().cloneNode(!1);for(f in o)p=o[f],void 0!==p&&(u.style[f]=p);return u.textContent=t,u.appendChild(d),document.body.appendChild(u),(t+"").length&&(c.width=u.offsetWidth-this.options.baselineMarkerSize,c.height=u.offsetHeight,c.baseline=d.offsetTop+this.options.baselineMarkerSize),c.width>0&&c.height>0&&this._cache.put(h,c),u.parentNode.removeChild(u),c},_baselineMarker:function(){var t=document.createElement("div");return t.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",t}}),h.current=new h,kendo.deepExtend(kendo.util,{LRUCache:r,TextMetrics:h,measureText:o,objectKey:e,hashKey:n})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/kendo-drawing.min",["drawing/util.min","kendo.color.min","util/text-metrics.min"],t)}(function(){!function(t){function e(t,e){return t.push.apply(t,e),t}function n(t){for(var e=[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],n="";t>0;)t<e[0]?e.shift():(n+=Ke[e[0]],t-=e[0]);return n}function i(t){return typeof t!==Qe}function o(){return"kdef"+Ze++}function r(t){return t/tn}function s(t){var e,n,i="";for(e=0;e<t.length;e++)n=t.charCodeAt(e),n<128?i+=rn(n):n<2048?(i+=rn(192|n>>>6),i+=rn(128|63&n)):n<65536&&(i+=rn(224|n>>>12),i+=rn(128|n>>>6&63),i+=rn(128|63&n));return i}function a(t){for(var e,n,i,o,r,a,h,l="",c=0,u=s(t);c<u.length;)e=u.charCodeAt(c++),n=u.charCodeAt(c++),i=u.charCodeAt(c++),o=e>>2,r=(3&e)<<4|n>>4,a=(15&n)<<2|i>>6,h=63&i,isNaN(n)?a=h=64:isNaN(i)&&(h=64),l=l+on.charAt(o)+on.charAt(r)+on.charAt(a)+on.charAt(h);return l}function h(t){return i((t.x||{}).location)?{x:t.x.location,y:t.y.location}:{x:t.pageX||t.clientX||0,y:t.pageY||t.clientY||0}}function l(t){return t.touch?t.touch.initialTouch:t.target}function c(t){return""===t||null===t||"none"===t||"transparent"===t||!i(t)}function u(t){if(t)return t[t.length-1]}function d(t,e,n){return Math.max(Math.min(t,n),e)}function f(t,e){function n(t,n){for(var i=[],o=0,r=0,s=0;o<t.length&&r<n.length;)e(t[o],n[r])<=0?i[s++]=t[o++]:i[s++]=n[r++];return o<t.length&&i.push.apply(i,t.slice(o)),r<n.length&&i.push.apply(i,n.slice(r)),i}return t.length<2?t.slice():function i(t){var e,o,r;return t.length<=1?t:(e=Math.floor(t.length/2),o=t.slice(0,e),r=t.slice(e),o=i(o),r=i(r),n(o,r))}(t)}function p(t){return t*tn}function g(t){return t?Math.pow(10,t):1}function m(t,e){var n=g(e);return Math.round(t*n)/n}function v(t,e){return i(t)?t:e}function x(t,e){var n,i,o;for(n in e)for(i=n.trim().split(" "),o=0;o<i.length;o++)t.addEventListener(i[o],e[n],!1)}function y(t){var e=t.getBoundingClientRect(),n=document.documentElement;return{top:e.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||0),left:e.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}}function w(t,e){var n,i,o={},r=window.getComputedStyle(t),s=Array.isArray(e)?e:[e];for(n=0;n<s.length;n++)i=s[n],o[i]=r[i];return o}function _(t){return isNaN(t)?t:t+"px"}function b(t,e){var n,o,r;return e?(n=e.width,o=e.height,i(n)&&(t.style.width=_(n)),i(o)&&(t.style.height=_(o)),void 0):(r=w(t,["width","height"]),{width:parseInt(r.width,10),height:parseInt(r.height,10)})}function C(t,e){var n,i,o;void 0===e&&(e={});for(n in e)for(i=n.trim().split(" "),o=0;o<i.length;o++)t.removeEventListener(i[o],e[n],!1)}function T(t){return function(e){return this[t]!==e&&(this[t]=e,this.geometryChange()),this}}function k(t){return function(){return this[t]}}function M(t,e){var n,i,o;for(n=0;n<e.length;n++)i=e[n],o=i.charAt(0).toUpperCase()+i.substring(1,i.length),t["set"+o]=T(i),t["get"+o]=k(i)}function S(t){return t&&"function"==typeof t.matrix?t.matrix():t}function E(t){return null===t?null:t instanceof fn?t:new fn(t)}function P(t,e,n,i){var o=0,r=0;return i&&(o=Math.atan2(i.c*n,i.a*e),0!==i.b&&(r=Math.atan2(i.d*n,i.b*e))),{x:o,y:r}}function A(t){var e="_"+t;return function(t){return i(t)?(this._observerField(e,t),this.geometryChange(),this):this[e]}}function O(t,e){for(var n=0;n<e.length;n++)t[e[n]]=A(e[n])}function z(t,e,n){return void 0===n&&(n=Cn),0===m(Math.abs(t-e),n)}function N(t,e,n){return t<e||z(t,e,n)}function R(t,e,n,i){var o=e.x-t.x,r=i.x-n.x,s=e.y-t.y,a=i.y-n.y,h=t.x-n.x,l=t.y-n.y,c=o*a-r*s,u=(o*l-s*h)/c,d=(r*l-a*h)/c;if(u>=0&&u<=1&&d>=0&&d<=1)return new cn(t.x+d*o,t.y+d*s)}function B(t,e,n){var i,o=e;return t>o&&(o+=360),i=Math.abs(o-t),n||(i=360-i),i}function F(t,e,n,i,o,s){var a=m((o-t)/n,3),h=m((s-e)/i,3);return m(r(Math.atan2(h,a)))}function L(t){var e,n,i,o,r,s,a,h,l,c,u,d,f,p,g,m,v,x,y=t.x1,w=t.y1,_=t.x2,b=t.y2,C=t.rx,T=t.ry,k=t.largeArc,M=t.swipe;if(w!==b)l=_-y,c=b-w,u=kn(C,2),d=kn(T,2),f=(d*l*(y+_)+u*c*(w+b))/(2*u*c),p=f-b,g=-(l*d)/(u*c),r=1/u+kn(g,2)/d,s=2*(g*p/d-_/u),a=kn(_,2)/u+kn(p,2)/d-1,h=Math.sqrt(kn(s,2)-4*r*a),e=(-s-h)/(2*r),n=f+g*e,i=(-s+h)/(2*r),o=f+g*i;else{if(y===_)return!1;s=-2*b,a=kn((_-y)*T/(2*C),2)+kn(b,2)-kn(T,2),h=Math.sqrt(kn(s,2)-4*a),e=i=(y+_)/2,n=(-s-h)/2,o=(-s+h)/2}return m=F(e,n,C,T,y,w),v=F(e,n,C,T,_,b),x=B(m,v,M),(k&&x<=180||!k&&x>180)&&(e=i,n=o,m=F(e,n,C,T,y,w),v=F(e,n,C,T,_,b)),{center:new cn(e,n),startAngle:m,endAngle:v}}function I(t,e){for(var n=t;n<e;)n+=90;return n}function D(t){var e="_"+t;return function(t){return i(t)?(this._observerField(e,cn.create(t)),this.geometryChange(),this):this[e]}}function H(t,e){for(var n=0;n<e.length;n++)t[e[n]]=D(e[n])}function G(t,e,n){var i=r(Math.atan2(e.y-t.y,e.x-t.x)),o=n.transformCopy(E().rotate(-i,t));return o.x<t.x}function q(t,e,n){var i=1-t;return Math.pow(i,3)*n[0][e]+3*Math.pow(i,2)*t*n[1][e]+3*Math.pow(t,2)*i*n[2][e]+Math.pow(t,3)*n[3][e]}function j(t,e){return[-t[0][e]+3*t[1][e]-3*t[2][e]+t[3][e],3*(t[0][e]-2*t[1][e]+t[2][e]),3*(-t[0][e]+t[1][e]),t[0][e]]}function $(t){return t<0?-1:1}function X(t,e,n){var i=Math.sqrt(Math.pow(e,2)-4*t*n);return[(-e+i)/(2*t),(-e-i)/(2*t)]}function Y(t,e,n,i){var o,r,s,a,h,l,c,u,d,f,p,g,v;return 0===t?X(e,n,i):(o=(3*t*n-Math.pow(e,2))/(3*Math.pow(t,2)),r=(2*Math.pow(e,3)-9*t*e*n+27*Math.pow(t,2)*i)/(27*Math.pow(t,3)),s=Math.pow(o/3,3)+Math.pow(r/2,2),a=new Bn(0,1),h=-e/(3*t),s<0?(l=new Bn(-r/2,Math.sqrt(-s)).nthRoot(3),c=new Bn(-r/2,(-Math.sqrt(-s))).nthRoot(3)):(l=-r/2+Math.sqrt(s),l=new Bn($(l)*Math.pow(Math.abs(l),1/3)),c=-r/2-Math.sqrt(s),c=new Bn($(c)*Math.pow(Math.abs(c),1/3))),u=l.add(c),p=l.add(c).multiplyConstant(-.5),g=l.add(c.negate()).multiplyConstant(Math.sqrt(3)/2),d=p.add(a.multiply(g)),f=p.add(a.negate().multiply(g)),v=[],u.isReal()&&v.push(m(u.real+h,Cn)),d.isReal()&&v.push(m(d.real+h,Cn)),f.isReal()&&v.push(m(f.real+h,Cn)),v)}function U(t,e,n,i,o){var r,s,a=j(t,i),h=Y(a[0],a[1],a[2],a[3]-e[i]);for(s=0;s<h.length;s++)if(0<=h[s]&&h[s]<=1&&(r=q(h[s],n,t),Math.abs(r-e[n])<=o))return!0}function V(t,e,n){var i,o,r,s=j(t,"x"),a=Y(s[0],s[1],s[2],s[3]-e.x),h=0;for(r=0;r<a.length;r++)i=q(a[r],"y",t),o=z(i,e.y)||i>e.y,o&&((0===a[r]||1===a[r])&&n.bottomRight().x>e.x||0<a[r]&&a[r]<1)&&h++;return h}function W(t,e,n){var i,o,r,s,a,h;return t.x!==e.x&&(o=Math.min(t.x,e.x),r=Math.max(t.x,e.x),s=Math.min(t.y,e.y),a=Math.max(t.y,e.y),h=o<=n.x&&n.x<r,i=s===a?n.y<=s&&h:h&&(a-s)*((t.x-e.x)*(t.y-e.y)>0?n.x-o:r-n.x)/(r-o)+s-n.y>=0),i?1:0}function J(t){var e,n=t.length,i=en,o=nn;for(e=0;e<n;e++)o=Math.max(o,t[e]),i=Math.min(i,t[e]);return{min:i,max:o}}function K(t,e,n){var i,o,r,s;for(o=0;o<t.length;o++)r=t[o],r.visible()&&(s=e?r.bbox(n):r.rawBBox(),s&&(i=i?dn.union(i,s):s));return i}function Q(t,e){var n,i,o,r;for(i=0;i<t.length;i++)o=t[i],o.visible()&&(r=o.clippedBBox(e),r&&(n=n?dn.union(n,r):r));return n}function Z(t,e,n){var i=n.transform()||E(),o=i.matrix();o.e+=t.x-e.origin.x,o.f+=t.y-e.origin.y,i.matrix(o),n.transform(i)}function tt(t,e,n,i,o){var r;return r="start"===n?e.origin[i]:"end"===n?e.origin[i]+e.size[o]-t:e.origin[i]+(e.size[o]-t)/2}function et(t,e,n,i,o){var r,s,a;for(r=0;r<t.length;r++)s=t[r].clippedBBox(),s&&(a=s.origin.clone(),a[i]=tt(s.size[o],e,n||"start",i,o),Z(a,s,t[r]))}function nt(t,e,n){et(t,e,n,"x","width")}function it(t,e,n){et(t,e,n,"y","height")}function ot(t,e,n,i){var o,r,s,a,h;if(t.length>1)for(o=new cn,r=t[0].bbox,s=1;s<t.length;s++)a=t[s].element,h=t[s].bbox,o[e]=r.origin[e]+r.size[i],o[n]=h.origin[n],Z(o,h,a),h.origin[e]=o[e],r=h}function rt(t){var e,n,i,o=[];for(e=0;e<t.length;e++)n=t[e],i=n.clippedBBox(),i&&o.push({element:n,bbox:i});return o}function st(t){ot(rt(t),"x","y","width")}function at(t){ot(rt(t),"y","x","height")}function ht(t,e,n){var i,o,r,s,a=e.size[n],h=[],l=[],c=0,u=function(){l.push({element:i,bbox:o})};for(r=0;r<t.length;r++)i=t[r],o=i.clippedBBox(),o&&(s=o.size[n],c+s>a?l.length?(h.push(l),l=[],u(),c=s):(u(),h.push(l),l=[],c=0):(u(),c+=s));return l.length&&h.push(l),h}function lt(t,e,n,i,o){var r,s,a,h,l=ht(t,e,o),c=e.origin.clone(),u=[];for(r=0;r<l.length;r++)for(s=l[r],a=s[0],c[i]=a.bbox.origin[i],Z(c,a.bbox,a.element),a.bbox.origin[n]=c[n],ot(s,n,i,o),u.push([]),h=0;h<s.length;h++)u[r].push(s[h].element);return u}function ct(t,e){return lt(t,e,"x","y","width")}function ut(t,e){return lt(t,e,"y","x","height")}function dt(t,e){var n,i,o,r,s=t.clippedBBox();s&&(n=s.size,i=e.size,(i.width<n.width||i.height<n.height)&&(o=Math.min(i.width/n.width,i.height/n.height),r=t.transform()||E(),r.scale(o,o),t.transform(r)))}function ft(t){return function(e){return i(e)?(this.options.set(t,e),this):this.options.get(t)}}function pt(t,e){for(var n=0;n<e.length;n++)t[e[n]]=ft(e[n])}function gt(t){return.5-Math.cos(t*Math.PI)/2}function mt(t){return t}function vt(t,e,n,i){var o=1.70158,r=0,s=i;return 0===t?n:1===t?n+i:(r||(r=.5),s<Math.abs(i)?(s=i,o=r/4):o=r/(2*Math.PI)*Math.asin(i/s),s*Math.pow(2,-10*t)*Math.sin((+t-o)*(1.1*Math.PI)/r)+i+n)}function xt(t,e,n){var i,o=e?0:1;for(i=0;i<t.length;i+=2)t.splice(i+o,0,n)}function yt(t,e){if(t&&e)return e.scaleCopy(2).translate(-t.x,-t.y)}function wt(t,e,n){var i=e.clone().scale(2/3);return{controlOut:i.clone().translateWith(t.scaleCopy(si)),controlIn:i.translateWith(n.scaleCopy(si))}}function _t(t){var e=[];return t.replace(hi,function(t,n){e.push(parseFloat(n))}),e}function bt(t,e){return i(e)&&null!==e?" "+t+"='"+e+"' ":""}function Ct(t){var e,n="";for(e=0;e<t.length;e++)n+=bt(t[e][0],t[e][1]);return n}function Tt(t){var e,n,o="";for(e=0;e<t.length;e++)n=t[e][1],i(n)&&(o+=t[e][0]+":"+n+";");if(""!==o)return o}function kt(t,e){return"clip"===t||"fill"===t&&(!e||"Gradient"===e.nodeType)}function Mt(){var t=document.getElementsByTagName("base")[0],e=document.location.href,n=e.indexOf("#"),i="";return t&&!Ue.browser.msie&&(n!==-1&&(e=e.substring(0,n)),i=e),i}function St(t){return"url("+Mt()+"#"+t+")"}function Et(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 Pt(t){if(!t||!t.indexOf||t.indexOf("&")<0)return t;var e=Pt._element;return e.innerHTML=t,e.textContent||e.innerText}function At(t){var e,n,i,o=new Ni,r=t.clippedBBox(),s=t;return r&&(e=r.getOrigin(),n=new Yn,n.transform(E().translate(-e.x,-e.y)),n.children.push(t),s=n),o.load([s]),i="<?xml version='1.0' ?><svg xmlns='"+vi+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+o.render()+"</svg>",o.destroy(),i}function Ot(t,e){var n,i,o,r,s,a,h=e.segments;if(0!==h.length){for(n=h[0],i=n.anchor(),t.moveTo(i.x,i.y),o=1;o<h.length;o++)n=h[o],i=n.anchor(),r=h[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()}}function zt(t,e){return t._zIndex<e._zIndex?1:t._zIndex>e._zIndex?-1:0}function Nt(t,e){var n,i,o;for(n=0;n<e.length;n++)i=e[n],o=kendo.parseColor(i.color()),o.a*=i.opacity(),t.addColorStop(i.offset(),o.toCssRgba())}function Rt(e,n){var i,o,r,s,a,h,l,c,u={width:"800px",height:"600px",cors:"Anonymous"},d=e,f=e.clippedBBox();return f&&(i=f.getOrigin(),d=new Yn,d.transform(E().translate(-i.x,-i.y)),d.children.push(e),o=f.getSize(),u.width=o.width+"px",u.height=o.height+"px"),r=t.extend(u,n),s=document.createElement("div"),a=s.style,a.display="none",a.width=r.width,a.height=r.height,document.body.appendChild(s),h=new ao(s,r),h.suspendTracking(),h.draw(d),l=h.image(),c=function(){h.destroy(),document.body.removeChild(s)},l.then(c,c),l}function Bt(t,e){var n=At(t);return e&&e.raw||(n="data:image/svg+xml;base64,"+a(n)),Ve().resolve(n)}function Ft(t){return Array.prototype.slice.call(t)}function Lt(t,e){t.classList.add(e)}function It(t,e){t.classList.remove(e)}function Dt(t,e){Object.keys(e).forEach(function(n){t.style[n]=e[n]})}function Ht(t,e){var n=Element.prototype,i=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(t){return[].indexOf.call(document.querySelectorAll(t),this)!==-1};return i.call(t,e)}function Gt(t,e){if(t.closest)return t.closest(e);for(;t;){if(Ht(t,e))return t;t=t.parentNode}}function qt(t){var e=t.cloneNode(!0),n=t.querySelectorAll("canvas");return n.length&&Ft(e.querySelectorAll("canvas")).forEach(function(t,e){t.getContext("2d").drawImage(n[e],0,0)}),Ft(e.querySelectorAll("input")).forEach(function(t){t.removeAttribute("name")}),e}function jt(t){return"number"==typeof t?{x:t,y:t}:Array.isArray(t)?{x:t[0],y:t[1]}:{x:t.x,y:t.y}}function $t(t,e){function n(t){var n=new Yn,i=t.getBoundingClientRect();return xe(n,[s.x,0,0,s.y,-i.left*s.x,-i.top*s.y]),wo._clipbox=!1,wo._matrix=ln.unit(),wo._stackingContext={element:t,group:n},wo._avoidLinks=e.avoidLinks===!0?"a":e.avoidLinks,Lt(t,"k-pdf-export"),Ge(t,n),It(t,"k-pdf-export"),n}function i(t){if(null!=t)return"string"==typeof t&&(t=kendo.template(t.replace(/^\s+|\s+$/g,""))),"function"==typeof t?function(e){var n,i=t(e);return i&&"string"==typeof i&&(n=document.createElement("div"),n.innerHTML=i,i=n.firstElementChild),i}:function(){return t.cloneNode(!0)}}function o(t,e,n,o,r,s,a){function h(){function e(){Zt(x,function(){t({pages:x,container:w})})}var i,o;("-"!=n||r)&&c(y),i=f(),y.parentNode.insertBefore(i,y),i.appendChild(y),m?(o=x.length,x.forEach(function(t,n){var i=m({element:t,pageNum:n+1,totalPages:x.length});i&&(t.appendChild(i),te(i,function(){0===--o&&e()}))})):e()}function l(t){if(a.keepTogether&&Ht(t,a.keepTogether)&&t.offsetHeight<=r-_)return!0;var e=t.tagName;return!(/^h[1-6]$/i.test(e)&&t.offsetHeight>=r-_)&&(t.getAttribute("data-kendo-chart")||/^(?:img|tr|thead|th|tfoot|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(t.tagName))}function c(t){var e,i,o,s=ae(t),a=parseFloat(he(s,"padding-bottom")),h=parseFloat(he(s,"border-bottom-width")),u=_;for(_+=a+h,e=!0,i=t.firstChild;i;i=i.nextSibling)if(1==i.nodeType){if(e=!1,Ht(i,n)){d(i);continue}if(!r){c(i);continue}if(!/^(?:static|relative)$/.test(he(ae(i),"position")))continue;o=p(i),1==o?d(i):o&&l(i)?d(i):c(i)}else 3==i.nodeType&&r&&(g(i,e),e=!1);_=u}function u(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 d(t){var e,n,i,o,r,s,h;return 1==t.nodeType&&t!==y&&u(t)?d(t.parentNode):(e=Gt(t,"table"),n=e&&e.querySelector("colgroup"),a.repeatHeaders&&(i=e&&e.querySelector("thead"),o=Gt(t,'.k-grid[data-role="grid"]'),o&&o.querySelector(".k-auto-scrollable")&&(r=o.querySelector(".k-grid-header"))),s=f(),h=v.createRange(),h.setStartBefore(y),h.setEndBefore(t),s.appendChild(h.extractContents()),y.parentNode.insertBefore(s,y),e&&(e=Gt(t,"table"),a.repeatHeaders&&i&&e.insertBefore(i.cloneNode(!0),e.firstChild),n&&e.insertBefore(n.cloneNode(!0),e.firstChild)),void(a.repeatHeaders&&r&&(o=Gt(t,'.k-grid[data-role="grid"]'),o.insertBefore(r.cloneNode(!0),o.firstChild))))}function f(){var t=v.createElement("KENDO-PDF-PAGE");return Dt(t,{display:"block",boxSizing:"content-box",width:o?o+"px":"auto",padding:s.top+"px "+s.right+"px "+s.bottom+"px "+s.left+"px",position:"relative",height:r?r+"px":"auto",overflow:r||o?"hidden":"visible",clear:"both"}),a&&a.pageClassName&&(t.className=a.pageClassName),x.push(t),t}function p(t){var e,n,i=t.getBoundingClientRect();return 0===i.width||0===i.height?0:(e=y.getBoundingClientRect().top,n=r-_,i.height>n?3:i.top-e>n?1:i.bottom-e>n?2:0)}function g(t,e){var n,i,o,r,s;/\S/.test(t.data)&&(n=t.data.length,i=v.createRange(),i.selectNodeContents(t),o=p(i),o&&(r=t,1==o?d(e?t.parentNode:t):(!function a(e,n,o){return i.setEnd(t,n),e==n||n==o?n:p(i)?a(e,e+n>>1,n):a(n,n+o>>1,o)}(0,n>>1,n),!/\S/.test(""+i)&&e?d(t.parentNode):(r=t.splitText(i.endOffset),s=f(),i.setStartBefore(y),s.appendChild(i.extractContents()),y.parentNode.insertBefore(s,y))),g(r)))}var m=i(a.template),v=e.ownerDocument,x=[],y=a._destructive?e:qt(e),w=v.createElement("KENDO-PDF-DOCUMENT"),_=0;Ft(y.querySelectorAll("tfoot")).forEach(function(t){t.parentNode.appendChild(t)}),Ft(y.querySelectorAll("ol")).forEach(function(t){Ft(t.children).forEach(function(t,e){t.setAttribute("kendo-split-index",e)})}),Dt(w,{display:"block",position:"absolute",boxSizing:"content-box",left:"-10000px",top:"-10000px"}),o&&(Dt(w,{width:o+"px",paddingLeft:s.left+"px",paddingRight:s.right+"px"}),Dt(y,{overflow:"hidden"})),e.parentNode.insertBefore(w,e),w.appendChild(y),a.beforePageBreak?setTimeout(function(){a.beforePageBreak(w,h)},15):setTimeout(h,15)}var r,s;if(e||(e={}),r=Ve(),!t)return r.reject("No element to export");if("function"!=typeof window.getComputedStyle)throw Error("window.getComputedStyle is missing.  You are using an unsupported browser, or running in IE8 compatibility mode.  Drawing HTML is supported in Chrome, Firefox, Safari and IE9+.");return kendo.pdf.defineFont(Xt(t.ownerDocument)),s=jt(e.scale||1),te(t,function(){var i,a=e&&e.forcePageBreak,h=e&&e.paperSize&&"auto"!=e.paperSize,l=kendo.pdf.getPaperOptions(function(t,n){return"paperSize"==t?h?e[t]:"A4":t in e?e[t]:n}),c=h&&l.paperSize[0],u=h&&l.paperSize[1],d=e.margin&&l.margin,f=!!d;a||u?(d||(d={left:0,top:0,right:0,bottom:0}),c&&(c/=s.x),u&&(u/=s.y),d.left/=s.x,d.right/=s.x,d.top/=s.y,d.bottom/=s.y,i=new Yn({pdf:{multiPage:!0,paperSize:h?l.paperSize:"auto",_ignoreMargin:f}}),o(function(t){if(e.progress){var o=!1,s=0;!function a(){if(s<t.pages.length){var h=n(t.pages[s]);i.append(h),e.progress({page:h,pageNum:++s,totalPages:t.pages.length,cancel:function(){o=!0}}),o?t.container.parentNode.removeChild(t.container):setTimeout(a)}else t.container.parentNode.removeChild(t.container),r.resolve(i)}()}else t.pages.forEach(function(t){i.append(n(t))}),t.container.parentNode.removeChild(t.container),r.resolve(i)},t,a,c?c-d.left-d.right:null,u?u-d.top-d.bottom:null,d,e)):r.resolve(n(t))}),r}function Xt(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=he(t.style,"src");return n?Co(n).reduce(function(t,e){var n=To(e);return n&&t.push(n),t},[]):(e=To(t.cssText),e?[e]:[])}function i(t,i){var r,s,a,h,l,c,u;for(r=0;r<i.length;++r)switch(s=i[r],s.type){case 3:e(s.styleSheet);break;case 5:a=s.style,h=Co(he(a,"font-family")),l=/^([56789]00|bold)$/i.test(he(a,"font-weight")),c="italic"==he(a,"font-style"),u=n(s),u.length>0&&o(t,h,l,c,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;s<t.styleSheets.length;++s)e(t.styleSheets[s]);return r}function Yt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Ut(t){return t="_counter_"+t,wo[t]}function Vt(t){var e=[],n=wo;for(t="_counter_"+t;n;)Yt(n,t)&&e.push(n[t]),n=Object.getPrototypeOf(n);return e.reverse()}function Wt(t,e){var n=wo;for(t="_counter_"+t;n&&!Yt(n,t);)n=Object.getPrototypeOf(n);n||(n=wo._root),n[t]=(n[t]||0)+(null==e?1:e)}function Jt(t,e){t="_counter_"+t,wo[t]=null==e?0:e}function Kt(t,e,n){var i,o,r;for(i=0;i<t.length;)o=t[i++],r=parseFloat(t[i]),isNaN(r)?e(o,n):(e(o,r),++i)}function Qt(t,e){var n=kendo.parseColor(t,!0);return n&&(n=n.toRGB(),e?n=n.toCssRgba():0===n.a&&(n=null)),n}function Zt(t,e){function n(){--i<=0&&e()}var i=0;t.forEach(function(t){var e,o,r=t.querySelectorAll("img");for(e=0;e<r.length;++e)o=r[e],o.complete||(i++,o.onload=o.onerror=n)}),i||n()}function te(t,e){function n(t){yo[t]||(yo[t]=!0,r.push(t))}function i(){--o<=0&&e()}var o,r=[];!function s(t){/^img$/i.test(t.tagName)&&n(t.src),bo(he(ae(t),"background-image")).forEach(function(t){"url"==t.type&&n(t.url)}),t.children&&Ft(t.children).forEach(s)}(t),o=r.length,0===o&&i(),r.forEach(function(t){var e=yo[t]=new window.Image;/^data:/i.test(t)||(e.crossOrigin="Anonymous"),e.src=t,e.complete?i():(e.onload=i,e.onerror=function(){yo[t]=null,i()})})}function ee(t){var e,n="";do e=t%26,n=String.fromCharCode(97+e)+n,t=Math.floor(t/26);while(t>0);return n}function ne(t,e,n){var i,o;wo=Object.create(wo),wo[t.tagName.toLowerCase()]={element:t,style:e},i=he(e,"text-decoration"),i&&"none"!=i&&(o=he(e,"color"),i.split(/\s+/g).forEach(function(t){wo[t]||(wo[t]=o)})),se(e)&&(wo._stackingContext={element:t,group:n})}function ie(){wo=Object.getPrototypeOf(wo)}function oe(t){if(null!=wo._clipbox){var e=t.bbox(wo._matrix);wo._clipbox=wo._clipbox?dn.intersect(wo._clipbox,e):e}}function re(){var t=wo._clipbox;return null==t||(t?0===t.width()||0===t.height():void 0)}function se(t){function e(e){return he(t,e)}if("none"!=e("transform")||"static"!=e("position")||"auto"!=e("z-index")||e("opacity")<1)return!0}function ae(t,e){return window.getComputedStyle(t,e||null)}function he(t,e){var n=t.getPropertyValue(e);return null!=n&&""!==n||(vo.webkit?n=t.getPropertyValue("-webkit-"+e):vo.mozilla?n=t.getPropertyValue("-moz-"+e):vo.opera?n=t.getPropertyValue("-o-"+e):vo.msie&&(n=t.getPropertyValue("-ms-"+e))),n}function le(t,e,n,i){t.setProperty(e,n,i),vo.webkit?t.setProperty("-webkit-"+e,n,i):vo.mozilla?t.setProperty("-moz-"+e,n,i):vo.opera?t.setProperty("-o-"+e,n,i):vo.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 ce(t,e){return e="border-"+e,{width:parseFloat(he(t,e+"-width")),style:he(t,e+"-style"),color:Qt(he(t,e+"-color"),!0)}}function ue(t,e){var n=t.style.cssText,i=e();return t.style.cssText=n,i}function de(t,e){var n=he(t,"border-"+e+"-radius").split(/\s+/g).map(parseFloat);return 1==n.length&&n.push(n[0]),_e({x:n[0],y:n[1]})}function fe(t){var e=t.getBoundingClientRect();return e=pe(e,"border-*-width",t),e=pe(e,"padding-*",t)}function pe(t,e,n){var i,o,r,s,a;return"string"==typeof e?(i=ae(n),o=parseFloat(he(i,e.replace("*","top"))),r=parseFloat(he(i,e.replace("*","right"))),s=parseFloat(he(i,e.replace("*","bottom"))),a=parseFloat(he(i,e.replace("*","left")))):"number"==typeof e&&(o=r=s=a=e),{top:t.top+o,right:t.right-r,bottom:t.bottom-s,left:t.left+a,width:t.right-t.left-r-a,height:t.bottom-t.top-s-o}}function ge(t){var e,n,i=he(t,"transform");return"none"==i?null:(e=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(i),e?(n=he(t,"transform-origin"),e=e[1].split(/\s*,\s*/g).map(parseFloat),n=n.split(/\s+/g).map(parseFloat),{matrix:e,origin:n}):void 0)}function me(t){return 180*t/Math.PI%360}function ve(t){var e=parseFloat(t);return/grad$/.test(t)?Math.PI*e/200:/rad$/.test(t)?e:/turn$/.test(t)?Math.PI*e*2:/deg$/.test(t)?Math.PI*e/180:void 0}function xe(t,e){return e=new ln(e[0],e[1],e[2],e[3],e[4],e[5]),t.transform(e),e}function ye(t,e){t.clip(e)}function we(t,e,n,i){for(var o=new Mn([e,n],i).curvePoints(),r=1;r<o.length;)t.curveTo(o[r++],o[r++],o[r++])}function _e(t){return(t.x<=0||t.y<=0)&&(t.x=t.y=0),t}function be(t,e,n,i,o){var r=Math.max(0,e.x),s=Math.max(0,e.y),a=Math.max(0,n.x),h=Math.max(0,n.y),l=Math.max(0,i.x),c=Math.max(0,i.y),u=Math.max(0,o.x),d=Math.max(0,o.y),f=Math.min(t.width/(r+a),t.height/(h+c),t.width/(l+u),t.height/(d+s));return f<1&&(r*=f,s*=f,a*=f,h*=f,l*=f,c*=f,u*=f,d*=f),{tl:{x:r,y:s},tr:{x:a,y:h},br:{x:l,y:c},bl:{x:u,y:d}}}function Ce(t,e,n){var i,o,r,s,a,h,l,c,u=ae(t),d=de(u,"top-left"),f=de(u,"top-right"),p=de(u,"bottom-left"),g=de(u,"bottom-right");return"padding"!=n&&"content"!=n||(i=ce(u,"top"),o=ce(u,"right"),r=ce(u,"bottom"),s=ce(u,"left"),d.x-=s.width,d.y-=i.width,f.x-=o.width,f.y-=i.width,g.x-=o.width,g.y-=r.width,p.x-=s.width,p.y-=r.width,"content"==n&&(a=parseFloat(he(u,"padding-top")),h=parseFloat(he(u,"padding-right")),l=parseFloat(he(u,"padding-bottom")),c=parseFloat(he(u,"padding-left")),d.x-=c,d.y-=a,f.x-=h,f.y-=a,g.x-=h,g.y-=l,p.x-=c,p.y-=l)),"number"==typeof n&&(d.x-=n,d.y-=n,f.x-=n,f.y-=n,g.x-=n,g.y-=n,p.x-=n,p.y-=n),Te(e,d,f,g,p)}function Te(t,e,n,i,o){var r=be(t,e,n,i,o),s=r.tl,a=r.tr,h=r.br,l=r.bl,c=new Ln({fill:null,stroke:null});return c.moveTo(t.left,t.top+s.y),s.x&&we(c,t.left+s.x,t.top+s.y,{startAngle:-180,endAngle:-90,radiusX:s.x,radiusY:s.y}),c.lineTo(t.right-a.x,t.top),a.x&&we(c,t.right-a.x,t.top+a.y,{startAngle:-90,endAngle:0,radiusX:a.x,radiusY:a.y}),c.lineTo(t.right,t.bottom-h.y),h.x&&we(c,t.right-h.x,t.bottom-h.y,{startAngle:0,endAngle:90,radiusX:h.x,radiusY:h.y}),c.lineTo(t.left+l.x,t.bottom),l.x&&we(c,t.left+l.x,t.bottom-l.y,{startAngle:90,endAngle:180,radiusX:l.x,radiusY:l.y}),c.close()}function ke(t,e){var i=parseFloat(t)+"";switch(e){case"decimal-leading-zero":return i.length<2&&(i="0"+i),i;case"lower-roman":return n(t).toLowerCase();case"upper-roman":return n(t).toUpperCase();case"lower-latin":case"lower-alpha":return ee(t-1);case"upper-latin":case"upper-alpha":return ee(t-1).toUpperCase();default:return i}}function Me(t,e){function n(t,e,n){return n?(n=n.replace(/^\s*(["'])(.*)\1\s*$/,"$2"),Vt(t).map(function(t){return ke(t,e)}).join(n)):ke(Ut(t)||0,e)}var i,o=Co(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=Co(i[1]),r.push(n(o[0],o[1]))):(i=/^\s*counters\((.*?)\)\s*$/.exec(e))?(o=Co(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 Se(t){var e,n;if(t.cssText)return t.cssText;for(e=[],n=0;n<t.length;++n)e.push(t[n]+": "+he(t,t[n]));return e.join(";\n")}function Ee(t,e){function n(e,n){var o,r=ae(t,e);r.content&&"normal"!=r.content&&"none"!=r.content&&"0px"!=r.width&&(o=t.ownerDocument.createElement(xo),o.style.cssText=Se(r),o.textContent=Me(t,r.content),t.insertBefore(o,n),i.push(o))}var i,o;return t.tagName==xo?void Pe(t,e):(i=[],n(":before",t.firstChild),n(":after",null),o=t.className,t.className+=" kendo-pdf-hide-pseudo-elements",Pe(t,e),t.className=o,void i.forEach(function(e){t.removeChild(e)}))}function Pe(t,e){function i(e){var n,i,o,r,s,a;if(/^td$/i.test(t.tagName)&&(n=wo.table,n&&"collapse"==he(n.style,"border-collapse"))){if(i=ce(n.style,"left").width,o=ce(n.style,"top").width,0===i&&0===o)return e;if(r=n.element.getBoundingClientRect(),s=n.element.rows[0].cells[0],a=s.getBoundingClientRect(),a.top==r.top||a.left==r.left)return Ft(e).map(function(t){return{left:t.left+i,top:t.top+o,right:t.right+i,bottom:t.bottom+o,height:t.height,width:t.width}})}return e}function o(t,n,i,o,r,s,a,h){function l(e,n,o){var r=Math.PI/2*e/(e+i),s={x:n.x-e,y:n.y-i},a=new Ln({fill:{color:t},stroke:null}).moveTo(0,0);xe(a,o),we(a,0,n.y,{startAngle:-90,endAngle:-me(r),radiusX:n.x,radiusY:n.y}),s.x>0&&s.y>0?(a.lineTo(s.x*Math.cos(r),n.y-s.y*Math.sin(r)),we(a,0,n.y,{startAngle:-me(r),endAngle:-90,radiusX:s.x,radiusY:s.y,anticlockwise:!0})):s.x>0?a.lineTo(s.x,i).lineTo(0,i):a.lineTo(s.x,i).lineTo(s.x,0),u.append(a.close())}if(!(i<=0)){var c,u=new Yn;xe(u,h),e.append(u),_e(s),_e(a),c=new Ln({fill:{color:t},stroke:null}),u.append(c),c.moveTo(s.x?Math.max(s.x,o):0,0).lineTo(n-(a.x?Math.max(a.x,r):0),0).lineTo(n-Math.max(a.x,r),i).lineTo(Math.max(s.x,o),i).close(),s.x&&l(o,s,[-1,0,0,1,s.x,0]),a.x&&l(r,a,[1,0,0,1,n-a.x,0])}}function r(n){var i,o,r=new Yn;for(ye(r,Te(n,T,k,S,M)),e.append(r),"A"==t.tagName&&t.href&&!/^#?$/.test(t.getAttribute("href"))&&(wo._avoidLinks&&Ht(t,wo._avoidLinks)||(r._pdfLink={url:t.href,top:n.top,right:n.right,bottom:n.bottom,left:n.left})),P&&(i=new Ln({fill:{color:P.toCssRgba()},stroke:null}),i.moveTo(n.left,n.top).lineTo(n.right,n.top).lineTo(n.right,n.bottom).lineTo(n.left,n.bottom).close(),r.append(i)),o=l.length;--o>=0;)s(r,n,l[o],c[o%c.length],u[o%u.length],d[o%d.length],f[o%f.length])}function s(e,n,i,o,r,s,a){function h(e,n,i,h,l){function c(){for(;m.origin.x>n.left;)m.origin.x-=i}function u(){for(;m.origin.y>n.top;)m.origin.y-=h}function d(){for(;m.origin.x<n.right;)l(e,m.clone()),m.origin.x+=i}var f,p,g,m,v,x=i/h,y=n;if("content-box"==s?(y=pe(y,"border-*-width",t),y=pe(y,"padding-*",t)):"padding-box"==s&&(y=pe(y,"border-*-width",t)),/^\s*auto(\s+auto)?\s*$/.test(a)||("contain"==a?(f=Math.min(y.width/i,y.height/h),i*=f,h*=f):"cover"==a?(f=Math.max(y.width/i,y.height/h),i*=f,h*=f):(p=a.split(/\s+/g),i=/%$/.test(p[0])?y.width*parseFloat(p[0])/100:parseFloat(p[0]),h=1==p.length||"auto"==p[1]?i/x:/%$/.test(p[1])?y.height*parseFloat(p[1])/100:parseFloat(p[1]))),g=(r+"").split(/\s+/),1==g.length&&(g[1]="50%"),g[0]=/%$/.test(g[0])?parseFloat(g[0])/100*(y.width-i):parseFloat(g[0]),g[1]=/%$/.test(g[1])?parseFloat(g[1])/100*(y.height-h):parseFloat(g[1]),m=new dn([y.left+g[0],y.top+g[1]],[i,h]),"no-repeat"==o)l(e,m);else if("repeat-x"==o)c(),d();else if("repeat-y"==o)for(u();m.origin.y<n.bottom;)l(e,m.clone()),m.origin.y+=h;else if("repeat"==o)for(c(),u(),v=m.origin.clone();m.origin.y<n.bottom;)m.origin.x=v.x,d(),m.origin.y+=h}if(i&&"none"!=i)if("url"==i.type){if(/^url\(\"data:image\/svg/i.test(i.url))return;var l=yo[i.url];l&&l.width>0&&l.height>0&&h(e,n,l.width,l.height,function(t,e){t.append(new $n(i.url,e))})}else{if("linear"!=i.type)return;h(e,n,n.width,n.height,Ae(i))}}function a(){function i(n){ue(t,function(){t.style.position="relative";var i=t.ownerDocument.createElement(xo);i.style.position="absolute",i.style.boxSizing="border-box","outside"==r?(i.style.width="6em",i.style.left="-6.8em",i.style.textAlign="right"):i.style.left="0px",
  n(i),t.insertBefore(i,t.firstChild),Ge(i,e),t.removeChild(i)})}function o(e){var n,i=t.parentNode.children,o=t.getAttribute("kendo-split-index");if(null!=o)return e(0|o,i.length);for(n=0;n<i.length;++n)if(i[n]===t)return e(n,i.length)}var r,s=he(y,"list-style-type");if("none"!=s)switch(r=he(y,"list-style-position"),s){case"circle":case"disc":case"square":i(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:"■"}[s]});break;case"decimal":case"decimal-leading-zero":i(function(t){o(function(e){++e,"decimal-leading-zero"==s&&e<10&&(e="0"+e),t.innerHTML=e+"."})});break;case"lower-roman":case"upper-roman":i(function(t){o(function(e){e=n(e+1),"upper-roman"==s&&(e=e.toUpperCase()),t.innerHTML=e+"."})});break;case"lower-latin":case"lower-alpha":case"upper-latin":case"upper-alpha":i(function(t){o(function(e){e=ee(e),/^upper/i.test(s)&&(e=e.toUpperCase()),t.innerHTML=e+"."})})}}function h(n,i,s){function a(t){return{x:t.y,y:t.x}}var h,l,c,u,d,f,p,g;if(0!==n.width&&0!==n.height&&(r(n),h=C.width>0&&(i&&"ltr"==E||s&&"rtl"==E),l=_.width>0&&(s&&"ltr"==E||i&&"rtl"==E),0!==w.width||0!==C.width||0!==_.width||0!==b.width)){if(w.color==_.color&&w.color==b.color&&w.color==C.color&&w.width==_.width&&w.width==b.width&&w.width==C.width&&h&&l)return n=pe(n,w.width/2),c=Ce(t,n,w.width/2),c.options.stroke={color:w.color,width:w.width},void e.append(c);if(0===T.x&&0===k.x&&0===S.x&&0===M.x&&w.width<2&&C.width<2&&_.width<2&&b.width<2)return w.width>0&&e.append(new Ln({stroke:{width:w.width,color:w.color}}).moveTo(n.left,n.top+w.width/2).lineTo(n.right,n.top+w.width/2)),b.width>0&&e.append(new Ln({stroke:{width:b.width,color:b.color}}).moveTo(n.left,n.bottom-b.width/2).lineTo(n.right,n.bottom-b.width/2)),h&&e.append(new Ln({stroke:{width:C.width,color:C.color}}).moveTo(n.left+C.width/2,n.top).lineTo(n.left+C.width/2,n.bottom)),void(l&&e.append(new Ln({stroke:{width:_.width,color:_.color}}).moveTo(n.right-_.width/2,n.top).lineTo(n.right-_.width/2,n.bottom)));u=be(n,T,k,S,M),d=u.tl,f=u.tr,p=u.br,g=u.bl,o(w.color,n.width,w.width,C.width,_.width,d,f,[1,0,0,1,n.left,n.top]),o(b.color,n.width,b.width,_.width,C.width,p,g,[-1,0,0,-1,n.right,n.bottom]),o(C.color,n.height,C.width,b.width,w.width,a(g),a(d),[0,-1,1,0,n.left,n.bottom]),o(_.color,n.height,_.width,w.width,b.width,a(f),a(p),[0,1,-1,0,n.right,n.top])}}var l,c,u,d,f,p,g,m,v,x,y=ae(t),w=ce(y,"top"),_=ce(y,"right"),b=ce(y,"bottom"),C=ce(y,"left"),T=de(y,"top-left"),k=de(y,"top-right"),M=de(y,"bottom-left"),S=de(y,"bottom-right"),E=he(y,"direction"),P=he(y,"background-color");if(P=Qt(P),l=bo(he(y,"background-image")),c=Co(he(y,"background-repeat")),u=Co(he(y,"background-position")),d=Co(he(y,"background-origin")),f=Co(he(y,"background-size")),vo.msie&&vo.version<10&&(u=Co(t.currentStyle.backgroundPosition)),p=pe(t.getBoundingClientRect(),"border-*-width",t),function(){var t,n,i,o,r,s,a,h=he(y,"clip"),l=/^\s*rect\((.*)\)\s*$/.exec(h);l&&(t=l[1].split(/[ ,]+/g),n="auto"==t[0]?p.top:parseFloat(t[0])+p.top,i="auto"==t[1]?p.right:parseFloat(t[1])+p.left,o="auto"==t[2]?p.bottom:parseFloat(t[2])+p.top,r="auto"==t[3]?p.left:parseFloat(t[3])+p.left,s=new Yn,a=(new Ln).moveTo(r,n).lineTo(i,n).lineTo(i,o).lineTo(r,o).close(),ye(s,a),e.append(s),e=s,oe(a))}(),x=he(y,"display"),"table-row"==x)for(g=[],m=0,v=t.children;m<v.length;++m)g.push(v[m].getBoundingClientRect());else g=t.getClientRects(),1==g.length&&(g=[t.getBoundingClientRect()]);for(g=i(g),m=0;m<g.length;++m)h(g[m],0===m,m==g.length-1);return g.length>0&&"list-item"==x&&a(g[0]),function(){function n(){var n=Ce(t,p,"padding"),i=new Yn;ye(i,n),e.append(i),e=i,oe(n)}Re(t)?n():/^(hidden|auto|scroll)/.test(he(y,"overflow"))?n():/^(hidden|auto|scroll)/.test(he(y,"overflow-x"))?n():/^(hidden|auto|scroll)/.test(he(y,"overflow-y"))&&n()}(),Oe(t,e)||Ie(t,e),e}function Ae(t){return function(e,n){var i,o,r,s,a,h,l,c,u,d,f,p,g,m=n.width(),v=n.height();switch(t.type){case"linear":switch(i=null!=t.angle?t.angle:Math.PI,t.to){case"top":i=0;break;case"left":i=-Math.PI/2;break;case"bottom":i=Math.PI;break;case"right":i=Math.PI/2;break;case"top left":case"left top":i=-Math.atan2(v,m);break;case"top right":case"right top":i=Math.atan2(v,m);break;case"bottom left":case"left bottom":i=Math.PI+Math.atan2(v,m);break;case"bottom right":case"right bottom":i=Math.PI-Math.atan2(v,m)}t.reverse&&(i-=Math.PI),i%=2*Math.PI,i<0&&(i+=2*Math.PI),o=Math.abs(m*Math.sin(i))+Math.abs(v*Math.cos(i)),r=Math.atan(m*Math.tan(i)/v),s=Math.sin(r),a=Math.cos(r),h=Math.abs(s)+Math.abs(a),l=h/2*s,c=h/2*a,i>Math.PI/2&&i<=3*Math.PI/2&&(l=-l,c=-c),u=[],d=0,f=t.stops.map(function(e,n){var i,r=e.percent;return r?r=parseFloat(r)/100:e.length?r=parseFloat(e.length)/o:0===n?r=0:n==t.stops.length-1&&(r=1),i={color:e.color.toCssRgba(),offset:r},null!=r?(d=r,u.forEach(function(t,e){var n=t.stop;n.offset=t.left+(d-t.left)*(e+1)/(u.length+1)}),u=[]):u.push({left:d,stop:i}),i}),p=[.5-l,.5+c],g=[.5+l,.5-c],e.append(Ln.fromRect(n).stroke(null).fill(new Zn({start:p,end:g,stops:f,userSpace:!1})));break;case"radial":window.console&&window.console.log&&window.console.log("Radial gradients are not yet supported in HTML renderer")}}}function Oe(t,e){var n,i,o,r;if(window.kendo&&window.$&&t.getAttribute(window.kendo.attr("role"))&&(n=window.kendo.widgetInstance(window.$(t)),n&&(n.exportDOMVisual||n.exportVisual)))return!!(i=n.exportDOMVisual?n.exportDOMVisual():n.exportVisual())&&(o=new Yn,o.children.push(i),r=t.getBoundingClientRect(),o.transform(E().translate(r.left,r.top)),e.append(o),!0)}function ze(t,e,n){var i=fe(t),o=new dn([i.left,i.top],[i.width,i.height]),r=new $n(e,o);ye(r,Ce(t,i,"content")),n.append(r)}function Ne(t,e){var n=ae(t),i=ae(e),o=parseFloat(he(n,"z-index")),r=parseFloat(he(i,"z-index")),s=he(n,"position"),a=he(i,"position");return isNaN(o)&&isNaN(r)?/static|absolute/.test(s)&&/static|absolute/.test(a)?0:"static"==s?-1:"static"==a?1:0:isNaN(o)?0===r?0:r>0?-1:1:isNaN(r)?0===o?0:o>0?1:-1:parseFloat(o)-parseFloat(r)}function Re(t){return/^(?:textarea|select|input)$/i.test(t.tagName)}function Be(t){return t.selectedOptions&&t.selectedOptions.length>0?t.selectedOptions[0]:t.options[t.selectedIndex]}function Fe(t,e){var n=ae(t),i=he(n,"color"),o=t.getBoundingClientRect();"checkbox"==t.type?(e.append(Ln.fromRect(new dn([o.left+1,o.top+1],[o.width-2,o.height-2])).stroke(i,1)),t.checked&&e.append((new Ln).stroke(i,1.2).moveTo(o.left+.22*o.width,o.top+.55*o.height).lineTo(o.left+.45*o.width,o.top+.75*o.height).lineTo(o.left+.78*o.width,o.top+.22*o.width))):(e.append(new bn(new mn([(o.left+o.right)/2,(o.top+o.bottom)/2],Math.min(o.width-2,o.height-2)/2)).stroke(i,1)),t.checked&&e.append(new bn(new mn([(o.left+o.right)/2,(o.top+o.bottom)/2],Math.min(o.width-8,o.height-8)/2)).fill(i).stroke(null)))}function Le(t,e){var n,i,o,r,s,a=t.tagName.toLowerCase();if("input"==a&&("checkbox"==t.type||"radio"==t.type))return Fe(t,e);if(n=t.parentNode,i=t.ownerDocument,o=i.createElement(xo),o.style.cssText=Se(ae(t)),"input"==a&&(o.style.whiteSpace="pre"),"select"!=a&&"textarea"!=a||(o.style.overflow="auto"),"select"==a)if(t.multiple)for(s=0;s<t.options.length;++s)r=i.createElement(xo),r.style.cssText=Se(ae(t.options[s])),r.style.display="block",r.textContent=t.options[s].textContent,o.appendChild(r);else r=Be(t),r&&(o.textContent=r.textContent);else o.textContent=t.value;n.insertBefore(o,t),o.scrollLeft=t.scrollLeft,o.scrollTop=t.scrollTop,t.style.display="none",Ie(o,e),t.style.display="",n.removeChild(o)}function Ie(t,e){var n,i,o,r,s,a,h,l,c;switch(wo._stackingContext.element===t&&(wo._stackingContext.group=e),t.tagName.toLowerCase()){case"img":ze(t,t.src,e);break;case"canvas":try{ze(t,t.toDataURL("image/png"),e)}catch(u){}break;case"textarea":case"input":case"select":Le(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)&&De(t,s,e);break;case 1:a=ae(s),h=he(a,"display"),l=he(a,"float"),c=he(a,"position"),"static"!=c?r.push(s):"inline"!=h?"none"!=l?i.push(s):n.push(s):o.push(s)}f(n,Ne).forEach(function(t){Ge(t,e)}),f(i,Ne).forEach(function(t){Ge(t,e)}),f(o,Ne).forEach(function(t){Ge(t,e)}),f(r,Ne).forEach(function(t){Ge(t,e)})}}function De(t,e,n){function i(t){var e,n,i,o;if(vo.msie||vo.chrome){for(e=t.getClientRects(),n={top:1/0,right:-(1/0),bottom:-(1/0),left:1/0},i=0;i<e.length;++i)o=e[i],o.width<=1||o.bottom===b||(n.left=Math.min(o.left,n.left),n.top=Math.min(o.top,n.top),n.right=Math.max(o.right,n.right),n.bottom=Math.max(o.bottom,n.bottom));return n.width=n.right-n.left,n.height=n.bottom-n.top,n}return t.getBoundingClientRect()}function o(){var t,n,o,s,a,u,d,f=l,p=h.substr(l).search(/\S/);if(l+=p,p<0||l>=c)return!0;if(g.setStart(e,l),g.setEnd(e,l+1),t=i(g),n=!1,v&&(p=h.substr(l).search(/\s/),p>=0&&(g.setEnd(e,l+p),o=i(g),o.bottom==t.bottom&&(t=o,n=!0,l+=p))),!n){if(p=function m(n,o,r){g.setEnd(e,o);var s=i(g);return s.bottom!=t.bottom&&n<o?m(n,n+o>>1,o):s.right!=t.right?(t=s,o<r?m(o,o+r>>1,r):o):o}(l,Math.min(c,l+_),c),p==l)return!0;if(l=p,p=(""+g).search(/\s+$/),0===p)return!1;p>0&&(g.setEnd(e,g.startOffset+p),t=i(g))}if(vo.msie&&(t=g.getClientRects()[0]),s=""+g,/^(?:pre|pre-wrap)$/i.test(x)){if(/\t/.test(s)){for(a=0,p=f;p<g.startOffset;++p)u=h.charCodeAt(p),9==u?a+=8-a%8:10==u||13==u?a=0:a++;for(;(p=s.search("\t"))>=0;)d="        ".substr(0,8-(a+p)%8),s=s.substr(0,p)+d+s.substr(p+1)}}else s=s.replace(/\s+/g," ");n||(b=t.bottom),r(s,t)}function r(t,e){var i,o,r;vo.msie&&!isNaN(d)&&(i=ko(f),o=(e.top+e.bottom-i)/2,e={top:o,right:e.right,bottom:o+i,left:e.left,height:i,width:e.right-e.left}),r=new _o(t,new dn([e.left,e.top],[e.width,e.height]),{font:f,fill:{color:p}}),n.append(r),s(e)}function s(t){function e(e,i){var o,r;e&&(o=u/12,r=new Ln({stroke:{width:o,color:e}}),i-=o,r.moveTo(t.left,i).lineTo(t.right,i),n.append(r))}e(wo.underline,t.bottom),e(wo["line-through"],t.bottom-t.height/2.7),e(wo.overline,t.top)}var a,h,l,c,u,d,f,p,g,m,v,x,y,w,_,b;if(!re()&&(a=ae(t),!(parseFloat(he(a,"text-indent"))<-500)&&(h=e.data,l=0,c=h.search(/\S\s*$/)+1,c&&(u=he(a,"font-size"),d=he(a,"line-height"),f=[he(a,"font-style"),he(a,"font-variant"),he(a,"font-weight"),u,he(a,"font-family")].join(" "),u=parseFloat(u),d=parseFloat(d),0!==u)))){for(p=he(a,"color"),g=t.ownerDocument.createRange(),m=he(a,"text-align"),v="justify"==m,x=he(a,"white-space"),vo.msie&&(y=a.textOverflow,"ellipsis"==y&&(w=t.style.textOverflow,t.style.textOverflow="clip")),_=t.getBoundingClientRect().width/u*5,0===_&&(_=500),b=null;!o(););vo.msie&&"ellipsis"==y&&(t.style.textOverflow=w)}}function He(t,e,n){var i,o,r,s,a,h;for("auto"!=n?(i=wo._stackingContext.group,n=parseFloat(n)):(i=e,n=0),o=i.children,r=0;r<o.length&&!(null!=o[r]._dom_zIndex&&o[r]._dom_zIndex>n);++r);return s=new Yn,i.insert(r,s),s._dom_zIndex=n,i!==e&&wo._clipbox&&(a=wo._matrix.invert(),h=wo._clipbox.transformCopy(a),ye(s,Ln.fromRect(h))),s}function Ge(t,e){var n,i,o,r,s,a,h,l=ae(t),c=he(l,"counter-reset");c&&Kt(Co(c,/^\s+/),Jt,0),n=he(l,"counter-increment"),n&&Kt(Co(n,/^\s+/),Wt,1),/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(t.tagName)||null!=wo._clipbox&&(i=parseFloat(he(l,"opacity")),o=he(l,"visibility"),r=he(l,"display"),0!==i&&"hidden"!=o&&"none"!=r&&(s=ge(l),h=he(l,"z-index"),(s||i<1)&&"auto"==h&&(h=0),a=He(t,e,h),i<1&&a.opacity(i*a.opacity()),ne(t,l,a),s?ue(t,function(){var e,n,i,o;le(t.style,"transform","none","important"),le(t.style,"transition","none","important"),"static"==he(l,"position")&&le(t.style,"position","relative","important"),e=t.getBoundingClientRect(),n=e.left+s.origin[0],i=e.top+s.origin[1],o=[1,0,0,1,-n,-i],o=qe(o,s.matrix),o=qe(o,[1,0,0,1,n,i]),o=xe(a,o),wo._matrix=wo._matrix.multiplyCopy(o),Ee(t,a)}):Ee(t,a),ie()))}function qe(t,e){var n=t[0],i=t[1],o=t[2],r=t[3],s=t[4],a=t[5],h=e[0],l=e[1],c=e[2],u=e[3],d=e[4],f=e[5];return[n*h+i*c,n*l+i*u,o*h+r*c,o*l+r*u,s*h+a*c+d,s*l+a*u+f]}var je,$e,Xe,Ye,Ue,Ve,We,Je,Ke,Qe,Ze,tn,en,nn,on,rn,sn,an,hn,ln,cn,un,dn,fn,pn,gn,mn,vn,xn,yn,wn,_n,bn,Cn,Tn,kn,Mn,Sn,En,Pn,An,On,zn,Nn,Rn,Bn,Fn,Ln,In,Dn,Hn,Gn,qn,jn,$n,Xn,Yn,Un,Vn,Wn,Jn,Kn,Qn,Zn,ti,ei,ni,ii,oi,ri,si,ai,hi,li,ci,ui,di,fi,pi,gi,mi,vi,xi,yi,wi,_i,bi,Ci,Ti,ki,Mi,Si,Ei,Pi,Ai,Oi,zi,Ni,Ri,Bi,Fi,Li,Ii,Di,Hi,Gi,qi,ji,$i,Xi,Yi,Ui,Vi,Wi,Ji,Ki,Qi,Zi,to,eo,no,io,oo,ro,so,ao,ho,lo,co,uo,fo,po,go,mo,vo,xo,yo,wo,_o,bo,Co,To,ko,Mo;window.kendo=window.kendo||{},je=kendo.drawing,$e=je.util,Xe=kendo.Class,Ye=kendo.util,Ue=kendo.support,Ve=$e.createPromise,We=$e.promiseAll,Je={extend:function(t){var e,n=this;for(e in this)"extend"!==e&&(t[e]=n[e])},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=e.indexOf(t);return n!==-1&&e.splice(n,1),this},trigger:function(t,e){var n,i,o=this._observers;if(o&&!this._suspended)for(n=0;n<o.length;n++)i=o[n],i[t]&&i[t](e);return this},optionsChange:function(t){void 0===t&&(t={}),t.element=this,this.trigger("optionsChange",t)},geometryChange:function(){this.trigger("geometryChange",{element:this})},suspend:function(){return this._suspended=(this._suspended||0)+1,this},resume:function(){return this._suspended=Math.max((this._suspended||0)-1,0),this},_observerField:function(t,e){this[t]&&this[t].removeObserver(this),this[t]=e,e.addObserver(this)}},Ke={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"},Qe="undefined",Ze=1,tn=Math.PI/180,en=Number.MAX_VALUE,nn=-Number.MAX_VALUE,on="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",rn=String.fromCharCode,sn={append:e,arabicToRoman:n,createPromise:Ve,defined:i,definitionId:o,deg:r,encodeBase64:a,eventCoordinates:h,eventElement:l,isTransparent:c,last:u,limitValue:d,mergeSort:f,promiseAll:We,rad:p,round:m,valueOrDefault:v,bindEvents:x,elementOffset:y,elementSize:b,elementStyles:w,unbindEvents:C,DEG_TO_RAD:tn,MAX_NUM:en,MIN_NUM:nn},an={}.toString,hn=Xe.extend({init:function(t,e){var n,i,o=this;void 0===e&&(e=""),this.prefix=e;for(n in t)i=t[n],i=o._wrap(i,n),o[n]=i},get:function(t){for(var e,n=t.split("."),i=this;n.length&&i;)e=n.shift(),i=i[e];return i},set:function(t,e){var n=this.get(t);n!==e&&(this._set(t,this._wrap(e,t)),this.optionsChange({field:this.prefix+t,value:e}))},_set:function(t,e){var n,i,o,r=this,s=t.indexOf(".")>=0,a=this,h=t;if(s){for(n=h.split("."),i=this.prefix;n.length>1;)h=n.shift(),i+=h+".",o=a[h],o||(o=new hn({},i),o.addObserver(r),a[h]=o),a=o;h=n[0]}a._clear(h),a[h]=e},_clear:function(t){var e=this[t];e&&e.removeObserver&&e.removeObserver(this)},_wrap:function(t,e){var n=an.call(t),o=t;return null!==o&&i(o)&&"[object Object]"===n&&(t instanceof hn||t instanceof Xe||(o=new hn(o,this.prefix+e+".")),o.addObserver(this)),o}}),Je.extend(hn.prototype),ln=Xe.extend({init:function(t,e,n,i,o,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),this.a=t,this.b=e,this.c=n,this.d=i,this.e=o,this.f=r},multiplyCopy:function(t){return new ln(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,e=t.a,n=t.b,i=t.c,o=t.d,r=t.e,s=t.f,a=e*o-n*i;return 0===a?null:new ln(o/a,-n/a,-i/a,e/a,(i*s-o*r)/a,(n*r-e*s)/a)},clone:function(){return new ln(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)},round:function(t){return this.a=m(this.a,t),this.b=m(this.b,t),this.c=m(this.c,t),this.d=m(this.d,t),this.e=m(this.e,t),this.f=m(this.f,t),this},toArray:function(t){var e,n=[this.a,this.b,this.c,this.d,this.e,this.f];if(i(t))for(e=0;e<n.length;e++)n[e]=m(n[e],t);return n},toString:function(t,e){return void 0===e&&(e=","),this.toArray(t).join(e)}}),ln.translate=function(t,e){return new ln(1,0,0,1,t,e)},ln.unit=function(){return new ln(1,0,0,1,0,0)},ln.rotate=function(t,e,n){var i=new ln;return i.a=Math.cos(p(t)),i.b=Math.sin(p(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},ln.scale=function(t,e){return new ln(t,0,0,e,0,0)},ln.IDENTITY=ln.unit(),cn=Xe.extend({init:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e},equals:function(t){return t&&t.x===this.x&&t.y===this.y},clone:function(){return new cn(this.x,this.y)},rotate:function(t,e){var n=cn.create(e)||cn.ZERO;return this.transform(ln.rotate(t,n.x,n.y))},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 void 0===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 e=S(t),n=this,i=n.x,o=n.y;return this.x=e.a*i+e.c*o+e.e,this.y=e.b*i+e.d*o+e.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 Math.sqrt(e*e+n*n)},round:function(t){return this.x=m(this.x,t),this.y=m(this.y,t),this.geometryChange(),this},toArray:function(t){var e=i(t),n=e?m(this.x,t):this.x,o=e?m(this.y,t):this.y;return[n,o]},toString:function(t,e){var n,o,r;return void 0===e&&(e=" "),n=this,o=n.x,r=n.y,i(t)&&(o=m(o,t),r=m(r,t)),o+e+r}}),cn.create=function(t,e){if(i(t))return t instanceof cn?t:1===arguments.length&&2===t.length?new cn(t[0],t[1]):new cn(t,e)},cn.min=function(){var t,e,n=arguments,i=en,o=en;for(t=0;t<arguments.length;t++)e=n[t],i=Math.min(e.x,i),o=Math.min(e.y,o);return new cn(i,o)},cn.max=function(){var t,e,n=arguments,i=nn,o=nn;for(t=0;t<arguments.length;t++)e=n[t],i=Math.max(e.x,i),o=Math.max(e.y,o);return new cn(i,o)},cn.minPoint=function(){return new cn(nn,nn)},cn.maxPoint=function(){return new cn(en,en)},Object.defineProperties&&Object.defineProperties(cn,{ZERO:{get:function(){return new cn(0,0)}}}),M(cn.prototype,["x","y"]),Je.extend(cn.prototype),un=Xe.extend({init:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.width=t,this.height=e},equals:function(t){return t&&t.width===this.width&&t.height===this.height},clone:function(){return new un(this.width,this.height)},toArray:function(t){var e=i(t),n=e?m(this.width,t):this.width,o=e?m(this.height,t):this.height;return[n,o]}}),un.create=function(t,e){if(i(t))return t instanceof un?t:1===arguments.length&&2===t.length?new un(t[0],t[1]):new un(t,e)},Object.defineProperties&&Object.defineProperties(un,{ZERO:{get:function(){return new un(0,0)}}}),M(un.prototype,["width","height"]),Je.extend(un.prototype),dn=Xe.extend({init:function(t,e){void 0===t&&(t=new cn),void 0===e&&(e=new un),this.setOrigin(t),this.setSize(e)},clone:function(){return new dn(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",cn.create(t)),this.geometryChange(),this},getOrigin:function(){return this.origin},setSize:function(t){return this._observerField("size",un.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 dn.fromPoints(e,n,i,o)},transformCopy:function(t){return dn.fromPoints(this.topLeft().transform(t),this.bottomRight().transform(t))},expand:function(t,e){return void 0===e&&(e=t),this.size.width+=2*t,this.size.height+=2*e,this.origin.translate(-t,-e),this},expandCopy:function(t,e){return this.clone().expand(t,e)},containsPoint:function(t){var e=this.origin,n=this.bottomRight();return!(t.x<e.x||t.y<e.y||n.x<t.x||n.y<t.y)},_isOnPath:function(t,e){var n=this.expandCopy(e,e),i=this.expandCopy(-e,-e);return n.containsPoint(t)&&!i.containsPoint(t)}}),dn.fromPoints=function(){var t=cn.min.apply(null,arguments),e=cn.max.apply(null,arguments),n=new un(e.x-t.x,e.y-t.y);return new dn(t,n)},dn.union=function(t,e){return dn.fromPoints(cn.min(t.topLeft(),e.topLeft()),cn.max(t.bottomRight(),e.bottomRight()))},dn.intersect=function(t,e){var n={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y},i={left:e.topLeft().x,top:e.topLeft().y,right:e.bottomRight().x,bottom:e.bottomRight().y};if(n.left<=i.right&&i.left<=n.right&&n.top<=i.bottom&&i.top<=n.bottom)return dn.fromPoints(new cn(Math.max(n.left,i.left),Math.max(n.top,i.top)),new cn(Math.min(n.right,i.right),Math.min(n.bottom,i.bottom)))},Je.extend(dn.prototype),fn=Xe.extend({init:function(t){void 0===t&&(t=ln.unit()),this._matrix=t},clone:function(){return new fn(this._matrix.clone())},equals:function(t){return t&&t._matrix.equals(this._matrix)},translate:function(t,e){return this._matrix=this._matrix.multiplyCopy(ln.translate(t,e)),this._optionsChange(),this},scale:function(t,e,n){void 0===e&&(e=t),void 0===n&&(n=null);var i=n;return i&&(i=cn.create(i),this._matrix=this._matrix.multiplyCopy(ln.translate(i.x,i.y))),this._matrix=this._matrix.multiplyCopy(ln.scale(t,e)),i&&(this._matrix=this._matrix.multiplyCopy(ln.translate(-i.x,-i.y))),this._optionsChange(),this},rotate:function(t,e){var n=cn.create(e)||cn.ZERO;return this._matrix=this._matrix.multiplyCopy(ln.rotate(t,n.x,n.y)),this._optionsChange(),this},multiply:function(t){var e=S(t);return this._matrix=this._matrix.multiplyCopy(e),this._optionsChange(),this},matrix:function(t){return t?(this._matrix=t,this._optionsChange(),this):this._matrix},_optionsChange:function(){this.optionsChange({field:"transform",value:this})}}),Je.extend(fn.prototype),pn=Xe.extend({init:function(t){this._initOptions(t)},_initOptions:function(t){var e,n;void 0===t&&(t={}),e=t.clip,n=t.transform,n&&(t.transform=E(n)),e&&!e.id&&(e.id=o()),this.options=new hn(t),this.options.addObserver(this)},transform:function(t){return i(t)?void this.options.set("transform",E(t)):this.options.get("transform")},parentTransform:function(){for(var t,e,n=this;n.parent;)n=n.parent,e=n.transform(),e&&(t=e.matrix().multiplyCopy(t||ln.unit()));if(t)return E(t)},currentTransform:function(t){var e,n,i,o;if(void 0===t&&(t=this.parentTransform()),e=this.transform(),n=S(e),i=S(t),o=n&&i?i.multiplyCopy(n):n||i)return E(o)},visible:function(t){return i(t)?(this.options.set("visible",t),this):this.options.get("visible")!==!1},clip:function(t){var e=this.options;return i(t)?(t&&!t.id&&(t.id=o()),e.set("clip",t),this):e.get("clip")},opacity:function(t){return i(t)?(this.options.set("opacity",t),this):v(this.options.get("opacity"),1)},clippedBBox:function(t){var e,n=this._clippedBBox(t);if(n)return e=this.clip(),e?dn.intersect(n,e.bbox(t)):n},containsPoint:function(t,e){var n,i;return!!this.visible()&&(n=this.currentTransform(e),i=t,n&&(i=t.transformCopy(n.matrix().invert())),this._hasFill()&&this._containsPoint(i)||this._isOnPath&&this._hasStroke()&&this._isOnPath(i))},_hasFill:function(){var t=this.options.fill;return t&&!c(t.color)},_hasStroke:function(){var t=this.options.stroke;return t&&t.width>0&&!c(t.color)},_clippedBBox:function(t){return this.bbox(t)}}),pn.prototype.nodeType="Element",Je.extend(pn.prototype),gn=Math.PI/2,mn=Xe.extend({init:function(t,e){void 0===t&&(t=new cn),void 0===e&&(e=0),this.setCenter(t),this.setRadius(e)},setCenter:function(t){return this._observerField("center",cn.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 mn(this.center.clone(),this.radius)},pointAt:function(t){return this._pointAt(p(t))},bbox:function(t){var e,n,i,o,r=this,s=P(this.center,this.radius,this.radius,t),a=cn.maxPoint(),h=cn.minPoint();for(e=0;e<4;e++)n=r._pointAt(s.x+e*gn).transformCopy(t),i=r._pointAt(s.y+e*gn).transformCopy(t),o=new cn(n.x,i.y),a=cn.min(a,o),h=cn.max(h,o);return dn.fromPoints(a,h)},_pointAt:function(t){var e=this,n=e.center,i=e.radius;return new cn(n.x+i*Math.cos(t),n.y+i*Math.sin(t))},containsPoint:function(t){var e=this,n=e.center,i=e.radius,o=Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2)<=Math.pow(i,2);return o},_isOnPath:function(t,e){var n=this,i=n.center,o=n.radius,r=i.distanceTo(t);return o-e<=r&&r<=o+e}}),M(mn.prototype,["radius"]),Je.extend(mn.prototype),vn="Gradient",xn={extend:function(t){t.fill=this.fill,t.stroke=this.stroke},fill:function(t,e){var n,o=this.options;return i(t)?(t&&t.nodeType!==vn?(n={color:t},i(e)&&(n.opacity=e),o.set("fill",n)):o.set("fill",t),this):o.get("fill")},stroke:function(t,e,n){return i(t)?(this.options.set("stroke.color",t),i(e)&&this.options.set("stroke.width",e),i(n)&&this.options.set("stroke.opacity",n),this):this.options.get("stroke")}},yn=""+ln.IDENTITY,wn={extend:function(t){t.bbox=this.bbox,t.geometryChange=this.geometryChange},bbox:function(t){var e,n,i=S(this.currentTransform(t)),o=i?""+i:yn;return this._bboxCache&&this._matrixHash===o?e=this._bboxCache.clone():(e=this._bbox(i),this._bboxCache=e?e.clone():null,this._matrixHash=o),n=this.options.get("stroke.width"),n&&e&&e.expand(n/2),e},geometryChange:function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})}},_n="#000",bn=pn.extend({init:function(t,e){void 0===t&&(t=new mn),void 0===e&&(e={}),pn.fn.init.call(this,e),this.geometry(t),i(this.options.stroke)||this.stroke(_n)},rawBBox:function(){return this._geometry.bbox()},_bbox:function(t){return this._geometry.bbox(t)},_containsPoint:function(t){return this.geometry().containsPoint(t)},_isOnPath:function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)}}),bn.prototype.nodeType="Circle",xn.extend(bn.prototype),wn.extend(bn.prototype),O(bn.prototype,["geometry"]),Cn=10,Tn=45,kn=Math.pow,Mn=Xe.extend({init:function(t,e){void 0===t&&(t=new cn),void 0===e&&(e={}),this.setCenter(t),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 Mn(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},setCenter:function(t){return this._observerField("center",cn.create(t)),this.geometryChange(),this},getCenter:function(){return this.center},pointAt:function(t){var e=this.center,n=p(t);return new cn(e.x+this.radiusX*Math.cos(n),e.y+this.radiusY*Math.sin(n))},curvePoints:function(){var t,e,n,i=this,o=this.startAngle,r=this.anticlockwise?-1:1,s=[this.pointAt(o)],a=this._arcInterval(),h=a.endAngle-a.startAngle,l=Math.ceil(h/Tn),c=h/l,u=o;for(t=1;t<=l;t++)e=u+r*c,n=i._intervalCurvePoints(u,e),s.push(n.cp1,n.cp2,n.p2),u=e;return s},bbox:function(t){for(var e,n,i=this,o=this._arcInterval(),s=o.startAngle,a=o.endAngle,h=P(this.center,this.radiusX,this.radiusY,t),l=r(h.x),c=r(h.y),u=this.pointAt(a).transformCopy(t),d=I(l,s),f=I(c,s),p=this.pointAt(s).transformCopy(t),g=cn.min(p,u),m=cn.max(p,u);d<a||f<a;)e=void 0,d<a&&(e=i.pointAt(d).transformCopy(t),d+=90),n=void 0,f<a&&(n=i.pointAt(f).transformCopy(t),f+=90),p=new cn(e.x,n.y),g=cn.min(g,p),m=cn.max(m,p);return dn.fromPoints(g,m)},_arcInterval:function(){var t,e=this,n=e.startAngle,i=e.endAngle,o=e.anticlockwise;return o&&(t=n,n=i,i=t),(n>i||o&&n===i)&&(i+=360),{startAngle:n,endAngle:i}},_intervalCurvePoints:function(t,e){var n=this.pointAt(t),i=this.pointAt(e),o=this._derivativeAt(t),r=this._derivativeAt(e),s=(p(e)-p(t))/3,a=new cn(n.x+s*o.x,n.y+s*o.y),h=new cn(i.x-s*r.x,i.y-s*r.y);return{p1:n,cp1:a,cp2:h,p2:i}},_derivativeAt:function(t){var e=p(t);return new cn(-this.radiusX*Math.sin(e),this.radiusY*Math.cos(e))},containsPoint:function(t){var e,n,i,o=this._arcInterval(),r=o.endAngle-o.startAngle,s=this,a=s.center,h=s.radiusX,l=s.radiusY,c=a.distanceTo(t),u=Math.atan2(t.y-a.y,t.x-a.x),d=h*l/Math.sqrt(kn(h,2)*kn(Math.sin(u),2)+kn(l,2)*kn(Math.cos(u),2)),f=this.pointAt(this.startAngle).round(Cn),p=this.pointAt(this.endAngle).round(Cn),g=R(a,t.round(Cn),f,p);return r<180?e=g&&N(a.distanceTo(g),c)&&N(c,d):(n=F(a.x,a.y,h,l,t.x,t.y),360!==n&&(n=(360+n)%360),i=o.startAngle<=n&&n<=o.endAngle,e=i&&N(c,d)||!i&&(!g||g.equals(t))),e},_isOnPath:function(t,e){var n,i=this._arcInterval(),o=this.center,r=F(o.x,o.y,this.radiusX,this.radiusY,t.x,t.y);return 360!==r&&(r=(360+r)%360),n=i.startAngle<=r&&r<=i.endAngle,n&&this.pointAt(r).distanceTo(t)<=e}}),Mn.fromPoints=function(t,e,n,i,o,r){var s=L({x1:t.x,y1:t.y,x2:e.x,y2:e.y,rx:n,ry:i,largeArc:o,swipe:r});return new Mn(s.center,{startAngle:s.startAngle,endAngle:s.endAngle,radiusX:n,radiusY:i,anticlockwise:0===r})},M(Mn.prototype,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]),Je.extend(Mn.prototype),Sn=[].push,En=[].pop,Pn=[].splice,An=[].shift,On=[].slice,zn=[].unshift,Nn=Xe.extend({init:function(t){void 0===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=Sn.apply(this,t);return this._add(t),e},slice:function(){return On.call(this)},pop:function(){var t=this.length,e=En.apply(this);return t&&this._remove([e]),e},splice:function(t,e){var n=On.call(arguments,2),i=this._splice(t,e,n);return this._change(),i},shift:function(){var t=this.length,e=An.apply(this);return t&&this._remove([e]),e},unshift:function(){var t=arguments,e=zn.apply(this,t);return this._add(t),e},indexOf:function(t){var e,n=this,i=this.length;for(e=0;e<i;e++)if(n[e]===t)return e;return-1},_splice:function(t,e,n){var i=Pn.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){var e,n=this;for(e=0;e<t.length;e++)t[e].addObserver(n)},_clearObserver:function(t){var e,n=this;for(e=0;e<t.length;e++)t[e].removeObserver(n)},_change:function(){}}),Je.extend(Nn.prototype),Rn=Nn.extend({_change:function(){this.geometryChange()}}),Bn=Xe.extend({init:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.real=t,this.img=e},add:function(t){return new Bn(m(this.real+t.real,Cn),m(this.img+t.img,Cn))},addConstant:function(t){return new Bn(this.real+t,this.img)},negate:function(){return new Bn((-this.real),(-this.img))},multiply:function(t){return new Bn(this.real*t.real-this.img*t.img,this.real*t.img+this.img*t.real)},multiplyConstant:function(t){return new Bn(this.real*t,this.img*t)},nthRoot:function(t){var e=Math.atan2(this.img,this.real),n=Math.sqrt(Math.pow(this.img,2)+Math.pow(this.real,2)),i=Math.pow(n,1/t);return new Bn(i*Math.cos(e/t),i*Math.sin(e/t))},equals:function(t){return this.real===t.real&&this.img===t.img},isReal:function(){return 0===this.img}}),Fn=Xe.extend({init:function(t,e,n){this.anchor(t||new cn),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 dn.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=J([r.min,r.max,t.x,i.x]),h=J([s.min,s.max,t.y,i.y]);
  return dn.fromPoints(new cn(a.min,h.min),new cn(a.max,h.max))},_curveExtremesFor:function(t,e){var n=this._curveExtremes(t[0][e],t[1][e],t[2][e],t[3][e]);return{min:q(n.min,e,t),max:q(n.max,e,t)}},_curveExtremes:function(t,e,n,i){var o,r,s=t-3*e+3*n-i,a=-2*(t-2*e+n),h=t-e,l=Math.sqrt(a*a-4*s*h),c=0,u=1;return 0===s?0!==a&&(c=u=-h/a):isNaN(l)||(c=(-a+l)/(2*s),u=(-a-l)/(2*s)),o=Math.max(Math.min(c,u),0),(o<0||o>1)&&(o=0),r=Math.min(Math.max(c,u),1),(r>1||r<0)&&(r=1),{min:o,max:r}},_intersectionsTo:function(t,e){var n;return n=this.controlOut()&&t.controlIn()?V([this.anchor(),this.controlOut(),t.controlIn(),t.anchor()],e,this.bboxTo(t)):W(this.anchor(),t.anchor(),e)},_isOnCurveTo:function(t,e,n,i){var o,r,s,a,h,l,c,u=this.bboxTo(t).expand(n,n);if(u.containsPoint(e))return o=this.anchor(),r=this.controlOut(),s=t.controlIn(),a=t.anchor(),"start"===i&&o.distanceTo(e)<=n?!G(o,r,e):"end"===i&&a.distanceTo(e)<=n?!G(a,s,e):(h=[o,r,s,a],!(!U(h,e,"x","y",n)&&!U(h,e,"y","x",n))||(l=E().rotate(45,e),c=[o.transformCopy(l),r.transformCopy(l),s.transformCopy(l),a.transformCopy(l)],U(c,e,"x","y",n)||U(c,e,"y","x",n)))},_isOnLineTo:function(t,e,n){var i=this.anchor(),o=t.anchor(),s=r(Math.atan2(o.y-i.y,o.x-i.x)),a=new dn([i.x,i.y-n/2],[i.distanceTo(o),n]);return a.containsPoint(e.transformCopy(E().rotate(-s,i)))},_isOnPathTo:function(t,e,n,i){var o;return o=this.controlOut()&&t.controlIn()?this._isOnCurveTo(t,e,n/2,i):this._isOnLineTo(t,e,n)}}),H(Fn.prototype,["anchor","controlIn","controlOut"]),Je.extend(Fn.prototype),Ln=pn.extend({init:function(t){pn.fn.init.call(this,t),this.segments=new Rn,this.segments.addObserver(this),i(this.options.stroke)||(this.stroke("#000"),i(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=i(e)?new cn(t,e):t,o=new Fn(n);return this.segments.push(o),this},curveTo:function(t,e,n){var i,o;return this.segments.length>0&&(i=u(this.segments),o=new Fn(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,h,l;return this.segments.length>0&&(r=u(this.segments),s=r.anchor(),a=p(t),h=new cn(s.x-n*Math.cos(a),s.y-i*Math.sin(a)),l=new Mn(h,{startAngle:t,endAngle:e,radiusX:n,radiusY:i,anticlockwise:o}),this._addArcSegments(l)),this},arcTo:function(t,e,n,i,o){var r,s,a;return this.segments.length>0&&(r=u(this.segments),s=r.anchor(),a=Mn.fromPoints(s,t,e,n,i,o),this._addArcSegments(a)),this},_addArcSegments:function(t){var e,n,i=this;for(this.suspend(),e=t.curvePoints(),n=1;n<e.length;n+=3)i.curveTo(e[n],e[n+1],e[n+2]);this.resume(),this.geometryChange()},close:function(){return this.options.closed=!0,this.geometryChange(),this},rawBBox:function(){return this._bbox()},_containsPoint:function(t){var e,n,i,o=this.segments,r=o.length,s=0;for(i=1;i<r;i++)e=o[i-1],n=o[i],s+=e._intersectionsTo(n,t);return!this.options.closed&&o[0].anchor().equals(o[r-1].anchor())||(s+=W(o[0].anchor(),o[r-1].anchor(),t)),s%2!==0},_isOnPath:function(t,e){var n,i=this.segments,o=i.length,r=e||this.options.stroke.width;if(o>1){if(i[0]._isOnPathTo(i[1],t,r,"start"))return!0;for(n=2;n<=o-2;n++)if(i[n-1]._isOnPathTo(i[n],t,r))return!0;if(i[o-2]._isOnPathTo(i[o-1],t,r,"end"))return!0}return!1},_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 dn(n,un.ZERO);else if(s>0)for(i=1;i<s;i++)o=r[i-1].bboxTo(r[i],t),e=e?dn.union(e,o):o;return e}}),Ln.fromRect=function(t,e){return new Ln(e).moveTo(t.topLeft()).lineTo(t.topRight()).lineTo(t.bottomRight()).lineTo(t.bottomLeft()).close()},Ln.fromPoints=function(t,e){var n,i,o;if(t){for(n=new Ln(e),i=0;i<t.length;i++)o=cn.create(t[i]),o&&(0===i?n.moveTo(o):n.lineTo(o));return n}},Ln.fromArc=function(t,e){var n=new Ln(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},Ln.prototype.nodeType="Path",xn.extend(Ln.prototype),wn.extend(Ln.prototype),In="#000",Dn=pn.extend({init:function(t,e){void 0===t&&(t=new Mn),void 0===e&&(e={}),pn.fn.init.call(this,e),this.geometry(t),i(this.options.stroke)||this.stroke(In)},_bbox:function(t){return this._geometry.bbox(t)},rawBBox:function(){return this.geometry().bbox()},toPath:function(){var t,e=new Ln,n=this.geometry().curvePoints();if(n.length>0)for(e.moveTo(n[0].x,n[0].y),t=1;t<n.length;t+=3)e.curveTo(n[t],n[t+1],n[t+2]);return e},_containsPoint:function(t){return this.geometry().containsPoint(t)},_isOnPath:function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)}}),Dn.prototype.nodeType="Arc",xn.extend(Dn.prototype),wn.extend(Dn.prototype),O(Dn.prototype,["geometry"]),Hn=pn.extend({init:function(t){pn.fn.init.call(this,t),this.paths=new Rn,this.paths.addObserver(this),i(this.options.stroke)||this.stroke("#000")},moveTo:function(t,e){var n=new Ln;return n.moveTo(t,e),this.paths.push(n),this},lineTo:function(t,e){return this.paths.length>0&&u(this.paths).lineTo(t,e),this},curveTo:function(t,e,n){return this.paths.length>0&&u(this.paths).curveTo(t,e,n),this},arc:function(t,e,n,i,o){return this.paths.length>0&&u(this.paths).arc(t,e,n,i,o),this},arcTo:function(t,e,n,i,o){return this.paths.length>0&&u(this.paths).arcTo(t,e,n,i,o),this},close:function(){return this.paths.length>0&&u(this.paths).close(),this},_bbox:function(t){return K(this.paths,!0,t)},rawBBox:function(){return K(this.paths,!1)},_containsPoint:function(t){var e,n=this.paths;for(e=0;e<n.length;e++)if(n[e]._containsPoint(t))return!0;return!1},_isOnPath:function(t){var e,n=this.paths,i=this.options.stroke.width;for(e=0;e<n.length;e++)if(n[e]._isOnPath(t,i))return!0;return!1},_clippedBBox:function(t){return Q(this.paths,this.currentTransform(t))}}),Hn.prototype.nodeType="MultiPath",xn.extend(Hn.prototype),wn.extend(Hn.prototype),Gn="12px sans-serif",qn="#000",jn=pn.extend({init:function(t,e,n){void 0===e&&(e=new cn),void 0===n&&(n={}),pn.fn.init.call(this,n),this.content(t),this.position(e),this.options.font||(this.options.font=Gn),i(this.options.fill)||this.fill(qn)},content:function(t){return i(t)?(this.options.set("content",t),this):this.options.get("content")},measure:function(){var t=Ye.measureText(this.content(),{font:this.options.get("font")});return t},rect:function(){var t=this.measure(),e=this.position().clone();return new dn(e,[t.width,t.height])},bbox:function(t){var e=S(this.currentTransform(t));return this.rect().bbox(e)},rawBBox:function(){return this.rect().bbox()},_containsPoint:function(t){return this.rect().containsPoint(t)}}),jn.prototype.nodeType="Text",xn.extend(jn.prototype),H(jn.prototype,["position"]),$n=pn.extend({init:function(t,e,n){void 0===e&&(e=new dn),void 0===n&&(n={}),pn.fn.init.call(this,n),this.src(t),this.rect(e)},src:function(t){return i(t)?(this.options.set("src",t),this):this.options.get("src")},bbox:function(t){var e=S(this.currentTransform(t));return this._rect.bbox(e)},rawBBox:function(){return this._rect.bbox()},_containsPoint:function(t){return this._rect.containsPoint(t)},_hasFill:function(){return this.src()}}),$n.prototype.nodeType="Image",O($n.prototype,["rect"]),Xn={extend:function(t,e){t.traverse=function(t){var n,i,o=this[e];for(n=0;n<o.length;n++)i=o[n],i.traverse?i.traverse(t):t(i);return this}}},Yn=pn.extend({init:function(t){pn.fn.init.call(this,t),this.children=[]},childrenChange:function(t,e,n){this.trigger("childrenChange",{action:t,items:e,index:n})},append:function(){return e(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=this.children.indexOf(t);return e>=0&&(this.children.splice(e,1),t.parent=null,this.childrenChange("remove",[t],e)),this},removeAt:function(t){if(0<=t&&t<this.children.length){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 K(this.children,!0,this.currentTransform(t))},rawBBox:function(){return K(this.children,!1)},_clippedBBox:function(t){return Q(this.children,this.currentTransform(t))},currentTransform:function(t){return pn.prototype.currentTransform.call(this,t)||null},containsPoint:function(t,e){var n,i,o;if(this.visible())for(n=this.children,i=this.currentTransform(e),o=0;o<n.length;o++)if(n[o].containsPoint(t,i))return!0;return!1},_reparent:function(t,e){var n,i,o,r=this;for(n=0;n<t.length;n++)i=t[n],o=i.parent,o&&o!==r&&o.remove&&o.remove(i),i.parent=e}}),Yn.prototype.nodeType="Group",Xn.extend(Yn.prototype,"children"),Un={alignContent:"start",justifyContent:"start",alignItems:"start",spacing:0,orientation:"horizontal",lineSpacing:0,wrap:!0},Vn=Yn.extend({init:function(e,n){Yn.fn.init.call(this,t.extend({},Un,n)),this._rect=e,this._fieldMap={}},rect:function(t){return t?(this._rect=t,this):this._rect},_initMap:function(){var t=this.options,e=this._fieldMap;"horizontal"===t.orientation?(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,h,l,c,u,d,f,p,g,m,v,x,y,w,_,b,C,T,k;if(this._rect&&0!==this.children.length){for(this._initMap(),this.options.transform&&this.transform(null),t=this.options,e=this._rect,n=this._initGroups(),i=n.groups,o=n.groupsSize,r=this._fieldMap,s=r.sizeField,a=r.groupsSizeField,h=r.groupAxis,l=r.groupsAxis,c=new cn,u=new cn,d=new un,f=tt(o,e,t.alignContent,l,a),y=0;y<i.length;y++){for(v=i[y],c[h]=p=tt(v.size,e,t.justifyContent,h,s),c[l]=f,d[s]=v.size,d[a]=v.lineSize,x=new dn(c,d),w=0;w<v.bboxes.length;w++)m=v.elements[w],g=v.bboxes[w],u[h]=p,u[l]=tt(g.size[a],x,t.alignItems,l,a),Z(u,g,m),p+=g.size[s]+t.spacing;f+=v.lineSize+t.lineSpacing}!t.wrap&&v.size>e.size[s]&&(_=e.size[s]/x.size[s],b=x.topLeft().scale(_,_),C=x.size[a]*_,T=tt(C,e,t.alignContent,l,a),k=E(),"x"===h?k.translate(e.origin.x-b.x,T-b.y):k.translate(T-b.x,e.origin.y-b.y),k.scale(_,_),this.transform(k))}},_initGroups:function(){var t,e,n,i=this,o=this,r=o.options,s=o.children,a=r.lineSpacing,h=r.wrap,l=r.spacing,c=this._fieldMap.sizeField,u=this._newGroup(),d=[],f=function(){d.push(u),p+=u.lineSize+a},p=-a;for(t=0;t<s.length;t++)e=s[t],n=s[t].clippedBBox(),e.visible()&&n&&(h&&u.size+n.size[c]+l>i._rect.size[c]?0===u.bboxes.length?(i._addToGroup(u,n,e),f(),u=i._newGroup()):(f(),u=i._newGroup(),i._addToGroup(u,n,e)):i._addToGroup(u,n,e));return u.bboxes.length&&f(),{groups:d,groupsSize:p}},_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:[]}}}),Wn=pn.extend({init:function(t,e){void 0===t&&(t=new dn),void 0===e&&(e={}),pn.fn.init.call(this,e),this.geometry(t),i(this.options.stroke)||this.stroke("#000")},_bbox:function(t){return this._geometry.bbox(t)},rawBBox:function(){return this._geometry.bbox()},_containsPoint:function(t){return this._geometry.containsPoint(t)},_isOnPath:function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)}}),Wn.prototype.nodeType="Rect",xn.extend(Wn.prototype),wn.extend(Wn.prototype),O(Wn.prototype,["geometry"]),Jn=Nn.extend({_change:function(){this.optionsChange({field:"stops"})}}),Kn=Xe.extend({init:function(t,e,n){this.options=new hn({offset:t,color:e,opacity:i(n)?n:1}),this.options.addObserver(this)}}),Kn.create=function(t){if(i(t)){var e;return e=t instanceof Kn?t:t.length>1?new Kn(t[0],t[1],t[2]):new Kn(t.offset,t.color,t.opacity)}},pt(Kn.prototype,["offset","color","opacity"]),Je.extend(Kn.prototype),Qn=Xe.extend({init:function(t){void 0===t&&(t={}),this.stops=new Jn(this._createStops(t.stops)),this.stops.addObserver(this),this._userSpace=t.userSpace,this.id=o()},userSpace:function(t){return i(t)?(this._userSpace=t,this.optionsChange(),this):this._userSpace},_createStops:function(t){var e,n;for(void 0===t&&(t=[]),e=[],n=0;n<t.length;n++)e.push(Kn.create(t[n]));return e},addStop:function(t,e,n){this.stops.push(new Kn(t,e,n))},removeStop:function(t){var e=this.stops.indexOf(t);e>=0&&this.stops.splice(e,1)}}),Qn.prototype.nodeType="Gradient",Je.extend(Qn.prototype),t.extend(Qn.prototype,{optionsChange:function(t){this.trigger("optionsChange",{field:"gradient"+(t?"."+t.field:""),value:this})},geometryChange:function(){this.optionsChange()}}),Zn=Qn.extend({init:function(t){void 0===t&&(t={}),Qn.fn.init.call(this,t),this.start(t.start||new cn),this.end(t.end||new cn(1,0))}}),H(Zn.prototype,["start","end"]),ti=Qn.extend({init:function(t){void 0===t&&(t={}),Qn.fn.init.call(this,t),this.center(t.center||new cn),this._radius=i(t.radius)?t.radius:1,this._fallbackFill=t.fallbackFill},radius:function(t){return i(t)?(this._radius=t,this.geometryChange(),this):this._radius},fallbackFill:function(t){return i(t)?(this._fallbackFill=t,this.optionsChange(),this):this._fallbackFill}}),H(ti.prototype,["center"]),ei={swing:gt,linear:mt,easeOutElastic:vt},ni=Date.now||function(){return(new Date).getTime()},ii=Xe.extend({init:function(e,n){this.options=t.extend({},this.options,n),this.element=e},setup:function(){},step:function(){},play:function(){var t,e,n,i=this,o=this.options,r=o.duration,s=o.delay;void 0===s&&(s=0),t=ei[o.easing],e=ni()+s,n=e+r,0===r?(this.step(1),this.abort()):setTimeout(function(){var o=function(){var s,a,h,l;i._stopped||(s=ni(),a=d(s-e,0,r),h=a/r,l=t(h,a,0,1,r),i.step(l),s<n?kendo.animationFrame(o):i.abort())};o()},s)},abort:function(){this._stopped=!0},destroy:function(){this.abort()}}),ii.prototype.options={duration:500,easing:"swing"},oi=Xe.extend({init:function(){this._items=[]},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;o<r.length;o++)if(r[o].name.toLowerCase()===i){n=r[o];break}if(n)return new n.type(t,e)}}),oi.current=new oi,ii.create=function(t,e,n){return oi.current.create(t,e,n)},ri={l:function(t,e){var n,i,o=e.parameters,r=e.position;for(n=0;n<o.length;n+=2)i=new cn(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(n=0;n<s.length;n+=6)i=new cn(s[n],s[n+1]),o=new cn(s[n+2],s[n+3]),r=new cn(s[n+4],s[n+5]),e.isRelative&&(o.translateWith(a),i.translateWith(a),r.translateWith(a)),t.curveTo(i,o,r),a.x=r.x,a.y=r.y},v:function(t,e){var n=e.isRelative?0:e.position.x;xt(e.parameters,!0,n),this.l(t,e)},h:function(t,e){var n=e.isRelative?0:e.position.y;xt(e.parameters,!1,n),this.l(t,e)},a:function(t,e){var n,i,o,r,s,a,h=e.parameters,l=e.position;for(n=0;n<h.length;n+=7)i=h[n],o=h[n+1],r=h[n+3],s=h[n+4],a=new cn(h[n+5],h[n+6]),e.isRelative&&a.translateWith(l),t.arcTo(a,i,o,r,s),l.x=a.x,l.y=a.y},s:function(t,e){var n,i,o,r,s,a=e.parameters,h=e.position,l=e.previousCommand;for("s"!==l&&"c"!==l||(n=u(u(t.paths).segments).controlIn()),i=0;i<a.length;i+=4)o=new cn(a[i],a[i+1]),r=new cn(a[i+2],a[i+3]),s=void 0,e.isRelative&&(o.translateWith(h),r.translateWith(h)),s=n?yt(n,h):h.clone(),n=o,t.curveTo(s,o,r),h.x=r.x,h.y=r.y},q:function(t,e){var n,i,o,r,s=e.parameters,a=e.position;for(n=0;n<s.length;n+=4)i=new cn(s[n],s[n+1]),o=new cn(s[n+2],s[n+3]),e.isRelative&&(i.translateWith(a),o.translateWith(a)),r=wt(a,i,o),t.curveTo(r.controlOut,r.controlIn,o),a.x=o.x,a.y=o.y},t:function(t,e){var n,i,o,r,s,a=e.parameters,h=e.position,l=e.previousCommand;for("q"!==l&&"t"!==l||(i=u(u(t.paths).segments),n=i.controlIn().clone().translateWith(h.scaleCopy(-1/3)).scale(1.5)),o=0;o<a.length;o+=2)r=new cn(a[o],a[o+1]),e.isRelative&&r.translateWith(h),n=n?yt(n,h):h.clone(),s=wt(h,n,r),t.curveTo(s.controlOut,s.controlIn,r),h.x=r.x,h.y=r.y}},si=1/3,ai=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,hi=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g,li="m",ci="z",ui=Xe.extend({parse:function(t,e){var n,i=new Hn(e),o=new cn;return t.replace(ai,function(t,e,r,s){var a=e.toLowerCase(),h=a===e,l=_t(r.trim());if(a===li&&(h?(o.x+=l[0],o.y+=l[1]):(o.x=l[0],o.y=l[1]),i.moveTo(o.x,o.y),l.length>2&&(a="l",l.splice(0,2))),ri[a])ri[a](i,{parameters:l,position:o,isRelative:h,previousCommand:n}),s&&s.toLowerCase()===ci&&i.close();else if(a!==li)throw Error("Error while parsing SVG path. Unsupported command: "+a);n=a}),i}}),ui.current=new ui,Ln.parse=function(t,e){return ui.current.parse(t,e)},di=Xe.extend({init:function(){this._items=[]},register:function(t,e,n){var i=this._items,o=i[0],r={name:t,type:e,order:n};!o||n<o.order?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;i<o.length;i++)if(o[i].name===n){r=o[i];break}return r?new r.type(t,e):void kendo.logToConsole("Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n- The browser does not support SVG and Canvas. User agent: "+navigator.userAgent)}}),di.current=new di,fi=["click","mouseenter","mouseleave","mousemove","resize","tooltipOpen","tooltipClose"],pi=kendo.Observable.extend({init:function(e,n){kendo.Observable.fn.init.call(this),this.options=t.extend({},n),this.element=e,this._click=this._handler("click"),this._mouseenter=this._handler("mouseenter"),this._mouseleave=this._handler("mouseleave"),this._mousemove=this._handler("mousemove"),this._visual=new Yn,b(e,this.options),this.bind(fi,this.options),this._enableTracking()},draw:function(t){this._visual.children.push(t)},clear:function(){this._visual.children=[]},destroy:function(){this._visual=null,this.unbind()},eventTarget:function(t){for(var e,n=this,i=l(t);!e&&i&&(e=i._kendoNode,i!==n.element);)i=i.parentElement;if(e)return e.srcElement},exportVisual:function(){return this._visual},getSize:function(){return b(this.element)},currentSize:function(t){return t?void(this._size=t):this._size},setSize:function(t){b(this.element,t),this.currentSize(t),this._resize()},resize:function(t){var e=this.getSize(),n=this.currentSize();(t||(e.width>0||e.height>0)&&(!n||e.width!==n.width||e.height!==n.height))&&(this.currentSize(e),this._resize(e,t),this.trigger("resize",e))},size:function(t){return t?void this.setSize(t):this.getSize()},suspendTracking:function(){this._suspendedTracking=!0},resumeTracking:function(){this._suspendedTracking=!1},_enableTracking:function(){},_resize:function(){},_handler:function(t){var e=this;return function(n){var i=e.eventTarget(n);i&&!e._suspendedTracking&&e.trigger(t,{element:i,originalEvent:n,type:t})}},_elementOffset:function(){var t=this.element,e=w(t,["paddingLeft","paddingTop"]),n=e.paddingLeft,i=e.paddingTop,o=y(t),r=o.left,s=o.top;return{left:r+parseInt(n,10),top:s+parseInt(i,10)}},_surfacePoint:function(t){var e=this._elementOffset(),n=h(t),i=n.x-e.left,o=n.y-e.top;return new cn(i,o)}}),pi.create=function(t,e){return di.current.create(t,e)},pi.support={},gi=Xe.extend({init:function(t){this.childNodes=[],this.parent=null,t&&(this.srcElement=t,this.observe())},destroy:function(){var t,e,n=this;for(this.srcElement&&this.srcElement.removeObserver(this),t=this.childNodes,e=0;e<t.length;e++)n.childNodes[e].destroy();this.parent=null},load:function(){},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=this,o=t+e;for(n=t;n<o;n++)i.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()}}),mi={},vi="http://www.w3.org/2000/svg",xi="none",yi=function(t,e){t.innerHTML=e},"undefined"!=typeof document&&(wi="<svg xmlns='"+vi+"'></svg>",_i=document.createElement("div"),bi="undefined"!=typeof DOMParser,_i.innerHTML=wi,bi&&_i.firstChild.namespaceURI!==vi&&(yi=function(t,e){var n=new DOMParser,i=n.parseFromString(e,"text/xml"),o=document.adoptNode(i.documentElement);t.innerHTML="",t.appendChild(o)})),Ci=yi,Ti="transform",ki={clip:"clip-path",fill:"fill"},Mi=gi.extend({init:function(t){gi.fn.init.call(this,t),this.definitions={}},destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),gi.fn.destroy.call(this)},load:function(t,e){var n,o,r,s,a,h=this;for(n=0;n<t.length;n++)o=t[n],r=o.children,s=new mi[o.nodeType](o),i(e)?h.insertAt(s,e):h.append(s),s.createDefinitions(),r&&r.length>0&&s.load(r),a=h.element,a&&s.attachTo(a,e)},root:function(){for(var t=this;t.parent;)t=t.parent;return t},attachTo:function(t,e){var n,o=document.createElement("div");Ci(o,"<svg xmlns='"+vi+"' version='1.1'>"+this.render()+"</svg>"),n=o.firstChild.firstChild,n&&(i(e)?t.insertBefore(n,t.childNodes[e]||null):t.appendChild(n),this.setElement(n))},setElement:function(t){var e,n,i;for(this.element&&(this.element._kendoNode=null),this.element=t,this.element._kendoNode=this,e=this.childNodes,n=0;n<e.length;n++)i=t.childNodes[n],e[n].setElement(i)},clear:function(){var t,e;for(this.clearDefinitions(),this.element&&(this.element.innerHTML=""),t=this.childNodes,e=0;e<t.length;e++)t[e].destroy();this.childNodes=[]},removeSelf:function(){if(this.element){var t=this.element.parentNode;t&&t.removeChild(this.element),this.element=null}gi.fn.removeSelf.call(this)},template:function(){return this.renderChildren()},render:function(){return this.template()},renderChildren:function(){var t,e=this.childNodes,n="";for(t=0;t<e.length;t++)n+=e[t].render();return n},optionsChange:function(t){var e=t.field,n=t.value;"visible"===e?this.css("display",n?"":xi):ki[e]&&kt(e,n)?this.updateDefinition(e,n):"opacity"===e&&this.attr("opacity",n),gi.fn.optionsChange.call(this,t)},attr:function(t,e){this.element&&this.element.setAttribute(t,e)},allAttr:function(t){var e,n=this;for(e=0;e<t.length;e++)n.attr(t[e][0],t[e][1])},css:function(t,e){this.element&&(this.element.style[t]=e)},allCss:function(t){var e,n=this;for(e=0;e<t.length;e++)n.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([Ti,"matrix("+t.matrix().toString(6)+")"]),e},renderTransform:function(){return Ct(this.mapTransform(this.srcElement.transform()))},transformChange:function(t){t?this.allAttr(this.mapTransform(t)):this.removeAttr(Ti)},mapStyle:function(){var t=this.srcElement.options,e=[["cursor",t.cursor]];return t.visible===!1&&e.push(["display",xi]),e},renderStyle:function(){return bt("style",Tt(this.mapStyle(!0)))},renderOpacity:function(){return bt("opacity",this.srcElement.options.opacity)},createDefinitions:function(){var t,e,n,i,o=this.srcElement,r=this.definitions;if(o){t=o.options;for(n in ki)i=t.get(n),i&&kt(n,i)&&(r[n]=i,e=!0);e&&this.definitionChange({action:"add",definitions:r})}},definitionChange:function(t){this.parent&&this.parent.definitionChange(t)},updateDefinition:function(t,e){var n=this.definitions,i=n[t],o=ki[t],r={};i&&(r[t]=i,this.definitionChange({action:"remove",definitions:r}),delete n[t]),e?(r[t]=e,this.definitionChange({action:"add",definitions:r}),n[t]=e,this.attr(o,St(e.id))):i&&this.removeAttr(o)},clearDefinitions:function(){var t=this.definitions;this.definitionChange({action:"remove",definitions:t}),this.definitions={}},renderDefinitions:function(){return Ct(this.mapDefinitions())},mapDefinitions:function(){var t,e=this.definitions,n=[];for(t in e)n.push([ki[t],St(e[t].id)]);return n}}),Si=Mi.extend({template:function(){return"<stop "+this.renderOffset()+" "+this.renderStyle()+" />"},renderOffset:function(){return bt("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)}}),Ei=Mi.extend({init:function(t){Mi.fn.init.call(this,t),this.id=t.id,this.loadStops()},loadStops:function(){var t,e,n=this,i=this.srcElement.stops,o=this.element;for(t=0;t<i.length;t++)e=new Si(i[t]),n.append(e),o&&e.attachTo(o)},optionsChange:function(t){"gradient.stops"===t.field?(gi.prototype.clear.call(this),this.loadStops()):"gradient"===t.field&&this.allAttr(this.mapCoordinates())},renderCoordinates:function(){return Ct(this.mapCoordinates())},mapSpace:function(){return["gradientUnits",this.srcElement.userSpace()?"userSpaceOnUse":"objectBoundingBox"]}}),Pi=Ei.extend({template:function(){return"<linearGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.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}}),Ai=Ei.extend({template:function(){return"<radialGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.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}}),Oi=Mi.extend({init:function(t){Mi.fn.init.call(this),this.srcElement=t,this.id=t.id,this.load([t])},template:function(){return"<clipPath id='"+this.id+"'>"+this.renderChildren()+"</clipPath>"}}),zi=Mi.extend({init:function(){Mi.fn.init.call(this),this.definitionMap={}},attachTo:function(t){this.element=t},template:function(){return"<defs>"+this.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=Oi:"fill"===t&&(e instanceof Zn?n=Pi:e instanceof ti&&(n=Ai)),new n(e)},addDefinitions:function(t){var e,n=this;for(e in t)n.addDefinition(e,t[e])},addDefinition:function(t,e){var n,i=this,o=i.element,r=i.definitionMap,s=e.id,a=r[s];a?a.count++:(n=this.createDefinition(t,e),r[s]={element:n,count:1},this.append(n),o&&n.attachTo(this.element))},removeDefinitions:function(t){var e,n=this;for(e in t)n.removeDefinition(t[e])},removeDefinition:function(t){var e=this.definitionMap,n=t.id,i=e[n];i&&(i.count--,0===i.count&&(this.remove(this.childNodes.indexOf(i.element),1),delete e[n]))}}),Ni=Mi.extend({init:function(t){Mi.fn.init.call(this),this.options=t,this.defs=new zi},attachTo:function(t){this.element=t,this.defs.attachTo(t.firstElementChild)},clear:function(){gi.prototype.clear.call(this)},template:function(){return this.defs.render()+this.renderChildren()},definitionChange:function(t){this.defs.definitionChange(t)}}),Ri=pi.extend({init:function(t,e){pi.fn.init.call(this,t,e),this._root=new Ni(this.options),Ci(this.element,this._template()),this._rootElement=this.element.firstElementChild,Et(this._rootElement),this._root.attachTo(this._rootElement),x(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()},destroy:function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,C(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),pi.fn.destroy.call(this)},translate:function(t){var e=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){pi.fn.draw.call(this,t),this._root.load([t])},clear:function(){pi.fn.clear.call(this),this._root.clear()},svg:function(){return"<?xml version='1.0' ?>"+this._template()},exportVisual:function(){var t,e=this,n=e._visual,i=e._offset;return i&&(t=new Yn,t.children.push(n),t.transform(E().translate(-i.x,-i.y)),n=t),n},_resize:function(){this._offset&&this.translate(this._offset)},_template:function(){return"<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='"+vi+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+this._root.render()+"</svg>"}}),Ri.prototype.type="svg","undefined"!=typeof document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(pi.support.svg=!0,di.current.register("svg",Ri,10)),Bi=Mi.extend({template:function(){return"<g"+(this.renderTransform()+this.renderStyle()+this.renderOpacity()+this.renderDefinitions())+">"+this.renderChildren()+"</g>"},optionsChange:function(t){"transform"===t.field&&this.transformChange(t.value),Mi.fn.optionsChange.call(this,t)}}),mi.Group=Bi,Fi={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]},Li="solid",Ii="butt",Di={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},Hi=" ",Gi=Mi.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"transform":this.transformChange(t.value);break;default:var e=Di[t.field];e&&this.attr(e,t.value)}Mi.fn.optionsChange.call(this,t)},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=this,a=t.segments,h=a.length;if(h>0){for(e=[],o=1;o<h;o++)r=s.segmentType(a[o-1],a[o]),r!==i&&(i=r,e.push(r)),e.push("L"===r?s.printPoints(a[o].anchor()):s.printPoints(a[o-1].controlOut(),a[o].controlIn(),a[o].anchor()));return n="M"+this.printPoints(a[0].anchor())+Hi+e.join(Hi),t.options.closed&&(n+="Z"),n}},printPoints:function(){var t,e=arguments,n=e.length,i=[];for(t=0;t<n;t++)i.push(e[t].toString(3));return i.join(" ")},segmentType:function(t,e){return t.controlOut()&&e.controlIn()?"C":"L"},mapStroke:function(t){var e=[];return t&&!c(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]),i(t.opacity)&&e.push(["stroke-opacity",t.opacity]),i(t.dashType)&&e.push(["stroke-dasharray",this.renderDashType(t)])):e.push(["stroke",xi]),e},renderStroke:function(){return Ct(this.mapStroke(this.srcElement.options.stroke))},renderDashType:function(t){var e,n,i,o=t.dashType,r=t.width;if(void 0===r&&(r=1),o&&o!==Li){for(e=Fi[o.toLowerCase()],n=[],i=0;i<e.length;i++)n.push(e[i]*r);return n.join(" ")}},renderLinecap:function(t){var e=t.dashType,n=t.lineCap;return e&&"solid"!==e?Ii:n},mapFill:function(t){var e=[];return t&&"Gradient"===t.nodeType||(t&&!c(t.color)?(e.push(["fill",t.color]),i(t.opacity)&&e.push(["fill-opacity",t.opacity])):e.push(["fill",xi])),e},renderFill:function(){return Ct(this.mapFill(this.srcElement.options.fill))},template:function(){return"<path "+this.renderStyle()+" "+this.renderOpacity()+" "+bt("d",this.renderData())+this.renderStroke()+this.renderFill()+this.renderDefinitions()+this.renderTransform()+"></path>"}}),mi.Path=Gi,qi=Gi.extend({renderData:function(){return this.printPath(this.srcElement.toPath())}}),mi.Arc=qi,ji=Gi.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:function(){return"<circle "+this.renderStyle()+" "+this.renderOpacity()+"cx='"+this.center().x+"' cy='"+this.center().y+"' r='"+this.radius()+"'"+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+this.renderTransform()+" ></circle>";
  }}),mi.Circle=ji,$i=Gi.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:function(){return"<rect "+this.renderStyle()+" "+this.renderOpacity()+" x='"+this.origin().x+"' y='"+this.origin().y+"' width='"+this.size().width+"' height='"+this.size().height+"' "+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+" "+this.renderTransform()+" />"}}),mi.Rect=$i,Xi=Gi.extend({geometryChange:function(){this.allAttr(this.mapPosition()),this.invalidate()},optionsChange:function(t){"src"===t.field&&this.allAttr(this.mapSource()),Gi.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 Ct(this.mapPosition())},mapSource:function(t){var e=this.srcElement.src();return t&&(e=kendo.htmlEncode(e)),[["xlink:href",e]]},renderSource:function(){return Ct(this.mapSource(!0))},template:function(){return"<image preserveAspectRatio='none' "+this.renderStyle()+" "+this.renderTransform()+" "+this.renderOpacity()+this.renderPosition()+" "+this.renderSource()+" "+this.renderDefinitions()+"></image>"}}),mi.Image=Xi,"undefined"!=typeof document&&(Pt._element=document.createElement("span")),Yi=Gi.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",Tt(this.mapStyle())),this.geometryChange()):"content"===t.field&&Gi.fn.content.call(this,this.srcElement.content()),Gi.fn.optionsChange.call(this,t)},mapStyle:function(t){var e=Gi.fn.mapStyle.call(this,t),n=this.srcElement.options.font;return t&&(n=kendo.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=Pt(t),t=kendo.htmlEncode(t)},template:function(){return"<text "+this.renderStyle()+" "+this.renderOpacity()+" x='"+this.pos().x+"' y='"+this.pos().y+"'"+this.renderStroke()+" "+this.renderTransform()+" "+this.renderDefinitions()+this.renderFill()+">"+this.renderContent()+"</text>"}}),mi.Text=Yi,Ui=Gi.extend({renderData:function(){var t,e,n=this,i=this.srcElement.paths;if(i.length>0){for(t=[],e=0;e<i.length;e++)t.push(n.printPath(i[e]));return t.join(" ")}}}),mi.MultiPath=Ui,Vi={Circle:mn,Arc:Mn,Rect:dn,Point:cn,Segment:Fn,Matrix:ln,Size:un,toMatrix:S,Transformation:fn,transform:E},Wi={Surface:Ri,RootNode:Ni,Node:Mi,GroupNode:Bi,ArcNode:qi,CircleNode:ji,RectNode:$i,ImageNode:Xi,TextNode:Yi,PathNode:Gi,MultiPathNode:Ui,DefinitionNode:zi,ClipNode:Oi,GradientStopNode:Si,LinearGradientNode:Pi,RadialGradientNode:Ai,exportGroup:At},Ji={},Ki=gi.extend({init:function(t){gi.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(),gi.fn.clear.call(this)},clearClip:function(){this.clip&&(this.clip.removeObserver(this),delete this.clip)},setClip:function(t){this.clip&&(t.beginPath(),Ot(t,this.clip),t.clip())},optionsChange:function(t){"clip"===t.field&&(this.clearClip(),this.initClip()),gi.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 o,r,s,a,h=this;for(o=0;o<t.length;o++)r=t[o],s=r.children,a=new Ji[r.nodeType](r,n),s&&s.length>0&&a.load(s,e,n),i(e)?h.insertAt(a,e):h.append(a)},load:function(t,e,n){this.loadElements(t,e,n),this.invalidate()},setOpacity:function(t){if(this.srcElement){var e=this.srcElement.opacity();i(e)&&this.globalAlpha(t,e)}},globalAlpha:function(t,e){var n=e;n&&t.globalAlpha&&(n*=t.globalAlpha),t.globalAlpha=n},visible:function(){var t=this.srcElement;return!t||t&&t.options.visible!==!1}}),Qi=Ki.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;n<e.length;n++)i=e[n],i.visible()&&i.renderTo(t);t.restore()}}}),Xn.extend(Qi.prototype,"childNodes"),Ji.Group=Qi,Zi=1e3/60,to=Qi.extend({init:function(t){Qi.fn.init.call(this),this.canvas=t,this.ctx=t.getContext("2d");var e=this._invalidate.bind(this);this.invalidate=kendo.throttle(function(){kendo.animationFrame(e)},Zi)},destroy:function(){Qi.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))}}),Xn.extend(to.prototype,"childNodes"),eo=Xe.extend({init:function(){this.shapes=[]},_add:function(t,e){this.shapes.push({bbox:e,shape:t}),t._quadNode=this},pointShapes:function(t){var e,n=this.shapes,i=n.length,o=[];for(e=0;e<i;e++)n[e].bbox.containsPoint(t)&&o.push(n[e].shape);return o},insert:function(t,e){this._add(t,e)},remove:function(t){var e,n=this.shapes,i=n.length;for(e=0;e<i;e++)if(n[e].shape===t){n.splice(e,1);break}}}),no=eo.extend({init:function(t){eo.fn.init.call(this),this.children=[],this.rect=t},inBounds:function(t){var e=this.rect,n=e.bottomRight(),i=t.bottomRight(),o=e.origin.x<=t.origin.x&&e.origin.y<=t.origin.y&&i.x<=n.x&&i.y<=n.y;return o},pointShapes:function(t){var n,i=this.children,o=i.length,r=eo.fn.pointShapes.call(this,t);for(n=0;n<o;n++)e(r,i[n].pointShapes(t));return r},insert:function(t,e){var n,i=this.children,o=!1;if(this.inBounds(e)){if(this.shapes.length<4)this._add(t,e);else{for(i.length||this._initChildren(),n=0;n<i.length;n++)if(i[n].insert(t,e)){o=!0;break}o||this._add(t,e)}o=!0}return o},_initChildren:function(){var t=this,e=t.rect,n=t.children,i=e.center(),o=e.width()/2,r=e.height()/2;n.push(new no(new dn([e.origin.x,e.origin.y],[o,r])),new no(new dn([i.x,e.origin.y],[o,r])),new no(new dn([e.origin.x,i.y],[o,r])),new no(new dn([i.x,i.y],[o,r])))}}),io=3e3,oo=1e4,ro=75,so=Xe.extend({init:function(){this.initRoots()},initRoots:function(){this.rootMap={},this.root=new eo,this.rootElements=[]},clear:function(){var t,e=this,n=this.rootElements;for(t=0;t<n.length;t++)e.remove(n[t]);this.initRoots()},pointShape:function(t){var e,n=(this.rootMap[Math.floor(t.x/io)]||{})[Math.floor(t.y/io)],i=this.root.pointShapes(t);for(n&&(i=i.concat(n.pointShapes(t))),this.assignZindex(i),i.sort(zt),e=0;e<i.length;e++)if(i[e].containsPoint(t))return i[e]},assignZindex:function(t){var e,n,i,o,r,s=this;for(e=0;e<t.length;e++){for(n=t[e],i=0,o=Math.pow(oo,ro),r=[];n;)r.push(n),n=n.parent;for(;r.length;)n=r.pop(),i+=((n.parent?n.parent.children:s.rootElements).indexOf(n)+1)*o,o/=oo;t[e]._zIndex=i}},optionsChange:function(t){"transform"!==t.field&&"stroke.width"!==t.field||this.bboxChange(t.element)},geometryChange:function(t){this.bboxChange(t.element)},bboxChange:function(t){var e,n=this;if("Group"===t.nodeType)for(e=0;e<t.children.length;e++)n.bboxChange(t.children[e]);else t._quadNode&&t._quadNode.remove(t),this._insertShape(t)},add:function(t){var n=Array.isArray(t)?t.slice(0):[t];e(this.rootElements,n),this._insert(n)},childrenChange:function(t){var e,n=this;if("remove"===t.action)for(e=0;e<t.items.length;e++)n.remove(t.items[e]);else this._insert(Array.prototype.slice.call(t.items,0))},_insert:function(t){for(var n,i=this;t.length>0;)n=t.pop(),n.addObserver(i),"Group"===n.nodeType?e(t,n.children):i._insertShape(n)},_insertShape:function(t){var e,n,i,o,r=t.bbox();r&&(e=this.getSectors(r),n=e[0][0],i=e[1][0],this.inRoot(e)?this.root.insert(t,r):(o=this.rootMap,o[n]||(o[n]={}),o[n][i]||(o[n][i]=new no(new dn([n*io,i*io],[io,io]))),o[n][i].insert(t,r)))},remove:function(t){var e,n,i=this;if(t.removeObserver(this),"Group"===t.nodeType)for(e=t.children,n=0;n<e.length;n++)i.remove(e[n]);else t._quadNode&&(t._quadNode.remove(t),delete t._quadNode)},inRoot:function(t){return t[0].length>1||t[1].length>1},getSectors:function(t){var e,n,i=t.bottomRight(),o=Math.floor(i.x/io),r=Math.floor(i.y/io),s=[[],[]];for(e=Math.floor(t.origin.x/io);e<=o;e++)s[0].push(e);for(n=Math.floor(t.origin.y/io);n<=r;n++)s[1].push(n);return s}}),ao=pi.extend({init:function(t,e){var n,i;pi.fn.init.call(this,t,e),this.element.innerHTML=this._template(this),n=this.element.firstElementChild,i=b(t),n.width=i.width,n.height=i.height,this._rootElement=n,this._root=new to(n),this._mouseTrackHandler=this._trackMouse.bind(this),x(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},destroy:function(){pi.fn.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),C(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},draw:function(t){pi.fn.draw.call(this,t),this._root.load([t],void 0,this.options.cors),this._searchTree&&this._searchTree.add([t])},clear:function(){pi.fn.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear()},eventTarget:function(t){var e,n;if(this._searchTree)return e=this._surfacePoint(t),n=this._searchTree.pointShape(e)},image:function(){var t,e=this,n=e._root,i=e._rootElement,o=[];return n.traverse(function(t){t.loading&&o.push(t.loading)}),t=Ve(),We(o).then(function(){n._invalidate();try{var e=i.toDataURL();t.resolve(e)}catch(o){t.reject(o)}},function(e){t.reject(e)}),t},suspendTracking:function(){pi.fn.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},resumeTracking:function(){var t,e,n;if(pi.fn.resumeTracking.call(this),!this._searchTree){for(this._searchTree=new so,t=this._root.childNodes,e=[],n=0;n<t.length;n++)e.push(t[n].srcElement);this._searchTree.add(e)}},_resize:function(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.invalidate()},_template:function(){return"<canvas style='width: 100%; height: 100%;'></canvas>"},_enableTracking:function(){this._searchTree=new so,pi.fn._enableTracking.call(this)},_trackMouse:function(t){var e,n;this._suspendedTracking||(e=this.eventTarget(t),"click"!==t.type?(n=this._currentShape,n&&n!==e&&this.trigger("mouseleave",{element:n,originalEvent:t,type:"mouseleave"}),e&&n!==e&&this.trigger("mouseenter",{element:e,originalEvent:t,type:"mouseenter"}),this.trigger("mousemove",{element:e,originalEvent:t,type:"mousemove"}),this._currentShape=e):e&&this.trigger("click",{element:e,originalEvent:t,type:"click"}))}}),ao.prototype.type="canvas","undefined"!=typeof document&&document.createElement("canvas").getContext&&(pi.support.canvas=!0,di.current.register("canvas",ao,20)),ho=Ki.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):c(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 n,i,o,r,s=this.srcElement.rawBBox();e instanceof Zn?(i=e.start(),o=e.end(),n=t.createLinearGradient(i.x,i.y,o.x,o.y)):e instanceof ti&&(r=e.center(),n=t.createRadialGradient(r.x,r.y,0,r.x,r.y,e.radius())),Nt(n,e.stops),t.save(),e.userSpace()||t.transform(s.width(),0,0,s.height(),s.origin.x,s.origin.y),t.fillStyle=n,t.fill(),t.restore()},setStroke:function(t){var e=this.srcElement.options.stroke;if(e&&!c(e.color)&&e.width>0)return t.strokeStyle=e.color,t.lineWidth=v(e.width,1),t.save(),this.globalAlpha(t,e.opacity),t.stroke(),t.restore(),!0},dashType:function(){var t=this.srcElement.options.stroke;if(t&&t.dashType)return t.dashType.toLowerCase()},setLineDash:function(t){var e,n=this.dashType();n&&n!==Li&&(e=Fi[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!==Li?t.lineCap=Ii: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){Ot(t,e)}}),Ji.Path=ho,lo=ho.extend({renderPoints:function(t){var e=this.srcElement.toPath();Ot(t,e)}}),Ji.Arc=lo,co=ho.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)}}),Ji.Circle=co,uo=ho.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)}}),Ji.Rect=uo,fo=ho.extend({init:function(t,e){ho.fn.init.call(this,t),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=Ve();var n=this.img=new Image;e&&!/^data:/i.test(t.src())&&(n.crossOrigin=e),n.src=t.src(),n.complete?this.onLoad():(n.onload=this.onLoad,n.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(t){"src"===t.field?(this.loading=Ve(),this.img.src=this.srcElement.src()):ho.fn.optionsChange.call(this,t)},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())}}),Ji.Image=fo,po=ho.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()}}),Ji.Text=po,go=ho.extend({renderPoints:function(t){var e,n=this.srcElement.paths;for(e=0;e<n.length;e++)Ot(t,n[e])}}),Ji.MultiPath=go,mo={Surface:ao,RootNode:to,Node:Ki,GroupNode:Qi,ArcNode:lo,CircleNode:co,RectNode:uo,ImageNode:fo,TextNode:po,PathNode:ho,MultiPathNode:go},vo=Ue.browser,xo="KENDO-PSEUDO-ELEMENT",yo={},wo={},wo._root=wo,_o=jn.extend({init:function(t,e,n){jn.fn.init.call(this,t,e.getOrigin(),n),this._pdfRect=e},rect:function(){return this._pdfRect},rawBBox:function(){return this._pdfRect}}),$t.getFontFaces=Xt,$t.drawText=function(t){var e=new Yn;return wo._clipbox=!1,wo._matrix=ln.unit(),wo._stackingContext={element:t,group:e},ne(t,ae(t),e),3==t.firstChild.nodeType?De(t,t.firstChild,e):Pe(t,e),ie(),e},bo=function(){function t(t){function f(){var e=s.exec(t);e&&(t=t.substr(e[1].length))}function p(e){f();var n=e.exec(t);if(n)return t=t.substr(n[1].length),n[1]}function g(){var e,o,r,s=kendo.parseColor(t,!0);if(s)return r=/^#[0-9a-f]+/i.exec(t)||/^rgba?\(.*?\)/i.exec(t)||/^..*?\b/.exec(t),t=t.substr(r[0].length),s=s.toRGB(),(e=p(i))||(o=p(n)),{color:s,length:e,percent:o}}function m(e){var i,s,c,u,d,f,m=[],v=!1;if(p(a)){for(i=p(r),i?(i=ve(i),p(l)):(s=p(o),"to"==s?s=p(o):s&&/^-/.test(e)&&(v=!0),c=p(o),p(l)),/-moz-/.test(e)&&null==i&&null==s&&(u=p(n),d=p(n),v=!0,"0%"==u?s="left":"100%"==u&&(s="right"),"0%"==d?c="top":"100%"==d&&(c="bottom"),p(l));t&&!p(h)&&(f=g());)m.push(f),p(l);return{type:"linear",angle:i,to:s&&c?s+" "+c:s?s:c?c:null,stops:m,reverse:v}}}function v(){if(p(a)){var t=p(u);return t=t.replace(/^['"]+|["']+$/g,""),p(h),{type:"url",url:t}}}var x,y=t;return Yt(d,y)?d[y]:((x=p(e))?x=m(x):(x=p(c))&&(x=v()),d[y]=x||{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/,r=/^([-0-9.]+(deg|grad|rad|turn))/,s=/^(\s+)/,a=/^(\()/,h=/^(\))/,l=/^(,)/,c=/^(url)\(/,u=/^(.*?)\)/,d={},f={};return function(e){return Yt(f,e)?f[e]:f[e]=Co(e).map(t)}}(),Co=function(){var t={};return function(e,n){function i(t){return u=t.exec(e.substr(h))}function o(t){return t.replace(/^\s+|\s+$/g,"")}var r,s,a,h,l,c,u;if(n||(n=/^\s*,\s*/),r=e+n,Yt(t,r))return t[r];for(s=[],a=0,h=0,l=0,c=!1;h<e.length;)!c&&i(/^[\(\[\{]/)?(l++,h++):!c&&i(/^[\)\]\}]/)?(l--,h++):!c&&i(/^[\"\']/)?(c=u[0],h++):"'"==c&&i(/^\\\'/)?h+=2:'"'==c&&i(/^\\\"/)?h+=2:"'"==c&&i(/^\'/)?(c=!1,h++):'"'==c&&i(/^\"/)?(c=!1,h++):i(n)?(!c&&!l&&h>a&&(s.push(o(e.substring(a,h))),a=h+u[0].length),h+=u[0].length):h++;return a<h&&s.push(o(e.substring(a,h))),t[r]=s}}(),To=function(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}}(Object.create?Object.create(null):{}),ko=function(t){return function(e){var n=t[e];return null==n&&(n=t[e]=Ye.measureText("Mapq",{font:e}).height),n}}(Object.create?Object.create(null):{}),Mo={svg:Wi,canvas:mo,util:sn,PathParser:ui,Surface:pi,BaseNode:gi,SurfaceFactory:di,OptionsStore:hn,exportImage:Rt,exportSVG:Bt,QuadNode:no,ShapesQuadTree:so,ObserversMixin:Je,Element:pn,Circle:bn,Arc:Dn,Path:Ln,MultiPath:Hn,Text:jn,Image:$n,Group:Yn,Layout:Vn,Rect:Wn,align:nt,vAlign:it,stack:st,vStack:at,wrap:ct,vWrap:ut,fit:dt,LinearGradient:Zn,RadialGradient:ti,GradientStop:Kn,Gradient:Qn,Animation:ii,AnimationFactory:oi,drawDOM:$t},kendo.deepExtend(kendo,{drawing:Mo,geometry:Vi}),kendo.drawing.Segment=kendo.geometry.Segment,kendo.dataviz.drawing=kendo.drawing,kendo.dataviz.geometry=kendo.geometry,kendo.drawing.util.measureText=kendo.util.measureText,kendo.drawing.util.objectKey=kendo.util.objectKey,kendo.drawing.Color=kendo.Color}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/surface-tooltip.min",["kendo.popup.min","drawing/kendo-drawing.min"],t)}(function(){!function(t){var e=".kendo",n=window.kendo,i=n.deepExtend,o=n.drawing.util,r=o.defined,s=o.limitValue,a=o.eventCoordinates,h=n._outerWidth,l=n._outerHeight,c=t.proxy,u='<div class="k-tooltip"><div class="k-tooltip-content"></div></div>',d='<div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close">close</a></div>',f=n.Class.extend({init:function(e,n){this.element=t(u),this.content=this.element.children(".k-tooltip-content"),n=n||{},this.options=i({},this.options,this._tooltipOptions(n)),this.popupOptions={appendTo:n.appendTo,animation:n.animation,copyAnchorStyles:!1,collision:"fit fit"},this._openPopupHandler=t.proxy(this._openPopup,this),this.surface=e,this._bindEvents()},options:{position:"top",showOn:"mouseenter",offset:7,autoHide:!0,hideDelay:0,showAfter:100},_bindEvents:function(){this._showHandler=c(this._showEvent,this),this._surfaceLeaveHandler=c(this._surfaceLeave,this),this._mouseleaveHandler=c(this._mouseleave,this),this._mousemoveHandler=c(this._mousemove,this),this.surface.bind("click",this._showHandler),this.surface.bind("mouseenter",this._showHandler),this.surface.bind("mouseleave",this._mouseleaveHandler),this.surface.bind("mousemove",this._mousemoveHandler),this.surface.element.on("mouseleave"+e,this._surfaceLeaveHandler),this.element.on("click"+e,".k-tooltip-button",c(this._hideClick,this))},getPopup:function(){return this.popup||(this.popup=new n.ui.Popup(this.element,this.popupOptions)),this.popup},destroy:function(){var t=this.popup;this.surface.unbind("click",this._showHandler),this.surface.unbind("mouseenter",this._showHandler),this.surface.unbind("mouseleave",this._mouseleaveHandler),this.surface.unbind("mousemove",this._mousemoveHandler),this.surface.element.off("mouseleave"+e,this._surfaceLeaveHandler),this.element.off("click"+e),t&&(t.destroy(),delete this.popup),delete this.popupOptions,clearTimeout(this._timeout),delete this.element,delete this.content,delete this.surface},_tooltipOptions:function(t){return t=t||{},{position:t.position,showOn:t.showOn,offset:t.offset,autoHide:t.autoHide,width:t.width,height:t.height,content:t.content,shared:t.shared,hideDelay:t.hideDelay,showAfter:t.showAfter}},_tooltipShape:function(t){for(;t&&!t.options.tooltip;)t=t.parent;return t},_updateContent:function(t,e,i){var o=i.content;if(n.isFunction(o)&&(o=o({element:e,target:t})),o)return this.content.html(o),!0},_position:function(t,e,n,i){var o,r=e.position,h=e.offset||0,l=this.surface,c=l._instance._elementOffset(),u=l.getSize(),d=l._instance._offset,f=t.bbox(),p=n.width,g=n.height,m=0,v=0;return f.origin.translate(c.left,c.top),d&&f.origin.translate(-d.x,-d.y),"cursor"==r&&i?(o=a(i),m=o.x-p/2,v=o.y-g-h):"left"==r?(m=f.origin.x-p-h,v=f.center().y-g/2):"right"==r?(m=f.bottomRight().x+h,v=f.center().y-g/2):"bottom"==r?(m=f.center().x-p/2,v=f.bottomRight().y+h):(m=f.center().x-p/2,v=f.origin.y-g-h),{left:s(m,c.left,c.left+u.width),top:s(v,c.top,c.top+u.height)}},show:function(t,e){this._show(t,t,i({},this.options,this._tooltipOptions(t.options.tooltip),e))},hide:function(){var t=this.popup,e=this._current;delete this._current,clearTimeout(this._showTimeout),t&&t.visible()&&e&&!this.surface.trigger("tooltipClose",{element:e.shape,target:e.target,popup:t})&&t.close()},_hideClick:function(t){t.preventDefault(),this.hide()},_show:function(t,e,n,i,o){var r,s,a=this._current;clearTimeout(this._timeout),a&&(a.shape===e&&n.shared||a.target===t)||(clearTimeout(this._showTimeout),r=this.getPopup(),!this.surface.trigger("tooltipOpen",{element:e,target:t,popup:r})&&this._updateContent(t,e,n)&&(this._autoHide(n),s=this._measure(n),r.visible()&&r.close(!0),this._current={options:n,elementSize:s,shape:e,target:t,position:this._position(n.shared?e:t,n,s,i)},o?this._showTimeout=setTimeout(this._openPopupHandler,n.showAfter||0):this._openPopup()))},_openPopup:function(){var t=this._current,e=t.position;this.getPopup().open(e.left,e.top)},_autoHide:function(e){e.autoHide&&this._closeButton&&(this.element.removeClass("k-tooltip-closable"),this._closeButton.remove(),delete this._closeButton),e.autoHide||this._closeButton||(this.element.addClass("k-tooltip-closable"),this._closeButton=t(d).prependTo(this.element))},_showEvent:function(t){var e,n=this._tooltipShape(t.element);n&&(e=i({},this.options,this._tooltipOptions(n.options.tooltip)),e&&e.showOn==t.type&&this._show(t.element,n,e,t.originalEvent,!0))},_measure:function(t){var e,n,i,o=this.getPopup();return this.element.css({width:"auto",height:"auto"}),i=o.visible(),i||o.wrapper.show(),this.element.css({width:r(t.width)?t.width:"auto",height:r(t.height)?t.height:"auto"}),e=h(this.element),n=l(this.element),i||o.wrapper.hide(),{width:e,height:n}},_mouseleave:function(t){var e,n;this.popup&&!this._popupRelatedTarget(t.originalEvent)&&(e=this,n=e._current,n&&n.options.autoHide&&(e._timeout=setTimeout(function(){clearTimeout(e._showTimeout),e.hide()},n.options.hideDelay||0)))},_mousemove:function(t){var e,n,i=this._current;i&&t.element&&(e=i.options,"cursor"==e.position&&(n=this._position(t.element,e,i.elementSize,t.originalEvent),i.position=n,this.getPopup().wrapper.css({left:n.left,top:n.top})))},_surfaceLeave:function(t){this.popup&&!this._popupRelatedTarget(t)&&(clearTimeout(this._showTimeout),this.hide())},_popupRelatedTarget:function(e){return e.relatedTarget&&t(e.relatedTarget).closest(this.popup.wrapper).length}});n.drawing.SurfaceTooltip=f}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/surface.min",["drawing/kendo-drawing.min","drawing/surface-tooltip.min"],t)}(function(){!function(t){function e(t){this._instance.translate(t)}var n,i=window.kendo,o=i.drawing,r=o.Surface,s=i.ui.Widget,a=i.deepExtend,h=t.proxy;i.support.svg=r.support.svg,i.support.canvas=r.support.canvas,n=s.extend({init:function(t,n){this.options=a({},this.options,n),s.fn.init.call(this,t,this.options),this._instance=r.create(this.element[0],n),this._instance.translate&&(this.translate=e),this._triggerInstanceHandler=h(this._triggerInstanceEvent,this),this._bindHandler("click"),this._bindHandler("mouseenter"),this._bindHandler("mouseleave"),this._bindHandler("mousemove"),this._enableTracking()},options:{name:"Surface",tooltip:{}},events:["click","mouseenter","mouseleave","mousemove","resize","tooltipOpen","tooltipClose"],_triggerInstanceEvent:function(t){this.trigger(t.type,t)},_bindHandler:function(t){this._instance.bind(t,this._triggerInstanceHandler)},draw:function(t){this._instance.draw(t)},clear:function(){this._instance&&this._instance.clear(),this.hideTooltip()},destroy:function(){this._instance&&(this._instance.destroy(),delete this._instance),this._tooltip&&(this._tooltip.destroy(),delete this._tooltip),s.fn.destroy.call(this)},exportVisual:function(){return this._instance.exportVisual()},eventTarget:function(t){return this._instance.eventTarget(t)},showTooltip:function(t,e){this._tooltip&&this._tooltip.show(t,e)},hideTooltip:function(){this._tooltip&&this._tooltip.hide()},suspendTracking:function(){this._instance.suspendTracking(),this.hideTooltip()},resumeTracking:function(){this._instance.resumeTracking()},getSize:function(){return{width:this.element.width(),height:this.element.height()}},setSize:function(t){this.element.css({width:t.width,height:t.height}),this._size=t,this._instance.currentSize(t),this._resize()},_resize:function(){this._instance.currentSize(this._size),this._instance._resize()},_enableTracking:function(){i.ui.Popup&&(this._tooltip=new o.SurfaceTooltip(this,this.options.tooltip||{}))}}),i.ui.plugin(n),n.create=function(t,e){return new n(t,e)},i.drawing.Surface=n}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/html.min",["drawing/kendo-drawing.min"],t)}(function(){!function(t){var e=window.kendo,n=e.drawing,i=n.drawDOM;n.drawDOM=function(e,n){return i(t(e)[0],n)},n.drawDOM.drawText=i.drawText,n.drawDOM.getFontFaces=i.getFontFaces}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.drawing.min",["drawing/util.min","drawing/kendo-drawing.min","drawing/surface-tooltip.min","drawing/surface.min","drawing/html.min"],t)}(function(){},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()});
  //# sourceMappingURL=kendo.drawing.min.js.map
  