@syncfusion/ej2-svg-base
Advanced tools
Comparing version 18.4.39 to 18.4.44
@@ -5,2 +5,8 @@ # Changelog | ||
### Svg Base | ||
#### Bug Fixes | ||
- `#311306` - Position of Tooltip template has been changed. | ||
## 18.3.51 (2020-11-24) | ||
@@ -7,0 +13,0 @@ |
/*! | ||
* filename: ej2-svg-base.umd.min.js | ||
* version : 18.4.39 | ||
* version : 18.4.44 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license. | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],e):e(t.ej={},t.ej2Base)}(this,function(t,e){"use strict";function i(t){var e;switch(t){case"Highcontrast":case"HighContrast":e={tooltipFill:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696"};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":e={tooltipFill:"#F4F4F4",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A"};break;case"Bootstrap4":e={tooltipFill:"rgba(0, 0, 0, 0.9)",tooltipBoldLabel:"rgba(255, 255, 255)",tooltipLightLabel:"rgba(255, 255, 255, 0.9)",tooltipHeaderLine:"rgba(255, 255, 255, 0.2)"};break;default:e={tooltipFill:"rgba(0, 8, 22, 0.75)",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return e}function r(t,i){var r=t||"",o=document.getElementById("chartmeasuretext");if(null===o&&(o=e.createElement("text",{id:"chartmeasuretext"}),document.body.appendChild(o)),"string"==typeof t&&(t.indexOf("<")>-1||t.indexOf(">")>-1)){for(var n=t.split(" "),s=0;s<n.length;s++)-1===n[s].indexOf("<br/>")&&(n[s]=n[s].replace(/[<>]/g,"&"));t=n.join(" ")}return o.innerHTML=r.indexOf("<br>")>-1||r.indexOf("<br/>")>-1?r:t,o.style.position="fixed",o.style.fontSize=i.size,o.style.fontWeight=i.fontWeight,o.style.fontStyle=i.fontStyle,o.style.fontFamily=i.fontFamily,o.style.visibility="hidden",o.style.top="-100",o.style.left="0",o.style.whiteSpace="nowrap",o.style.lineHeight="normal",new u(o.clientWidth,o.clientHeight)}function o(t,e,i,r,o,n,s,a,h,l,d){var p="",c=i.x,u=i.y,y=i.x+i.width,f=i.y+i.height;return d=d||0,n?(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f),0!==o&&(p=(p=p.concat(" L "+(r.x+o/2)+" "+f)).concat(" L "+(h+d)+" "+(f+o-d)),p+=" Q "+h+" "+(f+o)+" "+(h-d)+" "+(f+o-d)),p=r.x-o/2>c?p.concat(" L "+(r.x-o/2)+" "+f+" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z"):0===o?p.concat(" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z"):p.concat(" L "+c+" "+(f+e)+" z")):s?(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u+" L "+(r.x-o/2)+" "+u)).concat(" L "+(h-d)+" "+(r.y+d)),p=(p=(p+=" Q "+h+" "+r.y+" "+(h+d)+" "+(r.y+d)).concat(" L "+(r.x+o/2)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f+" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z")):a?(p=(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u)).concat(" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e)+" L "+y+" "+(r.y-o/2))).concat(" L "+(y+o-d)+" "+(l-d)),p=(p=(p+=" Q "+(y+o)+" "+l+" "+(y+o-d)+" "+(l+d)).concat(" L "+y+" "+(r.y+o/2)+" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f)).concat(" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z")):(p=(p=p.concat("M "+(c+t)+" "+u+" Q "+c+" "+u+" "+c+" "+(u+e)+" L "+c+" "+(r.y-o/2))).concat(" L "+(c-o+d)+" "+(l-d)),p=(p=(p+=" Q "+(c-o)+" "+l+" "+(c-o+d)+" "+(l+d)).concat(" L "+c+" "+(r.y+o/2)+" L "+c+" "+(f-e)+" Q "+c+" "+f+" "+(c+t)+" "+f)).concat(" L "+(y-t)+" "+f+" Q "+y+" "+f+" "+y+" "+(f-e)+" L "+y+" "+(u+e)+" Q "+y+" "+u+" "+(y-t)+" "+u+" z")),p}function n(t){return document.getElementById(t)}function s(t){var i=n(t);i&&e.remove(i)}function a(t,e,i,r,o,n){var s=new d(""),a=h(t,i,e,o,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",n),l}function h(t,i,r,o,n){var s,a="Path",h=i.width,l=i.height,d=t.x,p=t.y,c=t.x+-h/2,u=t.y+-l/2;switch(r){case"Circle":case"Bubble":a="Ellipse",e.merge(o,{rx:h/2,ry:l/2,cx:d,cy:p});break;case"Cross":s="M "+c+" "+p+" L "+(d+h/2)+" "+p+" M "+d+" "+(p+l/2)+" L "+d+" "+(p+-l/2),e.merge(o,{d:s});break;case"HorizontalLine":s="M "+c+" "+p+" L "+(d+h/2)+" "+p,e.merge(o,{d:s});break;case"VerticalLine":s="M "+d+" "+(p+l/2)+" L "+d+" "+(p+-l/2),e.merge(o,{d:s});break;case"Diamond":s="M "+c+" "+p+" L "+d+" "+(p+-l/2)+" L "+(d+h/2)+" "+p+" L "+d+" "+(p+l/2)+" L "+c+" "+p+" z",e.merge(o,{d:s});break;case"Rectangle":s="M "+c+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+l/2)+" L "+c+" "+(p+l/2)+" L "+c+" "+(p+-l/2)+" z",e.merge(o,{d:s});break;case"Triangle":s="M "+c+" "+(p+l/2)+" L "+d+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+l/2)+" L "+c+" "+(p+l/2)+" z",e.merge(o,{d:s});break;case"InvertedTriangle":s="M "+(d+h/2)+" "+(p-l/2)+" L "+d+" "+(p+l/2)+" L "+(d-h/2)+" "+(p-l/2)+" L "+(d+h/2)+" "+(p-l/2)+" z",e.merge(o,{d:s});break;case"Pentagon":for(var y=void 0,f=void 0,g=0;g<=5;g++)y=h/2*Math.cos(Math.PI/180*(72*g)),f=l/2*Math.sin(Math.PI/180*(72*g)),s=0===g?"M "+(d+y)+" "+(p+f)+" ":s.concat("L "+(d+y)+" "+(p+f)+" ");s=s.concat("Z"),e.merge(o,{d:s});break;case"Image":a="Image",e.merge(o,{href:n,height:l,width:h,x:c,y:u})}return{renderOption:o,functionName:a}}function l(t,e,i,r){var o,n,s={},a=new d("");return s={id:t.id,x:t.x,y:t.y,fill:i,"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,"text-anchor":t.anchor,transform:t.transform,opacity:e.opacity,"dominant-baseline":t.baseLine},n="string"==typeof t.text?t.text:t.text[0],o=a.createText(s,n),o.style.fontFamily=e.fontFamily,o.style.fontStyle=e.fontStyle,o.style.fontSize=e.size,o.style.fontWeight=e.fontWeight,o.style.color=e.color,r.appendChild(o),o}var d=function(){function t(t){this.svgLink="http://www.w3.org/2000/svg",this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createSvg=function(t){return e.isNullOrUndefined(t.id)&&(t.id=this.rootId+"_svg"),this.svgObj=document.getElementById(t.id),e.isNullOrUndefined(document.getElementById(t.id))&&(this.svgObj=document.createElementNS(this.svgLink,"svg")),this.svgObj=this.setElementAttributes(t,this.svgObj),this.setSVGSize(t.width,t.height),this.svgObj},t.prototype.setSVGSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)||this.width<=0?this.svgObj.setAttribute("width",t?t.toString():o.width.toString()):this.svgObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)||this.height<=0?this.svgObj.setAttribute("height",i?i.toString():"450"):this.svgObj.setAttribute("height",this.height.toString())},t.prototype.drawPath=function(t,e){var i=document.getElementById(t.id);return null===i&&(i=document.createElementNS(this.svgLink,"path")),i=this.setElementAttributes(t,i)},t.prototype.drawLine=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"line")),e=this.setElementAttributes(t,e)},t.prototype.drawRectangle=function(t,e){var i=document.getElementById(t.id);return null===i&&(i=document.createElementNS(this.svgLink,"rect")),i=this.setElementAttributes(t,i)},t.prototype.drawCircle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"circle")),e=this.setElementAttributes(t,e)},t.prototype.drawPolyline=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polyline")),e=this.setElementAttributes(t,e)},t.prototype.drawEllipse=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"ellipse")),e=this.setElementAttributes(t,e)},t.prototype.drawPolygon=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polygon")),e=this.setElementAttributes(t,e)},t.prototype.drawImage=function(t){var i=document.createElementNS(this.svgLink,"image");return i.setAttributeNS(null,"height",t.height.toString()),i.setAttributeNS(null,"width",t.width.toString()),i.setAttributeNS("http://www.w3.org/1999/xlink","href",t.href),i.setAttributeNS(null,"x",t.x.toString()),i.setAttributeNS(null,"y",t.y.toString()),i.setAttributeNS(null,"id",t.id),i.setAttributeNS(null,"visibility",t.visibility),e.isNullOrUndefined(this.getOptionValue(t,"clip-path"))||i.setAttributeNS(null,"clip-path",this.getOptionValue(t,"clip-path")),e.isNullOrUndefined(t.preserveAspectRatio)||i.setAttributeNS(null,"preserveAspectRatio",t.preserveAspectRatio),i},t.prototype.createText=function(t,i,r,o,n,s){var a=document.createElementNS(this.svgLink,"text");return a=this.setElementAttributes(t,a),e.isNullOrUndefined(i)||(a.textContent=i),a},t.prototype.createTSpan=function(t,i){var r=document.createElementNS(this.svgLink,"tspan");return r=this.setElementAttributes(t,r),e.isNullOrUndefined(i)||(r.textContent=i),r},t.prototype.createTitle=function(t){var e=document.createElementNS(this.svgLink,"title");return e.textContent=t,e},t.prototype.createDefs=function(){return document.createElementNS(this.svgLink,"defs")},t.prototype.createClipPath=function(t){var e=document.createElementNS(this.svgLink,"clipPath");return e=this.setElementAttributes(t,e)},t.prototype.createForeignObject=function(t){var e=document.createElementNS(this.svgLink,"foreignObject");return e=this.setElementAttributes(t,e)},t.prototype.createGroup=function(t){var e=document.createElementNS(this.svgLink,"g");return e=this.setElementAttributes(t,e)},t.prototype.createPattern=function(t,e){var i=document.createElementNS(this.svgLink,e);return i=this.setElementAttributes(t,i)},t.prototype.createRadialGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"radialGradient",cx:r.cx+"%",cy:r.cy+"%",r:r.r+"%",fx:r.fx+"%",fy:r.fy+"%"};this.drawGradient("radialGradient",n,t),o="url(#"+this.rootId+"_"+i+"radialGradient)"}return o},t.prototype.createLinearGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"linearGradient",x1:r.x1+"%",y1:r.y1+"%",x2:r.x2+"%",y2:r.y2+"%"};this.drawGradient("linearGradient",n,t),o="url(#"+this.rootId+"_"+i+"linearGradient)"}return o},t.prototype.drawGradient=function(t,i,r){var o=this.createDefs(),n=document.createElementNS(this.svgLink,t);n=this.setElementAttributes(i,n);for(var s=0;s<r.length;s++){var a=document.createElementNS(this.svgLink,"stop");a.setAttribute("offset",r[s].colorStop),a.setAttribute("stop-color",r[s].color),a.setAttribute("stop-opacity",r[s].opacity?r[s].opacity:"1"),e.isNullOrUndefined(r[s].style)||a.setAttribute("style",r[s].style),n.appendChild(a)}return o.appendChild(n),o},t.prototype.drawClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Rect";var r=this.drawRectangle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.drawCircularClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Circle";var r=this.drawCircle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=0;r<i.length;r++)e.setAttribute(i[r],t[i[r]]);return e},t.prototype.createCanvas=function(t){return null},t}(),p=function(){function t(t){this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createCanvas=function(t){var e=document.createElement("canvas");return e.setAttribute("id",this.rootId+"_canvas"),this.ctx=e.getContext("2d"),this.canvasObj=e,this.setCanvasSize(t.width,t.height),this.canvasObj},t.prototype.setCanvasSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)?this.canvasObj.setAttribute("width",t?t.toString():o.width.toString()):this.canvasObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)?this.canvasObj.setAttribute("height",i?i.toString():"450"):this.canvasObj.setAttribute("height",this.height.toString())},t.prototype.setAttributes=function(t){this.ctx.lineWidth=this.getOptionValue(t,"stroke-width");var i=this.getOptionValue(t,"stroke-dasharray");if(!e.isNullOrUndefined(i)){var r=i.split(",");this.ctx.setLineDash([parseInt(r[0],10),parseInt(r[1],10)])}this.ctx.strokeStyle=this.getOptionValue(t,"stroke")},t.prototype.drawLine=function(t){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.moveTo(t.x1,t.y1),this.ctx.lineTo(t.x2,t.y2),this.ctx.stroke(),this.ctx.restore()},t.prototype.drawRectangle=function(t,e){var i=this.ctx,r=t.rx;return this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=this.getOptionValue(t,"opacity"),this.setAttributes(t),this.ctx.rect(t.x,t.y,t.width,t.height),null!==r&&r>=0?this.drawCornerRadius(t):("none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,this.ctx.fillRect(t.x,t.y,t.width,t.height),this.ctx.stroke()),this.ctx.restore(),this.ctx=i,this.canvasObj},t.prototype.drawCornerRadius=function(t){var e=t.rx,i=t.x,r=t.y,o=t.width,n=t.height;"none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,o<2*e&&(e=o/2),n<2*e&&(e=n/2),this.ctx.beginPath(),this.ctx.moveTo(i+o-e,r),this.ctx.arcTo(i+o,r,i+o,r+n,e),this.ctx.arcTo(i+o,r+n,i,r+n,e),this.ctx.arcTo(i,r+n,i,r,e),this.ctx.arcTo(i,r,i+o,r,e),this.ctx.closePath(),this.ctx.fill(),this.ctx.stroke()},t.prototype.drawPath=function(t,e){var i=t.d.split(" "),r=this.getOptionValue(t,"stroke-width"),o=this.ctx,n=!0;this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=t.opacity?t.opacity:this.getOptionValue(t,"fill-opacity"),this.setAttributes(t);for(var s=0;s<i.length;s+=3){var a=parseFloat(i[s+1]),h=parseFloat(i[s+2]);switch(i[s]){case"M":t.innerR||t.cx||this.ctx.moveTo(a,h);break;case"L":t.innerR||this.ctx.lineTo(a,h);break;case"Q":var l=parseFloat(i[s+3]),d=parseFloat(i[s+4]);this.ctx.quadraticCurveTo(a,h,l,d),s+=2;break;case"C":var p=parseFloat(i[s+3]),c=parseFloat(i[s+4]),u=parseFloat(i[s+5]),y=parseFloat(i[s+6]);this.ctx.bezierCurveTo(a,h,p,c,u,y),s+=4;break;case"A":t.innerR?n&&(this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.arc(t.x,t.y,t.innerR,t.end,t.start,!t.counterClockWise),n=!1):t.cx?this.ctx.arc(t.cx,t.cy,t.radius,0,2*Math.PI,t.counterClockWise):(this.ctx.moveTo(t.x,t.y),this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.lineTo(t.x,t.y)),s+=5;break;case"z":case"Z":this.ctx.closePath(),s-=2}}return"none"!==t.fill&&void 0!==t.fill&&(this.ctx.fillStyle=t.fill,this.ctx.fill()),r>0&&this.ctx.stroke(),this.ctx.restore(),this.ctx=o,this.canvasObj},t.prototype.createText=function(t,i,r,o,n,s){var a=this.getOptionValue(t,"font-weight");e.isNullOrUndefined(a)||"regular"!==a.toLowerCase()||(a="normal");var h=this.getOptionValue(t,"font-size"),l=this.getOptionValue(t,"font-family"),d=this.getOptionValue(t,"font-style").toLowerCase()+" "+a+" "+h+" "+l,p=this.getOptionValue(t,"text-anchor"),c=void 0!==t.opacity?t.opacity:1;e.isNullOrUndefined(t.labelRotation)||t.labelRotation;if("middle"===p&&(p="center"),this.ctx.save(),this.ctx.fillStyle=t.fill,this.ctx.font=d,this.ctx.textAlign=p,this.ctx.globalAlpha=c,t.baseline&&(this.ctx.textBaseline=t.baseline),!s){this.ctx.translate(t.x+0+(r||0),t.y+(o||0)),this.ctx.rotate(t.labelRotation*Math.PI/180)}return this.ctx.fillText(i,s?t.x:0,s?n:0),this.ctx.restore(),this.canvasObj},t.prototype.drawCircle=function(t,e){var i=this.ctx;return this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.cx,t.cy,t.r,0,2*Math.PI),this.ctx.fillStyle=t.fill,this.ctx.globalAlpha=t.opacity,this.ctx.fill(),e&&this.ctx.translate(e[0],e[1]),this.setAttributes(t),this.ctx.stroke(),this.ctx.restore(),this.ctx=i,this.canvasObj},t.prototype.drawPolyline=function(t){this.ctx.save(),this.ctx.beginPath();for(var e=t.points.split(" "),i=0;i<e.length-1;i++){var r=e[i].split(","),o=parseFloat(r[0]),n=parseFloat(r[1]);0===i?this.ctx.moveTo(o,n):this.ctx.lineTo(o,n)}this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore()},t.prototype.drawEllipse=function(t,e){var i=this.ctx,r=Math.max(t.rx,t.ry),o=t.rx/r,n=t.ry/r;this.ctx.save(),this.ctx.beginPath(),this.ctx.translate(t.cx,t.cy),e&&this.ctx.translate(e[0],e[1]),this.ctx.save(),this.ctx.scale(o,n),this.ctx.arc(0,0,r,0,2*Math.PI,!1),this.ctx.fillStyle=t.fill,this.ctx.fill(),this.ctx.restore(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore(),this.ctx=i},t.prototype.drawImage=function(t){this.ctx.save();var i=new Image;e.isNullOrUndefined(t.href)||(i.src=t.href,this.ctx.drawImage(i,t.x,t.y,t.width,t.height)),this.ctx.restore()},t.prototype.createLinearGradient=function(t){var i;e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createLinearGradient(0,0,0,this.canvasObj.height));return this.setGradientValues(t,i)},t.prototype.createRadialGradient=function(t){var i;e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createRadialGradient(0,0,0,0,0,this.canvasObj.height));return this.setGradientValues(t,i)},t.prototype.setGradientValues=function(t,i){var r;if(e.isNullOrUndefined(t[0].colorStop))r=t[0].color.toString();else{for(var o=0;o<=t.length-1;o++){var n=t[o].color,s=t[o].colorStop.slice(0,-1),a=parseInt(s,10)/100;i.addColorStop(a,n)}r=i.toString()}return r},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=Object.keys(t).map(function(e){return t[e]}),o=0;o<i.length;o++)e.setAttribute(i[o],r[o]);return null},t.prototype.updateCanvasAttributes=function(t){this.setElementAttributes(t,this.canvasObj);var i=this.ctx;if(!e.isNullOrUndefined(this.dataUrl)){var r=new Image;r.onload=function(){i.drawImage(r,0,0)},r.src=this.dataUrl}},t.prototype.clearRect=function(t){this.ctx.restore(),this.ctx.clearRect(t.x,t.y,t.width,t.height)},t.prototype.createGroup=function(t){return null},t.prototype.drawClipPath=function(t){return null},t.prototype.canvasClip=function(t){this.ctx.save(),this.ctx.fillStyle="transparent",this.ctx.rect(t.x,t.y,t.width,t.height),this.ctx.fill(),this.ctx.clip()},t.prototype.canvasRestore=function(){this.ctx.restore()},t.prototype.drawPolygon=function(t){return null},t.prototype.createDefs=function(){return null},t.prototype.createClipPath=function(t){return null},t.prototype.createSvg=function(t){return null},t}(),c=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),u=function(){return function(t,e){this.width=t,this.height=e}}(),y=function(){return function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}}(),f=function(){return function(t,e){this.isRight=e,this.isBottom=t}}(),g=function(){return function(t){this.id=t}}(),m=function(t){function e(e,i,r,o,n,s,a,h){void 0===s&&(s="");var l=t.call(this,e)||this;return l.transform="",l.baseLine="auto",l.labelRotation=0,l.x=i,l.y=r,l.anchor=o,l.text=n,l.transform=s,l.baseLine=a,l.labelRotation=h,l}return c(e,t),e}(g),x=function(t){function e(e,i,r,o,n,s,a){var h=t.call(this,e)||this;return h.opacity=n,h.fill=i,h.stroke=o,h["stroke-width"]=r,h["stroke-dasharray"]=s,h.d=a,h}return c(e,t),e}(g),v=function(){return function(t,e){this.x=t,this.y=e}}(),b=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),w=function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},S=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(null)],i.prototype,"size",void 0),w([e.Property("")],i.prototype,"color",void 0),w([e.Property("Segoe UI")],i.prototype,"fontFamily",void 0),w([e.Property("Normal")],i.prototype,"fontWeight",void 0),w([e.Property("Normal")],i.prototype,"fontStyle",void 0),w([e.Property(1)],i.prototype,"opacity",void 0),i}(e.ChildProperty),P=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property("")],i.prototype,"color",void 0),w([e.Property(1)],i.prototype,"width",void 0),i}(e.ChildProperty),L=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),w([e.Property(0)],i.prototype,"width",void 0),w([e.Property(0)],i.prototype,"height",void 0),i}(e.ChildProperty),O=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),i}(e.ChildProperty),A=function(t){function h(e,i){return t.call(this,e,i)||this}return b(h,t),h.prototype.preRender=function(){this.allowServerDataBinding=!1,this.initPrivateVariable(),this.isCanvas||this.removeSVG(),this.createTooltipElement()},h.prototype.initPrivateVariable=function(){this.renderer=new d(this.element.id),this.themeStyle=i(this.theme),this.formattedText=[],this.padding=5,this.isFirst=!0,this.markerPoint=[]},h.prototype.removeSVG=function(){var t=document.getElementById(this.element.id+"_svg"),i=document.getElementById(this.element.id+"parent_template");this.blazorTemplate&&e.resetBlazorTemplate(this.element.id+"parent_template_blazorTemplate"),t&&t.parentNode&&e.remove(t),i&&i.parentNode&&e.remove(i)},h.prototype.render=function(){if(this.fadeOuted=!1,this.template)this.updateTemplateFn(),this.createTemplate(this.areaBounds,this.location);else{this.renderText(this.isFirst);var t={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",t);var i=this.renderTooltipElement(this.areaBounds,this.location);this.drawMarker(i.isBottom,i.isRight,this.markerSize)}this.trigger("loaded",{tooltip:this});var r=document.getElementById("chartmeasuretext");r&&e.remove(r),this.allowServerDataBinding=!0},h.prototype.createTooltipElement=function(){if(this.textElements=[],!this.template||this.shared){var t=this.renderer.createSvg({id:this.element.id+"_svg"});this.element.appendChild(t);var e=document.getElementById(this.element.id+"_group");e||(e=this.renderer.createGroup({id:this.element.id+"_group"})).setAttribute("transform","translate(0,0)"),t.appendChild(e);var i=this.renderer.drawPath({id:this.element.id+"_path","stroke-width":"Bootstrap4"===this.theme?0:this.border.width,fill:this.fill||this.themeStyle.tooltipFill,opacity:"Bootstrap4"===this.theme?.9:this.opacity,stroke:this.border.color});e.appendChild(i)}},h.prototype.drawMarker=function(t,e,i){if(this.shapes.length<=0)return null;for(var r,o=0,s=this.renderer.createGroup({id:this.element.id+"_trackball_group"}),h=n(this.element.id+"_group"),l=2*this.marginX+i/2+(e?this.arrowPadding:0),d=0,p=this.shapes;d<p.length;d++){var c=p[d];"None"!==c&&(r=new x(this.element.id+"_Trackball_"+o,this.palette[o],1,"#cccccc",1,null),this.markerPoint[o]&&s.appendChild(a(new v(l,this.markerPoint[o]-this.padding+(t?this.arrowPadding:0)),c,new u(i,i),"",r,null)),o++)}h.appendChild(s)},h.prototype.renderTooltipElement=function(t,i){var s,a=n(this.element.id),h=new v(0,0),l=new v(0,0),d=n(this.element.id+"_svg"),p=n(this.element.id+"_group"),c=n(this.element.id+"_path"),u=!1,g=!1,m=!1,x=0,b=0;if(this.tipRadius=1,""!==this.header&&(this.elementSize.height+=this.marginY),this.content.length>1?(s=this.sharedTooltipLocation(t,this.location.x,this.location.y),u=!0):(s=this.tooltipLocation(t,i,h,l),this.inverted?x=(g=s.x<i.x+this.clipBounds.x)?0:this.arrowPadding:(m=!(u=s.y<i.y+this.clipBounds.y),b=u?0:this.arrowPadding)),""!==this.header){var w=r(this.isWrap?this.wrappedText:this.header,this.textStyle).height+2*this.marginY+(m?this.arrowPadding:0)+(this.isWrap?5:0),S="M "+(3*this.marginX+(g||u||m?0:this.arrowPadding))+" "+w+"L "+(s.width+(g||u||m?0:this.arrowPadding)-2*this.marginX)+" "+w,P=this.renderer.drawPath({id:this.element.id+"_header_path","stroke-width":1,fill:null,opacity:.8,stroke:this.themeStyle.tooltipHeaderLine,d:S});p.appendChild(P)}var L=this.border.width/2,O=new y(L+x,L+b,s.width-L,s.height-L);if(p.setAttribute("opacity","1"),!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(a,s.x,s.y):this.animateTooltipDiv(a,s),d.setAttribute("height",(s.height+this.border.width+(this.inverted?0:this.arrowPadding)+5).toString()),d.setAttribute("width",(s.width+this.border.width+(this.inverted?this.arrowPadding:0)+5).toString()),d.setAttribute("opacity","1"),e.isNullOrUndefined(this.tooltipPlacement)||(u=this.tooltipPlacement.indexOf("Top")>-1,m=this.tooltipPlacement.indexOf("Bottom")>-1,g=this.tooltipPlacement.indexOf("Left")>-1),c.setAttribute("d",o(this.rx,this.ry,O,h,this.arrowPadding,u,m,g,l.x,l.y,this.tipRadius)),this.enableShadow&&"Bootstrap4"!==this.theme){var A=this.element.id+"_shadow";c.setAttribute("filter",e.Browser.isIE?"":"url(#"+A+")");var C='<filter id="'+A+'" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';C+='<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>',C+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var k=this.renderer.createDefs();k.setAttribute("id",this.element.id+"SVG_tooltip_definition"),p.appendChild(k),k.innerHTML=C}return c.setAttribute("stroke",this.border.color),this.changeText(new v(x,b),m,!g&&!u&&!m,s),new f(m,!g&&!u&&!m)},h.prototype.changeText=function(t,e,i,r){var o=document.getElementById(this.element.id+"_text");e&&o.setAttribute("transform","translate(0,"+this.arrowPadding+")"),i&&o.setAttribute("transform","translate("+this.arrowPadding+" 0)")},h.prototype.findFormattedText=function(){this.formattedText=[],""!==this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()&&(this.formattedText=this.formattedText.concat(this.header)),this.formattedText=this.formattedText.concat(this.content)},h.prototype.renderText=function(t){var i,o,a,h,d,p,c=0,y=0,f=0,g=e.extend({},this.textStyle,null,!0).properties,x=n(this.element.id+"_group"),v="";this.findFormattedText();var b,w="rtl"===document.body.getAttribute("dir")?"end":"start";this.leftSpace=this.areaBounds.x+this.location.x,this.rightSpace=this.areaBounds.x+this.areaBounds.width-this.leftSpace;var S=this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim(),P=this.header.indexOf("<b>")>-1&&this.header.indexOf("</b>")>-1,L=r(this.formattedText[0],g).width+2*this.marginX+this.arrowPadding,O=this.location.x-L<this.location.x,A=this.areaBounds.x+this.areaBounds.width<this.location.x+L,C=""!==S?this.marginY:0,k=!0,T=!0;this.markerPoint=[];var E,N=this.shapes.length>0?10:0,B=this.shapes.length>0?5:0,z="Normal",_=this.themeStyle.tooltipLightLabel,F=22/parseFloat("13px")*parseFloat(g.size);t&&!this.isCanvas||(s(this.element.id+"_text"),s(this.element.id+"_header_path"),s(this.element.id+"_trackball_group"),s(this.element.id+"SVG_tooltip_definition"));var I=new m(this.element.id+"_text",2*this.marginX,2*this.marginY+2*this.padding+(2===this.marginY?3:0),w,""),R=l(I,g,null,x),j=1===this.formattedText.length&&this.formattedText[0].indexOf(" : <b>")>-1;o=(b=""!==this.header)&&P?16:13;for(var M=0,G=this.formattedText.length;M<G;M++)if(h=this.formattedText[M].replace(/<(b|strong)>/g,"<b>").replace(/<\/(b|strong)>/g,"</b>").split(/<br.*?>/g),0===M&&!j&&this.isTextWrap&&(this.leftSpace<L||O)&&(this.rightSpace<L||A)&&(E=Math.round(this.leftSpace>this.rightSpace?this.leftSpace/o:this.rightSpace/o),h=(""!==S?S:this.formattedText[M]).match(new RegExp(".{1,"+E+"}","g")),this.wrappedText=P?"<b>"+h.join("<br>")+"</b>":h.join("<br>"),this.isWrap=h.length>1),""!==h[0]){0===M&&""!==S||this.markerPoint.push((""!==S?this.marginY:0)+I.y+c);for(var V=0,U=h.length;V<U;V++){f=0,T=!0,c+=F;for(var W=0,D=(i=h[V].replace(/<b>/g,"<br><b>").replace(/<\/b>/g,"</b><br>").replace(/:/g,"<br>:<br>").split("<br>")).length;W<D;W++)if(d=i[W],/\S/.test(d)||""===d||(d=" "),!T&&" "===d||""!==d.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()){f+=" "!==d?4:0,T&&!k?(p={x:2*this.marginX+(N+B),dy:F+(T?C:0),fill:""},C=null):p=k&&T?{x:""===S?2*this.marginX+(N+B):2*this.marginX+(this.isWrap?N+B:0)}:{},T=!1,a=this.renderer.createTSpan(p,""),R.appendChild(a),d.indexOf("<b>")>-1||P&&0===W&&0===M&&(b||this.isWrap)?(z="bold",_=this.themeStyle.tooltipBoldLabel,v="font-weight:"+z,g.fontWeight=z,a.setAttribute("fill",this.textStyle.color||_)):(v="bold"===z?"font-weight:"+z:"",g.fontWeight=z,a.setAttribute("fill",this.textStyle.color||_)),(d.indexOf("</b>")>-1||P&&W===D-1&&0===M&&(b||this.isWrap))&&(z="Normal",_=this.themeStyle.tooltipLightLabel);var Q=/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(d);a.textContent=d=d.replace(/<[a-zA-Z\/](.|\n)*?>/g,Q?"":""),f+=r(d,g).width,""!==v&&(a.style.fontWeight=v.split("font-weight:")[1],a.style.color=a.getAttribute("fill")),a.style.fontFamily="inherit",a.style.fontStyle="inherit",a.style.fontSize="inherit",k=!1}f-=4,y=Math.max(y,f)}}this.elementSize=new u(y+(y>0?2*this.marginX:0),c),this.elementSize.width+=N+B;var H=R.childNodes[0];if(""!==S&&H&&!this.isWrap){g.fontWeight="bold";var X=(this.elementSize.width+2*this.padding)/2-r(S,g).width/2;H.setAttribute("x",X.toString())}},h.prototype.createTemplate=function(t,i){var r={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",r);var o=document.getElementById(this.element.id);this.isCanvas&&this.removeSVG();var s=o.firstElementChild;if(s&&e.remove(s),r.cancel)e.remove(n(this.element.id+"_tooltip"));else{for(var a=e.createElement("div",{id:this.element.id+"parent_template"}),h=this.templateFn(this.data,this.controlInstance,"template",a.id+"_blazorTemplate","");h&&h.length>0;)e.isBlazor()||1===h.length?(a.appendChild(h[0]),h=null):a.appendChild(h[0]);o.appendChild(a);var l=this.isCanvas?a:this.element,d=l.getBoundingClientRect();this.padding=0,this.elementSize=new u(d.width,d.height);var p=this.tooltipLocation(t,i,new v(0,0),new v(0,0));if(!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(l,p.x,p.y):this.animateTooltipDiv(this.element,p),this.blazorTemplate){var c=function(){var e=n(y.element.id).getBoundingClientRect();y.elementSize=new u(e.width,e.height);var r=y.tooltipLocation(t,i,new v(0,0),new v(0,0));y.updateDiv(n(y.element.id),r.x,r.y)},y=this;c.bind(y,t,i),e.updateBlazorTemplate(this.element.id+"parent_template_blazorTemplate",this.blazorTemplate.name,this.blazorTemplate.parent,void 0,c)}}},h.prototype.sharedTooltipLocation=function(t,e,i){var r=this.elementSize.width+2*this.marginX,o=this.elementSize.height+2*this.marginY,n=new y(e+2*this.padding,i-o-this.padding,r,o);return n.y<t.y&&(n.y+=n.height+2*this.padding),n.x+n.width>t.x+t.width&&(n.x-=n.width+4*this.padding),n},h.prototype.getCurrentPosition=function(t,e,i,r){var o=this.tooltipPlacement,n=this.clipBounds.x,s=this.clipBounds.y,a=this.offset,h=this.elementSize.width+2*this.marginX,l=this.elementSize.height+2*this.marginY,d=new v(e.x,e.y);return"Top"===o||"Bottom"===o?(d=new v(d.x+n-this.elementSize.width/2-this.padding,d.y+s-this.elementSize.height-2*this.padding-this.arrowPadding-a),i.x=r.x=h/2,"Bottom"===o&&(d.y=e.y+s+a),t.x+t.width<d.x+h?(d.x=t.width>h?t.x+t.width-h+6:t.x,i.x=r.x=t.width>h?t.x+e.x-d.x:e.x):t.x>d.x&&(d.x=t.x,i.x=r.x=e.x)):(d=new v(d.x+n+a,d.y+s-this.elementSize.height/2-this.padding),i.y=r.y=l/2,"Left"===o&&(d.x=e.x+n-a-(h+this.arrowPadding)),t.y+t.height<d.y+l?(d.y=t.height>l?t.y+t.height-l+6:t.y,i.y=r.y=t.height>l?t.y+e.y-d.y:e.y):t.y>d.y&&(d.y=t.y,i.y=r.y=e.y)),new y(d.x,d.y,h,l)},h.prototype.tooltipLocation=function(t,i,r,o){if(!e.isNullOrUndefined(this.tooltipPlacement)){return this.getCurrentPosition(t,i,r,o)}var n=new v(i.x,i.y),s=this.elementSize.width+2*this.marginX,a=this.elementSize.height+2*this.marginY,h=this.offset,l=this.clipBounds.x,d=this.clipBounds.y,p=t.x,c=t.y;return this.inverted?(n=new v(n.x+l+h,n.y+d-this.elementSize.height/2-this.padding),r.y=o.y=a/2,(n.x+s+this.arrowPadding>p+t.width||this.isNegative)&&(n.x=(i.x>t.width?t.width:i.x)+l-h-(s+this.arrowPadding)),n.x<p&&(n.x=(i.x<0?0:i.x)+l+h),n.y<=c&&(r.y-=c-n.y,o.y-=c-n.y,n.y=c),n.y+a>=c+t.height&&(r.y+=n.y+a-(c+t.height),o.y+=n.y+a-(c+t.height),n.y-=n.y+a-(c+t.height)),r.y+this.arrowPadding/2>a-this.ry&&(r.y=a-this.ry-this.arrowPadding/2,o.y=a,this.tipRadius=0),r.y-this.arrowPadding/2<this.ry&&(r.y=this.ry+this.arrowPadding/2,o.y=0,this.tipRadius=0)):(n=new v(n.x+l-this.elementSize.width/2-this.padding,n.y+d-this.elementSize.height-2*this.padding-this.arrowPadding-h),r.x=o.x=s/2,(n.y<c||this.isNegative)&&(n.y=(i.y<0?0:i.y)+d+h),n.y+a+this.arrowPadding>c+t.height&&(n.y=Math.min(i.y,c+t.height)+d-this.elementSize.height-2*this.padding-this.arrowPadding-h),o.x=s/2,n.x<p&&(r.x-=p-n.x,o.x-=p-n.x,n.x=p),n.x+s>p+t.width&&(r.x+=n.x+s-(p+t.width),o.x+=n.x+s-(p+t.width),n.x-=n.x+s-(p+t.width)),r.x+this.arrowPadding/2>s-this.rx&&(r.x=s-this.rx-this.arrowPadding/2,o.x=s,this.tipRadius=0),r.x-this.arrowPadding/2<this.rx&&(r.x=this.rx+this.arrowPadding/2,o.x=0,this.tipRadius=0)),new y(n.x,n.y,s,a)},h.prototype.animateTooltipDiv=function(t,i){var r,o=this,n=parseFloat(t.style.left),s=parseFloat(t.style.top);new e.Animation({}).animate(t,{duration:this.duration,progress:function(e){r=e.timeStamp/e.duration,t.style.animation=null,t.style.left=n+r*(i.x-n)+"px",t.style.top=s+r*(i.y-s)+"px"},end:function(e){o.updateDiv(t,i.x,i.y),o.trigger("animationComplete",{tooltip:o})}})},h.prototype.updateDiv=function(t,e,i){t.style.left=e+"px",t.style.top=i+"px"},h.prototype.updateTemplateFn=function(){if(this.template)try{document.querySelectorAll(this.template).length&&(this.templateFn=e.compile(document.querySelector(this.template).innerHTML.trim()))}catch(t){this.templateFn=e.compile(this.template)}},h.prototype.fadeOut=function(){var t=this,i=this.isCanvas&&!this.template?n(this.element.id+"_svg"):n(this.element.id);if(i){var r=i.firstChild;this.isCanvas&&!this.template&&(r=document.getElementById(this.element.id+"_group")?document.getElementById(this.element.id+"_group"):r);var o;r&&(o=parseFloat(r.getAttribute("opacity"))||1),new e.Animation({}).animate(r,{duration:200,progress:function(e){t.progressAnimation(r,o,e.timeStamp/e.duration)},end:function(e){t.fadeOuted=!0,t.endAnimation(r)}})}},h.prototype.progressAnimation=function(t,e,i){t.style.animation="",t.setAttribute("opacity",(e-i).toString())},h.prototype.endAnimation=function(t){t.setAttribute("opacity","0"),this.template&&!this.shared&&(t.style.display="none"),this.trigger("animationComplete",{tooltip:this})},h.prototype.getPersistData=function(){return this.addOnPersist([])},h.prototype.getModuleName=function(){return"tooltip"},h.prototype.destroy=function(){t.prototype.destroy.call(this),this.element.classList.remove("e-tooltip")},h.prototype.onPropertyChanged=function(t,i){this.blazorTemplate&&e.resetBlazorTemplate(this.element.id+"parent_template_blazorTemplate"),this.isFirst=!1,this.render()},w([e.Property(!1)],h.prototype,"enable",void 0),w([e.Property(!1)],h.prototype,"shared",void 0),w([e.Property(!0)],h.prototype,"enableShadow",void 0),w([e.Property(null)],h.prototype,"fill",void 0),w([e.Property("")],h.prototype,"header",void 0),w([e.Property(.75)],h.prototype,"opacity",void 0),w([e.Complex({size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},S)],h.prototype,"textStyle",void 0),w([e.Property(null)],h.prototype,"template",void 0),w([e.Property(!0)],h.prototype,"enableAnimation",void 0),w([e.Property(300)],h.prototype,"duration",void 0),w([e.Property(!1)],h.prototype,"inverted",void 0),w([e.Property(!1)],h.prototype,"isNegative",void 0),w([e.Complex({color:"#cccccc",width:.5},P)],h.prototype,"border",void 0),w([e.Property([])],h.prototype,"content",void 0),w([e.Property(10)],h.prototype,"markerSize",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"clipBounds",void 0),w([e.Property([])],h.prototype,"palette",void 0),w([e.Property([])],h.prototype,"shapes",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"location",void 0),w([e.Property(0)],h.prototype,"offset",void 0),w([e.Property(2)],h.prototype,"rx",void 0),w([e.Property(2)],h.prototype,"ry",void 0),w([e.Property(5)],h.prototype,"marginX",void 0),w([e.Property(5)],h.prototype,"marginY",void 0),w([e.Property(12)],h.prototype,"arrowPadding",void 0),w([e.Property(null)],h.prototype,"data",void 0),w([e.Property("Material")],h.prototype,"theme",void 0),w([e.Complex({x:0,y:0,width:0,height:0},L)],h.prototype,"areaBounds",void 0),w([e.Property(null)],h.prototype,"availableSize",void 0),w([e.Property()],h.prototype,"blazorTemplate",void 0),w([e.Property(!1)],h.prototype,"isCanvas",void 0),w([e.Property(!1)],h.prototype,"isTextWrap",void 0),w([e.Property(null)],h.prototype,"tooltipPlacement",void 0),w([e.Property(null)],h.prototype,"controlInstance",void 0),w([e.Event()],h.prototype,"tooltipRender",void 0),w([e.Event()],h.prototype,"loaded",void 0),w([e.Event()],h.prototype,"animationComplete",void 0),h=w([e.NotifyPropertyChanges],h)}(e.Component);t.TextStyle=S,t.TooltipBorder=P,t.AreaBounds=L,t.ToolLocation=O,t.Tooltip=A,t.getTooltipThemeColor=i,t.measureText=r,t.findDirection=o,t.Size=u,t.Rect=y,t.Side=f,t.CustomizeOption=g,t.TextOption=m,t.getElement=n,t.removeElement=s,t.drawSymbol=a,t.calculateShapes=h,t.PathOption=x,t.textElement=l,t.TooltipLocation=v,t.SvgRenderer=d,t.CanvasRenderer=p,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],e):e(t.ej={},t.ej2Base)}(this,function(t,e){"use strict";function i(t){var e;switch(t){case"Highcontrast":case"HighContrast":e={tooltipFill:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696"};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":e={tooltipFill:"#F4F4F4",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A"};break;case"Bootstrap4":e={tooltipFill:"rgba(0, 0, 0, 0.9)",tooltipBoldLabel:"rgba(255, 255, 255)",tooltipLightLabel:"rgba(255, 255, 255, 0.9)",tooltipHeaderLine:"rgba(255, 255, 255, 0.2)"};break;default:e={tooltipFill:"rgba(0, 8, 22, 0.75)",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return e}function r(t,i){var r=t||"",o=document.getElementById("chartmeasuretext");if(null===o&&(o=e.createElement("text",{id:"chartmeasuretext"}),document.body.appendChild(o)),"string"==typeof t&&(t.indexOf("<")>-1||t.indexOf(">")>-1)){for(var n=t.split(" "),s=0;s<n.length;s++)-1===n[s].indexOf("<br/>")&&(n[s]=n[s].replace(/[<>]/g,"&"));t=n.join(" ")}return o.innerHTML=r.indexOf("<br>")>-1||r.indexOf("<br/>")>-1?r:t,o.style.position="fixed",o.style.fontSize=i.size,o.style.fontWeight=i.fontWeight,o.style.fontStyle=i.fontStyle,o.style.fontFamily=i.fontFamily,o.style.visibility="hidden",o.style.top="-100",o.style.left="0",o.style.whiteSpace="nowrap",o.style.lineHeight="normal",new u(o.clientWidth,o.clientHeight)}function o(t,e,i,r,o,n,s,a,h,l,d){var p="",c=i.x,u=i.y,y=i.x+i.width,f=i.y+i.height;return d=d||0,n?(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f),0!==o&&(p=(p=p.concat(" L "+(r.x+o/2)+" "+f)).concat(" L "+(h+d)+" "+(f+o-d)),p+=" Q "+h+" "+(f+o)+" "+(h-d)+" "+(f+o-d)),p=r.x-o/2>c?p.concat(" L "+(r.x-o/2)+" "+f+" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z"):0===o?p.concat(" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z"):p.concat(" L "+c+" "+(f+e)+" z")):s?(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u+" L "+(r.x-o/2)+" "+u)).concat(" L "+(h-d)+" "+(r.y+d)),p=(p=(p+=" Q "+h+" "+r.y+" "+(h+d)+" "+(r.y+d)).concat(" L "+(r.x+o/2)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f+" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z")):a?(p=(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u)).concat(" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e)+" L "+y+" "+(r.y-o/2))).concat(" L "+(y+o-d)+" "+(l-d)),p=(p=(p+=" Q "+(y+o)+" "+l+" "+(y+o-d)+" "+(l+d)).concat(" L "+y+" "+(r.y+o/2)+" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f)).concat(" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z")):(p=(p=p.concat("M "+(c+t)+" "+u+" Q "+c+" "+u+" "+c+" "+(u+e)+" L "+c+" "+(r.y-o/2))).concat(" L "+(c-o+d)+" "+(l-d)),p=(p=(p+=" Q "+(c-o)+" "+l+" "+(c-o+d)+" "+(l+d)).concat(" L "+c+" "+(r.y+o/2)+" L "+c+" "+(f-e)+" Q "+c+" "+f+" "+(c+t)+" "+f)).concat(" L "+(y-t)+" "+f+" Q "+y+" "+f+" "+y+" "+(f-e)+" L "+y+" "+(u+e)+" Q "+y+" "+u+" "+(y-t)+" "+u+" z")),p}function n(t){return document.getElementById(t)}function s(t){var i=n(t);i&&e.remove(i)}function a(t,e,i,r,o,n){var s=new d(""),a=h(t,i,e,o,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",n),l}function h(t,i,r,o,n){var s,a="Path",h=i.width,l=i.height,d=t.x,p=t.y,c=t.x+-h/2,u=t.y+-l/2;switch(r){case"Circle":case"Bubble":a="Ellipse",e.merge(o,{rx:h/2,ry:l/2,cx:d,cy:p});break;case"Cross":s="M "+c+" "+p+" L "+(d+h/2)+" "+p+" M "+d+" "+(p+l/2)+" L "+d+" "+(p+-l/2),e.merge(o,{d:s});break;case"HorizontalLine":s="M "+c+" "+p+" L "+(d+h/2)+" "+p,e.merge(o,{d:s});break;case"VerticalLine":s="M "+d+" "+(p+l/2)+" L "+d+" "+(p+-l/2),e.merge(o,{d:s});break;case"Diamond":s="M "+c+" "+p+" L "+d+" "+(p+-l/2)+" L "+(d+h/2)+" "+p+" L "+d+" "+(p+l/2)+" L "+c+" "+p+" z",e.merge(o,{d:s});break;case"Rectangle":s="M "+c+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+l/2)+" L "+c+" "+(p+l/2)+" L "+c+" "+(p+-l/2)+" z",e.merge(o,{d:s});break;case"Triangle":s="M "+c+" "+(p+l/2)+" L "+d+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+l/2)+" L "+c+" "+(p+l/2)+" z",e.merge(o,{d:s});break;case"InvertedTriangle":s="M "+(d+h/2)+" "+(p-l/2)+" L "+d+" "+(p+l/2)+" L "+(d-h/2)+" "+(p-l/2)+" L "+(d+h/2)+" "+(p-l/2)+" z",e.merge(o,{d:s});break;case"Pentagon":for(var y=void 0,f=void 0,g=0;g<=5;g++)y=h/2*Math.cos(Math.PI/180*(72*g)),f=l/2*Math.sin(Math.PI/180*(72*g)),s=0===g?"M "+(d+y)+" "+(p+f)+" ":s.concat("L "+(d+y)+" "+(p+f)+" ");s=s.concat("Z"),e.merge(o,{d:s});break;case"Image":a="Image",e.merge(o,{href:n,height:l,width:h,x:c,y:u})}return{renderOption:o,functionName:a}}function l(t,e,i,r){var o,n,s={},a=new d("");return s={id:t.id,x:t.x,y:t.y,fill:i,"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,"text-anchor":t.anchor,transform:t.transform,opacity:e.opacity,"dominant-baseline":t.baseLine},n="string"==typeof t.text?t.text:t.text[0],o=a.createText(s,n),o.style.fontFamily=e.fontFamily,o.style.fontStyle=e.fontStyle,o.style.fontSize=e.size,o.style.fontWeight=e.fontWeight,o.style.color=e.color,r.appendChild(o),o}var d=function(){function t(t){this.svgLink="http://www.w3.org/2000/svg",this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createSvg=function(t){return e.isNullOrUndefined(t.id)&&(t.id=this.rootId+"_svg"),this.svgObj=document.getElementById(t.id),e.isNullOrUndefined(document.getElementById(t.id))&&(this.svgObj=document.createElementNS(this.svgLink,"svg")),this.svgObj=this.setElementAttributes(t,this.svgObj),this.setSVGSize(t.width,t.height),this.svgObj},t.prototype.setSVGSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)||this.width<=0?this.svgObj.setAttribute("width",t?t.toString():o.width.toString()):this.svgObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)||this.height<=0?this.svgObj.setAttribute("height",i?i.toString():"450"):this.svgObj.setAttribute("height",this.height.toString())},t.prototype.drawPath=function(t,e){var i=document.getElementById(t.id);return null===i&&(i=document.createElementNS(this.svgLink,"path")),i=this.setElementAttributes(t,i)},t.prototype.drawLine=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"line")),e=this.setElementAttributes(t,e)},t.prototype.drawRectangle=function(t,e){var i=document.getElementById(t.id);return null===i&&(i=document.createElementNS(this.svgLink,"rect")),i=this.setElementAttributes(t,i)},t.prototype.drawCircle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"circle")),e=this.setElementAttributes(t,e)},t.prototype.drawPolyline=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polyline")),e=this.setElementAttributes(t,e)},t.prototype.drawEllipse=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"ellipse")),e=this.setElementAttributes(t,e)},t.prototype.drawPolygon=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polygon")),e=this.setElementAttributes(t,e)},t.prototype.drawImage=function(t){var i=document.createElementNS(this.svgLink,"image");return i.setAttributeNS(null,"height",t.height.toString()),i.setAttributeNS(null,"width",t.width.toString()),i.setAttributeNS("http://www.w3.org/1999/xlink","href",t.href),i.setAttributeNS(null,"x",t.x.toString()),i.setAttributeNS(null,"y",t.y.toString()),i.setAttributeNS(null,"id",t.id),i.setAttributeNS(null,"visibility",t.visibility),e.isNullOrUndefined(this.getOptionValue(t,"clip-path"))||i.setAttributeNS(null,"clip-path",this.getOptionValue(t,"clip-path")),e.isNullOrUndefined(t.preserveAspectRatio)||i.setAttributeNS(null,"preserveAspectRatio",t.preserveAspectRatio),i},t.prototype.createText=function(t,i,r,o,n,s){var a=document.createElementNS(this.svgLink,"text");return a=this.setElementAttributes(t,a),e.isNullOrUndefined(i)||(a.textContent=i),a},t.prototype.createTSpan=function(t,i){var r=document.createElementNS(this.svgLink,"tspan");return r=this.setElementAttributes(t,r),e.isNullOrUndefined(i)||(r.textContent=i),r},t.prototype.createTitle=function(t){var e=document.createElementNS(this.svgLink,"title");return e.textContent=t,e},t.prototype.createDefs=function(){return document.createElementNS(this.svgLink,"defs")},t.prototype.createClipPath=function(t){var e=document.createElementNS(this.svgLink,"clipPath");return e=this.setElementAttributes(t,e)},t.prototype.createForeignObject=function(t){var e=document.createElementNS(this.svgLink,"foreignObject");return e=this.setElementAttributes(t,e)},t.prototype.createGroup=function(t){var e=document.createElementNS(this.svgLink,"g");return e=this.setElementAttributes(t,e)},t.prototype.createPattern=function(t,e){var i=document.createElementNS(this.svgLink,e);return i=this.setElementAttributes(t,i)},t.prototype.createRadialGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"radialGradient",cx:r.cx+"%",cy:r.cy+"%",r:r.r+"%",fx:r.fx+"%",fy:r.fy+"%"};this.drawGradient("radialGradient",n,t),o="url(#"+this.rootId+"_"+i+"radialGradient)"}return o},t.prototype.createLinearGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"linearGradient",x1:r.x1+"%",y1:r.y1+"%",x2:r.x2+"%",y2:r.y2+"%"};this.drawGradient("linearGradient",n,t),o="url(#"+this.rootId+"_"+i+"linearGradient)"}return o},t.prototype.drawGradient=function(t,i,r){var o=this.createDefs(),n=document.createElementNS(this.svgLink,t);n=this.setElementAttributes(i,n);for(var s=0;s<r.length;s++){var a=document.createElementNS(this.svgLink,"stop");a.setAttribute("offset",r[s].colorStop),a.setAttribute("stop-color",r[s].color),a.setAttribute("stop-opacity",r[s].opacity?r[s].opacity:"1"),e.isNullOrUndefined(r[s].style)||a.setAttribute("style",r[s].style),n.appendChild(a)}return o.appendChild(n),o},t.prototype.drawClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Rect";var r=this.drawRectangle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.drawCircularClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Circle";var r=this.drawCircle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=0;r<i.length;r++)e.setAttribute(i[r],t[i[r]]);return e},t.prototype.createCanvas=function(t){return null},t}(),p=function(){function t(t){this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createCanvas=function(t){var e=document.createElement("canvas");return e.setAttribute("id",this.rootId+"_canvas"),this.ctx=e.getContext("2d"),this.canvasObj=e,this.setCanvasSize(t.width,t.height),this.canvasObj},t.prototype.setCanvasSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)?this.canvasObj.setAttribute("width",t?t.toString():o.width.toString()):this.canvasObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)?this.canvasObj.setAttribute("height",i?i.toString():"450"):this.canvasObj.setAttribute("height",this.height.toString())},t.prototype.setAttributes=function(t){this.ctx.lineWidth=this.getOptionValue(t,"stroke-width");var i=this.getOptionValue(t,"stroke-dasharray");if(!e.isNullOrUndefined(i)){var r=i.split(",");this.ctx.setLineDash([parseInt(r[0],10),parseInt(r[1],10)])}this.ctx.strokeStyle=this.getOptionValue(t,"stroke")},t.prototype.drawLine=function(t){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.moveTo(t.x1,t.y1),this.ctx.lineTo(t.x2,t.y2),this.ctx.stroke(),this.ctx.restore()},t.prototype.drawRectangle=function(t,e){var i=this.ctx,r=t.rx;return this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=this.getOptionValue(t,"opacity"),this.setAttributes(t),this.ctx.rect(t.x,t.y,t.width,t.height),null!==r&&r>=0?this.drawCornerRadius(t):("none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,this.ctx.fillRect(t.x,t.y,t.width,t.height),this.ctx.stroke()),this.ctx.restore(),this.ctx=i,this.canvasObj},t.prototype.drawCornerRadius=function(t){var e=t.rx,i=t.x,r=t.y,o=t.width,n=t.height;"none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,o<2*e&&(e=o/2),n<2*e&&(e=n/2),this.ctx.beginPath(),this.ctx.moveTo(i+o-e,r),this.ctx.arcTo(i+o,r,i+o,r+n,e),this.ctx.arcTo(i+o,r+n,i,r+n,e),this.ctx.arcTo(i,r+n,i,r,e),this.ctx.arcTo(i,r,i+o,r,e),this.ctx.closePath(),this.ctx.fill(),this.ctx.stroke()},t.prototype.drawPath=function(t,e){var i=t.d.split(" "),r=this.getOptionValue(t,"stroke-width"),o=this.ctx,n=!0;this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=t.opacity?t.opacity:this.getOptionValue(t,"fill-opacity"),this.setAttributes(t);for(var s=0;s<i.length;s+=3){var a=parseFloat(i[s+1]),h=parseFloat(i[s+2]);switch(i[s]){case"M":t.innerR||t.cx||this.ctx.moveTo(a,h);break;case"L":t.innerR||this.ctx.lineTo(a,h);break;case"Q":var l=parseFloat(i[s+3]),d=parseFloat(i[s+4]);this.ctx.quadraticCurveTo(a,h,l,d),s+=2;break;case"C":var p=parseFloat(i[s+3]),c=parseFloat(i[s+4]),u=parseFloat(i[s+5]),y=parseFloat(i[s+6]);this.ctx.bezierCurveTo(a,h,p,c,u,y),s+=4;break;case"A":t.innerR?n&&(this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.arc(t.x,t.y,t.innerR,t.end,t.start,!t.counterClockWise),n=!1):t.cx?this.ctx.arc(t.cx,t.cy,t.radius,0,2*Math.PI,t.counterClockWise):(this.ctx.moveTo(t.x,t.y),this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.lineTo(t.x,t.y)),s+=5;break;case"z":case"Z":this.ctx.closePath(),s-=2}}return"none"!==t.fill&&void 0!==t.fill&&(this.ctx.fillStyle=t.fill,this.ctx.fill()),r>0&&this.ctx.stroke(),this.ctx.restore(),this.ctx=o,this.canvasObj},t.prototype.createText=function(t,i,r,o,n,s){var a=this.getOptionValue(t,"font-weight");e.isNullOrUndefined(a)||"regular"!==a.toLowerCase()||(a="normal");var h=this.getOptionValue(t,"font-size"),l=this.getOptionValue(t,"font-family"),d=this.getOptionValue(t,"font-style").toLowerCase()+" "+a+" "+h+" "+l,p=this.getOptionValue(t,"text-anchor"),c=void 0!==t.opacity?t.opacity:1;e.isNullOrUndefined(t.labelRotation)||t.labelRotation;if("middle"===p&&(p="center"),this.ctx.save(),this.ctx.fillStyle=t.fill,this.ctx.font=d,this.ctx.textAlign=p,this.ctx.globalAlpha=c,t.baseline&&(this.ctx.textBaseline=t.baseline),!s){this.ctx.translate(t.x+0+(r||0),t.y+(o||0)),this.ctx.rotate(t.labelRotation*Math.PI/180)}return this.ctx.fillText(i,s?t.x:0,s?n:0),this.ctx.restore(),this.canvasObj},t.prototype.drawCircle=function(t,e){var i=this.ctx;return this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.cx,t.cy,t.r,0,2*Math.PI),this.ctx.fillStyle=t.fill,this.ctx.globalAlpha=t.opacity,this.ctx.fill(),e&&this.ctx.translate(e[0],e[1]),this.setAttributes(t),this.ctx.stroke(),this.ctx.restore(),this.ctx=i,this.canvasObj},t.prototype.drawPolyline=function(t){this.ctx.save(),this.ctx.beginPath();for(var e=t.points.split(" "),i=0;i<e.length-1;i++){var r=e[i].split(","),o=parseFloat(r[0]),n=parseFloat(r[1]);0===i?this.ctx.moveTo(o,n):this.ctx.lineTo(o,n)}this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore()},t.prototype.drawEllipse=function(t,e){var i=this.ctx,r=Math.max(t.rx,t.ry),o=t.rx/r,n=t.ry/r;this.ctx.save(),this.ctx.beginPath(),this.ctx.translate(t.cx,t.cy),e&&this.ctx.translate(e[0],e[1]),this.ctx.save(),this.ctx.scale(o,n),this.ctx.arc(0,0,r,0,2*Math.PI,!1),this.ctx.fillStyle=t.fill,this.ctx.fill(),this.ctx.restore(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore(),this.ctx=i},t.prototype.drawImage=function(t){this.ctx.save();var i=new Image;e.isNullOrUndefined(t.href)||(i.src=t.href,this.ctx.drawImage(i,t.x,t.y,t.width,t.height)),this.ctx.restore()},t.prototype.createLinearGradient=function(t){var i;e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createLinearGradient(0,0,0,this.canvasObj.height));return this.setGradientValues(t,i)},t.prototype.createRadialGradient=function(t){var i;e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createRadialGradient(0,0,0,0,0,this.canvasObj.height));return this.setGradientValues(t,i)},t.prototype.setGradientValues=function(t,i){var r;if(e.isNullOrUndefined(t[0].colorStop))r=t[0].color.toString();else{for(var o=0;o<=t.length-1;o++){var n=t[o].color,s=t[o].colorStop.slice(0,-1),a=parseInt(s,10)/100;i.addColorStop(a,n)}r=i.toString()}return r},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=Object.keys(t).map(function(e){return t[e]}),o=0;o<i.length;o++)e.setAttribute(i[o],r[o]);return null},t.prototype.updateCanvasAttributes=function(t){this.setElementAttributes(t,this.canvasObj);var i=this.ctx;if(!e.isNullOrUndefined(this.dataUrl)){var r=new Image;r.onload=function(){i.drawImage(r,0,0)},r.src=this.dataUrl}},t.prototype.clearRect=function(t){this.ctx.restore(),this.ctx.clearRect(t.x,t.y,t.width,t.height)},t.prototype.createGroup=function(t){return null},t.prototype.drawClipPath=function(t){return null},t.prototype.canvasClip=function(t){this.ctx.save(),this.ctx.fillStyle="transparent",this.ctx.rect(t.x,t.y,t.width,t.height),this.ctx.fill(),this.ctx.clip()},t.prototype.canvasRestore=function(){this.ctx.restore()},t.prototype.drawPolygon=function(t){return null},t.prototype.createDefs=function(){return null},t.prototype.createClipPath=function(t){return null},t.prototype.createSvg=function(t){return null},t}(),c=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),u=function(){return function(t,e){this.width=t,this.height=e}}(),y=function(){return function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}}(),f=function(){return function(t,e){this.isRight=e,this.isBottom=t}}(),g=function(){return function(t){this.id=t}}(),m=function(t){function e(e,i,r,o,n,s,a,h){void 0===s&&(s="");var l=t.call(this,e)||this;return l.transform="",l.baseLine="auto",l.labelRotation=0,l.x=i,l.y=r,l.anchor=o,l.text=n,l.transform=s,l.baseLine=a,l.labelRotation=h,l}return c(e,t),e}(g),x=function(t){function e(e,i,r,o,n,s,a){var h=t.call(this,e)||this;return h.opacity=n,h.fill=i,h.stroke=o,h["stroke-width"]=r,h["stroke-dasharray"]=s,h.d=a,h}return c(e,t),e}(g),v=function(){return function(t,e){this.x=t,this.y=e}}(),b=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),w=function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},S=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(null)],i.prototype,"size",void 0),w([e.Property("")],i.prototype,"color",void 0),w([e.Property("Segoe UI")],i.prototype,"fontFamily",void 0),w([e.Property("Normal")],i.prototype,"fontWeight",void 0),w([e.Property("Normal")],i.prototype,"fontStyle",void 0),w([e.Property(1)],i.prototype,"opacity",void 0),i}(e.ChildProperty),P=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property("")],i.prototype,"color",void 0),w([e.Property(1)],i.prototype,"width",void 0),i}(e.ChildProperty),L=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),w([e.Property(0)],i.prototype,"width",void 0),w([e.Property(0)],i.prototype,"height",void 0),i}(e.ChildProperty),O=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),i}(e.ChildProperty),A=function(t){function h(e,i){return t.call(this,e,i)||this}return b(h,t),h.prototype.preRender=function(){this.allowServerDataBinding=!1,this.initPrivateVariable(),this.isCanvas||this.removeSVG(),this.createTooltipElement()},h.prototype.initPrivateVariable=function(){this.renderer=new d(this.element.id),this.themeStyle=i(this.theme),this.formattedText=[],this.padding=5,this.isFirst=!0,this.markerPoint=[]},h.prototype.removeSVG=function(){var t=document.getElementById(this.element.id+"_svg"),i=document.getElementById(this.element.id+"parent_template");this.blazorTemplate&&e.resetBlazorTemplate(this.element.id+"parent_template_blazorTemplate"),t&&t.parentNode&&e.remove(t),i&&i.parentNode&&e.remove(i)},h.prototype.render=function(){if(this.fadeOuted=!1,this.template)this.updateTemplateFn(),this.createTemplate(this.areaBounds,this.location);else{this.renderText(this.isFirst);var t={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",t);var i=this.renderTooltipElement(this.areaBounds,this.location);this.drawMarker(i.isBottom,i.isRight,this.markerSize)}this.trigger("loaded",{tooltip:this});var r=document.getElementById("chartmeasuretext");r&&e.remove(r),this.allowServerDataBinding=!0},h.prototype.createTooltipElement=function(){if(this.textElements=[],!this.template||this.shared){var t=this.renderer.createSvg({id:this.element.id+"_svg"});this.element.appendChild(t);var e=document.getElementById(this.element.id+"_group");e||(e=this.renderer.createGroup({id:this.element.id+"_group"})).setAttribute("transform","translate(0,0)"),t.appendChild(e);var i=this.renderer.drawPath({id:this.element.id+"_path","stroke-width":"Bootstrap4"===this.theme?0:this.border.width,fill:this.fill||this.themeStyle.tooltipFill,opacity:"Bootstrap4"===this.theme?.9:this.opacity,stroke:this.border.color});e.appendChild(i)}},h.prototype.drawMarker=function(t,e,i){if(this.shapes.length<=0)return null;for(var r,o=0,s=this.renderer.createGroup({id:this.element.id+"_trackball_group"}),h=n(this.element.id+"_group"),l=2*this.marginX+i/2+(e?this.arrowPadding:0),d=0,p=this.shapes;d<p.length;d++){var c=p[d];"None"!==c&&(r=new x(this.element.id+"_Trackball_"+o,this.palette[o],1,"#cccccc",1,null),this.markerPoint[o]&&s.appendChild(a(new v(l,this.markerPoint[o]-this.padding+(t?this.arrowPadding:0)),c,new u(i,i),"",r,null)),o++)}h.appendChild(s)},h.prototype.renderTooltipElement=function(t,i){var s,a=n(this.element.id),h=new v(0,0),l=new v(0,0),d=n(this.element.id+"_svg"),p=n(this.element.id+"_group"),c=n(this.element.id+"_path"),u=!1,g=!1,m=!1,x=0,b=0;if(this.tipRadius=1,""!==this.header&&(this.elementSize.height+=this.marginY),this.content.length>1?(s=this.sharedTooltipLocation(t,this.location.x,this.location.y),u=!0):(s=this.tooltipLocation(t,i,h,l),this.inverted?x=(g=s.x<i.x+this.clipBounds.x)?0:this.arrowPadding:(m=!(u=s.y<i.y+this.clipBounds.y),b=u?0:this.arrowPadding)),""!==this.header){var w=r(this.isWrap?this.wrappedText:this.header,this.textStyle).height+2*this.marginY+(m?this.arrowPadding:0)+(this.isWrap?5:0),S="M "+(3*this.marginX+(g||u||m?0:this.arrowPadding))+" "+w+"L "+(s.width+(g||u||m?0:this.arrowPadding)-2*this.marginX)+" "+w,P=this.renderer.drawPath({id:this.element.id+"_header_path","stroke-width":1,fill:null,opacity:.8,stroke:this.themeStyle.tooltipHeaderLine,d:S});p.appendChild(P)}var L=this.border.width/2,O=new y(L+x,L+b,s.width-L,s.height-L);if(p.setAttribute("opacity","1"),!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(a,s.x,s.y):this.animateTooltipDiv(a,s),d.setAttribute("height",(s.height+this.border.width+(this.inverted?0:this.arrowPadding)+5).toString()),d.setAttribute("width",(s.width+this.border.width+(this.inverted?this.arrowPadding:0)+5).toString()),d.setAttribute("opacity","1"),e.isNullOrUndefined(this.tooltipPlacement)||(u=this.tooltipPlacement.indexOf("Top")>-1,m=this.tooltipPlacement.indexOf("Bottom")>-1,g=this.tooltipPlacement.indexOf("Left")>-1),c.setAttribute("d",o(this.rx,this.ry,O,h,this.arrowPadding,u,m,g,l.x,l.y,this.tipRadius)),this.enableShadow&&"Bootstrap4"!==this.theme){var A=this.element.id+"_shadow";c.setAttribute("filter",e.Browser.isIE?"":"url(#"+A+")");var C='<filter id="'+A+'" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';C+='<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>',C+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var T=this.renderer.createDefs();T.setAttribute("id",this.element.id+"SVG_tooltip_definition"),p.appendChild(T),T.innerHTML=C}return c.setAttribute("stroke",this.border.color),this.changeText(new v(x,b),m,!g&&!u&&!m,s),new f(m,!g&&!u&&!m)},h.prototype.changeText=function(t,e,i,r){var o=document.getElementById(this.element.id+"_text");e&&o.setAttribute("transform","translate(0,"+this.arrowPadding+")"),i&&o.setAttribute("transform","translate("+this.arrowPadding+" 0)")},h.prototype.findFormattedText=function(){this.formattedText=[],""!==this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()&&(this.formattedText=this.formattedText.concat(this.header)),this.formattedText=this.formattedText.concat(this.content)},h.prototype.renderText=function(t){var i,o,a,h,d,p,c=0,y=0,f=0,g=e.extend({},this.textStyle,null,!0).properties,x=n(this.element.id+"_group"),v="";this.findFormattedText();var b,w="rtl"===document.body.getAttribute("dir")?"end":"start";this.leftSpace=this.areaBounds.x+this.location.x,this.rightSpace=this.areaBounds.x+this.areaBounds.width-this.leftSpace;var S=this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim(),P=this.header.indexOf("<b>")>-1&&this.header.indexOf("</b>")>-1,L=r(this.formattedText[0],g).width+2*this.marginX+this.arrowPadding,O=this.location.x-L<this.location.x,A=this.areaBounds.x+this.areaBounds.width<this.location.x+L,C=""!==S?this.marginY:0,T=!0,k=!0;this.markerPoint=[];var E,N=this.shapes.length>0?10:0,B=this.shapes.length>0?5:0,z="Normal",_=this.themeStyle.tooltipLightLabel,F=22/parseFloat("13px")*parseFloat(g.size);t&&!this.isCanvas||(s(this.element.id+"_text"),s(this.element.id+"_header_path"),s(this.element.id+"_trackball_group"),s(this.element.id+"SVG_tooltip_definition"));var I=new m(this.element.id+"_text",2*this.marginX,2*this.marginY+2*this.padding+(2===this.marginY?3:0),w,""),R=l(I,g,null,x),j=1===this.formattedText.length&&this.formattedText[0].indexOf(" : <b>")>-1;o=(b=""!==this.header)&&P?16:13;for(var M=0,G=this.formattedText.length;M<G;M++)if(h=this.formattedText[M].replace(/<(b|strong)>/g,"<b>").replace(/<\/(b|strong)>/g,"</b>").split(/<br.*?>/g),0===M&&!j&&this.isTextWrap&&(this.leftSpace<L||O)&&(this.rightSpace<L||A)&&(E=Math.round(this.leftSpace>this.rightSpace?this.leftSpace/o:this.rightSpace/o),h=(""!==S?S:this.formattedText[M]).match(new RegExp(".{1,"+E+"}","g")),this.wrappedText=P?"<b>"+h.join("<br>")+"</b>":h.join("<br>"),this.isWrap=h.length>1),""!==h[0]){0===M&&""!==S||this.markerPoint.push((""!==S?this.marginY:0)+I.y+c);for(var V=0,U=h.length;V<U;V++){f=0,k=!0,c+=F;for(var W=0,D=(i=h[V].replace(/<b>/g,"<br><b>").replace(/<\/b>/g,"</b><br>").replace(/:/g,"<br>:<br>").split("<br>")).length;W<D;W++)if(d=i[W],/\S/.test(d)||""===d||(d=" "),!k&&" "===d||""!==d.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()){f+=" "!==d?4:0,k&&!T?(p={x:2*this.marginX+(N+B),dy:F+(k?C:0),fill:""},C=null):p=T&&k?{x:""===S?2*this.marginX+(N+B):2*this.marginX+(this.isWrap?N+B:0)}:{},k=!1,a=this.renderer.createTSpan(p,""),R.appendChild(a),d.indexOf("<b>")>-1||P&&0===W&&0===M&&(b||this.isWrap)?(z="bold",_=this.themeStyle.tooltipBoldLabel,v="font-weight:"+z,g.fontWeight=z,a.setAttribute("fill",this.textStyle.color||_)):(v="bold"===z?"font-weight:"+z:"",g.fontWeight=z,a.setAttribute("fill",this.textStyle.color||_)),(d.indexOf("</b>")>-1||P&&W===D-1&&0===M&&(b||this.isWrap))&&(z="Normal",_=this.themeStyle.tooltipLightLabel);var Q=/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(d);a.textContent=d=d.replace(/<[a-zA-Z\/](.|\n)*?>/g,Q?"":""),f+=r(d,g).width,""!==v&&(a.style.fontWeight=v.split("font-weight:")[1],a.style.color=a.getAttribute("fill")),a.style.fontFamily="inherit",a.style.fontStyle="inherit",a.style.fontSize="inherit",T=!1}f-=4,y=Math.max(y,f)}}this.elementSize=new u(y+(y>0?2*this.marginX:0),c),this.elementSize.width+=N+B;var H=R.childNodes[0];if(""!==S&&H&&!this.isWrap){g.fontWeight="bold";var X=(this.elementSize.width+2*this.padding)/2-r(S,g).width/2;H.setAttribute("x",X.toString())}},h.prototype.createTemplate=function(t,i){var r={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",r);var o=document.getElementById(this.element.id);this.isCanvas&&this.removeSVG();var s=o.firstElementChild;if(s&&e.remove(s),r.cancel)e.remove(n(this.element.id+"_tooltip"));else{for(var a=e.createElement("div",{id:this.element.id+"parent_template"}),h=this.templateFn(this.data,this.controlInstance,a.id,a.id+"_blazorTemplate","");h&&h.length>0;)e.isBlazor()||1===h.length?(a.appendChild(h[0]),h=null):a.appendChild(h[0]);o.appendChild(a);var l=this.isCanvas?a:this.element,d=l.getBoundingClientRect();this.padding=0,this.elementSize=new u(d.width,d.height);var p=this.shared?this.sharedTooltipLocation(t,this.location.x,this.location.y):this.tooltipLocation(t,i,new v(0,0),new v(0,0));if(!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(l,p.x,p.y):this.animateTooltipDiv(this.element,p),this.blazorTemplate){var c=function(){var e=n(y.element.id).getBoundingClientRect();y.elementSize=new u(e.width,e.height);var r=y.tooltipLocation(t,i,new v(0,0),new v(0,0));y.updateDiv(n(y.element.id),r.x,r.y)},y=this;c.bind(y,t,i),e.updateBlazorTemplate(this.element.id+"parent_template_blazorTemplate",this.blazorTemplate.name,this.blazorTemplate.parent,void 0,c)}}},h.prototype.sharedTooltipLocation=function(t,e,i){var r=this.elementSize.width+2*this.marginX,o=this.elementSize.height+2*this.marginY,n=new y(e+2*this.padding,i-o-this.padding,r,o);return n.y<t.y&&(n.y+=n.height+2*this.padding),n.x+n.width>t.x+t.width&&(n.x-=n.width+4*this.padding),n},h.prototype.getCurrentPosition=function(t,e,i,r){var o=this.tooltipPlacement,n=this.clipBounds.x,s=this.clipBounds.y,a=this.offset,h=this.elementSize.width+2*this.marginX,l=this.elementSize.height+2*this.marginY,d=new v(e.x,e.y);return"Top"===o||"Bottom"===o?(d=new v(d.x+n-this.elementSize.width/2-this.padding,d.y+s-this.elementSize.height-2*this.padding-this.arrowPadding-a),i.x=r.x=h/2,"Bottom"===o&&(d.y=e.y+s+a),t.x+t.width<d.x+h?(d.x=t.width>h?t.x+t.width-h+6:t.x,i.x=r.x=t.width>h?t.x+e.x-d.x:e.x):t.x>d.x&&(d.x=t.x,i.x=r.x=e.x)):(d=new v(d.x+n+a,d.y+s-this.elementSize.height/2-this.padding),i.y=r.y=l/2,"Left"===o&&(d.x=e.x+n-a-(h+this.arrowPadding)),t.y+t.height<d.y+l?(d.y=t.height>l?t.y+t.height-l+6:t.y,i.y=r.y=t.height>l?t.y+e.y-d.y:e.y):t.y>d.y&&(d.y=t.y,i.y=r.y=e.y)),new y(d.x,d.y,h,l)},h.prototype.tooltipLocation=function(t,i,r,o){if(!e.isNullOrUndefined(this.tooltipPlacement)){return this.getCurrentPosition(t,i,r,o)}var n=new v(i.x,i.y),s=this.elementSize.width+2*this.marginX,a=this.elementSize.height+2*this.marginY,h=this.offset,l=this.clipBounds.x,d=this.clipBounds.y,p=t.x,c=t.y;return this.inverted?(n=new v(n.x+l+h,n.y+d-this.elementSize.height/2-this.padding),r.y=o.y=a/2,(n.x+s+this.arrowPadding>p+t.width||this.isNegative)&&(n.x=(i.x>t.width?t.width:i.x)+l-h-(s+this.arrowPadding)),n.x<p&&(n.x=(i.x<0?0:i.x)+l+h),n.y<=c&&(r.y-=c-n.y,o.y-=c-n.y,n.y=c),n.y+a>=c+t.height&&(r.y+=n.y+a-(c+t.height),o.y+=n.y+a-(c+t.height),n.y-=n.y+a-(c+t.height)),r.y+this.arrowPadding/2>a-this.ry&&(r.y=a-this.ry-this.arrowPadding/2,o.y=a,this.tipRadius=0),r.y-this.arrowPadding/2<this.ry&&(r.y=this.ry+this.arrowPadding/2,o.y=0,this.tipRadius=0)):(n=new v(n.x+l-this.elementSize.width/2-this.padding,n.y+d-this.elementSize.height-2*this.padding-this.arrowPadding-h),r.x=o.x=s/2,(n.y<c||this.isNegative)&&(n.y=(i.y<0?0:i.y)+d+h),n.y+a+this.arrowPadding>c+t.height&&(n.y=Math.min(i.y,c+t.height)+d-this.elementSize.height-2*this.padding-this.arrowPadding-h),o.x=s/2,n.x<p&&(r.x-=p-n.x,o.x-=p-n.x,n.x=p),n.x+s>p+t.width&&(r.x+=n.x+s-(p+t.width),o.x+=n.x+s-(p+t.width),n.x-=n.x+s-(p+t.width)),r.x+this.arrowPadding/2>s-this.rx&&(r.x=s-this.rx-this.arrowPadding/2,o.x=s,this.tipRadius=0),r.x-this.arrowPadding/2<this.rx&&(r.x=this.rx+this.arrowPadding/2,o.x=0,this.tipRadius=0)),new y(n.x,n.y,s,a)},h.prototype.animateTooltipDiv=function(t,i){var r,o=this,n=parseFloat(t.style.left),s=parseFloat(t.style.top);new e.Animation({}).animate(t,{duration:this.duration,progress:function(e){r=e.timeStamp/e.duration,t.style.animation=null,t.style.left=n+r*(i.x-n)+"px",t.style.top=s+r*(i.y-s)+"px"},end:function(e){o.updateDiv(t,i.x,i.y),o.trigger("animationComplete",{tooltip:o})}})},h.prototype.updateDiv=function(t,e,i){t.style.left=e+"px",t.style.top=i+"px"},h.prototype.updateTemplateFn=function(){if(this.template)try{document.querySelectorAll(this.template).length&&(this.templateFn=e.compile(document.querySelector(this.template).innerHTML.trim()))}catch(t){this.templateFn=e.compile(this.template)}},h.prototype.fadeOut=function(){var t=this,i=this.isCanvas&&!this.template?n(this.element.id+"_svg"):n(this.element.id);if(i){var r=i.firstChild;this.isCanvas&&!this.template&&(r=document.getElementById(this.element.id+"_group")?document.getElementById(this.element.id+"_group"):r);var o;r&&(o=parseFloat(r.getAttribute("opacity"))||1),new e.Animation({}).animate(r,{duration:200,progress:function(e){t.progressAnimation(r,o,e.timeStamp/e.duration)},end:function(e){t.fadeOuted=!0,t.endAnimation(r)}})}},h.prototype.progressAnimation=function(t,e,i){t.style.animation="",t.setAttribute("opacity",(e-i).toString())},h.prototype.endAnimation=function(t){t.setAttribute("opacity","0"),this.template&&(t.style.display="none"),this.trigger("animationComplete",{tooltip:this})},h.prototype.getPersistData=function(){return this.addOnPersist([])},h.prototype.getModuleName=function(){return"tooltip"},h.prototype.destroy=function(){t.prototype.destroy.call(this),this.element.classList.remove("e-tooltip")},h.prototype.onPropertyChanged=function(t,i){this.blazorTemplate&&e.resetBlazorTemplate(this.element.id+"parent_template_blazorTemplate"),this.isFirst=!1,this.render()},w([e.Property(!1)],h.prototype,"enable",void 0),w([e.Property(!1)],h.prototype,"shared",void 0),w([e.Property(!0)],h.prototype,"enableShadow",void 0),w([e.Property(null)],h.prototype,"fill",void 0),w([e.Property("")],h.prototype,"header",void 0),w([e.Property(.75)],h.prototype,"opacity",void 0),w([e.Complex({size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},S)],h.prototype,"textStyle",void 0),w([e.Property(null)],h.prototype,"template",void 0),w([e.Property(!0)],h.prototype,"enableAnimation",void 0),w([e.Property(300)],h.prototype,"duration",void 0),w([e.Property(!1)],h.prototype,"inverted",void 0),w([e.Property(!1)],h.prototype,"isNegative",void 0),w([e.Complex({color:"#cccccc",width:.5},P)],h.prototype,"border",void 0),w([e.Property([])],h.prototype,"content",void 0),w([e.Property(10)],h.prototype,"markerSize",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"clipBounds",void 0),w([e.Property([])],h.prototype,"palette",void 0),w([e.Property([])],h.prototype,"shapes",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"location",void 0),w([e.Property(0)],h.prototype,"offset",void 0),w([e.Property(2)],h.prototype,"rx",void 0),w([e.Property(2)],h.prototype,"ry",void 0),w([e.Property(5)],h.prototype,"marginX",void 0),w([e.Property(5)],h.prototype,"marginY",void 0),w([e.Property(12)],h.prototype,"arrowPadding",void 0),w([e.Property(null)],h.prototype,"data",void 0),w([e.Property("Material")],h.prototype,"theme",void 0),w([e.Complex({x:0,y:0,width:0,height:0},L)],h.prototype,"areaBounds",void 0),w([e.Property(null)],h.prototype,"availableSize",void 0),w([e.Property()],h.prototype,"blazorTemplate",void 0),w([e.Property(!1)],h.prototype,"isCanvas",void 0),w([e.Property(!1)],h.prototype,"isTextWrap",void 0),w([e.Property(null)],h.prototype,"tooltipPlacement",void 0),w([e.Property(null)],h.prototype,"controlInstance",void 0),w([e.Event()],h.prototype,"tooltipRender",void 0),w([e.Event()],h.prototype,"loaded",void 0),w([e.Event()],h.prototype,"animationComplete",void 0),h=w([e.NotifyPropertyChanges],h)}(e.Component);t.TextStyle=S,t.TooltipBorder=P,t.AreaBounds=L,t.ToolLocation=O,t.Tooltip=A,t.getTooltipThemeColor=i,t.measureText=r,t.findDirection=o,t.Size=u,t.Rect=y,t.Side=f,t.CustomizeOption=g,t.TextOption=m,t.getElement=n,t.removeElement=s,t.drawSymbol=a,t.calculateShapes=h,t.PathOption=x,t.textElement=l,t.TooltipLocation=v,t.SvgRenderer=d,t.CanvasRenderer=p,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ej2-svg-base.umd.min.js.map |
/*! | ||
* filename: ej2-svg-base.min.js | ||
* version : 18.4.39 | ||
* version : 18.4.44 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license. | ||
*/ | ||
this.ej=this.ej||{},this.ej.svgbase=function(t,e){"use strict";function i(t){var e;switch(t){case"Highcontrast":case"HighContrast":e={tooltipFill:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696"};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":e={tooltipFill:"#F4F4F4",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A"};break;case"Bootstrap4":e={tooltipFill:"rgba(0, 0, 0, 0.9)",tooltipBoldLabel:"rgba(255, 255, 255)",tooltipLightLabel:"rgba(255, 255, 255, 0.9)",tooltipHeaderLine:"rgba(255, 255, 255, 0.2)"};break;default:e={tooltipFill:"rgba(0, 8, 22, 0.75)",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return e}function r(t,i){var r=t||"",o=document.getElementById("chartmeasuretext");if(null===o&&(o=e.createElement("text",{id:"chartmeasuretext"}),document.body.appendChild(o)),"string"==typeof t&&(t.indexOf("<")>-1||t.indexOf(">")>-1)){for(var n=t.split(" "),s=0;s<n.length;s++)-1===n[s].indexOf("<br/>")&&(n[s]=n[s].replace(/[<>]/g,"&"));t=n.join(" ")}return o.innerHTML=r.indexOf("<br>")>-1||r.indexOf("<br/>")>-1?r:t,o.style.position="fixed",o.style.fontSize=i.size,o.style.fontWeight=i.fontWeight,o.style.fontStyle=i.fontStyle,o.style.fontFamily=i.fontFamily,o.style.visibility="hidden",o.style.top="-100",o.style.left="0",o.style.whiteSpace="nowrap",o.style.lineHeight="normal",new u(o.clientWidth,o.clientHeight)}function o(t,e,i,r,o,n,s,a,h,l,d){var p="",c=i.x,u=i.y,y=i.x+i.width,f=i.y+i.height;return d=d||0,n?(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f),0!==o&&(p=(p=p.concat(" L "+(r.x+o/2)+" "+f)).concat(" L "+(h+d)+" "+(f+o-d)),p+=" Q "+h+" "+(f+o)+" "+(h-d)+" "+(f+o-d)),p=r.x-o/2>c?p.concat(" L "+(r.x-o/2)+" "+f+" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z"):0===o?p.concat(" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z"):p.concat(" L "+c+" "+(f+e)+" z")):s?(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u+" L "+(r.x-o/2)+" "+u)).concat(" L "+(h-d)+" "+(r.y+d)),p=(p=(p+=" Q "+h+" "+r.y+" "+(h+d)+" "+(r.y+d)).concat(" L "+(r.x+o/2)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f+" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z")):a?(p=(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u)).concat(" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e)+" L "+y+" "+(r.y-o/2))).concat(" L "+(y+o-d)+" "+(l-d)),p=(p=(p+=" Q "+(y+o)+" "+l+" "+(y+o-d)+" "+(l+d)).concat(" L "+y+" "+(r.y+o/2)+" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f)).concat(" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z")):(p=(p=p.concat("M "+(c+t)+" "+u+" Q "+c+" "+u+" "+c+" "+(u+e)+" L "+c+" "+(r.y-o/2))).concat(" L "+(c-o+d)+" "+(l-d)),p=(p=(p+=" Q "+(c-o)+" "+l+" "+(c-o+d)+" "+(l+d)).concat(" L "+c+" "+(r.y+o/2)+" L "+c+" "+(f-e)+" Q "+c+" "+f+" "+(c+t)+" "+f)).concat(" L "+(y-t)+" "+f+" Q "+y+" "+f+" "+y+" "+(f-e)+" L "+y+" "+(u+e)+" Q "+y+" "+u+" "+(y-t)+" "+u+" z")),p}function n(t){return document.getElementById(t)}function s(t){var i=n(t);i&&e.remove(i)}function a(t,e,i,r,o,n){var s=new d(""),a=h(t,i,e,o,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",n),l}function h(t,i,r,o,n){var s,a="Path",h=i.width,l=i.height,d=t.x,p=t.y,c=t.x+-h/2,u=t.y+-l/2;switch(r){case"Circle":case"Bubble":a="Ellipse",e.merge(o,{rx:h/2,ry:l/2,cx:d,cy:p});break;case"Cross":s="M "+c+" "+p+" L "+(d+h/2)+" "+p+" M "+d+" "+(p+l/2)+" L "+d+" "+(p+-l/2),e.merge(o,{d:s});break;case"HorizontalLine":s="M "+c+" "+p+" L "+(d+h/2)+" "+p,e.merge(o,{d:s});break;case"VerticalLine":s="M "+d+" "+(p+l/2)+" L "+d+" "+(p+-l/2),e.merge(o,{d:s});break;case"Diamond":s="M "+c+" "+p+" L "+d+" "+(p+-l/2)+" L "+(d+h/2)+" "+p+" L "+d+" "+(p+l/2)+" L "+c+" "+p+" z",e.merge(o,{d:s});break;case"Rectangle":s="M "+c+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+l/2)+" L "+c+" "+(p+l/2)+" L "+c+" "+(p+-l/2)+" z",e.merge(o,{d:s});break;case"Triangle":s="M "+c+" "+(p+l/2)+" L "+d+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+l/2)+" L "+c+" "+(p+l/2)+" z",e.merge(o,{d:s});break;case"InvertedTriangle":s="M "+(d+h/2)+" "+(p-l/2)+" L "+d+" "+(p+l/2)+" L "+(d-h/2)+" "+(p-l/2)+" L "+(d+h/2)+" "+(p-l/2)+" z",e.merge(o,{d:s});break;case"Pentagon":for(var y=void 0,f=void 0,g=0;g<=5;g++)y=h/2*Math.cos(Math.PI/180*(72*g)),f=l/2*Math.sin(Math.PI/180*(72*g)),s=0===g?"M "+(d+y)+" "+(p+f)+" ":s.concat("L "+(d+y)+" "+(p+f)+" ");s=s.concat("Z"),e.merge(o,{d:s});break;case"Image":a="Image",e.merge(o,{href:n,height:l,width:h,x:c,y:u})}return{renderOption:o,functionName:a}}function l(t,e,i,r){var o,n,s={},a=new d("");return s={id:t.id,x:t.x,y:t.y,fill:i,"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,"text-anchor":t.anchor,transform:t.transform,opacity:e.opacity,"dominant-baseline":t.baseLine},n="string"==typeof t.text?t.text:t.text[0],o=a.createText(s,n),o.style.fontFamily=e.fontFamily,o.style.fontStyle=e.fontStyle,o.style.fontSize=e.size,o.style.fontWeight=e.fontWeight,o.style.color=e.color,r.appendChild(o),o}var d=function(){function t(t){this.svgLink="http://www.w3.org/2000/svg",this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createSvg=function(t){return e.isNullOrUndefined(t.id)&&(t.id=this.rootId+"_svg"),this.svgObj=document.getElementById(t.id),e.isNullOrUndefined(document.getElementById(t.id))&&(this.svgObj=document.createElementNS(this.svgLink,"svg")),this.svgObj=this.setElementAttributes(t,this.svgObj),this.setSVGSize(t.width,t.height),this.svgObj},t.prototype.setSVGSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)||this.width<=0?this.svgObj.setAttribute("width",t?t.toString():o.width.toString()):this.svgObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)||this.height<=0?this.svgObj.setAttribute("height",i?i.toString():"450"):this.svgObj.setAttribute("height",this.height.toString())},t.prototype.drawPath=function(t,e){var i=document.getElementById(t.id);return null===i&&(i=document.createElementNS(this.svgLink,"path")),i=this.setElementAttributes(t,i)},t.prototype.drawLine=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"line")),e=this.setElementAttributes(t,e)},t.prototype.drawRectangle=function(t,e){var i=document.getElementById(t.id);return null===i&&(i=document.createElementNS(this.svgLink,"rect")),i=this.setElementAttributes(t,i)},t.prototype.drawCircle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"circle")),e=this.setElementAttributes(t,e)},t.prototype.drawPolyline=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polyline")),e=this.setElementAttributes(t,e)},t.prototype.drawEllipse=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"ellipse")),e=this.setElementAttributes(t,e)},t.prototype.drawPolygon=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polygon")),e=this.setElementAttributes(t,e)},t.prototype.drawImage=function(t){var i=document.createElementNS(this.svgLink,"image");return i.setAttributeNS(null,"height",t.height.toString()),i.setAttributeNS(null,"width",t.width.toString()),i.setAttributeNS("http://www.w3.org/1999/xlink","href",t.href),i.setAttributeNS(null,"x",t.x.toString()),i.setAttributeNS(null,"y",t.y.toString()),i.setAttributeNS(null,"id",t.id),i.setAttributeNS(null,"visibility",t.visibility),e.isNullOrUndefined(this.getOptionValue(t,"clip-path"))||i.setAttributeNS(null,"clip-path",this.getOptionValue(t,"clip-path")),e.isNullOrUndefined(t.preserveAspectRatio)||i.setAttributeNS(null,"preserveAspectRatio",t.preserveAspectRatio),i},t.prototype.createText=function(t,i,r,o,n,s){var a=document.createElementNS(this.svgLink,"text");return a=this.setElementAttributes(t,a),e.isNullOrUndefined(i)||(a.textContent=i),a},t.prototype.createTSpan=function(t,i){var r=document.createElementNS(this.svgLink,"tspan");return r=this.setElementAttributes(t,r),e.isNullOrUndefined(i)||(r.textContent=i),r},t.prototype.createTitle=function(t){var e=document.createElementNS(this.svgLink,"title");return e.textContent=t,e},t.prototype.createDefs=function(){return document.createElementNS(this.svgLink,"defs")},t.prototype.createClipPath=function(t){var e=document.createElementNS(this.svgLink,"clipPath");return e=this.setElementAttributes(t,e)},t.prototype.createForeignObject=function(t){var e=document.createElementNS(this.svgLink,"foreignObject");return e=this.setElementAttributes(t,e)},t.prototype.createGroup=function(t){var e=document.createElementNS(this.svgLink,"g");return e=this.setElementAttributes(t,e)},t.prototype.createPattern=function(t,e){var i=document.createElementNS(this.svgLink,e);return i=this.setElementAttributes(t,i)},t.prototype.createRadialGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"radialGradient",cx:r.cx+"%",cy:r.cy+"%",r:r.r+"%",fx:r.fx+"%",fy:r.fy+"%"};this.drawGradient("radialGradient",n,t),o="url(#"+this.rootId+"_"+i+"radialGradient)"}return o},t.prototype.createLinearGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"linearGradient",x1:r.x1+"%",y1:r.y1+"%",x2:r.x2+"%",y2:r.y2+"%"};this.drawGradient("linearGradient",n,t),o="url(#"+this.rootId+"_"+i+"linearGradient)"}return o},t.prototype.drawGradient=function(t,i,r){var o=this.createDefs(),n=document.createElementNS(this.svgLink,t);n=this.setElementAttributes(i,n);for(var s=0;s<r.length;s++){var a=document.createElementNS(this.svgLink,"stop");a.setAttribute("offset",r[s].colorStop),a.setAttribute("stop-color",r[s].color),a.setAttribute("stop-opacity",r[s].opacity?r[s].opacity:"1"),e.isNullOrUndefined(r[s].style)||a.setAttribute("style",r[s].style),n.appendChild(a)}return o.appendChild(n),o},t.prototype.drawClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Rect";var r=this.drawRectangle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.drawCircularClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Circle";var r=this.drawCircle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=0;r<i.length;r++)e.setAttribute(i[r],t[i[r]]);return e},t.prototype.createCanvas=function(t){return null},t}(),p=function(){function t(t){this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createCanvas=function(t){var e=document.createElement("canvas");return e.setAttribute("id",this.rootId+"_canvas"),this.ctx=e.getContext("2d"),this.canvasObj=e,this.setCanvasSize(t.width,t.height),this.canvasObj},t.prototype.setCanvasSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)?this.canvasObj.setAttribute("width",t?t.toString():o.width.toString()):this.canvasObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)?this.canvasObj.setAttribute("height",i?i.toString():"450"):this.canvasObj.setAttribute("height",this.height.toString())},t.prototype.setAttributes=function(t){this.ctx.lineWidth=this.getOptionValue(t,"stroke-width");var i=this.getOptionValue(t,"stroke-dasharray");if(!e.isNullOrUndefined(i)){var r=i.split(",");this.ctx.setLineDash([parseInt(r[0],10),parseInt(r[1],10)])}this.ctx.strokeStyle=this.getOptionValue(t,"stroke")},t.prototype.drawLine=function(t){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.moveTo(t.x1,t.y1),this.ctx.lineTo(t.x2,t.y2),this.ctx.stroke(),this.ctx.restore()},t.prototype.drawRectangle=function(t,e){var i=this.ctx,r=t.rx;return this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=this.getOptionValue(t,"opacity"),this.setAttributes(t),this.ctx.rect(t.x,t.y,t.width,t.height),null!==r&&r>=0?this.drawCornerRadius(t):("none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,this.ctx.fillRect(t.x,t.y,t.width,t.height),this.ctx.stroke()),this.ctx.restore(),this.ctx=i,this.canvasObj},t.prototype.drawCornerRadius=function(t){var e=t.rx,i=t.x,r=t.y,o=t.width,n=t.height;"none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,o<2*e&&(e=o/2),n<2*e&&(e=n/2),this.ctx.beginPath(),this.ctx.moveTo(i+o-e,r),this.ctx.arcTo(i+o,r,i+o,r+n,e),this.ctx.arcTo(i+o,r+n,i,r+n,e),this.ctx.arcTo(i,r+n,i,r,e),this.ctx.arcTo(i,r,i+o,r,e),this.ctx.closePath(),this.ctx.fill(),this.ctx.stroke()},t.prototype.drawPath=function(t,e){var i=t.d.split(" "),r=this.getOptionValue(t,"stroke-width"),o=this.ctx,n=!0;this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=t.opacity?t.opacity:this.getOptionValue(t,"fill-opacity"),this.setAttributes(t);for(var s=0;s<i.length;s+=3){var a=parseFloat(i[s+1]),h=parseFloat(i[s+2]);switch(i[s]){case"M":t.innerR||t.cx||this.ctx.moveTo(a,h);break;case"L":t.innerR||this.ctx.lineTo(a,h);break;case"Q":var l=parseFloat(i[s+3]),d=parseFloat(i[s+4]);this.ctx.quadraticCurveTo(a,h,l,d),s+=2;break;case"C":var p=parseFloat(i[s+3]),c=parseFloat(i[s+4]),u=parseFloat(i[s+5]),y=parseFloat(i[s+6]);this.ctx.bezierCurveTo(a,h,p,c,u,y),s+=4;break;case"A":t.innerR?n&&(this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.arc(t.x,t.y,t.innerR,t.end,t.start,!t.counterClockWise),n=!1):t.cx?this.ctx.arc(t.cx,t.cy,t.radius,0,2*Math.PI,t.counterClockWise):(this.ctx.moveTo(t.x,t.y),this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.lineTo(t.x,t.y)),s+=5;break;case"z":case"Z":this.ctx.closePath(),s-=2}}return"none"!==t.fill&&void 0!==t.fill&&(this.ctx.fillStyle=t.fill,this.ctx.fill()),r>0&&this.ctx.stroke(),this.ctx.restore(),this.ctx=o,this.canvasObj},t.prototype.createText=function(t,i,r,o,n,s){var a=this.getOptionValue(t,"font-weight");e.isNullOrUndefined(a)||"regular"!==a.toLowerCase()||(a="normal");var h=this.getOptionValue(t,"font-size"),l=this.getOptionValue(t,"font-family"),d=this.getOptionValue(t,"font-style").toLowerCase()+" "+a+" "+h+" "+l,p=this.getOptionValue(t,"text-anchor"),c=void 0!==t.opacity?t.opacity:1;e.isNullOrUndefined(t.labelRotation)||t.labelRotation;if("middle"===p&&(p="center"),this.ctx.save(),this.ctx.fillStyle=t.fill,this.ctx.font=d,this.ctx.textAlign=p,this.ctx.globalAlpha=c,t.baseline&&(this.ctx.textBaseline=t.baseline),!s){this.ctx.translate(t.x+0+(r||0),t.y+(o||0)),this.ctx.rotate(t.labelRotation*Math.PI/180)}return this.ctx.fillText(i,s?t.x:0,s?n:0),this.ctx.restore(),this.canvasObj},t.prototype.drawCircle=function(t,e){var i=this.ctx;return this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.cx,t.cy,t.r,0,2*Math.PI),this.ctx.fillStyle=t.fill,this.ctx.globalAlpha=t.opacity,this.ctx.fill(),e&&this.ctx.translate(e[0],e[1]),this.setAttributes(t),this.ctx.stroke(),this.ctx.restore(),this.ctx=i,this.canvasObj},t.prototype.drawPolyline=function(t){this.ctx.save(),this.ctx.beginPath();for(var e=t.points.split(" "),i=0;i<e.length-1;i++){var r=e[i].split(","),o=parseFloat(r[0]),n=parseFloat(r[1]);0===i?this.ctx.moveTo(o,n):this.ctx.lineTo(o,n)}this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore()},t.prototype.drawEllipse=function(t,e){var i=this.ctx,r=Math.max(t.rx,t.ry),o=t.rx/r,n=t.ry/r;this.ctx.save(),this.ctx.beginPath(),this.ctx.translate(t.cx,t.cy),e&&this.ctx.translate(e[0],e[1]),this.ctx.save(),this.ctx.scale(o,n),this.ctx.arc(0,0,r,0,2*Math.PI,!1),this.ctx.fillStyle=t.fill,this.ctx.fill(),this.ctx.restore(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore(),this.ctx=i},t.prototype.drawImage=function(t){this.ctx.save();var i=new Image;e.isNullOrUndefined(t.href)||(i.src=t.href,this.ctx.drawImage(i,t.x,t.y,t.width,t.height)),this.ctx.restore()},t.prototype.createLinearGradient=function(t){var i;return e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createLinearGradient(0,0,0,this.canvasObj.height)),this.setGradientValues(t,i)},t.prototype.createRadialGradient=function(t){var i;return e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createRadialGradient(0,0,0,0,0,this.canvasObj.height)),this.setGradientValues(t,i)},t.prototype.setGradientValues=function(t,i){var r;if(e.isNullOrUndefined(t[0].colorStop))r=t[0].color.toString();else{for(var o=0;o<=t.length-1;o++){var n=t[o].color,s=t[o].colorStop.slice(0,-1),a=parseInt(s,10)/100;i.addColorStop(a,n)}r=i.toString()}return r},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=Object.keys(t).map(function(e){return t[e]}),o=0;o<i.length;o++)e.setAttribute(i[o],r[o]);return null},t.prototype.updateCanvasAttributes=function(t){this.setElementAttributes(t,this.canvasObj);var i=this.ctx;if(!e.isNullOrUndefined(this.dataUrl)){var r=new Image;r.onload=function(){i.drawImage(r,0,0)},r.src=this.dataUrl}},t.prototype.clearRect=function(t){this.ctx.restore(),this.ctx.clearRect(t.x,t.y,t.width,t.height)},t.prototype.createGroup=function(t){return null},t.prototype.drawClipPath=function(t){return null},t.prototype.canvasClip=function(t){this.ctx.save(),this.ctx.fillStyle="transparent",this.ctx.rect(t.x,t.y,t.width,t.height),this.ctx.fill(),this.ctx.clip()},t.prototype.canvasRestore=function(){this.ctx.restore()},t.prototype.drawPolygon=function(t){return null},t.prototype.createDefs=function(){return null},t.prototype.createClipPath=function(t){return null},t.prototype.createSvg=function(t){return null},t}(),c=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),u=function(){function t(t,e){this.width=t,this.height=e}return t}(),y=function(){function t(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}return t}(),f=function(){function t(t,e){this.isRight=e,this.isBottom=t}return t}(),g=function(){function t(t){this.id=t}return t}(),m=function(t){function e(e,i,r,o,n,s,a,h){void 0===s&&(s="");var l=t.call(this,e)||this;return l.transform="",l.baseLine="auto",l.labelRotation=0,l.x=i,l.y=r,l.anchor=o,l.text=n,l.transform=s,l.baseLine=a,l.labelRotation=h,l}return c(e,t),e}(g),x=function(t){function e(e,i,r,o,n,s,a){var h=t.call(this,e)||this;return h.opacity=n,h.fill=i,h.stroke=o,h["stroke-width"]=r,h["stroke-dasharray"]=s,h.d=a,h}return c(e,t),e}(g),v=function(){function t(t,e){this.x=t,this.y=e}return t}(),b=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),w=function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},S=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(null)],i.prototype,"size",void 0),w([e.Property("")],i.prototype,"color",void 0),w([e.Property("Segoe UI")],i.prototype,"fontFamily",void 0),w([e.Property("Normal")],i.prototype,"fontWeight",void 0),w([e.Property("Normal")],i.prototype,"fontStyle",void 0),w([e.Property(1)],i.prototype,"opacity",void 0),i}(e.ChildProperty),P=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property("")],i.prototype,"color",void 0),w([e.Property(1)],i.prototype,"width",void 0),i}(e.ChildProperty),L=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),w([e.Property(0)],i.prototype,"width",void 0),w([e.Property(0)],i.prototype,"height",void 0),i}(e.ChildProperty),O=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),i}(e.ChildProperty),A=function(t){function h(e,i){return t.call(this,e,i)||this}return b(h,t),h.prototype.preRender=function(){this.allowServerDataBinding=!1,this.initPrivateVariable(),this.isCanvas||this.removeSVG(),this.createTooltipElement()},h.prototype.initPrivateVariable=function(){this.renderer=new d(this.element.id),this.themeStyle=i(this.theme),this.formattedText=[],this.padding=5,this.isFirst=!0,this.markerPoint=[]},h.prototype.removeSVG=function(){var t=document.getElementById(this.element.id+"_svg"),i=document.getElementById(this.element.id+"parent_template");this.blazorTemplate&&e.resetBlazorTemplate(this.element.id+"parent_template_blazorTemplate"),t&&t.parentNode&&e.remove(t),i&&i.parentNode&&e.remove(i)},h.prototype.render=function(){if(this.fadeOuted=!1,this.template)this.updateTemplateFn(),this.createTemplate(this.areaBounds,this.location);else{this.renderText(this.isFirst);var t={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",t);var i=this.renderTooltipElement(this.areaBounds,this.location);this.drawMarker(i.isBottom,i.isRight,this.markerSize)}this.trigger("loaded",{tooltip:this});var r=document.getElementById("chartmeasuretext");r&&e.remove(r),this.allowServerDataBinding=!0},h.prototype.createTooltipElement=function(){if(this.textElements=[],!this.template||this.shared){var t=this.renderer.createSvg({id:this.element.id+"_svg"});this.element.appendChild(t);var e=document.getElementById(this.element.id+"_group");e||(e=this.renderer.createGroup({id:this.element.id+"_group"})).setAttribute("transform","translate(0,0)"),t.appendChild(e);var i=this.renderer.drawPath({id:this.element.id+"_path","stroke-width":"Bootstrap4"===this.theme?0:this.border.width,fill:this.fill||this.themeStyle.tooltipFill,opacity:"Bootstrap4"===this.theme?.9:this.opacity,stroke:this.border.color});e.appendChild(i)}},h.prototype.drawMarker=function(t,e,i){if(this.shapes.length<=0)return null;for(var r,o=0,s=this.renderer.createGroup({id:this.element.id+"_trackball_group"}),h=n(this.element.id+"_group"),l=2*this.marginX+i/2+(e?this.arrowPadding:0),d=0,p=this.shapes;d<p.length;d++){var c=p[d];"None"!==c&&(r=new x(this.element.id+"_Trackball_"+o,this.palette[o],1,"#cccccc",1,null),this.markerPoint[o]&&s.appendChild(a(new v(l,this.markerPoint[o]-this.padding+(t?this.arrowPadding:0)),c,new u(i,i),"",r,null)),o++)}h.appendChild(s)},h.prototype.renderTooltipElement=function(t,i){var s,a=n(this.element.id),h=new v(0,0),l=new v(0,0),d=n(this.element.id+"_svg"),p=n(this.element.id+"_group"),c=n(this.element.id+"_path"),u=!1,g=!1,m=!1,x=0,b=0;if(this.tipRadius=1,""!==this.header&&(this.elementSize.height+=this.marginY),this.content.length>1?(s=this.sharedTooltipLocation(t,this.location.x,this.location.y),u=!0):(s=this.tooltipLocation(t,i,h,l),this.inverted?x=(g=s.x<i.x+this.clipBounds.x)?0:this.arrowPadding:(m=!(u=s.y<i.y+this.clipBounds.y),b=u?0:this.arrowPadding)),""!==this.header){var w=r(this.isWrap?this.wrappedText:this.header,this.textStyle).height+2*this.marginY+(m?this.arrowPadding:0)+(this.isWrap?5:0),S="M "+(3*this.marginX+(g||u||m?0:this.arrowPadding))+" "+w+"L "+(s.width+(g||u||m?0:this.arrowPadding)-2*this.marginX)+" "+w,P=this.renderer.drawPath({id:this.element.id+"_header_path","stroke-width":1,fill:null,opacity:.8,stroke:this.themeStyle.tooltipHeaderLine,d:S});p.appendChild(P)}var L=this.border.width/2,O=new y(L+x,L+b,s.width-L,s.height-L);if(p.setAttribute("opacity","1"),!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(a,s.x,s.y):this.animateTooltipDiv(a,s),d.setAttribute("height",(s.height+this.border.width+(this.inverted?0:this.arrowPadding)+5).toString()),d.setAttribute("width",(s.width+this.border.width+(this.inverted?this.arrowPadding:0)+5).toString()),d.setAttribute("opacity","1"),e.isNullOrUndefined(this.tooltipPlacement)||(u=this.tooltipPlacement.indexOf("Top")>-1,m=this.tooltipPlacement.indexOf("Bottom")>-1,g=this.tooltipPlacement.indexOf("Left")>-1),c.setAttribute("d",o(this.rx,this.ry,O,h,this.arrowPadding,u,m,g,l.x,l.y,this.tipRadius)),this.enableShadow&&"Bootstrap4"!==this.theme){var A=this.element.id+"_shadow";c.setAttribute("filter",e.Browser.isIE?"":"url(#"+A+")");var C='<filter id="'+A+'" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';C+='<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>',C+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var k=this.renderer.createDefs();k.setAttribute("id",this.element.id+"SVG_tooltip_definition"),p.appendChild(k),k.innerHTML=C}return c.setAttribute("stroke",this.border.color),this.changeText(new v(x,b),m,!g&&!u&&!m,s),new f(m,!g&&!u&&!m)},h.prototype.changeText=function(t,e,i,r){var o=document.getElementById(this.element.id+"_text");e&&o.setAttribute("transform","translate(0,"+this.arrowPadding+")"),i&&o.setAttribute("transform","translate("+this.arrowPadding+" 0)")},h.prototype.findFormattedText=function(){this.formattedText=[],""!==this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()&&(this.formattedText=this.formattedText.concat(this.header)),this.formattedText=this.formattedText.concat(this.content)},h.prototype.renderText=function(t){var i,o,a,h,d,p,c=0,y=0,f=0,g=e.extend({},this.textStyle,null,!0).properties,x=n(this.element.id+"_group"),v="";this.findFormattedText();var b,w="rtl"===document.body.getAttribute("dir")?"end":"start";this.leftSpace=this.areaBounds.x+this.location.x,this.rightSpace=this.areaBounds.x+this.areaBounds.width-this.leftSpace;var S=this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim(),P=this.header.indexOf("<b>")>-1&&this.header.indexOf("</b>")>-1,L=r(this.formattedText[0],g).width+2*this.marginX+this.arrowPadding,O=this.location.x-L<this.location.x,A=this.areaBounds.x+this.areaBounds.width<this.location.x+L,C=""!==S?this.marginY:0,k=!0,T=!0;this.markerPoint=[];var E,N=this.shapes.length>0?10:0,B=this.shapes.length>0?5:0,z="Normal",_=this.themeStyle.tooltipLightLabel,F=22/parseFloat("13px")*parseFloat(g.size);t&&!this.isCanvas||(s(this.element.id+"_text"),s(this.element.id+"_header_path"),s(this.element.id+"_trackball_group"),s(this.element.id+"SVG_tooltip_definition"));var I=new m(this.element.id+"_text",2*this.marginX,2*this.marginY+2*this.padding+(2===this.marginY?3:0),w,""),R=l(I,g,null,x),j=1===this.formattedText.length&&this.formattedText[0].indexOf(" : <b>")>-1;o=(b=""!==this.header)&&P?16:13;for(var M=0,G=this.formattedText.length;M<G;M++)if(h=this.formattedText[M].replace(/<(b|strong)>/g,"<b>").replace(/<\/(b|strong)>/g,"</b>").split(/<br.*?>/g),0===M&&!j&&this.isTextWrap&&(this.leftSpace<L||O)&&(this.rightSpace<L||A)&&(E=Math.round(this.leftSpace>this.rightSpace?this.leftSpace/o:this.rightSpace/o),h=(""!==S?S:this.formattedText[M]).match(new RegExp(".{1,"+E+"}","g")),this.wrappedText=P?"<b>"+h.join("<br>")+"</b>":h.join("<br>"),this.isWrap=h.length>1),""!==h[0]){0===M&&""!==S||this.markerPoint.push((""!==S?this.marginY:0)+I.y+c);for(var V=0,U=h.length;V<U;V++){f=0,T=!0,c+=F;for(var W=0,D=(i=h[V].replace(/<b>/g,"<br><b>").replace(/<\/b>/g,"</b><br>").replace(/:/g,"<br>:<br>").split("<br>")).length;W<D;W++)if(d=i[W],/\S/.test(d)||""===d||(d=" "),!T&&" "===d||""!==d.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()){f+=" "!==d?4:0,T&&!k?(p={x:2*this.marginX+(N+B),dy:F+(T?C:0),fill:""},C=null):p=k&&T?{x:""===S?2*this.marginX+(N+B):2*this.marginX+(this.isWrap?N+B:0)}:{},T=!1,a=this.renderer.createTSpan(p,""),R.appendChild(a),d.indexOf("<b>")>-1||P&&0===W&&0===M&&(b||this.isWrap)?(z="bold",_=this.themeStyle.tooltipBoldLabel,v="font-weight:"+z,g.fontWeight=z,a.setAttribute("fill",this.textStyle.color||_)):(v="bold"===z?"font-weight:"+z:"",g.fontWeight=z,a.setAttribute("fill",this.textStyle.color||_)),(d.indexOf("</b>")>-1||P&&W===D-1&&0===M&&(b||this.isWrap))&&(z="Normal",_=this.themeStyle.tooltipLightLabel);var Q=/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(d);a.textContent=d=d.replace(/<[a-zA-Z\/](.|\n)*?>/g,Q?"":""),f+=r(d,g).width,""!==v&&(a.style.fontWeight=v.split("font-weight:")[1],a.style.color=a.getAttribute("fill")),a.style.fontFamily="inherit",a.style.fontStyle="inherit",a.style.fontSize="inherit",k=!1}f-=4,y=Math.max(y,f)}}this.elementSize=new u(y+(y>0?2*this.marginX:0),c),this.elementSize.width+=N+B;var H=R.childNodes[0];if(""!==S&&H&&!this.isWrap){g.fontWeight="bold";var X=(this.elementSize.width+2*this.padding)/2-r(S,g).width/2;H.setAttribute("x",X.toString())}},h.prototype.createTemplate=function(t,i){var r={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",r);var o=document.getElementById(this.element.id);this.isCanvas&&this.removeSVG();var s=o.firstElementChild;if(s&&e.remove(s),r.cancel)e.remove(n(this.element.id+"_tooltip"));else{for(var a=e.createElement("div",{id:this.element.id+"parent_template"}),h=this.templateFn(this.data,this.controlInstance,"template",a.id+"_blazorTemplate","");h&&h.length>0;)e.isBlazor()||1===h.length?(a.appendChild(h[0]),h=null):a.appendChild(h[0]);o.appendChild(a);var l=this.isCanvas?a:this.element,d=l.getBoundingClientRect();this.padding=0,this.elementSize=new u(d.width,d.height);var p=this.tooltipLocation(t,i,new v(0,0),new v(0,0));if(!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(l,p.x,p.y):this.animateTooltipDiv(this.element,p),this.blazorTemplate){var c=function(){var e=n(y.element.id).getBoundingClientRect();y.elementSize=new u(e.width,e.height);var r=y.tooltipLocation(t,i,new v(0,0),new v(0,0));y.updateDiv(n(y.element.id),r.x,r.y)},y=this;c.bind(y,t,i),e.updateBlazorTemplate(this.element.id+"parent_template_blazorTemplate",this.blazorTemplate.name,this.blazorTemplate.parent,void 0,c)}}},h.prototype.sharedTooltipLocation=function(t,e,i){var r=this.elementSize.width+2*this.marginX,o=this.elementSize.height+2*this.marginY,n=new y(e+2*this.padding,i-o-this.padding,r,o);return n.y<t.y&&(n.y+=n.height+2*this.padding),n.x+n.width>t.x+t.width&&(n.x-=n.width+4*this.padding),n},h.prototype.getCurrentPosition=function(t,e,i,r){var o=this.tooltipPlacement,n=this.clipBounds.x,s=this.clipBounds.y,a=this.offset,h=this.elementSize.width+2*this.marginX,l=this.elementSize.height+2*this.marginY,d=new v(e.x,e.y);return"Top"===o||"Bottom"===o?(d=new v(d.x+n-this.elementSize.width/2-this.padding,d.y+s-this.elementSize.height-2*this.padding-this.arrowPadding-a),i.x=r.x=h/2,"Bottom"===o&&(d.y=e.y+s+a),t.x+t.width<d.x+h?(d.x=t.width>h?t.x+t.width-h+6:t.x,i.x=r.x=t.width>h?t.x+e.x-d.x:e.x):t.x>d.x&&(d.x=t.x,i.x=r.x=e.x)):(d=new v(d.x+n+a,d.y+s-this.elementSize.height/2-this.padding),i.y=r.y=l/2,"Left"===o&&(d.x=e.x+n-a-(h+this.arrowPadding)),t.y+t.height<d.y+l?(d.y=t.height>l?t.y+t.height-l+6:t.y,i.y=r.y=t.height>l?t.y+e.y-d.y:e.y):t.y>d.y&&(d.y=t.y,i.y=r.y=e.y)),new y(d.x,d.y,h,l)},h.prototype.tooltipLocation=function(t,i,r,o){if(!e.isNullOrUndefined(this.tooltipPlacement))return this.getCurrentPosition(t,i,r,o);var n=new v(i.x,i.y),s=this.elementSize.width+2*this.marginX,a=this.elementSize.height+2*this.marginY,h=this.offset,l=this.clipBounds.x,d=this.clipBounds.y,p=t.x,c=t.y;return this.inverted?(n=new v(n.x+l+h,n.y+d-this.elementSize.height/2-this.padding),r.y=o.y=a/2,(n.x+s+this.arrowPadding>p+t.width||this.isNegative)&&(n.x=(i.x>t.width?t.width:i.x)+l-h-(s+this.arrowPadding)),n.x<p&&(n.x=(i.x<0?0:i.x)+l+h),n.y<=c&&(r.y-=c-n.y,o.y-=c-n.y,n.y=c),n.y+a>=c+t.height&&(r.y+=n.y+a-(c+t.height),o.y+=n.y+a-(c+t.height),n.y-=n.y+a-(c+t.height)),r.y+this.arrowPadding/2>a-this.ry&&(r.y=a-this.ry-this.arrowPadding/2,o.y=a,this.tipRadius=0),r.y-this.arrowPadding/2<this.ry&&(r.y=this.ry+this.arrowPadding/2,o.y=0,this.tipRadius=0)):(n=new v(n.x+l-this.elementSize.width/2-this.padding,n.y+d-this.elementSize.height-2*this.padding-this.arrowPadding-h),r.x=o.x=s/2,(n.y<c||this.isNegative)&&(n.y=(i.y<0?0:i.y)+d+h),n.y+a+this.arrowPadding>c+t.height&&(n.y=Math.min(i.y,c+t.height)+d-this.elementSize.height-2*this.padding-this.arrowPadding-h),o.x=s/2,n.x<p&&(r.x-=p-n.x,o.x-=p-n.x,n.x=p),n.x+s>p+t.width&&(r.x+=n.x+s-(p+t.width),o.x+=n.x+s-(p+t.width),n.x-=n.x+s-(p+t.width)),r.x+this.arrowPadding/2>s-this.rx&&(r.x=s-this.rx-this.arrowPadding/2,o.x=s,this.tipRadius=0),r.x-this.arrowPadding/2<this.rx&&(r.x=this.rx+this.arrowPadding/2,o.x=0,this.tipRadius=0)),new y(n.x,n.y,s,a)},h.prototype.animateTooltipDiv=function(t,i){var r,o=this,n=parseFloat(t.style.left),s=parseFloat(t.style.top);new e.Animation({}).animate(t,{duration:this.duration,progress:function(e){r=e.timeStamp/e.duration,t.style.animation=null,t.style.left=n+r*(i.x-n)+"px",t.style.top=s+r*(i.y-s)+"px"},end:function(e){o.updateDiv(t,i.x,i.y),o.trigger("animationComplete",{tooltip:o})}})},h.prototype.updateDiv=function(t,e,i){t.style.left=e+"px",t.style.top=i+"px"},h.prototype.updateTemplateFn=function(){if(this.template)try{document.querySelectorAll(this.template).length&&(this.templateFn=e.compile(document.querySelector(this.template).innerHTML.trim()))}catch(t){this.templateFn=e.compile(this.template)}},h.prototype.fadeOut=function(){var t=this,i=n(this.isCanvas&&!this.template?this.element.id+"_svg":this.element.id);if(i){var r=i.firstChild;this.isCanvas&&!this.template&&(r=document.getElementById(this.element.id+"_group")?document.getElementById(this.element.id+"_group"):r);var o;r&&(o=parseFloat(r.getAttribute("opacity"))||1),new e.Animation({}).animate(r,{duration:200,progress:function(e){t.progressAnimation(r,o,e.timeStamp/e.duration)},end:function(e){t.fadeOuted=!0,t.endAnimation(r)}})}},h.prototype.progressAnimation=function(t,e,i){t.style.animation="",t.setAttribute("opacity",(e-i).toString())},h.prototype.endAnimation=function(t){t.setAttribute("opacity","0"),this.template&&!this.shared&&(t.style.display="none"),this.trigger("animationComplete",{tooltip:this})},h.prototype.getPersistData=function(){var t=[];return this.addOnPersist(t)},h.prototype.getModuleName=function(){return"tooltip"},h.prototype.destroy=function(){t.prototype.destroy.call(this),this.element.classList.remove("e-tooltip")},h.prototype.onPropertyChanged=function(t,i){this.blazorTemplate&&e.resetBlazorTemplate(this.element.id+"parent_template_blazorTemplate"),this.isFirst=!1,this.render()},w([e.Property(!1)],h.prototype,"enable",void 0),w([e.Property(!1)],h.prototype,"shared",void 0),w([e.Property(!0)],h.prototype,"enableShadow",void 0),w([e.Property(null)],h.prototype,"fill",void 0),w([e.Property("")],h.prototype,"header",void 0),w([e.Property(.75)],h.prototype,"opacity",void 0),w([e.Complex({size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},S)],h.prototype,"textStyle",void 0),w([e.Property(null)],h.prototype,"template",void 0),w([e.Property(!0)],h.prototype,"enableAnimation",void 0),w([e.Property(300)],h.prototype,"duration",void 0),w([e.Property(!1)],h.prototype,"inverted",void 0),w([e.Property(!1)],h.prototype,"isNegative",void 0),w([e.Complex({color:"#cccccc",width:.5},P)],h.prototype,"border",void 0),w([e.Property([])],h.prototype,"content",void 0),w([e.Property(10)],h.prototype,"markerSize",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"clipBounds",void 0),w([e.Property([])],h.prototype,"palette",void 0),w([e.Property([])],h.prototype,"shapes",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"location",void 0),w([e.Property(0)],h.prototype,"offset",void 0),w([e.Property(2)],h.prototype,"rx",void 0),w([e.Property(2)],h.prototype,"ry",void 0),w([e.Property(5)],h.prototype,"marginX",void 0),w([e.Property(5)],h.prototype,"marginY",void 0),w([e.Property(12)],h.prototype,"arrowPadding",void 0),w([e.Property(null)],h.prototype,"data",void 0),w([e.Property("Material")],h.prototype,"theme",void 0),w([e.Complex({x:0,y:0,width:0,height:0},L)],h.prototype,"areaBounds",void 0),w([e.Property(null)],h.prototype,"availableSize",void 0),w([e.Property()],h.prototype,"blazorTemplate",void 0),w([e.Property(!1)],h.prototype,"isCanvas",void 0),w([e.Property(!1)],h.prototype,"isTextWrap",void 0),w([e.Property(null)],h.prototype,"tooltipPlacement",void 0),w([e.Property(null)],h.prototype,"controlInstance",void 0),w([e.Event()],h.prototype,"tooltipRender",void 0),w([e.Event()],h.prototype,"loaded",void 0),w([e.Event()],h.prototype,"animationComplete",void 0),h=w([e.NotifyPropertyChanges],h)}(e.Component);return t.TextStyle=S,t.TooltipBorder=P,t.AreaBounds=L,t.ToolLocation=O,t.Tooltip=A,t.getTooltipThemeColor=i,t.measureText=r,t.findDirection=o,t.Size=u,t.Rect=y,t.Side=f,t.CustomizeOption=g,t.TextOption=m,t.getElement=n,t.removeElement=s,t.drawSymbol=a,t.calculateShapes=h,t.PathOption=x,t.textElement=l,t.TooltipLocation=v,t.SvgRenderer=d,t.CanvasRenderer=p,t}({},ej.base),this.ejs=ej; | ||
this.ej=this.ej||{},this.ej.svgbase=function(t,e){"use strict";function i(t){var e;switch(t){case"Highcontrast":case"HighContrast":e={tooltipFill:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696"};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":e={tooltipFill:"#F4F4F4",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A"};break;case"Bootstrap4":e={tooltipFill:"rgba(0, 0, 0, 0.9)",tooltipBoldLabel:"rgba(255, 255, 255)",tooltipLightLabel:"rgba(255, 255, 255, 0.9)",tooltipHeaderLine:"rgba(255, 255, 255, 0.2)"};break;default:e={tooltipFill:"rgba(0, 8, 22, 0.75)",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return e}function r(t,i){var r=t||"",o=document.getElementById("chartmeasuretext");if(null===o&&(o=e.createElement("text",{id:"chartmeasuretext"}),document.body.appendChild(o)),"string"==typeof t&&(t.indexOf("<")>-1||t.indexOf(">")>-1)){for(var n=t.split(" "),s=0;s<n.length;s++)-1===n[s].indexOf("<br/>")&&(n[s]=n[s].replace(/[<>]/g,"&"));t=n.join(" ")}return o.innerHTML=r.indexOf("<br>")>-1||r.indexOf("<br/>")>-1?r:t,o.style.position="fixed",o.style.fontSize=i.size,o.style.fontWeight=i.fontWeight,o.style.fontStyle=i.fontStyle,o.style.fontFamily=i.fontFamily,o.style.visibility="hidden",o.style.top="-100",o.style.left="0",o.style.whiteSpace="nowrap",o.style.lineHeight="normal",new u(o.clientWidth,o.clientHeight)}function o(t,e,i,r,o,n,s,a,h,l,d){var p="",c=i.x,u=i.y,y=i.x+i.width,f=i.y+i.height;return d=d||0,n?(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f),0!==o&&(p=(p=p.concat(" L "+(r.x+o/2)+" "+f)).concat(" L "+(h+d)+" "+(f+o-d)),p+=" Q "+h+" "+(f+o)+" "+(h-d)+" "+(f+o-d)),p=r.x-o/2>c?p.concat(" L "+(r.x-o/2)+" "+f+" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z"):0===o?p.concat(" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z"):p.concat(" L "+c+" "+(f+e)+" z")):s?(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u+" L "+(r.x-o/2)+" "+u)).concat(" L "+(h-d)+" "+(r.y+d)),p=(p=(p+=" Q "+h+" "+r.y+" "+(h+d)+" "+(r.y+d)).concat(" L "+(r.x+o/2)+" "+u+" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e))).concat(" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f+" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z")):a?(p=(p=(p=p.concat("M "+c+" "+(u+e)+" Q "+c+" "+u+" "+(c+t)+" "+u)).concat(" L "+(y-t)+" "+u+" Q "+y+" "+u+" "+y+" "+(u+e)+" L "+y+" "+(r.y-o/2))).concat(" L "+(y+o-d)+" "+(l-d)),p=(p=(p+=" Q "+(y+o)+" "+l+" "+(y+o-d)+" "+(l+d)).concat(" L "+y+" "+(r.y+o/2)+" L "+y+" "+(f-e)+" Q "+y+" "+f+" "+(y-t)+" "+f)).concat(" L "+(c+t)+" "+f+" Q "+c+" "+f+" "+c+" "+(f-e)+" z")):(p=(p=p.concat("M "+(c+t)+" "+u+" Q "+c+" "+u+" "+c+" "+(u+e)+" L "+c+" "+(r.y-o/2))).concat(" L "+(c-o+d)+" "+(l-d)),p=(p=(p+=" Q "+(c-o)+" "+l+" "+(c-o+d)+" "+(l+d)).concat(" L "+c+" "+(r.y+o/2)+" L "+c+" "+(f-e)+" Q "+c+" "+f+" "+(c+t)+" "+f)).concat(" L "+(y-t)+" "+f+" Q "+y+" "+f+" "+y+" "+(f-e)+" L "+y+" "+(u+e)+" Q "+y+" "+u+" "+(y-t)+" "+u+" z")),p}function n(t){return document.getElementById(t)}function s(t){var i=n(t);i&&e.remove(i)}function a(t,e,i,r,o,n){var s=new d(""),a=h(t,i,e,o,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",n),l}function h(t,i,r,o,n){var s,a="Path",h=i.width,l=i.height,d=t.x,p=t.y,c=t.x+-h/2,u=t.y+-l/2;switch(r){case"Circle":case"Bubble":a="Ellipse",e.merge(o,{rx:h/2,ry:l/2,cx:d,cy:p});break;case"Cross":s="M "+c+" "+p+" L "+(d+h/2)+" "+p+" M "+d+" "+(p+l/2)+" L "+d+" "+(p+-l/2),e.merge(o,{d:s});break;case"HorizontalLine":s="M "+c+" "+p+" L "+(d+h/2)+" "+p,e.merge(o,{d:s});break;case"VerticalLine":s="M "+d+" "+(p+l/2)+" L "+d+" "+(p+-l/2),e.merge(o,{d:s});break;case"Diamond":s="M "+c+" "+p+" L "+d+" "+(p+-l/2)+" L "+(d+h/2)+" "+p+" L "+d+" "+(p+l/2)+" L "+c+" "+p+" z",e.merge(o,{d:s});break;case"Rectangle":s="M "+c+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+l/2)+" L "+c+" "+(p+l/2)+" L "+c+" "+(p+-l/2)+" z",e.merge(o,{d:s});break;case"Triangle":s="M "+c+" "+(p+l/2)+" L "+d+" "+(p+-l/2)+" L "+(d+h/2)+" "+(p+l/2)+" L "+c+" "+(p+l/2)+" z",e.merge(o,{d:s});break;case"InvertedTriangle":s="M "+(d+h/2)+" "+(p-l/2)+" L "+d+" "+(p+l/2)+" L "+(d-h/2)+" "+(p-l/2)+" L "+(d+h/2)+" "+(p-l/2)+" z",e.merge(o,{d:s});break;case"Pentagon":for(var y=void 0,f=void 0,g=0;g<=5;g++)y=h/2*Math.cos(Math.PI/180*(72*g)),f=l/2*Math.sin(Math.PI/180*(72*g)),s=0===g?"M "+(d+y)+" "+(p+f)+" ":s.concat("L "+(d+y)+" "+(p+f)+" ");s=s.concat("Z"),e.merge(o,{d:s});break;case"Image":a="Image",e.merge(o,{href:n,height:l,width:h,x:c,y:u})}return{renderOption:o,functionName:a}}function l(t,e,i,r){var o,n,s={},a=new d("");return s={id:t.id,x:t.x,y:t.y,fill:i,"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,"text-anchor":t.anchor,transform:t.transform,opacity:e.opacity,"dominant-baseline":t.baseLine},n="string"==typeof t.text?t.text:t.text[0],o=a.createText(s,n),o.style.fontFamily=e.fontFamily,o.style.fontStyle=e.fontStyle,o.style.fontSize=e.size,o.style.fontWeight=e.fontWeight,o.style.color=e.color,r.appendChild(o),o}var d=function(){function t(t){this.svgLink="http://www.w3.org/2000/svg",this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createSvg=function(t){return e.isNullOrUndefined(t.id)&&(t.id=this.rootId+"_svg"),this.svgObj=document.getElementById(t.id),e.isNullOrUndefined(document.getElementById(t.id))&&(this.svgObj=document.createElementNS(this.svgLink,"svg")),this.svgObj=this.setElementAttributes(t,this.svgObj),this.setSVGSize(t.width,t.height),this.svgObj},t.prototype.setSVGSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)||this.width<=0?this.svgObj.setAttribute("width",t?t.toString():o.width.toString()):this.svgObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)||this.height<=0?this.svgObj.setAttribute("height",i?i.toString():"450"):this.svgObj.setAttribute("height",this.height.toString())},t.prototype.drawPath=function(t,e){var i=document.getElementById(t.id);return null===i&&(i=document.createElementNS(this.svgLink,"path")),i=this.setElementAttributes(t,i)},t.prototype.drawLine=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"line")),e=this.setElementAttributes(t,e)},t.prototype.drawRectangle=function(t,e){var i=document.getElementById(t.id);return null===i&&(i=document.createElementNS(this.svgLink,"rect")),i=this.setElementAttributes(t,i)},t.prototype.drawCircle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"circle")),e=this.setElementAttributes(t,e)},t.prototype.drawPolyline=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polyline")),e=this.setElementAttributes(t,e)},t.prototype.drawEllipse=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"ellipse")),e=this.setElementAttributes(t,e)},t.prototype.drawPolygon=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polygon")),e=this.setElementAttributes(t,e)},t.prototype.drawImage=function(t){var i=document.createElementNS(this.svgLink,"image");return i.setAttributeNS(null,"height",t.height.toString()),i.setAttributeNS(null,"width",t.width.toString()),i.setAttributeNS("http://www.w3.org/1999/xlink","href",t.href),i.setAttributeNS(null,"x",t.x.toString()),i.setAttributeNS(null,"y",t.y.toString()),i.setAttributeNS(null,"id",t.id),i.setAttributeNS(null,"visibility",t.visibility),e.isNullOrUndefined(this.getOptionValue(t,"clip-path"))||i.setAttributeNS(null,"clip-path",this.getOptionValue(t,"clip-path")),e.isNullOrUndefined(t.preserveAspectRatio)||i.setAttributeNS(null,"preserveAspectRatio",t.preserveAspectRatio),i},t.prototype.createText=function(t,i,r,o,n,s){var a=document.createElementNS(this.svgLink,"text");return a=this.setElementAttributes(t,a),e.isNullOrUndefined(i)||(a.textContent=i),a},t.prototype.createTSpan=function(t,i){var r=document.createElementNS(this.svgLink,"tspan");return r=this.setElementAttributes(t,r),e.isNullOrUndefined(i)||(r.textContent=i),r},t.prototype.createTitle=function(t){var e=document.createElementNS(this.svgLink,"title");return e.textContent=t,e},t.prototype.createDefs=function(){return document.createElementNS(this.svgLink,"defs")},t.prototype.createClipPath=function(t){var e=document.createElementNS(this.svgLink,"clipPath");return e=this.setElementAttributes(t,e)},t.prototype.createForeignObject=function(t){var e=document.createElementNS(this.svgLink,"foreignObject");return e=this.setElementAttributes(t,e)},t.prototype.createGroup=function(t){var e=document.createElementNS(this.svgLink,"g");return e=this.setElementAttributes(t,e)},t.prototype.createPattern=function(t,e){var i=document.createElementNS(this.svgLink,e);return i=this.setElementAttributes(t,i)},t.prototype.createRadialGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"radialGradient",cx:r.cx+"%",cy:r.cy+"%",r:r.r+"%",fx:r.fx+"%",fy:r.fy+"%"};this.drawGradient("radialGradient",n,t),o="url(#"+this.rootId+"_"+i+"radialGradient)"}return o},t.prototype.createLinearGradient=function(t,i,r){var o;if(e.isNullOrUndefined(t[0].colorStop))o=t[0].color.toString();else{var n={id:this.rootId+"_"+i+"linearGradient",x1:r.x1+"%",y1:r.y1+"%",x2:r.x2+"%",y2:r.y2+"%"};this.drawGradient("linearGradient",n,t),o="url(#"+this.rootId+"_"+i+"linearGradient)"}return o},t.prototype.drawGradient=function(t,i,r){var o=this.createDefs(),n=document.createElementNS(this.svgLink,t);n=this.setElementAttributes(i,n);for(var s=0;s<r.length;s++){var a=document.createElementNS(this.svgLink,"stop");a.setAttribute("offset",r[s].colorStop),a.setAttribute("stop-color",r[s].color),a.setAttribute("stop-opacity",r[s].opacity?r[s].opacity:"1"),e.isNullOrUndefined(r[s].style)||a.setAttribute("style",r[s].style),n.appendChild(a)}return o.appendChild(n),o},t.prototype.drawClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Rect";var r=this.drawRectangle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.drawCircularClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Circle";var r=this.drawCircle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=0;r<i.length;r++)e.setAttribute(i[r],t[i[r]]);return e},t.prototype.createCanvas=function(t){return null},t}(),p=function(){function t(t){this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createCanvas=function(t){var e=document.createElement("canvas");return e.setAttribute("id",this.rootId+"_canvas"),this.ctx=e.getContext("2d"),this.canvasObj=e,this.setCanvasSize(t.width,t.height),this.canvasObj},t.prototype.setCanvasSize=function(t,i){var r=document.getElementById(this.rootId),o=e.isNullOrUndefined(r)?null:r.getBoundingClientRect();e.isNullOrUndefined(this.width)?this.canvasObj.setAttribute("width",t?t.toString():o.width.toString()):this.canvasObj.setAttribute("width",this.width.toString()),e.isNullOrUndefined(this.height)?this.canvasObj.setAttribute("height",i?i.toString():"450"):this.canvasObj.setAttribute("height",this.height.toString())},t.prototype.setAttributes=function(t){this.ctx.lineWidth=this.getOptionValue(t,"stroke-width");var i=this.getOptionValue(t,"stroke-dasharray");if(!e.isNullOrUndefined(i)){var r=i.split(",");this.ctx.setLineDash([parseInt(r[0],10),parseInt(r[1],10)])}this.ctx.strokeStyle=this.getOptionValue(t,"stroke")},t.prototype.drawLine=function(t){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.moveTo(t.x1,t.y1),this.ctx.lineTo(t.x2,t.y2),this.ctx.stroke(),this.ctx.restore()},t.prototype.drawRectangle=function(t,e){var i=this.ctx,r=t.rx;return this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=this.getOptionValue(t,"opacity"),this.setAttributes(t),this.ctx.rect(t.x,t.y,t.width,t.height),null!==r&&r>=0?this.drawCornerRadius(t):("none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,this.ctx.fillRect(t.x,t.y,t.width,t.height),this.ctx.stroke()),this.ctx.restore(),this.ctx=i,this.canvasObj},t.prototype.drawCornerRadius=function(t){var e=t.rx,i=t.x,r=t.y,o=t.width,n=t.height;"none"===t.fill&&(t.fill="transparent"),this.ctx.fillStyle=t.fill,o<2*e&&(e=o/2),n<2*e&&(e=n/2),this.ctx.beginPath(),this.ctx.moveTo(i+o-e,r),this.ctx.arcTo(i+o,r,i+o,r+n,e),this.ctx.arcTo(i+o,r+n,i,r+n,e),this.ctx.arcTo(i,r+n,i,r,e),this.ctx.arcTo(i,r,i+o,r,e),this.ctx.closePath(),this.ctx.fill(),this.ctx.stroke()},t.prototype.drawPath=function(t,e){var i=t.d.split(" "),r=this.getOptionValue(t,"stroke-width"),o=this.ctx,n=!0;this.ctx.save(),this.ctx.beginPath(),e&&this.ctx.translate(e[0],e[1]),this.ctx.globalAlpha=t.opacity?t.opacity:this.getOptionValue(t,"fill-opacity"),this.setAttributes(t);for(var s=0;s<i.length;s+=3){var a=parseFloat(i[s+1]),h=parseFloat(i[s+2]);switch(i[s]){case"M":t.innerR||t.cx||this.ctx.moveTo(a,h);break;case"L":t.innerR||this.ctx.lineTo(a,h);break;case"Q":var l=parseFloat(i[s+3]),d=parseFloat(i[s+4]);this.ctx.quadraticCurveTo(a,h,l,d),s+=2;break;case"C":var p=parseFloat(i[s+3]),c=parseFloat(i[s+4]),u=parseFloat(i[s+5]),y=parseFloat(i[s+6]);this.ctx.bezierCurveTo(a,h,p,c,u,y),s+=4;break;case"A":t.innerR?n&&(this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.arc(t.x,t.y,t.innerR,t.end,t.start,!t.counterClockWise),n=!1):t.cx?this.ctx.arc(t.cx,t.cy,t.radius,0,2*Math.PI,t.counterClockWise):(this.ctx.moveTo(t.x,t.y),this.ctx.arc(t.x,t.y,t.radius,t.start,t.end,t.counterClockWise),this.ctx.lineTo(t.x,t.y)),s+=5;break;case"z":case"Z":this.ctx.closePath(),s-=2}}return"none"!==t.fill&&void 0!==t.fill&&(this.ctx.fillStyle=t.fill,this.ctx.fill()),r>0&&this.ctx.stroke(),this.ctx.restore(),this.ctx=o,this.canvasObj},t.prototype.createText=function(t,i,r,o,n,s){var a=this.getOptionValue(t,"font-weight");e.isNullOrUndefined(a)||"regular"!==a.toLowerCase()||(a="normal");var h=this.getOptionValue(t,"font-size"),l=this.getOptionValue(t,"font-family"),d=this.getOptionValue(t,"font-style").toLowerCase()+" "+a+" "+h+" "+l,p=this.getOptionValue(t,"text-anchor"),c=void 0!==t.opacity?t.opacity:1;e.isNullOrUndefined(t.labelRotation)||t.labelRotation;if("middle"===p&&(p="center"),this.ctx.save(),this.ctx.fillStyle=t.fill,this.ctx.font=d,this.ctx.textAlign=p,this.ctx.globalAlpha=c,t.baseline&&(this.ctx.textBaseline=t.baseline),!s){this.ctx.translate(t.x+0+(r||0),t.y+(o||0)),this.ctx.rotate(t.labelRotation*Math.PI/180)}return this.ctx.fillText(i,s?t.x:0,s?n:0),this.ctx.restore(),this.canvasObj},t.prototype.drawCircle=function(t,e){var i=this.ctx;return this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.cx,t.cy,t.r,0,2*Math.PI),this.ctx.fillStyle=t.fill,this.ctx.globalAlpha=t.opacity,this.ctx.fill(),e&&this.ctx.translate(e[0],e[1]),this.setAttributes(t),this.ctx.stroke(),this.ctx.restore(),this.ctx=i,this.canvasObj},t.prototype.drawPolyline=function(t){this.ctx.save(),this.ctx.beginPath();for(var e=t.points.split(" "),i=0;i<e.length-1;i++){var r=e[i].split(","),o=parseFloat(r[0]),n=parseFloat(r[1]);0===i?this.ctx.moveTo(o,n):this.ctx.lineTo(o,n)}this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore()},t.prototype.drawEllipse=function(t,e){var i=this.ctx,r=Math.max(t.rx,t.ry),o=t.rx/r,n=t.ry/r;this.ctx.save(),this.ctx.beginPath(),this.ctx.translate(t.cx,t.cy),e&&this.ctx.translate(e[0],e[1]),this.ctx.save(),this.ctx.scale(o,n),this.ctx.arc(0,0,r,0,2*Math.PI,!1),this.ctx.fillStyle=t.fill,this.ctx.fill(),this.ctx.restore(),this.ctx.lineWidth=this.getOptionValue(t,"stroke-width"),this.ctx.strokeStyle=t.stroke,this.ctx.stroke(),this.ctx.restore(),this.ctx=i},t.prototype.drawImage=function(t){this.ctx.save();var i=new Image;e.isNullOrUndefined(t.href)||(i.src=t.href,this.ctx.drawImage(i,t.x,t.y,t.width,t.height)),this.ctx.restore()},t.prototype.createLinearGradient=function(t){var i;return e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createLinearGradient(0,0,0,this.canvasObj.height)),this.setGradientValues(t,i)},t.prototype.createRadialGradient=function(t){var i;return e.isNullOrUndefined(t[0].colorStop)||(i=this.ctx.createRadialGradient(0,0,0,0,0,this.canvasObj.height)),this.setGradientValues(t,i)},t.prototype.setGradientValues=function(t,i){var r;if(e.isNullOrUndefined(t[0].colorStop))r=t[0].color.toString();else{for(var o=0;o<=t.length-1;o++){var n=t[o].color,s=t[o].colorStop.slice(0,-1),a=parseInt(s,10)/100;i.addColorStop(a,n)}r=i.toString()}return r},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=Object.keys(t).map(function(e){return t[e]}),o=0;o<i.length;o++)e.setAttribute(i[o],r[o]);return null},t.prototype.updateCanvasAttributes=function(t){this.setElementAttributes(t,this.canvasObj);var i=this.ctx;if(!e.isNullOrUndefined(this.dataUrl)){var r=new Image;r.onload=function(){i.drawImage(r,0,0)},r.src=this.dataUrl}},t.prototype.clearRect=function(t){this.ctx.restore(),this.ctx.clearRect(t.x,t.y,t.width,t.height)},t.prototype.createGroup=function(t){return null},t.prototype.drawClipPath=function(t){return null},t.prototype.canvasClip=function(t){this.ctx.save(),this.ctx.fillStyle="transparent",this.ctx.rect(t.x,t.y,t.width,t.height),this.ctx.fill(),this.ctx.clip()},t.prototype.canvasRestore=function(){this.ctx.restore()},t.prototype.drawPolygon=function(t){return null},t.prototype.createDefs=function(){return null},t.prototype.createClipPath=function(t){return null},t.prototype.createSvg=function(t){return null},t}(),c=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),u=function(){function t(t,e){this.width=t,this.height=e}return t}(),y=function(){function t(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}return t}(),f=function(){function t(t,e){this.isRight=e,this.isBottom=t}return t}(),g=function(){function t(t){this.id=t}return t}(),m=function(t){function e(e,i,r,o,n,s,a,h){void 0===s&&(s="");var l=t.call(this,e)||this;return l.transform="",l.baseLine="auto",l.labelRotation=0,l.x=i,l.y=r,l.anchor=o,l.text=n,l.transform=s,l.baseLine=a,l.labelRotation=h,l}return c(e,t),e}(g),x=function(t){function e(e,i,r,o,n,s,a){var h=t.call(this,e)||this;return h.opacity=n,h.fill=i,h.stroke=o,h["stroke-width"]=r,h["stroke-dasharray"]=s,h.d=a,h}return c(e,t),e}(g),v=function(){function t(t,e){this.x=t,this.y=e}return t}(),b=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),w=function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},S=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(null)],i.prototype,"size",void 0),w([e.Property("")],i.prototype,"color",void 0),w([e.Property("Segoe UI")],i.prototype,"fontFamily",void 0),w([e.Property("Normal")],i.prototype,"fontWeight",void 0),w([e.Property("Normal")],i.prototype,"fontStyle",void 0),w([e.Property(1)],i.prototype,"opacity",void 0),i}(e.ChildProperty),P=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property("")],i.prototype,"color",void 0),w([e.Property(1)],i.prototype,"width",void 0),i}(e.ChildProperty),L=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),w([e.Property(0)],i.prototype,"width",void 0),w([e.Property(0)],i.prototype,"height",void 0),i}(e.ChildProperty),O=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),w([e.Property(0)],i.prototype,"x",void 0),w([e.Property(0)],i.prototype,"y",void 0),i}(e.ChildProperty),A=function(t){function h(e,i){return t.call(this,e,i)||this}return b(h,t),h.prototype.preRender=function(){this.allowServerDataBinding=!1,this.initPrivateVariable(),this.isCanvas||this.removeSVG(),this.createTooltipElement()},h.prototype.initPrivateVariable=function(){this.renderer=new d(this.element.id),this.themeStyle=i(this.theme),this.formattedText=[],this.padding=5,this.isFirst=!0,this.markerPoint=[]},h.prototype.removeSVG=function(){var t=document.getElementById(this.element.id+"_svg"),i=document.getElementById(this.element.id+"parent_template");this.blazorTemplate&&e.resetBlazorTemplate(this.element.id+"parent_template_blazorTemplate"),t&&t.parentNode&&e.remove(t),i&&i.parentNode&&e.remove(i)},h.prototype.render=function(){if(this.fadeOuted=!1,this.template)this.updateTemplateFn(),this.createTemplate(this.areaBounds,this.location);else{this.renderText(this.isFirst);var t={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",t);var i=this.renderTooltipElement(this.areaBounds,this.location);this.drawMarker(i.isBottom,i.isRight,this.markerSize)}this.trigger("loaded",{tooltip:this});var r=document.getElementById("chartmeasuretext");r&&e.remove(r),this.allowServerDataBinding=!0},h.prototype.createTooltipElement=function(){if(this.textElements=[],!this.template||this.shared){var t=this.renderer.createSvg({id:this.element.id+"_svg"});this.element.appendChild(t);var e=document.getElementById(this.element.id+"_group");e||(e=this.renderer.createGroup({id:this.element.id+"_group"})).setAttribute("transform","translate(0,0)"),t.appendChild(e);var i=this.renderer.drawPath({id:this.element.id+"_path","stroke-width":"Bootstrap4"===this.theme?0:this.border.width,fill:this.fill||this.themeStyle.tooltipFill,opacity:"Bootstrap4"===this.theme?.9:this.opacity,stroke:this.border.color});e.appendChild(i)}},h.prototype.drawMarker=function(t,e,i){if(this.shapes.length<=0)return null;for(var r,o=0,s=this.renderer.createGroup({id:this.element.id+"_trackball_group"}),h=n(this.element.id+"_group"),l=2*this.marginX+i/2+(e?this.arrowPadding:0),d=0,p=this.shapes;d<p.length;d++){var c=p[d];"None"!==c&&(r=new x(this.element.id+"_Trackball_"+o,this.palette[o],1,"#cccccc",1,null),this.markerPoint[o]&&s.appendChild(a(new v(l,this.markerPoint[o]-this.padding+(t?this.arrowPadding:0)),c,new u(i,i),"",r,null)),o++)}h.appendChild(s)},h.prototype.renderTooltipElement=function(t,i){var s,a=n(this.element.id),h=new v(0,0),l=new v(0,0),d=n(this.element.id+"_svg"),p=n(this.element.id+"_group"),c=n(this.element.id+"_path"),u=!1,g=!1,m=!1,x=0,b=0;if(this.tipRadius=1,""!==this.header&&(this.elementSize.height+=this.marginY),this.content.length>1?(s=this.sharedTooltipLocation(t,this.location.x,this.location.y),u=!0):(s=this.tooltipLocation(t,i,h,l),this.inverted?x=(g=s.x<i.x+this.clipBounds.x)?0:this.arrowPadding:(m=!(u=s.y<i.y+this.clipBounds.y),b=u?0:this.arrowPadding)),""!==this.header){var w=r(this.isWrap?this.wrappedText:this.header,this.textStyle).height+2*this.marginY+(m?this.arrowPadding:0)+(this.isWrap?5:0),S="M "+(3*this.marginX+(g||u||m?0:this.arrowPadding))+" "+w+"L "+(s.width+(g||u||m?0:this.arrowPadding)-2*this.marginX)+" "+w,P=this.renderer.drawPath({id:this.element.id+"_header_path","stroke-width":1,fill:null,opacity:.8,stroke:this.themeStyle.tooltipHeaderLine,d:S});p.appendChild(P)}var L=this.border.width/2,O=new y(L+x,L+b,s.width-L,s.height-L);if(p.setAttribute("opacity","1"),!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(a,s.x,s.y):this.animateTooltipDiv(a,s),d.setAttribute("height",(s.height+this.border.width+(this.inverted?0:this.arrowPadding)+5).toString()),d.setAttribute("width",(s.width+this.border.width+(this.inverted?this.arrowPadding:0)+5).toString()),d.setAttribute("opacity","1"),e.isNullOrUndefined(this.tooltipPlacement)||(u=this.tooltipPlacement.indexOf("Top")>-1,m=this.tooltipPlacement.indexOf("Bottom")>-1,g=this.tooltipPlacement.indexOf("Left")>-1),c.setAttribute("d",o(this.rx,this.ry,O,h,this.arrowPadding,u,m,g,l.x,l.y,this.tipRadius)),this.enableShadow&&"Bootstrap4"!==this.theme){var A=this.element.id+"_shadow";c.setAttribute("filter",e.Browser.isIE?"":"url(#"+A+")");var C='<filter id="'+A+'" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';C+='<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>',C+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var T=this.renderer.createDefs();T.setAttribute("id",this.element.id+"SVG_tooltip_definition"),p.appendChild(T),T.innerHTML=C}return c.setAttribute("stroke",this.border.color),this.changeText(new v(x,b),m,!g&&!u&&!m,s),new f(m,!g&&!u&&!m)},h.prototype.changeText=function(t,e,i,r){var o=document.getElementById(this.element.id+"_text");e&&o.setAttribute("transform","translate(0,"+this.arrowPadding+")"),i&&o.setAttribute("transform","translate("+this.arrowPadding+" 0)")},h.prototype.findFormattedText=function(){this.formattedText=[],""!==this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()&&(this.formattedText=this.formattedText.concat(this.header)),this.formattedText=this.formattedText.concat(this.content)},h.prototype.renderText=function(t){var i,o,a,h,d,p,c=0,y=0,f=0,g=e.extend({},this.textStyle,null,!0).properties,x=n(this.element.id+"_group"),v="";this.findFormattedText();var b,w="rtl"===document.body.getAttribute("dir")?"end":"start";this.leftSpace=this.areaBounds.x+this.location.x,this.rightSpace=this.areaBounds.x+this.areaBounds.width-this.leftSpace;var S=this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim(),P=this.header.indexOf("<b>")>-1&&this.header.indexOf("</b>")>-1,L=r(this.formattedText[0],g).width+2*this.marginX+this.arrowPadding,O=this.location.x-L<this.location.x,A=this.areaBounds.x+this.areaBounds.width<this.location.x+L,C=""!==S?this.marginY:0,T=!0,k=!0;this.markerPoint=[];var E,N=this.shapes.length>0?10:0,B=this.shapes.length>0?5:0,z="Normal",_=this.themeStyle.tooltipLightLabel,F=22/parseFloat("13px")*parseFloat(g.size);t&&!this.isCanvas||(s(this.element.id+"_text"),s(this.element.id+"_header_path"),s(this.element.id+"_trackball_group"),s(this.element.id+"SVG_tooltip_definition"));var I=new m(this.element.id+"_text",2*this.marginX,2*this.marginY+2*this.padding+(2===this.marginY?3:0),w,""),R=l(I,g,null,x),j=1===this.formattedText.length&&this.formattedText[0].indexOf(" : <b>")>-1;o=(b=""!==this.header)&&P?16:13;for(var M=0,G=this.formattedText.length;M<G;M++)if(h=this.formattedText[M].replace(/<(b|strong)>/g,"<b>").replace(/<\/(b|strong)>/g,"</b>").split(/<br.*?>/g),0===M&&!j&&this.isTextWrap&&(this.leftSpace<L||O)&&(this.rightSpace<L||A)&&(E=Math.round(this.leftSpace>this.rightSpace?this.leftSpace/o:this.rightSpace/o),h=(""!==S?S:this.formattedText[M]).match(new RegExp(".{1,"+E+"}","g")),this.wrappedText=P?"<b>"+h.join("<br>")+"</b>":h.join("<br>"),this.isWrap=h.length>1),""!==h[0]){0===M&&""!==S||this.markerPoint.push((""!==S?this.marginY:0)+I.y+c);for(var V=0,U=h.length;V<U;V++){f=0,k=!0,c+=F;for(var W=0,D=(i=h[V].replace(/<b>/g,"<br><b>").replace(/<\/b>/g,"</b><br>").replace(/:/g,"<br>:<br>").split("<br>")).length;W<D;W++)if(d=i[W],/\S/.test(d)||""===d||(d=" "),!k&&" "===d||""!==d.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()){f+=" "!==d?4:0,k&&!T?(p={x:2*this.marginX+(N+B),dy:F+(k?C:0),fill:""},C=null):p=T&&k?{x:""===S?2*this.marginX+(N+B):2*this.marginX+(this.isWrap?N+B:0)}:{},k=!1,a=this.renderer.createTSpan(p,""),R.appendChild(a),d.indexOf("<b>")>-1||P&&0===W&&0===M&&(b||this.isWrap)?(z="bold",_=this.themeStyle.tooltipBoldLabel,v="font-weight:"+z,g.fontWeight=z,a.setAttribute("fill",this.textStyle.color||_)):(v="bold"===z?"font-weight:"+z:"",g.fontWeight=z,a.setAttribute("fill",this.textStyle.color||_)),(d.indexOf("</b>")>-1||P&&W===D-1&&0===M&&(b||this.isWrap))&&(z="Normal",_=this.themeStyle.tooltipLightLabel);var Q=/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(d);a.textContent=d=d.replace(/<[a-zA-Z\/](.|\n)*?>/g,Q?"":""),f+=r(d,g).width,""!==v&&(a.style.fontWeight=v.split("font-weight:")[1],a.style.color=a.getAttribute("fill")),a.style.fontFamily="inherit",a.style.fontStyle="inherit",a.style.fontSize="inherit",T=!1}f-=4,y=Math.max(y,f)}}this.elementSize=new u(y+(y>0?2*this.marginX:0),c),this.elementSize.width+=N+B;var H=R.childNodes[0];if(""!==S&&H&&!this.isWrap){g.fontWeight="bold";var X=(this.elementSize.width+2*this.padding)/2-r(S,g).width/2;H.setAttribute("x",X.toString())}},h.prototype.createTemplate=function(t,i){var r={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",r);var o=document.getElementById(this.element.id);this.isCanvas&&this.removeSVG();var s=o.firstElementChild;if(s&&e.remove(s),r.cancel)e.remove(n(this.element.id+"_tooltip"));else{for(var a=e.createElement("div",{id:this.element.id+"parent_template"}),h=this.templateFn(this.data,this.controlInstance,a.id,a.id+"_blazorTemplate","");h&&h.length>0;)e.isBlazor()||1===h.length?(a.appendChild(h[0]),h=null):a.appendChild(h[0]);o.appendChild(a);var l=this.isCanvas?a:this.element,d=l.getBoundingClientRect();this.padding=0,this.elementSize=new u(d.width,d.height);var p=this.shared?this.sharedTooltipLocation(t,this.location.x,this.location.y):this.tooltipLocation(t,i,new v(0,0),new v(0,0));if(!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(l,p.x,p.y):this.animateTooltipDiv(this.element,p),this.blazorTemplate){var c=function(){var e=n(y.element.id).getBoundingClientRect();y.elementSize=new u(e.width,e.height);var r=y.tooltipLocation(t,i,new v(0,0),new v(0,0));y.updateDiv(n(y.element.id),r.x,r.y)},y=this;c.bind(y,t,i),e.updateBlazorTemplate(this.element.id+"parent_template_blazorTemplate",this.blazorTemplate.name,this.blazorTemplate.parent,void 0,c)}}},h.prototype.sharedTooltipLocation=function(t,e,i){var r=this.elementSize.width+2*this.marginX,o=this.elementSize.height+2*this.marginY,n=new y(e+2*this.padding,i-o-this.padding,r,o);return n.y<t.y&&(n.y+=n.height+2*this.padding),n.x+n.width>t.x+t.width&&(n.x-=n.width+4*this.padding),n},h.prototype.getCurrentPosition=function(t,e,i,r){var o=this.tooltipPlacement,n=this.clipBounds.x,s=this.clipBounds.y,a=this.offset,h=this.elementSize.width+2*this.marginX,l=this.elementSize.height+2*this.marginY,d=new v(e.x,e.y);return"Top"===o||"Bottom"===o?(d=new v(d.x+n-this.elementSize.width/2-this.padding,d.y+s-this.elementSize.height-2*this.padding-this.arrowPadding-a),i.x=r.x=h/2,"Bottom"===o&&(d.y=e.y+s+a),t.x+t.width<d.x+h?(d.x=t.width>h?t.x+t.width-h+6:t.x,i.x=r.x=t.width>h?t.x+e.x-d.x:e.x):t.x>d.x&&(d.x=t.x,i.x=r.x=e.x)):(d=new v(d.x+n+a,d.y+s-this.elementSize.height/2-this.padding),i.y=r.y=l/2,"Left"===o&&(d.x=e.x+n-a-(h+this.arrowPadding)),t.y+t.height<d.y+l?(d.y=t.height>l?t.y+t.height-l+6:t.y,i.y=r.y=t.height>l?t.y+e.y-d.y:e.y):t.y>d.y&&(d.y=t.y,i.y=r.y=e.y)),new y(d.x,d.y,h,l)},h.prototype.tooltipLocation=function(t,i,r,o){if(!e.isNullOrUndefined(this.tooltipPlacement))return this.getCurrentPosition(t,i,r,o);var n=new v(i.x,i.y),s=this.elementSize.width+2*this.marginX,a=this.elementSize.height+2*this.marginY,h=this.offset,l=this.clipBounds.x,d=this.clipBounds.y,p=t.x,c=t.y;return this.inverted?(n=new v(n.x+l+h,n.y+d-this.elementSize.height/2-this.padding),r.y=o.y=a/2,(n.x+s+this.arrowPadding>p+t.width||this.isNegative)&&(n.x=(i.x>t.width?t.width:i.x)+l-h-(s+this.arrowPadding)),n.x<p&&(n.x=(i.x<0?0:i.x)+l+h),n.y<=c&&(r.y-=c-n.y,o.y-=c-n.y,n.y=c),n.y+a>=c+t.height&&(r.y+=n.y+a-(c+t.height),o.y+=n.y+a-(c+t.height),n.y-=n.y+a-(c+t.height)),r.y+this.arrowPadding/2>a-this.ry&&(r.y=a-this.ry-this.arrowPadding/2,o.y=a,this.tipRadius=0),r.y-this.arrowPadding/2<this.ry&&(r.y=this.ry+this.arrowPadding/2,o.y=0,this.tipRadius=0)):(n=new v(n.x+l-this.elementSize.width/2-this.padding,n.y+d-this.elementSize.height-2*this.padding-this.arrowPadding-h),r.x=o.x=s/2,(n.y<c||this.isNegative)&&(n.y=(i.y<0?0:i.y)+d+h),n.y+a+this.arrowPadding>c+t.height&&(n.y=Math.min(i.y,c+t.height)+d-this.elementSize.height-2*this.padding-this.arrowPadding-h),o.x=s/2,n.x<p&&(r.x-=p-n.x,o.x-=p-n.x,n.x=p),n.x+s>p+t.width&&(r.x+=n.x+s-(p+t.width),o.x+=n.x+s-(p+t.width),n.x-=n.x+s-(p+t.width)),r.x+this.arrowPadding/2>s-this.rx&&(r.x=s-this.rx-this.arrowPadding/2,o.x=s,this.tipRadius=0),r.x-this.arrowPadding/2<this.rx&&(r.x=this.rx+this.arrowPadding/2,o.x=0,this.tipRadius=0)),new y(n.x,n.y,s,a)},h.prototype.animateTooltipDiv=function(t,i){var r,o=this,n=parseFloat(t.style.left),s=parseFloat(t.style.top);new e.Animation({}).animate(t,{duration:this.duration,progress:function(e){r=e.timeStamp/e.duration,t.style.animation=null,t.style.left=n+r*(i.x-n)+"px",t.style.top=s+r*(i.y-s)+"px"},end:function(e){o.updateDiv(t,i.x,i.y),o.trigger("animationComplete",{tooltip:o})}})},h.prototype.updateDiv=function(t,e,i){t.style.left=e+"px",t.style.top=i+"px"},h.prototype.updateTemplateFn=function(){if(this.template)try{document.querySelectorAll(this.template).length&&(this.templateFn=e.compile(document.querySelector(this.template).innerHTML.trim()))}catch(t){this.templateFn=e.compile(this.template)}},h.prototype.fadeOut=function(){var t=this,i=n(this.isCanvas&&!this.template?this.element.id+"_svg":this.element.id);if(i){var r=i.firstChild;this.isCanvas&&!this.template&&(r=document.getElementById(this.element.id+"_group")?document.getElementById(this.element.id+"_group"):r);var o;r&&(o=parseFloat(r.getAttribute("opacity"))||1),new e.Animation({}).animate(r,{duration:200,progress:function(e){t.progressAnimation(r,o,e.timeStamp/e.duration)},end:function(e){t.fadeOuted=!0,t.endAnimation(r)}})}},h.prototype.progressAnimation=function(t,e,i){t.style.animation="",t.setAttribute("opacity",(e-i).toString())},h.prototype.endAnimation=function(t){t.setAttribute("opacity","0"),this.template&&(t.style.display="none"),this.trigger("animationComplete",{tooltip:this})},h.prototype.getPersistData=function(){var t=[];return this.addOnPersist(t)},h.prototype.getModuleName=function(){return"tooltip"},h.prototype.destroy=function(){t.prototype.destroy.call(this),this.element.classList.remove("e-tooltip")},h.prototype.onPropertyChanged=function(t,i){this.blazorTemplate&&e.resetBlazorTemplate(this.element.id+"parent_template_blazorTemplate"),this.isFirst=!1,this.render()},w([e.Property(!1)],h.prototype,"enable",void 0),w([e.Property(!1)],h.prototype,"shared",void 0),w([e.Property(!0)],h.prototype,"enableShadow",void 0),w([e.Property(null)],h.prototype,"fill",void 0),w([e.Property("")],h.prototype,"header",void 0),w([e.Property(.75)],h.prototype,"opacity",void 0),w([e.Complex({size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},S)],h.prototype,"textStyle",void 0),w([e.Property(null)],h.prototype,"template",void 0),w([e.Property(!0)],h.prototype,"enableAnimation",void 0),w([e.Property(300)],h.prototype,"duration",void 0),w([e.Property(!1)],h.prototype,"inverted",void 0),w([e.Property(!1)],h.prototype,"isNegative",void 0),w([e.Complex({color:"#cccccc",width:.5},P)],h.prototype,"border",void 0),w([e.Property([])],h.prototype,"content",void 0),w([e.Property(10)],h.prototype,"markerSize",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"clipBounds",void 0),w([e.Property([])],h.prototype,"palette",void 0),w([e.Property([])],h.prototype,"shapes",void 0),w([e.Complex({x:0,y:0},O)],h.prototype,"location",void 0),w([e.Property(0)],h.prototype,"offset",void 0),w([e.Property(2)],h.prototype,"rx",void 0),w([e.Property(2)],h.prototype,"ry",void 0),w([e.Property(5)],h.prototype,"marginX",void 0),w([e.Property(5)],h.prototype,"marginY",void 0),w([e.Property(12)],h.prototype,"arrowPadding",void 0),w([e.Property(null)],h.prototype,"data",void 0),w([e.Property("Material")],h.prototype,"theme",void 0),w([e.Complex({x:0,y:0,width:0,height:0},L)],h.prototype,"areaBounds",void 0),w([e.Property(null)],h.prototype,"availableSize",void 0),w([e.Property()],h.prototype,"blazorTemplate",void 0),w([e.Property(!1)],h.prototype,"isCanvas",void 0),w([e.Property(!1)],h.prototype,"isTextWrap",void 0),w([e.Property(null)],h.prototype,"tooltipPlacement",void 0),w([e.Property(null)],h.prototype,"controlInstance",void 0),w([e.Event()],h.prototype,"tooltipRender",void 0),w([e.Event()],h.prototype,"loaded",void 0),w([e.Event()],h.prototype,"animationComplete",void 0),h=w([e.NotifyPropertyChanges],h)}(e.Component);return t.TextStyle=S,t.TooltipBorder=P,t.AreaBounds=L,t.ToolLocation=O,t.Tooltip=A,t.getTooltipThemeColor=i,t.measureText=r,t.findDirection=o,t.Size=u,t.Rect=y,t.Side=f,t.CustomizeOption=g,t.TextOption=m,t.getElement=n,t.removeElement=s,t.drawSymbol=a,t.calculateShapes=h,t.PathOption=x,t.textElement=l,t.TooltipLocation=v,t.SvgRenderer=d,t.CanvasRenderer=p,t}({},ej.base),this.ejs=ej; | ||
//# sourceMappingURL=ej2-svg-base.min.js.map |
/*! | ||
* filename: index.d.ts | ||
* version : 18.4.39 | ||
* version : 18.4.44 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"_from": "@syncfusion/ej2-svg-base@*", | ||
"_id": "@syncfusion/ej2-svg-base@18.4.30", | ||
"_id": "@syncfusion/ej2-svg-base@18.4.39", | ||
"_inBundle": false, | ||
"_integrity": "sha512-7SBOatOeVYz1wHvxt0hkf9R1C7cbFclJXDDDWBVsKKFX+aVTD1rH2rX0E6T/AKUkrm/jmh1NcJZSQxSK8S+3VA==", | ||
"_integrity": "sha512-Ef94Tg+jYUH8rZf9406HsWXTswam802LGd2PViqjqkzAOnk8IiYuk8aqpAsvp5yLgWNmlNdwk8Y3Ykg+bCjkKw==", | ||
"_location": "/@syncfusion/ej2-svg-base", | ||
@@ -31,4 +31,4 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-svg-base/-/ej2-svg-base-18.4.30.tgz", | ||
"_shasum": "b16707c86414a3212df2dc486ecdb4b1df24a99e", | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-svg-base/-/ej2-svg-base-18.4.39.tgz", | ||
"_shasum": "8cc590244574c4feb0123c2e42c0ddc90ccd48a0", | ||
"_spec": "@syncfusion/ej2-svg-base@*", | ||
@@ -44,3 +44,3 @@ "_where": "/jenkins/workspace/automation_release_18.4.0.1-WOJ6QVY6EU5ONBWOYGQFKS2VU2UW7E67MOXUPKCE5AX7QQX7M5JQ/packages/included", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~18.4.39" | ||
"@syncfusion/ej2-base": "~18.4.44" | ||
}, | ||
@@ -66,4 +66,4 @@ "deprecated": false, | ||
"typings": "index.d.ts", | ||
"version": "18.4.39", | ||
"version": "18.4.44", | ||
"sideEffects": true | ||
} |
@@ -491,3 +491,3 @@ var __extends = (this && this.__extends) || (function () { | ||
var elem = createElement('div', { id: this.element.id + 'parent_template' }); | ||
var templateElement = this.templateFn(this.data, this.controlInstance, 'template', elem.id + '_blazorTemplate', ''); | ||
var templateElement = this.templateFn(this.data, this.controlInstance, elem.id, elem.id + '_blazorTemplate', ''); | ||
while (templateElement && templateElement.length > 0) { | ||
@@ -507,3 +507,4 @@ if (isBlazor() || templateElement.length === 1) { | ||
this.elementSize = new Size(rect.width, rect.height); | ||
var tooltipRect = this.tooltipLocation(areaBounds, location, new TooltipLocation(0, 0), new TooltipLocation(0, 0)); | ||
var tooltipRect = this.shared ? this.sharedTooltipLocation(areaBounds, this.location.x, this.location.y) | ||
: this.tooltipLocation(areaBounds, location, new TooltipLocation(0, 0), new TooltipLocation(0, 0)); | ||
if (this.enableAnimation && !this.shared && !this.isFirst) { | ||
@@ -736,3 +737,3 @@ this.animateTooltipDiv(this.element, tooltipRect); | ||
tooltipGroup.setAttribute('opacity', '0'); | ||
if (this.template && !this.shared) { | ||
if (this.template) { | ||
tooltipGroup.style.display = 'none'; | ||
@@ -739,0 +740,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1031134
8368